Just a note, this is the same kind of issue like I reported and fixed with libhandle before: http://oss.sgi.com/archives/xfs/2014-07/msg00134.html Jan ----- Original Message ----- > From: "Jan Ťulák" <jtulak@xxxxxxxxxx> > To: xfs@xxxxxxxxxxx > Sent: Tuesday, 21 April, 2015 3:56:40 PM > Subject: [PATCH] xfsdump: fix instalation for symlinked /usr > > Canonicalize the pathnames for PKG_LIB_DIR/PKG_SBIN_DIR and > PKG_ROOT_LIB_DIR/PKG_ROOT_SBIN_DIR before checking if they are the same. > This is required for Fedora which doesn't have a separate /usr/lib directory > anymore. > > Signed-off-by: Jan Ťulák <jtulak@xxxxxxxxxx> > --- > dump/Makefile | 6 +++++- > include/buildmacros | 12 ++++++++---- > restore/Makefile | 6 +++++- > 3 files changed, 18 insertions(+), 6 deletions(-) > > diff --git a/dump/Makefile b/dump/Makefile > index 97879fa..f638d1a 100644 > --- a/dump/Makefile > +++ b/dump/Makefile > @@ -100,7 +100,11 @@ 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) > - $(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) > $(PKG_SBIN_DIR)/$(LTCOMMAND) > + if [ "x$(shell readlink -f $(PKG_SBIN_DIR))" != \ > + "x$(shell readlink -f $(PKG_ROOT_SBIN_DIR))" ]; then \ > + $(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) \ > + $(PKG_SBIN_DIR)/$(LTCOMMAND); \ > + fi > install-dev: > > .dep: $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON) > diff --git a/include/buildmacros b/include/buildmacros > index cdbdb7f..d7d524f 100644 > --- a/include/buildmacros > +++ b/include/buildmacros > @@ -76,10 +76,14 @@ INSTALL_LTLIB_DEV = \ > ../$(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); \ > - if test "x$(PKG_LIB_DIR)" != "x$(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; \ > + 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; \ > fi > else > INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC) > diff --git a/restore/Makefile b/restore/Makefile > index c6f3f25..bbdc5e6 100644 > --- a/restore/Makefile > +++ b/restore/Makefile > @@ -110,7 +110,11 @@ 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) > - $(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) > $(PKG_SBIN_DIR)/$(LTCOMMAND) > + if [ "x$(shell readlink -f $(PKG_SBIN_DIR))" != \ > + "x$(shell readlink -f $(PKG_ROOT_SBIN_DIR))" ]; then \ > + $(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) \ > + $(PKG_SBIN_DIR)/$(LTCOMMAND); \ > + fi > install-dev: > > .dep: $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON) > -- > 2.1.0 > > _______________________________________________ > xfs mailing list > xfs@xxxxxxxxxxx > http://oss.sgi.com/mailman/listinfo/xfs > -- Jan Tulak jtulak@xxxxxxxxxx _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs