Package: libarchive
Version: 2.6.2-1
Severity: important
Tags: patch


Coin,

Please consider applying these two small patches fixing mistakes which break the build on Hurd. Relying on PATH_MAX being defined is an important POSIX incompatibility, the first patch fixes it (even if a dynamic allocation would be better, but would need major changes in the code). The second patch is a bit more specific, to ensure using the BSD nodump flag only when defined (as the HAVE_STRUCT_STAT_ST_FLAGS test seems not to be enough).

Regards.

--
Marc Dequènes (Duck)
diff -Nur orig/libarchive-2.6.2/debian/changelog libarchive-2.6.2/debian/changelog
--- orig/libarchive-2.6.2/debian/changelog	2009-05-23 23:43:08.000000000 +0200
+++ libarchive-2.6.2/debian/changelog	2009-05-23 23:15:12.000000000 +0200
@@ -1,3 +1,13 @@
+libarchive (2.6.2-1+hurdfr1) unreleased; urgency=low
+
+  * Added 'posixness_fix' to fix POSIX incompatibilities causing FTBFS
+    on Hurd.
+  * Added 'detect_nodump_flag_better' patch to ensure the BSD nodump
+    flag is not used if not defined (this code was unfortunately
+    compiled on Hurd and failed).
+
+ -- Marc Dequènes (Duck) <d...@hurdfr.org>  Sat, 23 May 2009 23:15:06 +0200
+
 libarchive (2.6.2-1) unstable; urgency=low
 
   * New Upstream Version.  Closes: #516577.
diff -Nur orig/libarchive-2.6.2/debian/patches/detect_nodump_flag_better libarchive-2.6.2/debian/patches/detect_nodump_flag_better
--- orig/libarchive-2.6.2/debian/patches/detect_nodump_flag_better	1970-01-01 01:00:00.000000000 +0100
+++ libarchive-2.6.2/debian/patches/detect_nodump_flag_better	2009-05-23 22:59:38.000000000 +0200
@@ -0,0 +1,17 @@
+Index: libarchive-2.6.2/tar/write.c
+===================================================================
+--- libarchive-2.6.2.orig/tar/write.c	2009-05-23 22:57:37.000000000 +0200
++++ libarchive-2.6.2/tar/write.c	2009-05-23 22:59:34.000000000 +0200
+@@ -712,10 +712,12 @@
+ 		 * honoring such flags, skip this file/dir.
+ 		 */
+ #ifdef HAVE_STRUCT_STAT_ST_FLAGS
++#  if defined(UF_NODUMP)
+ 		/* BSD systems store flags in struct stat */
+ 		if (bsdtar->option_honor_nodump &&
+ 		    (lst->st_flags & UF_NODUMP))
+ 			continue;
++#  endif
+ #endif
+ 
+ #if defined(EXT2_IOC_GETFLAGS) && defined(EXT2_NODUMP_FL)
diff -Nur orig/libarchive-2.6.2/debian/patches/posixness_fix libarchive-2.6.2/debian/patches/posixness_fix
--- orig/libarchive-2.6.2/debian/patches/posixness_fix	1970-01-01 01:00:00.000000000 +0100
+++ libarchive-2.6.2/debian/patches/posixness_fix	2009-05-23 22:50:29.000000000 +0200
@@ -0,0 +1,45 @@
+Index: libarchive-2.6.2/contrib/shar/tree.h
+===================================================================
+--- libarchive-2.6.2.orig/contrib/shar/tree.h	2009-05-23 22:47:10.000000000 +0200
++++ libarchive-2.6.2/contrib/shar/tree.h	2009-05-23 22:48:21.000000000 +0200
+@@ -45,6 +45,10 @@
+ 
+ #include <sys/stat.h>
+ #include <stdio.h>
++ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
+ 
+ struct tree;
+ 
+Index: libarchive-2.6.2/libarchive/archive_write_disk.c
+===================================================================
+--- libarchive-2.6.2.orig/libarchive/archive_write_disk.c	2009-05-23 22:49:26.000000000 +0200
++++ libarchive-2.6.2/libarchive/archive_write_disk.c	2009-05-23 22:49:36.000000000 +0200
+@@ -88,6 +88,10 @@
+ #include "archive_string.h"
+ #include "archive_entry.h"
+ #include "archive_private.h"
++ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
+ 
+ #ifndef O_BINARY
+ #define O_BINARY 0
+Index: libarchive-2.6.2/tar/tree.h
+===================================================================
+--- libarchive-2.6.2.orig/tar/tree.h	2009-05-23 22:48:52.000000000 +0200
++++ libarchive-2.6.2/tar/tree.h	2009-05-23 22:48:58.000000000 +0200
+@@ -44,6 +44,10 @@
+ 
+ #include <sys/stat.h>
+ #include <stdio.h>
++ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
+ 
+ struct tree;
+ 
diff -Nur orig/libarchive-2.6.2/debian/patches/series libarchive-2.6.2/debian/patches/series
--- orig/libarchive-2.6.2/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ libarchive-2.6.2/debian/patches/series	2009-05-23 22:57:27.000000000 +0200
@@ -0,0 +1,2 @@
+posixness_fix
+detect_nodump_flag_better
diff -Nur orig/libarchive-2.6.2/debian/rules libarchive-2.6.2/debian/rules
--- orig/libarchive-2.6.2/debian/rules	2009-05-23 23:43:08.000000000 +0200
+++ libarchive-2.6.2/debian/rules	2009-05-23 21:48:59.000000000 +0200
@@ -9,6 +9,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/quilt/quilt.make
 
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
@@ -49,7 +50,7 @@
 
 build-indep:
 build-arch: build-stamp
-build-stamp:  config.status
+build-stamp: config.status $(QUILT_STAMPFN)
 	dh_testdir
 
 	# Add here commands to compile the package.
@@ -60,7 +61,7 @@
 
 	touch build-stamp
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp 

Attachment: pgpk3OZQ3qhiB.pgp
Description: PGP Digital Signature

Reply via email to