Accepting request 484838 from home:svalx
- Use update-alternatives according to current documentation - Disable tar-1.26-remove_O_NONBLOCK.patch - this issue has been fixed in tar-1.27 - backup-scripts subpackage change to noarch - Change rpm group of tar-tests to Development/Tools/Other - Enable rmt building, change package description - Switch rmt to alternatives system - Separate rmt subpackage - it can be used by different archiving tools as a dedicated program - Change rmt path to /usr/bin folder - it can be used by non privileged users for backup purposes. Security is controlled by access rights to the targets and remote shell. - Separate doc subpackage - Remove conditions for old SUSE builds and lang subpackage - Rename restore script to restore.sh for avoiding file conflicts with dump/restore OBS-URL: https://build.opensuse.org/request/show/484838 OBS-URL: https://build.opensuse.org/package/show/Base:System/tar?expand=0&rev=79
This commit is contained in:
parent
1442c057a3
commit
bb30562f7a
24
tar.changes
24
tar.changes
@ -1,3 +1,27 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 3 11:08:23 UTC 2017 - svalx@svalx.net
|
||||
|
||||
- Use update-alternatives according to current documentation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 27 21:04:03 UTC 2017 - svalx@svalx.net
|
||||
|
||||
- Disable tar-1.26-remove_O_NONBLOCK.patch - this issue has been
|
||||
fixed in tar-1.27
|
||||
- backup-scripts subpackage change to noarch
|
||||
- Change rpm group of tar-tests to Development/Tools/Other
|
||||
- Enable rmt building, change package description
|
||||
- Switch rmt to alternatives system
|
||||
- Separate rmt subpackage - it can be used by different archiving
|
||||
tools as a dedicated program
|
||||
- Change rmt path to /usr/bin folder - it can be used by non privileged
|
||||
users for backup purposes. Security is controlled by access rights to
|
||||
the targets and remote shell.
|
||||
- Separate doc subpackage
|
||||
- Remove conditions for old SUSE builds and lang subpackage
|
||||
- Rename restore script to restore.sh for avoiding file conflicts
|
||||
with dump/restore
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 23 13:52:13 UTC 2017 - kstreitova@suse.com
|
||||
|
||||
|
177
tar.spec
177
tar.spec
@ -16,63 +16,64 @@
|
||||
#
|
||||
|
||||
|
||||
# minimum suse version where the full featured package builds
|
||||
%define min_suse_ver 1010
|
||||
# For correct subpackages docs installation into tar doc directory
|
||||
%global _docdir_fmt %{name}
|
||||
Name: tar
|
||||
Version: 1.29
|
||||
Release: 0
|
||||
Summary: GNU implementation of tar ((t)ape (ar)chiver)
|
||||
Summary: GNU implementation of ((t)ape (ar)chiver)
|
||||
License: GPL-3.0+
|
||||
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
|
||||
# http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x3602B07F55D0C732
|
||||
Source2: tar.keyring
|
||||
#
|
||||
Patch3: tar-wildcards.patch
|
||||
Patch6: tar-backup-spec-fix-paths.patch
|
||||
Patch7: tar-1.26-remove_O_NONBLOCK.patch
|
||||
Source2: %{name}.keyring
|
||||
Patch3: %{name}-wildcards.patch
|
||||
Patch6: %{name}-backup-spec-fix-paths.patch
|
||||
# This issue has been fixed in tar-1.27
|
||||
# http://git.savannah.gnu.org/cgit/tar.git/commit/?id=03858cf583ce299b836d8a848967ce290a6bf303
|
||||
Patch7: %{name}-1.26-remove_O_NONBLOCK.patch
|
||||
Patch10: 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: tar-ignore_lone_zero_blocks.patch
|
||||
Patch11: %{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: tar-recursive--files-from.patch
|
||||
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: tar-1.29-extract_pathname_bypass.patch
|
||||
Requires(pre): info
|
||||
Provides: base:/bin/tar
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} >= %{min_suse_ver}
|
||||
Patch22: %{name}-1.29-extract_pathname_bypass.patch
|
||||
BuildRequires: automake
|
||||
BuildRequires: help2man
|
||||
BuildRequires: libacl-devel
|
||||
BuildRequires: libattr-devel
|
||||
BuildRequires: libselinux-devel
|
||||
Recommends: tar-lang = %{version}
|
||||
Requires(pre): info
|
||||
Recommends: %{name}-lang = %{version}
|
||||
Recommends: %{name}-rmt = %{version}
|
||||
Recommends: mt
|
||||
Recommends: xz
|
||||
%endif
|
||||
Provides: base:/bin/tar
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%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.
|
||||
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.
|
||||
|
||||
%package backup-scripts
|
||||
Summary: Backup scripts
|
||||
Group: Productivity/Archiving/Backup
|
||||
Requires: %{name} = %{version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description backup-scripts
|
||||
Shell scripts for system backup/restore
|
||||
@ -85,13 +86,40 @@ Requires: %{name} = %{version}
|
||||
%description tests
|
||||
Upstream testsuite for the package
|
||||
|
||||
%{?lang_package}
|
||||
%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}
|
||||
Requires(post): %{install_info_prereq}
|
||||
Requires(preun): %{install_info_prereq}
|
||||
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
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch3 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
#%patch7 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
#%patch12 -p1
|
||||
@ -102,13 +130,15 @@ Upstream testsuite for the package
|
||||
%build
|
||||
%define my_cflags -W -Wall -Wpointer-arith -Wstrict-prototypes -Wformat-security -Wno-unused-parameter -fPIE
|
||||
export CFLAGS="%{optflags} %{my_cflags}"
|
||||
export RSH="%{_bindir}/rsh"
|
||||
export RSH=%{_bindir}/ssh
|
||||
export DEFAULT_ARCHIVE_FORMAT="POSIX"
|
||||
export DEFAULT_RMT_DIR=%{_bindir}
|
||||
autoreconf -fi
|
||||
%configure \
|
||||
gl_cv_func_linkat_follow="yes" \
|
||||
--enable-backup-scripts \
|
||||
--disable-silent-rules
|
||||
--disable-silent-rules \
|
||||
--program-transform-name='s/^rmt$/gnurmt/'
|
||||
make %{?_smp_mflags} LDFLAGS="-pie"
|
||||
cd tests
|
||||
make %{?_smp_mflags} genfile
|
||||
@ -124,62 +154,91 @@ make %{?_smp_mflags} 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
|
||||
%make_install DESTDIR=%{buildroot}
|
||||
mkdir %{buildroot}/bin
|
||||
mv %{buildroot}%{_mandir}/man8/gnurmt.8 %{buildroot}%{_mandir}/man1/gnurmt.1
|
||||
install -D -m 644 scripts/backup-specs %{buildroot}%{_sysconfdir}/backup/backup-specs
|
||||
rm -rf %{buildroot}%{_libexecdir}/rmt
|
||||
rm -rvf %{buildroot}/%{_mandir}/man8/rmt.8.gz
|
||||
rm -rvf %{buildroot}/%{_mandir}/man8
|
||||
# For avoiding file conflicts with dump/restore
|
||||
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
|
||||
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}*
|
||||
%find_lang %{name}
|
||||
# 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}
|
||||
#UsrMerge
|
||||
mkdir -p %{buildroot}/bin
|
||||
ln -s %{_bindir}/tar %{buildroot}/bin/tar
|
||||
ln -s %{_bindir}/%{name} %{buildroot}/bin
|
||||
#EndUsrMerge
|
||||
%find_lang %{name}
|
||||
|
||||
%post doc
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}
|
||||
|
||||
%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}
|
||||
|
||||
%preun doc
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}
|
||||
|
||||
%postun rmt
|
||||
if [ ! -f %{_bindir}/gnurmt ] ; then
|
||||
"%{_sbindir}/update-alternatives" --remove rmt %{_bindir}/gnurmt
|
||||
fi
|
||||
|
||||
%files backup-scripts
|
||||
%defattr(-,root, root)
|
||||
%{_sbindir}/backup
|
||||
%{_sbindir}/restore
|
||||
%{_sbindir}/restore.sh
|
||||
%{_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
|
||||
%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}
|
||||
%ghost %{_sysconfdir}/alternatives/rmt
|
||||
%ghost %{_sysconfdir}/alternatives/rmt.1%{ext_man}
|
||||
|
||||
%files doc
|
||||
%defattr(-, root, root)
|
||||
%{_docdir}/%{name}/NEWS
|
||||
%{_docdir}/%{name}/README
|
||||
%{_docdir}/%{name}/ABOUT-NLS
|
||||
%{_docdir}/%{name}/AUTHORS
|
||||
%{_docdir}/%{name}/THANKS
|
||||
%{_docdir}/%{name}/ChangeLog
|
||||
%{_docdir}/%{name}/TODO
|
||||
%{_infodir}/%{name}.info*
|
||||
|
||||
%files
|
||||
%else
|
||||
%files -f %{name}.lang
|
||||
%endif
|
||||
%defattr(-, root, root)
|
||||
/bin/tar
|
||||
%{_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
|
||||
#UsrMerge
|
||||
/bin/%{name}
|
||||
#EndUsrMerge
|
||||
%{_bindir}/%{name}
|
||||
%{_mandir}/man1/%{name}.1%{ext_man}
|
||||
%dir %{_docdir}/%{name}
|
||||
%{_docdir}/%{name}/COPYING
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user