Repack the tarball without binaries

This commit is contained in:
Michael Simacek 2018-08-03 14:08:10 +02:00
parent f25bcc96db
commit 7a38eb6d86
3 changed files with 36 additions and 9 deletions

26
generate-tarball.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
set -e
name=objectweb-asm
version="$(sed -n 's/Version:\s*//p' *.spec)"
gittag="ASM_${version//./_}"
# RETRIEVE
wget "https://gitlab.ow2.org/asm/asm/repository/${gittag}/archive.tar.gz#/${name}-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
cd tarball-tmp
tar xf "../${name}-${version}.orig.tar.gz"
# Rename dir not to contain commit
mv asm-${gittag}-* ${name}-${version}
# CLEAN TARBALL
find -name '*.jar' -delete
find -name '*.class' -delete
rm -r */gradle
tar cf "../${name}-${version}.tar.gz" *
cd ..
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"

View File

@ -1,17 +1,16 @@
%global gittag ASM_6_2
%bcond_without junit5 %bcond_without junit5
%bcond_without osgi %bcond_without osgi
Name: objectweb-asm Name: objectweb-asm
Version: 6.2 Version: 6.2
Release: 4%{?dist} Release: 5%{?dist}
Summary: Java bytecode manipulation and analysis framework Summary: Java bytecode manipulation and analysis framework
License: BSD License: BSD
URL: http://asm.ow2.org/ URL: http://asm.ow2.org/
BuildArch: noarch BuildArch: noarch
Source0: https://gitlab.ow2.org/asm/asm/repository/%{gittag}/archive.tar.gz#/%{name}-%{version}.tar.gz # ./generate-tarball.sh
Source0: %{name}-%{version}.tar.gz
Source1: parent.pom Source1: parent.pom
Source2: http://repo1.maven.org/maven2/org/ow2/asm/asm/%{version}/asm-%{version}.pom Source2: http://repo1.maven.org/maven2/org/ow2/asm/asm/%{version}/asm-%{version}.pom
Source3: http://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/%{version}/asm-analysis-%{version}.pom Source3: http://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/%{version}/asm-analysis-%{version}.pom
@ -23,6 +22,8 @@ Source8: http://repo1.maven.org/maven2/org/ow2/asm/asm-xml/%{version}/asm
# We still want to create an "all" uberjar, so this is a custom pom to generate it # We still want to create an "all" uberjar, so this is a custom pom to generate it
# TODO: Fix other packages to no longer depend on "asm-all" so we can drop this # TODO: Fix other packages to no longer depend on "asm-all" so we can drop this
Source9: asm-all.pom Source9: asm-all.pom
# The source contains binary jars that cannot be verified for licensing and could be proprietary
Source10: generate-tarball.sh
BuildRequires: maven-local BuildRequires: maven-local
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
@ -61,10 +62,7 @@ Summary: API documentation for %{name}
This package provides %{summary}. This package provides %{summary}.
%prep %prep
%setup -q -n asm-%{gittag}-c72a86bd5f48a308537695213d3a23ac35a57d55 %setup -q
find -name *.jar -delete
rm -rf gradle/
# A custom parent pom to aggregate the build # A custom parent pom to aggregate the build
cp -p %{SOURCE1} pom.xml cp -p %{SOURCE1} pom.xml
@ -149,6 +147,9 @@ popd
%license LICENSE.txt %license LICENSE.txt
%changelog %changelog
* Fri Aug 03 2018 Michael Simacek <msimacek@redhat.com> - 6.2-5
- Repack the tarball without binaries
* Wed Aug 01 2018 Severin Gehwolf <sgehwolf@redhat.com> - 6.2-4 * Wed Aug 01 2018 Severin Gehwolf <sgehwolf@redhat.com> - 6.2-4
- Explicitly require javapackages-tools for asm-processor script - Explicitly require javapackages-tools for asm-processor script
which uses java-functions. which uses java-functions.

View File

@ -1,4 +1,4 @@
SHA512 (objectweb-asm-6.2.tar.gz) = 4eabeebf98ca642cc3901b6eb178840cc677150d79c7c981e1759d6e9a798df1837f15eb3dba6d0fe3c0dd156f21f6348bd908b49da78aa5c5e03d374d797943 SHA512 (objectweb-asm-6.2.tar.gz) = 52de20e11eb7f09bb47ef7394138c3fb425197c552786bf01e1f17331f2d32481e09ce2dd7267058647e29bcd4cbd0b4e7a2f2f3ee583945b18eefebbe407238
SHA512 (asm-6.2.pom) = a6cebb211772ac4e13df2c519593da5ce0742bb88d928fc0c2cf9094141f88c4e88dbff29ca6f7b7b3749d0ada02ddc07c27c25493c6562be8dbcecf8a1fcad5 SHA512 (asm-6.2.pom) = a6cebb211772ac4e13df2c519593da5ce0742bb88d928fc0c2cf9094141f88c4e88dbff29ca6f7b7b3749d0ada02ddc07c27c25493c6562be8dbcecf8a1fcad5
SHA512 (asm-analysis-6.2.pom) = 853742bb74ffae42314c162f624c8bb2a6149a3fc7763a9ac2ec2528f2381c5b84d7bfd41c61f89e59bd1650a06faf64d4124f6e0fa2cfd23554257949d6006b SHA512 (asm-analysis-6.2.pom) = 853742bb74ffae42314c162f624c8bb2a6149a3fc7763a9ac2ec2528f2381c5b84d7bfd41c61f89e59bd1650a06faf64d4124f6e0fa2cfd23554257949d6006b
SHA512 (asm-commons-6.2.pom) = c8033bde09af20576aee78237e555620f22de6fccfa9ab8840d7e09657f6d92cf2b467080c18207cf978c4a21af86eba120bd9a19430b264822b55fbfefa5e4f SHA512 (asm-commons-6.2.pom) = c8033bde09af20576aee78237e555620f22de6fccfa9ab8840d7e09657f6d92cf2b467080c18207cf978c4a21af86eba120bd9a19430b264822b55fbfefa5e4f