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
|
|
|
#
|
2014-01-09 16:04:50 +01:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
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.
|
|
|
|
|
2006-12-19 00:17:56 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-04-22 14:42:40 +02:00
|
|
|
|
2011-10-10 20:44:15 +02:00
|
|
|
# minimum suse version where the full featured package builds
|
|
|
|
%define min_suse_ver 1010
|
2008-03-28 18:54:23 +01:00
|
|
|
|
2006-12-19 00:17:56 +01:00
|
|
|
Name: tar
|
2013-11-20 09:49:43 +01:00
|
|
|
Version: 1.27.1
|
2011-12-27 13:28:15 +01:00
|
|
|
Release: 0
|
2007-05-17 11:59:45 +02:00
|
|
|
Summary: GNU implementation of tar ((t)ape (ar)chiver)
|
2011-12-27 13:28:15 +01:00
|
|
|
License: GPL-3.0+
|
2010-11-24 10:34:58 +01:00
|
|
|
Group: System/Base
|
2011-12-27 13:28:15 +01:00
|
|
|
Url: http://www.gnu.org/software/tar/
|
2013-04-05 13:18:38 +02:00
|
|
|
Source0: http://ftp.gnu.org/gnu/tar/%{name}-%{version}.tar.bz2
|
2013-10-25 16:06:49 +02:00
|
|
|
Source1: http://ftp.gnu.org/gnu/tar/%{name}-%{version}.tar.bz2.sig
|
|
|
|
# http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x3602B07F55D0C732
|
|
|
|
Source2: tar.keyring
|
2008-06-25 23:57:52 +02:00
|
|
|
#
|
2008-11-21 15:53:43 +01:00
|
|
|
Patch3: tar-wildcards.patch
|
2010-11-24 10:34:58 +01:00
|
|
|
Patch6: tar-backup-spec-fix-paths.patch
|
2011-12-27 13:28:15 +01:00
|
|
|
Patch7: tar-1.26-remove_O_NONBLOCK.patch
|
2014-03-28 11:52:45 +01:00
|
|
|
Patch8: tar-fix_eternal_loop_in_handle_option.patch
|
2013-08-26 17:13:32 +02:00
|
|
|
Patch10: 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
|
|
|
|
Patch11: tar-ignore_lone_zero_blocks.patch
|
2014-01-09 16:04:50 +01:00
|
|
|
Patch20: add_readme-tests.patch
|
2011-10-10 20:44:15 +02:00
|
|
|
%if 0%{?suse_version} >= %min_suse_ver
|
2010-11-24 10:34:58 +01:00
|
|
|
BuildRequires: help2man
|
2011-10-04 13:53:30 +02:00
|
|
|
Recommends: tar-lang = %{version}
|
2010-11-24 10:34:58 +01:00
|
|
|
Recommends: xz
|
2011-10-10 20:44:15 +02:00
|
|
|
%endif
|
|
|
|
Requires(pre): info
|
2010-11-24 10:34:58 +01:00
|
|
|
Provides: base:/bin/tar
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2006-12-19 00:17:56 +01:00
|
|
|
%define _bindir /bin
|
|
|
|
|
|
|
|
%description
|
|
|
|
This package normally also includes the program "rmt", which provides
|
|
|
|
remote tape drive control. Since there are compatible versions of 'rmt'
|
|
|
|
in either the 'star' package or the 'dump' package, we didn't put 'rmt'
|
|
|
|
into this package. If you are planning to use the remote tape features
|
|
|
|
provided by tar you have to also install the 'dump' or the 'star'
|
|
|
|
package.
|
|
|
|
|
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}
|
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
|
|
|
|
Group: Development/Tests
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description tests
|
|
|
|
Upstream testsuite for the package
|
|
|
|
|
2011-10-10 20:44:15 +02:00
|
|
|
%{?lang_package}
|
2011-10-04 13:53:30 +02:00
|
|
|
|
2006-12-19 00:17:56 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2008-11-21 15:53:43 +01:00
|
|
|
%patch3 -p1
|
2010-11-24 10:34:58 +01:00
|
|
|
%patch6 -p1
|
2011-12-27 13:28:15 +01:00
|
|
|
%patch7 -p1
|
2014-03-28 11:52:45 +01:00
|
|
|
%patch8 -p1
|
2013-08-26 17:13:32 +02:00
|
|
|
%patch10 -p1
|
2014-07-29 21:30:27 +02:00
|
|
|
%patch11 -p1
|
2014-01-09 16:04:50 +01:00
|
|
|
%patch20 -p1
|
2006-12-19 00:17:56 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%define my_cflags -W -Wall -Wpointer-arith -Wstrict-prototypes -Wformat-security -Wno-unused-parameter
|
2010-11-24 10:34:58 +01:00
|
|
|
export CFLAGS="%{optflags} %my_cflags"
|
2006-12-19 00:17:56 +01:00
|
|
|
export RSH="/usr/bin/rsh"
|
2012-04-22 14:42:40 +02:00
|
|
|
export DEFAULT_ARCHIVE_FORMAT="POSIX"
|
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 \
|
|
|
|
--disable-silent-rules
|
2010-07-23 21:55:38 +02:00
|
|
|
make %{?_smp_mflags};
|
2014-01-09 16:04:50 +01:00
|
|
|
cd tests
|
|
|
|
make genfile
|
|
|
|
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
|
2011-10-04 13:53:30 +02:00
|
|
|
make check
|
2011-10-30 23:16:33 +01:00
|
|
|
%endif
|
2006-12-19 00:17:56 +01:00
|
|
|
|
|
|
|
%install
|
2011-10-04 13:53:30 +02:00
|
|
|
%{?make_install} %{!?make_install:make install DESTDIR=%{buildroot}}
|
2011-10-10 20:44:15 +02:00
|
|
|
%if 0%{?suse_version} >= %min_suse_ver
|
2011-10-04 13:53:30 +02:00
|
|
|
install -d -m 755 %{buildroot}/%{_mandir}/man1
|
|
|
|
help2man ./src/tar --name "The GNU version of the tar archiving utility" -p tar \
|
|
|
|
| gzip -c > %{buildroot}/%{_mandir}/man1/tar.1.gz
|
2011-10-10 20:44:15 +02:00
|
|
|
%endif
|
2010-11-24 10:34:58 +01:00
|
|
|
install -d -m 755 %{buildroot}%{_sysconfdir}/backup
|
|
|
|
install -D -m 644 scripts/backup-specs %{buildroot}%{_sysconfdir}/backup/backup-specs
|
|
|
|
rm -rf %{buildroot}%{_libexecdir}/rmt
|
2011-10-10 20:44:15 +02:00
|
|
|
rm -f %{buildroot}%{_infodir}/dir
|
2014-01-09 16:04:50 +01:00
|
|
|
install -d -m 755 %{buildroot}/var/lib/tests
|
|
|
|
cp -r tests %{buildroot}/var/lib/tests/tar
|
|
|
|
rm %{buildroot}/var/lib/tests/tar/*.{c,h,o}
|
|
|
|
rm %{buildroot}/var/lib/tests/tar/package.m4
|
|
|
|
rm %{buildroot}/var/lib/tests/tar/{atconfig,atlocal,Makefile}*
|
2010-11-24 10:34:58 +01:00
|
|
|
%find_lang %{name}
|
2006-12-19 00:17:56 +01:00
|
|
|
|
2010-02-18 16:59:24 +01:00
|
|
|
%files backup-scripts
|
|
|
|
%defattr(-,root, root)
|
2010-11-24 10:34:58 +01:00
|
|
|
%{_sbindir}/backup
|
|
|
|
%{_sbindir}/restore
|
|
|
|
%{_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
|
|
|
%if 0%{?lang_package:1}
|
|
|
|
|
|
|
|
%files lang -f %{name}.lang
|
|
|
|
|
2014-01-09 16:04:50 +01:00
|
|
|
%files tests
|
|
|
|
%defattr(-,root, root)
|
|
|
|
/var/lib/tests
|
|
|
|
|
2009-02-11 12:58:15 +01:00
|
|
|
%files
|
2011-10-10 20:44:15 +02:00
|
|
|
%else
|
|
|
|
|
|
|
|
%files -f %{name}.lang
|
|
|
|
%endif
|
2006-12-19 00:17:56 +01:00
|
|
|
%defattr(-, root, root)
|
2010-11-24 10:34:58 +01:00
|
|
|
%{_bindir}/tar
|
2010-03-26 02:16:17 +01:00
|
|
|
%doc README* ABOUT-NLS AUTHORS COPYING NEWS THANKS ChangeLog TODO
|
2011-10-10 20:44:15 +02:00
|
|
|
%{_infodir}/tar.info*
|
|
|
|
%if 0%{?suse_version} >= %min_suse_ver
|
2010-11-24 10:34:58 +01:00
|
|
|
%{_mandir}/man1/tar.1.gz
|
2011-10-10 20:44:15 +02:00
|
|
|
%endif
|
2006-12-19 00:17:56 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
|
|
|
|
%clean
|
2010-11-24 10:34:58 +01:00
|
|
|
rm -rf %{buildroot}
|
2008-03-28 18:54:23 +01:00
|
|
|
|
2007-05-17 11:59:45 +02:00
|
|
|
%changelog
|