forked from pool/strip-nondeterminism
osc copypac from project:home:bmwiedemann:reproducible:test package:strip-nondeterminism revision:15
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/strip-nondeterminism?expand=0&rev=9
This commit is contained in:
parent
85f176f479
commit
de85354b51
@ -7,5 +7,5 @@
|
||||
|
||||
%have_strip_nondeterminism 1
|
||||
%strip_all_nondeterminism() \
|
||||
find '(' -name '*.zip' -o -name '*.jar' -o -name '*.xpi' -o -name '*.pk3' -o -name '*.mo' -o -name '*.html' -o -name '*.gz' -o -name '*.png' ')' -print0 | xargs -0 --no-run-if-empt strip-nondeterminism \
|
||||
strip-all-nondeterminism \
|
||||
%{nil}
|
||||
|
4
strip-all-nondeterminism
Normal file
4
strip-all-nondeterminism
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
dir=${1:-.}
|
||||
find "$dir" -type f '(' -name '*.zip' -o -name '*.jar' -o -name '*.xpi' -o -name '*.pk3' -o -name '*.mo' -o -name '*.html' -o -name '*.gz' -o -name '*.png' ')' -print0 |\
|
||||
xargs -0 --no-run-if-empty strip-nondeterminism --timestamp=${SOURCE_DATE_EPOCH:-1494270000} --clamp-timestamp
|
@ -25,8 +25,10 @@ Group: Development/Libraries/Perl
|
||||
Url: https://anonscm.debian.org/git/reproducible/strip-nondeterminism.git
|
||||
Source: http://http.debian.net/debian/pool/main/s/strip-nondeterminism/strip-nondeterminism_%{version}.orig.tar.gz
|
||||
Source2: rpmmacros
|
||||
Source3: strip-all-nondeterminism
|
||||
# PATCH-FIX-OPENSUSE - apk files misdetected as OOXML
|
||||
Patch0: strip-nondeterminism-0.029-fix-apk.patch
|
||||
Patch1: zipfix.patch
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: perl-base
|
||||
@ -50,6 +52,7 @@ and the strip-nondeterminism command line utility.
|
||||
%prep
|
||||
%setup -q -c -n %{name}-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||
@ -59,8 +62,9 @@ and the strip-nondeterminism command line utility.
|
||||
%{__make} test
|
||||
|
||||
%install
|
||||
mkdir -p %buildroot/etc/rpm/
|
||||
mkdir -p %buildroot/etc/rpm/ %buildroot/%{_bindir}/
|
||||
install -p %{SOURCE2} %buildroot/etc/rpm/macros.strip-nondeterminism
|
||||
install -p %{SOURCE3} -m 755 %buildroot/%{_bindir}/
|
||||
%perl_make_install
|
||||
%perl_process_packlist
|
||||
%perl_gen_filelist
|
||||
|
25
zipfix.patch
Normal file
25
zipfix.patch
Normal file
@ -0,0 +1,25 @@
|
||||
commit 0ec2e898c1f2027a158d581a9fcd6d7f3fcf0b97
|
||||
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
||||
Date: Wed May 10 15:21:28 2017 +0200
|
||||
|
||||
zip: make sure we have permissions on extracted file
|
||||
|
||||
an imageconversion.jar had
|
||||
-rw-rw-rw- 2.0 unx 3215 b- defN 99-Sep-06 10:58 com/ibm/imageconversion/IndexColorTable.class
|
||||
?--------- 2.0 unx 7004 b- defN 99-Sep-06 10:58 META-INF/MANIFEST.MF
|
||||
|
||||
and thus generated an error like
|
||||
strip-nondeterminism: ./imageconversion.jar: Unable to open /tmp/3F14xYUtK0/member for reading: Permission denied at /usr/lib/perl5/vendor_perl/5.24.0/File/StripNondeterminism/handlers/jar.pm line 46.
|
||||
|
||||
diff --git a/lib/File/StripNondeterminism/handlers/zip.pm b/lib/File/StripNondeterminism/handlers/zip.pm
|
||||
index 6bbce66..c25ec39 100644
|
||||
--- a/lib/File/StripNondeterminism/handlers/zip.pm
|
||||
+++ b/lib/File/StripNondeterminism/handlers/zip.pm
|
||||
@@ -56,6 +56,7 @@ sub normalize_member {
|
||||
my $filename = "$tempdir/member";
|
||||
my $original_size = $member->compressedSize();
|
||||
$member->extractToFileNamed($filename);
|
||||
+ chmod(0600, $filename);
|
||||
$member->{'compressedSize'} = $original_size
|
||||
; # Work around https://github.com/redhotpenguin/perl-Archive-Zip/issues/11
|
||||
|
Loading…
x
Reference in New Issue
Block a user