This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.20-277-g97114a3


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  97114a383fc167a64b0c85c9c5eaeb4f3ecd28f9 (commit)
      from  0e7e69baa8576831da39680274cf9b52d7569e4c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=97114a383fc167a64b0c85c9c5eaeb4f3ecd28f9

commit 97114a383fc167a64b0c85c9c5eaeb4f3ecd28f9
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Sat Nov 29 01:04:57 2014 -0500

    Expand comments in elf/ldconfig.c (search_dir)
    
    Developers creating development packages must take care
    to have their static linker DSO link point to the actual
    SONAME file. This allows ldconfig to correctly create
    the required links for the SONAME. The behaviour is now
    more clearly documented in a code comment added by this
    patch.

diff --git a/ChangeLog b/ChangeLog
index 8a6e89e..39e70e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-11-29  Carlos O'Donell  <carlos@redhat.com>
+
+	* elf/ldconfig.c (search_dir): Expand comment.
+
 2014-11-29  Joseph Myers  <joseph@codesourcery.com>
 
 	* conform/Makefile (linknamespace-symlist-stdlibs-base): New
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index 4211f4c..2d9c780 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -893,8 +893,30 @@ search_dir (const struct dir_entry *entry)
       /* A link may just point to itself.  */
       if (is_link)
 	{
-	  /* If the path the link points to isn't its soname and it is not
-	     .so symlink for ld(1) only, we treat it as a normal file.  */
+	  /* If the path the link points to isn't its soname or it is not
+	     the .so symlink for ld(1), we treat it as a normal file.
+
+	     You should always do this:
+
+		libfoo.so -> SONAME -> Arbitrary package-chosen name.
+
+	     e.g. libfoo.so -> libfoo.so.1 -> libfooimp.so.9.99.
+	     Given a SONAME of libfoo.so.1.
+
+	     You should *never* do this:
+
+		libfoo.so -> libfooimp.so.9.99
+
+	     If you do, and your SONAME is libfoo.so.1, then libfoo.so
+	     fails to point at the SONAME. In that case ldconfig may consider
+	     libfoo.so as another implementation of SONAME and will create
+	     symlinks against it causing problems when you try to upgrade
+	     or downgrade. The problems will arise because ldconfig will,
+	     depending on directory ordering, creat symlinks against libfoo.so
+	     e.g. libfoo.so.1.2 -> libfoo.so, but when libfoo.so is removed
+	     (typically by the removal of a development pacakge not required
+	     for the runtime) it will break the libfoo.so.1.2 symlink and the
+	     application will fail to start.  */
 	  const char *real_base_name = basename (real_file_name);
 
 	  if (strcmp (real_base_name, soname) != 0)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog      |    4 ++++
 elf/ldconfig.c |   26 ++++++++++++++++++++++++--
 2 files changed, 28 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]