* [PATCHSET 0/3] xfsprogs: packaging improvements for debian
@ 2022-05-05 16:03 Darrick J. Wong
2022-05-05 16:03 ` [PATCH 1/3] debian: refactor common options Darrick J. Wong
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Darrick J. Wong @ 2022-05-05 16:03 UTC (permalink / raw)
To: sandeen, djwong; +Cc: linux-xfs
Hi all,
This series rolls up a few packaging improvements for Debian. First we
apply some cleanups to debian/rules; then bump the compat level from 9
to 11 because 9 is quite old now; and finally use debian's multiarch
rules to put libhandle in the correct place on the filesystem.
If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.
This is an extraordinary way to destroy everything. Enjoy!
Comments and questions are, as always, welcome.
--D
xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=debian-packaging
---
configure.ac | 11 +++++++++++
debian/compat | 2 +-
debian/rules | 18 +++++++++++++-----
include/builddefs.in | 1 +
m4/multilib.m4 | 12 ++++++++++++
scrub/Makefile | 11 ++++++-----
6 files changed, 44 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/3] debian: refactor common options 2022-05-05 16:03 [PATCHSET 0/3] xfsprogs: packaging improvements for debian Darrick J. Wong @ 2022-05-05 16:03 ` Darrick J. Wong 2022-05-10 9:36 ` Christoph Hellwig 2022-05-05 16:03 ` [PATCH 2/3] debian: bump compat level to 11 Darrick J. Wong 2022-05-05 16:03 ` [PATCH 3/3] debian: support multiarch for libhandle Darrick J. Wong 2 siblings, 1 reply; 7+ messages in thread From: Darrick J. Wong @ 2022-05-05 16:03 UTC (permalink / raw) To: sandeen, djwong; +Cc: linux-xfs From: Darrick J. Wong <djwong@kernel.org> Don't respecify identical configure options; move them into the configure_options variable. Signed-off-by: Darrick J. Wong <djwong@kernel.org> --- debian/rules | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index 6d5b82a8..df023c65 100755 --- a/debian/rules +++ b/debian/rules @@ -26,13 +26,19 @@ pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT; pkgdi = DIST_ROOT=`pwd`/$(dirdi); export DIST_ROOT; stdenv = @GZIP=-q; export GZIP; -configure_options = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) +configure_options = \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) \ + --disable-ubsan \ + --disable-addrsan \ + --disable-threadsan \ + --enable-lto options = export DEBUG=-DNDEBUG DISTRIBUTION=debian \ INSTALL_USER=root INSTALL_GROUP=root \ - LOCAL_CONFIGURE_OPTIONS="$(configure_options) --enable-editline=yes --enable-blkid=yes --disable-ubsan --disable-addrsan --disable-threadsan --enable-lto" ; + LOCAL_CONFIGURE_OPTIONS="$(configure_options) --enable-editline=yes --enable-blkid=yes" ; diopts = $(options) \ - export OPTIMIZER=-Os LOCAL_CONFIGURE_OPTIONS="$(configure_options) --enable-gettext=no --disable-ubsan --disable-addrsan --disable-threadsan --enable-lto" ; + export OPTIMIZER=-Os LOCAL_CONFIGURE_OPTIONS="$(configure_options) --enable-gettext=no" ; checkdir = test -f debian/rules build: build-arch build-indep ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] debian: refactor common options 2022-05-05 16:03 ` [PATCH 1/3] debian: refactor common options Darrick J. Wong @ 2022-05-10 9:36 ` Christoph Hellwig 0 siblings, 0 replies; 7+ messages in thread From: Christoph Hellwig @ 2022-05-10 9:36 UTC (permalink / raw) To: Darrick J. Wong; +Cc: sandeen, linux-xfs Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] debian: bump compat level to 11 2022-05-05 16:03 [PATCHSET 0/3] xfsprogs: packaging improvements for debian Darrick J. Wong 2022-05-05 16:03 ` [PATCH 1/3] debian: refactor common options Darrick J. Wong @ 2022-05-05 16:03 ` Darrick J. Wong 2022-05-10 9:36 ` Christoph Hellwig 2022-05-05 16:03 ` [PATCH 3/3] debian: support multiarch for libhandle Darrick J. Wong 2 siblings, 1 reply; 7+ messages in thread From: Darrick J. Wong @ 2022-05-05 16:03 UTC (permalink / raw) To: sandeen, djwong; +Cc: linux-xfs From: Darrick J. Wong <djwong@kernel.org> Increase the compat level to 11 since we're now getting warnings about level 9 being obsolescent. Signed-off-by: Darrick J. Wong <djwong@kernel.org> --- debian/compat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/compat b/debian/compat index ec635144..b4de3947 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -9 +11 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] debian: bump compat level to 11 2022-05-05 16:03 ` [PATCH 2/3] debian: bump compat level to 11 Darrick J. Wong @ 2022-05-10 9:36 ` Christoph Hellwig 0 siblings, 0 replies; 7+ messages in thread From: Christoph Hellwig @ 2022-05-10 9:36 UTC (permalink / raw) To: Darrick J. Wong; +Cc: sandeen, linux-xfs Up to eleven is always good! Reviewed-by: Christoph Hellwig <hch@lst.de> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] debian: support multiarch for libhandle 2022-05-05 16:03 [PATCHSET 0/3] xfsprogs: packaging improvements for debian Darrick J. Wong 2022-05-05 16:03 ` [PATCH 1/3] debian: refactor common options Darrick J. Wong 2022-05-05 16:03 ` [PATCH 2/3] debian: bump compat level to 11 Darrick J. Wong @ 2022-05-05 16:03 ` Darrick J. Wong 2022-05-10 9:37 ` Christoph Hellwig 2 siblings, 1 reply; 7+ messages in thread From: Darrick J. Wong @ 2022-05-05 16:03 UTC (permalink / raw) To: sandeen, djwong; +Cc: linux-xfs From: Darrick J. Wong <djwong@kernel.org> For nearly a decade now, Debian and derivatives have supported the "multiarch" layout, where shared libraries are installed to /lib/<gcc triple>/ instead of /lib. This enables a single rootfs to support binaries from multiple architectures (e.g. i386 inside an amd64 system). We should follow this, since libhandle is useful. Signed-off-by: Darrick J. Wong <djwong@kernel.org> --- configure.ac | 11 +++++++++++ debian/rules | 6 ++++-- include/builddefs.in | 1 + m4/multilib.m4 | 12 ++++++++++++ scrub/Makefile | 11 ++++++----- 5 files changed, 34 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 3e7563f9..160f64dd 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,11 @@ AC_ARG_ENABLE(lib64, enable_lib64=yes) AC_SUBST(enable_lib64) +AC_ARG_WITH([multiarch], +[ --with-multiarch=ARCH Specify the multiarch triplet], + multiarch=$withval) +AC_SUBST(multiarch) + AC_ARG_ENABLE(librt, [ --enable-librt=[yes/no] Enable librt support [default=yes]],, enable_librt=yes) @@ -109,6 +114,11 @@ lib64) enable_lib64=no esac +# +# If the user specified a multiarch path then disable lib64 +# +test -n "$multiarch" && enable_lib64=no + # # Some important tools should be installed into the root partitions. # @@ -143,6 +153,7 @@ AC_SUBST(LOCALIZED_FILES) AC_PACKAGE_GLOBALS(xfsprogs) AC_PACKAGE_UTILITIES(xfsprogs) AC_MULTILIB($enable_lib64) +AC_MULTIARCH($multiarch) AC_RT($enable_librt) AC_PACKAGE_NEED_INI_H diff --git a/debian/rules b/debian/rules index df023c65..95df4835 100755 --- a/debian/rules +++ b/debian/rules @@ -13,6 +13,7 @@ bootpkg = xfsprogs-udeb DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) version = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2 | cut -d '-' -f 1) target ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) @@ -28,6 +29,7 @@ stdenv = @GZIP=-q; export GZIP; configure_options = \ --build=$(DEB_BUILD_GNU_TYPE) \ + --with-multiarch=$(DEB_HOST_MULTIARCH) \ --host=$(DEB_HOST_GNU_TYPE) \ --disable-ubsan \ --disable-addrsan \ @@ -97,8 +99,8 @@ binary-arch: checkroot built $(pkgme) $(MAKE) dist install -D -m 0755 debian/local/initramfs.hook debian/xfsprogs/usr/share/initramfs-tools/hooks/xfs rmdir debian/xfslibs-dev/usr/share/doc/xfsprogs - rm -f debian/xfslibs-dev/lib/libhandle.la - rm -f debian/xfslibs-dev/lib/libhandle.a + rm -f debian/xfslibs-dev/lib/$(DEB_HOST_MULTIARCH)/libhandle.la + rm -f debian/xfslibs-dev/lib/$(DEB_HOST_MULTIARCH)/libhandle.a rm -fr debian/xfslibs-dev/usr/lib dh_installdocs -XCHANGES dh_installchangelogs diff --git a/include/builddefs.in b/include/builddefs.in index 0bb36431..626db210 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -51,6 +51,7 @@ PKG_SBIN_DIR = @sbindir@ PKG_ROOT_SBIN_DIR = @root_sbindir@ PKG_ROOT_LIB_DIR= @root_libdir@@libdirsuffix@ PKG_LIB_DIR = @libdir@@libdirsuffix@ +PKG_LIB_SCRIPT_DIR = @libdir@ PKG_INC_DIR = @includedir@/xfs DK_INC_DIR = @includedir@/disk PKG_MAN_DIR = @mandir@ diff --git a/m4/multilib.m4 b/m4/multilib.m4 index 8d991d8d..862fd8ab 100644 --- a/m4/multilib.m4 +++ b/m4/multilib.m4 @@ -41,3 +41,15 @@ AC_DEFUN([AC_MULTILIB], fi AC_SUBST(libdirsuffix) ]) + +dnl AC_MULTIARCH creates a variable libdirsuffix containing the suffix of the +dnl libdir to follow the Debian multiarch spec. (i.e. "/$multiarch") +AC_DEFUN([AC_MULTIARCH], +[ + if test -n "$1"; then + libdirsuffix="/$1" + AC_MSG_CHECKING([multiarch triplet]) + AC_MSG_RESULT([$multiarch]) + fi + AC_SUBST(libdirsuffix) +]) diff --git a/scrub/Makefile b/scrub/Makefile index 335e1e8d..74492fb6 100644 --- a/scrub/Makefile +++ b/scrub/Makefile @@ -23,7 +23,7 @@ INSTALL_SCRUB += install-crond CRONTABS = xfs_scrub_all.cron OPTIONAL_TARGETS += $(CRONTABS) # Don't enable the crontab by default for now -CROND_DIR = $(PKG_LIB_DIR)/$(PKG_NAME) +CROND_DIR = $(PKG_LIB_SCRIPT_DIR)/$(PKG_NAME) endif endif # scrub_prereqs @@ -119,8 +119,9 @@ install: $(INSTALL_SCRUB) @echo " [SED] $@" $(Q)$(SED) -e "s|@sbindir@|$(PKG_SBIN_DIR)|g" \ -e "s|@scrub_args@|$(XFS_SCRUB_ARGS)|g" \ - -e "s|@pkg_lib_dir@|$(PKG_LIB_DIR)|g" \ - -e "s|@pkg_name@|$(PKG_NAME)|g" < $< > $@ + -e "s|@pkg_lib_dir@|$(PKG_LIB_SCRIPT_DIR)|g" \ + -e "s|@pkg_name@|$(PKG_NAME)|g" \ + < $< > $@ %.cron: %.cron.in $(builddefs) @echo " [SED] $@" @@ -129,8 +130,8 @@ install: $(INSTALL_SCRUB) install-systemd: default $(SYSTEMD_SERVICES) $(INSTALL) -m 755 -d $(SYSTEMD_SYSTEM_UNIT_DIR) $(INSTALL) -m 644 $(SYSTEMD_SERVICES) $(SYSTEMD_SYSTEM_UNIT_DIR) - $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/$(PKG_NAME) - $(INSTALL) -m 755 xfs_scrub_fail $(PKG_LIB_DIR)/$(PKG_NAME) + $(INSTALL) -m 755 -d $(PKG_LIB_SCRIPT_DIR)/$(PKG_NAME) + $(INSTALL) -m 755 xfs_scrub_fail $(PKG_LIB_SCRIPT_DIR)/$(PKG_NAME) install-crond: default $(CRONTABS) $(INSTALL) -m 755 -d $(CROND_DIR) ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] debian: support multiarch for libhandle 2022-05-05 16:03 ` [PATCH 3/3] debian: support multiarch for libhandle Darrick J. Wong @ 2022-05-10 9:37 ` Christoph Hellwig 0 siblings, 0 replies; 7+ messages in thread From: Christoph Hellwig @ 2022-05-10 9:37 UTC (permalink / raw) To: Darrick J. Wong; +Cc: sandeen, linux-xfs Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-05-10 9:37 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-05-05 16:03 [PATCHSET 0/3] xfsprogs: packaging improvements for debian Darrick J. Wong 2022-05-05 16:03 ` [PATCH 1/3] debian: refactor common options Darrick J. Wong 2022-05-10 9:36 ` Christoph Hellwig 2022-05-05 16:03 ` [PATCH 2/3] debian: bump compat level to 11 Darrick J. Wong 2022-05-10 9:36 ` Christoph Hellwig 2022-05-05 16:03 ` [PATCH 3/3] debian: support multiarch for libhandle Darrick J. Wong 2022-05-10 9:37 ` Christoph Hellwig
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox