diff options
author | Christian Weisgerber <naddy@FreeBSD.org> | 2006-11-14 14:44:21 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@FreeBSD.org> | 2006-11-14 14:44:21 +0000 |
commit | ab615e2700ac547290303d9a1bc5589e7f6a798c (patch) | |
tree | c527d5cf1b2af95f37d1a506c1aae1dea0cbec27 /archivers/gtar/files | |
parent | b25e0162cf179100d4d5b4e36597ea43387f5d7a (diff) | |
download | ports-ab615e2700ac547290303d9a1bc5589e7f6a798c.tar.gz ports-ab615e2700ac547290303d9a1bc5589e7f6a798c.zip |
Notes
Diffstat (limited to 'archivers/gtar/files')
-rw-r--r-- | archivers/gtar/files/patch-configure | 36 | ||||
-rw-r--r-- | archivers/gtar/files/patch-lib_Makefile.in | 2 | ||||
-rw-r--r-- | archivers/gtar/files/patch-src::compare.c | 14 | ||||
-rw-r--r-- | archivers/gtar/files/patch-src::create.c | 14 | ||||
-rw-r--r-- | archivers/gtar/files/patch-src_tar.c | 17 | ||||
-rw-r--r-- | archivers/gtar/files/patch-src_xheader.c | 135 | ||||
-rw-r--r-- | archivers/gtar/files/patch-tests_testsuite | 140 |
7 files changed, 159 insertions, 199 deletions
diff --git a/archivers/gtar/files/patch-configure b/archivers/gtar/files/patch-configure index 1e56c813bcdf..7433429dddca 100644 --- a/archivers/gtar/files/patch-configure +++ b/archivers/gtar/files/patch-configure @@ -3,21 +3,21 @@ $FreeBSD$ --- configure.orig +++ configure -@@ -25114,7 +25114,7 @@ - s,@PU_RMT_PROG@,$PU_RMT_PROG,;t t - s,@DEFAULT_RMT_DIR@,$DEFAULT_RMT_DIR,;t t - s,@DEFAULT_RMT_COMMAND@,$DEFAULT_RMT_COMMAND,;t t --s,@LIBICONV@,$LIBICONV,;t t -+s,@LIBICONV@,$LTLIBICONV,;t t - s,@LTLIBICONV@,$LTLIBICONV,;t t - s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t - s,@USE_NLS@,$USE_NLS,;t t -@@ -25123,7 +25123,7 @@ - s,@XGETTEXT@,$XGETTEXT,;t t - s,@MSGMERGE@,$MSGMERGE,;t t - s,@INTLLIBS@,$INTLLIBS,;t t --s,@LIBINTL@,$LIBINTL,;t t -+s,@LIBINTL@,$LTLIBINTL,;t t - s,@LTLIBINTL@,$LTLIBINTL,;t t - s,@POSUB@,$POSUB,;t t - s,@AUTOM4TE@,$AUTOM4TE,;t t +@@ -40036,7 +40036,7 @@ + DEFAULT_ARCHIVE!$DEFAULT_ARCHIVE$ac_delim + DEFAULT_BLOCKING!$DEFAULT_BLOCKING$ac_delim + DEFAULT_QUOTING_STYLE!$DEFAULT_QUOTING_STYLE$ac_delim +-LIBICONV!$LIBICONV$ac_delim ++LIBICONV!$LTLIBICONV$ac_delim + LTLIBICONV!$LTLIBICONV$ac_delim + USE_NLS!$USE_NLS$ac_delim + MSGFMT!$MSGFMT$ac_delim +@@ -40048,7 +40048,7 @@ + MSGMERGE!$MSGMERGE$ac_delim + INTL_MACOSX_LIBS!$INTL_MACOSX_LIBS$ac_delim + INTLLIBS!$INTLLIBS$ac_delim +-LIBINTL!$LIBINTL$ac_delim ++LIBINTL!$LTLIBINTL$ac_delim + LTLIBINTL!$LTLIBINTL$ac_delim + POSUB!$POSUB$ac_delim + AUTOM4TE!$AUTOM4TE$ac_delim diff --git a/archivers/gtar/files/patch-lib_Makefile.in b/archivers/gtar/files/patch-lib_Makefile.in index e00d9917315c..463b9a8fe2bb 100644 --- a/archivers/gtar/files/patch-lib_Makefile.in +++ b/archivers/gtar/files/patch-lib_Makefile.in @@ -3,7 +3,7 @@ $FreeBSD$ --- lib/Makefile.in.orig +++ lib/Makefile.in -@@ -720,7 +720,7 @@ +@@ -938,7 +938,7 @@ install-data-am: diff --git a/archivers/gtar/files/patch-src::compare.c b/archivers/gtar/files/patch-src::compare.c deleted file mode 100644 index 6252f1f4bdcc..000000000000 --- a/archivers/gtar/files/patch-src::compare.c +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- src/compare.c.orig Sun Apr 4 11:53:30 2004 -+++ src/compare.c Thu Apr 22 17:50:16 2004 -@@ -327,7 +327,7 @@ - size_t len = strlen (current_stat_info.link_name); - char *linkbuf = alloca (len + 1); - -- status = readlink (current_stat_info.file_name, linkbuf, len + 1); -+ status = readlink (current_stat_info.file_name, linkbuf, len); - - if (status < 0) - { diff --git a/archivers/gtar/files/patch-src::create.c b/archivers/gtar/files/patch-src::create.c deleted file mode 100644 index 1dc168a8f691..000000000000 --- a/archivers/gtar/files/patch-src::create.c +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- src/create.c.orig Thu Apr 22 17:51:04 2004 -+++ src/create.c Thu Apr 22 17:51:24 2004 -@@ -1408,7 +1408,7 @@ - if (linklen != stat->stat.st_size || linklen + 1 == 0) - xalloc_die (); - buffer = (char *) alloca (linklen + 1); -- size = readlink (p, buffer, linklen + 1); -+ size = readlink (p, buffer, linklen); - if (size < 0) - { - readlink_diag (p); diff --git a/archivers/gtar/files/patch-src_tar.c b/archivers/gtar/files/patch-src_tar.c deleted file mode 100644 index f6b4dc8039dc..000000000000 --- a/archivers/gtar/files/patch-src_tar.c +++ /dev/null @@ -1,17 +0,0 @@ - -$FreeBSD$ - ---- src/tar.c.orig -+++ src/tar.c -@@ -617,9 +617,9 @@ - - switch (key) - { -- case 1: -+ case ARGP_KEY_ARG: - /* File name or non-parsed option, because of ARGP_IN_ORDER */ -- name_add (optarg); -+ name_add (arg); - args->input_files++; - break; - diff --git a/archivers/gtar/files/patch-src_xheader.c b/archivers/gtar/files/patch-src_xheader.c deleted file mode 100644 index 2be06865c657..000000000000 --- a/archivers/gtar/files/patch-src_xheader.c +++ /dev/null @@ -1,135 +0,0 @@ - -$FreeBSD$ - ---- src/xheader.c.orig -+++ src/xheader.c -@@ -32,6 +32,10 @@ - - #include <fnmatch.h> - -+#ifndef SIZE_MAX -+# define SIZE_MAX ((size_t) -1) -+#endif -+ - static bool xheader_protected_pattern_p (char const *pattern); - static bool xheader_protected_keyword_p (char const *keyword); - static void xheader_set_single_keyword (char *) __attribute__ ((noreturn)); -@@ -783,6 +787,32 @@ - xheader_print (xhdr, keyword, sbuf); - } - -+static bool -+decode_num (uintmax_t *num, char const *arg, uintmax_t maxval, -+ char const *keyword) -+{ -+ uintmax_t u; -+ char *arg_lim; -+ -+ if (! (ISDIGIT (*arg) -+ && (errno = 0, u = strtoumax (arg, &arg_lim, 10), !*arg_lim))) -+ { -+ ERROR ((0, 0, _("Malformed extended header: invalid %s=%s"), -+ keyword, arg)); -+ return false; -+ } -+ -+ if (! (u <= maxval && errno != ERANGE)) -+ { -+ ERROR ((0, 0, _("Extended header %s=%s is out of range"), -+ keyword, arg)); -+ return false; -+ } -+ -+ *num = u; -+ return true; -+} -+ - static void - dummy_coder (struct tar_stat_info const *st __attribute__ ((unused)), - char const *keyword __attribute__ ((unused)), -@@ -821,7 +851,7 @@ - gid_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, TYPE_MAXIMUM (gid_t), "gid")) - st->stat.st_gid = u; - } - -@@ -903,7 +933,7 @@ - size_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "size")) - st->archive_file_size = st->stat.st_size = u; - } - -@@ -918,7 +948,7 @@ - uid_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, TYPE_MAXIMUM (uid_t), "uid")) - st->stat.st_uid = u; - } - -@@ -946,7 +976,7 @@ - sparse_size_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.size")) - st->stat.st_size = u; - } - -@@ -962,10 +992,10 @@ - sparse_numblocks_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numblocks")) - { - st->sparse_map_size = u; -- st->sparse_map = calloc(st->sparse_map_size, sizeof(st->sparse_map[0])); -+ st->sparse_map = xcalloc (u, sizeof st->sparse_map[0]); - st->sparse_map_avail = 0; - } - } -@@ -982,8 +1012,14 @@ - sparse_offset_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.offset")) -+ { -+ if (st->sparse_map_avail < st->sparse_map_size) - st->sparse_map[st->sparse_map_avail].offset = u; -+ else -+ ERROR ((0, 0, _("Malformed extended header: excess %s=%s"), -+ "GNU.sparse.offset", arg)); -+ } - } - - static void -@@ -998,15 +1034,13 @@ - sparse_numbytes_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numbytes")) - { - if (st->sparse_map_avail == st->sparse_map_size) -- { -- st->sparse_map_size *= 2; -- st->sparse_map = xrealloc (st->sparse_map, -- st->sparse_map_size -- * sizeof st->sparse_map[0]); -- } -+ st->sparse_map = x2nrealloc (st->sparse_map, -+ &st->sparse_map_size, -+ sizeof st->sparse_map[0]); -+ - st->sparse_map[st->sparse_map_avail++].numbytes = u; - } - } diff --git a/archivers/gtar/files/patch-tests_testsuite b/archivers/gtar/files/patch-tests_testsuite new file mode 100644 index 000000000000..c8b8b1cd6950 --- /dev/null +++ b/archivers/gtar/files/patch-tests_testsuite @@ -0,0 +1,140 @@ + +$FreeBSD$ + +--- tests/testsuite.orig ++++ tests/testsuite +@@ -20582,7 +20582,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20608,7 +20608,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20630,7 +20630,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20669,7 +20669,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20695,7 +20695,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20717,7 +20717,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20756,7 +20756,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20782,7 +20782,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20804,7 +20804,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20843,7 +20843,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20869,7 +20869,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20891,7 +20891,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20930,7 +20930,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20956,7 +20956,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null +@@ -20978,7 +20978,7 @@ + + mkdir directory + (cd directory && touch a b c d e f g h i j k l m n o p q r) +-tar -c -b 1 directory | tar -t -f - >/dev/null ++tar -c -b 1 -f - directory | tar -t -f - >/dev/null| tar -t -f - >/dev/null + tar -c -b 1 -f archive directory + tar -t -f archive >/dev/null + tar -t -f - < archive >/dev/null |