All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Tulak <jtulak@redhat.com>
To: xfs@oss.sgi.com
Subject: Re: [PATCH] xfsdump: fix instalation for symlinked /usr
Date: Tue, 21 Apr 2015 10:01:56 -0400 (EDT)	[thread overview]
Message-ID: <249059659.2795879.1429624916775.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1429624600-8997-1-git-send-email-jtulak@redhat.com>

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

      reply	other threads:[~2015-04-21 14:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21 13:56 [PATCH] xfsdump: fix instalation for symlinked /usr Jan Ťulák
2015-04-21 14:01 ` Jan Tulak [this message]

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=249059659.2795879.1429624916775.JavaMail.zimbra@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 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.