Whamcloud - gitweb
LU-17843 build: mount.lustre_tgt as symlink 79/55079/5
authorPatrick Farrell <paf0187@gmail.com>
Sat, 11 May 2024 19:10:51 +0000 (15:10 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 26 Mar 2025 03:59:11 +0000 (03:59 +0000)
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 <patrick.farrell@oracle.com>
Change-Id: Id5f90df94fcc5c73a93fd6c1311b09af429c1440
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55079
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre.spec.in
lustre/utils/Makefile.am

index 3588cf5..48fd059 100644 (file)
@@ -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
index 500bdba..0f775c6 100644 (file)
@@ -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}