From: "Jan Ťulák" <jtulak@redhat.com>
To: xfs@oss.sgi.com
Subject: [PATCH] xfsdump: fix instalation for symlinked /usr
Date: Tue, 21 Apr 2015 15:56:40 +0200 [thread overview]
Message-ID: <1429624600-8997-1-git-send-email-jtulak@redhat.com> (raw)
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@redhat.com>
---
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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2015-04-21 13:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 13:56 Jan Ťulák [this message]
2015-04-21 14:01 ` [PATCH] xfsdump: fix instalation for symlinked /usr Jan Tulak
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=1429624600-8997-1-git-send-email-jtulak@redhat.com \
--to=jtulak@redhat.com \
--cc=xfs@oss.sgi.com \
/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