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

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



Author: aurel32
Date: 2006-07-25 00:47:01 +0000 (Tue, 25 Jul 2006)
New Revision: 1679

Removed:
   glibc-package/trunk/debian/patches/any/local-ldconfig-multiarch.diff
Modified:
   glibc-package/branches/glibc-2.4/debian/changelog
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/debhelper.in/libc.dirs
   glibc-package/trunk/debian/debhelper.in/libc.install
   glibc-package/trunk/debian/debhelper.in/libc.postinst
   glibc-package/trunk/debian/patches/series
   glibc-package/trunk/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-07-25 00:34:21 UTC (rev 1678)
+++ glibc-package/branches/glibc-2.4/debian/changelog	2006-07-25 00:47:01 UTC (rev 1679)
@@ -124,9 +124,6 @@
     building with linuxthreads).
   * Add any/local-__thread.diff (make glibc buildable without __thread support)
     from Michael Banck.  (Closes: #361064)
-  * 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.
   * debian/sysdeps/alpha.mk: do an NPTL pass.
 
   [Jeff Bailey]
@@ -165,6 +162,9 @@
   * debian/locales-all.README.Debian:  File removed, it is useless now.
     (Closes: #378191)
   * Update Russian debconf translation, by Yuri Kozlov.  (Closes: #379395)
+  * 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.
 
   [ Denis Barbier ]
   * debian/control.in/main: also make locales Conflicts: belocs-locales-bin.

Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2006-07-25 00:34:21 UTC (rev 1678)
+++ glibc-package/trunk/debian/changelog	2006-07-25 00:47:01 UTC (rev 1679)
@@ -19,6 +19,9 @@
   * patches/powerpc/cvs-procfs.diff: patch from upstream (fix a build failure
     with recent kernel headers).  (Closes: #377892)
   * Update Russian debconf translation, by Yuri Kozlov.  (Closes: #379395)
+  * 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.
 
   [ Denis Barbier ]
   * debian/main/control.in: also make locales Conflicts: belocs-locales-bin.

Modified: glibc-package/trunk/debian/debhelper.in/libc.dirs
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.dirs	2006-07-25 00:34:21 UTC (rev 1678)
+++ glibc-package/trunk/debian/debhelper.in/libc.dirs	2006-07-25 00:47:01 UTC (rev 1679)
@@ -1,2 +1,3 @@
 sys
 etc/init.d
+etc/ld.so.conf.d

Modified: glibc-package/trunk/debian/debhelper.in/libc.install
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.install	2006-07-25 00:34:21 UTC (rev 1678)
+++ glibc-package/trunk/debian/debhelper.in/libc.install	2006-07-25 00:47:01 UTC (rev 1679)
@@ -21,8 +21,9 @@
 
 debian/local/usr_sbin/tzconfig usr/sbin
 
-debian/tmp-libc/lib/ldconfig/* lib/ldconfig
 debian/tmp-libc/lib/*-*-gnu/ lib
 debian/tmp-libc/usr/lib/*-*-gnu/ usr/lib
 
+debian/tmp-libc/etc/ld.so.conf.d /etc
+
 log-test-*-libc usr/share/doc/LIBC

Modified: glibc-package/trunk/debian/debhelper.in/libc.postinst
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.postinst	2006-07-25 00:34:21 UTC (rev 1678)
+++ glibc-package/trunk/debian/debhelper.in/libc.postinst	2006-07-25 00:47:01 UTC (rev 1679)
@@ -145,6 +145,18 @@
 	rm -f /lib/libdb.so.3.old
     fi
 
+    # Add support for /etc/ld.so.conf.d
+    if dpkg --compare-versions $preversion lt 2.3.6-16; then
+	if [ -e /etc/ld.so.conf ]; then
+	    [ -z "$(tail -n 1 /etc/ld.so.conf)" ] || echo >> /etc/ld.so.conf
+	else
+	    touch /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
+    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/trunk/debian/patches/any/local-ldconfig-multiarch.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/local-ldconfig-multiarch.diff	2006-07-25 00:34:21 UTC (rev 1678)
+++ glibc-package/trunk/debian/patches/any/local-ldconfig-multiarch.diff	2006-07-25 00:47:01 UTC (rev 1679)
@@ -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/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2006-07-25 00:34:21 UTC (rev 1678)
+++ glibc-package/trunk/debian/patches/series	2006-07-25 00:47:01 UTC (rev 1679)
@@ -156,7 +156,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-all.diff -p0
 any/local-libgcc-compat-others.diff -p1

Modified: glibc-package/trunk/debian/rules.d/build.mk
===================================================================
--- glibc-package/trunk/debian/rules.d/build.mk	2006-07-25 00:34:21 UTC (rev 1678)
+++ glibc-package/trunk/debian/rules.d/build.mk	2006-07-25 00:47:01 UTC (rev 1679)
@@ -151,14 +151,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.conf"; \
+	  echo "# Multiarch support" > $$conffile; \
+	  echo /lib/$$triplet >> $$conffile; \
+	  echo /usr/lib/$$triplet >> $$conffile; \
 	fi
 	 
 	$(call xx,extra_install)



Reply to: