From 6493d8997e96860182a22b1fc9763cde1b1d1547 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Sat, 11 May 2024 15:10:51 -0400 Subject: [PATCH] LU-17843 build: mount.lustre_tgt as symlink mount.lustre_tgt was always intended to be a symlink to the main mount.lustre, but instead it's an identical build item. This results in this rpmbuild warning (an error on some systems): Duplicate build-ids .../mount.lustre and .../mount.lustre_tgt This patch resolves this by making it a proper symlink as was originally intended. Test-Parameters: trivial Signed-off-by: Patrick Farrell Change-Id: Id5f90df94fcc5c73a93fd6c1311b09af429c1440 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55079 Reviewed-by: Andreas Dilger Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre.spec.in | 2 +- lustre/utils/Makefile.am | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lustre.spec.in b/lustre.spec.in index 3588cf5..48fd059 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -997,7 +997,7 @@ echo '%{_libdir}/lustre/tests/lutf/*' >>lustre-tests.files %{_bindir}/lfs_migrate /sbin/mount.lustre %if %{with servers} -/sbin/mount.lustre_tgt +%ghost /sbin/mount.lustre_tgt %endif @BASH_COMPLETION_DIR@ %endif diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am index 500bdba..0f775c6 100644 --- a/lustre/utils/Makefile.am +++ b/lustre/utils/Makefile.am @@ -24,9 +24,6 @@ endif # mount only finds helpers in /sbin rootsbin_PROGRAMS = mount.lustre -if SERVER -rootsbin_PROGRAMS += mount.lustre_tgt -endif bin_SCRIPTS = llstat llobdstat lljobstat plot-llstat bin_PROGRAMS = lfs sbin_SCRIPTS = ldlm_debug_upcall @@ -144,6 +141,9 @@ install-exec-hook: $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/lustre/$$f; \ else :; fi; \ done + if [ "$(SERVER)" = "yes" ]; then \ + ln -sf $(DESTDIR)$(sbindir)/mount.lustre $(DESTDIR)$(sbindir)/mount.lustre_tgt; \ + fi endif # UTILS llog_reader_SOURCES = llog_reader.c @@ -221,10 +221,6 @@ mount_lustre_LDFLAGS := ${MNTMODLDFLAGS} mount_lustre_LDADD := $(SELINUX) $(LDLIBMOUNT) $(PLUGIN_LIB) $(GSSLIB) mount_lustre_LDADD += $(top_builddir)/libcfs/libcfs/libcfs.la $(MNTMODLIBS) mount_lustre_LDADD += liblustreapi.la -mount_lustre_tgt_SOURCES = ${mount_lustre_SOURCES} -mount_lustre_tgt_CPPFLAGS = ${mount_lustre_CPPFLAGS} -mount_lustre_tgt_LDFLAGS = ${mount_lustre_LDFLAGS} -mount_lustre_tgt_LDADD = ${mount_lustre_LDADD} mkfs_lustre_SOURCES = mkfs_lustre.c mount_utils.c mount_utils.h $(GSSSRC) mkfs_lustre_CPPFLAGS := -UTUNEFS ${MNTMODCFLAGS} -- 1.8.3.1