diff --git a/add-return-values-to-backup-scripts.patch b/add-return-values-to-backup-scripts.patch deleted file mode 100644 index d284224..0000000 --- a/add-return-values-to-backup-scripts.patch +++ /dev/null @@ -1,56 +0,0 @@ -From: Alexey Svistunov -Date: 2016-03-23 11:59:33 +0300 -Subject: add return values to the backup scripts for better results monitoring. -References: https://savannah.gnu.org/patch/?8953 -Upstream: submitted - -Index: tar-1.28/scripts/backup.in -=================================================================== ---- tar-1.28.orig/scripts/backup.in -+++ tar-1.28/scripts/backup.in -@@ -153,9 +153,16 @@ message 20 "BACKUP_FILES=$BACKUP_FILES" - # piped through 'tee' to the logfile. Doing this, instead of having - # multiple pipelines all over the place, is cleaner and allows access to - # the exit value from various commands more easily. -+set -o pipefail - ( - message 1 "preparing tapes" - $MT_BEGIN "${TAPE_FILE}" -+ RESULT=$? -+ if [ $RESULT -ne 0 ] ; then -+ echo "Tape is not ready." 1>&2 -+ exit $RESULT -+ fi -+ - rm -f "${VOLNO_FILE}" - - message 1 "processing backup directories" -@@ -245,10 +252,11 @@ message 20 "BACKUP_FILES=$BACKUP_FILES" - $MT_OFFLINE "${TAPE_FILE}" - echo "." - ) 2>&1 | tee -a "${LOGFILE}" -+RESULT=$? - - if test "${ADMINISTRATOR}" != NONE; then - echo "Sending the dump log to ${ADMINISTRATOR}" - mail -s "Results of backup started ${startdate}" ${ADMINISTRATOR} < "${LOGFILE}" - fi -- -+exit $RESULT - # EOF -Index: tar-1.28/scripts/backup.sh.in -=================================================================== ---- tar-1.28.orig/scripts/backup.sh.in -+++ tar-1.28/scripts/backup.sh.in -@@ -311,8 +311,10 @@ backup_host() { - CMD="exec ${TAR_PART1} -f \"${TAPE_FILE}\" $@" - message 10 "CMD: $CMD" - sh -c "$CMD" -- message 10 "RC: $?" -+ RC=$? -+ message 10 "RC: $RC" - fi -+ return $RC - } - - print_level() { diff --git a/add_readme-tests.patch b/add_readme-tests.patch index c9ca222..84fe020 100644 --- a/add_readme-tests.patch +++ b/add_readme-tests.patch @@ -1,13 +1,7 @@ ---- - Makefile.in | 2 +- - README-tests | 22 ++++++++++++++++++++++ - 2 files changed, 23 insertions(+), 1 deletion(-) - -Index: tar-1.28/Makefile.in -=================================================================== ---- tar-1.28.orig/Makefile.in 2014-07-27 21:33:48.000000000 +0100 -+++ tar-1.28/Makefile.in 2014-08-03 00:15:17.000000000 +0100 -@@ -141,7 +141,7 @@ PRE_UNINSTALL = : +diff -ruN a/Makefile.in b/Makefile.in +--- a/Makefile.in 2017-12-22 20:14:53.900579664 -0500 ++++ b/Makefile.in 2017-12-22 20:21:21.363943130 -0500 +@@ -122,7 +122,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @@ -15,11 +9,10 @@ Index: tar-1.28/Makefile.in +DIST_COMMON = $(srcdir)/Make.rules INSTALL NEWS README README-tests AUTHORS \ ChangeLog THANKS $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in ABOUT-NLS COPYING TODO build-aux/compile \ -Index: tar-1.28/README-tests -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ tar-1.28/README-tests 2014-08-03 00:15:17.000000000 +0100 + $(srcdir)/config.h.in ABOUT-NLS COPYING TODO build-aux/ar-lib \ +diff -ruN a/README-tests b/README-tests +--- a/README-tests 1969-12-31 19:00:00.000000000 -0500 ++++ b/README-tests 2017-12-22 20:21:59.706691355 -0500 @@ -0,0 +1,22 @@ +Subpackage tar-tests +==================== diff --git a/tar-1.29-extract_pathname_bypass.patch b/tar-1.29-extract_pathname_bypass.patch deleted file mode 100644 index 6c5d8d7..0000000 --- a/tar-1.29-extract_pathname_bypass.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 7340f67b9860ea0531c1450e5aa261c50f67165d Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Sat, 29 Oct 2016 21:04:40 -0700 -Subject: When extracting, skip ".." members - -* NEWS: Document this. -* src/extract.c (extract_archive): Skip members whose names -contain "..". ---- - -Index: tar-1.29/src/extract.c -=================================================================== ---- tar-1.29.orig/src/extract.c 2016-01-20 10:26:32.000000000 +0100 -+++ tar-1.29/src/extract.c 2016-12-15 18:11:56.752575954 +0100 -@@ -1629,12 +1629,20 @@ extract_archive (void) - { - char typeflag; - tar_extractor_t fun; -+ bool skip_dotdot_name; - - fatal_exit_hook = extract_finish; - - set_next_block_after (current_header); - -+ skip_dotdot_name = (!absolute_names_option -+ && contains_dot_dot (current_stat_info.orig_file_name)); -+ if (skip_dotdot_name) -+ ERROR ((0, 0, _("%s: Member name contains '..'"), -+ quotearg_colon (current_stat_info.orig_file_name))); -+ - if (!current_stat_info.file_name[0] -+ || skip_dotdot_name - || (interactive_option - && !confirm ("extract", current_stat_info.file_name))) - { diff --git a/tar-1.29.tar.bz2 b/tar-1.29.tar.bz2 deleted file mode 100644 index 39475d2..0000000 --- a/tar-1.29.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:236b11190c0a3a6885bdb8d61424f2b36a5872869aa3f7f695dea4b4843ae2f2 -size 2715993 diff --git a/tar-1.29.tar.bz2.sig b/tar-1.29.tar.bz2.sig deleted file mode 100644 index a541d84..0000000 --- a/tar-1.29.tar.bz2.sig +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.12 (GNU/Linux) - -iEYEABECAAYFAlc6FQcACgkQNgKwf1XQxzI9WgCeIqotzeBo5lOKmZ7pNEYGiehx -geMAnjQKNZlGLWuGZH/NxEbkgsQiN5G/ -=mj1Z ------END PGP SIGNATURE----- diff --git a/tar-1.30-tests-difflink.patch b/tar-1.30-tests-difflink.patch new file mode 100644 index 0000000..7e98a3a --- /dev/null +++ b/tar-1.30-tests-difflink.patch @@ -0,0 +1,14 @@ +Per https://www.mail-archive.com/bug-tar@gnu.org/msg05440.html +diff --git a/tests/difflink.at b/tests/difflink.at +index eadfb08..4e01176 100644 +--- a/tests/difflink.at ++++ b/tests/difflink.at +@@ -21,7 +21,7 @@ mkdir a + genfile -f a/x + ln -s x a/y + ln a/y a/z +-tar cf a.tar a ++tar cf a.tar a/x a/y a/z + rm a/z + ln -s x a/z + tar df a.tar diff --git a/tar-1.30-tests_dirrem_race.patch b/tar-1.30-tests_dirrem_race.patch new file mode 100644 index 0000000..f013786 --- /dev/null +++ b/tar-1.30-tests_dirrem_race.patch @@ -0,0 +1,90 @@ +From 64b43fdf70d82c39eb2ca900cd4f8e49b86c2020 Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup +Date: Thu, 4 Jan 2018 18:55:12 +0100 +Subject: tests: fix race in dirrem01 and dirrem02 + +Previously the '--checkpoint-action=echo' was triggered after +'--checkpoint-action=sleep=1' - so the order of events *usually* +was (for --format='gnu'): + + ... + 1. checkpoint handler before write of 'dir/sub' member + 2. one-second delay + 3. stderr write: 'tar: Write checkpoint 3' + 4. write the member 'dir/sub' into the archive + 5. check that the member's ctime has not been changed + 6. genfile's detecting 'Write checkpoint', doing unlink + ... + +But sometimes, the genfile was fast enough to win the race and +unlinked the directory before the member was written into the +archive (IOW, the order was 1-2-3-6-4-5). This led to the +occasional warning 'tar: dir/sub: file changed as we read it'. + +Swap the order of 'sleep=1' and 'echo' actions so the genfile +utility has (hopefully) enough time to do the unlink before +writing the file into the archive (enforce 1-2-3-6-4-5 order). + +* tests/dirrem01.at: Swap 'sleep=1' and 'echo' actions. +* tests/dirrem02.at: Likewise. +--- + tests/dirrem01.at | 5 +++-- + tests/dirrem02.at | 7 ++++--- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/tests/dirrem01.at b/tests/dirrem01.at +index 40344dc..dabc206 100644 +--- a/tests/dirrem01.at ++++ b/tests/dirrem01.at +@@ -47,14 +47,15 @@ gnu) CPT=3;; + esac + + genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \ +- tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ +- --checkpoint-action='echo' -c -f archive.tar \ ++ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='echo' \ ++ --checkpoint-action='sleep=1' -c -f archive.tar \ + --listed-incremental db -v dir >/dev/null + ], + [1], + [ignore], + [tar: dir: Directory is new + tar: dir/sub: Directory is new ++tar: dir/sub: file changed as we read it + tar: dir/sub: File removed before we read it + ],[],[],[gnu,posix]) + +diff --git a/tests/dirrem02.at b/tests/dirrem02.at +index e1cf9ef..924454f 100644 +--- a/tests/dirrem02.at ++++ b/tests/dirrem02.at +@@ -20,7 +20,7 @@ + + # Description: + # +-# When an explicitley named directory disappears during creation ++# When an explicitly named directory disappears during creation + # of incremental dump, tar should still exit with TAREXIT_FAILURE (2). + # + # For further details see dirrem01.at +@@ -44,14 +44,15 @@ gnu) CPT=3;; + esac + + genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \ +- tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ +- --checkpoint-action='echo' -c -f archive.tar \ ++ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='echo' \ ++ --checkpoint-action='sleep=1' -c -f archive.tar \ + --listed-incremental db -v dir dir/sub >/dev/null + ], + [2], + [ignore], + [tar: dir: Directory is new + tar: dir/sub: Directory is new ++tar: dir/sub: file changed as we read it + tar: dir/sub: Cannot open: No such file or directory + tar: Exiting with failure status due to previous errors + ],[],[],[gnu,posix]) +-- +cgit v1.0-41-gc330 + diff --git a/tar-1.30.tar.bz2 b/tar-1.30.tar.bz2 new file mode 100644 index 0000000..88f8660 --- /dev/null +++ b/tar-1.30.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87592b86cb037c554375f5868bdd3cc57748aef38d6cb741c81065f0beac63b7 +size 2858639 diff --git a/tar-1.30.tar.bz2.sig b/tar-1.30.tar.bz2.sig new file mode 100644 index 0000000..bf12ecf --- /dev/null +++ b/tar-1.30.tar.bz2.sig @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.15 (GNU/Linux) + +iEYEABECAAYFAlo2WDAACgkQNgKwf1XQxzJ5dgCff14Rh/AJ7EwFNzP7fij1CBFN +bDsAoKMr0vWfos0xmmd3/9egDryGJLjU +=p7/W +-----END PGP SIGNATURE----- diff --git a/tar.changes b/tar.changes index 511d4a4..a6af9f9 100644 --- a/tar.changes +++ b/tar.changes @@ -1,3 +1,41 @@ +------------------------------------------------------------------- +Fri May 11 10:41:40 UTC 2018 - kstreitova@suse.com + +- add tar-1.30-tests_dirrem_race.patch to fix race in dirrem01 and + dirrem02 tests that were passing/failing randomly because of that +- run spec-cleaner +- renumber patches + +------------------------------------------------------------------- +Tue Apr 3 14:58:19 CEST 2018 - kukuk@suse.de + +- Use %license instead of %doc [bsc#1082318] + +------------------------------------------------------------------- +Thu Jan 4 13:24:20 UTC 2018 - kstreitova@suse.com + +- add tar-1.30-tests-difflink.patch to fix difflink.at test + (https://www.mail-archive.com/bug-tar@gnu.org/msg05440.html) + +------------------------------------------------------------------- +Mon Dec 18 03:45:51 UTC 2017 - avindra@opensuse.org + +- GNU tar 1.30: + * Member names containing '..' components are now skipped when + extracting. + * Report erroneous use of position-sensitive options. + * --numeric-owner now affects private headers too. + * Fixed the --delay-directory-restore option + * The --warnings=failed-read option + * The --warnings=none option now suppresses all warnings + * Fix reporting of hardlink mismatches during compare +- cleanup with spec-cleaner +- switch all urls to https +- drop upstreamed patches + * add-return-values-to-backup-scripts.patch + * tar-1.29-extract_pathname_bypass.patch +- rebase add_readme-tests.patch + ------------------------------------------------------------------- Thu Apr 20 13:58:56 UTC 2017 - kstreitova@suse.com diff --git a/tar.spec b/tar.spec index 67c17b1..2f537f1 100644 --- a/tar.spec +++ b/tar.spec @@ -1,7 +1,7 @@ # # spec file for package tar # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,33 +19,31 @@ # For correct subpackages docs installation into tar doc directory %global _docdir_fmt %{name} Name: tar -Version: 1.29 +Version: 1.30 Release: 0 Summary: GNU implementation of ((t)ape (ar)chiver) -License: GPL-3.0+ +License: GPL-3.0-or-later Group: Productivity/Archiving/Backup -Url: http://www.gnu.org/software/tar/ -Source0: http://ftp.gnu.org/gnu/tar/%{name}-%{version}.tar.bz2 -Source1: http://ftp.gnu.org/gnu/tar/%{name}-%{version}.tar.bz2.sig +Url: https://www.gnu.org/software/tar/ +Source0: https://ftp.gnu.org/gnu/tar/%{name}-%{version}.tar.bz2 +Source1: https://ftp.gnu.org/gnu/tar/%{name}-%{version}.tar.bz2.sig # http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x3602B07F55D0C732 Source2: %{name}.keyring -Patch3: %{name}-wildcards.patch -Patch6: %{name}-backup-spec-fix-paths.patch -Patch10: paxutils-rtapelib_mtget.patch +Patch0: %{name}-wildcards.patch +Patch1: %{name}-backup-spec-fix-paths.patch +Patch2: paxutils-rtapelib_mtget.patch # don't print warning about zero blocks # the patch is used in Fedora and Debian # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=235820 -Patch11: %{name}-ignore_lone_zero_blocks.patch +Patch3: %{name}-ignore_lone_zero_blocks.patch # The next patch is disabled because it causes a regression: #https://bugzilla.opensuse.org/show_bug.cgi?id=918487 -Patch12: %{name}-recursive--files-from.patch -Patch20: add_readme-tests.patch -# PATCH-FEATURE-UPSTREAM add-return-values-to-backup-scripts.patch - -# add return values to the backup scripts for better results monitoring. -# https://savannah.gnu.org/patch/?8953 -Patch21: add-return-values-to-backup-scripts.patch -# PATCH-FIX-UPSTREAM bnc#1007188 CVE-2016-6321 kstreitova@suse.com -- fix POINTYFEATHER vulnerability -Patch22: %{name}-1.29-extract_pathname_bypass.patch +Patch4: %{name}-recursive--files-from.patch +Patch5: add_readme-tests.patch +# PATCH-FIX-UPSTREAM kstreitova@suse.com -- fix difflink.at test +Patch6: tar-1.30-tests-difflink.patch +# PATCH-FIX-UPSTREAM kstreitova@suse.com -- fix race in dirrem01 and dirrem02 tests +Patch7: tar-1.30-tests_dirrem_race.patch BuildRequires: automake BuildRequires: libacl-devel BuildRequires: libattr-devel @@ -56,7 +54,6 @@ Recommends: %{name}-rmt = %{version} Recommends: mt Recommends: xz Provides: base:/bin/tar -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description GNU Tar is an archiver program. It is used to create and manipulate files @@ -114,14 +111,14 @@ it may as well access remote devices or files. %prep %setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %patch3 -p1 +#%patch4 -p1 +%patch5 -p1 %patch6 -p1 -%patch10 -p1 -%patch11 -p1 -#%patch12 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 +%patch7 -p1 %build %define my_cflags -W -Wall -Wpointer-arith -Wstrict-prototypes -Wformat-security -Wno-unused-parameter -fPIE @@ -158,7 +155,7 @@ install -D -m 644 scripts/backup-specs %{buildroot}%{_sysconfdir}/backup/backup- mv %{buildroot}%{_sbindir}/restore %{buildroot}%{_sbindir}/restore.sh rm -f %{buildroot}%{_infodir}/dir install -D -m 644 -t %{buildroot}%{_docdir}/%{name} README* ABOUT-NLS AUTHORS NEWS THANKS \ - ChangeLog TODO COPYING + ChangeLog TODO install -d -m 755 %{buildroot}%{_localstatedir}/lib/tests cp -r tests %{buildroot}%{_localstatedir}/lib/tests/tar rm %{buildroot}%{_localstatedir}/lib/tests/tar/*.{c,h,o} @@ -191,7 +188,6 @@ if [ ! -f %{_bindir}/gnurmt ] ; then fi %files backup-scripts -%defattr(-,root, root) %{_sbindir}/backup %{_sbindir}/restore.sh %{_libexecdir}/backup.sh @@ -200,24 +196,21 @@ fi %config(noreplace) %{_sysconfdir}/backup/backup-specs %files lang -f %{name}.lang -%defattr(-,root,root) %files tests -%defattr(-,root, root) %{_localstatedir}/lib/tests %{_docdir}/%{name}/README-tests %files rmt -%defattr(-, root, root) %ghost %{_bindir}/rmt %{_bindir}/gnurmt %ghost %{_mandir}/man1/rmt.1%{ext_man} -%{_mandir}/man1/gnurmt.1%{ext_man} +%{_mandir}/man1/gnurmt.1%{?ext_man} %ghost %{_sysconfdir}/alternatives/rmt %ghost %{_sysconfdir}/alternatives/rmt.1%{ext_man} %files doc -%defattr(-, root, root) +%dir %{_docdir}/%{name} %{_docdir}/%{name}/NEWS %{_docdir}/%{name}/README %{_docdir}/%{name}/ABOUT-NLS @@ -228,13 +221,11 @@ fi %{_infodir}/%{name}.info* %files -%defattr(-, root, root) +%license COPYING #UsrMerge /bin/%{name} #EndUsrMerge %{_bindir}/%{name} -%{_mandir}/man1/%{name}.1%{ext_man} -%dir %{_docdir}/%{name} -%{_docdir}/%{name}/COPYING +%{_mandir}/man1/%{name}.1%{?ext_man} %changelog