/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to debian/mandos-client.postrm

  • Committer: Teddy Hogeborn
  • Date: 2024-09-08 07:04:52 UTC
  • Revision ID: teddy@recompile.se-20240908070452-oyxj1zojswt0aft5
Fix #1069689 by using pkg-config in debian/rules

The directory for systemd unit files (output of "pkg-config systemd
--variable=systemdsystemunitdir") has changed.  But there was a
hardcoded instance of this directory in debian/mandos.dirs.  Fix this
by removing the directory from debian/mandos.dirs, and instead
creating the correct directory explicitly in debian/rules.

* debian/mandos.dirs (lib/systemd/system): Removed.
* debian/rules (PKG_CONFIG): New; copied from Makefile.
  (override_dh_installdirs-indep): New; run dh_installdirs twice:
  first normally, and again for the systemd unit file directory.

Closes: #1069689
Reported-By: Helmut Grohne <helmut@subdivi.de>
Thanks: Helmut Grohne <helmut@subdivi.de> for report and analysis

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
update_initramfs()
33
33
{
34
34
    if command -v update-initramfs >/dev/null; then
35
 
        update-initramfs -k all -u
 
35
        update-initramfs -k all -u 1>&2
36
36
    elif command -v dracut >/dev/null; then
37
37
        # Logic taken from dracut.postinst
38
38
        for kernel in /boot/vmlinu[xz]-*; do
39
39
            kversion="${kernel#/boot/vmlinu[xz]-}"
40
40
            if [ "$kversion" != "*" ]; then
41
 
                /etc/kernel/postinst.d/dracut "$kversion"
 
41
                /etc/kernel/postinst.d/dracut "$kversion" 1>&2
42
42
            fi
43
43
        done
44
44
    fi
50
50
        ;;
51
51
 
52
52
    purge)
53
 
        shred --remove /etc/keys/mandos/seckey.txt 2>/dev/null || :
 
53
        shred --remove /etc/keys/mandos/seckey.txt \
 
54
            /etc/keys/mandos/tls-privkey.pem 2>/dev/null || :
54
55
        rm --force /etc/mandos/plugin-runner.conf \
55
56
            /etc/keys/mandos/pubkey.txt \
56
57
            /etc/keys/mandos/seckey.txt \