zfsonlinux/debian/patches
Antonio Russo 4d56f4c5b5 Preserve /etc/zfs/zed.d configuration on upgrade
Of the zedlet scripts shipped by upstream, a subset are enabled by
default, by creating symlinks in /etc/zfs/zed.d.  These symlinks are
shipped in the zfs-zed package.  dpkg, however, does not support
conffile handling of symlinks, and therefore any changes (removals) to
the symlinks are not preserved on package upgrade.

To address this policy violation, we:

 1. During package build, create a list of enabled-by-default zedlets,
    instead of creating symlinks.
 2. On package removal, identify all enabled-by-default zedlets whose
    symlinks do not exist (i.e., were removed by the user). This is done
    by creating "whiteout" links to /dev/null in their place).
 3. On package installation, create links to enabled-by-default zedlets
    UNLESS there is already a file there (i.e., abort if there is a
    whiteout link).
 4. We also clean up broken symlinks to removed zedlets at package
    postinst.

(cherry picked and adapted from 5cee380324d74e640d5dd7a360faba3994c8007f [0])

[0] https://salsa.debian.org/zfsonlinux-team/zfs.git

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2020-03-23 08:08:11 +01:00
..
0001-Check-for-META-and-DCH-consistency-in-autoconf.patch update submodule and patches for zfs-0.8.3 2020-01-24 09:11:47 +01:00
0002-always-load-ZFS-module-on-boot.patch update submodule and patches to 0.8.2 2019-09-30 06:59:38 +02:00
0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch update submodule and patches to 0.8.2 2019-09-30 06:59:38 +02:00
0004-import-with-d-dev-disk-by-id-in-scan-service.patch update submodule and patches to 0.8.2 2019-09-30 06:59:38 +02:00
0005-Enable-zed-emails.patch update submodule and patches to 0.8.2 2019-09-30 06:59:38 +02:00
0006-dont-symlink-zed-scripts.patch Preserve /etc/zfs/zed.d configuration on upgrade 2020-03-23 08:08:11 +01:00
series Preserve /etc/zfs/zed.d configuration on upgrade 2020-03-23 08:08:11 +01:00