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
|
|
|
#
|
2021-01-10 20:47:31 +01:00
|
|
|
# Copyright (c) 2021 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
|
2021-02-15 22:59:12 +01:00
|
|
|
Version: 1.34
|
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
|
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
|
2015-04-13 21:14:23 +02:00
|
|
|
# The next patch is disabled because it causes a regression:
|
|
|
|
#https://bugzilla.opensuse.org/show_bug.cgi?id=918487
|
2018-05-11 17:18:25 +02:00
|
|
|
Patch4: %{name}-recursive--files-from.patch
|
|
|
|
Patch5: add_readme-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
|
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
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
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
|
|
|
|
%setup -q
|
2018-05-11 17:18:25 +02:00
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
2008-11-21 15:53:43 +01:00
|
|
|
%patch3 -p1
|
2018-05-11 17:18:25 +02:00
|
|
|
#%patch4 -p1
|
|
|
|
%patch5 -p1
|
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
|
2011-10-30 23:16:33 +01:00
|
|
|
%if !0%{?qemu_user_space_build:1}
|
|
|
|
# Checks disabled in qemu because of races happening when we emulate
|
|
|
|
# multi-threaded programs
|
2021-01-10 20:47:31 +01:00
|
|
|
%make_build check
|
2011-10-30 23:16:33 +01:00
|
|
|
%endif
|
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}
|
2020-11-23 18:32:25 +01:00
|
|
|
%if !0%{?usrmerged}
|
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
|
2020-11-23 18:32:25 +01:00
|
|
|
%if !0%{?usrmerged}
|
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
|