2006-12-19 00:17:56 +01:00
|
|
|
#
|
2011-03-15 10:21:35 +01:00
|
|
|
# spec file for package tar
|
2006-12-19 00:17:56 +01:00
|
|
|
#
|
2024-02-26 11:43:08 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2006-12-19 00:17:56 +01:00
|
|
|
#
|
2008-11-21 15:53:43 +01:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2020-02-02 20:29:42 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-19 00:17:56 +01:00
|
|
|
#
|
|
|
|
|
2012-04-22 14:42:40 +02:00
|
|
|
|
2017-04-20 14:46:48 +02:00
|
|
|
# For correct subpackages docs installation into tar doc directory
|
|
|
|
%global _docdir_fmt %{name}
|
2006-12-19 00:17:56 +01:00
|
|
|
Name: tar
|
Accepting request 1131478 from home:smolsheep:upgrades
- GNU tar 1.34:
* Fail when building GNU tar if the platform supports 64-bit
time_t but the build only uses 32-bit time_t.
* Leave the devmajor and devminor fields empty (rather than
zero) for non-special files, as this is more compatible with
traditional tar.
Fixes:
* Fix interaction of --update with --wildcards.
* When extracting archives into an empty directory, do not create
hard links to files outside that directory.
* Handle partial reads from regular files.
* Warn file changed as we read it less often. Formerly, tar
warned if the file's size or ctime changed. However, this
generated a false positive if tar read a file while another
process hard-linked to it, changing its ctime. Now, tar warns
if the file's size, mtime, user ID, group ID, or mode changes.
Although neither heuristic is perfect, the new one should work
better in practice.
* Fix --ignore-failed-read to ignore file-changed read errors
as far as exit status is concerned. You can now suppress
file-changed issues entirely with --ignore-failed-read
--warning=no-file-changed.
* Fix --remove-files to not remove a file that changed while we
read it.
* Fix --atime-preserve=replace to not fail if there was no need
to replace, either because we did not read the file, or the
atime did not change.
* Fix race when creating a parent directory while another process
is also doing so.
* Fix handling of prefix keywords not followed by "." in pax
headers.
* Fix handling of out-of-range sparse entries in pax headers.
* Fix handling of --transform='s/s/@/2'.
* Fix treatment of options ending in slash in files-from list.
* Fix crash on tar --checkpoint-action exec=\".
* Fix low-memory crash when reading incremental dumps.
* Fix --exclude-vcs-ignores memory allocation misuse.
- Update patch:
* tar-backup-spec-fix-paths.patch: upstream fixed 2/3rd of paths
* tar-fix-extract-unlink.patch
some of this is overwritten by bsc1202436-1 and some was fixed
upstream
* add_readme-tests.patch as Makefile.in no longer exists
- Removed:
* tar-fix-race-condition.patch
* tar-avoid-overflow-in-symlinks-tests.patch
* bsc1200657.patch
* bsc1202436-2.patch
* bsc1202436-1.patch
OBS-URL: https://build.opensuse.org/request/show/1131478
OBS-URL: https://build.opensuse.org/package/show/Base:System/tar?expand=0&rev=128
2023-12-07 16:47:00 +01:00
|
|
|
Version: 1.35
|
2011-12-27 13:28:15 +01:00
|
|
|
Release: 0
|
2017-04-20 14:46:48 +02:00
|
|
|
Summary: GNU implementation of ((t)ape (ar)chiver)
|
2018-04-09 11:41:22 +02:00
|
|
|
License: GPL-3.0-or-later
|
2014-08-30 14:34:29 +02:00
|
|
|
Group: Productivity/Archiving/Backup
|
2020-02-02 20:29:42 +01:00
|
|
|
URL: https://www.gnu.org/software/tar/
|
2021-01-10 20:47:31 +01:00
|
|
|
Source0: https://ftp.gnu.org/gnu/tar/%{name}-%{version}.tar.xz
|
|
|
|
Source1: https://ftp.gnu.org/gnu/tar/%{name}-%{version}.tar.xz.sig
|
2013-10-25 16:06:49 +02:00
|
|
|
# http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x3602B07F55D0C732
|
2017-04-20 14:46:48 +02:00
|
|
|
Source2: %{name}.keyring
|
2023-02-18 17:33:21 +01:00
|
|
|
Source3: pax-global-records.tar
|
2018-05-11 17:18:25 +02:00
|
|
|
Patch0: %{name}-wildcards.patch
|
|
|
|
Patch1: %{name}-backup-spec-fix-paths.patch
|
|
|
|
Patch2: paxutils-rtapelib_mtget.patch
|
2014-07-29 21:30:27 +02:00
|
|
|
# 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
|
2018-05-11 17:18:25 +02:00
|
|
|
Patch3: %{name}-ignore_lone_zero_blocks.patch
|
|
|
|
Patch5: add_readme-tests.patch
|
2021-06-14 10:38:12 +02:00
|
|
|
Patch6: tar-PIE.patch
|
2021-10-14 15:01:22 +02:00
|
|
|
Patch7: tests-skip-time01-on-32bit-time_t.patch
|
2022-10-31 12:54:41 +01:00
|
|
|
Patch11: tar-fix-extract-unlink.patch
|
2023-02-18 17:33:21 +01:00
|
|
|
# PATCH-FIX-SUSE danilo.spinella@suse.com bsc#1202436
|
|
|
|
Patch12: go-testsuite-test-hang.patch
|
|
|
|
# PATCH-FIX-UPSTREAM danilo.spinella@suse.com bsc#1202436
|
2023-02-23 15:09:58 +01:00
|
|
|
Patch13: bsc1202436.patch
|
2023-02-18 17:33:21 +01:00
|
|
|
# PATCH-FIX-UPSTREAM danilo.spinella@suse.com bsc#1207753
|
|
|
|
# tar has a one-byte out-of-bounds read that results in use of
|
|
|
|
# uninitialized memory for a conditional jump
|
2023-02-23 15:09:58 +01:00
|
|
|
Patch16: fix-CVE-2022-48303.patch
|
Accepting request 1131478 from home:smolsheep:upgrades
- GNU tar 1.34:
* Fail when building GNU tar if the platform supports 64-bit
time_t but the build only uses 32-bit time_t.
* Leave the devmajor and devminor fields empty (rather than
zero) for non-special files, as this is more compatible with
traditional tar.
Fixes:
* Fix interaction of --update with --wildcards.
* When extracting archives into an empty directory, do not create
hard links to files outside that directory.
* Handle partial reads from regular files.
* Warn file changed as we read it less often. Formerly, tar
warned if the file's size or ctime changed. However, this
generated a false positive if tar read a file while another
process hard-linked to it, changing its ctime. Now, tar warns
if the file's size, mtime, user ID, group ID, or mode changes.
Although neither heuristic is perfect, the new one should work
better in practice.
* Fix --ignore-failed-read to ignore file-changed read errors
as far as exit status is concerned. You can now suppress
file-changed issues entirely with --ignore-failed-read
--warning=no-file-changed.
* Fix --remove-files to not remove a file that changed while we
read it.
* Fix --atime-preserve=replace to not fail if there was no need
to replace, either because we did not read the file, or the
atime did not change.
* Fix race when creating a parent directory while another process
is also doing so.
* Fix handling of prefix keywords not followed by "." in pax
headers.
* Fix handling of out-of-range sparse entries in pax headers.
* Fix handling of --transform='s/s/@/2'.
* Fix treatment of options ending in slash in files-from list.
* Fix crash on tar --checkpoint-action exec=\".
* Fix low-memory crash when reading incremental dumps.
* Fix --exclude-vcs-ignores memory allocation misuse.
- Update patch:
* tar-backup-spec-fix-paths.patch: upstream fixed 2/3rd of paths
* tar-fix-extract-unlink.patch
some of this is overwritten by bsc1202436-1 and some was fixed
upstream
* add_readme-tests.patch as Makefile.in no longer exists
- Removed:
* tar-fix-race-condition.patch
* tar-avoid-overflow-in-symlinks-tests.patch
* bsc1200657.patch
* bsc1202436-2.patch
* bsc1202436-1.patch
OBS-URL: https://build.opensuse.org/request/show/1131478
OBS-URL: https://build.opensuse.org/package/show/Base:System/tar?expand=0&rev=128
2023-12-07 16:47:00 +01:00
|
|
|
Patch17: add_forgotten-tests.patch
|
2021-02-15 22:59:12 +01:00
|
|
|
BuildRequires: automake >= 1.15
|
2014-11-21 12:49:21 +01:00
|
|
|
BuildRequires: libacl-devel
|
|
|
|
BuildRequires: libselinux-devel
|
2017-04-20 14:46:48 +02:00
|
|
|
Recommends: %{name}-rmt = %{version}
|
|
|
|
Recommends: mt
|
2010-11-24 10:34:58 +01:00
|
|
|
Recommends: xz
|
2022-04-19 14:12:02 +02:00
|
|
|
Recommends: zstd
|
2017-04-20 14:46:48 +02:00
|
|
|
Provides: base:/bin/tar
|
2006-12-19 00:17:56 +01:00
|
|
|
|
|
|
|
%description
|
2017-04-20 14:46:48 +02:00
|
|
|
GNU Tar is an archiver program. It is used to create and manipulate files
|
|
|
|
that are actually collections of many other files; the program provides
|
|
|
|
users with an organized and systematic method of controlling a large amount
|
|
|
|
of data. Despite its name, that is an acronym of "tape archiver", GNU Tar
|
|
|
|
is able to direct its output to any available devices, files or other programs,
|
|
|
|
it may as well access remote devices or files.
|
2006-12-19 00:17:56 +01:00
|
|
|
|
2010-02-18 16:59:24 +01:00
|
|
|
%package backup-scripts
|
2010-11-24 10:34:58 +01:00
|
|
|
Summary: Backup scripts
|
2010-02-18 16:59:24 +01:00
|
|
|
Group: Productivity/Archiving/Backup
|
2011-10-04 13:53:30 +02:00
|
|
|
Requires: %{name} = %{version}
|
2017-04-20 14:46:48 +02:00
|
|
|
BuildArch: noarch
|
2010-02-18 16:59:24 +01:00
|
|
|
|
|
|
|
%description backup-scripts
|
|
|
|
Shell scripts for system backup/restore
|
|
|
|
|
2014-01-09 16:04:50 +01:00
|
|
|
%package tests
|
|
|
|
Summary: Tests for the package
|
2017-03-27 16:10:00 +02:00
|
|
|
Group: Development/Tools/Other
|
2014-01-09 16:04:50 +01:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description tests
|
|
|
|
Upstream testsuite for the package
|
|
|
|
|
2017-04-20 14:46:48 +02:00
|
|
|
%package rmt
|
|
|
|
Summary: Remote tape drive control server by GNU
|
|
|
|
Group: Productivity/Archiving/Backup
|
|
|
|
Requires(post): update-alternatives
|
2024-02-26 11:43:08 +01:00
|
|
|
Requires(postun): update-alternatives
|
2017-04-20 14:46:48 +02:00
|
|
|
Provides: rmt
|
|
|
|
|
|
|
|
%description rmt
|
|
|
|
Provides remote access to files and devices for tar, cpio
|
|
|
|
and similar backup utilities
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation files for GNU tar
|
|
|
|
Group: Documentation/Man
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
GNU Tar is an archiver program. It is used to create and manipulate files
|
|
|
|
that are actually collections of many other files; the program provides
|
|
|
|
users with an organized and systematic method of controlling a large amount
|
|
|
|
of data. Despite its name, that is an acronym of "tape archiver", GNU Tar
|
|
|
|
is able to direct its output to any available devices, files or other programs,
|
|
|
|
it may as well access remote devices or files.
|
|
|
|
|
|
|
|
%lang_package
|
2011-10-04 13:53:30 +02:00
|
|
|
|
2006-12-19 00:17:56 +01:00
|
|
|
%prep
|
Accepting request 1131478 from home:smolsheep:upgrades
- GNU tar 1.34:
* Fail when building GNU tar if the platform supports 64-bit
time_t but the build only uses 32-bit time_t.
* Leave the devmajor and devminor fields empty (rather than
zero) for non-special files, as this is more compatible with
traditional tar.
Fixes:
* Fix interaction of --update with --wildcards.
* When extracting archives into an empty directory, do not create
hard links to files outside that directory.
* Handle partial reads from regular files.
* Warn file changed as we read it less often. Formerly, tar
warned if the file's size or ctime changed. However, this
generated a false positive if tar read a file while another
process hard-linked to it, changing its ctime. Now, tar warns
if the file's size, mtime, user ID, group ID, or mode changes.
Although neither heuristic is perfect, the new one should work
better in practice.
* Fix --ignore-failed-read to ignore file-changed read errors
as far as exit status is concerned. You can now suppress
file-changed issues entirely with --ignore-failed-read
--warning=no-file-changed.
* Fix --remove-files to not remove a file that changed while we
read it.
* Fix --atime-preserve=replace to not fail if there was no need
to replace, either because we did not read the file, or the
atime did not change.
* Fix race when creating a parent directory while another process
is also doing so.
* Fix handling of prefix keywords not followed by "." in pax
headers.
* Fix handling of out-of-range sparse entries in pax headers.
* Fix handling of --transform='s/s/@/2'.
* Fix treatment of options ending in slash in files-from list.
* Fix crash on tar --checkpoint-action exec=\".
* Fix low-memory crash when reading incremental dumps.
* Fix --exclude-vcs-ignores memory allocation misuse.
- Update patch:
* tar-backup-spec-fix-paths.patch: upstream fixed 2/3rd of paths
* tar-fix-extract-unlink.patch
some of this is overwritten by bsc1202436-1 and some was fixed
upstream
* add_readme-tests.patch as Makefile.in no longer exists
- Removed:
* tar-fix-race-condition.patch
* tar-avoid-overflow-in-symlinks-tests.patch
* bsc1200657.patch
* bsc1202436-2.patch
* bsc1202436-1.patch
OBS-URL: https://build.opensuse.org/request/show/1131478
OBS-URL: https://build.opensuse.org/package/show/Base:System/tar?expand=0&rev=128
2023-12-07 16:47:00 +01:00
|
|
|
%autosetup -p1
|
2023-02-18 17:33:21 +01:00
|
|
|
cp %{S:3} tests
|
2006-12-19 00:17:56 +01:00
|
|
|
|
|
|
|
%build
|
2014-12-21 17:04:45 +01:00
|
|
|
%define my_cflags -W -Wall -Wpointer-arith -Wstrict-prototypes -Wformat-security -Wno-unused-parameter -fPIE
|
2017-03-27 16:10:00 +02:00
|
|
|
export CFLAGS="%{optflags} %{my_cflags}"
|
2017-04-20 14:46:48 +02:00
|
|
|
export RSH=%{_bindir}/ssh
|
2012-04-22 14:42:40 +02:00
|
|
|
export DEFAULT_ARCHIVE_FORMAT="POSIX"
|
2017-04-20 14:46:48 +02:00
|
|
|
export DEFAULT_RMT_DIR=%{_bindir}
|
2015-02-11 14:04:27 +01:00
|
|
|
autoreconf -fi
|
2010-11-24 10:34:58 +01:00
|
|
|
%configure \
|
2012-05-30 16:18:12 +02:00
|
|
|
gl_cv_func_linkat_follow="yes" \
|
2010-11-09 15:34:30 +01:00
|
|
|
--enable-backup-scripts \
|
2017-04-20 14:46:48 +02:00
|
|
|
--disable-silent-rules \
|
|
|
|
--program-transform-name='s/^rmt$/gnurmt/'
|
2021-01-10 20:47:31 +01:00
|
|
|
%make_build LDFLAGS="-pie"
|
2014-01-09 16:04:50 +01:00
|
|
|
cd tests
|
2021-01-10 20:47:31 +01:00
|
|
|
%make_build genfile
|
2014-01-09 16:04:50 +01:00
|
|
|
mkdir bin
|
|
|
|
mv genfile bin
|
|
|
|
cd -
|
2010-02-12 08:01:31 +01:00
|
|
|
|
|
|
|
%check
|
2021-10-14 15:01:22 +02:00
|
|
|
%make_build check || { cat tests/testsuite.log; exit 1; }
|
2006-12-19 00:17:56 +01:00
|
|
|
|
|
|
|
%install
|
2017-04-20 14:46:48 +02:00
|
|
|
%make_install DESTDIR=%{buildroot}
|
|
|
|
mkdir %{buildroot}/bin
|
|
|
|
mv %{buildroot}%{_mandir}/man8/gnurmt.8 %{buildroot}%{_mandir}/man1/gnurmt.1
|
2010-11-24 10:34:58 +01:00
|
|
|
install -D -m 644 scripts/backup-specs %{buildroot}%{_sysconfdir}/backup/backup-specs
|
2017-04-20 14:46:48 +02:00
|
|
|
# For avoiding file conflicts with dump/restore
|
|
|
|
mv %{buildroot}%{_sbindir}/restore %{buildroot}%{_sbindir}/restore.sh
|
2011-10-10 20:44:15 +02:00
|
|
|
rm -f %{buildroot}%{_infodir}/dir
|
2017-04-20 14:46:48 +02:00
|
|
|
install -D -m 644 -t %{buildroot}%{_docdir}/%{name} README* ABOUT-NLS AUTHORS NEWS THANKS \
|
2018-04-09 11:41:22 +02:00
|
|
|
ChangeLog TODO
|
2017-03-27 16:10:00 +02:00
|
|
|
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}
|
|
|
|
rm %{buildroot}%{_localstatedir}/lib/tests/tar/package.m4
|
|
|
|
rm %{buildroot}%{_localstatedir}/lib/tests/tar/{atconfig,atlocal,Makefile}*
|
2017-04-20 14:46:48 +02:00
|
|
|
# Alternatives system
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
|
|
ln -sf %{_sysconfdir}/alternatives/rmt %{buildroot}%{_bindir}/rmt
|
|
|
|
ln -sf %{_sysconfdir}/alternatives/rmt.1%{ext_man} %{buildroot}%{_mandir}/man1/rmt.1%{ext_man}
|
2023-01-04 15:19:00 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
2017-03-27 16:10:00 +02:00
|
|
|
mkdir -p %{buildroot}/bin
|
2017-04-20 14:46:48 +02:00
|
|
|
ln -s %{_bindir}/%{name} %{buildroot}/bin
|
2020-11-23 18:32:25 +01:00
|
|
|
%endif
|
2017-04-20 14:46:48 +02:00
|
|
|
%find_lang %{name}
|
|
|
|
|
|
|
|
%post rmt
|
|
|
|
%{_sbindir}/update-alternatives --force \
|
|
|
|
--install %{_bindir}/rmt rmt %{_bindir}/gnurmt 10 \
|
|
|
|
--slave %{_mandir}/man1/rmt.1%{ext_man} rmt.1%{ext_man} %{_mandir}/man1/gnurmt.1%{ext_man}
|
|
|
|
|
|
|
|
%postun rmt
|
|
|
|
if [ ! -f %{_bindir}/gnurmt ] ; then
|
|
|
|
"%{_sbindir}/update-alternatives" --remove rmt %{_bindir}/gnurmt
|
|
|
|
fi
|
2006-12-19 00:17:56 +01:00
|
|
|
|
2010-02-18 16:59:24 +01:00
|
|
|
%files backup-scripts
|
2010-11-24 10:34:58 +01:00
|
|
|
%{_sbindir}/backup
|
2017-04-20 14:46:48 +02:00
|
|
|
%{_sbindir}/restore.sh
|
2010-11-24 10:34:58 +01:00
|
|
|
%{_libexecdir}/backup.sh
|
|
|
|
%{_libexecdir}/dump-remind
|
|
|
|
%dir %{_sysconfdir}/backup
|
|
|
|
%config(noreplace) %{_sysconfdir}/backup/backup-specs
|
2010-02-18 16:59:24 +01:00
|
|
|
|
2011-10-10 20:44:15 +02:00
|
|
|
%files lang -f %{name}.lang
|
|
|
|
|
2014-01-09 16:04:50 +01:00
|
|
|
%files tests
|
2017-03-27 16:10:00 +02:00
|
|
|
%{_localstatedir}/lib/tests
|
2017-04-20 14:46:48 +02:00
|
|
|
%{_docdir}/%{name}/README-tests
|
2014-01-09 16:04:50 +01:00
|
|
|
|
2017-04-20 14:46:48 +02:00
|
|
|
%files rmt
|
|
|
|
%ghost %{_bindir}/rmt
|
|
|
|
%{_bindir}/gnurmt
|
|
|
|
%ghost %{_mandir}/man1/rmt.1%{ext_man}
|
2018-05-11 17:18:25 +02:00
|
|
|
%{_mandir}/man1/gnurmt.1%{?ext_man}
|
2017-04-20 14:46:48 +02:00
|
|
|
%ghost %{_sysconfdir}/alternatives/rmt
|
|
|
|
%ghost %{_sysconfdir}/alternatives/rmt.1%{ext_man}
|
|
|
|
|
|
|
|
%files doc
|
2018-04-09 11:41:22 +02:00
|
|
|
%dir %{_docdir}/%{name}
|
2017-04-20 14:46:48 +02:00
|
|
|
%{_docdir}/%{name}/NEWS
|
|
|
|
%{_docdir}/%{name}/README
|
|
|
|
%{_docdir}/%{name}/ABOUT-NLS
|
|
|
|
%{_docdir}/%{name}/AUTHORS
|
|
|
|
%{_docdir}/%{name}/THANKS
|
|
|
|
%{_docdir}/%{name}/ChangeLog
|
|
|
|
%{_docdir}/%{name}/TODO
|
2021-01-10 20:47:31 +01:00
|
|
|
%{_infodir}/%{name}.info*%{?ext_info}
|
2006-12-19 00:17:56 +01:00
|
|
|
|
2017-04-20 14:46:48 +02:00
|
|
|
%files
|
2018-04-09 11:41:22 +02:00
|
|
|
%license COPYING
|
2023-01-04 15:19:00 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
2017-04-20 14:46:48 +02:00
|
|
|
/bin/%{name}
|
2020-11-23 18:32:25 +01:00
|
|
|
%endif
|
2017-04-20 14:46:48 +02:00
|
|
|
%{_bindir}/%{name}
|
2018-05-11 17:18:25 +02:00
|
|
|
%{_mandir}/man1/%{name}.1%{?ext_man}
|
2006-12-19 00:17:56 +01:00
|
|
|
|
2007-05-17 11:59:45 +02:00
|
|
|
%changelog
|