linuxmint / cinnamon-settings-daemon

The settings daemon for the Cinnamon desktop
GNU General Public License v2.0
58 stars 59 forks source link

Stop using deprecated libdbus-glib-1-dev #315

Closed Fantu closed 11 months ago

Fantu commented 3 years ago

From the bug opened in debian 2 years ago ( https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897577 ):

libdbus-glib-1-dev: is deprecated (#895291). We want to remove it in the long run, so cinnamon-settings-daemon should stop using it. In particular, it is presently using dbus-binding-tool and that happens to not work well for cross compilation (see #873617). Rather than fixing dbus-glib, the work should be invested in reducing reverse dependencies. cinnamon-settings-daemon is one of those.

several software have already removed it, I don't know how long it will remain supported.

From Simon McVittie reply some useful infos:

dbus-binding-tool generates code that uses <dbus/dbus-glib.h>. To convert c-s-d to GDBus, it would be necessary to change all calls into code generated by dbus-binding-tool, and any hand-written dbus_foo() calls, to their GDBus equivalents. The closest equivalent of dbus-binding-tool for GDBus is gdbus-codegen.

https://gitlab.gnome.org/GNOME/gnome-settings-daemon/commit/d7cd7cfef5c77e16e6693b8991cb2ae5a187db12 is an example of conversion from dbus-glib to GDBus without using gdbus-codegen. gnome-settings-daemon doesn't seem to use gdbus-codegen for service-side code.

From some searches on

https://github.com/linuxmint/cinnamon-settings-daemon it looks as though the datetime plugin is the only part still using dbus-glib. The equivalent in gnome-settings-daemon was deleted in https://gitlab.gnome.org/GNOME/gnome-settings-daemon/commit/27fa171efe4179c0a42ec79e0dc501077f042a08 and replaced by a new plugin using systemd-timedated and Geoclue in https://gitlab.gnome.org/GNOME/gnome-settings-daemon/commit/876590336fdb1292852061509a0dba5385cd1805.

If it is a goal for Cinnamon to support non-systemd system services, I would suggest using a compatible reimplementation of the timedated API https://www.freedesktop.org/wiki/Software/systemd/timedated/ such as https://github.com/mlichvar/timedatex rather than having a Cinnamon-specific system-level daemon.

ItzSwirlz commented 3 years ago

Would this suggest rebasing the daemons off of GNOME?

Fantu commented 3 years ago

for this task as Simon McVittie wrote only rebase of datetime plugin and porting of other smaller changes seems needed. Full rebase I suppose need a big work for adapt to cinnamon and also rebase and/or changes in other components like cinnamon-control-center and cinnnamon-desktop

Fantu commented 2 years ago

solved in https://github.com/linuxmint/cinnamon-settings-daemon/commit/5c33b711ebd328dd11f64b1bd6486e36422b3bc0 thanks @mtwebster