SHA256
1
0
forked from pool/tar
tar/tar.spec
Petr Uzel e8b8a4f1c8 Accepting request 114887 from home:elvigia:branches:Base:System
- disable 'runtime checks' in m4/*.m4 that override
  system calls with custom implementations to workaround
  very old kernel/libc bugs (dating 2003-2009)
  we do not ship those buggy components nowdays.

- Switch to default archive type to POSIX.1-2001, which is ten years
  old and has no limits on filesize,filename length etc.

OBS-URL: https://build.opensuse.org/request/show/114887
OBS-URL: https://build.opensuse.org/package/show/Base:System/tar?expand=0&rev=35
2012-04-22 12:42:40 +00:00

137 lines
3.8 KiB
RPMSpec

#
# spec file for package tar
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# minimum suse version where the full featured package builds
%define min_suse_ver 1010
Name: tar
Version: 1.26
Release: 0
Summary: GNU implementation of tar ((t)ape (ar)chiver)
License: GPL-3.0+
Group: System/Base
Url: http://www.gnu.org/software/tar/
Source0: %{name}-%{version}.tar.bz2
#
Patch3: tar-wildcards.patch
Patch6: tar-backup-spec-fix-paths.patch
Patch7: tar-1.26-remove_O_NONBLOCK.patch
%if 0%{?suse_version} >= %min_suse_ver
BuildRequires: automake
BuildRequires: help2man
Recommends: tar-lang = %{version}
Recommends: xz
%endif
Requires(pre): info
Provides: base:/bin/tar
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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.
%package backup-scripts
Summary: Backup scripts
Group: Productivity/Archiving/Backup
Requires: %{name} = %{version}
%description backup-scripts
Shell scripts for system backup/restore
%{?lang_package}
%prep
%setup -q
%patch3 -p1
%patch6 -p1
%patch7 -p1
%build
%define my_cflags -W -Wall -Wpointer-arith -Wstrict-prototypes -Wformat-security -Wno-unused-parameter
export CFLAGS="%{optflags} %my_cflags"
export RSH="/usr/bin/rsh"
export DEFAULT_ARCHIVE_FORMAT="POSIX"
sed -i -e 's@need runtime check@yes@g' m4/*.m4
autoreconf -fiv
%configure \
--enable-backup-scripts \
--disable-silent-rules
make %{?_smp_mflags};
%check
%if !0%{?qemu_user_space_build:1}
# Checks disabled in qemu because of races happening when we emulate
# multi-threaded programs
make check
%endif
%install
%{?make_install} %{!?make_install:make install DESTDIR=%{buildroot}}
%if 0%{?suse_version} >= %min_suse_ver
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
%endif
install -d -m 755 %{buildroot}%{_sysconfdir}/backup
install -D -m 644 scripts/backup-specs %{buildroot}%{_sysconfdir}/backup/backup-specs
rm -rf %{buildroot}%{_libexecdir}/rmt
rm -f %{buildroot}%{_infodir}/dir
%find_lang %{name}
%files backup-scripts
%defattr(-,root, root)
%{_sbindir}/backup
%{_sbindir}/restore
%{_libexecdir}/backup.sh
%{_libexecdir}/dump-remind
%dir %{_sysconfdir}/backup
%config(noreplace) %{_sysconfdir}/backup/backup-specs
%if 0%{?lang_package:1}
%files lang -f %{name}.lang
%files
%else
%files -f %{name}.lang
%endif
%defattr(-, root, root)
%{_bindir}/tar
%doc README* ABOUT-NLS AUTHORS COPYING NEWS THANKS ChangeLog TODO
%{_infodir}/tar.info*
%if 0%{?suse_version} >= %min_suse_ver
%{_mandir}/man1/tar.1.gz
%endif
%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%clean
rm -rf %{buildroot}
%changelog