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>
If a pool is already scrubbing, zpool scrub will return an error. This
breaks the cron scrub script. It outputs that error and then does not
scrub any further pools.
This change checks to see if the pool is scrubbing before attempting to
start a scrub. This addresses long-running scrubs. Note that a
"long-running" scrub here is not necessarily a month long. If the
system is shut off or the pool is exported, the scrub will resume later.
(cherry picked from 41e457da7bfc837a52f3389cb6961bc6737b874d [0])
[0] https://salsa.debian.org/zfsonlinux-team/zfs.git
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This reduces the required time for the configure step drastically,
from previous:
# time ./configure --with-config=kernel
-> 124.14s user 34.06s system 103% cpu 2:32.90 total
to now:
# time ./configure --with-config=kernel
-> 75.07s user 15.01s system 394% cpu 22.821 total
(152 seconds vs 22 seconds)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
The copy command:
# cp -a ${ZFSSRC}/* ${ZFSDIR}/
did not copied over hidden files (those beginning with a dot) and
thus a upstream patches which changed also .gitignore did not worked
when copied over 1:1, instead of removing the changes to .gitignore
it's IMO better to copy the full sources ensuring the whole state of
the upstream project source repo is used.
With submodules we still do not copy over a potential big .git
folder, as we as submodule user have the submodules .git state in our
.git/modules folder where the submodule just references to.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
That's why it was guarded with the "HAVE_KERNEL_FPU_INITIALIZED"
defined in the first place..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
only to mark the patched kernel module with a new version,
user space tools and packages where not changed.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
* wrong-path-for-interpreter is a lintian error, one single zfs-test used
/usr/bin/ksh instead of /bin/ksh.
* python-script-but-no-python-dep was reported because test-runner.py had
/usr/bin/python as shebang, but the buildsystem and our dependencies expected
/usr/bin/python3
* executable-not-elf-or-script were results of some files being installed with
the wrong permissions
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
since splat has been removed from zfs (during the repository merge of zfs and
spl, the userspace spl package does not contain any files (apart from metafiles)
keep the package as metapackage, s.t. the old splat manpage and binary gets
removed upon upgrade.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
/etc/hostid does not exist on a minimal debian system.
ZFS reads its contents for MMP (zpool property multihost set to on), and needs
the value to be stable.
Before the SPL->ZFS merge the spl userspace package wrote the file (by parsing/
mangling the output of hostid (1)) Since ZFS provides the zgenhostid script,
which creates a random 4 byte hostid and writes it to /etc/hostid, we use that
instead. (hostid (1) default to mangling a configured ip of the system, which
can be the same across multiple installs (install happens with the same ip)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
taken from spl/debian/rules
Additionally refactor the actual change into a separate target.
This is needed when building the kernel-modules from an rc-tag (e.g. 0.8.0-rc5)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
the --with-zfsexecdir configure option is available in ZFS 0.8 and replaces
the patch for cmd/zpool/Makefile.am
(cherry-picked from salsa.d.o e1af594a0970e2b84c922f483e6798e7d155b7b7)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>