public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jan ??ul??k <jan@tulak.me>
Cc: Brian Foster <bfoster@redhat.com>,
	Eric Sandeen <sandeen@sandeen.net>,
	XFS mail list <xfs@oss.sgi.com>
Subject: Re: symlink loop for /lib64/libhandle.so
Date: Tue, 15 Jul 2014 08:48:57 -0700	[thread overview]
Message-ID: <20140715154857.GA14716@infradead.org> (raw)
In-Reply-To: <CAO78W=0Y-ja8U6ntkKHdOaXBhR5P4Ec8i+0ic3vTqZ5AugwP9A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

Hi Jan,

there were still some small isues with the patch format, I've attached
a version of your patch that has the expected format.

Note that I also changed it to only check the canonical names instead of
testing the passed in one and the one readlink was called on.  This
should be enough I think, but please test that it still works for you.

Thanks for tracking this down!

[-- Attachment #2: libhandle.diff --]
[-- Type: text/plain, Size: 1469 bytes --]

From: Jan Tulak <jan@tulak.me>
Subject: [PATCH] libhandle: fix instalation for symlinked /usr

Canonicalize the pathnames for PKG_LIB_DIR and PKG_ROOT_LIB_DIR before
checking if they are the same.  This is required for Fedora which doesn't
have a separate /usr/lib directory anymore.

Reported-by: Jan Tulak <jan@tulak.me>
Signed-off-by: Jan Tulak <jan@tulak.me>

diff --git a/include/buildmacros b/include/buildmacros
index 7a01880..4e4e8fa 100644
--- a/include/buildmacros
+++ b/include/buildmacros
@@ -76,10 +76,11 @@ 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)

[-- Attachment #3: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2014-07-15 15:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09  9:30 symlink loop for /lib64/libhandle.so Jan Ťulák
2014-07-09 13:28 ` Brian Foster
2014-07-10 13:48   ` Christoph Hellwig
2014-07-10 16:31     ` Jan Ťulák
2014-07-10 16:40       ` Eric Sandeen
2014-07-11 10:47         ` Jan Ťulák
2014-07-14  8:04           ` Jan Ťulák
2014-07-14  8:26             ` Christoph Hellwig
2014-07-15 10:28               ` Jan Ťulák
2014-07-15 15:48                 ` Christoph Hellwig [this message]
2014-07-18  6:07                   ` Jan Ťulák
2014-08-11 18:02                   ` Christoph Hellwig
2014-09-13 19:47                     ` Christoph Hellwig

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=20140715154857.GA14716@infradead.org \
    --to=hch@infradead.org \
    --cc=bfoster@redhat.com \
    --cc=jan@tulak.me \
    --cc=sandeen@sandeen.net \
    --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