Repack the tarball without binaries

This commit is contained in:
Michael Simacek 2018-07-31 14:27:32 +02:00
parent 2901fd6242
commit 1e206c0fc6
4 changed files with 33 additions and 5 deletions

1
.gitignore vendored
View File

@ -24,3 +24,4 @@ surefire-2.10-source-release.zip
/surefire-2.20.1-source-release.zip
/surefire-2.21.0-source-release.zip
/surefire-2.22.0-source-release.zip
/maven-surefire-2.22.0.tar.gz

21
generate-tarball.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
set -e
name=maven-surefire
version="$(sed -n 's/Version:\s*//p' *.spec)"
# RETRIEVE
wget "http://repo2.maven.org/maven2/org/apache/maven/surefire/surefire/${version}/surefire-${version}-source-release.zip" -O "${name}-${version}.orig.zip"
rm -rf tarball-tmp
mkdir tarball-tmp
cd tarball-tmp
unzip "../${name}-${version}.orig.zip"
# CLEAN TARBALL
find -name '*.jar' -delete
find -name '*.class' -delete
tar cf "../${name}-${version}.tar.gz" *
cd ..
rm -r tarball-tmp "${name}-${version}.orig.zip"

View File

@ -2,14 +2,17 @@
Name: maven-surefire
Version: 2.22.0
Release: 2%{?dist}
Release: 3%{?dist}
Epoch: 0
Summary: Test framework project
License: ASL 2.0 and CPL
URL: http://maven.apache.org/surefire/
BuildArch: noarch
Source0: http://repo2.maven.org/maven2/org/apache/maven/surefire/surefire/%{version}/surefire-%{version}-source-release.zip
# ./generate-tarball.sh
Source0: %{name}-%{version}.tar.gz
# Remove bundled binaries which cannot be easily verified for licensing
Source1: generate-tarball.sh
Source2: http://junit.sourceforge.net/cpl-v10.html
Patch0: 0001-Maven-3.patch
@ -182,7 +185,7 @@ sed -i /-Xdoclint:all/d pom.xml
%files -f .mfiles
%doc README.md
%doc LICENSE NOTICE cpl-v10.html
%license LICENSE NOTICE cpl-v10.html
%files plugin -f .mfiles-surefire-plugin
%files report-plugin -f .mfiles-report-plugin
@ -195,9 +198,12 @@ sed -i /-Xdoclint:all/d pom.xml
%endif
%files javadoc -f .mfiles-javadoc
%doc LICENSE NOTICE cpl-v10.html
%license LICENSE NOTICE cpl-v10.html
%changelog
* Tue Jul 31 2018 Michael Simacek <msimacek@redhat.com> - 0:2.22.0-3
- Repack the tarball without binaries
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.22.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

View File

@ -1,2 +1,2 @@
SHA512 (surefire-2.22.0-source-release.zip) = 0ad179725ba38fda0fcd9d68cc1efb49f4570ef8c4f547e88cd8552816cc5db12f1e2fe5b4d09016c8b2e94b6274027194e0852fcf90bd1fbd6f93cd908e620f
SHA512 (maven-surefire-2.22.0.tar.gz) = 339d76ef07280e72dea3217c545de1b36b02fdfa31258f3e9cb7ac9169c6826dbde5a2d39088482b3069054e957a27860547b09a6933c04ca7039fc9a0175d35
SHA512 (cpl-v10.html) = f7aa86fafb6a7831b1a5302099fbfe95361bcb5c49a2bc7aac0f5d53cea6c92fc3adbba897a54ab5b0cf32771cdc933fc5bb233461fbd48254a250d0d59109c9