diff options
author | Umer Saleem <[email protected]> | 2022-10-28 03:38:45 +0500 |
---|---|---|
committer | GitHub <[email protected]> | 2022-10-27 15:38:45 -0700 |
commit | 4d631a509d067c2695a396983cb12f58d92d4e04 (patch) | |
tree | fbf03b8f2344cbd7830c5029227c7b349e5e7938 /contrib/debian/tree | |
parent | 4938d01db7e12751e0cc3161d23dd549a0cee8ab (diff) |
Add native Debian Packaging for Linux
Currently, the Debian packages are generated from ALIEN that converts
RPMs to Debian packages. This commit adds native Debian packaging for
Debian based systems.
This packaging is a fork of Debian zfs-linux 2.1.6-2 release.
(source: https://salsa.debian.org/zfsonlinux-team/zfs)
Some updates have been made to keep the footprint minimal that
include removing the tests, translation files, patches directory etc.
All credits go to Debian ZFS on Linux Packaging Team.
For copyright information, please refer to contrib/debian/copyright.
scripts/debian-packaging.sh can be used to invoke the build.
Reviewed-by: Mo Zhou <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes #13451
Diffstat (limited to 'contrib/debian/tree')
-rw-r--r-- | contrib/debian/tree/zfs-initramfs/usr/share/initramfs-tools/conf.d/zfs | 8 | ||||
-rwxr-xr-x | contrib/debian/tree/zfs-initramfs/usr/share/initramfs-tools/hooks/zdev | 67 |
2 files changed, 75 insertions, 0 deletions
diff --git a/contrib/debian/tree/zfs-initramfs/usr/share/initramfs-tools/conf.d/zfs b/contrib/debian/tree/zfs-initramfs/usr/share/initramfs-tools/conf.d/zfs new file mode 100644 index 000000000..5103cc450 --- /dev/null +++ b/contrib/debian/tree/zfs-initramfs/usr/share/initramfs-tools/conf.d/zfs @@ -0,0 +1,8 @@ +for x in $(cat /proc/cmdline) +do + case $x in + root=ZFS=*) + BOOT=zfs + ;; + esac +done diff --git a/contrib/debian/tree/zfs-initramfs/usr/share/initramfs-tools/hooks/zdev b/contrib/debian/tree/zfs-initramfs/usr/share/initramfs-tools/hooks/zdev new file mode 100755 index 000000000..0cf21a421 --- /dev/null +++ b/contrib/debian/tree/zfs-initramfs/usr/share/initramfs-tools/hooks/zdev @@ -0,0 +1,67 @@ +#!/bin/sh +# +# Add udev rules for ZoL to the initrd. +# + +PREREQ="udev" +PREREQ_UDEV_RULES="60-zvol.rules 69-vdev.rules" +COPY_EXEC_LIST="/lib/udev/zvol_id /lib/udev/vdev_id" + +# Generic result code. +RC=0 + +case $1 in +prereqs) + echo "$PREREQ" + exit 0 + ;; +esac + +for ii in $COPY_EXEC_LIST +do + if [ ! -x "$ii" ] + then + echo "Error: $ii is not executable." + RC=2 + fi +done + +if [ "$RC" -ne 0 ] +then + exit "$RC" +fi + +. /usr/share/initramfs-tools/hook-functions + +mkdir -p "$DESTDIR/lib/udev/rules.d/" +for ii in $PREREQ_UDEV_RULES +do + if [ -e "/etc/udev/rules.d/$ii" ] + then + cp -p "/etc/udev/rules.d/$ii" "$DESTDIR/lib/udev/rules.d/" + elif [ -e "/lib/udev/rules.d/$ii" ] + then + cp -p "/lib/udev/rules.d/$ii" "$DESTDIR/lib/udev/rules.d/" + else + echo "Error: Missing udev rule: $ii" + echo " This file must be in the /etc/udev/rules.d or /lib/udev/rules.d directory." + exit 1 + fi +done + +for ii in $COPY_EXEC_LIST +do + copy_exec "$ii" +done + +if [ -f '/etc/default/zfs' -a -r '/etc/default/zfs' ] +then + mkdir -p "$DESTDIR/etc/default" + cp -a '/etc/default/zfs' "$DESTDIR/etc/default/" +fi + +if [ -d '/etc/zfs' -a -r '/etc/zfs' ] +then + mkdir -p "$DESTDIR/etc" + cp -a '/etc/zfs' "$DESTDIR/etc/" +fi |