[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r1569 - in glibc-package/branches/glibc-2.4/debian: . debhelper.in patches patches/any rules.d



Author: aurel32
Date: 2006-05-28 22:01:46 +0000 (Sun, 28 May 2006)
New Revision: 1569

Removed:
   glibc-package/branches/glibc-2.4/debian/patches/any/local-ldconfig-multiarch.diff
Modified:
   glibc-package/branches/glibc-2.4/debian/changelog
   glibc-package/branches/glibc-2.4/debian/debhelper.in/libc.dirs
   glibc-package/branches/glibc-2.4/debian/debhelper.in/libc.postinst
   glibc-package/branches/glibc-2.4/debian/patches/series
   glibc-package/branches/glibc-2.4/debian/rules.d/build.mk
Log:
  * debian/debhelper.in/libc.postinst: add /etc/ld.so.conf.d/ support.
  * Drop any/local-ldconfig-multiarch.diff, use /etc/ld.so.conf.d/ to 
    configure multiarch libraries.



Modified: glibc-package/branches/glibc-2.4/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.4/debian/changelog	2006-05-28 21:41:08 UTC (rev 1568)
+++ glibc-package/branches/glibc-2.4/debian/changelog	2006-05-28 22:01:46 UTC (rev 1569)
@@ -100,6 +100,9 @@
   * Add any/local-__thread.diff (make glibc buildable without __thread support)
     from Michael Bank.  (Closes: #361064)
   * debian/sysdeps/{arm,m68k,hppa}.mk: disable TLS (as on 2.3.6).
+  * debian/debhelper.in/libc.postinst: add /etc/ld.so.conf.d/ support.
+  * Drop any/local-ldconfig-multiarch.diff, use /etc/ld.so.conf.d/ to 
+    configure multiarch libraries.
 
  -- Aurelien Jarno <aurel32@debian.org>  Sun, 28 May 2006 03:28:14 +0200
 

Modified: glibc-package/branches/glibc-2.4/debian/debhelper.in/libc.dirs
===================================================================
--- glibc-package/branches/glibc-2.4/debian/debhelper.in/libc.dirs	2006-05-28 21:41:08 UTC (rev 1568)
+++ glibc-package/branches/glibc-2.4/debian/debhelper.in/libc.dirs	2006-05-28 22:01:46 UTC (rev 1569)
@@ -1,2 +1,3 @@
 sys
 etc/init.d
+etc/ld.so.conf.d

Modified: glibc-package/branches/glibc-2.4/debian/debhelper.in/libc.postinst
===================================================================
--- glibc-package/branches/glibc-2.4/debian/debhelper.in/libc.postinst	2006-05-28 21:41:08 UTC (rev 1568)
+++ glibc-package/branches/glibc-2.4/debian/debhelper.in/libc.postinst	2006-05-28 22:01:46 UTC (rev 1569)
@@ -145,6 +145,17 @@
 	rm -f /lib/libdb.so.3.old
     fi
 
+    # Add support for /etc/ld.so.conf.d
+    if ! [ -e /etc/ld.so.conf ] ; then 
+       touch /etc/ld.so.conf
+    fi
+    if [ $(awk 'END {print NR}' /etc/ld.so.conf) != $(cat /etc/ld.so.conf | wc -l) ] ; then
+       echo >> /etc/ld.so.conf
+    fi
+    if ! grep -q '^include /etc/ld.so.conf.d/*.conf$' /etc/ld.so.conf ; then
+       echo 'include /etc/ld.so.conf.d/*.conf' >> /etc/ld.so.conf
+    fi
+
     # Handle upgrades when libc-opt package has been installed.
     # We check the version between the current installed libc and libc-opt.
     # If they're unmatched, we keep /etc/ld.so.nohwcap file until libc-opt

Deleted: glibc-package/branches/glibc-2.4/debian/patches/any/local-ldconfig-multiarch.diff
===================================================================
--- glibc-package/branches/glibc-2.4/debian/patches/any/local-ldconfig-multiarch.diff	2006-05-28 21:41:08 UTC (rev 1568)
+++ glibc-package/branches/glibc-2.4/debian/patches/any/local-ldconfig-multiarch.diff	2006-05-28 22:01:46 UTC (rev 1569)
@@ -1,138 +0,0 @@
---- glibc-2.3.6/elf/ldconfig.c.orig	2005-02-16 11:29:34.000000000 +0100
-+++ glibc-2.3.6/elf/ldconfig.c	2006-03-26 23:37:33.665182082 +0200
-@@ -1027,6 +1027,125 @@
-   fclose (file);
- }
- 
-+static void
-+add_multiarch_dirs (const char *path)
-+{
-+  DIR *dir;
-+  struct dirent64 *direntry;
-+  char *file_name, *dir_name, *real_file_name, *link_path;
-+  int file_name_len, real_file_name_len, link_path_len, len;
-+  struct stat64 lstat_buf, stat_buf;
-+  int is_link, is_dir;
-+
-+  file_name_len = PATH_MAX;
-+  file_name = alloca (file_name_len);
-+  
-+  link_path_len = PATH_MAX;
-+  link_path = alloca (link_path_len);
-+ 
-+  if (opt_chroot)
-+    {
-+      dir_name = chroot_canon (opt_chroot, path);
-+      real_file_name_len = PATH_MAX;
-+      real_file_name = alloca (real_file_name_len);
-+    }
-+  else
-+    {
-+      dir_name = xstrdup(path);
-+      real_file_name_len = 0;
-+      real_file_name = file_name;
-+    }
-+
-+  if (dir_name == NULL || (dir = opendir (dir_name)) == NULL)
-+    {
-+      if (opt_verbose)
-+        error (0, errno, _("Can't open directory %s"), path);
-+      if (opt_chroot && dir_name)
-+        free (dir_name);
-+      return;
-+    }
-+
-+  while ((direntry = readdir64 (dir)) != NULL)
-+    {
-+#ifdef _DIRENT_HAVE_D_TYPE
-+      /* We only look at links.  */
-+      if (direntry->d_type != DT_UNKNOWN && direntry->d_type != DT_LNK)
-+	continue;
-+#endif /* _DIRENT_HAVE_D_TYPE  */
-+    
-+      len = strlen (path) + strlen (direntry->d_name);
-+      if (len > file_name_len)
-+	{
-+	  file_name_len = len + 1;
-+	  file_name = alloca (file_name_len);
-+	  if (!opt_chroot)
-+	    real_file_name = file_name;
-+	}
-+      sprintf (file_name, "%s/%s", path, direntry->d_name);
-+      if (opt_chroot)
-+        {
-+          len = strlen (dir_name) + strlen (direntry->d_name);
-+          if (len > real_file_name_len)
-+            {
-+              real_file_name_len = len + 1;
-+              real_file_name = alloca (real_file_name_len);
-+            }
-+          sprintf (real_file_name, "%s/%s", dir_name, direntry->d_name);
-+        }
-+
-+      if (__builtin_expect (lstat64 (real_file_name, &lstat_buf), 0))
-+        {
-+          error (0, errno, _("Cannot lstat %s"), file_name);
-+          continue;
-+        }
-+
-+      /* We only look at links.  */
-+      is_link = S_ISLNK (lstat_buf.st_mode);
-+      if (!is_link)
-+          continue;
-+
-+      /* Check the symlink refers to a directory.  */
-+      if (__builtin_expect (stat64 (real_file_name, &stat_buf), 0))
-+        {
-+	  if (opt_verbose)
-+	    error (0, errno, _("Cannot stat %s"), file_name);
-+          continue;
-+        }
-+
-+      is_dir = S_ISDIR (stat_buf.st_mode);
-+      if (!is_dir)
-+        {
-+	  if (opt_verbose)
-+	    error (0, errno, _("%s is not a directory"), file_name);
-+          continue;
-+        }
-+
-+      /* Read the link.  */
-+      if (realpath(real_file_name, link_path) == NULL)
-+	{
-+	  if (opt_verbose)
-+	    error (0, errno, _("Cannot read link %s"), file_name);
-+          continue;
-+	}
-+
-+      if (opt_chroot)
-+	{
-+	   len = strlen(opt_chroot);
-+	   if (strncmp(opt_chroot, link_path, len) == 0)
-+	     add_dir(link_path + len);		  
-+	   else
-+	     error (0, errno, _("Link %s refers to outside of the chroot"), file_name);
-+	}
-+      else
-+	{	      
-+          add_dir(link_path);
-+	}	 
-+    }
-+
-+  closedir (dir);
-+  free (dir_name);
-+}
-+
- /* Handle one word in an `include' line, a glob pattern of additional
-    config files to read.  */
- static void
-@@ -1215,6 +1334,9 @@
-       add_system_dir (SLIBDIR);
-       if (strcmp (SLIBDIR, LIBDIR))
- 	add_system_dir (LIBDIR);
-+
-+      /* Add multiarch directories.  */
-+      add_multiarch_dirs("/lib/ldconfig");
-     }
- 
-   search_dirs ();

