]> git.proxmox.com Git - mirror_zfs.git/blame - config/deb.am
Allow mounting snapshots in .zfs/snapshot as a regular user
[mirror_zfs.git] / config / deb.am
CommitLineData
e6c093dd
AS
1PHONY += deb-kmod deb-dkms deb-utils deb deb-local
2
c9c0d073
BB
3deb-local:
4 @(if test "${HAVE_DPKGBUILD}" = "no"; then \
5 echo -e "\n" \
6 "*** Required util ${DPKGBUILD} missing. Please install the\n" \
e921f650 7 "*** package for your distribution which provides ${DPKGBUILD},\n" \
c9c0d073 8 "*** re-run configure, and try again.\n"; \
e921f650 9 exit 1; \
c9c0d073
BB
10 fi; \
11 if test "${HAVE_ALIEN}" = "no"; then \
12 echo -e "\n" \
13 "*** Required util ${ALIEN} missing. Please install the\n" \
e921f650 14 "*** package for your distribution which provides ${ALIEN},\n" \
c9c0d073 15 "*** re-run configure, and try again.\n"; \
e921f650 16 exit 1; \
46fb4783
RE
17 fi; \
18 if test "${ALIEN_MAJOR}" = "8" && \
19 test "${ALIEN_MINOR}" = "95"; then \
20 if test "${ALIEN_POINT}" = "1" || \
21 test "${ALIEN_POINT}" = "2" || \
22 test "${ALIEN_POINT}" = "3"; then \
23 /bin/echo -e "\n" \
24 "*** Installed version of ${ALIEN} is known to be broken;\n" \
25 "*** attempting to generate debs will fail! See\n" \
26 "*** https://github.com/openzfs/zfs/issues/11650 for details.\n"; \
27 exit 1; \
28 fi; \
29 fi)
c9c0d073 30
f3757573 31deb-kmod: deb-local rpm-kmod
f3757573
BB
32 name=${PACKAGE}; \
33 version=${VERSION}-${RELEASE}; \
34 arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \
79c32704 35 debarch=`$(DPKG) --print-architecture`; \
f3757573 36 pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \
a54f92b4 37 fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1 || exit 1; \
f3757573 38 $(RM) $$pkg1
7670f721
NG
39
40
41deb-dkms: deb-local rpm-dkms
42 name=${PACKAGE}; \
43 version=${VERSION}-${RELEASE}; \
44 arch=`$(RPM) -qp $${name}-dkms-$${version}.src.rpm --qf %{arch} | tail -1`; \
79c32704 45 debarch=`$(DPKG) --print-architecture`; \
7670f721 46 pkg1=$${name}-dkms-$${version}.$${arch}.rpm; \
a54f92b4 47 fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1 || exit 1; \
7670f721 48 $(RM) $$pkg1
c9c0d073 49
d0cea309 50deb-utils: deb-local rpm-utils-initramfs
c9c0d073 51 name=${PACKAGE}; \
f3757573 52 version=${VERSION}-${RELEASE}; \
bd2f5ac9 53 arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \
79c32704 54 debarch=`$(DPKG) --print-architecture`; \
c9c0d073 55 pkg1=$${name}-$${version}.$${arch}.rpm; \
8434017a
AR
56 pkg2=libnvpair3-$${version}.$${arch}.rpm; \
57 pkg3=libuutil3-$${version}.$${arch}.rpm; \
fe6babce
BB
58 pkg4=libzfs5-$${version}.$${arch}.rpm; \
59 pkg5=libzpool5-$${version}.$${arch}.rpm; \
60 pkg6=libzfs5-devel-$${version}.$${arch}.rpm; \
c9b5cc8c 61 pkg7=$${name}-test-$${version}.$${arch}.rpm; \
a54f92b4 62 pkg8=$${name}-dracut-$${version}.noarch.rpm; \
48511ea6 63 pkg9=$${name}-initramfs-$${version}.$${arch}.rpm; \
b1fb4e1b
DS
64 pkg10=`ls python3-pyzfs-$${version}.noarch.rpm 2>/dev/null`; \
65 pkg11=`ls pam_zfs_key-$${version}.$${arch}.rpm 2>/dev/null`; \
c34efbeb
AR
66## Arguments need to be passed to dh_shlibdeps. Alien provides no mechanism
67## to do this, so we install a shim onto the path which calls the real
68## dh_shlibdeps with the required arguments.
9109b89c 69 path_prepend=`mktemp -d /tmp/intercept.XXXXXX`; \
c34efbeb
AR
70 echo "#$(SHELL)" > $${path_prepend}/dh_shlibdeps; \
71 echo "`which dh_shlibdeps` -- \
fe6babce 72 -xlibuutil3linux -xlibnvpair3linux -xlibzfs5linux -xlibzpool5linux" \
c34efbeb
AR
73 >> $${path_prepend}/dh_shlibdeps; \
74## These -x arguments are passed to dpkg-shlibdeps, which exclude the
75## Debianized packages from the auto-generated dependencies of the new debs,
76## which should NOT be mixed with the alien-generated debs created here
77 chmod +x $${path_prepend}/dh_shlibdeps; \
78 env PATH=$${path_prepend}:$${PATH} \
79c32704 79 fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch \
48511ea6 80 $$pkg1 $$pkg2 $$pkg3 $$pkg4 $$pkg5 $$pkg6 $$pkg7 \
3ce3d305 81 $$pkg8 $$pkg9 $$pkg10 $$pkg11 || exit 1; \
c34efbeb
AR
82 $(RM) $${path_prepend}/dh_shlibdeps; \
83 rmdir $${path_prepend}; \
48511ea6 84 $(RM) $$pkg1 $$pkg2 $$pkg3 $$pkg4 $$pkg5 $$pkg6 $$pkg7 \
3ce3d305 85 $$pkg8 $$pkg9 $$pkg10 $$pkg11;
c9c0d073 86
7670f721 87deb: deb-kmod deb-dkms deb-utils