r4877 - glibc-package/branches/glibc-branch-squeeze/debian/patches

2011-08-13 Thread Aurelien Jarno
Author: aurel32
Date: 2011-08-13 10:38:06 + (Sat, 13 Aug 2011)
New Revision: 4877

Modified:
   glibc-package/branches/glibc-branch-squeeze/debian/patches/svn-updates.diff
Log:
Remove one more broken patch


Modified: 
glibc-package/branches/glibc-branch-squeeze/debian/patches/svn-updates.diff
===
--- glibc-package/branches/glibc-branch-squeeze/debian/patches/svn-updates.diff 
2011-08-12 20:40:02 UTC (rev 4876)
+++ glibc-package/branches/glibc-branch-squeeze/debian/patches/svn-updates.diff 
2011-08-13 10:38:06 UTC (rev 4877)
@@ -191,175 +191,8 @@
  
if (mode[0] == 'a')
  c-pos = c-maxpos;
 a/libio/bug-fclose1.c  (revision 0)
-+++ b/libio/bug-fclose1.c  (revision 14920)
-@@ -0,0 +1,132 @@
-+// BZ #12724
-+
-+static void do_prepare (void);
-+#define PREPARE(argc, argv) do_prepare ()
-+static int do_test (void);
-+#define TEST_FUNCTION do_test()
-+#include ../test-skeleton.c
-+
-+
-+static int fd;
-+
-+
-+static void
-+do_prepare (void)
-+{
-+  fd = create_temp_file (bug-fclose1., NULL);
-+  if (fd == -1)
-+{
-+  printf (cannot create temporary file: %m\n);
-+  exit (1);
-+}
-+}
-+
-+
-+static int
-+do_test (void)
-+{
-+  static const char pattern[] = hello world;
-+
-+  /* Prepare a seekable file.  */
-+  if (write (fd, pattern, sizeof pattern) != sizeof pattern)
-+{
-+  printf (cannot write pattern: %m\n);
-+  return 1;
-+}
-+  if (lseek (fd, 1, SEEK_SET) != 1)
-+{
-+  printf (cannot seek after write: %m\n);
-+  return 1;
-+}
-+
-+  /* Create an output stream visiting the file; when it is closed, all
-+ other file descriptors visiting the file must see the new file
-+ position.  */
-+  int fd2 = dup (fd);
-+  if (fd2  0)
-+{
-+  printf (cannot duplicate descriptor for writing: %m\n);
-+  return 1;
-+}
-+  FILE *f = fdopen (fd2, w);
-+  if (f == NULL)
-+{
-+  printf (first fdopen failed: %m\n);
-+  return 1;
-+}
-+  if (fputc (pattern[1], f) != pattern[1])
-+{
-+  printf (fputc failed: %m\n);
-+  return 1;
-+}
-+  if (fclose (f) != 0)
-+{
-+  printf (first fclose failed: %m\n);
-+  return 1;
-+}
-+  errno = 0;
-+  if (lseek (fd2, 0, SEEK_CUR) != -1)
-+{
-+  printf (lseek after fclose after write did not fail\n);
-+  return 1;
-+}
-+  if (errno != EBADF)
-+{
-+  printf (lseek after fclose after write did not fail with EBADF: %m\n);
-+  return 1;
-+}
-+  off_t o = lseek (fd, 0, SEEK_CUR);
-+  if (o != 2)
-+{
-+  printf (\
-+lseek on original descriptor after first fclose returned %ld, expected 2\n,
-+(long int) o);
-+  return 1;
-+}
-+
-+  /* Likewise for an input stream.  */
-+  fd2 = dup (fd);
-+  if (fd2  0)
-+ {
-+  printf (cannot duplicate descriptor for reading: %m\n);
-+  return 1;
-+}
-+  f = fdopen (fd2, r);
-+   if (f == NULL)
-+{
-+  printf (second fdopen failed: %m\n);
-+  return 1;
-+}
-+   char c = fgetc (f);
-+   if (c != pattern[2])
-+ {
-+   printf (getc returned %c, expected %c\n, c, pattern[2]);
-+   return 1;
-+ }
-+  if (fclose (f) != 0)
-+{
-+  printf (second fclose failed: %m\n);
-+  return 1;
-+}
-+  errno = 0;
-+  if (lseek (fd2, 0, SEEK_CUR) != -1)
-+{
-+  printf (lseek after fclose after read did not fail\n);
-+  return 1;
-+}
-+  if (errno != EBADF)
-+{
-+  printf (lseek after fclose after read did not fail with EBADF: %m\n);
-+  return 1;
-+}
-+  o = lseek (fd, 0, SEEK_CUR);
-+  if (o != 3)
-+{
-+  printf (\
-+lseek on original descriptor after second fclose returned %ld, expected 3\n,
-+(long int) o);
-+  return 1;
-+}
-+
-+  return 0;
-+}
 --- a/libio/fileops.c  (revision 12231)
 +++ b/libio/fileops.c  (revision 14920)
