From dc2887f1e1b1c8e4705595ba528c932643db1412 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Tue, 31 Jul 2018 14:16:40 +0200 Subject: [PATCH] Repack tarball to remove possibly proprietary binaries --- .gitignore | 1 + generate-tarball.sh | 24 ++++++++++++++++++++++++ qdox.spec | 11 +++++++++-- sources | 2 +- 4 files changed, 35 insertions(+), 3 deletions(-) create mode 100755 generate-tarball.sh diff --git a/.gitignore b/.gitignore index 98f63de..02ce7c3 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ qdox-1.12-project.tar.bz2 /qdox-2.0-M5-project.tar.gz /qdox-2.0-M7-project.tar.gz /qdox-2.0-M9-project.tar.gz +/qdox-2.0-M9.tar.gz diff --git a/generate-tarball.sh b/generate-tarball.sh new file mode 100755 index 0000000..7e63681 --- /dev/null +++ b/generate-tarball.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -e + +name=qdox +version="$(sed -n 's/Version:\s*//p' *.spec)" +vertag="$(sed -n 's/%global\s*vertag\s*//p' *.spec)" + +# RETRIEVE +wget "http://repo2.maven.org/maven2/com/thoughtworks/qdox/qdox/${version}-${vertag}/${name}-${version}-${vertag}-project.tar.gz" -O "${name}-${version}-${vertag}.orig.tar.gz" + +rm -rf tarball-tmp +mkdir tarball-tmp +cd tarball-tmp +tar xf "../${name}-${version}-${vertag}.orig.tar.gz" + +# CLEAN TARBALL +find -name '*.jar' -delete +find -name '*.class' -delete +# contains possibly proprietary binaries of YACC +rm -r */bootstrap + +tar cf "../${name}-${version}-${vertag}.tar.gz" * +cd .. +rm -r tarball-tmp "${name}-${version}-${vertag}.orig.tar.gz" diff --git a/qdox.spec b/qdox.spec index 84f27dc..ef7ca09 100644 --- a/qdox.spec +++ b/qdox.spec @@ -3,14 +3,18 @@ Summary: Extract class/interface/method definitions from sources Name: qdox Version: 2.0 -Release: 2.%{vertag}%{?dist} +Release: 3.%{vertag}%{?dist} Epoch: 0 License: ASL 2.0 URL: https://github.com/paul-hammant/qdox BuildArch: noarch -Source0: http://repo2.maven.org/maven2/com/thoughtworks/qdox/qdox/%{version}-%{vertag}/%{name}-%{version}-%{vertag}-project.tar.gz +# ./generate-tarball.sh +Source0: %{name}-%{version}-%{vertag}.tar.gz Source1: qdox-MANIFEST.MF +# Remove bundled binaries which are possibly proprietary +Source2: generate-tarball.sh + BuildRequires: maven-local BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin) @@ -72,6 +76,9 @@ jar ufm target/%{name}-%{version}*.jar %{SOURCE1} %doc LICENSE.txt %changelog +* Tue Jul 31 2018 Michael Simacek - 0:2.0-3.M9 +- Repack tarball to remove possibly proprietary binaries + * Sat Jul 14 2018 Fedora Release Engineering - 0:2.0-2.M9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 16b2d7d..3d2be3a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qdox-2.0-M9-project.tar.gz) = 1f124156d72338242c348296c44730180c91e214601018c0c0872cf954c0dc23001d9041edef758551e40895753f811fc67fc2d031cf148d6a1e7eee83a06787 +SHA512 (qdox-2.0-M9.tar.gz) = 739f80beb5c9096774923a29731a93754be9b6d434c2fcdaced70dd2f43f102041c53f6b405b88fa2482f3a8f4e8ede701ffc6b14dcbc77c5030c1e0060149f9