From: "Darrick J. Wong" <djwong@kernel.org>
To: Chris Hofstaedtler <zeha@debian.org>
Cc: linux-xfs@vger.kernel.org, Bastian Germann <bage@debian.org>
Subject: Re: [PATCH v2 1/1] Install files into UsrMerged layout
Date: Wed, 12 Jun 2024 13:03:30 -0700 [thread overview]
Message-ID: <20240612200330.GG2764752@frogsfrogsfrogs> (raw)
In-Reply-To: <xs47xj5jfbbap3324fwt753eimbe265i6wa2uhafcz5hsi6wnt@k6m3cwfvi4zh>
On Wed, Jun 12, 2024 at 09:00:19PM +0200, Chris Hofstaedtler wrote:
> From: Chris Hofstaedtler <zeha@debian.org>
>
> Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Hmm. From what I can tell from the systemd.pc file in (Debian) sid, all
the systemd services and udev files will get put in
/usr/lib/systemd/system/ and /usr/lib/udev/. Since those directories
are picked up by the xfsprogs build system via pkgconfig, there's no
need to patch that separately, right?
Also, this commit could use a brief message to acknowledge that we're
breaking the usecase of / and /usr being different filesystems:
"Always install binaries and other files under /usr, not /. This will
break any distribution that hasn't yet merged the two, which are
vanishingly small these days. This breaks the usecase of needing to
repair the /usr partition when there is no initramfs or livecd
available and / is the only option."
If the answer to the first question is 'yes' and the commit message is
acceptable,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> V1 -> V2: remove root_sbindir, root_libdir, PKG_ROOT_SBIN_DIR,
> PKG_ROOT_LIB_DIR
>
> configure.ac | 21 ---------------------
> debian/Makefile | 4 ++--
> debian/local/initramfs.hook | 2 +-
> fsck/Makefile | 4 ++--
> include/builddefs.in | 2 --
> include/buildmacros | 20 ++++++++++----------
> mkfs/Makefile | 4 ++--
> repair/Makefile | 4 ++--
> 8 files changed, 19 insertions(+), 42 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index da30fc5c..4530f387 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -113,27 +113,6 @@ esac
> #
> test -n "$multiarch" && enable_lib64=no
>
> -#
> -# Some important tools should be installed into the root partitions.
> -#
> -# Check whether exec_prefix=/usr: and install them to /sbin in that
> -# case. If the user chooses a different prefix assume they just want
> -# a local install for testing and not a system install.
> -#
> -case $exec_prefix:$prefix in
> -NONE:NONE | NONE:/usr | /usr:*)
> - root_sbindir='/sbin'
> - root_libdir="/${base_libdir}"
> - ;;
> -*)
> - root_sbindir="${sbindir}"
> - root_libdir="${libdir}"
> - ;;
> -esac
> -
> -AC_SUBST([root_sbindir])
> -AC_SUBST([root_libdir])
> -
> # Find localized files. Don't descend into any "dot directories"
> # (like .git or .pc from quilt). Strangely, the "-print" argument
> # to "find" is required, to avoid including such directories in the
> diff --git a/debian/Makefile b/debian/Makefile
> index cafe8bbb..2f9cd38c 100644
> --- a/debian/Makefile
> +++ b/debian/Makefile
> @@ -31,6 +31,6 @@ endif
>
> install-d-i: default
> ifeq ($(PKG_DISTRIBUTION), debian)
> - $(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
> - $(INSTALL) -m 755 $(BOOT_MKFS_BIN) $(PKG_ROOT_SBIN_DIR)/mkfs.xfs
> + $(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
> + $(INSTALL) -m 755 $(BOOT_MKFS_BIN) $(PKG_SBIN_DIR)/mkfs.xfs
> endif
> diff --git a/debian/local/initramfs.hook b/debian/local/initramfs.hook
> index 5b24eaec..eac7e79e 100644
> --- a/debian/local/initramfs.hook
> +++ b/debian/local/initramfs.hook
> @@ -45,7 +45,7 @@ rootfs_type() {
> . /usr/share/initramfs-tools/hook-functions
>
> if [ "$(rootfs_type)" = "xfs" ]; then
> - copy_exec /sbin/xfs_repair
> + copy_exec /usr/sbin/xfs_repair
> copy_exec /usr/sbin/xfs_db
> copy_exec /usr/sbin/xfs_metadump
> fi
> diff --git a/fsck/Makefile b/fsck/Makefile
> index da9b6ded..5ca529f5 100644
> --- a/fsck/Makefile
> +++ b/fsck/Makefile
> @@ -12,6 +12,6 @@ default: $(LTCOMMAND)
> include $(BUILDRULES)
>
> install: default
> - $(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
> - $(INSTALL) -m 755 xfs_fsck.sh $(PKG_ROOT_SBIN_DIR)/fsck.xfs
> + $(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
> + $(INSTALL) -m 755 xfs_fsck.sh $(PKG_SBIN_DIR)/fsck.xfs
> install-dev:
> diff --git a/include/builddefs.in b/include/builddefs.in
> index 644ed1cb..6ac36c14 100644
> --- a/include/builddefs.in
> +++ b/include/builddefs.in
> @@ -48,8 +48,6 @@ datarootdir = @datarootdir@
> top_builddir = @top_builddir@
>
> PKG_SBIN_DIR = @sbindir@
> -PKG_ROOT_SBIN_DIR = @root_sbindir@
> -PKG_ROOT_LIB_DIR= @root_libdir@@libdirsuffix@
> PKG_LIB_DIR = @libdir@@libdirsuffix@
> PKG_LIBEXEC_DIR = @libexecdir@/@pkg_name@
> PKG_INC_DIR = @includedir@/xfs
> diff --git a/include/buildmacros b/include/buildmacros
> index 6f34d7c5..9183e5bc 100644
> --- a/include/buildmacros
> +++ b/include/buildmacros
> @@ -50,16 +50,16 @@ LTINSTALL = $(LIBTOOL) --quiet --mode=install $(INSTALL)
> LTCOMPILE = $(LIBTOOL) --quiet --tag=CC --mode=compile $(CCF)
>
> ifeq ($(ENABLE_SHARED),yes)
> -LTLDFLAGS += -rpath $(PKG_ROOT_LIB_DIR)
> +LTLDFLAGS += -rpath $(PKG_LIB_DIR)
> LTLDFLAGS += -version-info $(LTVERSION)
> endif
>
> ifeq ($(ENABLE_SHARED),yes)
> INSTALL_LTLIB = \
> cd $(TOPDIR)/$(LIBNAME)/.libs; \
> - ../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \
> - ../$(INSTALL) -m 755 -T so_dot_version $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
> - ../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_ROOT_LIB_DIR)
> + ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
> + ../$(INSTALL) -m 755 -T so_dot_version $(LIBNAME).lai $(PKG_LIB_DIR); \
> + ../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_LIB_DIR)
> endif
>
> # Libtool thinks the static and shared libs should be in the same dir, so
> @@ -74,13 +74,13 @@ INSTALL_LTLIB_DEV = \
> ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
> ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_LIB_DIR); \
> ../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_LIB_DIR)/$(LIBNAME).la ; \
> - ../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \
> - ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
> + ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
> + ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
> if [ "x$(shell readlink -f $(PKG_LIB_DIR))" != \
> - "x$(shell readlink -f $(PKG_ROOT_LIB_DIR))" ]; then \
> - ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_ROOT_LIB_DIR)/$(LIBNAME).a; \
> - ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_ROOT_LIB_DIR)/$(LIBNAME).la; \
> - ../$(INSTALL) -S $(PKG_ROOT_LIB_DIR)/$(LIBNAME).so $(PKG_LIB_DIR)/$(LIBNAME).so; \
> + "x$(shell readlink -f $(PKG_LIB_DIR))" ]; then \
> + ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
> + ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
> + ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_LIB_DIR)/$(LIBNAME).so; \
> fi
> else
> INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
> diff --git a/mkfs/Makefile b/mkfs/Makefile
> index a0c168e3..a6173083 100644
> --- a/mkfs/Makefile
> +++ b/mkfs/Makefile
> @@ -28,8 +28,8 @@ default: depend $(LTCOMMAND) $(CFGFILES)
> include $(BUILDRULES)
>
> install: default
> - $(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
> - $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR)
> + $(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
> + $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
> $(INSTALL) -m 755 -d $(MKFS_CFG_DIR)
> $(INSTALL) -m 644 $(CFGFILES) $(MKFS_CFG_DIR)
>
> diff --git a/repair/Makefile b/repair/Makefile
> index e5014deb..c5b0d4cb 100644
> --- a/repair/Makefile
> +++ b/repair/Makefile
> @@ -99,8 +99,8 @@ include $(BUILDRULES)
> #CFLAGS += ...
>
> install: default
> - $(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
> - $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR)
> + $(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
> + $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
> install-dev:
>
> -include .dep
> --
> 2.39.2
>
>
next prev parent reply other threads:[~2024-06-12 20:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-12 17:35 [PATCH 0/1] Forward: Install files into UsrMerged layout Bastian Germann
2024-06-12 17:35 ` [PATCH 1/1] " Bastian Germann
2024-06-12 18:08 ` Darrick J. Wong
2024-06-12 18:58 ` Chris Hofstaedtler
2024-06-12 20:07 ` Darrick J. Wong
2024-06-12 19:00 ` [PATCH v2 " Chris Hofstaedtler
2024-06-12 20:03 ` Darrick J. Wong [this message]
2024-06-12 20:10 ` Chris Hofstaedtler
2024-06-19 21:48 ` [PATCH v3] Remove support for split-/usr installs Chris Hofstaedtler
2024-06-20 18:34 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240612200330.GG2764752@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=bage@debian.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zeha@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox