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
@# 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:
@# 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
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)
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
override_dh_install:
find . -name lib*.la -delete
- dh_install --list-missing
+ dh_install --fail-missing
# ------------