-@@ -161,19 +161,27 @@
- _IO_new_file_close_it (fp)
-  _IO_FILE *fp;
- {
--  int write_status, close_status;
-   if (!_IO_file_is_open (fp))
- return EOF;
- 
--  if ((fp-_flags  _IO_NO_WRITES) == 0
--   (fp-_flags  _IO_CURRENTLY_PUTTING) != 0)
-+  int write_status;
-+  if (_IO_in_put_mode (fp))
- write_status = _IO_do_flush (fp);
-+  else if (fp-_offset != _IO_pos_BAD  fp-_IO_read_base != NULL
-+  !_IO_in_backup (fp))
-+{
-+  off64_t o = _IO_SEEKOFF (fp, 0, _IO_seek_cur, 0);
-+  if (o == WEOF)
-+  write_status = EOF;
-+  else
-+  write_status = _IO_SYSSEEK (fp, o, SEEK_SET)  0 ? EOF : 0;
-+}
-   else
- write_status = 0;
- 
-   INTUSE(_IO_unsave_markers) (fp);
- 
--  close_status = _IO_SYSCLOSE (fp);
-+  int close_status = _IO_SYSCLOSE (fp);
- 
-   /* Free buffer. */
- #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
 @@ -291,7 +299,7 @@
  #ifdef _LIBC
last_recognized = mode;
@@ -423,23 +256,6 @@
  
/* Now write out the remainder.  Normally, this will fit in the
 buffer, but it's somewhat messier for 

r4879 - tzdata/trunk/debian

2011-08-13 Thread Aurelien Jarno
Author: aurel32
Date: 2011-08-13 13:15:05 + (Sat, 13 Aug 2011)
New Revision: 4879

Modified:
   tzdata/trunk/debian/rules
Log:
Don't hardcode the java directory


Modified: tzdata/trunk/debian/rules
===
--- tzdata/trunk/debian/rules   2011-08-13 11:58:39 UTC (rev 4878)
+++ tzdata/trunk/debian/rules   2011-08-13 13:15:05 UTC (rev 4879)
@@ -70,7 +70,7 @@
/usr/sbin/zic -d $(TZGEN) -p America/New_York
 
# Generate a java version
-   $(JHOME)/bin/java -jar $(JHOME)/jre/lib/javazic.jar -V $(VERSION) -d 
tzgen-java $(TIMEZONES) $(TIMEZONES_JAVA)
+   $(JHOME)/bin/java -jar $(JHOME)/jre/lib/javazic.jar -V $(VERSION) -d 
$(TZGEN_JAVA) $(TIMEZONES) $(TIMEZONES_JAVA)
 
# Generate the templates file
( echo Template: tzdata/Areas ; \


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1qse3n-0007mz...@vasks.debian.org



r4880 - tzdata/trunk/debian

2011-08-13 Thread Aurelien Jarno
Author: aurel32
Date: 2011-08-13 13:50:46 + (Sat, 13 Aug 2011)
New Revision: 4880

Modified:
   tzdata/trunk/debian/changelog
   tzdata/trunk/debian/rules
Log:
  * Add build-arch and build-indep targets. 



Modified: tzdata/trunk/debian/changelog
===
--- tzdata/trunk/debian/changelog   2011-08-13 13:15:05 UTC (rev 4879)
+++ tzdata/trunk/debian/changelog   2011-08-13 13:50:46 UTC (rev 4880)
@@ -1,3 +1,9 @@
+tzdata (2011h-4) UNRELEASED; urgency=low
+
+  * Add build-arch and build-indep targets. 
+
+ -- Aurelien Jarno aure...@debian.org  Sat, 13 Aug 2011 15:48:55 +0200
+
 tzdata (2011h-3) unstable; urgency=low
 
   * Correctly handle empty debconf values (how is that possible for a 

Modified: tzdata/trunk/debian/rules
===
--- tzdata/trunk/debian/rules   2011-08-13 13:15:05 UTC (rev 4879)
+++ tzdata/trunk/debian/rules   2011-08-13 13:50:46 UTC (rev 4880)
@@ -49,8 +49,11 @@
   US \
   Etc
 
-build: build-stamp
-build-stamp:
+build: build-arch build-indep
+build-arch:
+
+build-indep: build-indep-stamp
+build-indep-stamp:
dh_testdir
 
# Build the default version
@@ -144,4 +147,4 @@
dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+.PHONY: build build-arch build-indep clean binary-indep binary-arch binary 
install


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1qsebu-x9...@vasks.debian.org



r4881 - tzdata/trunk/debian

2011-08-13 Thread Aurelien Jarno
Author: aurel32
Date: 2011-08-13 13:52:08 + (Sat, 13 Aug 2011)
New Revision: 4881

Added:
   tzdata/trunk/debian/tzdata.config
   tzdata/trunk/debian/tzdata.install
   tzdata/trunk/debian/tzdata.links
   tzdata/trunk/debian/tzdata.postinst
   tzdata/trunk/debian/tzdata.templates
Removed:
   tzdata/trunk/debian/config
   tzdata/trunk/debian/install
   tzdata/trunk/debian/links
   tzdata/trunk/debian/postinst
   tzdata/trunk/debian/templates
Log:
Prefix all debhelper files with the package name for consistency


Deleted: tzdata/trunk/debian/config
===
--- tzdata/trunk/debian/config  2011-08-13 13:50:46 UTC (rev 4880)
+++ tzdata/trunk/debian/config  2011-08-13 13:52:08 UTC (rev 4881)
@@ -1,423 +0,0 @@
-#! /bin/sh
-set -e
-
-. /usr/share/debconf/confmodule
-db_version 2.0
-db_capb backup
-
-convert_timezone()
-{
-case $1 in
-   (right/*|posix/*)
-   convert_timezone ${1#*/}
-   ;;
-   (Africa/Asmera)
-   echo Africa/Asmara
-   ;;
-   (America/Argentina/ComodRivadavia|America/Catamarca)
-   echo America/Argentina/Catamarca
-   ;;
-   (America/Buenos_Aires)
-   echo America/Argentina/Buenos_Aires
-   ;;
-   (America/Cordoba|America/Rosario)
-   echo America/Argentina/Cordoba
-   ;;
-   (America/Jujuy)
-   echo America/Argentina/Jujuy
-   ;;
-   (America/Mendoza)
-   echo America/Argentina/Mendoza
-   ;;
-   (Antarctica/South_Pole)
-   echo Antarctica/McMurdo
-   ;;
-Asia/Ashkhabad)
-echo Asia/Ashgabat
-;;
-(Asia/Calcutta)
-echo Asia/Kolkata
-;;
-Asia/Chungking)
-echo Asia/Chongqing
-;;
-Asia/Dacca)
-echo Asia/Dhaka
-;;
-(Asia/Katmandu)
-echo Asia/Kathmandu
-;;
-Asia/Macao)
-echo Asia/Macau
-;;
-(Asia/Saigon)
-echo Asia/Ho_Chi_Minh
-;;
-Asia/Thimbu)
-echo Asia/Thimphu
-;;
-Asia/Ulan_Bator)
-echo Asia/Ulaanbaatar
-;;
-Atlantic/Faeroe)
-echo Atlantic/Faroe
-;;
-Australia/ACT | Australia/NSW)
-echo Australia/Sydney
-;;
-Australia/LHI)
-echo Australia/Lord_Howe
-;;
-Australia/North)
-echo Australia/Darwin
-;;
-Australia/Queensland)
-echo Australia/Brisbane
-;;
-Australia/South)
-echo Australia/Adelaide
-;;
-Australia/Tasmania)
-echo Australia/Hobart
-;;
-Australia/Victoria)
-echo Australia/Melbourne
-;;
-Australia/West)
-echo Australia/Perth
-;;
-Brazil/Acre)
-echo America/Rio_Branco
-;;
-Brazil/DeNoronha)
-echo America/Noronha
-;;
-Brazil/East)
-echo America/Sao_Paulo
-;;
-Brazil/West)
-echo America/Manaus
-;;
-Canada/Atlantic)
-echo America/Halifax
-;;
-Canada/Central)
-echo America/Winnipeg
-;;
-Canada/East-Saskatchewan)
-echo America/Regina
-;;
-Canada/Eastern)
-echo America/Toronto
-;;
-Canada/Mountain)
-echo America/Edmonton
-;;
-Canada/Newfoundland)
-echo America/St_Johns
-;;
-Canada/Pacific)
-echo America/Vancouver
-;;
-Canada/Saskatchewan)
-echo America/Regina
-;;
-Canada/Yukon)
-echo America/Whitehorse
-;;
-CET)
-echo Europe/Paris
-;;
-Chile/Continental)
-echo America/Santiago
-;;
-Chile/EasterIsland)
-echo Pacific/Easter
-;;
-CST6CDT)
-echo SystemV/CST6CDT
-;;
-Cuba)
-echo America/Havana
-;;
-EET)
-echo Europe/Helsinki
-;;
-Egypt)
-echo Africa/Cairo
-;;
-Eire)
-echo Europe/Dublin
-;;
-EST)
-echo SystemV/EST5
-;;
-EST5EDT)
-echo SystemV/EST5EDT
-;;
-GB)
-echo Europe/London
-;;
-GB-Eire)
-echo Europe/London
-;;
-GMT)
-echo Etc/GMT
-;;
-GMT0)
-echo Etc/GMT0
-;;
-GMT-0)
-echo Etc/GMT-0
-;;
-GMT+0)
-echo Etc/GMT+0
- 

