mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-01-15 17:52:05 +03:00
contrib/debian: install files into merged /usr
This commit synchronizes the debian packaging files with the distro version (also maintained by me) as much as possible. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Colm Buckley <colm@tuatha.org> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Closes #17712
This commit is contained in:
parent
717c57c834
commit
ca4f7d6d49
@ -4,7 +4,7 @@ The detailed contributor information can be found in [2][3].
|
|||||||
|
|
||||||
Files: contrib/debian/*
|
Files: contrib/debian/*
|
||||||
Copyright:
|
Copyright:
|
||||||
2013-2016, Aron Xu <aron@debian.org>
|
2013-2025, Aron Xu <aron@debian.org>
|
||||||
2016, Petter Reinholdtsen <pere@hungry.com>
|
2016, Petter Reinholdtsen <pere@hungry.com>
|
||||||
2013, Carlos Alberto Lopez Perez <clopez@igalia.com>
|
2013, Carlos Alberto Lopez Perez <clopez@igalia.com>
|
||||||
2013, Turbo Fredriksson <turbo@bayour.com>
|
2013, Turbo Fredriksson <turbo@bayour.com>
|
||||||
@ -12,6 +12,8 @@ Copyright:
|
|||||||
2011-2013, Darik Horn <dajhorn@vanadac.com>
|
2011-2013, Darik Horn <dajhorn@vanadac.com>
|
||||||
2018-2019, Mo Zhou <cdluminate@gmail.com>
|
2018-2019, Mo Zhou <cdluminate@gmail.com>
|
||||||
2018-2020, Mo Zhou <lumin@debian.org>
|
2018-2020, Mo Zhou <lumin@debian.org>
|
||||||
|
2023-2024, Shengqi Chen <harry-chen@outlook.com>
|
||||||
|
2024-2025, Shengqi Chen <harry@debian.org>
|
||||||
License: GPL-2+
|
License: GPL-2+
|
||||||
|
|
||||||
[1] https://tracker.debian.org/pkg/zfs-linux
|
[1] https://tracker.debian.org/pkg/zfs-linux
|
||||||
|
|||||||
@ -9,4 +9,4 @@ etc/zfs/vdev_id.conf.sas_direct.example
|
|||||||
etc/zfs/vdev_id.conf.sas_switch.example
|
etc/zfs/vdev_id.conf.sas_switch.example
|
||||||
etc/zfs/vdev_id.conf.scsi.example
|
etc/zfs/vdev_id.conf.scsi.example
|
||||||
etc/zfs/zfs-functions
|
etc/zfs/zfs-functions
|
||||||
lib/systemd/system/zfs-import.service
|
usr/lib/systemd/system/zfs-import.service
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
lib/@DEB_HOST_MULTIARCH@/libnvpair.so.*
|
usr/lib/@DEB_HOST_MULTIARCH@/libnvpair.so.*
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
lib/*/security/pam_zfs_key.so
|
usr/lib/*/security/pam_zfs_key.so
|
||||||
usr/share/pam-configs/zfs_key
|
usr/share/pam-configs/zfs_key
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if ! $(ldd "/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/security/pam_zfs_key.so" | grep -q "libasan") ; then
|
if ! $(ldd "/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/security/pam_zfs_key.so" | grep -q "libasan") ; then
|
||||||
pam-auth-update --package
|
pam-auth-update --package
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
lib/@DEB_HOST_MULTIARCH@/libuutil.so.*
|
usr/lib/@DEB_HOST_MULTIARCH@/libuutil.so.*
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
lib/@DEB_HOST_MULTIARCH@/*.a usr/lib/@DEB_HOST_MULTIARCH@
|
usr/lib/@DEB_HOST_MULTIARCH@/*.a
|
||||||
|
usr/lib/@DEB_HOST_MULTIARCH@/*.so
|
||||||
|
usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig
|
||||||
usr/include
|
usr/include
|
||||||
usr/lib/@DEB_HOST_MULTIARCH@
|
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
lib/@DEB_HOST_MULTIARCH@/libzfs.so.*
|
usr/lib/@DEB_HOST_MULTIARCH@/libzfs.so.*
|
||||||
lib/@DEB_HOST_MULTIARCH@/libzfs_core.so.*
|
usr/lib/@DEB_HOST_MULTIARCH@/libzfs_core.so.*
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
lib/@DEB_HOST_MULTIARCH@/libzfsbootenv.so.*
|
usr/lib/@DEB_HOST_MULTIARCH@/libzfsbootenv.so.*
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
lib/@DEB_HOST_MULTIARCH@/libzpool.so.*
|
usr/lib/@DEB_HOST_MULTIARCH@/libzpool.so.*
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
sbin/ztest
|
usr/sbin/ztest
|
||||||
usr/bin/raidz_test
|
usr/bin/raidz_test
|
||||||
usr/share/man/man1/raidz_test.1
|
usr/share/man/man1/raidz_test.1
|
||||||
usr/share/man/man1/test-runner.1
|
usr/share/man/man1/test-runner.1
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
etc/zfs/zed.d/*
|
etc/zfs/zed.d/*
|
||||||
lib/systemd/system/zfs-zed.service
|
usr/lib/systemd/system/zfs-zed.service
|
||||||
usr/lib/zfs-linux/zed.d/*
|
usr/lib/zfs-linux/zed.d/*
|
||||||
usr/sbin/zed
|
usr/sbin/zed
|
||||||
usr/share/man/man8/zed.8
|
usr/share/man/man8/zed.8
|
||||||
|
|||||||
@ -1,45 +1,45 @@
|
|||||||
etc/default/zfs
|
etc/default/zfs
|
||||||
etc/zfs/zfs-functions
|
etc/zfs/zfs-functions
|
||||||
etc/zfs/zpool.d/
|
etc/zfs/zpool.d/
|
||||||
lib/systemd/system-generators/
|
usr/lib/systemd/system-generators/
|
||||||
lib/systemd/system-preset/
|
usr/lib/systemd/system-preset/
|
||||||
lib/systemd/system/zfs-import-cache.service
|
usr/lib/systemd/system/zfs-import-cache.service
|
||||||
lib/systemd/system/zfs-import-scan.service
|
usr/lib/systemd/system/zfs-import-scan.service
|
||||||
lib/systemd/system/zfs-import.target
|
usr/lib/systemd/system/zfs-import.target
|
||||||
lib/systemd/system/zfs-load-key.service
|
usr/lib/systemd/system/zfs-load-key.service
|
||||||
lib/systemd/system/zfs-mount.service
|
usr/lib/systemd/system/zfs-mount.service
|
||||||
lib/systemd/system/zfs-mount@.service
|
usr/lib/systemd/system/zfs-mount@.service
|
||||||
lib/systemd/system/zfs-scrub-monthly@.timer
|
usr/lib/systemd/system/zfs-scrub-monthly@.timer
|
||||||
lib/systemd/system/zfs-scrub-weekly@.timer
|
usr/lib/systemd/system/zfs-scrub-weekly@.timer
|
||||||
lib/systemd/system/zfs-scrub@.service
|
usr/lib/systemd/system/zfs-scrub@.service
|
||||||
lib/systemd/system/zfs-trim-monthly@.timer
|
usr/lib/systemd/system/zfs-trim-monthly@.timer
|
||||||
lib/systemd/system/zfs-trim-weekly@.timer
|
usr/lib/systemd/system/zfs-trim-weekly@.timer
|
||||||
lib/systemd/system/zfs-trim@.service
|
usr/lib/systemd/system/zfs-trim@.service
|
||||||
lib/systemd/system/zfs-share.service
|
usr/lib/systemd/system/zfs-share.service
|
||||||
lib/systemd/system/zfs-volume-wait.service
|
usr/lib/systemd/system/zfs-volume-wait.service
|
||||||
lib/systemd/system/zfs-volumes.target
|
usr/lib/systemd/system/zfs-volumes.target
|
||||||
lib/systemd/system/zfs.target
|
usr/lib/systemd/system/zfs.target
|
||||||
lib/udev/
|
usr/lib/udev/
|
||||||
sbin/fsck.zfs
|
usr/sbin/fsck.zfs
|
||||||
sbin/mount.zfs
|
usr/sbin/mount.zfs
|
||||||
sbin/zdb
|
usr/sbin/zdb
|
||||||
sbin/zfs
|
usr/sbin/zfs
|
||||||
sbin/zfs_ids_to_path
|
usr/sbin/zfs_ids_to_path
|
||||||
sbin/zgenhostid
|
usr/sbin/zgenhostid
|
||||||
sbin/zhack
|
usr/sbin/zhack
|
||||||
sbin/zinject
|
usr/sbin/zinject
|
||||||
sbin/zpool
|
usr/sbin/zpool
|
||||||
sbin/zstream
|
usr/sbin/zstream
|
||||||
sbin/zstreamdump
|
usr/sbin/zstreamdump
|
||||||
usr/bin/zvol_wait
|
usr/bin/zvol_wait
|
||||||
usr/lib/modules-load.d/ lib/
|
usr/lib/modules-load.d/
|
||||||
usr/lib/zfs-linux/zpool.d/
|
usr/lib/zfs-linux/zpool.d/
|
||||||
usr/lib/zfs-linux/zpool_influxdb
|
usr/lib/zfs-linux/zpool_influxdb
|
||||||
usr/lib/zfs-linux/zfs_prepare_disk
|
usr/lib/zfs-linux/zfs_prepare_disk
|
||||||
usr/sbin/zarcsummary
|
usr/bin/zarcsummary
|
||||||
usr/sbin/zarcstat
|
usr/bin/zarcstat
|
||||||
usr/sbin/dbufstat
|
usr/bin/dbufstat usr/sbin
|
||||||
usr/sbin/zilstat
|
usr/bin/zilstat
|
||||||
usr/share/zfs/compatibility.d/
|
usr/share/zfs/compatibility.d/
|
||||||
usr/share/bash-completion/completions
|
usr/share/bash-completion/completions
|
||||||
usr/share/man/man1/zarcstat.1
|
usr/share/man/man1/zarcstat.1
|
||||||
|
|||||||
3
contrib/debian/openzfs-zfsutils.links
Normal file
3
contrib/debian/openzfs-zfsutils.links
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
usr/sbin/zfs usr/bin/zfs
|
||||||
|
usr/sbin/zpool usr/bin/zpool
|
||||||
|
usr/lib/zfs-linux/zpool_influxdb usr/bin/zpool_influxdb
|
||||||
@ -37,18 +37,19 @@ override_dh_auto_configure:
|
|||||||
@# Build the userland, but don't build the kernel modules.
|
@# Build the userland, but don't build the kernel modules.
|
||||||
dh_auto_configure -- @CFGOPTS@ \
|
dh_auto_configure -- @CFGOPTS@ \
|
||||||
--bindir=/usr/bin \
|
--bindir=/usr/bin \
|
||||||
--sbindir=/sbin \
|
--sbindir=/usr/sbin \
|
||||||
--libdir=/lib/"$(DEB_HOST_MULTIARCH)" \
|
--with-mounthelperdir=/usr/sbin \
|
||||||
--with-udevdir=/lib/udev \
|
--libdir=/usr/lib/"$(DEB_HOST_MULTIARCH)" \
|
||||||
|
--with-udevdir=/usr/lib/udev \
|
||||||
--with-zfsexecdir=/usr/lib/zfs-linux \
|
--with-zfsexecdir=/usr/lib/zfs-linux \
|
||||||
--enable-systemd \
|
--enable-systemd \
|
||||||
--enable-pyzfs \
|
--enable-pyzfs \
|
||||||
--with-python=python3 \
|
--with-python=python3 \
|
||||||
--with-pammoduledir='/lib/$(DEB_HOST_MULTIARCH)/security' \
|
--with-pammoduledir='/usr/lib/$(DEB_HOST_MULTIARCH)/security' \
|
||||||
--with-pkgconfigdir='/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig' \
|
--with-pkgconfigdir='/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig' \
|
||||||
--with-systemdunitdir=/lib/systemd/system \
|
--with-systemdunitdir=/usr/lib/systemd/system \
|
||||||
--with-systemdpresetdir=/lib/systemd/system-preset \
|
--with-systemdpresetdir=/usr/lib/systemd/system-preset \
|
||||||
--with-systemdgeneratordir=/lib/systemd/system-generators \
|
--with-systemdgeneratordir=/usr/lib/systemd/system-generators \
|
||||||
--with-config=user
|
--with-config=user
|
||||||
|
|
||||||
for i in $(wildcard $(CURDIR)/debian/*.install.in) ; do \
|
for i in $(wildcard $(CURDIR)/debian/*.install.in) ; do \
|
||||||
@ -77,19 +78,6 @@ override_dh_auto_install:
|
|||||||
@# Install the utilities.
|
@# Install the utilities.
|
||||||
$(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
|
$(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/zarcsummary' '$(CURDIR)/debian/tmp/usr/sbin/zarcsummary'
|
|
||||||
mv '$(CURDIR)/debian/tmp/usr/bin/zarcstat' '$(CURDIR)/debian/tmp/usr/sbin/zarcstat'
|
|
||||||
mv '$(CURDIR)/debian/tmp/usr/bin/dbufstat' '$(CURDIR)/debian/tmp/usr/sbin/dbufstat'
|
|
||||||
mv '$(CURDIR)/debian/tmp/usr/bin/zilstat' '$(CURDIR)/debian/tmp/usr/sbin/zilstat'
|
|
||||||
|
|
||||||
@# Zed has dependencies outside of the system root.
|
|
||||||
mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
|
|
||||||
sed -i 's|ExecStart=/sbin/|ExecStart=/usr/sbin/|g' '$(CURDIR)/debian/tmp/lib/systemd/system/zfs-zed.service'
|
|
||||||
|
|
||||||
@# Install the DKMS source.
|
@# Install the DKMS source.
|
||||||
@# We only want the files needed to build the modules
|
@# We only want the files needed to build the modules
|
||||||
install -D -t '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts' \
|
install -D -t '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts' \
|
||||||
@ -131,11 +119,6 @@ override_dh_auto_install:
|
|||||||
cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)'; ./autogen.sh
|
cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)'; ./autogen.sh
|
||||||
rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/autom4te.cache'
|
rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/autom4te.cache'
|
||||||
|
|
||||||
for i in `ls $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/*.so`; do \
|
|
||||||
ln -s '/lib/$(DEB_HOST_MULTIARCH)/'`readlink $${i}` '$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/'`basename $${i}`; \
|
|
||||||
rm $${i}; \
|
|
||||||
done
|
|
||||||
|
|
||||||
chmod a-x '$(CURDIR)/debian/tmp/etc/zfs/zfs-functions'
|
chmod a-x '$(CURDIR)/debian/tmp/etc/zfs/zfs-functions'
|
||||||
chmod a-x '$(CURDIR)/debian/tmp/etc/default/zfs'
|
chmod a-x '$(CURDIR)/debian/tmp/etc/default/zfs'
|
||||||
|
|
||||||
@ -159,7 +142,7 @@ override_dh_auto_clean:
|
|||||||
@if test -e META.orig; then mv META.orig META; fi
|
@if test -e META.orig; then mv META.orig META; fi
|
||||||
|
|
||||||
override_dh_install:
|
override_dh_install:
|
||||||
find debian/tmp/lib -name '*.la' -delete
|
find debian/tmp/usr/lib -name '*.la' -delete
|
||||||
dh_install
|
dh_install
|
||||||
|
|
||||||
override_dh_missing:
|
override_dh_missing:
|
||||||
@ -173,8 +156,8 @@ override_dh_installinit:
|
|||||||
dh_installinit -R --name zfs-zed
|
dh_installinit -R --name zfs-zed
|
||||||
|
|
||||||
override_dh_installsystemd:
|
override_dh_installsystemd:
|
||||||
mkdir -p debian/openzfs-zfsutils/lib/systemd/system
|
mkdir -p debian/openzfs-zfsutils/usr/lib/systemd/system
|
||||||
ln -sr /dev/null debian/openzfs-zfsutils/lib/systemd/system/zfs-import.service
|
ln -sr /dev/null debian/openzfs-zfsutils/usr/lib/systemd/system/zfs-import.service
|
||||||
dh_installsystemd --no-stop-on-upgrade -X zfs-zed.service
|
dh_installsystemd --no-stop-on-upgrade -X zfs-zed.service
|
||||||
dh_installsystemd --name zfs-zed
|
dh_installsystemd --name zfs-zed
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
PREREQ="udev"
|
PREREQ="udev"
|
||||||
PREREQ_UDEV_RULES="60-zvol.rules 69-vdev.rules"
|
PREREQ_UDEV_RULES="60-zvol.rules 69-vdev.rules"
|
||||||
COPY_EXEC_LIST="/lib/udev/zvol_id /lib/udev/vdev_id"
|
COPY_EXEC_LIST="/usr/lib/udev/zvol_id /usr/lib/udev/vdev_id"
|
||||||
|
|
||||||
# Generic result code.
|
# Generic result code.
|
||||||
RC=0
|
RC=0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user