Modified: glibc-package/branches/glibc-2.4/debian/patches/series
===================================================================
--- glibc-package/branches/glibc-2.4/debian/patches/series	2006-05-28 21:41:08 UTC (rev 1568)
+++ glibc-package/branches/glibc-2.4/debian/patches/series	2006-05-28 22:01:46 UTC (rev 1569)
@@ -117,7 +117,6 @@
 any/local-ldd.diff -p0
 any/local-ldso-disable-hwcap.diff -p0
 any/local-ldconfig.diff -p0
-any/local-ldconfig-multiarch.diff -p1
 any/local-ldconfig-tls.diff -p1
 any/local-libgcc-compat-main.diff -p0
 any/local-libgcc-compat-ports.diff -p0

Modified: glibc-package/branches/glibc-2.4/debian/rules.d/build.mk
===================================================================
--- glibc-package/branches/glibc-2.4/debian/rules.d/build.mk	2006-05-28 21:41:08 UTC (rev 1568)
+++ glibc-package/branches/glibc-2.4/debian/rules.d/build.mk	2006-05-28 22:01:46 UTC (rev 1569)
@@ -147,14 +147,17 @@
 	  ln -sf /lib/tls/librt.so.1 debian/tmp-libc/usr/lib/nptl/; \
 	fi
 