Bug#637664: pu: package tzdata/2011h-0squeeze1

2011-08-13 Thread Aurelien Jarno
Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: pu

Hi,

I have just realized that tzdata is out of sync by 4 versions in stable.
The new upstream version, tzdata 2011h updates timezone information for
Antartica, Chile, Egypt, Falkland Islands, Morocco, Russia. You will
find the debdiff below. Is it ok to upload it to stable?

Thanks,
Aurelien


diff -Nru tzdata-2011d/africa tzdata-2011h/africa
--- tzdata-2011d/africa 2010-12-16 18:24:19.0 +0100
+++ tzdata-2011h/africa 2011-06-15 12:43:13.0 +0200
@@ -1,5 +1,5 @@
 # pre
-# @(#)africa   8.28
+# @(#)africa   8.31
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -212,7 +212,21 @@
 Rule   Egypt   19901994-   May  1  1:001:00S
 # IATA (after 1990) says transitions are at 0:00.
 # Go with IATA starting in 1995, except correct 1995 entry from 09-30 to 09-29.
-Rule   Egypt   1995max -   Apr lastFri  0:00s  1:00S
+
+# From Alexander Krivenyshev (2011-04-20):
+# ...Egypt's interim cabinet decided on Wednesday to cancel daylight
+# saving time after a poll posted on its website showed the majority of
+# Egyptians would approve the cancellation.
+#
+# Egypt to cancel daylight saving time
+# a href=http://www.almasryalyoum.com/en/node/407168;
+# http://www.almasryalyoum.com/en/node/407168
+# /a
+# or
+# a href=http://www.worldtimezone.com/dst_news/dst_news_egypt04.html;
+# http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
+# /a
+Rule   Egypt   19952010-   Apr lastFri  0:00s  1:00S
 Rule   Egypt   19952005-   Sep lastThu 23:00s  0   -
 # From Steffen Thorsen (2006-09-19):
 # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports:
