saltstack-formulas / samba-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
16 stars 72 forks source link

Regression in Winbind packaging breaks APT [bionic] #57

Open noelmcloughlin opened 5 years ago

noelmcloughlin commented 5 years ago

Tracking https://bugs.launchpad.net/ubuntu-packaging-guide/+bug/1818431

noelmcloughlin commented 5 years ago

How about this fix which stops Debian interfering with systemd.

    ### stop debian interference with services (https://wiki.debian.org/chroot)
    if [ -f "/usr/bin/apt-get" ]; then
        cat > /usr/sbin/policy-rc.d <<EOF
#!/bin/sh
exit 101
EOF

From official documentation @ https://wiki.debian.org/chroot :

Create a /usr/sbin/policy-rc.d file IN THE CHROOT so that dpkg won't start daemons unless desired. This example prevents all daemons from being started in the chroot.

chroot /srv/chroot/stretch
cat > ./usr/sbin/policy-rc.d <<EOF
#!/bin/sh
exit 101
EOF
chmod a+x ./usr/sbin/policy-rc.d