-	# Create the multidir directories, and the symlinks in /lib/ldconfig
+	# Create the multidir directories, and the configuration file in /etc/ld.so.conf.d
 	if [ $(curpass) = libc ]; then \
-	  mkdir -p debian/tmp-$(curpass)/lib/ldconfig; \
+	  mkdir -p debian/tmp-$(curpass)/etc/ld.so.conf.d; \
 	  machine=`sed '/^ *config-machine *=/!d;s/.*= *//g' $(DEB_BUILDDIR)/config.make`; \
 	  os=`sed '/^ *config-os *=/!d;s/.*= *//g' $(DEB_BUILDDIR)/config.make`; \
-	  mkdir -p debian/tmp-$(curpass)/lib/$$machine-$$os debian/tmp-$(curpass)/usr/lib/$$machine-$$os; \
-	  ln -s /lib/$$machine-$$os debian/tmp-$(curpass)/lib/ldconfig/$$machine-$$os-lib; \
-	  ln -s /usr/lib/$$machine-$$os debian/tmp-$(curpass)/lib/ldconfig/$$machine-$$os-usr-lib; \
+	  triplet='$$machine-$$os'; \
+	  mkdir -p debian/tmp-$(curpass)/lib/$$triplet debian/tmp-$(curpass)/usr/lib/$$triplet; \
+	  conffile='debian/tmp-$(curpass)/etc/ld.so.conf.d/$$triplet'; \
+	  echo "# Multiarch support\n" > $$conffile; \
+	  echo /lib/$$machine-$$os >> $$conffile; \
+	  echo /usr/lib/$$machine-$$os >> $$conffile; \
 	fi
 	 
 	$(call xx,extra_install)



Reply to: