[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Problem with dh_installsystemd scripts on packages providing the same systemd service



Hi!

We have recently changed the way on which we package squid to produce two
binary packages, squid and squid-openssl, these packages conflict with each
other as they have the same binaries and the same squid.service. The
difference between the packages is the functionalities the squid server
gives you when compiled against gnutls or against openssl.

The problem we've found is that when you purge either squid or squid-openssl
and the other remains installed, the postrm code that debhelper adds
disables the squid service with:

# Automatically added by dh_installinit/13.3.4
if [ "$1" = "purge" ] ; then
        update-rc.d squid remove >/dev/null
fi

and also:

# Automatically added by dh_installsystemd/13.3.4
if [ "$1" = "purge" ]; then
        if [ -x "/usr/bin/deb-systemd-helper" ]; then
                deb-systemd-helper purge 'squid.service' >/dev/null || true
                deb-systemd-helper unmask 'squid.service' >/dev/null || true
        fi
fi

without taking into account that another package still provides the squid
service.

I'd like to know if this is something that debhelper can take care of and if
it can be dealt for Bullseye or not.

I believe that this could be dealt with using something like what
dh_apparmor does, like this:

# Automatically added by dh_apparmor/2.13.6-9
if [ "$1" = "purge" ] && ! [ -e "/etc/apparmor.d/usr.sbin.squid" ] ; then

Which in our case it would make the two if like this:

if [ "$1" = "purge" ] && ! [ -e /etc/init.d/squid ]; then
if [ "$1" = "purge" ] && ! [ -e /lib/systemd/system/squid.service ]; then

I have tested this on squid and it works ok.

I'm going to file a bug on debhelper for this, I'm trying to have a patch,
but I don't know this can make it to Bullseye.

Should I wait for a possible fix on debhelper?

Or should I try to fix this on squid? If so... how?

Regards...
-- 
Manty/BestiaTester -> http://manty.net


Reply to: