mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 10:54:35 +03:00
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 <mail@gmelikov.ru> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Umer Saleem <usaleem@ixsystems.com> Closes #14265
This commit is contained in:
@@ -0,0 +1 @@
|
||||
rules
|
||||
@@ -2,8 +2,7 @@ Source: openzfs-linux
|
||||
Section: contrib/kernel
|
||||
Priority: optional
|
||||
Maintainer: ZFS on Linux specific mailing list <zfs-discuss@list.zfsonlinux.org>
|
||||
Build-Depends: abigail-tools,
|
||||
debhelper-compat (= 12),
|
||||
Build-Depends: debhelper-compat (= 12),
|
||||
dh-python,
|
||||
dkms (>> 2.1.1.2-5),
|
||||
libaio-dev,
|
||||
|
||||
@@ -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#
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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#
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user