Tomohiro "Tomo-p" KATO 2 rokov pred
rodič
commit
3a8ebb0141
1 zmenil súbory, kde vykonal 42 pridanie a 30 odobranie
  1. 42 30
      c/cpio/cpio-vl.spec

+ 42 - 30
c/cpio/cpio-vl.spec

@@ -7,8 +7,10 @@ Summary: A GNU archiving program.
 Summary(ja): GNU アーカイブプログラム
 Name: cpio
 Version: 2.13
-Release: 1%{?_dist_release}
-Group: Applications/Archiving
+Release: 2%{?_dist_release}
+Group: system,accessories
+Vendor: Project Vine
+Distribution: Vine Linux
 
 License: GPLv3
 URL: https://www.gnu.org/software/cpio/cpio.html
@@ -50,18 +52,19 @@ Patch9: cpio-2.13-mutiple-definition.patch
 # reverts upstream commit 45b0ee2b4
 Patch10: cpio-2.13-revert-CVE-2015-1197-fix.patch
 
-#security
+# Extract: retain times for symlinks
+# downstream patch (#1486364)
+# https://www.mail-archive.com/bug-cpio@gnu.org/msg00605.html
+Patch11: cpio-2.11-retain-symlink-times.patch
 
-%ifnos linux
-Requires(post): /sbin/rmt
-%endif
+# Properly drop priviledges for remote command
+# http://git.savannah.gnu.org/cgit/paxutils.git/commit/?id=d247e3c2809a37b6d0c3067251d96bb7f12555e7
+Patch12: cpio-2.13-reset-gid-uid.patch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: texinfo autoconf gettext
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
-BuildRequires: texinfo autoconf gettext
-Buildroot: %{_tmppath}/%{name}-%{version}-root
-
-Vendor: Project Vine
-Distribution: Vine Linux
 
 %description
 GNU cpio copies files into or out of a cpio or tar archive.  Archives
@@ -77,7 +80,6 @@ and can read archives created on machines with a different byte-order.
 
 Install cpio if you need a program to manage file archives.
 
-
 %description -l ja
 GNU cpio は cpio アーカイブ或いは tar アーカイブにファイルをコピーしたり
 取り出したりするプログラムです.アーカイブというのは,(1つ以上の)ファイルと
@@ -95,37 +97,47 @@ GNU cpio がサポートしているアーカイブ形式は以下の通りで
 ファイルアーカイブを扱うプログラムが必要なら,cpio をインストールして下さい.
 
 
+%debug_package
+
+
 %prep
 %autosetup -p1
-
 autoreconf -vif
 
+
 %build
 
-CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -pedantic -Wall" %configure
-make %{?_smp_mflags}
+export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -pedantic -fno-strict-aliasing -Wall $CFLAGS"
+%configure
+%make_build
+(cd po && make update-gmo)
+
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install
-
-{ cd $RPM_BUILD_ROOT
-
-%ifos linux
-# XXX these from mt-st
-  rm -f .%{_bindir}/mt .%{_mandir}/man1/mt.1
-%endif
-}
+%make_install
 
 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 rm -f $RPM_BUILD_ROOT/sbin/rmt
 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/*.1*
 install -c -p -m 0644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_mandir}/man1
 
+%find_lang %{name}
+
+
+%check
+rm -f ${RPM_BUILD_ROOT}/test/testsuite
+make check || {
+    echo "### TESTSUITE.LOG ###"
+    cat tests/testsuite.log
+    exit 1
+}
+
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+
 %post
 /sbin/install-info %{_infodir}/cpio.info.gz %{_infodir}/dir
 
@@ -135,19 +147,19 @@ if [ $1 = 0 ]; then
 fi
 
 
-%files
+%files -f %{name}.lang
 %defattr(-,root,root)
 %license COPYING
 %doc AUTHORS NEWS README THANKS TODO
-%ifnos linux
-%{_libexecdir}/*
-%endif
 %{_bindir}/*
 %{_mandir}/man*/*
 %{_infodir}/*.info*
-%{_datadir}/locale/*
+
 
 %changelog
+* Tue Aug 17 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.13-2
+- imported Patch11 and 12 from rawhide.
+
 * Tue Feb 18 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.13-1
 - updated to 2.13.
 - dropped all patches.