update to 1.24: various bug fixes, no major changes

This commit is contained in:
naddy 2010-10-28 13:50:30 +00:00
parent 16d19cb348
commit f59334ed04
11 changed files with 96 additions and 234 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.55 2010/07/13 12:45:49 sebastia Exp $
# $OpenBSD: Makefile,v 1.56 2010/10/28 13:50:30 naddy Exp $
COMMENT= GNU version of the traditional tape archiver
DISTNAME= tar-1.23
DISTNAME= tar-1.24
PKGNAME= g${DISTNAME}
CATEGORIES= archivers
HOMEPAGE= http://www.gnu.org/software/tar/
@ -16,7 +16,11 @@ PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${MASTER_SITE_GNU:=tar/}
EXTRACT_SUFX= .tar.bz2
EXTRACT_SUFX= .tar.xz
BUILD_DEPENDS= ::archivers/xz
EXTRACT_CASES= *.tar.xz) \
${LOCALBASE}/bin/xz -dc ${FULLDISTDIR}/$$archive | ${TAR} xf -;;
MODULES= devel/gettext
# only force dependencies for compressors that have a single-letter option
@ -34,7 +38,6 @@ MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/build-aux
FLAVORS= static
FLAVOR?=
REVISION = 1
.if ${FLAVOR:L:Mstatic}
LDSTATIC= -static
MODULES=
@ -45,6 +48,8 @@ LDSTATIC=
WANTLIB= c
.endif
# Tests 34, 53 are known to fail because getcwd(3) fails if the
# parent directory is unreadable.
REGRESS_DEPENDS=:autoconf-2.63:devel/autoconf/2.63
REGRESS_FLAGS= AUTOCONF_VERSION=2.63

View File

