Diff of the two buildlogs: -- --- b1/build.log 2024-12-25 15:29:40.105651889 +0000 +++ b2/build.log 2024-12-25 15:49:36.055301455 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Wed Dec 25 03:19:14 -12 2024 -I: pbuilder-time-stamp: 1735139954 +I: Current time: Thu Dec 26 05:29:56 +14 2024 +I: pbuilder-time-stamp: 1735140596 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/trixie-reproducible-base.tgz] I: copying local configuration @@ -33,52 +33,84 @@ dpkg-source: info: applying tar-1.35-revert-fix-savannah-bug-633567.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/12074/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/31291/tmp/hooks/D01_modify_environment starting +debug: Running on virt32b. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Dec 25 15:30 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/31291/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/31291/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='armhf' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=3 ' - DISTRIBUTION='trixie' - HOME='/root' - HOST_ARCH='armhf' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="37" [3]="1" [4]="release" [5]="arm-unknown-linux-gnueabihf") + BASH_VERSION='5.2.37(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=armhf + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=4 ' + DIRSTACK=() + DISTRIBUTION=trixie + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=arm + HOST_ARCH=armhf IFS=' ' - INVOCATION_ID='c0c9ee552c9f4307b81b6ad97cf0f77d' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='12074' - PS1='# ' - PS2='> ' + INVOCATION_ID=c9f6d94f1b4f4d83b84d60f06fa57294 + LANG=C + LANGUAGE=it_CH:it + LC_ALL=C + MACHTYPE=arm-unknown-linux-gnueabihf + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnueabihf + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=31291 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.X97WScJa/pbuilderrc_ca0Y --distribution trixie --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.X97WScJa/b1 --logfile b1/build.log tar_1.35+dfsg-3.1.dsc' - SUDO_GID='114' - SUDO_UID='108' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://10.0.0.15:3142/' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.X97WScJa/pbuilderrc_eYo6 --distribution trixie --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.X97WScJa/b2 --logfile b2/build.log tar_1.35+dfsg-3.1.dsc' + SUDO_GID=112 + SUDO_UID=106 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://10.0.0.15:3142/ I: uname -a - Linux virt64a 6.1.0-28-arm64 #1 SMP Debian 6.1.119-1 (2024-11-22) aarch64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-28-armmp-lpae #1 SMP Debian 6.1.119-1 (2024-11-22) armv7l GNU/Linux I: ls -l /bin lrwxrwxrwx 1 root root 7 Nov 22 14:40 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/12074/tmp/hooks/D02_print_environment finished +I: user script /srv/workspace/pbuilder/31291/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -169,7 +201,7 @@ Get: 37 http://deb.debian.org/debian trixie/main armhf libpcre2-dev armhf 10.44-5 [702 kB] Get: 38 http://deb.debian.org/debian trixie/main armhf libsepol-dev armhf 3.7-1 [338 kB] Get: 39 http://deb.debian.org/debian trixie/main armhf libselinux1-dev armhf 3.7-3+b1 [154 kB] -Fetched 22.1 MB in 0s (47.6 MB/s) +Fetched 22.1 MB in 1s (19.8 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package sensible-utils. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19681 files and directories currently installed.) @@ -341,7 +373,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/tar-1.35+dfsg/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../tar_1.35+dfsg-3.1_source.changes +I: user script /srv/workspace/pbuilder/31291/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for trixie +I: user script /srv/workspace/pbuilder/31291/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/tar-1.35+dfsg/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../tar_1.35+dfsg-3.1_source.changes dpkg-buildpackage: info: source package tar dpkg-buildpackage: info: source version 1.35+dfsg-3.1 dpkg-buildpackage: info: source distribution unstable @@ -378,8 +414,8 @@ checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes -checking whether UID '1111' is supported by ustar format... yes -checking whether GID '1111' is supported by ustar format... yes +checking whether UID '2222' is supported by ustar format... yes +checking whether GID '2222' is supported by ustar format... yes checking how to create a ustar tar archive... gnutar checking whether make supports nested variables... (cached) yes checking for gcc... gcc @@ -1033,7 +1069,7 @@ config.status: executing tests/atconfig commands make[1]: Leaving directory '/build/reproducible-path/tar-1.35+dfsg' dh_auto_build - make -j3 + make -j4 make[1]: Entering directory '/build/reproducible-path/tar-1.35+dfsg' make all-recursive make[2]: Entering directory '/build/reproducible-path/tar-1.35+dfsg' @@ -1090,9 +1126,6 @@ -e '/definitions of _GL_FUNCDECL_RPL/r ./c++defs.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ ./ctype.in.h > ctype.h-t -mv alloca.h-t alloca.h -mv configmake.h-t configmake.h -mv ctype.h-t ctype.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_DIRENT_H''@|1|g' \ @@ -1128,6 +1161,8 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ ./dirent.in.h > dirent.h-t +mv alloca.h-t alloca.h +mv configmake.h-t configmake.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_ERROR_H''@|1|g' \ @@ -1139,6 +1174,7 @@ -e 's|@''REPLACE_ERROR_AT_LINE''@|0|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r ./c++defs.h' \ ./error.in.h > error.h-t +mv ctype.h-t ctype.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|include_next|g' \ @@ -1162,7 +1198,6 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ ./fcntl.in.h > fcntl.h-t -mv error.h-t error.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_GETOPT_H''@|1|g' \ @@ -1173,19 +1208,17 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ ./getopt.in.h > getopt.h-t mv dirent.h-t dirent.h -mv fcntl.h-t fcntl.h +mv error.h-t error.h +mv getopt.h-t getopt.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''HAVE_SYS_CDEFS_H''@|1|g' \ ./getopt-cdefs.in.h > getopt-cdefs.h-t /usr/bin/mkdir -p 'malloc' -mv getopt.h-t getopt.h +/usr/bin/mkdir -p 'malloc' +mv fcntl.h-t fcntl.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e '/libc_hidden_proto/d' \ ./malloc/dynarray.h > malloc/dynarray.gl.h-t -mv getopt-cdefs.h-t getopt-cdefs.h -/usr/bin/mkdir -p 'malloc' -/usr/bin/mkdir -p 'malloc' -mv malloc/dynarray.gl.h-t malloc/dynarray.gl.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|||g' \ -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \ @@ -1194,12 +1227,16 @@ -e 's|__glibc_likely|_GL_LIKELY|g' \ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ ./malloc/dynarray-skeleton.c > malloc/dynarray-skeleton.gl.h-t +/usr/bin/mkdir -p 'malloc' +mv getopt-cdefs.h-t getopt-cdefs.h +mv malloc/dynarray.gl.h-t malloc/dynarray.gl.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \ -e 's|__glibc_likely|_GL_LIKELY|g' \ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ -e '/libc_hidden_proto/d' \ ./malloc/scratch_buffer.h > malloc/scratch_buffer.gl.h-t +mv malloc/dynarray-skeleton.gl.h-t malloc/dynarray-skeleton.gl.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's/@''HAVE_INTTYPES_H''@/1/g' \ -e 's|@''INCLUDE_NEXT''@|include_next|g' \ @@ -1229,8 +1266,6 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ ./inttypes.in.h > inttypes.h-t -mv malloc/dynarray-skeleton.gl.h-t malloc/dynarray-skeleton.gl.h -mv malloc/scratch_buffer.gl.h-t malloc/scratch_buffer.gl.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_LANGINFO_H''@|1|g' \ @@ -1256,9 +1291,7 @@ -e 's|@''PRAGMA_COLUMNS''@||g' \ -e 's|@''NEXT_LIMITS_H''@||g' \ ./limits.in.h > limits.h-t -mv limits.h-t limits.h -mv inttypes.h-t inttypes.h -mv langinfo.h-t langinfo.h +mv malloc/scratch_buffer.gl.h-t malloc/scratch_buffer.gl.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|include_next|g' \ @@ -1285,7 +1318,18 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ ./locale.in.h > locale.h-t +mv limits.h-t limits.h +mv langinfo.h-t langinfo.h /usr/bin/mkdir -p 'selinux' +mv inttypes.h-t inttypes.h +sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's/@''HAVE_SELINUX_SELINUX_H''@/1/g' \ + -e 's|@''INCLUDE_NEXT''@|include_next|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC system_header|g' \ + -e 's|@''PRAGMA_COLUMNS''@||g' \ + -e 's|@''NEXT_SELINUX_SELINUX_H''@||g' \ + ./se-selinux.in.h > selinux/selinux.h-t sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|include_next|g' \ @@ -1312,17 +1356,7 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ ./signal.in.h > signal.h-t -sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ - -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's/@''HAVE_SELINUX_SELINUX_H''@/1/g' \ - -e 's|@''INCLUDE_NEXT''@|include_next|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC system_header|g' \ - -e 's|@''PRAGMA_COLUMNS''@||g' \ - -e 's|@''NEXT_SELINUX_SELINUX_H''@||g' \ - ./se-selinux.in.h > selinux/selinux.h-t -mv selinux/selinux.h-t selinux/selinux.h mv locale.h-t locale.h -mv signal.h-t signal.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|include_next|g' \ @@ -1457,6 +1491,8 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ > stdio.h-t +mv selinux/selinux.h-t selinux/selinux.h +mv stddef.h-t stddef.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|include_next|g' \ @@ -1604,7 +1640,7 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ > stdlib.h-t -mv stddef.h-t stddef.h +mv signal.h-t signal.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|include_next|g' \ @@ -1706,8 +1742,6 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ > string.h-t -mv string.h-t string.h -mv stdio.h-t stdio.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_STRINGS_H''@|1|g' \ @@ -1723,8 +1757,8 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ ./strings.in.h > strings.h-t +mv strings.h-t strings.h /usr/bin/mkdir -p 'sys' -mv stdlib.h-t stdlib.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|include_next|g' \ @@ -1739,8 +1773,10 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ ./sys_random.in.h > sys/random.h-t +mv stdio.h-t stdio.h /usr/bin/mkdir -p 'sys' -mv strings.h-t strings.h +mv sys/random.h-t sys/random.h +mv string.h-t string.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|include_next|g' \ @@ -1799,7 +1835,6 @@ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ ./sys_stat.in.h > sys/stat.h-t /usr/bin/mkdir -p 'sys' -mv sys/random.h-t sys/random.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_SYS_TIME_H''@/1/g' \ @@ -1818,6 +1853,8 @@ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ ./sys_time.in.h > sys/time.h-t /usr/bin/mkdir -p 'sys' +mv stdlib.h-t stdlib.h +mv sys/time.h-t sys/time.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|include_next|g' \ @@ -1827,8 +1864,6 @@ -e 's|@''WINDOWS_64_BIT_OFF_T''@|0|g' \ -e 's|@''WINDOWS_STAT_INODES''@|0|g' \ ./sys_types.in.h > sys/types.h-t -mv sys/time.h-t sys/time.h -mv sys/types.h-t sys/types.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|include_next|g' \ @@ -1925,13 +1960,12 @@ -e '/definitions of _GL_FUNCDECL_RPL/r ./c++defs.h' \ ./uchar.in.h > uchar.h-t mv sys/stat.h-t sys/stat.h +mv sys/types.h-t sys/types.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''HAVE_UNISTRING_WOE32DLL_H''@|0|g' \ -e 's/@''GNULIB_UNICASE_EMPTY_PREFIX_CONTEXT_DLL_VARIABLE''@/LIBUNISTRING_DLL_VARIABLE/g' \ -e 's/@''GNULIB_UNICASE_EMPTY_SUFFIX_CONTEXT_DLL_VARIABLE''@/LIBUNISTRING_DLL_VARIABLE/g' \ ./unicase.in.h > unicase.h-t -mv unicase.h-t unicase.h -mv time.h-t time.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''HAVE_UNISTRING_WOE32DLL_H''@|0|g' \ -e 's/@''GNULIB_UNICTYPE_CATEGORY_L_DLL_VARIABLE''@/LIBUNISTRING_DLL_VARIABLE/g' \ @@ -2067,6 +2101,7 @@ -e 's/@''GNULIB_UNICTYPE_PROPERTY_IGNORABLE_CONTROL_DLL_VARIABLE''@/LIBUNISTRING_DLL_VARIABLE/g' \ -e 's/@''GNULIB_UNICTYPE_PROPERTY_REGIONAL_INDICATOR_DLL_VARIABLE''@/LIBUNISTRING_DLL_VARIABLE/g' \ > unictype.h-t +mv time.h-t time.h mv uchar.h-t uchar.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''HAVE_UNISTRING_WOE32DLL_H''@|0|g' \ @@ -2075,6 +2110,7 @@ -e 's/@''GNULIB_UNINORM_NFKD_DLL_VARIABLE''@/LIBUNISTRING_DLL_VARIABLE/g' \ -e 's/@''GNULIB_UNINORM_NFKC_DLL_VARIABLE''@/LIBUNISTRING_DLL_VARIABLE/g' \ ./uninorm.in.h > uninorm.h-t +mv unicase.h-t unicase.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_UNISTD_H''@|1|g' \ @@ -2292,7 +2328,6 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ ./utime.in.h > utime.h-t -mv utime.h-t utime.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|include_next|g' \ @@ -2416,8 +2451,7 @@ -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ > wchar.h-t -mv unictype.h-t unictype.h -mv unistd.h-t unistd.h +mv utime.h-t utime.h sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e 1G \ -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_WCTYPE_H''@/1/g' \ @@ -2447,8 +2481,10 @@ -e '/definitions of _GL_FUNCDECL_RPL/r ./c++defs.h' \ -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \ ./wctype.in.h > wctype.h-t -mv wchar.h-t wchar.h +mv unictype.h-t unictype.h mv wctype.h-t wctype.h +mv unistd.h-t unistd.h +mv wchar.h-t wchar.h make all-recursive make[4]: Entering directory '/build/reproducible-path/tar-1.35+dfsg/gnu' make[5]: Entering directory '/build/reproducible-path/tar-1.35+dfsg/gnu' @@ -2700,7 +2736,7 @@ make[1]: Entering directory '/build/reproducible-path/tar-1.35+dfsg' cp tests/testsuite debian/testsuite.orig dh_auto_test - make -j3 check "TESTSUITEFLAGS=-j3 --verbose" VERBOSE=1 + make -j4 check "TESTSUITEFLAGS=-j4 --verbose" VERBOSE=1 make[2]: Entering directory '/build/reproducible-path/tar-1.35+dfsg' Making check in doc make[3]: Entering directory '/build/reproducible-path/tar-1.35+dfsg/doc' @@ -2746,26 +2782,21 @@ gcc -DHAVE_CONFIG_H -I. -I.. -I../gnu -I../gnu -I../gnu -I../lib -DLOCALEDIR=\"/usr/share/locale\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/tar-1.35+dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -Wno-analyzer-null-argument -c -o argcv.o argcv.c gcc -DHAVE_CONFIG_H -I. -I.. -I../gnu -I../gnu -I../gnu -I../lib -DLOCALEDIR=\"/usr/share/locale\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/tar-1.35+dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -Wno-analyzer-null-argument -c -o checkseekhole.o checkseekhole.c gcc -DHAVE_CONFIG_H -I. -I.. -I../gnu -I../gnu -I../gnu -I../lib -DLOCALEDIR=\"/usr/share/locale\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/tar-1.35+dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -Wno-analyzer-null-argument -c -o ckmtime.o ckmtime.c +gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/tar-1.35+dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -Wno-analyzer-null-argument -Wl,-z,relro -o genfile genfile.o argcv.o ../gnu/libgnu.a -lacl -lselinux -lacl gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/tar-1.35+dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -Wno-analyzer-null-argument -Wl,-z,relro -o checkseekhole checkseekhole.o ../gnu/libgnu.a -lacl -lselinux -lacl gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/tar-1.35+dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -Wno-analyzer-null-argument -Wl,-z,relro -o ckmtime ckmtime.o ../gnu/libgnu.a -lacl -lselinux -lacl -gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/tar-1.35+dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -Wno-analyzer-null-argument -Wl,-z,relro -o genfile genfile.o argcv.o ../gnu/libgnu.a -lacl -lselinux -lacl make[4]: Leaving directory '/build/reproducible-path/tar-1.35+dfsg/tests' make check-local make[4]: Entering directory '/build/reproducible-path/tar-1.35+dfsg/tests' -/bin/bash '/build/reproducible-path/tar-1.35+dfsg/build-aux/missing' autom4te --language=autotest -I . testsuite.at -o testsuite.tmp +/bin/sh '/build/reproducible-path/tar-1.35+dfsg/build-aux/missing' autom4te --language=autotest -I . testsuite.at -o testsuite.tmp mv testsuite.tmp testsuite -/bin/bash ./testsuite -j3 --verbose +/bin/sh ./testsuite -j4 --verbose ## ------------------------ ## ## GNU tar 1.35 test suite. ## ## ------------------------ ## -3. options.at:24: testing mixing options ... -./options.at:27: -echo > file1 -TAR_OPTIONS=--numeric-owner tar chof archive file1 -tar tf archive 1. version.at:19: testing tar version ... ./version.at:21: tar --version | sed 1q @@ -2793,16 +2824,23 @@ cmp orig/file1 directory/file1 echo "separator" cmp orig/file2 directory/file2) -3. options.at:24: ok -1. version.at:19: ok - - 4. options02.at:26: testing interspersed options ... ./options02.at:29: echo > file1 tar c file1 -f archive tar tf archive +3. options.at:24: testing mixing options ... +./options.at:27: +echo > file1 +TAR_OPTIONS=--numeric-owner tar chof archive file1 +tar tf archive + +3. options.at:24: ok +1. version.at:19: ok +4. options02.at:26: ok + + 5. options03.at:21: testing TAR_OPTIONS with string arguments ... ./options03.at:31: echo dir/bar > exclude.list @@ -2812,43 +2850,17 @@ TAR_OPTIONS=--exclude-from=exclude.list tar cf arc.tar dir tar tf arc.tar -./pipe.at:33: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 13 --file directory/file2 -tar cf archive directory -mv directory orig -cat archive | tar xfv - --warning=no-timestamp | sort -echo "separator" -cmp orig/file1 directory/file1 -echo "separator" -cmp orig/file2 directory/file2) -4. options02.at:26: ok -5. options03.at:21: ok - 6. opcomp01.at:21: testing occurrence compatibility ... ./opcomp01.at:24: tar --occurrence=1 -cf test.tar . ./pipe.at:33: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -2872,36 +2884,9 @@ tar --occurrence=1 -tf test.tar 7. opcomp02.at:21: ok +5. options03.at:21: ok -8. opcomp03.at:21: testing --verify compatibility ... -./opcomp03.at:24: -tar -tWf test.tar . - -8. opcomp03.at:21: ./pipe.at:33: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 13 --file directory/file2 -tar cf archive directory -mv directory orig -cat archive | tar xfv - --warning=no-timestamp | sort -echo "separator" -cmp orig/file1 directory/file1 -echo "separator" -cmp orig/file2 directory/file2) - ok 9. opcomp04.at:21: testing compress option compatibility ... ./opcomp04.at:24: @@ -2912,19 +2897,12 @@ genfile --file newfile tar rzf test.tar newfile - -9. opcomp04.at:21: ok -10. opcomp05.at:21: testing --pax-option compatibility ... -./opcomp05.at:24: -tar -Hgnu -cf test.tar --pax-option user:=root . - -10. opcomp05.at:21: ok ./pipe.at:33: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -2942,6 +2920,18 @@ cmp orig/file1 directory/file1 echo "separator" cmp orig/file2 directory/file2) +8. opcomp03.at:21: testing --verify compatibility ... +./opcomp03.at:24: +tar -tWf test.tar . + + +10. opcomp05.at:21: testing --pax-option compatibility ... +./opcomp05.at:24: +tar -Hgnu -cf test.tar --pax-option user:=root . + +8. opcomp03.at:21: ok +10. opcomp05.at:21: ok +9. opcomp04.at:21: ok 11. opcomp06.at:21: testing --pax-option compatibility ... @@ -2973,6 +2963,30 @@ genfile --file file tar -cf test.tar --acls -Hgnu file +./pipe.at:33: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 13 --file directory/file2 +tar cf archive directory +mv directory orig +cat archive | tar xfv - --warning=no-timestamp | sort +echo "separator" +cmp orig/file1 directory/file1 +echo "separator" +cmp orig/file2 directory/file2) + 12. defaults.at:16: testing checkpoint defaults ... ./defaults.at:18: mkdir t @@ -2987,15 +3001,6 @@ tar --checkpoint -c -f ../a.tar . ---- - 2024-12-25 15:24:03.768314864 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/11/stderr 2024-12-25 15:24:03.763296996 +0000 -@@ -1,3 +1 @@ --tar: --acls can be used only on POSIX archives --Try 'tar --help' or 'tar --usage' for more information. - -11. opcomp06.at:21: skipped (opcomp06.at:24) - -2. pipe.at:29: ok 13. interval.at:16: testing checkpoint interval ... ./interval.at:18: mkdir t @@ -3010,8 +3015,39 @@ tar --checkpoint=2 -c -f ../a.tar . -12. defaults.at:16: ok +--- - 2024-12-25 15:35:24.497237701 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/11/stderr 2024-12-25 15:35:24.475640493 +0000 +@@ -1,3 +1 @@ +-tar: --acls can be used only on POSIX archives +-Try 'tar --help' or 'tar --usage' for more information. + +11. opcomp06.at:21: skipped (opcomp06.at:24) +./pipe.at:33: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 13 --file directory/file2 +tar cf archive directory +mv directory orig +cat archive | tar xfv - --warning=no-timestamp | sort +echo "separator" +cmp orig/file1 directory/file1 +echo "separator" +cmp orig/file2 directory/file2) +13. interval.at:16: ok +12. defaults.at:16: ok 14. dot.at:16: testing dot action ... ./dot.at:18: mkdir t @@ -3027,6 +3063,8 @@ + +2. pipe.at:29: 14. dot.at:16: ok 15. dot-compat.at:16: testing dot action (compatibility syntax) ... ./dot-compat.at:18: mkdir t @@ -3041,9 +3079,7 @@ tar --checkpoint=.2 -c -f ../a.tar . -13. interval.at:16: ok - -14. dot.at:16: ok + ok 16. dot-int.at:16: testing dot action and interval ... ./dot-int.at:18: mkdir t @@ -3058,38 +3094,7 @@ tar --checkpoint-action=dot --checkpoint=2 -c -f ../a.tar . -15. dot-compat.at:16: ok - - -17. testsuite.at:242: testing compress: gzip ... -./testsuite.at:242: - -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 - -unset TAR_OPTIONS - -touch empty -set -e -: create with --gzip -tar --gzip -cf k.tar.gz empty -tar tf k.tar.gz - - -echo testing .gz -tar -acf k2.tar.gz empty -cat k2.tar.gz | gzip -d > k.gz.tar -tar tf k.gz.tar -echo testing .tgz -tar -acf k2.tar.tgz empty -cat k2.tar.tgz | gzip -d > k.tgz.tar -tar tf k.tgz.tar - - -# Extraction: ensure compressed format is correctly recognized -rm -f empty -tar xf k.tar.gz -test -f empty 18. testsuite.at:243: testing compress: bzip2 ... ./testsuite.at:243: @@ -3122,6 +3127,37 @@ test -f empty 16. dot-int.at:16: ok +17. testsuite.at:242: testing compress: gzip ... +./testsuite.at:242: + +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + +unset TAR_OPTIONS + +touch empty +set -e +: create with --gzip +tar --gzip -cf k.tar.gz empty +tar tf k.tar.gz + + +echo testing .gz +tar -acf k2.tar.gz empty +cat k2.tar.gz | gzip -d > k.gz.tar +tar tf k.gz.tar + +echo testing .tgz +tar -acf k2.tar.tgz empty +cat k2.tar.tgz | gzip -d > k.tgz.tar +tar tf k.tgz.tar + + +# Extraction: ensure compressed format is correctly recognized +rm -f empty +tar xf k.tar.gz +test -f empty + +15. dot-compat.at:16: ok 19. testsuite.at:244: testing compress: xz ... ./testsuite.at:244: @@ -3153,9 +3189,6 @@ tar xf k.tar.xz test -f empty -17. testsuite.at:242: ok -18. testsuite.at:243: ok - 20. testsuite.at:246: testing compress: lzip ... ./testsuite.at:246: @@ -3182,6 +3215,16 @@ tar xf k.tar.lz test -f empty +--- - 2024-12-25 15:35:24.918619599 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/20/stdout 2024-12-25 15:35:24.907599855 +0000 +@@ -1,4 +1 @@ +-empty +-testing .lz +-empty + +20. testsuite.at:246: skipped (testsuite.at:246) + +18. testsuite.at:243: ok 21. testsuite.at:247: testing compress: lzop ... ./testsuite.at:247: @@ -3207,25 +3250,16 @@ tar xf k.tar.lzo test -f empty ---- - 2024-12-25 15:24:04.000898040 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/20/stdout 2024-12-25 15:24:03.995275189 +0000 -@@ -1,4 +1 @@ --empty --testing .lz --empty - -20. testsuite.at:246: --- - 2024-12-25 15:24:04.007071680 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/21/stdout 2024-12-25 15:24:03.999274813 +0000 +17. testsuite.at:242: ok +--- - 2024-12-25 15:35:25.040857399 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/21/stdout 2024-12-25 15:35:25.031588191 +0000 @@ -1,4 +1 @@ -empty -testing .lzo -empty - skipped (testsuite.at:246) -21. testsuite.at:247: skipped (testsuite.at:247) -19. testsuite.at:244: ok - - +21. testsuite.at:247: + skipped (testsuite.at:247) 22. testsuite.at:248: testing compress: zstd ... ./testsuite.at:248: @@ -3257,6 +3291,7 @@ tar xf k.tar.zst test -f empty + 23. positional01.at:21: testing Exclude ... ./positional01.at:24: @@ -3273,8 +3308,8 @@ echo $? tar -tf a.tar | sort ---- - 2024-12-25 15:24:04.037968155 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/22/stdout 2024-12-25 15:24:04.031271805 +0000 +--- - 2024-12-25 15:35:25.110084646 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/22/stdout 2024-12-25 15:35:25.103581418 +0000 @@ -1,6 +1 @@ -empty -testing .zst @@ -3283,6 +3318,7 @@ -empty 22. testsuite.at:248: skipped (testsuite.at:248) +19. testsuite.at:244: ok 24. positional02.at:21: testing Directory ... ./positional02.at:24: @@ -3311,38 +3347,8 @@ > dir/A.b tar -vcf ../a.tar --exclude '*.b' . -C dir --exclude '*.c' | sort -24. positional02.at:21: ok -23. positional01.at:21: ok - - -25. positional03.at:21: ok -27. T-mult.at:21: testing multiple file lists ... -./T-mult.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - ->file1 ->file2 ->file3 ->file4 -cat >F1 <<'_ATEOF' -file1 -file2 -_ATEOF - -cat >F2 <<'_ATEOF' -file3 -file4 -_ATEOF -tar cf archive -T F1 -T F2 -tar tf archive -) +23. positional01.at:21: ok 26. add-file.at:21: testing The --add-file option ... ./add-file.at:33: mkdir v7 @@ -3374,36 +3380,9 @@ echo 3: tar -cvf arc.tar -T input ) +24. positional02.at:21: 25. positional03.at:21: ok + ok -28. T-nest.at:21: testing nested file lists ... -./T-nest.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - ->file1 ->file2 ->file3 ->file4 -cat >F1 <<'_ATEOF' -file1 --T F2 -file2 -_ATEOF - -cat >F2 <<'_ATEOF' -file3 -file4 -_ATEOF - -tar cf archive -T F1 -tar tf archive -) -27. T-mult.at:21: ok ./add-file.at:33: mkdir oldgnu (cd oldgnu @@ -3435,7 +3414,34 @@ tar -cvf arc.tar -T input ) -28. T-nest.at:21: ok + +27. T-mult.at:21: testing multiple file lists ... +./T-mult.at:24: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +>file1 +>file2 +>file3 +>file4 +cat >F1 <<'_ATEOF' +file1 +file2 +_ATEOF + +cat >F2 <<'_ATEOF' +file3 +file4 +_ATEOF + +tar cf archive -T F1 -T F2 +tar tf archive +) 29. T-rec.at:21: testing recursive file lists ... ./T-rec.at:24: mkdir ustar @@ -3462,7 +3468,35 @@ echo $? tar tf archive ) +28. T-nest.at:21: testing nested file lists ... +./T-nest.at:24: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * +>file1 +>file2 +>file3 +>file4 +cat >F1 <<'_ATEOF' +file1 +-T F2 +file2 +_ATEOF + +cat >F2 <<'_ATEOF' +file3 +file4 +_ATEOF + +tar cf archive -T F1 +tar tf archive +) +27. T-mult.at:21: ok ./add-file.at:33: mkdir ustar (cd ustar @@ -3493,6 +3527,10 @@ echo 3: tar -cvf arc.tar -T input ) +28. T-nest.at:21: ok + +29. T-rec.at:21: ok + 30. T-recurse.at:27: testing files-from & recurse: toggle ... ./T-recurse.at:30: mkdir v7 @@ -3532,7 +3570,6 @@ tar cf "$a" --no-recursion -T F2A --recursion -T F2B tar tf "$a" ) -29. T-rec.at:21: ok ./add-file.at:33: mkdir posix @@ -3592,6 +3629,32 @@ tar tf archive ) +32. T-cd.at:21: testing -C in file lists ... +./T-cd.at:24: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +>file1 +mkdir dir +>dir/file2 +>dir/file3 +cat >F1 <<'_ATEOF' +file1 +-C dir +. +_ATEOF + +tar cf archive -T F1 +tar tf archive | sort +) ./T-recurse.at:30: mkdir oldgnu (cd oldgnu @@ -3630,6 +3693,34 @@ tar cf "$a" --no-recursion -T F2A --recursion -T F2B tar tf "$a" ) +./T-recurse.at:69: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory1 directory2 +touch directory1/file directory2/file + +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +_ATEOF + + +cat >F2 <<'_ATEOF' +directory2/ +_ATEOF + + +tar cf archive -T F1 --recursion -T F2 +tar tf archive + +) +32. T-cd.at:21: ok ./add-file.at:33: mkdir gnu (cd gnu @@ -3661,11 +3752,11 @@ tar -cvf arc.tar -T input ) ./T-recurse.at:69: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -3725,7 +3816,9 @@ tar cf "$a" --no-recursion -T F2A --recursion -T F2B tar tf "$a" ) -./T-recurse.at:69: + +33. T-empty.at:26: testing empty entries ... +./T-empty.at:36: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3734,26 +3827,13 @@ export TAR_OPTIONS rm -rf * -mkdir directory1 directory2 -touch directory1/file directory2/file - -cat >F1 <<'_ATEOF' ---no-recursion -directory1/ -_ATEOF - - -cat >F2 <<'_ATEOF' -directory2/ -_ATEOF +genfile --file jeden +genfile --file dwa +genfile --file trzy -tar cf archive -T F1 --recursion -T F2 -tar tf archive - +tar cfvT archive ../file-list ) -26. add-file.at:21: ok - ./T-recurse.at:69: mkdir posix (cd posix @@ -3781,6 +3861,7 @@ tar tf archive ) +26. add-file.at:21: ok ./T-recurse.at:30: mkdir posix (cd posix @@ -3819,32 +3900,8 @@ tar cf "$a" --no-recursion -T F2A --recursion -T F2B tar tf "$a" ) -32. T-cd.at:21: testing -C in file lists ... -./T-cd.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - ->file1 -mkdir dir ->dir/file2 ->dir/file3 -cat >F1 <<'_ATEOF' -file1 --C dir -. -_ATEOF +33. T-empty.at:26: ok -tar cf archive -T F1 -tar tf archive | sort -) ./T-recurse.at:69: mkdir gnu (cd gnu @@ -3872,65 +3929,6 @@ tar tf archive ) -32. T-cd.at:21: ok -./T-recurse.at:30: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -mkdir directory1 directory2 -touch directory1/file directory2/file - -cat >F1 <<'_ATEOF' ---no-recursion -directory1/ ---recursion -directory2/ -_ATEOF - - -cat >F2A <<'_ATEOF' -directory1/ -_ATEOF - - -cat >F2B <<'_ATEOF' -directory2/ -_ATEOF - - -a=archive -tar cf "$a" --files-from F1 -tar tf "$a" - -a=archive2 -tar cf "$a" --no-recursion -T F2A --recursion -T F2B -tar tf "$a" -) -31. T-recurse.at:66: - ok -33. T-empty.at:26: testing empty entries ... -./T-empty.at:36: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -genfile --file jeden -genfile --file dwa -genfile --file trzy - -tar cfvT archive ../file-list -) - 34. T-null.at:21: testing 0-separated file without -0 ... ./T-null.at:24: mkdir ustar @@ -3956,11 +3954,7 @@ tar cfTv archive file-list ) -33. T-empty.at:26: ok -30. T-recurse.at:27: ok - -34. T-null.at:21: ok 35. T-null2.at:17: testing --null enables verbatim reading ... ./T-null2.at:24: mkdir ustar @@ -3986,31 +3980,49 @@ cat file-list | tr '\n' '\0' | tar -c -f archive -v --null -T - ) -36. T-zfile.at:26: testing empty file ... -./T-zfile.at:29: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +./T-recurse.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile --length=0 --file empty -genfile --file a -genfile --file b -cat >valid <<'_ATEOF' -a -b +mkdir directory1 directory2 +touch directory1/file directory2/file + +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +--recursion +directory2/ _ATEOF -tar cf archive -T empty -T valid -tar tf archive -echo "==" -tar cf archive -T valid -T empty -tar tf archive +cat >F2A <<'_ATEOF' +directory1/ +_ATEOF + + +cat >F2B <<'_ATEOF' +directory2/ +_ATEOF + + +a=archive +tar cf "$a" --files-from F1 +tar tf "$a" + +a=archive2 +tar cf "$a" --no-recursion -T F2A --recursion -T F2B +tar tf "$a" ) +30. T-recurse.at:27: ok +31. T-recurse.at:66: ok +35. T-null2.at:17: ok + +34. T-null.at:21: ok 37. T-nonl.at:27: testing entries with missing newlines ... ./T-nonl.at:30: @@ -4038,13 +4050,35 @@ tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl tar tf archive ) -35. T-null2.at:17: ok -36. T-zfile.at:26: ok +36. T-zfile.at:26: testing empty file ... +./T-zfile.at:29: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * +genfile --length=0 --file empty +genfile --file a +genfile --file b +cat >valid <<'_ATEOF' +a +b +_ATEOF -37. T-nonl.at:27: ok -38. T-dir00.at:28: testing recursive extraction from --files-from ... -./T-dir00.at:30: + +tar cf archive -T empty -T valid +tar tf archive +echo "==" +tar cf archive -T valid -T empty +tar tf archive +) + + +39. T-dir01.at:28: testing trailing slash in --files-from ... +./T-dir01.at:30: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -4061,11 +4095,11 @@ genfile -f dir/file2 tar cf archive dir rm -rf dir -echo dir > list +echo dir/ > list tar xfTv archive list | sort ) -39. T-dir01.at:28: testing trailing slash in --files-from ... -./T-dir01.at:30: +38. T-dir00.at:28: testing recursive extraction from --files-from ... +./T-dir00.at:30: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -4082,31 +4116,33 @@ genfile -f dir/file2 tar cf archive dir rm -rf dir -echo dir/ > list +echo dir > list tar xfTv archive list | sort ) - -40. indexfile.at:26: testing tar --index-file=FILE --file=- ... -./indexfile.at:29: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +36. T-zfile.at:26: ok +37. T-nonl.at:27: ok +./T-dir00.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -genfile --file=directory/a --length=1035 - -echo "Creating the archive" -tar -c -v -f - --index-file=idx directory > archive +test -z "`sort < /dev/null 2>&1`" || exit 77 -echo "Testing the archive" -tar -tf archive +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir > list +tar xfTv archive list | sort ) -./T-dir00.at:30: + +./T-dir01.at:30: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -4123,15 +4159,16 @@ genfile -f dir/file2 tar cf archive dir rm -rf dir -echo dir > list +echo dir/ > list tar xfTv archive list | sort ) +40. indexfile.at:26: testing tar --index-file=FILE --file=- ... ./indexfile.at:29: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * @@ -4145,7 +4182,24 @@ echo "Testing the archive" tar -tf archive ) -./T-dir01.at:30: + +41. verbose.at:26: testing tar cvf - ... +./verbose.at:29: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive +) +./indexfile.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -4155,15 +4209,14 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir directory +genfile --file=directory/a --length=1035 -mkdir dir -genfile -f dir/file1 -genfile -f dir/file2 -tar cf archive dir -rm -rf dir -echo dir/ > list -tar xfTv archive list | sort +echo "Creating the archive" +tar -c -v -f - --index-file=idx directory > archive + +echo "Testing the archive" +tar -tf archive ) ./T-dir00.at:30: mkdir ustar @@ -4185,25 +4238,6 @@ echo dir > list tar xfTv archive list | sort ) -./indexfile.at:29: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -mkdir directory -genfile --file=directory/a --length=1035 - -echo "Creating the archive" -tar -c -v -f - --index-file=idx directory > archive - -echo "Testing the archive" -tar -tf archive -) ./T-dir01.at:30: mkdir ustar (cd ustar @@ -4224,12 +4258,27 @@ echo dir/ > list tar xfTv archive list | sort ) +./verbose.at:29: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive +) ./indexfile.at:29: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -4263,6 +4312,21 @@ echo dir > list tar xfTv archive list | sort ) +./verbose.at:29: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive +) ./T-dir01.at:30: mkdir posix (cd posix @@ -4284,11 +4348,11 @@ tar xfTv archive list | sort ) ./indexfile.at:29: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -4322,6 +4386,40 @@ echo dir > list tar xfTv archive list | sort ) +./verbose.at:29: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive +) +./indexfile.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +mkdir directory +genfile --file=directory/a --length=1035 + +echo "Creating the archive" +tar -c -v -f - --index-file=idx directory > archive + +echo "Testing the archive" +tar -tf archive +) ./T-dir01.at:30: mkdir gnu (cd gnu @@ -4342,16 +4440,12 @@ echo dir/ > list tar xfTv archive list | sort ) -40. indexfile.at:26: ok -38. T-dir00.at:28: ok - -41. verbose.at:26: testing tar cvf - ... ./verbose.at:29: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -4361,8 +4455,11 @@ echo Testing the archive tar tf archive ) +40. indexfile.at:26: ok +38. T-dir00.at:28: ok 39. T-dir01.at:28: ok +41. verbose.at:26: ok 42. gzip.at:23: testing gzip ... ./gzip.at:28: @@ -4374,22 +4471,7 @@ exit $RC -./verbose.at:29: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive -tar tf archive -) -42. gzip.at:23: ok 43. recurse.at:21: testing recurse ... ./recurse.at:24: mkdir v7 @@ -4406,34 +4488,24 @@ tar tf archive ) -./verbose.at:29: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive -tar tf archive -) -./recurse.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +45. shortrec.at:25: testing short records ... +./shortrec.at:28: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive +(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 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null + +rm -r directory ) 44. recurs02.at:30: testing recurse: toggle ... ./recurs02.at:33: @@ -4456,34 +4528,39 @@ --no-recursion directory1 \ --recursion directory2 || exit 1 ) -./verbose.at:29: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +./recurse.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 tar tf archive ) -./recurse.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +42. gzip.at:23: ok + +./shortrec.at:28: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive +(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 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null + +rm -r directory ) ./recurs02.at:33: mkdir oldgnu @@ -4505,22 +4582,22 @@ --no-recursion directory1 \ --recursion directory2 || exit 1 ) -./verbose.at:29: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +./recurse.at:24: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 tar tf archive ) -./recurse.at:24: +46. numeric.at:18: testing --numeric-owner basic tests ... +./numeric.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4529,18 +4606,44 @@ export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive +MYUID=$(id -u) || exit 77 +MYGID=$(id -g) || exit 77 +MYUSR=$(id -un) || exit 77 +MYGRP=$(id -gn) || exit 77 + +mkdir dir +# Ensure correct group id on BSDs. +chown :$MYGID dir >/dev/null 2>/dev/null +genfile --file dir/file + + + +decho --create +tar --create -vvf a dir --numeric-owner | awk '=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --create -vvf a dir | awk '=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' + + +decho --list +tar --list -vvf a dir --numeric-owner | awk '=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --list -vvf a dir | awk '=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' + + +decho --diff +tar --diff -vvf a dir --numeric-owner | awk '=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --diff -vvf a dir | awk '=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' + + +decho --extract +tar --extract -vvf a dir --numeric-owner | awk '=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --extract -vvf a dir | awk '=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' + ) -41. verbose.at:26: ok ./recurse.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -4569,15 +4672,12 @@ --no-recursion directory1 \ --recursion directory2 || exit 1 ) - -43. recurse.at:21: ok -45. shortrec.at:25: testing short records ... ./shortrec.at:28: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -4590,6 +4690,20 @@ rm -r directory ) +./recurse.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) ./recurs02.at:33: mkdir posix (cd posix @@ -4610,13 +4724,12 @@ --no-recursion directory1 \ --recursion directory2 || exit 1 ) - ./shortrec.at:28: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -4629,13 +4742,13 @@ rm -r directory ) -46. numeric.at:18: testing --numeric-owner basic tests ... +43. recurse.at:21: ok ./numeric.at:29: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -4671,7 +4784,8 @@ tar --extract -vvf a dir | awk '=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' ) -./recurs02.at:33: + +./shortrec.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4680,46 +4794,6 @@ export TAR_OPTIONS rm -rf * -mkdir directory1 directory2 -touch directory1/file directory2/file -tar --create --file archive \ - --no-recursion directory1 \ - --recursion directory2 || exit 1 -tar tf archive -tar cf archive directory1 directory2 -tar tf archive \ - --no-recursion directory1 \ - --recursion directory2 || exit 1 -) -./shortrec.at:28: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - -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 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null - -rm -r directory -) -44. recurs02.at:30: ok - -./shortrec.at:28: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - 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 -f - directory | tar -t -f - > /dev/null @@ -4752,7 +4826,7 @@ ls directory|sort ) -./numeric.at:29: +./recurs02.at:33: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4761,37 +4835,16 @@ export TAR_OPTIONS rm -rf * -MYUID=$(id -u) || exit 77 -MYGID=$(id -g) || exit 77 -MYUSR=$(id -un) || exit 77 -MYGRP=$(id -gn) || exit 77 - -mkdir dir -# Ensure correct group id on BSDs. -chown :$MYGID dir >/dev/null 2>/dev/null -genfile --file dir/file - - - -decho --create -tar --create -vvf a dir --numeric-owner | awk '=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' -tar --create -vvf a dir | awk '=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' - - -decho --list -tar --list -vvf a dir --numeric-owner | awk '=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' -tar --list -vvf a dir | awk '=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' - - -decho --diff -tar --diff -vvf a dir --numeric-owner | awk '=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' -tar --diff -vvf a dir | awk '=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' - - -decho --extract -tar --extract -vvf a dir --numeric-owner | awk '=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' -tar --extract -vvf a dir | awk '=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' - +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +tar tf archive +tar cf archive directory1 directory2 +tar tf archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 ) ./same-order01.at:29: mkdir oldgnu @@ -4815,47 +4868,7 @@ ls directory|sort ) -./shortrec.at:28: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -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 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null - -rm -r directory -) -./same-order01.at:29: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 - -ls directory|sort -) -45. shortrec.at:25: ok +44. recurs02.at:30: ok ./numeric.at:29: mkdir ustar (cd ustar @@ -4897,13 +4910,12 @@ tar --extract -vvf a dir | awk '=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' ) - ./same-order01.at:29: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -4920,6 +4932,8 @@ ls directory|sort ) + +45. shortrec.at:25: ok 48. same-order02.at:25: testing multiple -C options ... ./same-order02.at:28: mkdir v7 @@ -4947,6 +4961,43 @@ ls to ) ./same-order01.at:29: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + +ls directory|sort +) + +49. append.at:21: testing append ... +./append.at:24: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * +touch file1 + touch file2 + tar cf archive file1 + tar rf archive file2 + tar tf archive) +./same-order01.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4993,6 +5044,19 @@ echo separator ls to ) +./append.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * +touch file1 + touch file2 + tar cf archive file1 + tar rf archive file2 + tar tf archive) ./numeric.at:29: mkdir oldgnu (cd oldgnu @@ -5035,7 +5099,7 @@ ) 47. same-order01.at:26: ok -./same-order02.at:28: +./append.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5043,44 +5107,17 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * - -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=`pwd` -tar -xf archive --same-order --warning=no-timestamp \ - -C $HERE/en file1 \ - -C $HERE/to file2 || exit 1 - -ls en -echo separator -ls to -) - -49. append.at:21: testing append ... -./append.at:24: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * touch file1 touch file2 tar cf archive file1 tar rf archive file2 tar tf archive) ./same-order02.at:28: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -5100,13 +5137,13 @@ echo separator ls to ) -46. numeric.at:18: ok + ./append.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * touch file1 @@ -5114,13 +5151,28 @@ tar cf archive file1 tar rf archive file2 tar tf archive) +50. append01.at:29: testing appending files with long names ... +./append01.at:34: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * +mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX +touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar tf archive +) ./same-order02.at:28: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -5140,35 +5192,6 @@ echo separator ls to ) -50. append01.at:29: testing appending files with long names ... -./append01.at:34: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - -mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX -touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 -tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar tf archive -) -./append.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * -touch file1 - touch file2 - tar cf archive file1 - tar rf archive file2 - tar tf archive) ./append01.at:34: mkdir ustar (cd ustar @@ -5184,12 +5207,13 @@ tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 tar tf archive ) +46. numeric.at:18: ok ./append.at:24: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * touch file1 @@ -5197,9 +5221,8 @@ tar cf archive file1 tar rf archive file2 tar tf archive) -48. same-order02.at:25: ok -./append.at:24: +./same-order02.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -5207,25 +5230,22 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -touch file1 - touch file2 - tar cf archive file1 - tar rf archive file2 - tar tf archive) -./append01.at:34: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * -mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX -touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 -tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar tf archive +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + +mkdir en +mkdir to + +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 + +ls en +echo separator +ls to ) 51. append02.at:54: testing append vs. create ... ./append02.at:57: @@ -5260,12 +5280,13 @@ echo Comparing archives cmp archive.1 archive.2 ) +49. append.at:21: ok ./append01.at:34: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -5275,42 +5296,8 @@ tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 tar tf archive ) -49. append.at:21: ok - -./append02.at:57: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - -genfile --file file1 -genfile --file file2 - -# Make sure file timestamps in the archive will not differ -MTIME="--mtime=@0" - -# For PAX archives, we need to make sure extended header names are -# reproducible and that their contents won't change with time -if test $TEST_TAR_FORMAT = posix; then - TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime" -fi -echo Creating archive.1 -tar $MTIME -cf archive.1 file1 file2 - -echo Creating archive.2 -tar $MTIME -cf archive.2 -T /dev/null -tar $MTIME -rf archive.2 file1 -tar $MTIME -rf archive.2 file2 - -echo Comparing archives -cmp archive.1 archive.2 -) -50. append01.at:29: ok -52. append03.at:21: testing append with name transformation ... +48. same-order02.at:25: 52. append03.at:21: testing append with name transformation ... ./append03.at:26: mkdir v7 (cd v7 @@ -5329,31 +5316,28 @@ echo Testing tar tf archive ) - -./append03.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + ok +./append01.at:34: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 - -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing +mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX +touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 tar tf archive ) ./append02.at:57: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -5380,6 +5364,7 @@ echo Comparing archives cmp archive.1 archive.2 ) + 53. append04.at:29: testing append with verify ... ./append04.at:32: mkdir v7 @@ -5408,7 +5393,7 @@ # Verify content of the new archive: tar -tf archive.tar ) -./append03.at:26: +./append02.at:57: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5417,24 +5402,6 @@ export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 - -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -) -./append02.at:57: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - genfile --file file1 genfile --file file2 @@ -5458,6 +5425,42 @@ echo Comparing archives cmp archive.1 archive.2 ) +./append03.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +genfile --file file.1 +genfile --file file.2 + +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive +) +./append03.at:26: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +genfile --file file.1 +genfile --file file.2 + +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive +) ./append04.at:32: mkdir oldgnu (cd oldgnu @@ -5485,7 +5488,7 @@ # Verify content of the new archive: tar -tf archive.tar ) -./append03.at:26: +50. append01.at:29: ./append02.at:57: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -5494,24 +5497,6 @@ export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 - -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -) -./append02.at:57: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - genfile --file file1 genfile --file file2 @@ -5535,12 +5520,13 @@ echo Comparing archives cmp archive.1 archive.2 ) + ok ./append03.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -5553,63 +5539,24 @@ echo Testing tar tf archive ) -./append04.at:32: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - -# Create two empty files: -touch file1 file2 - -# Create an archive: -tar cpfW archive.tar file1 file2 - -# Verify created archive by listing its content: -tar -tf archive.tar -echo == -# Create another empty file: -touch file3 - -# Append it to the already created archive: -tar rpfW archive.tar file3 -# Verify content of the new archive: -tar -tf archive.tar -) -51. append02.at:54: ok -52. append03.at:21: ok - - -./append04.at:32: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +./append03.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -# Create two empty files: -touch file1 file2 - -# Create an archive: -tar cpfW archive.tar file1 file2 - -# Verify created archive by listing its content: -tar -tf archive.tar -echo == -# Create another empty file: -touch file3 - -# Append it to the already created archive: -tar rpfW archive.tar file3 +genfile --file file.1 +genfile --file file.2 -# Verify content of the new archive: -tar -tf archive.tar +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive ) 54. append05.at:32: testing append after changed blocking ... ./append05.at:35: @@ -5642,35 +5589,37 @@ decho 'resulting archive' tar tf archive ) -55. xform-h.at:30: testing transforming hard links on create ... -./xform-h.at:39: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +./append02.at:57: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' +genfile --file file1 +genfile --file file2 +# Make sure file timestamps in the archive will not differ +MTIME="--mtime=@0" -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' +# For PAX archives, we need to make sure extended header names are +# reproducible and that their contents won't change with time +if test $TEST_TAR_FORMAT = posix; then + TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime" +fi +echo Creating archive.1 +tar $MTIME -cf archive.1 file1 file2 -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' +echo Creating archive.2 +tar $MTIME -cf archive.2 -T /dev/null +tar $MTIME -rf archive.2 file1 +tar $MTIME -rf archive.2 file2 +echo Comparing archives +cmp archive.1 archive.2 ) ./append05.at:35: mkdir oldgnu @@ -5703,11 +5652,11 @@ tar tf archive ) ./append04.at:32: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -5729,35 +5678,9 @@ # Verify content of the new archive: tar -tf archive.tar ) -./xform-h.at:39: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - -mkdir basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' +51. append02.at:54: ok +52. append03.at:21: ok -) ./append05.at:35: mkdir ustar (cd ustar @@ -5788,13 +5711,14 @@ decho 'resulting archive' tar tf archive ) -53. append04.at:29: ok + +55. xform-h.at:30: testing transforming hard links on create ... ./xform-h.at:39: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * @@ -5818,7 +5742,33 @@ tar tvf archive | sed -n 's/.*test_link link to //p' ) +./append04.at:32: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * +# Create two empty files: +touch file1 file2 + +# Create an archive: +tar cpfW archive.tar file1 file2 + +# Verify created archive by listing its content: +tar -tf archive.tar +echo == +# Create another empty file: +touch file3 + +# Append it to the already created archive: +tar rpfW archive.tar file3 + +# Verify content of the new archive: +tar -tf archive.tar +) 56. xform01.at:26: testing transformations and GNU volume labels ... ./xform01.at:29: mkdir gnu @@ -5863,37 +5813,7 @@ decho 'resulting archive' tar tf archive ) -./xform-h.at:39: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -mkdir basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - -) 56. xform01.at:26: ok - ./append05.at:35: mkdir gnu (cd gnu @@ -5924,27 +5844,13 @@ decho 'resulting archive' tar tf archive ) -57. xform02.at:21: testing transforming escaped delimiters on create ... -./xform02.at:24: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * -genfile --file file -tar cvf /dev/null file \ - --transform='s/file/other\/name/' \ - --show-transformed-name -) ./xform-h.at:39: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -5968,6 +5874,22 @@ tar tvf archive | sed -n 's/.*test_link link to //p' ) +57. xform02.at:21: testing transforming escaped delimiters on create ... +./xform02.at:24: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +genfile --file file +tar cvf /dev/null file \ + --transform='s/file/other\/name/' \ + --show-transformed-name +) +54. append05.at:32: ok ./xform02.at:24: mkdir oldgnu (cd oldgnu @@ -5982,6 +5904,7 @@ --transform='s/file/other\/name/' \ --show-transformed-name ) + ./xform02.at:24: mkdir ustar (cd ustar @@ -5996,7 +5919,82 @@ --transform='s/file/other\/name/' \ --show-transformed-name ) -54. append05.at:32: ok +58. xform03.at:21: testing transforming hard link targets ... +./xform03.at:24: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +mkdir d +mkdir d/a +genfile --file d/a/b +dir=$(pwd|sed s,^//*,,)/d +tar -cf a.tar --xform="s|^$dir/a|dir/c|" /$dir/a/b /$dir/a/b 2>err +mkdir t +tar -C t -xf a.tar +find t -type f +) +./append04.at:32: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +# Create two empty files: +touch file1 file2 + +# Create an archive: +tar cpfW archive.tar file1 file2 + +# Verify created archive by listing its content: +tar -tf archive.tar +echo == +# Create another empty file: +touch file3 + +# Append it to the already created archive: +tar rpfW archive.tar file3 + +# Verify content of the new archive: +tar -tf archive.tar +) +./xform-h.at:39: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link + + +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + +) +stderr: ./xform02.at:24: mkdir posix (cd posix @@ -6011,8 +6009,25 @@ --transform='s/file/other\/name/' \ --show-transformed-name ) -55. xform-h.at:30: ok +./xform03.at:24: sed "/tar: Removing leading \`\/*\/' from/d" stderr +./xform03.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * +mkdir d +mkdir d/a +genfile --file d/a/b +dir=$(pwd|sed s,^//*,,)/d +tar -cf a.tar --xform="s|^$dir/a|dir/c|" /$dir/a/b /$dir/a/b 2>err +mkdir t +tar -C t -xf a.tar +find t -type f +) ./xform02.at:24: mkdir gnu (cd gnu @@ -6027,13 +6042,44 @@ --transform='s/file/other\/name/' \ --show-transformed-name ) -58. xform03.at:21: testing transforming hard link targets ... +stderr: +57. xform02.at:21: ok +./xform-h.at:39: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link + + +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + +) +./xform03.at:24: sed "/tar: Removing leading \`\/*\/' from/d" stderr ./xform03.at:24: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -6046,8 +6092,10 @@ tar -C t -xf a.tar find t -type f ) +53. append04.at:29: ok -57. xform02.at:21: 59. exclude.at:23: testing exclude ... + +59. exclude.at:23: testing exclude ... ./exclude.at:26: mkdir ustar (cd ustar @@ -6089,28 +6137,7 @@ tar tf archive.tar | sort done ) - ok - stderr: -./xform03.at:24: sed "/tar: Removing leading \`\/*\/' from/d" stderr -./xform03.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - -mkdir d -mkdir d/a -genfile --file d/a/b -dir=$(pwd|sed s,^//*,,)/d -tar -cf a.tar --xform="s|^$dir/a|dir/c|" /$dir/a/b /$dir/a/b 2>err -mkdir t -tar -C t -xf a.tar -find t -type f -) 60. exclude01.at:19: testing exclude wildcards ... ./exclude01.at:22: mkdir v7 @@ -6156,14 +6183,13 @@ rm -rf testdir ) -stderr: ./xform03.at:24: sed "/tar: Removing leading \`\/*\/' from/d" stderr ./xform03.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -6176,109 +6202,44 @@ tar -C t -xf a.tar find t -type f ) -59. exclude.at:23: ok -./exclude01.at:22: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +./xform-h.at:39: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -tar cf archive --exclude=testdir/dir1/\* \ - --no-wildcards \ - --exclude=testdir/dir2/\* \ - --wildcards \ - --exclude=testdir/dir3/\* \ - testdir -tar tf archive | sort -echo "NEXT" -tar cf archive testdir -tar t "testdir/dir1/*" -f archive | sort +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -echo "NEXT" -tar cf archive testdir/dir1 -tar t --no-wildcards "testdir/dir1/*" -f archive | sort -echo "NEXT" -tar cf archive testdir -tar t --wildcards "testdir/dir1/*" -f archive | sort +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -rm -rf testdir ) - stderr: ./xform03.at:24: sed "/tar: Removing leading \`\/*\/' from/d" stderr -61. exclude02.at:19: testing exclude: anchoring ... -./exclude02.at:22: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 - -tar cf archive --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 1" -tar cf archive --no-anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 2" -tar cf archive --anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 3" -tar cf archive testdir file1.txt -tar t "file1.txt" -f archive | sort - -echo "SUB 4" -tar t --no-anchored "file1.txt" -f archive | sort - -echo "SUB 5" -tar t --anchored "file1.txt" -f archive | sort - -rm -rf testdir file1.txt - -) +55. xform-h.at:30: ok ./xform03.at:24: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -6291,14 +6252,12 @@ tar -C t -xf a.tar find t -type f ) -stderr: -./xform03.at:24: sed "/tar: Removing leading \`\/*\/' from/d" stderr ./exclude01.at:22: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -6337,30 +6296,16 @@ rm -rf testdir ) -./xform03.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * -mkdir d -mkdir d/a -genfile --file d/a/b -dir=$(pwd|sed s,^//*,,)/d -tar -cf a.tar --xform="s|^$dir/a|dir/c|" /$dir/a/b /$dir/a/b 2>err -mkdir t -tar -C t -xf a.tar -find t -type f -) +stderr: +./xform03.at:24: sed "/tar: Removing leading \`\/*\/' from/d" stderr +61. exclude02.at:19: testing exclude: anchoring ... ./exclude02.at:22: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * @@ -6403,15 +6348,16 @@ rm -rf testdir file1.txt ) -stderr: -./xform03.at:24: sed "/tar: Removing leading \`\/*\/' from/d" stderr +59. exclude.at:23: ok 58. xform03.at:21: ok -./exclude01.at:22: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + +62. exclude03.at:19: testing exclude: wildcards match slash ... +./exclude03.at:22: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * @@ -6421,6 +6367,7 @@ rm -rf testdir mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 touch testdir/dir1/file1 touch testdir/dir1/\* touch testdir/dir2/file2 @@ -6428,79 +6375,30 @@ touch testdir/dir3/file3 touch testdir/dir3/\* -tar cf archive --exclude=testdir/dir1/\* \ - --no-wildcards \ - --exclude=testdir/dir2/\* \ - --wildcards \ - --exclude=testdir/dir3/\* \ +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ testdir tar tf archive | sort echo "NEXT" tar cf archive testdir -tar t "testdir/dir1/*" -f archive | sort +tar t --wildcards 'testdir/*f*1' -f archive | sort echo "NEXT" -tar cf archive testdir/dir1 -tar t --no-wildcards "testdir/dir1/*" -f archive | sort +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort echo "NEXT" -tar cf archive testdir -tar t --wildcards "testdir/dir1/*" -f archive | sort - -rm -rf testdir -) - -./exclude02.at:22: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 - -tar cf archive --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 1" -tar cf archive --no-anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 2" -tar cf archive --anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 3" -tar cf archive testdir file1.txt -tar t "file1.txt" -f archive | sort - -echo "SUB 4" -tar t --no-anchored "file1.txt" -f archive | sort - -echo "SUB 5" -tar t --anchored "file1.txt" -f archive | sort - -rm -rf testdir file1.txt ) -62. exclude03.at:19: testing exclude: wildcards match slash ... -./exclude03.at:22: + +63. exclude04.at:19: testing exclude: case insensitive ... +./exclude04.at:22: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -6514,42 +6412,45 @@ rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\*f\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 -tar cf archive --exclude='testdir*f*1' \ - --no-wildcards-match-slash \ - --exclude='testdir*f*2' \ - --wildcards-match-slash \ - --exclude='testdir*f*3' \ +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ testdir tar tf archive | sort -echo "NEXT" +echo "SUB 1" tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort -echo "NEXT" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort -echo "NEXT" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort rm -rf testdir ) ./exclude01.at:22: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -6633,11 +6534,11 @@ ) ./exclude02.at:22: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -6680,7 +6581,53 @@ rm -rf testdir file1.txt ) -60. exclude01.at:19: ok +./exclude04.at:22: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +) ./exclude03.at:22: mkdir ustar (cd ustar @@ -6725,13 +6672,56 @@ rm -rf testdir ) +./exclude01.at:22: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort +rm -rf testdir +) ./exclude02.at:22: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -6774,13 +6764,12 @@ rm -rf testdir file1.txt ) -63. exclude04.at:19: testing exclude: case insensitive ... ./exclude04.at:22: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -6866,12 +6855,56 @@ rm -rf testdir ) +./exclude01.at:22: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir +) ./exclude04.at:22: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -6913,15 +6946,12 @@ rm -rf testdir ) -61. exclude02.at:19: ok - -64. exclude05.at:21: testing exclude: lots of excludes ... -./exclude05.at:24: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +./exclude02.at:22: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -6929,26 +6959,39 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 -rm -rf testdir exclfile +rm -rf testdir mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort -tar cf archive --anchored --exclude-from=exclfile \ +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ testdir tar tf archive | sort -echo "NEXT" -tar cf archive --exclude-from=exclfile \ +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ testdir tar tf archive | sort -rm -rf testdir exclfile +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt ) ./exclude03.at:22: @@ -6996,11 +7039,11 @@ ) ./exclude04.at:22: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -7044,12 +7087,13 @@ ) 62. exclude03.at:19: ok -./exclude04.at:22: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +60. exclude01.at:19: ok +./exclude02.at:22: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -7058,39 +7102,77 @@ rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 -tar cf archive --exclude=FILE2 \ - --exclude=file1 \ - --ignore-case \ - --exclude=file3 \ - --no-ignore-case \ - --exclude=FILE2 \ - --exclude=file4 \ +tar cf archive --exclude="file1.txt" \ testdir tar tf archive | sort echo "SUB 1" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort echo "SUB 2" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort echo "SUB 3" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort -rm -rf testdir +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt ) +64. exclude05.at:21: testing exclude: lots of excludes ... +./exclude05.at:24: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +) + 65. exclude06.at:26: testing exclude: long files in pax archives ... ./exclude06.at:31: mkdir pax @@ -7111,55 +7193,9 @@ tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp find out -type f ) -65. exclude06.at:26: ./exclude04.at:22: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 - -tar cf archive --exclude=FILE2 \ - --exclude=file1 \ - --ignore-case \ - --exclude=file3 \ - --no-ignore-case \ - --exclude=FILE2 \ - --exclude=file4 \ - testdir -tar tf archive | sort - -echo "SUB 1" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort - -echo "SUB 2" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort - -echo "SUB 3" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort - -rm -rf testdir - -) - ok +63. exclude04.at:19: ok +61. exclude02.at:19: ok 66. exclude07.at:19: testing exclude: --exclude-backups option ... ./exclude07.at:22: mkdir v7 @@ -7178,6 +7214,9 @@ tar -v -c -f archive --exclude-backups dir ) +65. exclude06.at:26: ok + + ./exclude07.at:22: mkdir oldgnu (cd oldgnu @@ -7195,8 +7234,38 @@ tar -v -c -f archive --exclude-backups dir ) -63. exclude04.at:19: ok +67. exclude08.at:36: testing --exclude-tag option ... +./exclude08.at:39: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort +) +68. exclude09.at:37: testing --exclude-tag option and --listed-incremental ... +./exclude09.at:40: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort +) ./exclude07.at:22: mkdir ustar (cd ustar @@ -7214,13 +7283,12 @@ tar -v -c -f archive --exclude-backups dir ) -67. exclude08.at:36: testing --exclude-tag option ... -./exclude08.at:39: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +68. exclude09.at:37: ./exclude08.at:39: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -7230,6 +7298,7 @@ mkexcltest etest tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort ) + ok ./exclude07.at:22: mkdir posix (cd posix @@ -7247,12 +7316,14 @@ tar -v -c -f archive --exclude-backups dir ) -./exclude08.at:39: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + +69. exclude10.at:38: testing --exclude-tag option in incremental pass ... +./exclude10.at:41: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -7260,7 +7331,15 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkexcltest etest -tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort +rm etest/subdir/excludeme +decho "# Level 0" +tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort +touch etest/subdir/excludeme +touch etest/subdir/otherfile + +decho "# Level 1" +cp snar-0 snar-1 +tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort ) ./exclude07.at:22: mkdir gnu @@ -7295,7 +7374,6 @@ tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort ) 66. exclude07.at:19: ok - ./exclude08.at:39: mkdir posix (cd posix @@ -7311,13 +7389,15 @@ mkexcltest etest tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort ) -68. exclude09.at:37: testing --exclude-tag option and --listed-incremental ... -./exclude09.at:40: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + +69. exclude10.at:38: ok +70. exclude11.at:36: testing --exclude-tag-under option ... +./exclude11.at:39: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * @@ -7325,7 +7405,7 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkexcltest etest -tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort +tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort ) ./exclude08.at:39: mkdir gnu @@ -7342,11 +7422,9 @@ mkexcltest etest tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort ) -68. exclude09.at:37: ok -67. exclude08.at:36: ok -69. exclude10.at:38: testing --exclude-tag option in incremental pass ... -./exclude10.at:41: +71. exclude12.at:37: testing --exclude-tag-under and --listed-incremental ... +./exclude12.at:40: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7359,24 +7437,14 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkexcltest etest -rm etest/subdir/excludeme -decho "# Level 0" -tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort -touch etest/subdir/excludeme -touch etest/subdir/otherfile - -decho "# Level 1" -cp snar-0 snar-1 -tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort +tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort ) - -70. exclude11.at:36: testing --exclude-tag-under option ... ./exclude11.at:39: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -7386,13 +7454,15 @@ mkexcltest etest tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort ) -69. exclude10.at:38: ok +67. exclude08.at:36: ok +71. exclude12.at:37: ok + ./exclude11.at:39: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -7402,9 +7472,8 @@ mkexcltest etest tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort ) - -71. exclude12.at:37: testing --exclude-tag-under and --listed-incremental ... -./exclude12.at:40: +72. exclude13.at:39: testing --exclude-tag-under option in incremental pass ... +./exclude13.at:42: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7417,14 +7486,24 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkexcltest etest -tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort +rm etest/subdir/excludeme +decho "# Level 0" +tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort +touch etest/subdir/excludeme +touch etest/subdir/otherfile + +decho "# Level 1" +cp snar-0 snar-1 +tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort ) -./exclude11.at:39: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + +73. exclude14.at:36: testing --exclude-tag-all option ... +./exclude14.at:39: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * @@ -7432,9 +7511,8 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkexcltest etest -tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort ) -71. exclude12.at:37: ok ./exclude11.at:39: mkdir posix (cd posix @@ -7450,14 +7528,12 @@ mkexcltest etest tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort ) - -72. exclude13.at:39: testing --exclude-tag-under option in incremental pass ... -./exclude13.at:42: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +72. exclude13.at:39: ./exclude14.at:39: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -7465,16 +7541,9 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkexcltest etest -rm etest/subdir/excludeme -decho "# Level 0" -tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort -touch etest/subdir/excludeme -touch etest/subdir/otherfile - -decho "# Level 1" -cp snar-0 snar-1 -tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort ) + ok ./exclude11.at:39: mkdir gnu (cd gnu @@ -7490,9 +7559,6 @@ mkexcltest etest tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort ) -70. exclude11.at:36: ok -72. exclude13.at:39: ok - 74. exclude15.at:36: testing --exclude-tag-all and --listed-incremental ... ./exclude15.at:39: @@ -7510,28 +7576,12 @@ mkexcltest etest tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort ) -73. exclude14.at:36: testing --exclude-tag-all option ... ./exclude14.at:39: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkexcltest etest -tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort -) -./exclude14.at:39: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -7541,7 +7591,7 @@ mkexcltest etest tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort ) -74. exclude15.at:36: ok +70. exclude11.at:36: ok 75. exclude16.at:38: testing --exclude-tag-all option in incremental pass ... ./exclude16.at:41: @@ -7567,21 +7617,7 @@ cp snar-0 snar-1 tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort ) -./exclude14.at:39: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkexcltest etest -tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort -) +74. exclude15.at:36: ok ./exclude14.at:39: mkdir posix (cd posix @@ -7597,22 +7633,6 @@ mkexcltest etest tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort ) -75. exclude16.at:38: ok -./exclude14.at:39: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkexcltest etest -tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort -) 76. exclude17.at:21: testing --exclude-vcs-ignores memory allocation ... ./exclude17.at:24: @@ -7629,42 +7649,27 @@ echo '*.o' >.cvsignore tar -cf - --exclude-vcs-ignores . | tar -tf - ) -./exclude17.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +./exclude14.at:39: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir dir -cd dir -echo '*.o' >.cvsignore -tar -cf - --exclude-vcs-ignores . | tar -tf - -) -73. exclude14.at:36: ok -./exclude17.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * -mkdir dir -cd dir -echo '*.o' >.cvsignore -tar -cf - --exclude-vcs-ignores . | tar -tf - -) +test -z "`sort < /dev/null 2>&1`" || exit 77 +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort +) ./exclude17.at:24: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -7673,6 +7678,8 @@ echo '*.o' >.cvsignore tar -cf - --exclude-vcs-ignores . | tar -tf - ) +73. exclude14.at:36: ok + 77. exclude18.at:30: testing --exclude-vcs extract list compare ... ./exclude18.at:33: mkdir v7 @@ -7721,11 +7728,11 @@ ) ./exclude17.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -7734,8 +7741,39 @@ echo '*.o' >.cvsignore tar -cf - --exclude-vcs-ignores . | tar -tf - ) -76. exclude17.at:21: ok +75. exclude16.at:38: ok + +78. delete01.at:23: testing deleting a member after a big one ... +./delete01.at:26: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar -f - --delete file2 archout +tar tf archout +tar f archive --delete file2 +cmp archive archout) +./exclude17.at:24: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * +mkdir dir +cd dir +echo '*.o' >.cvsignore +tar -cf - --exclude-vcs-ignores . | tar -tf - +) ./exclude18.at:33: mkdir oldgnu (cd oldgnu @@ -7782,13 +7820,26 @@ tar -dvf gitrepo.tar --exclude-vcs gitrepo | sort ) -78. delete01.at:23: testing deleting a member after a big one ... +./exclude17.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo '*.o' >.cvsignore +tar -cf - --exclude-vcs-ignores . | tar -tf - +) ./delete01.at:26: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -7799,12 +7850,14 @@ tar tf archout tar f archive --delete file2 cmp archive archout) +76. exclude17.at:21: ok + ./delete01.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -7815,6 +7868,26 @@ tar tf archout tar f archive --delete file2 cmp archive archout) +79. delete02.at:23: testing deleting a member from stdin archive ... +./delete02.at:26: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2 +tar f - --delete 2 < archive > archive3 +cmp archive2 archive3) ./exclude18.at:33: mkdir ustar (cd ustar @@ -7862,11 +7935,46 @@ ) ./delete01.at:26: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar -f - --delete file2 archout +tar tf archout +tar f archive --delete file2 +cmp archive archout) +./delete02.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2 +tar f - --delete 2 < archive > archive3 +cmp archive2 archive3) +./delete01.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -7923,38 +8031,46 @@ tar -dvf gitrepo.tar --exclude-vcs gitrepo | sort ) -./delete01.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +./delete02.at:26: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar -f - --delete file2 archout -tar tf archout -tar f archive --delete file2 -cmp archive archout) -./delete01.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2 +tar f - --delete 2 < archive > archive3 +cmp archive2 archive3) +78. delete01.at:23: ok + +./delete02.at:26: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar -f - --delete file2 archout -tar tf archout -tar f archive --delete file2 -cmp archive archout) +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2 +tar f - --delete 2 < archive > archive3 +cmp archive2 archive3) ./exclude18.at:33: mkdir gnu (cd gnu @@ -8001,30 +8117,6 @@ tar -dvf gitrepo.tar --exclude-vcs gitrepo | sort ) -78. delete01.at:23: ok - -77. exclude18.at:30: ok -79. delete02.at:23: testing deleting a member from stdin archive ... -./delete02.at:26: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * - -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2 -tar f - --delete 2 < archive > archive3 -cmp archive2 archive3) - 80. delete03.at:21: testing deleting members with long names ... ./delete03.at:26: mkdir gnu @@ -8046,11 +8138,11 @@ tar -tf archive ) ./delete02.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -8064,6 +8156,7 @@ tar tf archive2 tar f - --delete 2 < archive > archive3 cmp archive2 archive3) +77. exclude18.at:30: ok ./delete03.at:26: mkdir oldgnu (cd oldgnu @@ -8083,84 +8176,8 @@ tar --delete -f archive ./${prefix}5 && tar -tf archive ) -./delete02.at:26: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2 -tar f - --delete 2 < archive > archive3 -cmp archive2 archive3) -./delete03.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - - -prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX -rm -f $prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch $prefix$i -done -tar -cf archive ./$prefix* && - tar --delete -f archive ./${prefix}5 && - tar -tf archive -) -./delete02.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2 -tar f - --delete 2 < archive > archive3 -cmp archive2 archive3) -./delete02.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2 -tar f - --delete 2 < archive > archive3 -cmp archive2 archive3) -80. delete03.at:21: ok +79. delete02.at:23: ok 81. delete04.at:23: testing deleting a large last member ... ./delete04.at:26: mkdir v7 @@ -8185,7 +8202,6 @@ tar f archive --delete file10 tar tf archive ) -79. delete02.at:23: ok 82. delete05.at:27: testing deleting non-existing member ... ./delete05.at:30: @@ -8206,28 +8222,24 @@ tar --file archive --blocking-factor=20 --delete tre tar tf archive ) -./delete04.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +./delete03.at:26: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive + +prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX +rm -f $prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch $prefix$i +done +tar -cf archive ./$prefix* && + tar --delete -f archive ./${prefix}5 && + tar -tf archive ) ./delete05.at:30: mkdir oldgnu @@ -8248,11 +8260,11 @@ tar tf archive ) ./delete04.at:26: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -8270,6 +8282,7 @@ tar f archive --delete file10 tar tf archive ) +80. delete03.at:21: ok ./delete05.at:30: mkdir ustar (cd ustar @@ -8288,6 +8301,27 @@ tar --file archive --blocking-factor=20 --delete tre tar tf archive ) + +83. delete06.at:25: testing EOF detection ... +./delete06.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir b +touch a b/1 c +tar -cf archive.tar a b/1 c +case $TEST_TAR_FORMAT in +gnu) size=1500;; +pax) size=3072;; +esac +dd if=archive.tar of=trunc.tar bs=$size count=1 2>/dev/null +tar --delete 'b/' -f trunc.tar +) ./delete05.at:30: mkdir posix (cd posix @@ -8307,11 +8341,11 @@ tar tf archive ) ./delete04.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -8329,6 +8363,25 @@ tar f archive --delete file10 tar tf archive ) +./delete06.at:28: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS="-H pax" +export TAR_OPTIONS +rm -rf * + +mkdir b +touch a b/1 c +tar -cf archive.tar a b/1 c +case $TEST_TAR_FORMAT in +gnu) size=1500;; +pax) size=3072;; +esac +dd if=archive.tar of=trunc.tar bs=$size count=1 2>/dev/null +tar --delete 'b/' -f trunc.tar +) ./delete05.at:30: mkdir gnu (cd gnu @@ -8347,13 +8400,12 @@ tar --file archive --blocking-factor=20 --delete tre tar tf archive ) -82. delete05.at:27: ok ./delete04.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -8371,49 +8423,10 @@ tar f archive --delete file10 tar tf archive ) +82. delete05.at:27: ok +83. delete06.at:25: ok -83. delete06.at:25: testing EOF detection ... -./delete06.at:28: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -mkdir b -touch a b/1 c -tar -cf archive.tar a b/1 c -case $TEST_TAR_FORMAT in -gnu) size=1500;; -pax) size=3072;; -esac -dd if=archive.tar of=trunc.tar bs=$size count=1 2>/dev/null -tar --delete 'b/' -f trunc.tar -) -81. delete04.at:23: ok -./delete06.at:28: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * - -mkdir b -touch a b/1 c -tar -cf archive.tar a b/1 c -case $TEST_TAR_FORMAT in -gnu) size=1500;; -pax) size=3072;; -esac -dd if=archive.tar of=trunc.tar bs=$size count=1 2>/dev/null -tar --delete 'b/' -f trunc.tar -) -83. delete06.at:25: ok 84. extrac01.at:23: testing extract over an existing directory ... ./extrac01.at:26: mkdir v7 @@ -8429,21 +8442,6 @@ tar cf archive directory || exit 1 tar xf archive --warning=no-timestamp || exit 1 ) - -./extrac01.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -) 85. extrac02.at:23: testing extracting symlinks over an existing file ... ./extrac02.at:28: mkdir v7 @@ -8462,11 +8460,11 @@ tar xf archive ) ./extrac01.at:26: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -8475,6 +8473,29 @@ tar cf archive directory || exit 1 tar xf archive --warning=no-timestamp || exit 1 ) +./delete04.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive +) ./extrac02.at:28: mkdir oldgnu (cd oldgnu @@ -8491,20 +8512,6 @@ touch link tar xf archive ) -./extrac01.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -) ./extrac02.at:28: mkdir ustar (cd ustar @@ -8522,11 +8529,11 @@ tar xf archive ) ./extrac01.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -8551,7 +8558,35 @@ touch link tar xf archive ) -84. extrac01.at:23: ok +./extrac01.at:26: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +) +81. delete04.at:23: ok +./extrac01.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +) ./extrac02.at:28: mkdir gnu (cd gnu @@ -8583,7 +8618,7 @@ tar -cPvf archive directory/../directory echo separator tar -xPvf archive --warning=no-timestamp) -85. extrac02.at:23: ok +84. extrac01.at:23: ok ./extrac03.at:26: mkdir oldgnu (cd oldgnu @@ -8597,6 +8632,7 @@ tar -cPvf archive directory/../directory echo separator tar -xPvf archive --warning=no-timestamp) +85. extrac02.at:23: ok ./extrac03.at:26: mkdir ustar @@ -8637,83 +8673,6 @@ --exclude='d*/*1' \ --exclude='d*/s*/*2' | sort ) -./extrac03.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp) -./extrac04.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) -./extrac03.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp) -86. extrac03.at:23: ok -./extrac04.at:26: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) 88. extrac05.at:30: testing extracting selected members from pax ... ./extrac05.at:38: @@ -8740,7 +8699,7 @@ cd .. ) -./extrac04.at:26: +./extrac03.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8749,6 +8708,19 @@ export TAR_OPTIONS rm -rf * +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) +./extrac04.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + test -z "`sort < /dev/null 2>&1`" || exit 77 @@ -8765,8 +8737,7 @@ --exclude='d*/*1' \ --exclude='d*/s*/*2' | sort ) -88. extrac05.at:30: ok -./extrac04.at:26: +./extrac03.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -8775,22 +8746,12 @@ export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) +88. extrac05.at:30: ok +86. extrac03.at:23: ok 89. extrac06.at:34: testing mode of extracted directories ... ./extrac06.at:37: @@ -8830,43 +8791,30 @@ # After both restores, the directory mode should be 755 ) -87. extrac04.at:23: ok -./extrac06.at:37: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +./extrac04.at:26: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" +test -z "`sort < /dev/null 2>&1`" || exit 77 -# Create a directory +touch file1 mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory - -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort ) 90. extrac07.at:27: testing extracting symlinks to a read-only dir ... @@ -8906,11 +8854,11 @@ tar -C out -xvf archive ) ./extrac06.at:37: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -8942,8 +8890,7 @@ # After both restores, the directory mode should be 755 ) -90. extrac07.at:27: ok -./extrac06.at:37: +./extrac04.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8953,6 +8900,33 @@ rm -rf * +test -z "`sort < /dev/null 2>&1`" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) +90. extrac07.at:27: ok + +./extrac06.at:37: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + + # Force umask umask 022 @@ -8980,7 +8954,6 @@ # After both restores, the directory mode should be 755 ) - 91. extrac08.at:33: testing restoring mode on existing directory ... ./extrac08.at:36: mkdir v7 @@ -9000,7 +8973,7 @@ tar xfv test.tar --warning=no-timestamp genfile --stat=mode.777 dir ) -./extrac06.at:37: +./extrac04.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -9010,6 +8983,49 @@ rm -rf * +test -z "`sort < /dev/null 2>&1`" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) +./extrac08.at:36: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +) +./extrac06.at:37: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + # Force umask umask 022 @@ -9037,23 +9053,43 @@ # After both restores, the directory mode should be 755 ) -./extrac08.at:36: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +87. extrac04.at:23: ok +./extrac06.at:37: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir + +# Force umask +umask 022 + +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" + +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 ) ./extrac08.at:36: mkdir ustar @@ -9073,26 +9109,7 @@ tar xfv test.tar --warning=no-timestamp genfile --stat=mode.777 dir ) -89. extrac06.at:34: ok -./extrac08.at:36: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -) 92. extrac09.at:34: testing extracting even when . and .. are unreadable ... ./extrac09.at:37: mkdir gnu @@ -9127,6 +9144,27 @@ cmp f extract/f || status=$? exit $status ) +89. extrac06.at:34: ok +./extrac08.at:36: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +) + +92. extrac09.at:34: ok ./extrac08.at:36: mkdir gnu (cd gnu @@ -9145,10 +9183,6 @@ tar xfv test.tar --warning=no-timestamp genfile --stat=mode.777 dir ) -92. extrac09.at:34: ok -91. extrac08.at:33: ok - - 93. extrac10.at:29: testing -C and delayed setting of metadata ... ./extrac10.at:32: mkdir gnu @@ -9168,6 +9202,7 @@ diff -r d x/d && diff e x/y/e ) + 94. extrac11.at:25: testing scarce file descriptors ... ./extrac11.at:28: mkdir gnu @@ -9237,6 +9272,8 @@ ) || { diff -r a dest3/a; exit 1; } ) 93. extrac10.at:29: ok +91. extrac08.at:33: ok + 95. extrac12.at:25: testing extract dot permissions ... ./extrac12.at:28: @@ -9258,10 +9295,6 @@ cmp src/file1 dst/file1 && cmp src/file2 dst/file2 ) -94. extrac11.at:25: ok -95. extrac12.at:25: ok - - 96. extrac13.at:26: testing extract over symlinks ... ./extrac13.at:29: mkdir gnu @@ -9295,6 +9328,10 @@ diff src/file1 dst3/file1 && diff src/file1 dst3/target1 ) +94. extrac11.at:25: ok +95. extrac12.at:25: ok + + 97. extrac14.at:25: testing extract -C symlink ... ./extrac14.at:28: mkdir gnu @@ -9312,10 +9349,6 @@ tar -xf archive.tar -C symlink --warning=no-timestamp && cmp foo dest/foo ) -97. extrac14.at:25: ok -96. extrac13.at:26: ok - - 98. extrac15.at:25: testing extract parent mkdir failure ... ./extrac15.at:28: mkdir gnu @@ -9345,6 +9378,10 @@ else (exit 0) fi ) +96. extrac13.at:26: ok +97. extrac14.at:25: ok + +98. extrac15.at:25: ok 99. extrac16.at:26: testing extract empty directory with -C ... ./extrac16.at:29: mkdir gnu @@ -9361,8 +9398,6 @@ tar -cf archive.tar -C src a && tar -xf archive.tar -C dest ) -99. extrac16.at:26: ok -98. extrac15.at:25: ok 100. extrac17.at:21: testing name matching/transformation ordering ... @@ -9409,6 +9444,7 @@ cat a ) +99. extrac16.at:26: ok ./extrac17.at:34: mkdir oldgnu (cd oldgnu @@ -9451,6 +9487,7 @@ cat a ) + ./extrac17.at:34: mkdir ustar (cd ustar @@ -9469,12 +9506,13 @@ tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ dir/subdir1/ ) -./extrac18.at:37: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +102. extrac19.at:21: testing skip-old-files ... +./extrac19.at:24: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * @@ -9488,35 +9526,41 @@ rm b echo 'File a' > a -tar -x -k -f ../archive +tar -x --skip-old-files -f ../archive echo status=$? cat a ) -./extrac17.at:34: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +./extrac18.at:37: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b -tar cf dir.tar dir +tar cf ../archive . -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ - dir/subdir1/ +rm b +echo 'File a' > a + +tar -x -k -f ../archive +echo status=$? + +cat a ) -./extrac18.at:37: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +./extrac19.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -9530,17 +9574,17 @@ rm b echo 'File a' > a -tar -x -k -f ../archive +tar -x --skip-old-files -f ../archive echo status=$? cat a ) ./extrac17.at:34: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -9554,11 +9598,11 @@ dir/subdir1/ ) ./extrac18.at:37: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -9577,17 +9621,12 @@ cat a ) -100. extrac17.at:21: ok -101. extrac18.at:34: ok - - -102. extrac19.at:21: testing skip-old-files ... ./extrac19.at:24: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -9606,85 +9645,12 @@ cat a ) -103. extrac20.at:21: testing keep-directory-symlink ... -./extrac20.at:24: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -for i in a b c -do - dir=in$i - mkdir -p $dir/root/dir $dir/root/dirsymlink - touch $dir/root/dirsymlink/file$i - test $i != a && touch $dir/root/dirsymlink/file.conflict - tar cf archive$i.tar -C $dir root -done - -prep() -{ - echo "== $1 ==" - echo "== $1 ==" >&2 - backup_dir=$1 - dir=out - mkdir -p $dir/root/dir - ln -s dir $dir/root/dirsymlink - test $round = normal && cd $dir >/dev/null -} - -clean() -{ - test $round = normal && cd .. >/dev/null - find $dir | sort - mv $dir $backup_dir -} - -# Expand to '-f ../$1' or '-f $1 -C $dir' depending on $round variable -file_spec() -{ - if test $round = normal - then - echo "-f ../$1" - else - echo "-f $1 -C $dir" - fi -} - -for round in normal dir -do - # Check that 'dirsymlink' replaces 'dir' - prep without_option_$round - tar -x `file_spec archivea.tar` || exit 1 - tar -x `file_spec archiveb.tar` || exit 1 - clean - - # Keep directory symlink must keep root/dirsymlink - prep with_option_$round - tar -x --keep-directory-symlink `file_spec archivea.tar` || exit 1 - tar -x --keep-directory-symlink `file_spec archiveb.tar` || exit 1 - clean - - prep collision_$round - tar -x --keep-directory-symlink `file_spec archivea.tar` --keep-old-files || exit 1 - tar -x --keep-directory-symlink `file_spec archiveb.tar` --keep-old-files || exit 1 - tar -x --keep-directory-symlink `file_spec archivec.tar` --keep-old-files && exit 1 - clean -done -) -./extrac19.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +./extrac18.at:37: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -9698,34 +9664,28 @@ rm b echo 'File a' > a -tar -x --skip-old-files -f ../archive +tar -x -k -f ../archive echo status=$? cat a ) -./extrac19.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +./extrac17.at:34: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir dir -cd dir -echo 'Old file a' > a -echo 'Old file b' > b - -tar cf ../archive . - -rm b -echo 'File a' > a +mkdir dir dir/subdir1 dir/subdir2 out +genfile --file dir/subdir1/file1 +genfile --file dir/subdir2/file2 -tar -x --skip-old-files -f ../archive -echo status=$? +tar cf dir.tar dir -cat a +tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ + dir/subdir1/ ) ./extrac19.at:24: mkdir posix @@ -9751,6 +9711,8 @@ cat a ) +100. extrac17.at:21: ok +101. extrac18.at:34: ok ./extrac19.at:24: mkdir gnu (cd gnu @@ -9775,45 +9737,15 @@ cat a ) -102. extrac19.at:21: ok - -104. extrac21.at:31: testing delay-directory-restore ... -./extrac21.at:33: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 -mkdir a a/b a/c -genfile --file a/b/D -genfile --file a/c/A -cd a/b -ln -sf ../c/A -cd ../.. -chmod a-w a/b -tar --no-recurs -c -f A.tar a a/b a/b/D a/c a/b/A a/c/A -mkdir out -tar -C out -v -x -f A.tar --delay-directory-restore -) -104. extrac21.at:31: ok +103. extrac20.at:21: testing keep-directory-symlink ... ./extrac20.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * @@ -9880,6 +9812,37 @@ clean done ) +102. extrac19.at:21: 104. extrac21.at:31: testing delay-directory-restore ... +./extrac21.at:33: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +mkdir a a/b a/c +genfile --file a/b/D +genfile --file a/c/A +cd a/b +ln -sf ../c/A +cd ../.. +chmod a-w a/b +tar --no-recurs -c -f A.tar a a/b a/b/D a/c a/b/A a/c/A +mkdir out +tar -C out -v -x -f A.tar --delay-directory-restore +) + ok 105. extrac22.at:19: testing delay-directory-restore on reversed ordering ... ./extrac22.at:29: @@ -9929,6 +9892,37 @@ # Previous versions of tar would fail here with the following diagnostics: # tar: ./dir2/data2: Cannot unlink: Permission denied ) +104. extrac21.at:31: ok + +106. extrac23.at:18: testing --no-overwrite-dir ... +./extrac23.at:32: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +# Test if the directory permissions are restored properly. +mkdir dir +chmod 755 dir +tar cf a.tar dir +chmod 777 dir +tar -xf a.tar --no-overwrite-dir +genfile --stat=mode.777 dir + +# Test if temporary permissions are set correctly to allow the owner +# to write to the directory. +genfile --file dir/file +tar cf a.tar dir +rm dir/file +chmod 400 dir +tar -xf a.tar --no-overwrite-dir +genfile --stat=mode.777 dir +chmod 700 dir +find dir +) ./extrac22.at:29: mkdir oldgnu (cd oldgnu @@ -9976,6 +9970,34 @@ # Previous versions of tar would fail here with the following diagnostics: # tar: ./dir2/data2: Cannot unlink: Permission denied ) +./extrac23.at:32: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +# Test if the directory permissions are restored properly. +mkdir dir +chmod 755 dir +tar cf a.tar dir +chmod 777 dir +tar -xf a.tar --no-overwrite-dir +genfile --stat=mode.777 dir + +# Test if temporary permissions are set correctly to allow the owner +# to write to the directory. +genfile --file dir/file +tar cf a.tar dir +rm dir/file +chmod 400 dir +tar -xf a.tar --no-overwrite-dir +genfile --stat=mode.777 dir +chmod 700 dir +find dir +) ./extrac22.at:29: mkdir ustar (cd ustar @@ -10023,6 +10045,34 @@ # Previous versions of tar would fail here with the following diagnostics: # tar: ./dir2/data2: Cannot unlink: Permission denied ) +./extrac23.at:32: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +# Test if the directory permissions are restored properly. +mkdir dir +chmod 755 dir +tar cf a.tar dir +chmod 777 dir +tar -xf a.tar --no-overwrite-dir +genfile --stat=mode.777 dir + +# Test if temporary permissions are set correctly to allow the owner +# to write to the directory. +genfile --file dir/file +tar cf a.tar dir +rm dir/file +chmod 400 dir +tar -xf a.tar --no-overwrite-dir +genfile --stat=mode.777 dir +chmod 700 dir +find dir +) ./extrac22.at:29: mkdir posix (cd posix @@ -10071,11 +10121,11 @@ # tar: ./dir2/data2: Cannot unlink: Permission denied ) ./extrac20.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -10142,6 +10192,34 @@ clean done ) +./extrac23.at:32: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +# Test if the directory permissions are restored properly. +mkdir dir +chmod 755 dir +tar cf a.tar dir +chmod 777 dir +tar -xf a.tar --no-overwrite-dir +genfile --stat=mode.777 dir + +# Test if temporary permissions are set correctly to allow the owner +# to write to the directory. +genfile --file dir/file +tar cf a.tar dir +rm dir/file +chmod 400 dir +tar -xf a.tar --no-overwrite-dir +genfile --stat=mode.777 dir +chmod 700 dir +find dir +) ./extrac22.at:29: mkdir gnu (cd gnu @@ -10189,15 +10267,12 @@ # Previous versions of tar would fail here with the following diagnostics: # tar: ./dir2/data2: Cannot unlink: Permission denied ) -105. extrac22.at:19: ok - -106. extrac23.at:18: testing --no-overwrite-dir ... ./extrac23.at:32: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -10220,79 +10295,46 @@ chmod 700 dir find dir ) -./extrac20.at:24: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +105. extrac22.at:19: ok +106. extrac23.at:18: ok + +107. extrac24.at:18: testing --to-stdout ... +./extrac24.at:29: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * +mkdir dir/ +echo TEXT > dir/file +tar cf a.tar dir +rm -r dir +tar --extract --to-stdout --file a.tar +test -d dir +) -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -for i in a b c -do - dir=in$i - mkdir -p $dir/root/dir $dir/root/dirsymlink - touch $dir/root/dirsymlink/file$i - test $i != a && touch $dir/root/dirsymlink/file.conflict - tar cf archive$i.tar -C $dir root -done - -prep() -{ - echo "== $1 ==" - echo "== $1 ==" >&2 - backup_dir=$1 - dir=out - mkdir -p $dir/root/dir - ln -s dir $dir/root/dirsymlink - test $round = normal && cd $dir >/dev/null -} - -clean() -{ - test $round = normal && cd .. >/dev/null - find $dir | sort - mv $dir $backup_dir -} - -# Expand to '-f ../$1' or '-f $1 -C $dir' depending on $round variable -file_spec() -{ - if test $round = normal - then - echo "-f ../$1" - else - echo "-f $1 -C $dir" - fi -} - -for round in normal dir -do - # Check that 'dirsymlink' replaces 'dir' - prep without_option_$round - tar -x `file_spec archivea.tar` || exit 1 - tar -x `file_spec archiveb.tar` || exit 1 - clean +108. extrac25.at:18: testing extract over parent dir that is dangling symlink ... +./extrac25.at:21: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * - # Keep directory symlink must keep root/dirsymlink - prep with_option_$round - tar -x --keep-directory-symlink `file_spec archivea.tar` || exit 1 - tar -x --keep-directory-symlink `file_spec archiveb.tar` || exit 1 - clean +mkdir subdir +touch subdir/a.txt +tar -cf test.tar subdir/a.txt - prep collision_$round - tar -x --keep-directory-symlink `file_spec archivea.tar` --keep-old-files || exit 1 - tar -x --keep-directory-symlink `file_spec archiveb.tar` --keep-old-files || exit 1 - tar -x --keep-directory-symlink `file_spec archivec.tar` --keep-old-files && exit 1 - clean -done +rm -rf subdir +ln -s does_not_exist subdir +tar -xvf test.tar ) -./extrac23.at:32: +./extrac24.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -10301,26 +10343,14 @@ export TAR_OPTIONS rm -rf * -# Test if the directory permissions are restored properly. -mkdir dir -chmod 755 dir -tar cf a.tar dir -chmod 777 dir -tar -xf a.tar --no-overwrite-dir -genfile --stat=mode.777 dir - -# Test if temporary permissions are set correctly to allow the owner -# to write to the directory. -genfile --file dir/file +mkdir dir/ +echo TEXT > dir/file tar cf a.tar dir -rm dir/file -chmod 400 dir -tar -xf a.tar --no-overwrite-dir -genfile --stat=mode.777 dir -chmod 700 dir -find dir +rm -r dir +tar --extract --to-stdout --file a.tar +test -d dir ) -./extrac23.at:32: +./extrac20.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -10329,90 +10359,6 @@ export TAR_OPTIONS rm -rf * -# Test if the directory permissions are restored properly. -mkdir dir -chmod 755 dir -tar cf a.tar dir -chmod 777 dir -tar -xf a.tar --no-overwrite-dir -genfile --stat=mode.777 dir - -# Test if temporary permissions are set correctly to allow the owner -# to write to the directory. -genfile --file dir/file -tar cf a.tar dir -rm dir/file -chmod 400 dir -tar -xf a.tar --no-overwrite-dir -genfile --stat=mode.777 dir -chmod 700 dir -find dir -) -./extrac23.at:32: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -# Test if the directory permissions are restored properly. -mkdir dir -chmod 755 dir -tar cf a.tar dir -chmod 777 dir -tar -xf a.tar --no-overwrite-dir -genfile --stat=mode.777 dir - -# Test if temporary permissions are set correctly to allow the owner -# to write to the directory. -genfile --file dir/file -tar cf a.tar dir -rm dir/file -chmod 400 dir -tar -xf a.tar --no-overwrite-dir -genfile --stat=mode.777 dir -chmod 700 dir -find dir -) -./extrac23.at:32: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -# Test if the directory permissions are restored properly. -mkdir dir -chmod 755 dir -tar cf a.tar dir -chmod 777 dir -tar -xf a.tar --no-overwrite-dir -genfile --stat=mode.777 dir - -# Test if temporary permissions are set correctly to allow the owner -# to write to the directory. -genfile --file dir/file -tar cf a.tar dir -rm dir/file -chmod 400 dir -tar -xf a.tar --no-overwrite-dir -genfile --stat=mode.777 dir -chmod 700 dir -find dir -) -./extrac20.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - test -z "`sort < /dev/null 2>&1`" || exit 77 @@ -10476,26 +10422,7 @@ clean done ) -106. extrac23.at:18: ok - -107. extrac24.at:18: testing --to-stdout ... -./extrac24.at:29: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * - -mkdir dir/ -echo TEXT > dir/file -tar cf a.tar dir -rm -r dir -tar --extract --to-stdout --file a.tar -test -d dir -) -./extrac24.at:29: +./extrac25.at:21: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -10504,12 +10431,13 @@ export TAR_OPTIONS rm -rf * -mkdir dir/ -echo TEXT > dir/file -tar cf a.tar dir -rm -r dir -tar --extract --to-stdout --file a.tar -test -d dir +mkdir subdir +touch subdir/a.txt +tar -cf test.tar subdir/a.txt + +rm -rf subdir +ln -s does_not_exist subdir +tar -xvf test.tar ) ./extrac24.at:29: mkdir ustar @@ -10527,28 +10455,29 @@ tar --extract --to-stdout --file a.tar test -d dir ) -./extrac24.at:29: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +./extrac25.at:21: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir dir/ -echo TEXT > dir/file -tar cf a.tar dir -rm -r dir -tar --extract --to-stdout --file a.tar -test -d dir +mkdir subdir +touch subdir/a.txt +tar -cf test.tar subdir/a.txt + +rm -rf subdir +ln -s does_not_exist subdir +tar -xvf test.tar ) ./extrac24.at:29: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -10559,15 +10488,12 @@ tar --extract --to-stdout --file a.tar test -d dir ) -107. extrac24.at:18: ok - -108. extrac25.at:18: testing extract over parent dir that is dangling symlink ... ./extrac25.at:21: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -10579,30 +10505,28 @@ ln -s does_not_exist subdir tar -xvf test.tar ) -103. extrac20.at:21: ok -./extrac25.at:21: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +./extrac24.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir subdir -touch subdir/a.txt -tar -cf test.tar subdir/a.txt - -rm -rf subdir -ln -s does_not_exist subdir -tar -xvf test.tar +mkdir dir/ +echo TEXT > dir/file +tar cf a.tar dir +rm -r dir +tar --extract --to-stdout --file a.tar +test -d dir ) ./extrac25.at:21: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -10614,7 +10538,9 @@ ln -s does_not_exist subdir tar -xvf test.tar ) +107. extrac24.at:18: ok +108. extrac25.at:18: ok 109. backup01.at:33: testing extracting existing dir with --backup ... ./backup01.at:36: mkdir v7 @@ -10631,23 +10557,6 @@ tar cf test.tar dir1 dir2 tar xfv test.tar --backup --warning=no-timestamp ) -./extrac25.at:21: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -mkdir subdir -touch subdir/a.txt -tar -cf test.tar subdir/a.txt - -rm -rf subdir -ln -s does_not_exist subdir -tar -xvf test.tar -) ./backup01.at:36: mkdir oldgnu (cd oldgnu @@ -10663,23 +10572,79 @@ tar cf test.tar dir1 dir2 tar xfv test.tar --backup --warning=no-timestamp ) -./extrac25.at:21: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +./extrac20.at:24: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir subdir -touch subdir/a.txt -tar -cf test.tar subdir/a.txt -rm -rf subdir -ln -s does_not_exist subdir -tar -xvf test.tar +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +for i in a b c +do + dir=in$i + mkdir -p $dir/root/dir $dir/root/dirsymlink + touch $dir/root/dirsymlink/file$i + test $i != a && touch $dir/root/dirsymlink/file.conflict + tar cf archive$i.tar -C $dir root +done + +prep() +{ + echo "== $1 ==" + echo "== $1 ==" >&2 + backup_dir=$1 + dir=out + mkdir -p $dir/root/dir + ln -s dir $dir/root/dirsymlink + test $round = normal && cd $dir >/dev/null +} + +clean() +{ + test $round = normal && cd .. >/dev/null + find $dir | sort + mv $dir $backup_dir +} + +# Expand to '-f ../$1' or '-f $1 -C $dir' depending on $round variable +file_spec() +{ + if test $round = normal + then + echo "-f ../$1" + else + echo "-f $1 -C $dir" + fi +} + +for round in normal dir +do + # Check that 'dirsymlink' replaces 'dir' + prep without_option_$round + tar -x `file_spec archivea.tar` || exit 1 + tar -x `file_spec archiveb.tar` || exit 1 + clean + + # Keep directory symlink must keep root/dirsymlink + prep with_option_$round + tar -x --keep-directory-symlink `file_spec archivea.tar` || exit 1 + tar -x --keep-directory-symlink `file_spec archiveb.tar` || exit 1 + clean + + prep collision_$round + tar -x --keep-directory-symlink `file_spec archivea.tar` --keep-old-files || exit 1 + tar -x --keep-directory-symlink `file_spec archiveb.tar` --keep-old-files || exit 1 + tar -x --keep-directory-symlink `file_spec archivec.tar` --keep-old-files && exit 1 + clean +done ) + ./backup01.at:36: mkdir ustar (cd ustar @@ -10695,6 +10660,25 @@ tar cf test.tar dir1 dir2 tar xfv test.tar --backup --warning=no-timestamp ) +110. difflink.at:17: testing link mismatch ... +./difflink.at:19: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir a +genfile -f a/x +ln -s x a/y +ln a/x a/z +tar cf a.tar a/x a/y a/z +rm a/z +ln -s x a/z +tar df a.tar +) ./backup01.at:36: mkdir posix (cd posix @@ -10710,7 +10694,7 @@ tar cf test.tar dir1 dir2 tar xfv test.tar --backup --warning=no-timestamp ) -108. extrac25.at:18: ok +110. difflink.at:17: ok ./backup01.at:36: mkdir gnu (cd gnu @@ -10727,28 +10711,6 @@ tar xfv test.tar --backup --warning=no-timestamp ) -110. difflink.at:17: testing link mismatch ... -./difflink.at:19: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - -mkdir a -genfile -f a/x -ln -s x a/y -ln a/x a/z -tar cf a.tar a/x a/y a/z -rm a/z -ln -s x a/z -tar df a.tar -) -109. backup01.at:33: ok - -110. difflink.at:17: ok 111. label01.at:21: testing single-volume label ... ./label01.at:24: mkdir gnu @@ -10764,24 +10726,42 @@ tar -cf archive --label=Test foo bar tar tf archive ) - -112. label02.at:21: testing multi-volume label ... -./label02.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +./exclude05.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -exec <&- -genfile --length 0 --file foo -genfile --length 12288 --file bar -genfile --length 12288 --file baz -tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz -tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + ) +109. backup01.at:33: ok ./label01.at:24: mkdir oldgnu (cd oldgnu @@ -10796,6 +10776,7 @@ tar -cf archive --label=Test foo bar tar tf archive ) + ./label01.at:24: mkdir posix (cd posix @@ -10810,6 +10791,24 @@ tar -cf archive --label=Test foo bar tar tf archive ) +112. label02.at:21: testing multi-volume label ... +./label02.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +) +111. label01.at:21: ok ./label02.at:24: mkdir oldgnu (cd oldgnu @@ -10826,7 +10825,7 @@ tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar ) -111. label01.at:21: ok + ./label02.at:24: mkdir posix (cd posix @@ -10843,7 +10842,6 @@ tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar ) - 113. label03.at:27: testing test-label option ... ./label03.at:30: mkdir gnu @@ -10877,6 +10875,78 @@ decho "# Test label: wildcards" tar --test-label --file=iamanarchive --wildcards '*label'; echo $? ) +./extrac20.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +for i in a b c +do + dir=in$i + mkdir -p $dir/root/dir $dir/root/dirsymlink + touch $dir/root/dirsymlink/file$i + test $i != a && touch $dir/root/dirsymlink/file.conflict + tar cf archive$i.tar -C $dir root +done + +prep() +{ + echo "== $1 ==" + echo "== $1 ==" >&2 + backup_dir=$1 + dir=out + mkdir -p $dir/root/dir + ln -s dir $dir/root/dirsymlink + test $round = normal && cd $dir >/dev/null +} + +clean() +{ + test $round = normal && cd .. >/dev/null + find $dir | sort + mv $dir $backup_dir +} + +# Expand to '-f ../$1' or '-f $1 -C $dir' depending on $round variable +file_spec() +{ + if test $round = normal + then + echo "-f ../$1" + else + echo "-f $1 -C $dir" + fi +} + +for round in normal dir +do + # Check that 'dirsymlink' replaces 'dir' + prep without_option_$round + tar -x `file_spec archivea.tar` || exit 1 + tar -x `file_spec archiveb.tar` || exit 1 + clean + + # Keep directory symlink must keep root/dirsymlink + prep with_option_$round + tar -x --keep-directory-symlink `file_spec archivea.tar` || exit 1 + tar -x --keep-directory-symlink `file_spec archiveb.tar` || exit 1 + clean + + prep collision_$round + tar -x --keep-directory-symlink `file_spec archivea.tar` --keep-old-files || exit 1 + tar -x --keep-directory-symlink `file_spec archiveb.tar` --keep-old-files || exit 1 + tar -x --keep-directory-symlink `file_spec archivec.tar` --keep-old-files && exit 1 + clean +done +) 112. label02.at:21: ok 114. label04.at:27: testing label with non-create option ... @@ -10948,24 +11018,6 @@ decho "# Update: right label" tar -rf archive --label='New volume' file ) -./label04.at:30: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive --label='New volume' file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive --label='New volume' file -) ./label03.at:30: mkdir posix (cd posix @@ -10998,34 +11050,34 @@ decho "# Test label: wildcards" tar --test-label --file=iamanarchive --wildcards '*label'; echo $? ) -114. label04.at:27: ok - -115. label05.at:24: testing label with non-create option ... -./label05.at:27: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +./label04.at:30: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * exec <&- genfile --file file decho "# Create volume" -tar -c -f archive file +tar -c -f archive --label='New volume' file decho "# Update: wrong label" tar -rf archive --label='My volume' file; echo $? decho "# Update: right label" -tar -rf archive file +tar -rf archive --label='New volume' file ) +114. label04.at:27: ok + 113. label03.at:27: ok +115. label05.at:24: testing label with non-create option ... ./label05.at:27: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -11079,6 +11131,25 @@ tar cfv archive --listed=list structure ) ./label05.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive file +) +103. extrac20.at:21: ok +./label05.at:27: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11096,8 +11167,8 @@ decho "# Update: right label" tar -rf archive file ) -115. label05.at:24: ok +115. label05.at:24: ok 117. incr01.at:27: testing restore broken symlinks from incremental ... ./incr01.at:30: mkdir gnu @@ -11123,6 +11194,54 @@ echo separator tar xvfg archive.1 /dev/null --warning=no-timestamp ) + +118. incr02.at:32: testing restoring timestamps from incremental ... +./incr02.at:35: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, 'dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +) ./incr01.at:30: mkdir oldgnu (cd oldgnu @@ -11173,8 +11292,8 @@ ) 117. incr01.at:27: ok -118. incr02.at:32: testing restoring timestamps from incremental ... -./incr02.at:35: +119. listed01.at:26: testing --listed for individual files ... +./listed01.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11184,76 +11303,31 @@ rm -rf * ckmtime || exit 77 -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file - -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts - -# Create an archive. Using incremental mode makes sure the -# archive will have a directory-first member ordering, -# i.e.: -# dir/ -# dir/subdir1/ -# dir/subdir2/ -# dir/subdir1/foofile -# -# When restoring from this directory structure, 'dir/subdir2/' used to -# trigger apply_nonancestor_delayed_set_stat() which restored stats for -# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the -# latter clobbered the directory timestamp. - -tar -cf archive -g db dir - -# Move away the directory -mv dir orig - -# Wait enough time for timestamps to differ in case of failure. -sleep 5 - -# Restore the directory -tar -xf archive dir - -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - -) -./exclude05.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +# Let the things settle +sleep 1 -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done +tar --create \ + --file=archive.1 \ + --listed-incremental=listing \ + directory/file* -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile +tar tf archive.1 || exit 1 -tar cf archive --anchored --exclude-from=exclfile \ - testdir -tar tf archive | sort +sleep 2 -echo "NEXT" -tar cf archive --exclude-from=exclfile \ - testdir -tar tf archive | sort +genfile --length 10240 --pattern zeros --file directory/file2 -rm -rf testdir exclfile +echo "separator" +cp listing listing.old +tar --create \ + --file=archive.2 \ + --listed-incremental=listing \ + directory/file* || exit 1 +tar tf archive.2 || exit 1 ) ./incremental.at:26: mkdir oldgnu @@ -11293,7 +11367,7 @@ echo y >structure/file tar cfv archive --listed=list structure ) -./incr02.at:35: +./listed01.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11303,79 +11377,31 @@ rm -rf * ckmtime || exit 77 -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts - -# Create an archive. Using incremental mode makes sure the -# archive will have a directory-first member ordering, -# i.e.: -# dir/ -# dir/subdir1/ -# dir/subdir2/ -# dir/subdir1/foofile -# -# When restoring from this directory structure, 'dir/subdir2/' used to -# trigger apply_nonancestor_delayed_set_stat() which restored stats for -# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the -# latter clobbered the directory timestamp. - -tar -cf archive -g db dir - -# Move away the directory -mv dir orig - -# Wait enough time for timestamps to differ in case of failure. -sleep 5 - -# Restore the directory -tar -xf archive dir +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +# Let the things settle +sleep 1 -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - -) -./incremental.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * +tar --create \ + --file=archive.1 \ + --listed-incremental=listing \ + directory/file* -ckmtime || exit 77 +tar tf archive.1 || exit 1 -mkdir structure -echo x >structure/file +sleep 2 -# On Nextstep (and perhaps other 4.3BSD systems), -# a newly created file's ctime isn't updated -# until the next sync or stat operation on the file. -ls -l structure/file >/dev/null +genfile --length 10240 --pattern zeros --file directory/file2 -# If the time of an initial backup and the creation time of a file contained -# in that backup are the same, the file will be backed up again when an -# incremental backup is done, because the incremental backup backs up -# files created "on or after" the initial backup time. Without the sleep -# command, behaviour of tar becomes variable, depending whether the system -# clock ticked over to the next second between creating the file and -# backing it up. -sleep 1 +echo "separator" +cp listing listing.old +tar --create \ + --file=archive.2 \ + --listed-incremental=listing \ + directory/file* || exit 1 -tar cf archive --listed=list structure -tar cfv archive --listed=list structure -echo separator -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. -sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure +tar tf archive.2 || exit 1 ) ./exclude05.at:24: mkdir ustar @@ -11412,51 +11438,12 @@ rm -rf testdir exclfile ) -116. incremental.at:23: ok - -119. listed01.at:26: testing --listed for individual files ... -./listed01.at:29: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -ckmtime || exit 77 - -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -# Let the things settle -sleep 1 - -tar --create \ - --file=archive.1 \ - --listed-incremental=listing \ - directory/file* - -tar tf archive.1 || exit 1 - -sleep 2 - -genfile --length 10240 --pattern zeros --file directory/file2 - -echo "separator" -cp listing listing.old -tar --create \ - --file=archive.2 \ - --listed-incremental=listing \ - directory/file* || exit 1 - -tar tf archive.2 || exit 1 -) ./incr02.at:35: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -11497,7 +11484,7 @@ # Check the timestamp genfile --stat=mtime dir/subdir1 | diff ts - ) -./exclude05.at:24: +./incremental.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11506,67 +11493,34 @@ export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done - -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile - -tar cf archive --anchored --exclude-from=exclfile \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive --exclude-from=exclfile \ - testdir -tar tf archive | sort - -rm -rf testdir exclfile - -) -./listed01.at:29: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - ckmtime || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -# Let the things settle -sleep 1 +mkdir structure +echo x >structure/file -tar --create \ - --file=archive.1 \ - --listed-incremental=listing \ - directory/file* +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null -tar tf archive.1 || exit 1 +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created "on or after" the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. sleep 2 - -genfile --length 10240 --pattern zeros --file directory/file2 - -echo "separator" -cp listing listing.old -tar --create \ - --file=archive.2 \ - --listed-incremental=listing \ - directory/file* || exit 1 - -tar tf archive.2 || exit 1 +echo y >structure/file +tar cfv archive --listed=list structure ) 119. listed01.at:26: ok @@ -11640,7 +11594,7 @@ echo Final files: find tart -print | sort 2>/dev/null ) -118. incr02.at:32: ok +116. incremental.at:23: ok 121. listed03.at:24: testing incremental dump when the parent directory is unreadable ... ./listed03.at:27: @@ -11744,15 +11698,15 @@ umount tartest/subdir ) ---- - 2024-12-25 15:24:26.270061230 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/123/stderr 2024-12-25 15:24:26.261182064 +0000 +--- - 2024-12-25 15:35:48.521831723 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/123/stderr 2024-12-25 15:35:48.513379078 +0000 @@ -1,4 +1 @@ -tar: .: Directory is new -tar: ./subdir: Directory is new -tar: ./subdir: directory is on a different filesystem; not dumped ---- - 2024-12-25 15:24:26.273123902 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/123/stdout 2024-12-25 15:24:26.265181688 +0000 +--- - 2024-12-25 15:35:48.525725017 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/123/stdout 2024-12-25 15:35:48.517378702 +0000 @@ -1,10 +1 @@ -# Level 0 -./ @@ -11807,6 +11761,52 @@ tar -xf archive.2 -g db --warning=no-timestamp find directory | sort ) +./incr02.at:35: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, 'dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +) ./incr03.at:31: mkdir oldgnu (cd oldgnu @@ -11848,11 +11848,11 @@ find directory | sort ) ./exclude05.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -12000,7 +12000,7 @@ echo "Incremental dump" tar cvf a1.tar -g a.sna a ) -125. incr04.at:29: ok +118. incr02.at:32: ok 126. incr05.at:21: testing incremental dumps with -C ... ./incr05.at:24: @@ -12260,6 +12260,43 @@ test -d dirA && echo >&2 "toplevel dirA exists" exit 0 ) +./exclude05.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +) +125. incr04.at:29: ok + ./incr07.at:40: mkdir posix (cd posix @@ -12306,8 +12343,6 @@ test -d dirA && echo >&2 "toplevel dirA exists" exit 0 ) -128. incr07.at:18: ok - 129. incr08.at:38: testing filename normalization ... ./incr08.at:41: mkdir gnu @@ -12365,11 +12400,12 @@ DIR=`pwd`/gnu/tartest sed "s|$DIR|ABSPATH|" stdout +128. incr07.at:18: ok ./incr08.at:41: DIR=`pwd`/gnu/tartest sed "/tar: Removing leading \`\/*\/' from/d;s|$DIR|ABSPATH|" stderr -129. incr08.at:38: ok +129. incr08.at:38: ok 130. incr09.at:26: testing incremental with alternating -C ... ./incr09.at:29: mkdir gnu @@ -12396,9 +12432,7 @@ decho B tar -cvf foo.tar --incremental -C foo . -C `pwd` toplevel_file -C bar . ) -130. incr09.at:26: ok -64. exclude05.at:21: ok 131. incr10.at:18: testing concatenated incremental archives (deletes) ... ./incr10.at:28: mkdir gnu @@ -12424,7 +12458,9 @@ mkdir out tar -xvf full.tar -g /dev/null -C out ) +130. incr09.at:26: ok +131. incr10.at:18: ok 132. incr11.at:25: testing concatenated incremental archives (renames) ... ./incr11.at:28: mkdir gnu @@ -12455,7 +12491,6 @@ decho List find out | sort ) -131. incr10.at:18: ok 133. filerem01.at:36: testing file removed as we read it ... ./filerem01.at:39: @@ -12476,9 +12511,7 @@ tar --blocking-factor=1 -c -f archive.tar \ --listed-incremental db -v dir >/dev/null ) -132. incr11.at:25: ok stdout: - ./filerem01.at:39: mkdir posix (cd posix @@ -12497,6 +12530,10 @@ tar --blocking-factor=1 -c -f archive.tar \ --listed-incremental db -v dir >/dev/null ) +stdout: +133. filerem01.at:36: ok +132. incr11.at:25: ok + 134. filerem02.at:26: testing toplevel file removed ... ./filerem02.at:29: mkdir gnu @@ -12518,34 +12555,7 @@ tar --blocking-factor=1 -c -f archive.tar \ --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null ) -stdout: -133. filerem01.at:36: ok -stderr: -tar: dir2: Cannot stat: No such file or directory -tar: dir2: Cannot open: No such file or directory -tar: Exiting with failure status due to previous errors -stdout: - -./filerem02.at:29: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -mkdir dir2 -genfile --file dir2/file1 -genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ - tar --blocking-factor=1 -c -f archive.tar \ - --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null -) 135. dirrem01.at:38: testing directory removed before reading ... ./dirrem01.at:41: mkdir gnu @@ -12578,9 +12588,7 @@ tar: dir2: Cannot open: No such file or directory tar: Exiting with failure status due to previous errors stdout: -134. filerem02.at:26: stdout: - ok -./dirrem01.at:41: +./filerem02.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -12593,28 +12601,20 @@ mkdir dir/sub genfile --file dir/file1 genfile --file dir/sub/file2 +mkdir dir2 +genfile --file dir2/file1 -case "$TEST_TAR_FORMAT" in -posix) CPT=5;; -gnu) CPT=3;; -*) exit 77 -esac - -genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \ +genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ tar --blocking-factor=1 -c -f archive.tar \ - --listed-incremental db \ - --warning=no-file-changed \ - -v dir >/dev/null + --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null ) - stdout: -136. dirrem02.at:31: testing explicitly named directory removed before reading ... -./dirrem02.at:34: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +./dirrem01.at:41: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -12633,17 +12633,25 @@ tar --blocking-factor=1 -c -f archive.tar \ --listed-incremental db \ --warning=no-file-changed \ - -v dir dir/sub >/dev/null + -v dir >/dev/null ) +stdout: 135. dirrem01.at:38: ok - +stderr: +tar: dir2: Cannot stat: No such file or directory +tar: dir2: Cannot open: No such file or directory +tar: Exiting with failure status due to previous errors stdout: +134. filerem02.at:26: ok + + +136. dirrem02.at:31: testing explicitly named directory removed before reading ... ./dirrem02.at:34: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -12706,8 +12714,34 @@ echo End directory listing 2 ) stdout: -136. dirrem02.at:31: ok +./dirrem02.at:34: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 +case "$TEST_TAR_FORMAT" in +posix) CPT=5;; +gnu) CPT=3;; +*) exit 77 +esac + +genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \ + tar --blocking-factor=1 -c -f archive.tar \ + --listed-incremental db \ + --warning=no-file-changed \ + -v dir dir/sub >/dev/null +) +stdout: +136. dirrem02.at:31: ok ./rename01.at:27: mkdir oldgnu (cd oldgnu @@ -12748,6 +12782,7 @@ find foo | sort echo End directory listing 2 ) + 138. rename02.at:24: testing move between hierarchies ... ./rename02.at:27: mkdir gnu @@ -13036,6 +13071,75 @@ find foo | sort echo End directory listing 2 ) +./listed02.at:31: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +echo Create directories + +mkdir tart +sleep 1 +mkdir tart/c0 +sleep 1 +mkdir tart/c1 +sleep 1 + +for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 +do + echo File $file > $file + sleep 1 +done + +sleep 1 +echo Creating main archive +echo >&2 "Creating main archive" +tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 + +# The above prints two lines to stderr announcing the new directories c0 and c1. +# Ensure that they appear in this script's stderr in sorted order. +sort err 1>&2; rm -f err + +sleep 1 +echo Modifying filesystem +rm tart/a1 + +mv tart/b1 tart/b2 +mv tart/c1 tart/c2 +touch tart/c2/ca3 + +echo Directory contents +find tart -print | sort 2>/dev/null + +sleep 1 +echo Creating incremental archive +echo >&2 "Creating incremental archive" +cp -p tart.incr1 tart.incr2 +tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 + +sleep 1 + +rm -rf tart/* +echo Extracting main archive +echo >&2 "Extracting main archive" +tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 +echo Extracting incremental archive +# This command should produce three messages about deletion +# of the existing files, that may appear in any order. Piping +# to sort makes sure we don't depend on any particular ordering. +tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null + +echo Final files: +find tart -print | sort 2>/dev/null +) ./rename03.at:26: mkdir posix (cd posix @@ -13209,9 +13313,8 @@ tar -xf archive.2 -g db.2 find dir | sort ) -139. rename03.at:23: ok - 140. rename04.at:27: ok + 141. rename05.at:24: testing renamed subdirectories ... ./rename05.at:27: mkdir gnu @@ -13252,54 +13355,51 @@ tar -xf archive.2 -g db.2 --warning=no-timestamp find dir | sort ) - -142. rename06.at:19: testing chained renames ... -./rename06.at:29: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +./rename05.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -decho Creating directory structure -mkdir test test/d1 test/d2 -genfile --file test/d1/file1 -genfile --file test/d2/file2 -decho First dump -tar -c -g 0.snar -C test -f backup0.tar . +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file -decho Altering directory structure -genfile --file test/d2/file3 -mv test/d1 test/d3 -mv test/d2 test/d1 +decho Creating initial archive +tar -cf archive.1 -g db.1 directory -decho Second dump -cp 0.snar 1.snar -tar -vc -g 1.snar -C test -f backup1.tar . +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir -mkdir test1 +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir -decho First extract -tar -C test1 -x -g /dev/null -f backup0.tar +mv dir orig -decho Second extract -tar -C test1 -x -g /dev/null -f backup1.tar +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort -decho Resulting directory -find test1 | sort +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort ) ./rename05.at:27: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -13333,12 +13433,15 @@ tar -xf archive.2 -g db.2 --warning=no-timestamp find dir | sort ) +139. rename03.at:23: ok + +142. rename06.at:19: testing chained renames ... ./rename06.at:29: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -13373,44 +13476,46 @@ decho Resulting directory find test1 | sort ) -./rename05.at:27: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +141. rename05.at:24: ok +./rename06.at:29: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 - decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file +mkdir test test/d1 test/d2 +genfile --file test/d1/file1 +genfile --file test/d2/file2 -decho Creating initial archive -tar -cf archive.1 -g db.1 directory +decho First dump +tar -c -g 0.snar -C test -f backup0.tar . -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir +decho Altering directory structure +genfile --file test/d2/file3 +mv test/d1 test/d3 +mv test/d2 test/d1 -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +decho Second dump +cp 0.snar 1.snar +tar -vc -g 1.snar -C test -f backup1.tar . -mv dir orig +mkdir test1 -decho First restore -tar -xf archive.1 -g db.1 --warning=no-timestamp -find directory | sort +decho First extract +tar -C test1 -x -g /dev/null -f backup0.tar -decho Second restore -tar -xf archive.2 -g db.2 --warning=no-timestamp -find dir | sort +decho Second extract +tar -C test1 -x -g /dev/null -f backup1.tar + +decho Resulting directory +find test1 | sort ) ./rename06.at:29: mkdir posix @@ -13452,10 +13557,8 @@ decho Resulting directory find test1 | sort ) -141. rename05.at:24: ok -142. rename06.at:19: ok -143. chtype.at:27: testing changed file types in incrementals ... +142. rename06.at:19: 143. chtype.at:27: testing changed file types in incrementals ... ./chtype.at:30: mkdir gnu (cd gnu @@ -13496,6 +13599,7 @@ tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp find directory | sort ) + ok 144. ignfail.at:23: testing ignfail ... ./ignfail.at:26: @@ -13702,58 +13806,7 @@ chmod 700 directory test $status = 0 ) -./ignfail.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file - -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 - -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 - -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 - -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=$? -chmod 700 directory -test $status = 0 -) -144. ignfail.at:23: ok +64. exclude05.at:21: ok 145. link01.at:33: testing link count gt 2 ... ./link01.at:36: @@ -13825,6 +13878,57 @@ ls directory/test1 ) +./ignfail.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 +) ./link01.at:36: mkdir posix (cd posix @@ -13890,6 +13994,7 @@ tar -c -f archive --remove-files file1 file2 file3 file4 tar tfv archive | sed -n 's/.*file[2-4] link to //p' ) +144. ignfail.at:23: ok ./link02.at:35: mkdir oldgnu (cd oldgnu @@ -13906,28 +14011,42 @@ tar -c -f archive --remove-files file1 file2 file3 file4 tar tfv archive | sed -n 's/.*file[2-4] link to //p' ) -./link02.at:35: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + +147. link03.at:24: testing working -l with --remove-files ... +./link03.at:34: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * + genfile -l 64 -f file1 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' + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) ./link02.at:35: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -13939,11 +14058,11 @@ tar tfv archive | sed -n 's/.*file[2-4] link to //p' ) ./link02.at:35: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -13954,15 +14073,12 @@ tar -c -f archive --remove-files file1 file2 file3 file4 tar tfv archive | sed -n 's/.*file[2-4] link to //p' ) -146. link02.at:32: ok - -147. link03.at:24: testing working -l with --remove-files ... ./link03.at:34: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -13985,33 +14101,21 @@ echo testing archive.2 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) -./link03.at:34: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +./link02.at:35: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - genfile -l 64 -f file1 ln file1 file2 ln file2 file3 ln file3 file4 - -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 - -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 - -echo archive.2 -tar -c -f archive.2 -l --remove-files file1 file2 file3 -echo testing archive.2 -tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' ) ./link03.at:34: mkdir ustar @@ -14041,6 +14145,7 @@ echo testing archive.2 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) +146. link02.at:32: ok ./link03.at:34: mkdir posix (cd posix @@ -14069,35 +14174,6 @@ echo testing archive.2 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) -./link03.at:34: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - - -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 - -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 - -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 - -echo archive.2 -tar -c -f archive.2 -l --remove-files file1 file2 file3 -echo testing archive.2 -tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' -) -147. link03.at:24: ok 148. link04.at:29: testing link count is 1 but multiple occurrences ... ./link04.at:32: @@ -14162,74 +14238,60 @@ s,symlink,FOO,g ' | sort ) -./link04.at:32: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +./link03.at:34: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort - -echo -- +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -tar cfl archive dir dir +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo == +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) -./link04.at:32: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +147. link03.at:24: ok + +149. longv7.at:24: testing long names in V7 archives ... +./longv7.at:30: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 - -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort - -echo -- - -tar cfl archive dir dir - -echo == +mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems +touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort +tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems +echo separator +tar tf archive ) +149. longv7.at:24: ok ./link04.at:32: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -14255,26 +14317,6 @@ s,symlink,FOO,g ' | sort ) -148. link04.at:29: ok - -149. longv7.at:24: testing long names in V7 archives ... -./longv7.at:30: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * - -mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems -touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c - -tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems -echo separator -tar tf archive -) -149. longv7.at:24: ok 150. long01.at:28: testing long file names divisible by block size ... ./long01.at:36: @@ -14307,6 +14349,37 @@ tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile tar tf archive) +./link04.at:32: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo -- + +tar cfl archive dir dir + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort +) 150. long01.at:28: ok 151. lustar01.at:21: testing ustar: unsplittable file name ... @@ -14338,6 +14411,37 @@ install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/tween_name_and_prefix || exit 77 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be ) +./link04.at:32: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo -- + +tar cfl archive dir dir + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort +) 152. lustar02.at:21: ok 153. lustar03.at:21: testing ustar: splitting long names ... @@ -14356,85 +14460,17 @@ tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be echo "List archive" tar tf archive) -./listed02.at:31: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - -ckmtime || exit 77 - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -echo Create directories - -mkdir tart -sleep 1 -mkdir tart/c0 -sleep 1 -mkdir tart/c1 -sleep 1 - -for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 -do - echo File $file > $file - sleep 1 -done - -sleep 1 -echo Creating main archive -echo >&2 "Creating main archive" -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 - -# The above prints two lines to stderr announcing the new directories c0 and c1. -# Ensure that they appear in this script's stderr in sorted order. -sort err 1>&2; rm -f err - -sleep 1 -echo Modifying filesystem -rm tart/a1 - -mv tart/b1 tart/b2 -mv tart/c1 tart/c2 -touch tart/c2/ca3 - -echo Directory contents -find tart -print | sort 2>/dev/null - -sleep 1 -echo Creating incremental archive -echo >&2 "Creating incremental archive" -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 - -sleep 1 - -rm -rf tart/* -echo Extracting main archive -echo >&2 "Extracting main archive" -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null +148. link04.at:29: ok -echo Final files: -find tart -print | sort 2>/dev/null -) 153. lustar03.at:21: ok - 154. old.at:23: testing old archives ... ./old.at:27: mkdir directory tar cfvo archive directory || exit 1 tar tf archive -154. old.at:23: ok +154. old.at:23: ok 155. time01.at:20: testing time: tricky time stamps ... ./time01.at:23: mkdir pax @@ -14487,47 +14523,6 @@ tar -c -f archive.tar dir tar -d -f archive.tar dir ) -./chtype.at:30: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory - -sleep 2 - -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b - -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory - -# Delete a -rm -r directory - -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp -find directory | sort -) -155. time01.at:20: ok 156. time02.at:20: testing time: clamping mtime ... ./time02.at:23: @@ -14594,6 +14589,46 @@ cmp file1 extract-dir-pipe/file1 cmp file2 extract-dir-pipe/file2 ) +./chtype.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +) ./multiv01.at:30: mkdir oldgnu (cd oldgnu @@ -14845,47 +14880,7 @@ echo separator tar -MRt -f arc.1 -f arc.2) -./chtype.at:30: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory - -sleep 2 - -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b - -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory - -# Delete a -rm -r directory - -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp -find directory | sort -) -143. chtype.at:27: ok +155. time01.at:20: ok 161. multiv05.at:26: testing Restoring after an out of sync volume ... ./multiv05.at:30: @@ -14978,8 +14973,8 @@ cd $TEST_DATA_DIR tar -t -M -fxsplit-1.tar -fxsplit-2.tar ---- - 2024-12-25 15:24:44.055453468 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/163/stdout 2024-12-25 15:24:44.051509679 +0000 +--- - 2024-12-25 15:36:05.335615330 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/163/stdout 2024-12-25 15:36:05.331796830 +0000 @@ -1,4 +1 @@ -Archive volumes split at an extended header Volume 1 -foo @@ -15075,6 +15070,46 @@ q EOF ) +./chtype.at:30: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +) ./multiv09.at:33: mkdir gnu (cd gnu @@ -15216,9 +15251,9 @@ ) stdout: separator --rw-r--r-- pbuilder1/pbuilder1 1000 2024-12-25 15:24 begin --rw-r--r-- pbuilder1/pbuilder1 3102720 2024-12-25 15:24 sparsefile --rw-r--r-- pbuilder1/pbuilder1 1000 2024-12-25 15:24 end +-rw-r--r-- pbuilder2/pbuilder2 1000 2024-12-25 15:36 begin +-rw-r--r-- pbuilder2/pbuilder2 3102720 2024-12-25 15:36 sparsefile +-rw-r--r-- pbuilder2/pbuilder2 1000 2024-12-25 15:36 end separator sparsefile 3102720 ./sparse01.at:24: @@ -15245,9 +15280,9 @@ ) stdout: separator --rw-r--r-- pbuilder1/pbuilder1 1000 2024-12-25 15:24 begin --rw-r--r-- pbuilder1/pbuilder1 3102720 2024-12-25 15:24 sparsefile --rw-r--r-- pbuilder1/pbuilder1 1000 2024-12-25 15:24 end +-rw-r--r-- pbuilder2/pbuilder2 1000 2024-12-25 15:36 begin +-rw-r--r-- pbuilder2/pbuilder2 3102720 2024-12-25 15:36 sparsefile +-rw-r--r-- pbuilder2/pbuilder2 1000 2024-12-25 15:36 end separator sparsefile 3102720 ./sparse01.at:24: @@ -15274,9 +15309,9 @@ ) stdout: separator --rw-r--r-- pbuilder1/pbuilder1 1000 2024-12-25 15:24 begin --rw-r--r-- pbuilder1/pbuilder1 3102720 2024-12-25 15:24 sparsefile --rw-r--r-- pbuilder1/pbuilder1 1000 2024-12-25 15:24 end +-rw-r--r-- pbuilder2/pbuilder2 1000 2024-12-25 15:36 begin +-rw-r--r-- pbuilder2/pbuilder2 3102720 2024-12-25 15:36 sparsefile +-rw-r--r-- pbuilder2/pbuilder2 1000 2024-12-25 15:36 end separator sparsefile 3102720 169. sparse01.at:21: ok @@ -15298,6 +15333,8 @@ tar xfO archive | cat - > sparsecopy || exit 1 cmp sparsefile sparsecopy ) +143. chtype.at:27: ok + ./sparse02.at:28: mkdir gnu (cd gnu @@ -15314,24 +15351,6 @@ tar xfO archive | cat - > sparsecopy || exit 1 cmp sparsefile sparsecopy ) -./sparse02.at:28: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1 -echo separator - -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy -) -170. sparse02.at:21: ok - 171. sparse03.at:21: testing storing sparse files > 8G ... ./sparse03.at:29: mkdir posix @@ -15356,7 +15375,7 @@ genfile --stat=name,size sparsefile cmp sparsefile directory/sparsefile ) -./multiv04.at:39: +./sparse02.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -15365,24 +15384,14 @@ export TAR_OPTIONS rm -rf * - -mkdir directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' sparsecopy || exit 1 +cmp sparsefile sparsecopy +) +170. sparse02.at:21: ok 172. sparse04.at:21: testing storing long sparse file names ... ./sparse04.at:35: @@ -16416,6 +16425,32 @@ genfile --sparse --file BIGFILE --block-size 4K - < mapfile || exit 77 tar -f - -c --sparse --posix BIGFILE | tar tvf - | awk '{ print $3, $(NF) }' ) +./multiv04.at:39: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +mkdir directory +awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' &1`" || exit 77 + +mkdir a +genfile --file a/b + +tar cf arc a + +echo "separator" + +sleep 2 +genfile --file a/c + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) ./update.at:31: mkdir gnu (cd gnu @@ -16985,8 +17042,8 @@ ) 183. update.at:28: ok -184. update01.at:29: testing update directories ... -./update01.at:32: +185. update02.at:26: testing update changed files ... +./update02.at:29: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -17006,13 +17063,12 @@ echo "separator" sleep 2 -genfile --file a/c +touch a/b tar ufv arc a echo "separator" tar tf arc | sort || exit 1 ) -182. sptrdiff01.at:26: ok ./update01.at:32: mkdir oldgnu (cd oldgnu @@ -17039,14 +17095,12 @@ echo "separator" tar tf arc | sort || exit 1 ) - -185. update02.at:26: testing update changed files ... ./update02.at:29: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -17094,11 +17148,11 @@ tar tf arc | sort || exit 1 ) ./update02.at:29: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -17146,32 +17200,6 @@ tar tf arc | sort || exit 1 ) ./update02.at:29: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir a -genfile --file a/b - -tar cf arc a - -echo "separator" - -sleep 2 -touch a/b - -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) -./update02.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -17401,42 +17429,6 @@ touch foo tar -cvf archive.tar --verify foo ) -./verify.at:28: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - -touch foo -tar -cvf archive.tar --verify foo -) -./verify.at:28: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - -touch foo -tar -cvf archive.tar --verify foo -) -./verify.at:28: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -touch foo -tar -cvf archive.tar --verify foo -) ./update04.at:23: mkdir oldgnu (cd oldgnu @@ -17464,17 +17456,36 @@ echo $? ) ./verify.at:28: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +touch foo +tar -cvf archive.tar --verify foo +) +stdout: +./verify.at:28: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * touch foo tar -cvf archive.tar --verify foo ) +separator +-rw-r--r-- pbuilder2/pbuilder2 1000 2024-12-25 15:36 begin +-rw-r--r-- pbuilder2/pbuilder2 8589935104 2024-12-25 15:36 sparsefile +-rw-r--r-- pbuilder2/pbuilder2 1000 2024-12-25 15:36 end +separator +sparsefile 8589935104 ./update04.at:23: mkdir ustar (cd ustar @@ -17501,7 +17512,19 @@ tar ufv archive --wildcards './file.*' './foo.*' echo $? ) -188. verify.at:25: ok +171. sparse03.at:21: ok +./verify.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +touch foo +tar -cvf archive.tar --verify foo +) ./update04.at:23: mkdir posix (cd posix @@ -17528,6 +17551,19 @@ tar ufv archive --wildcards './file.*' './foo.*' echo $? ) +./verify.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +touch foo +tar -cvf archive.tar --verify foo +) +188. verify.at:25: ok 189. volume.at:23: testing volume ... ./volume.at:26: @@ -17607,20 +17643,32 @@ tar xf $TEST_DATA_DIR/abc.tar find abc|sort ) ---- - 2024-12-25 15:26:47.390959220 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/190/stdout 2024-12-25 15:26:47.383915982 +0000 -@@ -1,10 +1 @@ --Short Listing --abc/not-a-file.gif --abc/CCC --Verbose Listing --V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- ---rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC --Extracted directory --abc --abc/CCC - -190. volsize.at:29: skipped (volsize.at:32) +./update04.at:23: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +genfile --file file.a +genfile --file file.b +genfile --file file.c +echo Create +tar cf archive ./file.* +sleep 1 +echo "update" > file.b +echo First update +tar ufv archive --wildcards './file.*' + +echo "Second update" +tar ufv archive --wildcards './file.*' + +echo "Non-matching pattern" +tar ufv archive --wildcards './file.*' './foo.*' +echo $? +) 191. comprec.at:21: testing compressed format recognition ... ./comprec.at:25: @@ -17643,7 +17691,20 @@ tar xfv archive --warning=no-timestamp cmp orig file1 ) -./comprec.at:25: +--- - 2024-12-25 15:36:51.882189362 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/190/stdout 2024-12-25 15:36:51.875418040 +0000 +@@ -1,10 +1 @@ +-Short Listing +-abc/not-a-file.gif +-abc/CCC +-Verbose Listing +-V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- +--rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC +-Extracted directory +-abc +-abc/CCC + +190. volsize.at:29: ./comprec.at:25: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -17663,6 +17724,9 @@ tar xfv archive --warning=no-timestamp cmp orig file1 ) + skipped (volsize.at:32) +187. update04.at:20: ok + ./comprec.at:25: mkdir ustar (cd ustar @@ -17683,32 +17747,27 @@ tar xfv archive --warning=no-timestamp cmp orig file1 ) -./comprec.at:25: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + +192. shortfile.at:26: testing short input files ... +./shortfile.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 - -genfile --length 10240 --file file1 -echo "separator" -tar cfz archive file1 -echo "separator" -mv file1 orig -tar xfv archive --warning=no-timestamp -cmp orig file1 +genfile --length 511 --file foo || exit 5 +tar tf foo ) +192. shortfile.at:26: ok ./comprec.at:25: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -17723,48 +17782,6 @@ tar xfv archive --warning=no-timestamp cmp orig file1 ) -./update04.at:23: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -genfile --file file.a -genfile --file file.b -genfile --file file.c -echo Create -tar cf archive ./file.* -sleep 1 -echo "update" > file.b -echo First update -tar ufv archive --wildcards './file.*' - -echo "Second update" -tar ufv archive --wildcards './file.*' - -echo "Non-matching pattern" -tar ufv archive --wildcards './file.*' './foo.*' -echo $? -) -191. comprec.at:21: ok - -192. shortfile.at:26: testing short input files ... -./shortfile.at:29: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -genfile --length 511 --file foo || exit 5 -tar tf foo -) -192. shortfile.at:26: ok 193. shortupd.at:31: testing updating short archives ... ./shortupd.at:34: @@ -17803,19 +17820,7 @@ touch foo tar uf archive foo ) -./shortupd.at:34: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -touch foo -tar uf archive foo -) -./shortupd.at:34: +./comprec.at:25: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -17824,12 +17829,17 @@ export TAR_OPTIONS rm -rf * -touch foo -tar uf archive foo -) -187. update04.at:20: ok -193. shortupd.at:31: ok +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + +genfile --length 10240 --file file1 +echo "separator" +tar cfz archive file1 +echo "separator" +mv file1 orig +tar xfv archive --warning=no-timestamp +cmp orig file1 +) 194. truncate.at:29: testing truncate ... ./truncate.at:32: mkdir v7 @@ -17865,20 +17875,29 @@ echo separator genfile --file foo --seek 195k --length 5k --pattern=zeros tar dvf bar|sed '/foo: Mod time differs/d') +./shortupd.at:34: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -195. grow.at:24: testing grow ... -./grow.at:27: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +touch foo +tar uf archive foo +) +./shortupd.at:34: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz +touch foo +tar uf archive foo ) ./truncate.at:32: mkdir ustar @@ -17897,6 +17916,8 @@ echo separator genfile --file foo --seek 195k --length 5k --pattern=zeros tar dvf bar|sed '/foo: Mod time differs/d') +191. comprec.at:21: ok + ./truncate.at:32: mkdir posix (cd posix @@ -17914,6 +17935,22 @@ echo separator genfile --file foo --seek 195k --length 5k --pattern=zeros tar dvf bar|sed '/foo: Mod time differs/d') +195. grow.at:24: testing grow ... +./grow.at:27: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +genfile --file foo --length 50000k +genfile --file baz +genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz +) +193. shortupd.at:31: ok + ./truncate.at:32: mkdir gnu (cd gnu @@ -17931,8 +17968,6 @@ echo separator genfile --file foo --seek 195k --length 5k --pattern=zeros tar dvf bar|sed '/foo: Mod time differs/d') -194. truncate.at:29: ok - 196. sigpipe.at:21: testing sigpipe handling ... ./sigpipe.at:30: @@ -17950,8 +17985,56 @@ # Discard diagnostics that some shells generate about broken pipes. (tar tf archive 2>&3 | :) 3>&2 2>/dev/null +194. truncate.at:29: ok 196. sigpipe.at:21: ok + +198. remfiles01.at:28: testing remove-files with compression ... +./remfiles01.at:32: + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + + +case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #( +?*) exit 77;; +esac + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir dir +cd dir +genfile --file a --length 0 +chmod 0 a +genfile --file b +mkdir c + +# Depending on when the SIGPIPE gets delivered, the invocation below +# may finish with either +# tar: a: Cannot write: Broken pipe +# or +# tar: Child returned status 2 + +# Discard diagnostics that some shells generate about broken pipes, +# and discard all of tar's diagnostics except for the ones saying "(child)". +# Gzip's exit code is propagated to the shell. Usually it is 141. +# Convert all non-zero exits to 2 to make it predictable. +(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null +EC=$? +sed -n '/(child)/p' err >&2 +rm err +find . | sort +exit $EC + 197. comperr.at:18: testing compressor program failure ... ./comperr.at:28: mkdir v7 @@ -17995,19 +18078,8 @@ sed -n '$p' err exit $rc ) -./grow.at:27: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * +198. remfiles01.at:28: ok -genfile --file foo --length 50000k -genfile --file baz -genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz -) ./comperr.at:28: mkdir posix (cd posix @@ -18022,70 +18094,6 @@ sed -n '$p' err exit $rc ) -./comperr.at:28: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -tar --use-compress-program false -cf a.tar . 2>err -rc=$? -sed -n '$p' err -exit $rc -) -197. comperr.at:18: ok - -198. remfiles01.at:28: testing remove-files with compression ... -./remfiles01.at:32: - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 - - -case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #( -?*) exit 77;; -esac - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir dir -cd dir -genfile --file a --length 0 -chmod 0 a -genfile --file b -mkdir c - -# Depending on when the SIGPIPE gets delivered, the invocation below -# may finish with either -# tar: a: Cannot write: Broken pipe -# or -# tar: Child returned status 2 - -# Discard diagnostics that some shells generate about broken pipes, -# and discard all of tar's diagnostics except for the ones saying "(child)". -# Gzip's exit code is propagated to the shell. Usually it is 141. -# Convert all non-zero exits to 2 to make it predictable. -(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null -EC=$? -sed -n '/(child)/p' err >&2 -rm err -find . | sort -exit $EC - -198. remfiles01.at:28: ok - 199. remfiles02.at:28: testing remove-files with compression: grand-child ... ./remfiles02.at:32: @@ -18119,6 +18127,20 @@ genfile --stat a 200. remfiles03.at:28: ok +./comperr.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +tar --use-compress-program false -cf a.tar . 2>err +rc=$? +sed -n '$p' err +exit $rc +) 201. remfiles04a.at:25: testing remove-files with -C:rel in -c/non-incr. mode ... ./remfiles04a.at:28: @@ -18140,10 +18162,12 @@ echo A find . | sort ) +197. comperr.at:18: ok + 201. remfiles04a.at:25: ok -202. remfiles04b.at:33: testing remove-files with -C:rel in -c/incr. mode ... -./remfiles04b.at:36: +203. remfiles04c.at:33: testing remove-files with -C:rel in -r mode ... +./remfiles04c.at:36: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -18158,14 +18182,15 @@ mkdir foo echo bar > bar echo foobar > foo/bar -tar -cf foo.tar --incremental --remove-files -C foo bar +tar -cf foo.tar -C foo bar echo A find . | sort +tar -rf foo.tar --remove-files -C foo bar +echo B +find . | sort ) -202. remfiles04b.at:33: ok - -203. remfiles04c.at:33: testing remove-files with -C:rel in -r mode ... -./remfiles04c.at:36: +202. remfiles04b.at:33: testing remove-files with -C:rel in -c/incr. mode ... +./remfiles04b.at:36: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -18180,17 +18205,16 @@ mkdir foo echo bar > bar echo foobar > foo/bar -tar -cf foo.tar -C foo bar +tar -cf foo.tar --incremental --remove-files -C foo bar echo A find . | sort -tar -rf foo.tar --remove-files -C foo bar -echo B -find . | sort ) +202. remfiles04b.at:33: ok 203. remfiles04c.at:33: ok -204. remfiles05a.at:34: testing remove-files with -C:rel,rel in -c/non-incr. mode ... -./remfiles05a.at:37: + +205. remfiles05b.at:25: testing remove-files with -C:rel,rel in -c/incr. mode ... +./remfiles05b.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -18208,14 +18232,12 @@ echo foo/file > foo/file echo bar/file > bar/file decho A -tar -cvf foo.tar --remove-files -C foo file -C ../bar file +tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file decho B find . | sort ) -204. remfiles05a.at:34: ok - -205. remfiles05b.at:25: testing remove-files with -C:rel,rel in -c/incr. mode ... -./remfiles05b.at:28: +204. remfiles05a.at:34: testing remove-files with -C:rel,rel in -c/non-incr. mode ... +./remfiles05a.at:37: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -18233,11 +18255,13 @@ echo foo/file > foo/file echo bar/file > bar/file decho A -tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file +tar -cvf foo.tar --remove-files -C foo file -C ../bar file decho B find . | sort ) 205. remfiles05b.at:25: ok +204. remfiles05a.at:34: ok + 206. remfiles05c.at:25: testing remove-files with -C:rel,rel in -r mode ... ./remfiles05c.at:28: @@ -18265,8 +18289,6 @@ decho C find . | sort ) -206. remfiles05c.at:25: ok - 207. remfiles06a.at:25: testing remove-files with -C:rel,abs in -c/non-incr. mode ... ./remfiles06a.at:28: mkdir gnu @@ -18291,7 +18313,9 @@ decho B find . | sort ) -207. remfiles06a.at:25: ok +207. remfiles06a.at:25: 206. remfiles05c.at:25: ok + ok + 208. remfiles06b.at:25: testing remove-files with -C:rel,abs in -c/incr. mode ... ./remfiles06b.at:28: @@ -18317,8 +18341,6 @@ decho B find . | sort ) -208. remfiles06b.at:25: ok - 209. remfiles06c.at:25: testing remove-files with -C:rel,abs in -r mode ... ./remfiles06c.at:28: mkdir gnu @@ -18374,6 +18396,8 @@ ) 210. remfiles07a.at:25: ok +208. remfiles06b.at:25: ok + 211. remfiles07b.at:25: testing remove-files with -C:abs,rel in -c/incr. mode ... ./remfiles07b.at:28: mkdir gnu @@ -18427,8 +18451,6 @@ decho C find . | sort ) -212. remfiles07c.at:25: ok - 213. remfiles08a.at:28: testing remove-files deleting two subdirs in -c/non-incr. mode ... ./remfiles08a.at:31: mkdir gnu @@ -18449,6 +18471,8 @@ find . ) 213. remfiles08a.at:28: ok +212. remfiles07c.at:25: ok + 214. remfiles08b.at:31: testing remove-files deleting two subdirs in -c/incr. mode ... ./remfiles08b.at:34: @@ -18469,8 +18493,6 @@ decho B find . ) -214. remfiles08b.at:31: ok - 215. remfiles08c.at:28: testing remove-files deleting two subdirs in -r mode ... ./remfiles08c.at:31: mkdir gnu @@ -18496,6 +18518,8 @@ decho C find . ) +214. remfiles08b.at:31: ok + 215. remfiles08c.at:28: ok 216. remfiles09a.at:25: testing remove-files on full directory in -c/non-incr. mode ... @@ -18515,8 +18539,6 @@ decho B find . ) -216. remfiles09a.at:25: ok - 217. remfiles09b.at:29: testing remove-files on full directory in -c/incr. mode ... ./remfiles09b.at:32: mkdir gnu @@ -18535,6 +18557,8 @@ find . ) 217. remfiles09b.at:29: ok +216. remfiles09a.at:25: ok + 218. remfiles09c.at:25: testing remove-files on full directory in -r mode ... ./remfiles09c.at:28: @@ -18559,8 +18583,6 @@ decho C find . | sort ) -218. remfiles09c.at:25: ok - 219. remfiles10.at:20: testing remove-files ... ./remfiles10.at:23: mkdir gnu @@ -18586,6 +18608,8 @@ tar: Exiting with failure status due to previous errors B ./remfiles10.at:44: sed '2s/:[^:]*$//' stderr +218. remfiles09c.at:25: ok + 219. remfiles10.at:20: ok 220. xattr01.at:25: testing xattrs: basic functionality ... @@ -18636,14 +18660,6 @@ getfattr -h -d dir | grep -v -e '^#' -e ^$ getfattr -h -d dir/file | grep -v -e '^#' -e ^$ ) ---- - 2024-12-25 15:27:17.702758974 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/220/stdout 2024-12-25 15:27:17.693066865 +0000 -@@ -1,3 +1 @@ --user.test="OurDirValue" --user.test="OurFileValue" - -220. xattr01.at:25: skipped (xattr01.at:28) - 221. xattr02.at:25: testing xattrs: change directory with -C option ... ./xattr02.at:28: mkdir v7 @@ -18699,13 +18715,21 @@ getfattr -h -d file2 | grep -v -e '^#' -e ^$ getfattr -h -d subsubdir | grep -v -e '^#' -e ^$ ) ---- - 2024-12-25 15:27:17.795939615 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/221/stdout 2024-12-25 15:27:17.785058218 +0000 +--- - 2024-12-25 15:36:57.128076609 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/221/stdout 2024-12-25 15:36:57.122924354 +0000 @@ -1,4 +1 @@ -user.test="OurFile1Value" -user.test="OurFile2Value" -user.test="OurDirValue" +--- - 2024-12-25 15:36:57.128179979 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/220/stdout 2024-12-25 15:36:57.122924354 +0000 +@@ -1,3 +1 @@ +-user.test="OurDirValue" +-user.test="OurFileValue" + +220. xattr01.at:25: skipped (xattr01.at:28) + 221. xattr02.at:25: skipped (xattr02.at:28) 222. xattr03.at:25: testing xattrs: trusted.* attributes ... @@ -18771,15 +18795,13 @@ getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^$ getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^$ ) ---- - 2024-12-25 15:27:17.909455524 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/222/stdout 2024-12-25 15:27:17.901047315 +0000 +--- - 2024-12-25 15:36:57.458092461 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/222/stdout 2024-12-25 15:36:57.450893498 +0000 @@ -1,4 +1 @@ -trusted.test="OurFile1Value" -trusted.test="OurFile2Value" -trusted.test="OurDirValue" -222. xattr03.at:25: skipped (xattr03.at:28) - 223. xattr04.at:26: testing xattrs: s/open/openat/ regression ... ./xattr04.at:29: mkdir v7 @@ -18829,25 +18851,14 @@ getfattr -h -d output/file | grep -v -e '^#' -e ^$ exit $ret ) ---- - 2024-12-25 15:27:18.018642400 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/223/stdout 2024-12-25 15:27:18.009037163 +0000 +--- - 2024-12-25 15:36:57.476379941 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/223/stdout 2024-12-25 15:36:57.470891617 +0000 @@ -1,2 +1 @@ -user.test="value" -./grow.at:27: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * +222. xattr03.at:25: 223. xattr04.at:26: skipped (xattr03.at:28) + skipped (xattr04.at:29) -genfile --file foo --length 50000k -genfile --file baz -genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz -) -223. xattr04.at:26: skipped (xattr04.at:29) 224. xattr05.at:28: testing xattrs: keywords with '=' and '%' ... ./xattr05.at:31: @@ -18898,8 +18909,6 @@ getfattr -d output/file | grep -v '# ' > after diff before after ) -224. xattr05.at:28: skipped (xattr05.at:31) - 225. xattr06.at:27: testing xattrs: exclude xattrs on create ... ./xattr06.at:30: mkdir v7 @@ -18955,6 +18964,8 @@ # if they differ then the attribute is still present diff filtered full ) +224. xattr05.at:28: skipped (xattr05.at:31) + 225. xattr06.at:27: skipped (xattr06.at:30) 226. xattr07.at:26: testing xattrs: xattrs and --skip-old-files ... @@ -19013,8 +19024,8 @@ getfattr -h -d dir/file | grep -v -e '^#' -e ^$ getfattr -h -d dir/file2 | grep -v -e '^#' -e ^$ ) ---- - 2024-12-25 15:27:18.584355143 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/226/stderr 2024-12-25 15:27:18.576983775 +0000 +--- - 2024-12-25 15:36:58.023033531 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/226/stderr 2024-12-25 15:36:58.014840442 +0000 @@ -1,7 +1 @@ -tar: dir: skipping existing file -tar: dir/file: skipping existing file @@ -19023,8 +19034,8 @@ -tar: dir/file2: Cannot open: File exists -tar: Exiting with failure status due to previous errors ---- - 2024-12-25 15:27:18.587806898 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/226/stdout 2024-12-25 15:27:18.580983399 +0000 +--- - 2024-12-25 15:36:58.027123067 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/226/stdout 2024-12-25 15:36:58.022839690 +0000 @@ -1,10 +1 @@ -dir/ -dir/file @@ -19037,7 +19048,6 @@ -user.test="OurFileValue2" 226. xattr07.at:26: skipped (xattr07.at:29) - 227. xattr08.at:26: testing xattrs: xattrs and read-only files ... ./xattr08.at:29: mkdir v7 @@ -19081,6 +19091,7 @@ tar --xattrs -C dir -cf archive.tar file tar --xattrs -C dir2 -xf archive.tar ) + 227. xattr08.at:26: skipped (xattr08.at:29) 228. acls01.at:25: testing acls: basic functionality ... @@ -19562,28 +19573,13 @@ fi ) -./grow.at:27: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -genfile --file foo --length 50000k -genfile --file baz -genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz -) ---- - 2024-12-25 15:27:19.188791765 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/231/stdout 2024-12-25 15:27:19.184926628 +0000 +--- - 2024-12-25 15:36:58.805067498 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/231/stdout 2024-12-25 15:36:58.798766690 +0000 @@ -1,4 +1 @@ -security.selinux="system_u -security.selinux="unconfined_u -security.selinux="system_u -231. selnx01.at:25: skipped (selnx01.at:28) - 232. selacl01.at:25: testing acls/selinux: special files & fifos ... ./selacl01.at:28: mkdir v7 @@ -19693,13 +19689,14 @@ diff before after echo separator ) ---- - 2024-12-25 15:27:19.628101709 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/232/stdout 2024-12-25 15:27:19.620885647 +0000 +--- - 2024-12-25 15:36:59.005345875 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/232/stdout 2024-12-25 15:36:58.998747876 +0000 @@ -1,2 +1 @@ -separator -232. selacl01.at:25: skipped (selacl01.at:28) +231. selnx01.at:25: skipped (selnx01.at:28) +232. selacl01.at:25: skipped (selacl01.at:28) 233. capabs_raw01.at:25: testing capabilities: binary store/restore ... ./capabs_raw01.at:28: mkdir v7 @@ -19776,13 +19773,12 @@ # Newer systems print = instead of + here getcap dir/file | sed 's/+/=/' ) ---- - 2024-12-25 15:27:20.017204013 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/233/stdout 2024-12-25 15:27:20.012848802 +0000 + +--- - 2024-12-25 15:36:59.104397776 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/233/stdout 2024-12-25 15:36:59.098738469 +0000 @@ -1,2 +1 @@ -dir/file = cap_chown=ei -233. capabs_raw01.at:25: skipped (capabs_raw01.at:28) - 234. onetop01.at:21: testing tar --one-top-level ... ./onetop01.at:24: mkdir v7 @@ -19805,6 +19801,8 @@ tar --one-top-level -x -f ../a.tar find . | sort ) +233. capabs_raw01.at:25: skipped (capabs_raw01.at:28) + ./onetop01.at:24: mkdir oldgnu (cd oldgnu @@ -19826,25 +19824,13 @@ tar --one-top-level -x -f ../a.tar find . | sort ) -./grow.at:27: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -genfile --file foo --length 50000k -genfile --file baz -genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz -) -./onetop01.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +235. onetop02.at:21: testing tar --one-top-level --show-transformed ... +./onetop02.at:24: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * @@ -19857,15 +19843,15 @@ tar cf a.tar a c mkdir out cd out -tar --one-top-level -x -f ../a.tar +tar --one-top-level --show-transformed -v -x -f ../a.tar find . | sort ) -./onetop01.at:24: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +./onetop02.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -19878,15 +19864,15 @@ tar cf a.tar a c mkdir out cd out -tar --one-top-level -x -f ../a.tar +tar --one-top-level --show-transformed -v -x -f ../a.tar find . | sort ) ./onetop01.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -19902,15 +19888,12 @@ tar --one-top-level -x -f ../a.tar find . | sort ) -234. onetop01.at:21: ok - -235. onetop02.at:21: testing tar --one-top-level --show-transformed ... ./onetop02.at:24: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -19926,12 +19909,12 @@ tar --one-top-level --show-transformed -v -x -f ../a.tar find . | sort ) -./onetop02.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +./onetop01.at:24: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -19944,15 +19927,15 @@ tar cf a.tar a c mkdir out cd out -tar --one-top-level --show-transformed -v -x -f ../a.tar +tar --one-top-level -x -f ../a.tar find . | sort ) ./onetop02.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -19968,12 +19951,12 @@ tar --one-top-level --show-transformed -v -x -f ../a.tar find . | sort ) -./onetop02.at:24: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +./onetop01.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -19986,7 +19969,7 @@ tar cf a.tar a c mkdir out cd out -tar --one-top-level --show-transformed -v -x -f ../a.tar +tar --one-top-level -x -f ../a.tar find . | sort ) ./onetop02.at:24: @@ -20010,7 +19993,7 @@ tar --one-top-level --show-transformed -v -x -f ../a.tar find . | sort ) -235. onetop02.at:21: ok +234. onetop01.at:21: ok 236. onetop03.at:21: testing tar --one-top-level --transform ... ./onetop03.at:24: @@ -20055,6 +20038,45 @@ tar --one-top-level --transform 's/c/d/' -x -f ../a.tar find . | sort ) +235. onetop02.at:21: ok + +237. onetop04.at:21: testing tar --one-top-level --transform ... +./onetop04.at:24: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +) +./onetop04.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +) ./onetop03.at:24: mkdir ustar (cd ustar @@ -20076,7 +20098,24 @@ tar --one-top-level --transform 's/c/d/' -x -f ../a.tar find . | sort ) -195. grow.at:24: ok +./onetop04.at:24: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +) ./onetop03.at:24: mkdir posix (cd posix @@ -20098,12 +20137,12 @@ tar --one-top-level --transform 's/c/d/' -x -f ../a.tar find . | sort ) -./onetop03.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +./onetop04.at:24: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -20114,19 +20153,14 @@ genfile --file a/b genfile --file c tar cf a.tar a c -mkdir out -cd out -tar --one-top-level --transform 's/c/d/' -x -f ../a.tar -find . | sort +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort ) - -237. onetop04.at:21: testing tar --one-top-level --transform ... -./onetop04.at:24: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +./onetop03.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -20137,15 +20171,17 @@ genfile --file a/b genfile --file c tar cf a.tar a c -tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort ) -236. onetop03.at:21: ok ./onetop04.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -20158,6 +20194,7 @@ tar cf a.tar a c tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort ) +236. onetop03.at:21: ok 238. onetop05.at:21: testing tar --one-top-level restoring permissions ... ./onetop05.at:28: @@ -20207,24 +20244,6 @@ echo "TOP: mode changed: $orig_mode != $mode" fi ) -./onetop04.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir a -genfile --file a/b -genfile --file c -tar cf a.tar a c -tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort -) ./onetop05.at:28: mkdir oldgnu (cd oldgnu @@ -20272,42 +20291,6 @@ echo "TOP: mode changed: $orig_mode != $mode" fi ) -./onetop04.at:24: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir a -genfile --file a/b -genfile --file c -tar cf a.tar a c -tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort -) -./onetop04.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir a -genfile --file a/b -genfile --file c -tar cf a.tar a c -tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort -) ./onetop05.at:28: mkdir ustar (cd ustar @@ -20357,6 +20340,25 @@ ) 237. onetop04.at:21: ok +239. gtarfail.at:21: testing gtarfail ... +./gtarfail.at:26: + +test -z "$STAR_TESTSCRIPTS" && exit 77 +tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 + + +tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar + +--- - 2024-12-25 15:37:04.559124114 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/239/stdout 2024-12-25 15:37:04.550225592 +0000 +@@ -1,7 +1 @@ +--rw-r--r-- jes/glone 518 2001-05-25 14:41 vedpowered.gif +--rw-r--r-- jes/glone 6825 1997-04-29 00:19 cd.gif +--rw-r--r-- jes/glone 33354 1999-06-22 12:17 DSCN0049c.JPG +--rw-r--r-- jes/glone 86159 2001-06-05 18:16 Window1.jpg +--rw-r--r-- jes/glone 1310 2001-05-25 13:05 vipower.gif +--rw-rw-rw- jes/glone 148753 1998-09-15 13:08 billyboy.jpg + ./onetop05.at:28: mkdir posix (cd posix @@ -20404,25 +20406,6 @@ echo "TOP: mode changed: $orig_mode != $mode" fi ) -239. gtarfail.at:21: testing gtarfail ... -./gtarfail.at:26: - -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 - - -tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar - ---- - 2024-12-25 15:27:22.735016254 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/239/stdout 2024-12-25 15:27:22.728593518 +0000 -@@ -1,7 +1 @@ ---rw-r--r-- jes/glone 518 2001-05-25 14:41 vedpowered.gif ---rw-r--r-- jes/glone 6825 1997-04-29 00:19 cd.gif ---rw-r--r-- jes/glone 33354 1999-06-22 12:17 DSCN0049c.JPG ---rw-r--r-- jes/glone 86159 2001-06-05 18:16 Window1.jpg ---rw-r--r-- jes/glone 1310 2001-05-25 13:05 vipower.gif ---rw-rw-rw- jes/glone 148753 1998-09-15 13:08 billyboy.jpg - 239. gtarfail.at:21: skipped (gtarfail.at:26) 240. gtarfail2.at:21: testing gtarfail2 ... @@ -20433,6 +20416,20 @@ tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar +--- - 2024-12-25 15:37:04.852783047 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/240/stdout 2024-12-25 15:37:04.846197746 +0000 +@@ -1,11 +1 @@ +--rwxr-xr-x jes/glone 214 2001-09-21 14:08 .clean +-lrwxrwxrwx jes/cats 0 1998-05-07 12:39 RULES -> makefiles/RULES +-drwxr-sr-x jes/glone 0 2001-12-10 00:00 build/ +--rw-r--r-- jes/glone 312019 2001-12-10 00:00 build/smake-1.2.tar.gz +-drwxr-sr-x jes/glone 0 2001-11-09 18:20 build/psmake/ +--rwxr-xr-x jes/glone 259 2000-01-09 16:36 build/psmake/MAKE +--rwxr-xr-x jes/glone 4820 2001-02-25 22:45 build/psmake/MAKE.sh +--rw-r--r-- jes/glone 647 2001-02-25 23:50 build/psmake/Makefile +-lrwxrwxrwx jes/glone 0 2001-08-29 10:53 build/psmake/archconf.c -> ../archconf.c +-lrwxrwxrwx jes/glone 0 2001-08-29 10:54 build/psmake/astoi.c -> ../../lib/astoi.c + ./onetop05.at:28: mkdir gnu (cd gnu @@ -20480,20 +20477,6 @@ echo "TOP: mode changed: $orig_mode != $mode" fi ) ---- - 2024-12-25 15:27:22.805249912 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/240/stdout 2024-12-25 15:27:22.800586751 +0000 -@@ -1,11 +1 @@ ---rwxr-xr-x jes/glone 214 2001-09-21 14:08 .clean --lrwxrwxrwx jes/cats 0 1998-05-07 12:39 RULES -> makefiles/RULES --drwxr-sr-x jes/glone 0 2001-12-10 00:00 build/ ---rw-r--r-- jes/glone 312019 2001-12-10 00:00 build/smake-1.2.tar.gz --drwxr-sr-x jes/glone 0 2001-11-09 18:20 build/psmake/ ---rwxr-xr-x jes/glone 259 2000-01-09 16:36 build/psmake/MAKE ---rwxr-xr-x jes/glone 4820 2001-02-25 22:45 build/psmake/MAKE.sh ---rw-r--r-- jes/glone 647 2001-02-25 23:50 build/psmake/Makefile --lrwxrwxrwx jes/glone 0 2001-08-29 10:53 build/psmake/archconf.c -> ../archconf.c --lrwxrwxrwx jes/glone 0 2001-08-29 10:54 build/psmake/astoi.c -> ../../lib/astoi.c - 240. gtarfail2.at:21: skipped (gtarfail2.at:26) 241. multi-fail.at:21: testing multi-fail ... @@ -20510,8 +20493,8 @@ tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \ -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&- ---- - 2024-12-25 15:27:22.915436995 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/241/stdout 2024-12-25 15:27:22.912576223 +0000 +--- - 2024-12-25 15:37:05.093564454 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/241/stdout 2024-12-25 15:37:05.086175169 +0000 @@ -1,53 +1 @@ -drwxrwsr-x joerg/bs 0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/ --rw-r--r-- joerg/bs 1 2003-10-11 14:32 OBJ/i386-sunos5-gcc/Dnull @@ -20569,6 +20552,7 @@ 238. onetop05.at:21: ok 241. multi-fail.at:21: skipped (multi-fail.at:26) + 242. ustar-big-2g.at:21: testing ustar-big-2g ... ./ustar-big-2g.at:26: test "${TARTEST_SKIP_LARGE_FILES:-0}" != 0 && exit 77 @@ -20582,16 +20566,6 @@ tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2 -stderr: ---- - 2024-12-25 15:27:23.598129741 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/242/stdout 2024-12-25 15:27:23.592512309 +0000 -@@ -1,3 +1 @@ ---rw------- jes/glone 2147483647 2002-06-15 14:53 big ---rw-r--r-- jes/glone 0 2002-06-15 14:53 file - -242. ustar-big-2g.at:21: skipped (ustar-big-2g.at:26) - - 243. ustar-big-8g.at:21: testing ustar-big-8g ... ./ustar-big-8g.at:26: test "${TARTEST_SKIP_LARGE_FILES:-0}" != 0 && exit 77 @@ -20606,6 +20580,22 @@ tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2 stderr: +stderr: +--- - 2024-12-25 15:37:06.099425482 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/242/stdout 2024-12-25 15:37:06.094080345 +0000 +@@ -1,3 +1 @@ +--rw------- jes/glone 2147483647 2002-06-15 14:53 big +--rw-r--r-- jes/glone 0 2002-06-15 14:53 file + +--- - 2024-12-25 15:37:06.099612905 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/243/stdout 2024-12-25 15:37:06.094080345 +0000 +@@ -1,3 +1 @@ +--rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1 +--rw-r--r-- jes/glone 0 2002-06-15 14:53 file + +243. ustar-big-8g.at:21: 242. ustar-big-2g.at:21: skipped (ustar-big-2g.at:26) + skipped (ustar-big-8g.at:26) + 244. pax-big-10g.at:21: testing pax-big-10g ... ./pax-big-10g.at:26: test "${TARTEST_SKIP_LARGE_FILES:-0}" != 0 && exit 77 @@ -20619,21 +20609,67 @@ tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2 ---- - 2024-12-25 15:27:23.651445729 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/243/stdout 2024-12-25 15:27:23.644507421 +0000 -@@ -1,3 +1 @@ ---rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1 ---rw-r--r-- jes/glone 0 2002-06-15 14:53 file - stderr: -243. ustar-big-8g.at:21: --- - 2024-12-25 15:27:23.666223520 +0000 -+++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/244/stdout 2024-12-25 15:27:23.660505917 +0000 +--- - 2024-12-25 15:37:06.349378826 +0000 ++++ /build/reproducible-path/tar-1.35+dfsg/tests/testsuite.dir/at-groups/244/stdout 2024-12-25 15:37:06.342057015 +0000 @@ -1,3 +1 @@ --rw------- jes/glone 10737418240 2002-06-15 21:18 10g --rw-r--r-- jes/glone 0 2002-06-15 14:53 file - skipped (ustar-big-8g.at:26) 244. pax-big-10g.at:21: skipped (pax-big-10g.at:26) +./grow.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +genfile --file foo --length 50000k +genfile --file baz +genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz +) +./grow.at:27: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +genfile --file foo --length 50000k +genfile --file baz +genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz +) +./grow.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +genfile --file foo --length 50000k +genfile --file baz +genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz +) +./grow.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +genfile --file foo --length 50000k +genfile --file baz +genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz +) +195. grow.at:24: ok 173. sparse05.at:21: ok ## ------------- ## @@ -20651,7 +20687,7 @@ create-stamp debian/debhelper-build-stamp dh_prep dh_auto_install - make -j3 install DESTDIR=/build/reproducible-path/tar-1.35\+dfsg/debian/tmp AM_UPDATE_INFO_DIR=no + make -j4 install DESTDIR=/build/reproducible-path/tar-1.35\+dfsg/debian/tmp AM_UPDATE_INFO_DIR=no make[1]: Entering directory '/build/reproducible-path/tar-1.35+dfsg' Making install in doc make[2]: Entering directory '/build/reproducible-path/tar-1.35+dfsg/doc' @@ -20701,8 +20737,8 @@ make[3]: Nothing to be done for 'install-data-am'. /usr/bin/mkdir -p '/build/reproducible-path/tar-1.35+dfsg/debian/tmp/usr/sbin' /usr/bin/mkdir -p '/build/reproducible-path/tar-1.35+dfsg/debian/tmp/usr/sbin' - /usr/bin/install -c backup restore '/build/reproducible-path/tar-1.35+dfsg/debian/tmp/usr/sbin' /usr/bin/install -c backup.sh dump-remind '/build/reproducible-path/tar-1.35+dfsg/debian/tmp/usr/sbin' + /usr/bin/install -c backup restore '/build/reproducible-path/tar-1.35+dfsg/debian/tmp/usr/sbin' make[3]: Leaving directory '/build/reproducible-path/tar-1.35+dfsg/scripts' make[2]: Leaving directory '/build/reproducible-path/tar-1.35+dfsg/scripts' Making install in po @@ -20790,45 +20826,45 @@ dh_perl dh_link dh_strip_nondeterminism - Normalized debian/tar/usr/share/locale/uk/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/pl/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/fi/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/ko/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/sk/LC_MESSAGES/tar.mo Normalized debian/tar/usr/share/locale/zh_TW/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/nl/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/eo/LC_MESSAGES/tar.mo Normalized debian/tar/usr/share/locale/ga/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/tr/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/el/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/ru/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/zh_CN/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/hu/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/hr/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/da/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/nb/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/vi/LC_MESSAGES/tar.mo Normalized debian/tar/usr/share/locale/sr/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/gl/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/fr/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/ro/LC_MESSAGES/tar.mo Normalized debian/tar/usr/share/locale/id/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/sl/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/et/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/pt_BR/LC_MESSAGES/tar.mo Normalized debian/tar/usr/share/locale/pt/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/vi/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/eu/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/da/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/hu/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/bg/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/hr/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/ja/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/ky/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/fi/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/ro/LC_MESSAGES/tar.mo Normalized debian/tar/usr/share/locale/ka/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/ko/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/ca/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/ms/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/sk/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/de/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/zh_CN/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/nb/LC_MESSAGES/tar.mo - Normalized debian/tar/usr/share/locale/es/LC_MESSAGES/tar.mo Normalized debian/tar/usr/share/locale/it/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/gl/LC_MESSAGES/tar.mo Normalized debian/tar/usr/share/locale/cs/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/ms/LC_MESSAGES/tar.mo Normalized debian/tar/usr/share/locale/sv/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/uk/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/de/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/eo/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/ky/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/el/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/ja/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/sl/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/pl/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/es/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/pt_BR/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/ca/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/et/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/bg/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/fr/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/nl/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/eu/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/tr/LC_MESSAGES/tar.mo + Normalized debian/tar/usr/share/locale/ru/LC_MESSAGES/tar.mo dh_compress dh_fixperms dh_missing @@ -20845,9 +20881,9 @@ dh_gencontrol dh_md5sums dh_builddeb -dpkg-deb: building package 'tar' in '../tar_1.35+dfsg-3.1_armhf.deb'. -dpkg-deb: building package 'tar-dbgsym' in '../tar-dbgsym_1.35+dfsg-3.1_armhf.deb'. dpkg-deb: building package 'tar-scripts' in '../tar-scripts_1.35+dfsg-3.1_all.deb'. +dpkg-deb: building package 'tar-dbgsym' in '../tar-dbgsym_1.35+dfsg-3.1_armhf.deb'. +dpkg-deb: building package 'tar' in '../tar_1.35+dfsg-3.1_armhf.deb'. dpkg-genbuildinfo --build=binary -O../tar_1.35+dfsg-3.1_armhf.buildinfo dpkg-genchanges --build=binary -O../tar_1.35+dfsg-3.1_armhf.changes dpkg-genchanges: info: binary-only upload (no source code included) @@ -20855,12 +20891,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/31291/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/31291/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/12074 and its subdirectories -I: Current time: Wed Dec 25 03:29:25 -12 2024 -I: pbuilder-time-stamp: 1735140565 +I: removing directory /srv/workspace/pbuilder/31291 and its subdirectories +I: Current time: Thu Dec 26 05:49:24 +14 2024 +I: pbuilder-time-stamp: 1735141764