Package: libarchive
Severity: normal

The test failures are caused by a bug in libarchive on big-endian 64 bit
architectures, as already suspected. There indeed is an upstream fix for
it, it is in commit da058d4b1a240a3381f37f99ef9edd982e34cabc fixing the
data type of some variable passed to an ioctl call.

The failure is not related to ext3 vs. ext4, but most likely indicates
that the buildd does not use tmpfs on /tmp. The bug does not manifest
on tmpfs file systems, and the testsuite is running in a subdir of
/tmp, which can be overriden using TMPDIR. Running it with TMPDIR
set to a ext3-backed directory makes it fail on the porterbox, too.

The upstream diff from the mentioned commit is attached.

Regards,
  Michael Karcher

-- System Information:
Debian Release: 6.0.7
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-0.bpo.1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
commit da058d4b1a240a3381f37f99ef9edd982e34cabc
Author: Andreas Schwab <sch...@linux-m68k.org>
Date:   Wed Aug 29 15:41:51 2012 +0200

    Fix more uses of EXT2_IOC_[GS]ETFLAGS

diff --git a/libarchive/archive_read_disk_posix.c b/libarchive/archive_read_disk_posix.c
index 698600e..652deb9 100644
--- a/libarchive/archive_read_disk_posix.c
+++ b/libarchive/archive_read_disk_posix.c
@@ -984,7 +984,7 @@ next_entry(struct archive_read_disk *a, struct tree *t,
 #elif defined(EXT2_IOC_GETFLAGS) && defined(EXT2_NODUMP_FL) &&\
       defined(HAVE_WORKING_EXT2_IOC_GETFLAGS)
 		if (S_ISREG(st->st_mode) || S_ISDIR(st->st_mode)) {
-			unsigned long stflags;
+			int stflags;
 
 			t->entry_fd = open_on_current_dir(t,
 			    tree_current_access_path(t), O_RDONLY | O_NONBLOCK);
diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c
index d79b0f6..6b8bfde 100644
--- a/libarchive/archive_write_disk_posix.c
+++ b/libarchive/archive_write_disk_posix.c
@@ -2403,8 +2403,8 @@ set_fflags_platform(struct archive_write_disk *a, int fd, const char *name,
 {
 	int		 ret;
 	int		 myfd = fd;
-	unsigned long newflags, oldflags;
-	unsigned long sf_mask = 0;
+	int newflags, oldflags;
+	int sf_mask = 0;
 
 	if (set == 0  && clear == 0)
 		return (ARCHIVE_OK);

Reply via email to