@ -1,5 +1,5 @@
MD5 (tar-1.23.tar.bz2) = QeLKS5JOx4YOUbQ60Gzbfg==
RMD160 (tar-1.23.tar.bz2) = 55Bit/adgLc0RFMG9p+4uWgB6Qk=
SHA1 (tar-1.23.tar.bz2) = bzsUQ6AZ2gLk7CChRG1KpUtIgHE=
SHA256 (tar-1.23.tar.bz2) = yTKDctti+7HZTJ5OPO/JYREa9G3kcIW2NTWcAKDuvjY=
SIZE (tar-1.23.tar.bz2) = 2189324
MD5 (tar-1.24.tar.xz) = 3rrkQ95+HGHNJMLVO8pQxg==
RMD160 (tar-1.24.tar.xz) = 1cBnDy153qPI4+jZTTPfQH3IFTs=
SHA1 (tar-1.24.tar.xz) = ynlri76Xaz/TdipL1lJATRNlDnI=
SHA256 (tar-1.24.tar.xz) = WcSjj3b1SeqLwTC0f0HRKzIvCHsN2jnzIKjbHWjANe4=
SIZE (tar-1.24.tar.xz) = 1763448

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-configure,v 1.10 2010/03/28 18:35:01 naddy Exp $
--- configure.orig Wed Mar 10 11:52:13 2010
+++ configure Wed Mar 17 18:29:46 2010
@@ -48383,7 +48383,7 @@ fi
$OpenBSD: patch-configure,v 1.11 2010/10/28 13:50:30 naddy Exp $
--- configure.orig Sun Oct 24 23:38:00 2010
+++ configure Mon Oct 25 13:11:50 2010
@@ -51697,7 +51697,7 @@ fi
$as_echo "$acl_cv_rpath" >&6; }
wl="$acl_cv_wl"
acl_libext="$acl_cv_libext"

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-gnu_fdopendir_c,v 1.1 2010/10/28 13:50:30 naddy Exp $
--- gnu/fdopendir.c.orig Tue Oct 26 17:44:19 2010
+++ gnu/fdopendir.c Tue Oct 26 17:45:00 2010
@@ -144,6 +144,7 @@ fd_clone_opendir (int fd)
# else /* !REPLACE_FCHDIR */
/* Occupy the destination FD slot, so that save_cwd cannot hijack it. */
+ struct saved_cwd saved_cwd;
int fd_reserve = dup (fd);
if (fd_reserve < 0)
{
@@ -152,7 +153,6 @@ fd_clone_opendir (int fd)
goto fail;
}
- struct saved_cwd saved_cwd;
if (save_cwd (&saved_cwd) != 0)
openat_save_fail (errno);

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-gnu_inttostr_c,v 1.1 2010/07/13 12:45:49 sebastia Exp $
fix build on gcc-2.95 archs
--- gnu/inttostr.c.orig Tue Jul 13 09:58:20 2010
+++ gnu/inttostr.c Tue Jul 13 09:58:30 2010
@@ -32,9 +32,9 @@ char *
inttostr (inttype i, char *buf)
{
char *p = buf + INT_STRLEN_BOUND (inttype);
- *p = 0;
verify (TYPE_SIGNED (inttype) == inttype_is_signed);
+ *p = 0;
#if inttype_is_signed
if (i < 0)
{

View File

@ -1,159 +0,0 @@
$OpenBSD: patch-src_extract_c,v 1.5 2010/06/12 15:17:11 naddy Exp $
http://git.savannah.gnu.org/cgit/tar.git/commit/?id=b60e56fdb6fd8d82a1f92a4fa7781d9a3184dce1
--- src/extract.c.orig Tue Jan 26 12:28:09 2010
+++ src/extract.c Fri Jun 11 22:03:37 2010
@@ -888,12 +888,22 @@ create_placeholder_file (char *file_name, bool is_syml
struct stat st;
while ((fd = open (file_name, O_WRONLY | O_CREAT | O_EXCL, 0)) < 0)
- if (! maybe_recoverable (file_name, interdir_made))
- break;
+ {
+ switch (maybe_recoverable (file_name, interdir_made))
+ {
+ case RECOVER_OK:
+ continue;
+
+ case RECOVER_SKIP:
+ return 0;
+
+ case RECOVER_NO:
+ open_error (file_name);
+ return -1;
+ }
+ }
- if (fd < 0)
- open_error (file_name);
- else if (fstat (fd, &st) != 0)
+ if (fstat (fd, &st) != 0)
{
stat_error (file_name);
close (fd);
@@ -956,7 +966,8 @@ extract_link (char *file_name, int typeflag)
{
int interdir_made = 0;
char const *link_name;
-
+ int rc;
+
link_name = current_stat_info.link_name;
if (! absolute_names_option && contains_dot_dot (link_name))
@@ -996,8 +1007,10 @@ extract_link (char *file_name, int typeflag)
errno = e;
}
- while (maybe_recoverable (file_name, &interdir_made));
+ while ((rc = maybe_recoverable (file_name, &interdir_made)) == RECOVER_OK);
+ if (rc == RECOVER_SKIP)
+ return 0;
if (!(incremental_option && errno == EEXIST))
{
link_error (link_name, file_name);
@@ -1010,7 +1023,6 @@ static int
extract_symlink (char *file_name, int typeflag)
{
#ifdef HAVE_SYMLINK
- int status;
int interdir_made = 0;
if (! absolute_names_option
@@ -1018,16 +1030,23 @@ extract_symlink (char *file_name, int typeflag)
|| contains_dot_dot (current_stat_info.link_name)))
return create_placeholder_file (file_name, true, &interdir_made);
- while ((status = symlink (current_stat_info.link_name, file_name)))
- if (!maybe_recoverable (file_name, &interdir_made))
- break;
+ while (symlink (current_stat_info.link_name, file_name))
+ switch (maybe_recoverable (file_name, &interdir_made))
+ {
+ case RECOVER_OK:
+ continue;
+
+ case RECOVER_SKIP:
+ return 0;
+
+ case RECOVER_NO:
+ symlink_error (current_stat_info.link_name, file_name);
+ return -1;
+ }
+
+ set_stat (file_name, &current_stat_info, NULL, 0, 0, SYMTYPE);
+ return 0;
- if (status == 0)
- set_stat (file_name, &current_stat_info, NULL, 0, 0, SYMTYPE);
- else
- symlink_error (current_stat_info.link_name, file_name);
- return status;
-
#else
static int warned_once;
@@ -1052,16 +1071,23 @@ extract_node (char *file_name, int typeflag)
mode_t invert_permissions =
0 < same_owner_option ? mode & (S_IRWXG | S_IRWXO) : 0;
- do
- status = mknod (file_name, mode ^ invert_permissions,
- current_stat_info.stat.st_rdev);
- while (status && maybe_recoverable (file_name, &interdir_made));
+ while (mknod (file_name, mode ^ invert_permissions,
+ current_stat_info.stat.st_rdev))
+ switch (maybe_recoverable (file_name, &interdir_made))
+ {
+ case RECOVER_OK:
+ continue;
+
+ case RECOVER_SKIP:
+ return 0;
+
+ case RECOVER_NO:
+ mknod_error (file_name);
+ return -1;
+ }
- if (status != 0)
- mknod_error (file_name);
- else
- set_stat (file_name, &current_stat_info, NULL, invert_permissions,
- ARCHIVED_PERMSTATUS, typeflag);
+ set_stat (file_name, &current_stat_info, NULL, invert_permissions,
+ ARCHIVED_PERMSTATUS, typeflag);
return status;
}
#endif
@@ -1077,15 +1103,22 @@ extract_fifo (char *file_name, int typeflag)
0 < same_owner_option ? mode & (S_IRWXG | S_IRWXO) : 0;
while ((status = mkfifo (file_name, mode)) != 0)
- if (!maybe_recoverable (file_name, &interdir_made))
- break;
+ switch (maybe_recoverable (file_name, &interdir_made))
+ {
+ case RECOVER_OK:
+ continue;
+
+ case RECOVER_SKIP:
+ return 0;
+
+ case RECOVER_NO:
+ mkfifo_error (file_name);
+ return -1;
+ }
- if (status == 0)
- set_stat (file_name, &current_stat_info, NULL, invert_permissions,
- ARCHIVED_PERMSTATUS, typeflag);
- else
- mkfifo_error (file_name);
- return status;
+ set_stat (file_name, &current_stat_info, NULL, invert_permissions,
+ ARCHIVED_PERMSTATUS, typeflag);
+ return 0;
}
#endif

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-src_names_c,v 1.3 2010/03/28 18:35:01 naddy Exp $
Fix an instance of use-after-free(), from upstream.
--- src/names.c.orig Sun Mar 28 15:19:50 2010
+++ src/names.c Sun Mar 28 15:20:38 2010
@@ -950,6 +950,7 @@ collect_and_sort_names (void)
{
if (p->child)
rebase_child_list (p->child, name);
+ hash_delete (nametab, name);
/* FIXME: remove_directory (p->caname); ? */
remname (p);
free_name (p);

View File

@ -0,0 +1,57 @@
$OpenBSD: patch-tests_extrac11_at,v 1.1 2010/10/28 13:50:30 naddy Exp $
--- tests/extrac11.at.orig Sun Oct 24 20:07:46 2010
+++ tests/extrac11.at Thu Oct 28 15:10:15 2010
@@ -45,31 +45,37 @@ for dir in $dirs; do
done
done
-# Check that "ulimit" itself works.
-((ulimit -n 100 &&
- tar -cf archive1.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
- tar -xf archive1.tar -C dest1 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&-
- ) &&
- diff -r a dest1/a
+# Check that "ulimit" itself works. Close file descriptors before
+# invoking ulimit, to work around a bug (or a "feature") in some shells,
+# where they squirrel away dups of file descriptors into FD 10 and up
+# before closing the originals.
+( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
+ ulimit -n 100 &&
+ tar -cf archive1.tar a &&
+ tar -xf archive1.tar -C dest1 a
+ ) &&
+ diff -r a dest1/a
) >/dev/null 2>&1 ||
AT_SKIP_TEST
# Another test that "ulimit" itself works:
# tar should fail when completely starved of file descriptors.
-((ulimit -n 4 &&
- tar -cf archive2.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
- tar -xf archive2.tar -C dest2 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&-
- ) &&
- diff -r a dest2/a
+( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
+ ulimit -n 4 &&
+ tar -cf archive2.tar a &&
+ tar -xf archive2.tar -C dest2 a
+ ) &&
+ diff -r a dest2/a
) >/dev/null 2>&1 &&
AT_SKIP_TEST
# Tar should work when there are few, but enough, file descriptors.
-((ulimit -n 10 &&
- tar -cf archive3.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
- tar -xf archive3.tar -C dest3 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&-
- ) &&
- diff -r a dest3/a >/dev/null 2>&1
+( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
+ ulimit -n 10 &&
+ tar -cf archive3.tar a &&
+ tar -xf archive3.tar -C dest3 a
+ ) &&
+ diff -r a dest3/a >/dev/null 2>&1
) || { diff -r a dest3/a; exit 1; }
],
[0],[],[],[],[],[gnu])

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-tests_link02_at,v 1.1 2010/03/28 18:35:01 naddy Exp $
--- tests/link02.at.orig Thu Mar 25 16:17:52 2010
+++ tests/link02.at Thu Mar 25 16:18:07 2010
@@ -34,9 +34,9 @@ AT_KEYWORDS([hardlinks link02])
AT_TAR_CHECK([
genfile -l 64 -f file1
-link file1 file2
-link file2 file3
-link file3 file4
+ln file1 file2
+ln file2 file3
+ln file3 file4
tar -c -f archive --remove-files file1 file2 file3 file4
tar tfv archive | sed -n 's/.*file[[2-4]] link to //p'
],

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-tests_link03_at,v 1.1 2010/03/28 18:35:01 naddy Exp $
--- tests/link03.at.orig Thu Mar 25 16:17:54 2010
+++ tests/link03.at Thu Mar 25 16:18:21 2010
@@ -26,9 +26,9 @@ AT_KEYWORDS([hardlinks link03])
m4_define([create_files],[
genfile -l 64 -f file1
-link file1 file2
-link file2 file3
-link file3 file4
+ln file1 file2
+ln file2 file3
+ln file3 file4
])
AT_TAR_CHECK([

View File

@ -1,9 +1,10 @@
@comment $OpenBSD: PLIST,v 1.24 2008/12/30 17:37:05 naddy Exp $
@comment $OpenBSD: PLIST,v 1.25 2010/10/28 13:50:30 naddy Exp $
@bin bin/gtar
@info info/tar.info
@comment lib/charset.alias
@bin libexec/grmt
share/locale/bg/LC_MESSAGES/tar.mo
share/locale/ca/LC_MESSAGES/tar.mo
share/locale/cs/LC_MESSAGES/tar.mo
share/locale/da/LC_MESSAGES/tar.mo
share/locale/de/LC_MESSAGES/tar.mo