]> git.proxmox.com Git - mirror_zfs-debian.git/blobdiff - debian/rules
Add lintian override for zfs-test
[mirror_zfs-debian.git] / debian / rules
index 13ca520af036bc409100b1f2e0f56639a4d86fc7..800df22e0b7ee79ce5213d2cab54acd85a28c79f 100755 (executable)
@@ -35,7 +35,7 @@ pmodules = $(PACKAGE)-modules-$(non_epoch_version)
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 %:
-       dh $@ --with autoreconf,dkms,python2,systemd --parallel
+       dh $@ --with autoreconf,dkms,python3,systemd --parallel
 
 override_dh_auto_configure:
        @cp debian/control.in debian/control
@@ -48,10 +48,12 @@ endif
 
        @# Build the userland, but don't build the kernel modules.
        dh_auto_configure -- \
-         --bindir=/bin \
+         --bindir=/usr/bin \
          --sbindir=/sbin \
          --libdir=/lib \
          --with-udevdir=/lib/udev \
+         --with-systemdunitdir=/lib/systemd/system \
+         --with-systemdpresetdir=/lib/systemd/system-preset \
          --with-config=user
 
 override_dh_auto_test:
@@ -62,6 +64,19 @@ override_dh_auto_install:
        @# Install the utilities.
        $(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
 
+       # Move from bin_dir to /usr/sbin
+       # Remove suffix (.py) as per policy 10.4 - Scripts
+       # https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
+       mkdir -p '$(CURDIR)/debian/tmp/usr/sbin/'
+       mv '$(CURDIR)/debian/tmp/usr/bin/arc_summary.py' '$(CURDIR)/debian/tmp/usr/sbin/arc_summary'
+       mv '$(CURDIR)/debian/tmp/usr/bin/arcstat.py' '$(CURDIR)/debian/tmp/usr/sbin/arcstat'
+       mv '$(CURDIR)/debian/tmp/usr/bin/dbufstat.py' '$(CURDIR)/debian/tmp/usr/sbin/dbufstat'
+
+       @# Zed has dependencies outside of the system root.
+       $(INSTALL) -d '$(CURDIR)/debian/tmp/usr/sbin/'
+       mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
+
        @# Get a bare copy of the source code for DKMS.
        @# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree, which does not
        @# contain the userland sources. NB: Remove-userland-dist-rules.patch
@@ -98,8 +113,8 @@ override_dh_auto_install:
                rm $${i}; \
        done
 
-       chmod -x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
-       chmod -x $(CURDIR)/debian/tmp/etc/default/zfs
+       chmod a-x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
+       chmod a-x $(CURDIR)/debian/tmp/etc/default/zfs
 
 override_dh_dkms:
        dh_dkms -V $(VERSION)
@@ -125,6 +140,8 @@ ifeq ($(BUILD_UDEB), true)
 endif
 
 override_dh_auto_clean:
+       find . -name .gitignore -delete
+       rm -rf zfs-$(VERSION)
        dh_auto_clean
        debconf-updatepo
        @if test -e META.orig; then mv META.orig META; fi
@@ -135,7 +152,7 @@ endif
 
 override_dh_install:
        find . -name lib*.la -delete
-       dh_install --list-missing
+       dh_install --fail-missing
 
 # ------------