diff --git a/tar-backup-spec-fix-paths.patch b/tar-backup-spec-fix-paths.patch index 66a6629..59fbfb5 100644 --- a/tar-backup-spec-fix-paths.patch +++ b/tar-backup-spec-fix-paths.patch @@ -1,8 +1,14 @@ -Index: tar-1.25/scripts/backup-specs +Index: tar-1.29/scripts/backup-specs =================================================================== ---- tar-1.25.orig/scripts/backup-specs -+++ tar-1.25/scripts/backup-specs -@@ -11,12 +11,12 @@ TAR=/bin/tar +--- tar-1.29.orig/scripts/backup-specs ++++ tar-1.29/scripts/backup-specs +@@ -6,17 +6,17 @@ + ADMINISTRATOR="root@localhost" + + # (Optional) Path to tar binary. +-TAR=/bin/tar ++TAR=/usr/bin/tar + # (Optional) Path to rsh binary or its equivalent. You may wish to # set it to ssh as shown in the example below, to improve security. # In this case you will have to use public key authentication. diff --git a/tar.changes b/tar.changes index 868ca50..3aef8eb 100644 --- a/tar.changes +++ b/tar.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Mar 23 13:52:13 UTC 2017 - kstreitova@suse.com + +- move binaries from /bin to /usr/bin [bsc#1029977] + * refresh tar-backup-spec-fix-paths.patch to change path of the + tar binary from TAR=/bin/tar to TAR=/usr/bin/tar +- use spec-cleaner + ------------------------------------------------------------------- Thu Dec 15 17:05:04 UTC 2016 - vcizek@suse.com diff --git a/tar.spec b/tar.spec index 283b0cb..8fb8c5c 100644 --- a/tar.spec +++ b/tar.spec @@ -1,7 +1,7 @@ # # spec file for package tar # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,6 @@ # minimum suse version where the full featured package builds %define min_suse_ver 1010 - Name: tar Version: 1.29 Release: 0 @@ -49,7 +48,10 @@ Patch20: add_readme-tests.patch 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 -%if 0%{?suse_version} >= %min_suse_ver +Requires(pre): info +Provides: base:/bin/tar +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} >= %{min_suse_ver} BuildRequires: automake BuildRequires: help2man BuildRequires: libacl-devel @@ -58,10 +60,6 @@ BuildRequires: libselinux-devel 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 @@ -81,7 +79,7 @@ Shell scripts for system backup/restore %package tests Summary: Tests for the package -Group: Development/Tests +Group: Development/Tools/Other Requires: %{name} = %{version} %description tests @@ -103,8 +101,8 @@ 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="/usr/bin/rsh" +export CFLAGS="%{optflags} %{my_cflags}" +export RSH="%{_bindir}/rsh" export DEFAULT_ARCHIVE_FORMAT="POSIX" autoreconf -fi %configure \ @@ -113,7 +111,7 @@ autoreconf -fi --disable-silent-rules make %{?_smp_mflags} LDFLAGS="-pie" cd tests -make genfile +make %{?_smp_mflags} genfile mkdir bin mv genfile bin cd - @@ -122,12 +120,12 @@ cd - %if !0%{?qemu_user_space_build:1} # Checks disabled in qemu because of races happening when we emulate # multi-threaded programs -make check +make %{?_smp_mflags} check %endif %install %{?make_install} %{!?make_install:make install DESTDIR=%{buildroot}} -%if 0%{?suse_version} >= %min_suse_ver +%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 @@ -138,12 +136,14 @@ rm -rf %{buildroot}%{_libexecdir}/rmt rm -rvf %{buildroot}/%{_mandir}/man8/rmt.8.gz rm -rvf %{buildroot}/%{_mandir}/man8 rm -f %{buildroot}%{_infodir}/dir -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}* +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} +mkdir -p %{buildroot}/bin +ln -s %{_bindir}/tar %{buildroot}/bin/tar %files backup-scripts %defattr(-,root, root) @@ -155,23 +155,24 @@ rm %{buildroot}/var/lib/tests/tar/{atconfig,atlocal,Makefile}* %config(noreplace) %{_sysconfdir}/backup/backup-specs %if 0%{?lang_package:1} - %files lang -f %{name}.lang +%defattr(-,root,root) %files tests %defattr(-,root, root) -/var/lib/tests +%{_localstatedir}/lib/tests %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 + +%if 0%{?suse_version} >= %{min_suse_ver} %{_mandir}/man1/tar.1.gz %endif @@ -181,7 +182,4 @@ rm %{buildroot}/var/lib/tests/tar/{atconfig,atlocal,Makefile}* %postun %install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz -%clean -rm -rf %{buildroot} - %changelog