Re: fakechroot bugginess on squeeze

2011-04-01 Thread Adam D. Barratt
On Wed, March 30, 2011 16:47, Daniel Kahn Gillmor wrote:
 On 03/30/2011 09:50 AM, Adam D. Barratt wrote:

 Please go ahead, with the exception of doing s/unstable/stable/ in the
 changelog stanza. :-)

 OK, i've uploaded, with a correct changelog.  Thanks for noticing that!

 Please let me know if there's anything else that i need to do; i've
 never put a package into a point release before.

It all looks good; thanks.  I flagged the package for acceptance in to p-u
earlier this evening, and it's already built on most architectures.

Regards,

Adam


-- 
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/8971d4b5c60dc75bd97171f4775b5ba0.squir...@adsl.funky-badger.org



Re: fakechroot bugginess on squeeze

2011-03-30 Thread Adam D. Barratt
On Tue, 2011-03-29 at 04:00 -0400, Daniel Kahn Gillmor wrote:
 debootstrap --variant=fakechroot does not currently work on squeeze.
 It fails with error messages like:
 
  W: Failure while unpacking required packages.  This will be attempted up to 
  five times.
 
 
 These errors appear to be due to two distinct bugs: #561991 and #588508

It's a shame that neither of those are already resolved in Squeeze,
given when the fixes were uploaded.

 Maybe a targeted patch of these two bugs in fakechroot is a good
 candidate for the next point release of squeeze?
 
 I'm attaching a debdiff against what is currently in stable (2.9-1.1).

Please go ahead, with the exception of doing s/unstable/stable/ in the
changelog stanza. :-)

Regards,

Adam


-- 
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1301493025.12508.2617.ca...@hathi.jungle.funky-badger.org



Re: fakechroot bugginess on squeeze

2011-03-30 Thread Daniel Kahn Gillmor
On 03/30/2011 09:50 AM, Adam D. Barratt wrote:

 Please go ahead, with the exception of doing s/unstable/stable/ in the
 changelog stanza. :-)

OK, i've uploaded, with a correct changelog.  Thanks for noticing that!

Please let me know if there's anything else that i need to do; i've
never put a package into a point release before.

Regards,

--dkg



signature.asc
Description: OpenPGP digital signature


fakechroot bugginess on squeeze

2011-03-29 Thread Daniel Kahn Gillmor
debootstrap --variant=fakechroot does not currently work on squeeze.
It fails with error messages like:

 W: Failure while unpacking required packages.  This will be attempted up to 
 five times.


These errors appear to be due to two distinct bugs: #561991 and #588508

Maybe a targeted patch of these two bugs in fakechroot is a good
candidate for the next point release of squeeze?

I'm attaching a debdiff against what is currently in stable (2.9-1.1).

i tested this as a non-privileged user on an i386 squeeze environment with:

mkdir root
PATH=/sbin:/usr/sbin:$PATH fakeroot \
  -i $(pwd)/fakeroot.state \
  -s $(pwd)/fakeroot.state \
  fakechroot \
debootstrap --variant=fakechroot squeeze root

Without these patches applied, the base fakechroot does not succeed.
With these patches applied, it completes successfully.

I also tried fixing only one bug or the other, but debootstrap failed to
complete without both fixes together, so i think they are both necessary.

I ran into these bugs while building debirf images.  It would be nice
for users of debian stable to not have to use a backported fakechroot
for debirf.

I do not believe these fixes have any adverse affect on other uses of
fakechroot.

Is there anything else you need from me in order to consider this
request for a future point release?

Regards,

--dkg

PS i am not subscribed to debian-release -- please CC me on replies.
thanks!
diff -u fakechroot-2.9/configure.ac fakechroot-2.9/configure.ac
--- fakechroot-2.9/configure.ac
+++ fakechroot-2.9/configure.ac
@@ -172,6 +172,7 @@
 unlinkat \
 ulckpwdf \
 utime \
+utimensat \
 utimes \
 ])
 
diff -u fakechroot-2.9/config.h.in fakechroot-2.9/config.h.in
--- fakechroot-2.9/config.h.in
+++ fakechroot-2.9/config.h.in
@@ -368,6 +368,9 @@
 /* Define to 1 if you have the `utimes' function. */
 #undef HAVE_UTIMES
 