@@ -313,7 +327,7 @@
 Rule   Egypt   2009only-   Aug 20  23:00s  0   -
 Rule   Egypt   2010only-   Aug 11  0:000   -
 Rule   Egypt   2010only-   Sep 10  0:001:00S
-Rule   Egypt   2010max -   Sep lastThu 23:00s  0   -
+Rule   Egypt   2010only-   Sep lastThu 23:00s  0   -
 
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone   Africa/Cairo2:05:00 -   LMT 1900 Oct
@@ -712,6 +726,48 @@
 # http://www.timeanddate.com/news/time/morocco-starts-dst-2010.html
 # /a
 
+# From Dan Abitol (2011-03-30):
+# ...Rules for Africa/Casablanca are the following (24h format)
+# The 3rd april 2011 at 00:00:00, [it] will be 3rd april 1:00:00
+# The 31th july 2011 at 00:59:59,  [it] will be 31th July 00:00:00
+# ...Official links of change in morocco
+# The change was broadcast on the FM Radio
+# I ve called ANRT (telecom regulations in Morocco) at
+# +212.537.71.84.00
+# a href=http://www.anrt.net.ma/fr/;
+# http://www.anrt.net.ma/fr/
+# /a
+# They said that
+# a href=http://www.map.ma/fr/sections/accueil/l_heure_legale_au_ma/view;
+# http://www.map.ma/fr/sections/accueil/l_heure_legale_au_ma/view
+# /a
+# is the official publication to look at.
+# They said that the decision was already taken.
+#
+# More articles in the press
+# a 
href=http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-lev;
+# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-lev
+# /a
+# e.html
+# a href=http://www.lematin.ma/Actualite/Express/Article.asp?id=148923;
+# http://www.lematin.ma/Actualite/Express/Article.asp?id=148923
+# /a
+# a 
href=http://www.lavieeco.com/actualite/Le-Maroc-passe-sur-GMT%2B1-a-partir-de-dim;
+# http://www.lavieeco.com/actualite/Le-Maroc-passe-sur-GMT%2B1-a-partir-de-dim
+# anche-prochain-5538.html
+# /a
+
+# From Petr Machata (2011-03-30):
+# They have it written in English here:
+# a href=http://www.map.ma/eng/sections/home/morocco_to_spring_fo/view;
+# http://www.map.ma/eng/sections/home/morocco_to_spring_fo/view
+# /a
+#
+# It says there that Morocco will resume its standard time on July 31,
+# 2011 at midnight. Now they don't say whether they mean midnight of
+# wall clock time (i.e. 11pm UTC), but that's what I would assume. It has
+# also been like that in the past.
+
 # RULE NAMEFROMTO  TYPEIN  ON  AT  SAVELETTER/S
 
 Rule   Morocco 1939only-   Sep 12   0:00   1:00S
@@ -735,6 +791,8 @@
 Rule   Morocco 2009only-   Aug  21  0:00   0   -
 Rule   Morocco 2010only-   May  2   0:00   1:00S
 Rule   Morocco 2010only-   Aug  8   0:00   0   -
