Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1569299c4020f9b96a5850ef26fe9fb4544071dd breaks date/time admin on FreeBSD #256

Open
chris2553 opened this issue Nov 16, 2021 · 2 comments

Comments

@chris2553
Copy link

I submitted a patch to allow date and time administration to work on Linux systems that do not have systemd. The patch was applied in commit 1569299. Jesper Schmitz Mouridsen has reported that date/time administration no longer works on FreeBSD. Looking again at my patch I see that the problem is caused by my patch. Please see the discussion at #136.

Expected Behavior

Time and date administration should function correctly on FreeBSD.

Current Behavior

Jesper's report doesn't describe the problem on FreeBSD in detail, just saying , effectively, that date and time administration is broken.

Possible Solution

My patch set a new build flag (NO_SYSTEMD) on systems that do not have systemd installed. Since FreeBSD does not include systemd, the flag was set resulting in the wrong code being compiled in lxqt-admin-time/datetime.cpp. My proposed fix is to amend lxqt-admin-time/CMakeLists.txt so that the logic that sets the flag is not executed on FreeBSD systems. I have a patch that does that , which Jesper has reported restores date and time administration on FreeBSD. I have applied the patch to lxqt-admin-1.0.0 and confirmed that date and time administration still works properly on my systemd-less Linux system (which is based on Linux from Scratch). The patch is as follows:

-- lxqt-admin-1.0.0/lxqt-admin-time/CMakeLists.txt.orig 2021-11-10 19:58:57.988708301 +0000
+++ lxqt-admin-1.0.0/lxqt-admin-time/CMakeLists.txt 2021-11-10 20:01:43.784715265 +0000
@@ -59,11 +59,13 @@ lxqt_translate_desktop(DESKTOP_FILES
lxqt_app_translation_loader(lxqt-admin-time_QM_LOADER ${PROJECT_NAME})
#************************************************

+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
find_package(PkgConfig QUIET)
pkg_check_modules(LIBSYSTEMD QUIET libsystemd)
if(NOT LIBSYSTEMD_FOUND)
add_definitions(-DNO_SYSTEMD)
endif()
+endif()

add_executable(lxqt-admin-time
${lxqt-admin-time_SRCS}

Steps to Reproduce (for bugs)
  1. On a FreeBSD system with lxqt-admin built at or after commit 1569299, select Preferences->LXQt Settings->Date and Time from the LXQt menu.
  2. Try to amend the date or time.
Context

My patch has affected me by now being able to use lxqt-admin administer date and time on my systemd-less Linux system. The patch has, however, prevented users on FreeBSD from administering date and time with lxqt-admin.

System Information

It seems obvious that Jesper uses a FreeBSD system, but I do not have the details.

  • Distribution & Version:
  • Kernel:
  • Qt Version:
  • liblxqt Version:
  • lxqt-build-tools Version:
  • Package version:
@luis-pereira
Copy link
Member

We accept patches.

@chris2553
Copy link
Author

The patch is embedded in the text above. Are you saying I need to send it to you again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants