aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorUmer Saleem <[email protected]>2022-12-14 06:33:05 +0500
committerGitHub <[email protected]>2022-12-13 17:33:05 -0800
commite6e31dd5406d59edaaf5a7eeebd2fb83fb86236f (patch)
tree31d9f64ac3d4db04e9477ad510a5a97a30d996ad /config
parentf3f5263f8a9b0f8b51051698f68fbd76e181a685 (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 'config')
-rw-r--r--config/deb.am24
-rw-r--r--config/zfs-build.m41
2 files changed, 21 insertions, 4 deletions
diff --git a/config/deb.am b/config/deb.am
index 0033dd759..76e54acfa 100644
--- a/config/deb.am
+++ b/config/deb.am
@@ -1,14 +1,17 @@
-PHONY += deb-kmod deb-dkms deb-utils deb deb-local
+PHONY += deb-kmod deb-dkms deb-utils deb deb-local native-deb-local \
+ native-deb-utils native-deb-kmod native-deb
-deb-local:
+native-deb-local:
@(if test "${HAVE_DPKGBUILD}" = "no"; then \
echo -e "\n" \
"*** Required util ${DPKGBUILD} missing. Please install the\n" \
"*** package for your distribution which provides ${DPKGBUILD},\n" \
"*** re-run configure, and try again.\n"; \
exit 1; \
- fi; \
- if test "${HAVE_ALIEN}" = "no"; then \
+ fi)
+
+deb-local: native-deb-local
+ @(if test "${HAVE_ALIEN}" = "no"; then \
echo -e "\n" \
"*** Required util ${ALIEN} missing. Please install the\n" \
"*** package for your distribution which provides ${ALIEN},\n" \
@@ -85,3 +88,16 @@ deb-utils: deb-local rpm-utils-initramfs
$$pkg8 $$pkg9 $$pkg10 $$pkg11;
deb: deb-kmod deb-dkms deb-utils
+
+debian:
+ cp -r contrib/debian debian; chmod +x debian/rules;
+
+native-deb-utils: native-deb-local debian
+ cp contrib/debian/control debian/control; \
+ $(DPKGBUILD) -b -rfakeroot -us -uc;
+
+native-deb-kmod: native-deb-local debian
+ sh scripts/make_gitrev.sh; \
+ fakeroot debian/rules override_dh_binary-modules;
+
+native-deb: native-deb-utils native-deb-kmod
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
index bb3c81a64..2703e6c01 100644
--- a/config/zfs-build.m4
+++ b/config/zfs-build.m4
@@ -464,6 +464,7 @@ AC_DEFUN([ZFS_AC_DPKG], [
AC_SUBST(HAVE_DPKGBUILD)
AC_SUBST(DPKGBUILD)
AC_SUBST(DPKGBUILD_VERSION)
+ AC_SUBST([CFGOPTS], ["$CFGOPTS"])
])
dnl #