+Rule   Morocco 2011only-   Apr  3   0:00   1:00S
+Rule   Morocco 2011only-   Jul  31  0  0   -
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone Africa/Casablanca -0:30:20 -  LMT 1913 Oct 26
 0:00   Morocco WE%sT   1984 Mar 16
diff -Nru tzdata-2011d/antarctica tzdata-2011h/antarctica
--- 

Re: r4878 - in glibc-package/trunk/debian: . patches patches/localedata

2011-08-13 Thread Sven Joachim
On 2011-08-13 13:58 +0200, Aurelien Jarno wrote:

   * Add patches/localedata/cvs-rupee.diff fro upstream to add support for
 Rupee symbol (U20B9).

This patch does not apply cleanly here, I got a reject in the following
hunk:

 +diff --git a/localedata/ChangeLog b/localedata/ChangeLog
 +index f45fb43..52bd694 100644
 +--- a/localedata/ChangeLog
  b/localedata/ChangeLog
 +@@ -1,5 +1,6 @@
 + 2011-05-09  Ulrich Drepper  drep...@gmail.com
 + 
 ++[BZ #12711]
 + * charmaps/UTF-8: Update from reason Unidata.txt file.
 + 
 + [BZ #12738]

Cheers,
   Sven


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87wrehtidp@turtle.gmx.de



Re: r4878 - in glibc-package/trunk/debian: . patches patches/localedata

2011-08-13 Thread Aurelien Jarno
On Sat, Aug 13, 2011 at 05:56:34PM +0200, Sven Joachim wrote:
 On 2011-08-13 13:58 +0200, Aurelien Jarno wrote:
 
* Add patches/localedata/cvs-rupee.diff fro upstream to add support for
  Rupee symbol (U20B9).
 
 This patch does not apply cleanly here, I got a reject in the following
 hunk:
 

I have seen the conflicts on the changelog when trying to apply it on
our tree, but only moved out the first changelog. This was a good
occasion to show me that it was also necessary to backport a second
patch.

Thanks, that should be fixed now.

-- 
Aurelien Jarno  GPG: 1024D/F1BCDB73
aurel...@aurel32.net http://www.aurel32.net


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110813162629.gp5...@hall.aurel32.net



Bug#632682: base-files: please provide a /lib64 - /lib symlink on 64-bit systems

2011-08-13 Thread Sven Joachim
On 2011-08-10 22:03 +0200, Aurelien Jarno wrote:

 On Wed, Aug 10, 2011 at 08:35:39PM +0200, Sven Joachim wrote:
 
 I'll have a look at it in the next few days if nobody beats me to it.
 Just to confirm that my ideas were the same as yours, AFAICS the
 following needs to be done in the preinst (on amd64), if /lib64 is a
 symlink:
 
 1) remove /lib64
 2) create /lib64 directory
 3) symlink $(readlink -e /lib/ld-linux-x86-64.so.2) to 
 /lib64/ld-linux-x86-64.so.2
 
 2) and 3) are a bit difficult after the path to the ELF interpreter has
 just disappeared.  I guess you still want to stick to shell nonetheless
 (as opposed to doing these steps in perl, say) ?
 

 This is basically what we have in mind, though it has not been tested.
 For step 2 and 3, you can call the ELF interpreter directly, that is 
 /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 mkdir /lib64.

Almost right, you have use /bin/mkdir though since the interpreter knows
nothing about PATH:

