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)
- On a FreeBSD system with lxqt-admin built at or after commit 1569299, select Preferences->LXQt Settings->Date and Time from the LXQt menu.
- 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: