diff options
author | Umer Saleem <[email protected]> | 2022-12-14 06:33:05 +0500 |
---|---|---|
committer | GitHub <[email protected]> | 2022-12-13 17:33:05 -0800 |
commit | e6e31dd5406d59edaaf5a7eeebd2fb83fb86236f (patch) | |
tree | 31d9f64ac3d4db04e9477ad510a5a97a30d996ad /contrib/debian | |
parent | f3f5263f8a9b0f8b51051698f68fbd76e181a685 (diff) |
Add native-deb* targets to build native Debian packages
In continuation of previous #13451, this commits adds native-deb*
targets for make to build native debian packages. Github workflows
are updated to build and test native Debian packages.
Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.
Additional packages on top of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes #14265
Diffstat (limited to 'contrib/debian')
-rw-r--r-- | contrib/debian/.gitignore | 1 | ||||
-rw-r--r-- | contrib/debian/control | 3 | ||||
-rw-r--r-- | contrib/debian/openzfs-libpam-zfs.postinst | 4 | ||||
-rw-r--r-- | contrib/debian/openzfs-zfs-zed.postinst | 7 | ||||
-rw-r--r-- | contrib/debian/openzfs-zfs-zed.prerm | 16 | ||||
-rw-r--r-- | contrib/debian/openzfs-zfsutils.install | 1 | ||||
-rw-r--r-- | contrib/debian/openzfs-zfsutils.postinst | 15 | ||||
-rwxr-xr-x | contrib/debian/rules.in (renamed from contrib/debian/rules) | 4 |
8 files changed, 7 insertions, 44 deletions
diff --git a/contrib/debian/.gitignore b/contrib/debian/.gitignore new file mode 100644 index 000000000..de7475d88 --- /dev/null +++ b/contrib/debian/.gitignore @@ -0,0 +1 @@ +rules diff --git a/contrib/debian/control b/contrib/debian/control index a0db4985e..b9bb23b09 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -2,8 +2,7 @@ Source: openzfs-linux Section: contrib/kernel Priority: optional Maintainer: ZFS on Linux specific mailing list <[email protected]> -Build-Depends: abigail-tools, - debhelper-compat (= 12), +Build-Depends: debhelper-compat (= 12), dh-python, dkms (>> 2.1.1.2-5), libaio-dev, diff --git a/contrib/debian/openzfs-libpam-zfs.postinst b/contrib/debian/openzfs-libpam-zfs.postinst index 2db86744e..03893454e 100644 --- a/contrib/debian/openzfs-libpam-zfs.postinst +++ b/contrib/debian/openzfs-libpam-zfs.postinst @@ -1,6 +1,8 @@ #!/bin/sh set -e -pam-auth-update --package +if ! $(ldd "/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/security/pam_zfs_key.so" | grep -q "libasan") ; then + pam-auth-update --package +fi #DEBHELPER# diff --git a/contrib/debian/openzfs-zfs-zed.postinst b/contrib/debian/openzfs-zfs-zed.postinst index a615eec95..ac14957a3 100644 --- a/contrib/debian/openzfs-zfs-zed.postinst +++ b/contrib/debian/openzfs-zfs-zed.postinst @@ -4,13 +4,6 @@ set -e zedd="/usr/lib/zfs-linux/zed.d" etcd="/etc/zfs/zed.d" -# enable all default zedlets that are not overridden -while read -r file ; do - etcfile="${etcd}/${file}" - [ -e "${etcfile}" ] && continue - ln -sfT "${zedd}/${file}" "${etcfile}" -done < "${zedd}/DEFAULT-ENABLED" - # remove the overrides created in prerm find "${etcd}" -maxdepth 1 -lname '/dev/null' -delete # remove any dangling symlinks to old zedlets diff --git a/contrib/debian/openzfs-zfs-zed.prerm b/contrib/debian/openzfs-zfs-zed.prerm deleted file mode 100644 index b8340df53..000000000 --- a/contrib/debian/openzfs-zfs-zed.prerm +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -set -e - -zedd="/usr/lib/zfs-linux/zed.d" -etcd="/etc/zfs/zed.d" - -if [ "$1" != "failed-upgrade" ] && [ -d "${etcd}" ] && [ -d "${zedd}" ] ; then - while read -r file ; do - etcfile="${etcd}/${file}" - ( [ -L "${etcfile}" ] || [ -e "${etcfile}" ] ) && continue - ln -sT /dev/null "${etcfile}" - done < "${zedd}/DEFAULT-ENABLED" -fi - -#DEBHELPER# - diff --git a/contrib/debian/openzfs-zfsutils.install b/contrib/debian/openzfs-zfsutils.install index e10a50e01..9c7b05451 100644 --- a/contrib/debian/openzfs-zfsutils.install +++ b/contrib/debian/openzfs-zfsutils.install @@ -131,5 +131,4 @@ usr/share/man/man8/zstreamdump.8 usr/share/man/man4/spl.4 usr/share/man/man4/zfs.4 usr/share/man/man7/zpool-features.7 -usr/share/man/man7/dracut.zfs.7 usr/share/man/man8/zpool_influxdb.8 diff --git a/contrib/debian/openzfs-zfsutils.postinst b/contrib/debian/openzfs-zfsutils.postinst index b13a78654..7dc208d0d 100644 --- a/contrib/debian/openzfs-zfsutils.postinst +++ b/contrib/debian/openzfs-zfsutils.postinst @@ -1,21 +1,6 @@ #!/bin/sh set -e -# The hostname and hostid of the last system to access a ZFS pool are stored in -# the ZFS pool itself. A pool is foreign if, during `zpool import`, the -# current hostname and hostid are different than the stored values thereof. -# -# The only way of having a stable hostid is to define it in /etc/hostid. -# This postinst helper will check if we already have the hostid stabilized by -# checking the existence of the file /etc/hostid to be 4 bytes at least. -# If this file don't already exists on our system or has less than 4 bytes, then -# a new (random) value is generated with zgenhostid (8) and stored in -# /etc/hostid - -if [ ! -f /etc/hostid ] || [ "$(stat -c %s /etc/hostid)" -lt 4 ] ; then - zgenhostid -fi - # When processed to here but zfs kernel module is not loaded, the subsequent # services would fail to start. In this case the installation process just # fails at the postinst stage. The user could do diff --git a/contrib/debian/rules b/contrib/debian/rules.in index 5f4889445..63892c6ca 100755 --- a/contrib/debian/rules +++ b/contrib/debian/rules.in @@ -35,7 +35,7 @@ override_dh_autoreconf: override_dh_auto_configure: @# Build the userland, but don't build the kernel modules. - dh_auto_configure -- \ + dh_auto_configure -- @CFGOPTS@ \ --bindir=/usr/bin \ --sbindir=/sbin \ --libdir=/lib/"$(DEB_HOST_MULTIARCH)" \ @@ -195,7 +195,7 @@ override_dh_prep-deb-files: override_dh_configure_modules: override_dh_configure_modules_stamp override_dh_configure_modules_stamp: - ./configure \ + ./configure @CFGOPTS@ \ --with-config=kernel \ --with-linux=$(KSRC) \ --with-linux-obj=$(KOBJ) |