Package: fakeroot
Version: 1.18.4-1
Severity: important
Tags: patch
Hi,
unfortunately (see #317466), in eglibc, the FTS functions are never
built with Large File Support. The below patch disables stat64 for
the wrapped fts_read() and fts_children() functions, which fixes
the following scenario at least on hurd-i386 (discovered since pax
nowadays uses/tests itself during build and thus FTBFS there):
I have no name!@exodar:~/X$ ./a.out
4096 4096 .
5842 5842 a.out
4096 4096 .
I have no name!@exodar:~/X$ fakeroot ./a.out
0 4096 .
0 5842 a.out
0 4096 .
I have no name!@exodar:~/X$ fakeroot -l
/home/tg/fakeroot-1.18.4/obj-tcp/.libs/libfakeroot-0.so ./a.out
4096 4096 .
5842 5842 a.out
4096 4096 .
This is the test programme (source for that a.out):
--- snip ---
#include <sys/types.h>
#include <sys/stat.h>
#include <err.h>
#include <fts.h>
#include <stdio.h>
char *paths[] = { ".", NULL };
int
main(void)
{
FTS *fts;
FTSENT *ftent;
struct stat sb;
if ((fts = fts_open(paths, FTS_PHYSICAL, NULL)) == NULL)
err(1, "fts_open");
while ((ftent = fts_read(fts))) {
if (lstat(ftent->fts_name, &sb) == -1)
err(1, "lstat");
printf("%llu %llu %s\n",
(unsigned long long)ftent->fts_statp->st_size,
(unsigned long long)sb.st_size,
ftent->fts_name);
}
return (0);
}
--- snap ---
This is the debdiff:
diff -Nru fakeroot-1.18.4/debian/changelog fakeroot-1.18.4/debian/changelog
--- fakeroot-1.18.4/debian/changelog 2012-06-02 18:28:12.000000000 +0000
+++ fakeroot-1.18.4/debian/changelog 2012-06-06 20:34:50.000000000 +0000
@@ -1,3 +1,11 @@
+fakeroot (1.18.4-2) UNRELEASED; urgency=low
+
+ * Disable stat64 for FTS functions in a Debian-local patch,
+ since FTS is always built without LFS in eglibc. Fixes
+ pax on hurd-i386 (at least).
+
+ -- Thorsten Glaser <[email protected]> Wed, 06 Jun 2012 20:33:31 +0000
+
fakeroot (1.18.4-1) unstable; urgency=low
* More MacOS X patches from Kyle J. McKay.
diff -Nru fakeroot-1.18.4/debian/patches/eglibc-fts-without-LFS
fakeroot-1.18.4/debian/patches/eglibc-fts-without-LFS
--- fakeroot-1.18.4/debian/patches/eglibc-fts-without-LFS 1970-01-01
00:00:00.000000000 +0000
+++ fakeroot-1.18.4/debian/patches/eglibc-fts-without-LFS 2012-06-06
20:32:29.000000000 +0000
@@ -0,0 +1,28 @@
+Index: fakeroot-1.18.4/libfakeroot.c
+===================================================================
+--- fakeroot-1.18.4.orig/libfakeroot.c 2012-06-02 18:23:41.000000000 +0000
++++ fakeroot-1.18.4/libfakeroot.c 2012-06-06 20:32:25.000000000 +0000
+@@ -1579,11 +1579,7 @@
+ r->fts_statp = NULL; /* Otherwise fts_statp may be a random pointer */
+ #endif
+ if(r && r->fts_statp) { /* Should we bother checking fts_info here? */
+-# if defined(STAT64_SUPPORT) && !defined(__APPLE__)
+- SEND_GET_STAT64(r->fts_statp, _STAT_VER);
+-# else
+ SEND_GET_STAT(r->fts_statp, _STAT_VER);
+-# endif
+ }
+
+ return r;
+@@ -1602,11 +1598,7 @@
+ first=next_fts_children(ftsp, options);
+ for(r = first; r; r = r->fts_link) {
+ if(r && r->fts_statp) { /* Should we bother checking fts_info here? */
+-# if defined(STAT64_SUPPORT) && !defined(__APPLE__)
+- SEND_GET_STAT64(r->fts_statp, _STAT_VER);
+-# else
+ SEND_GET_STAT(r->fts_statp, _STAT_VER);
+-# endif
+ }
+ }
+
diff -Nru fakeroot-1.18.4/debian/patches/series
fakeroot-1.18.4/debian/patches/series
--- fakeroot-1.18.4/debian/patches/series 2012-06-02 18:28:59.000000000
+0000
+++ fakeroot-1.18.4/debian/patches/series 2012-06-06 20:32:08.000000000
+0000
@@ -1 +1,2 @@
ugh
+eglibc-fts-without-LFS
bye,
//mirabilos
--
13:37⎜«Natureshadow» Deep inside, I hate mirabilos. I mean, he's a good
guy. But he's always right! In every fsckin' situation, he's right. Even
with his deeply perverted taste in software and borked ambition towards
broken OSes - in the end, he's damn right about it :(! […] works in mksh
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]