summaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authortez <tez@pkgsrc.org>2010-12-15 20:37:38 +0000
committertez <tez@pkgsrc.org>2010-12-15 20:37:38 +0000
commitf11d754ff157c50cee1a3f91f39c2803134c5360 (patch)
tree97d866a5fa043eceec31f98e5da67cc0716d93fc /archivers
parent5b1f30e57f7f6b2f3776d40dc723b8330792181c (diff)
downloadpkgsrc-f11d754ff157c50cee1a3f91f39c2803134c5360.tar.gz
Fix bug with --one-file-system --listed-incremental (used by amanda)
per: http://www.mail-archive.com/bug-tar@gnu.org/msg03019.html Pass FORCE_UNSAFE_CONFIGURE=1 in the configure env to allow building of this package as root.
Diffstat (limited to 'archivers')
-rw-r--r--archivers/gtar-base/Makefile6
-rw-r--r--archivers/gtar-base/distinfo5
-rw-r--r--archivers/gtar-base/patches/patch-al16
-rw-r--r--archivers/gtar-base/patches/patch-am29
-rw-r--r--archivers/gtar-base/patches/patch-an54
5 files changed, 108 insertions, 2 deletions
diff --git a/archivers/gtar-base/Makefile b/archivers/gtar-base/Makefile
index c28ce34a830..1b92bbe7578 100644
--- a/archivers/gtar-base/Makefile
+++ b/archivers/gtar-base/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.66 2010/12/12 13:10:39 wiz Exp $
+# $NetBSD: Makefile,v 1.67 2010/12/15 20:37:38 tez Exp $
DISTNAME= tar-1.25
PKGNAME= gtar-base-1.25
+PKGREVISION= 1
SVR4_PKGNAME= gtarb
CATEGORIES= archivers
MASTER_SITES= ${MASTER_SITE_GNU:=tar/}
@@ -40,6 +41,9 @@ CONFIGURE_ARGS+= --program-prefix=${GTAR_PROGRAM_PREFIX:Q}
# lie to configure about gettext -- it does not need GNU gettext
CONFIGURE_ENV+= gt_cv_func_gnugettext2_libintl=yes
+# allow configure to run as root
+CONFIGURE_ENV+= FORCE_UNSAFE_CONFIGURE=1
+
PLIST_SUBST+= GTAR_PROGRAM_PREFIX=${GTAR_PROGRAM_PREFIX:Q}
BUILD_DEFS+= GNU_PROGRAM_PREFIX
BUILD_DEFS+= GTAR_PROGRAM_PREFIX
diff --git a/archivers/gtar-base/distinfo b/archivers/gtar-base/distinfo
index b682f3050d1..ef84bd8fe3a 100644
--- a/archivers/gtar-base/distinfo
+++ b/archivers/gtar-base/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.26 2010/12/12 13:10:39 wiz Exp $
+$NetBSD: distinfo,v 1.27 2010/12/15 20:37:38 tez Exp $
SHA1 (tar-1.25.tar.gz) = 28bcf4cfcb32805afead8a6259158064d96359fb
RMD160 (tar-1.25.tar.gz) = 8013ed400958cc8e9d605f5541e52e413bf878dc
@@ -7,3 +7,6 @@ SHA1 (patch-aa) = 976d0caa9dd67c04a3c1b40ca5d5bea91bc9fcdf
SHA1 (patch-ab) = fcfa62f76b3ed3a0297962c39ae0de96e335e330
SHA1 (patch-ad) = 5573bd0e8aaf71b8a23d8b031c61b48c97b3fa97
SHA1 (patch-af) = 826a3c60c6f5734c87c64c53970d4ae956d51767
+SHA1 (patch-al) = 53056a3b20a40aac0e04a1137856c5b47a7d6e0c
+SHA1 (patch-am) = aec3b1496c227a64b098d0f3666ff9be4e4b10b5
+SHA1 (patch-an) = 75c83efad6f197e82b9f1966c1034c393e749930
diff --git a/archivers/gtar-base/patches/patch-al b/archivers/gtar-base/patches/patch-al
new file mode 100644
index 00000000000..68f99944cda
--- /dev/null
+++ b/archivers/gtar-base/patches/patch-al
@@ -0,0 +1,16 @@
+$NetBSD: patch-al,v 1.1 2010/12/15 20:37:38 tez Exp $
+
+fix bug with --one-file-system --listed-incremental
+(used by amanda)
+
+--- src/create.c.orig 2010-12-15 13:53:21.658522400 -0600
++++ src/create.c 2010-12-15 13:55:08.938651400 -0600
+@@ -1680,7 +1680,7 @@
+ This check is omitted if incremental_option is set *and* the
+ requested file is not explicitely listed in the command line. */
+
+- if (!(incremental_option && !is_individual_file (p))
++ if (! (incremental_option && ! top_level)
+ && !S_ISDIR (st->stat.st_mode)
+ && OLDER_TAR_STAT_TIME (*st, m)
+ && (!after_date_option || OLDER_TAR_STAT_TIME (*st, c)))
diff --git a/archivers/gtar-base/patches/patch-am b/archivers/gtar-base/patches/patch-am
new file mode 100644
index 00000000000..98a484cfedd
--- /dev/null
+++ b/archivers/gtar-base/patches/patch-am
@@ -0,0 +1,29 @@
+$NetBSD: patch-am,v 1.1 2010/12/15 20:37:38 tez Exp $
+
+fix bug with --one-file-system --listed-incremental
+(used by amanda)
+
+--- src/incremen.c.orig 2010-12-15 13:53:32.763202200 -0600
++++ src/incremen.c 2010-12-15 13:57:33.751064600 -0600
+@@ -426,7 +426,6 @@
+ {
+ struct directory *directory;
+ struct stat *stat_data = &st->stat;
+- dev_t device = st->parent ? st->parent->stat.st_dev : 0;
+ bool nfs = NFS_FILE_STAT (*stat_data);
+
+ if ((directory = find_directory (name_buffer)) != NULL)
+@@ -540,11 +539,8 @@
+ }
+ }
+
+- /* If the directory is on another device and --one-file-system was given,
+- omit it... */
+- if (one_file_system_option && device != stat_data->st_dev
+- /* ... except if it was explicitely given in the command line */
+- && !is_individual_file (name_buffer))
++ if (one_file_system_option && st->parent
++ && stat_data->st_dev != st->parent->stat.st_dev)
+ /* FIXME:
+ WARNOPT (WARN_XDEV,
+ (0, 0,
diff --git a/archivers/gtar-base/patches/patch-an b/archivers/gtar-base/patches/patch-an
new file mode 100644
index 00000000000..059e4bba2f8
--- /dev/null
+++ b/archivers/gtar-base/patches/patch-an
@@ -0,0 +1,54 @@
+$NetBSD: patch-an,v 1.1 2010/12/15 20:37:38 tez Exp $
+
+fix bug with --one-file-system --listed-incremental
+(used by amanda)
+
+--- src/names.c.orig 2010-10-24 13:07:55.000000000 -0500
++++ src/names.c 2010-12-15 14:17:10.636670200 -0600
+@@ -47,8 +47,6 @@
+ static uid_t cached_no_such_uid;
+ static gid_t cached_no_such_gid;
+
+-static void register_individual_file (char const *name);
+-
+ /* Given UID, find the corresponding UNAME. */
+ void
+ uid_to_uname (uid_t uid, char **uname)
+@@ -360,8 +358,6 @@
+ {
+ if (unquote_option)
+ unquote_string (name_buffer);
+- if (incremental_option)
+- register_individual_file (name_buffer);
+ entry.type = ep->type;
+ entry.v.name = name_buffer;
+ return &entry;
+@@ -1152,28 +1148,6 @@
+ return excluded_file_name (excluded, name + FILE_SYSTEM_PREFIX_LEN (name));
+ }
+
+-static Hash_table *individual_file_table;
+-
+-static void
+-register_individual_file (char const *name)
+-{
+- struct stat st;
+-
+- if (deref_stat (name, &st) != 0)
+- return; /* Will be complained about later */
+- if (S_ISDIR (st.st_mode))
+- return;
+-
+- hash_string_insert (&individual_file_table, name);
+-}
+-
+-bool
+-is_individual_file (char const *name)
+-{
+- return hash_string_lookup (individual_file_table, name);
+-}
+-
+-
+
+ /* Return the size of the prefix of FILE_NAME that is removed after
+ stripping NUM leading file name components. NUM must be