* [PATCH] xfsdump: fix instalation for symlinked /usr
@ 2015-04-21 13:56 Jan Ťulák
2015-04-21 14:01 ` Jan Tulak
0 siblings, 1 reply; 2+ messages in thread
From: Jan Ťulák @ 2015-04-21 13:56 UTC (permalink / raw)
To: xfs
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfsdump: fix instalation for symlinked /usr
2015-04-21 13:56 [PATCH] xfsdump: fix instalation for symlinked /usr Jan Ťulák
@ 2015-04-21 14:01 ` Jan Tulak
0 siblings, 0 replies; 2+ messages in thread
From: Jan Tulak @ 2015-04-21 14:01 UTC (permalink / raw)
To: xfs
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@redhat.com>
> To: xfs@oss.sgi.com
> 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@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
>
--
Jan Tulak
jtulak@redhat.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-21 14:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 13:56 [PATCH] xfsdump: fix instalation for symlinked /usr Jan Ťulák
2015-04-21 14:01 ` Jan Tulak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.