xfsdump: Make build reproducible

install step is not consistent especially when usrmerge is not
enabled ( which is default ), based upon what it finds on build host
it decides to install the xfsdump and xfsrestore locations to be either
/sbin or /usr/sbin, therefore it should be made consistent

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2025-10-26 13:19:14 -07:00
parent 159e994140
commit 554451c5a1
2 changed files with 9 additions and 53 deletions

View File

@ -1,52 +0,0 @@
From fea8c4634469784c16211e2597411c18c72dfa4a Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 5 Mar 2020 14:36:14 +0800
Subject: [PATCH] xfsdump: support usrmerge
Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
dump/Makefile | 6 +-----
restore/Makefile | 6 +-----
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/dump/Makefile b/dump/Makefile
index 66f00d3..cc2d973 100644
--- a/dump/Makefile
+++ b/dump/Makefile
@@ -97,12 +97,8 @@ default: depend $(LTCOMMAND)
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)
- # skip symlink when /sbin is alread symlinked to /usr/sbin, like on Fedora
- test $(PKG_ROOT_SBIN_DIR) -ef $(PKG_SBIN_DIR) || \
- $(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) $(PKG_SBIN_DIR)/$(LTCOMMAND)
+ $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
install-dev:
.dep: $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON)
diff --git a/restore/Makefile b/restore/Makefile
index ac3f8c8..3c46394 100644
--- a/restore/Makefile
+++ b/restore/Makefile
@@ -111,12 +111,8 @@ default: depend $(LTCOMMAND)
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)
- # skip symlink when /sbin is alread symlinked to /usr/sbin, like on Fedora
- test $(PKG_ROOT_SBIN_DIR) -ef $(PKG_SBIN_DIR) || \
- $(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) $(PKG_SBIN_DIR)/$(LTCOMMAND)
+ $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
install-dev:
.dep: $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON)
--
2.7.4

View File

@ -13,7 +13,6 @@ DEPENDS = "xfsprogs attr"
SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsdump/${BP}.tar.xz \
file://remove-install-as-user.patch \
file://0001-include-libgen.h-for-basename-API-prototype.patch \
${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-xfsdump-support-usrmerge.patch','',d)} \
"
SRC_URI[sha256sum] = "2914dbbe1ebc88c7d93ad88e220aa57dabc43d216e11f06221c01edf3cc10732"
@ -37,4 +36,13 @@ do_install () {
export DIST_ROOT=${D}
oe_runmake install
oe_runmake install-dev
if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}
then
# move files from /sbin to /usr/sbin
mv -vf ${D}${exec_prefix}/../sbin/* ${D}${sbindir}
rmdir ${D}${exec_prefix}/../sbin
else
ln -sf ${base_sbindir}/xfsdump ${D}${sbindir}/xfsdump
ln -sf ${base_sbindir}/xfsrestore ${D}${sbindir}/xfsrestore
fi
}