Thanks for the investigation and the patch, Lucas.

Ugh, this one is kind of messy :-/.  I'm not a fan of using d/not-
installed; I think it tends to hide problems that can prove to be
important.

I spent some time trying to figure out why this change works on Debian
but not on Ubuntu.  When I compared Debian's build logs against
Ubuntu's, I noticed this difference:

Debian:

checking Directory to install systemd user unit files... Package systemd
was not found in the pkg-config search path.

Ubuntu:

checking Directory to install systemd user unit files...
/usr/lib/systemd/user


Upon investigating a bit more, I noticed that Debian's systemd doesn't seem to 
ship with a pkg-config, whereas it does in Ubuntu.  So, I looked into 
redshift's configure.ac and found this:

# Check for systemd
PKG_PROG_PKG_CONFIG
AC_MSG_CHECKING([Directory to install systemd user unit files])
AC_ARG_WITH([systemduserunitdir],
            [AS_HELP_STRING([--with-systemduserunitdir=<dir>],
                            [Directory for systemd user unit files])],
            [], [with_systemduserunitdir=$($PKG_CONFIG 
--variable=systemduserunitdir systemd)])
AS_IF([test -n "$with_systemduserunitdir" -a "x$with_systemduserunitdir" != 
xno], [
        AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
        AC_MSG_RESULT([$systemduserunitdir])
        enable_systemd=yes
], [
        AC_MSG_RESULT([not enabled])
        enable_systemd=no
])
AM_CONDITIONAL([ENABLE_SYSTEMD], [test "x$enable_systemd" != xno])


You can see that there is an "else" branch (on AC_ARG_WITH) which accounts for 
disabling systemd support.  That's good.  I was also able to verify that 
Makefile.am takes ENABLE_SYSTEMD into account.

Having said all that, I think a better approach to this bug would be:

--- debian/rules.old    2021-08-18 16:43:05.739938897 -0400
+++ debian/rules        2021-08-18 16:41:49.973477436 -0400
@@ -12,6 +12,9 @@
 override_dh_auto_configure:
        intltoolize --force
        dh_auto_configure -- \
+# Disable the creation/installation of systemd service files.
+# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892275
+               --without-systemduserunitdir \
                --enable-randr --enable-vidmode \
                --enable-geoclue2 --disable-geoclue \
                --enable-ubuntu --enable-apparmor

WDYT?

** Bug watch added: Debian Bug tracker #892275
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892275

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1940465

Title:
  redshift/1.12-4.2 FTBFS in Impish

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/redshift/+bug/1940465/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to