+/* Define to 1 if you have the `utimensat' function. */
+#undef HAVE_UTIMENSAT
+
 /* Define to 1 if you have the utime.h header file. */
 #undef HAVE_UTIME_H
 
diff -u fakechroot-2.9/configure fakechroot-2.9/configure
--- fakechroot-2.9/configure
+++ fakechroot-2.9/configure
@@ -12458,6 +12458,7 @@
 unlinkat \
 ulckpwdf \
 utime \
+utimensat \
 utimes \
 
 do :
diff -u fakechroot-2.9/src/libfakechroot.c fakechroot-2.9/src/libfakechroot.c
--- fakechroot-2.9/src/libfakechroot.c
+++ fakechroot-2.9/src/libfakechroot.c
@@ -543,6 +543,9 @@
 /* static int (*next_ulckpwdf) (void) = NULL; */
 #endif
 static int (*next_utime) (const char *filename, const struct utimbuf *buf) 
= NULL;
+#ifdef HAVE_UTIMENSAT
+static int (*next_utimensat) (int dirfd, const char *pathname, const 
struct timespec times[2], int flags) = NULL;
+#endif
 static int (*next_utimes) (const char *filename, const struct timeval 
tv[2]) = NULL;
 
 
@@ -821,6 +824,9 @@
 /*nextsym(ulckpwdf, ulckpwdf); */
 #endif
 nextsym(utime, utime);
+#ifdef HAVE_UTIMENSAT
+nextsym(utimensat, utimensat);
+#endif
 nextsym(utimes, utimes);
 }
 
@@ -896,10 +902,19 @@
 /* #include unistd.h */
 int __lxstat (int ver, const char *filename, struct stat *buf)
 {
-char *fakechroot_path, *fakechroot_ptr, fakechroot_buf[FAKECHROOT_MAXPATH];
+char *fakechroot_path, *fakechroot_ptr, 
fakechroot_buf[FAKECHROOT_MAXPATH], tmp[FAKECHROOT_MAXPATH];
+int retval;
+READLINK_TYPE_RETURN status;
+const char* orig;
+orig = filename;
 expand_chroot_path(filename, fakechroot_path, fakechroot_ptr, 
fakechroot_buf);
 if (next___lxstat == NULL) fakechroot_init();
-return next___lxstat(ver, filename, buf);
+retval = next___lxstat(ver, filename, buf);
+/* deal with http://bugs.debian.org/561991 */
+if ((buf-st_mode  S_IFMT) == S_IFLNK)
+  if ((status = readlink(orig, tmp, sizeof(tmp)-1)) != -1)
+buf-st_size = status;
+return retval;
 }
 #endif
 
@@ -909,10 +924,19 @@
 /* #include unistd.h */
 int __lxstat64 (int ver, const char *filename, struct stat64 *buf)
 {
-char *fakechroot_path, *fakechroot_ptr, fakechroot_buf[FAKECHROOT_MAXPATH];
+char *fakechroot_path, *fakechroot_ptr, 
fakechroot_buf[FAKECHROOT_MAXPATH], tmp[FAKECHROOT_MAXPATH];
+int retval;
+READLINK_TYPE_RETURN status;
+const char* orig;
+orig = filename;
 expand_chroot_path(filename, fakechroot_path, fakechroot_ptr, 
fakechroot_buf);
 if (next___lxstat64 == NULL) fakechroot_init();
-return next___lxstat64(ver, filename, buf);
+retval = next___lxstat64(ver, filename, buf);
+/* deal with http://bugs.debian.org/561991 */
+if ((buf-st_mode  S_IFMT) == S_IFLNK)
+  if ((status = readlink(orig, tmp, sizeof(tmp)-1)) != -1)
+buf-st_size = status;
+return retval;
 }
 #endif
 
@@ -2158,10 +2182,19 @@
 /* #include unistd.h */
 int lstat (const char *file_name, struct stat *buf)
 {
-char *fakechroot_path, *fakechroot_ptr, fakechroot_buf[FAKECHROOT_MAXPATH];
+char *fakechroot_path, *fakechroot_ptr, 
fakechroot_buf[FAKECHROOT_MAXPATH], tmp[FAKECHROOT_MAXPATH];
+