,
| # /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 mkdir /lib64
| mkdir: error while loading shared libraries: mkdir: cannot open shared object 
file
`

 The whole operation is still not atomic, but so far it's the best way to
 do it. We might want to insert a call to sync as steps 0 and 4, to
 minimize the possible time with ELF interpreter, and to make sure the
 data is written to the disk as soon as possible (otherwise if the
 machine crashes, the system can't boot).

After getting the necessary minimal grasp of the packaging system, I
have come up with a first shot towards a solution, see the attached
patch set.

Upgrade from and downgrade to 2.13-16 has been tested in a minimal amd64
sid chroot.  Also, I have tested upgrades from and downgrades to 2.13-10
in an i386/amd64 chroot with a multiarch-capable dpkg and i386 as
primary architecture.  I haven't yet checked or analyzed the
consequences of unpacking failures during upgrade or downgrade.

Known problems:

- Multiarch systems with multiple libc6 versions shipping the /lib64
  symlink will be hosed if the native libc6 is not unpacked first.
  Since this involves at least one unofficial architecture and an 
  unofficial dpkg, it is probably ignorable.

- Installing packages that ship files under /lib64 and then downgrading
  to a libc6 that ships the symlink breaks those packages.  Should maybe
  give a warning on downgrades if any files beside the ELF interpreter
  are found in /lib64.

- The lsb-core package installs symlinks /lib64/ld-lsb-x86-64.so.[23] to
  /lib/ld-linux-x86-64.so.2 that get broken.  Nothing dramatic and
  solvable in a few ways.

Cheers,
   Sven

-- 
I still say /lib64 is one of the nastiest pieces of shit I've ever
heard of.
-- Branden Robinson


From 6ead53c51dac3ef8aa77b96b8c8f1a647f654a6d Mon Sep 17 00:00:00 2001
From: Sven Joachim svenj...@gmx.de
Date: Thu, 11 Aug 2011 17:15:03 +0200
Subject: [PATCH 1/6] Don't create /lib64 and /usr/lib64 symlinks

---
 debian/sysdeps/amd64.mk  |3 ---
 debian/sysdeps/kfreebsd-amd64.mk |6 --
 debian/sysdeps/ppc64.mk  |6 --
 debian/sysdeps/s390x.mk  |6 --
 debian/sysdeps/sparc64.mk|6 --
 5 files changed, 0 insertions(+), 27 deletions(-)

diff --git a/debian/sysdeps/amd64.mk b/debian/sysdeps/amd64.mk
index c99dea4..67000a5 100644
--- a/debian/sysdeps/amd64.mk
+++ b/debian/sysdeps/amd64.mk
@@ -1,10 +1,7 @@
 libc_rtlddir = /lib64
 extra_config_options = --enable-multi-arch
 
-# /lib64 and /usr/lib64 are provided by glibc instead base-files: #259302.
 define libc6_extra_pkg_install
-ln -sf /lib debian/$(curpass)/lib64
-ln -sf lib debian/$(curpass)/usr/lib64
 
 make -C debian/local/memcpy-wrapper
 install -m 755 -o root -g root -d debian/libc6/$(libdir)/libc
diff --git a/debian/sysdeps/kfreebsd-amd64.mk b/debian/sysdeps/kfreebsd-amd64.mk
index 261cbda..635b72d 100644
--- a/debian/sysdeps/kfreebsd-amd64.mk
+++ b/debian/sysdeps/kfreebsd-amd64.mk
@@ -1,12 +1,6 @@
 # Main library
 extra_config_options = --disable-compatible-utmp --disable-multi-arch
 
-# /lib64 and /usr/lib64 are provided by glibc instead base-files: #259302.
-define libc0.1_extra_pkg_install
-ln -sf /lib debian/$(curpass)/lib64
-ln -sf lib debian/$(curpass)/usr/lib64
-endef
-
 # build 32-bit (i386) alternative library
 EGLIBC_PASSES += i386
 DEB_ARCH_REGULAR_PACKAGES += libc0.1-i386 libc0.1-dev-i386
diff --git a/debian/sysdeps/ppc64.mk b/debian/sysdeps/ppc64.mk
index 98cea4b..c8d2509 100644
--- a/debian/sysdeps/ppc64.mk
+++ b/debian/sysdeps/ppc64.mk
@@ -1,12 +1,6 @@
 libc_rtlddir = /lib64
 extra_config_options = --enable-multi-arch
 
-# /lib64 and /usr/lib64 are provided as symlinks 
-define libc6_extra_pkg_install
-ln -sf /lib debian/$(curpass)/lib64
-ln -sf lib debian/$(curpass)/usr/lib64
-endef
-
 # build 32-bit (powerpc) alternative library
 EGLIBC_PASSES += powerpc
 DEB_ARCH_REGULAR_PACKAGES += libc6-powerpc libc6-dev-powerpc
diff --git a/debian/sysdeps/s390x.mk b/debian/sysdeps/s390x.mk
index 

Bug#632682: base-files: please provide a /lib64 - /lib symlink on 64-bit systems

2011-08-13 Thread Jonathan Nieder
Quick thoughts.

Sven Joachim wrote:

 +ldfile=$(readlink -e RTLD_SO)
 +# Test if libc is of the same architecture as coreutils
 +# If not, they almost surely have a multiarch system and we can use
 +# the native ELF interpreter
 +if ! $ldfile /bin/true 2/dev/null; then
 + interpreter=
 +else
 + interpreter=$ldfile
 +fi

Very neat.

[...]
 Subject: [PATCH 2/6] Install the dynamic linker into RTLDDIR rather than /lib
[...]
 --- a/debian/debhelper.in/libc.install
 +++ b/debian/debhelper.in/libc.install
 @@ -1,4 +1,4 @@
 -TMPDIR/lib/*.so* /lib
 +TMPDIR/RTLDDIR/*.so* /lib
  TMPDIR/SLIBDIR/*.so* SLIBDIR
  TMPDIR/LIBDIR/gconv/* LIBDIR/gconv

 diff --git a/debian/rules.d/build.mk b/debian/rules.d/build.mk
 index 18f1800..36d7ee7 100644
 --- a/debian/rules.d/build.mk
 +++ b/debian/rules.d/build.mk
[...]
 - link_name=debian/tmp-$(curpass)/lib/$$rtld_so ; \
 + link_name=debian/tmp-$(curpass)/$(call xx,rtlddir)/$$rtld_so ; \
   target=$(call xx,slibdir)/$$(readlink debian/tmp-$(curpass)/$(call 
 xx,slibdir)/$$rtld_so) ; \
 + mkdir -p debian/tmp-$(curpass)/$(call xx,rtlddir); \
   ln -s $$target $$link_name ;  \

Do I understand correctly that this is this a no-op (to prepare for
patch 5)?

[...]
 @@ -384,6 +404,13 @@ fi
  #DEBHELPER#
  
  if [ -n $preversion ]; then
 +if test -L /lib64; then
 + case ${DPKG_MAINTSCRIPT_ARCH:-$(dpkg --print-architecture)} in
 + amd64 | ppc64 | sparc64 | s390x)
 + remove_lib64_symlink ;;
 + esac
 +fi

If DPKG_MAINTSCRIPT_ARCH isn't set for some reason, this gives the
wrong value.  Would it be possible to introduce a variable in
debian/rules.d/debhelper.mk so the right value can be cooked in at
build time?

 Subject: [PATCH 6/6] Restore the /lib64 symlink on downgrades

 It would be more prudent to prevent the downgrade from happening, but
 if we fail the prerm script, the one from the previous version kicks
 in and succeeds.

Fixed by dpkg commit 9d3ec0f5 (“dpkg: do not fallback to new-prerm
failed-upgrade for downgrades”).  Probably that's too new to count
on.

 +#Downgrading from a version with a /lib64 directory to a version with
 +# a /lib64 symlink is extremely dangerous.  We need to blow away the
 +# directory and restore the symlink, otherwise the dynamic linker gets
 +# lost after unpacking the replacing version.
 +
 +ldfile=$(readlink -e RTLD_SO)
 +# Test if libc is of the same architecture as coreutils
 +# If not, they almost surely have a multiarch system and we can use
 +# the native ELF interpreter
 +if ! $ldfile /bin/true 2/dev/null; then
 + interpreter=
 +else
 + interpreter=$ldfile
 +fi
 +
 +# sync before and after the operation to reduce the danger of hosing
 +# the system
 +sync
 +rm -rf /lib64
 +$interpreter /bin/ln -s /lib /lib64

Maybe it would be possible to mv /lib64 somewhere and loudly let the
admin know about it if it contains anything more than the dynamic
linker.

Remaining problems:

 - disruption to anything running concurrently with the
   upgrade/downgrade.  In the general case, there's nothing one can do
   about this except warn about it.

 - what happens if someone (a) has been trying to load libraries by
   filename in /lib64 or (b) has been installing libraries to /lib64
   and expecting to find them there?

   Most likely, that's not a big deal --- I would expect people to have
   used /usr/local/lib64 or /usr/lib64, but not /lib64.

 - What happens to the /usr/lib64 symlink?

Except where mentioned above, it looks good to me (though I haven't
tested yet).  Thanks!



--
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110813201419.gb13...@elie.gateway.2wire.net



Bug#635192: glibc-bsd: please provide O_CLOEXEC

2011-08-13 Thread Aurelien Jarno
On Sat, Jul 23, 2011 at 10:49:03AM -0500, Jonathan Nieder wrote:
 Package: libc0.1-dev
 Version: 2.13-10
 Severity: wishlist
 
 Hi,
 
 FreeBSD gained an implementation for O_CLOEXEC in r21 (Add
 O_CLOEXEC flag to open(2) and fhopen(2), 2011-03-25), which made its
 way to the freebsd 8 branch in r220241 (MFC r21, 2011-04-01).
 Here's a minimal patch (untested) to expose it along with some other
 constants from sys/fcntl.h.
 
 I'd prefer to find a way to make use of the sys/fcntl.h header
 directly to avoid having to chase changes like this, but the
 infrastructure doesn't seem to be available for that.
 
 No O_SEARCH yet, since kFreeBSD doesn't seem to implement it.
 
 2011-07-23  Jonathan Nieder  jrnie...@gmail.com
 
   * bits/fcntl.h: Define O_EXEC, O_TTY_INIT, O_CLOEXEC, and O_DIRECTORY,
   guarded by __USE_XOPEN2K8.  Values are from sys/sys/fcntl.h of FreeBSD
   9-current.
   * bits/fcntl.h: Do not require __USE_GNU as a condition for defining
   O_NOFOLLOW.  Make the condition __USE_XOPEN2K8 instead since the flag
   is defined in that standard.
 
 diff --git i/bits/fcntl.h w/bits/fcntl.h
 index 7641626a..8669c9ae 100644
 --- i/bits/fcntl.h
 +++ w/bits/fcntl.h
 @@ -47,9 +47,7 @@
  
  #ifdef __USE_GNU
  # define O_DIRECT020 /* Direct disk access.  */
 -enum { O_DIRECTORY = 0 };/* Must be a directory.  */
  enum { O_NOATIME = 0};  /* Do not set atime.  */
 -# define O_NOFOLLOW 0400 /* Do not follow links.  */
  #endif
  
  #ifdef __USE_BSD
 @@ -65,6 +63,14 @@ enum { O_NOATIME = 0};  /* Do not set atime.  */
  # define O_RSYNC O_SYNC  /* Synchronize read operations.  */
  #endif
  
 +#ifdef __USE_XOPEN2K8
 +# define O_EXEC  0100 /* Open without read or write access.  
 */
 +# define O_TTY_INIT  0200
 +# define O_CLOEXEC   0400
 +# define O_DIRECTORY 040 /* Must be a directory.  */
 +# define O_NOFOLLOW 0400 /* Do not follow links.  */
 +#endif
 +
  /* Since 'off_t' is 64-bit, O_LARGEFILE is a no-op.  */
  #define O_LARGEFILE  0
  

I don't think we want such a patch right now, unless we also provide
modify the open function to call fcntl() with FD_CLOEXEC as a fallback.
Otherwise code is going to start using O_CLOEXEC, and leak file
descriptors on old kernel (with old being the kernel we ship). The
fallback is not racy, but should catch most of the cases.

-- 
Aurelien Jarno  GPG: 1024D/F1BCDB73
aurel...@aurel32.net http://www.aurel32.net



-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110813204823.gs5...@hall.aurel32.net



Bug#632682: base-files: please provide a /lib64 - /lib symlink on 64-bit systems

2011-08-13 Thread Sven Joachim
Thanks for the review, Jonathan.

On 2011-08-13 22:14 +0200, Jonathan Nieder wrote:

 Sven Joachim wrote:

 - link_name=debian/tmp-$(curpass)/lib/$$rtld_so ; \
 + link_name=debian/tmp-$(curpass)/$(call xx,rtlddir)/$$rtld_so ; \
   target=$(call xx,slibdir)/$$(readlink 
 debian/tmp-$(curpass)/$(call xx,slibdir)/$$rtld_so) ; \
 + mkdir -p debian/tmp-$(curpass)/$(call xx,rtlddir); \
   ln -s $$target $$link_name ;  \

 Do I understand correctly that this is this a no-op (to prepare for
 patch 5)?

Ouch.  It should not have been; I made a mistake while rebasing the
patches, because the target dir in libc.install needs to be set to
RTLDDIR, not to /lib.

 [...]
 @@ -384,6 +404,13 @@ fi
  #DEBHELPER#
  
  if [ -n $preversion ]; then
 +if test -L /lib64; then
 +case ${DPKG_MAINTSCRIPT_ARCH:-$(dpkg --print-architecture)} in
 +amd64 | ppc64 | sparc64 | s390x)
 +remove_lib64_symlink ;;
 +esac
 +fi

 If DPKG_MAINTSCRIPT_ARCH isn't set for some reason, this gives the
 wrong value.  Would it be possible to introduce a variable in
 debian/rules.d/debhelper.mk so the right value can be cooked in at
 build time?

Probably, but I guess it does not matter in practice.
DPKG_MAINTSCRIPT_ARCH is exported by dpkg since 1.15.4, and old dpkg
versions don't support multiarch so you have to do something totally
weird to install a foreign libc6.

 It would be more prudent to prevent the downgrade from happening, but
 if we fail the prerm script, the one from the previous version kicks
 in and succeeds.

 Fixed by dpkg commit 9d3ec0f5 (“dpkg: do not fallback to new-prerm
 failed-upgrade for downgrades”).  Probably that's too new to count
 on.

Ah, I wasn't aware of that.  Still, adding a Pre-Depends on dpkg 1.16.1
on the affected arches is probably not a good idea.

 +#Downgrading from a version with a /lib64 directory to a version with
 +# a /lib64 symlink is extremely dangerous.  We need to blow away the
 +# directory and restore the symlink, otherwise the dynamic linker gets
 +# lost after unpacking the replacing version.
 +
 +ldfile=$(readlink -e RTLD_SO)
 +# Test if libc is of the same architecture as coreutils
 +# If not, they almost surely have a multiarch system and we can use
 +# the native ELF interpreter
 +if ! $ldfile /bin/true 2/dev/null; then
 +interpreter=
 +else
 +interpreter=$ldfile
 +fi
 +
 +# sync before and after the operation to reduce the danger of hosing
 +# the system
 +sync
 +rm -rf /lib64
 +$interpreter /bin/ln -s /lib /lib64

 Maybe it would be possible to mv /lib64 somewhere and loudly let the
 admin know about it if it contains anything more than the dynamic
 linker.

Good idea.  Something like that:

  aside=$(mktemp -d /lib64-moved-by-libc6-prerm.XX)
  echo Moving /lib64 aside to $aside
  mv /lib64 $aside


I have some private undertakings tomorrow, will likely send a new patch
series on Monday, unless somebody beats me to it.

Cheers,
   Sven

-- 
I still say /lib64 is one of the nastiest pieces of shit I've ever
heard of.
-- Branden Robinson




-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/874o1lroz5@turtle.gmx.de