From 108799fc673be10320c8fcddeeb0df53ad5ed742 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 18 Jun 2021 17:33:19 +0200 Subject: [PATCH] Clean tarball from content with questionable licensing Resolves: rhbz#1973750 --- generate-tarball.sh | 20 ++++++++++++++++++++ jansi.spec | 14 +++++++++++--- sources | 2 +- 3 files changed, 32 insertions(+), 4 deletions(-) create mode 100755 generate-tarball.sh diff --git a/generate-tarball.sh b/generate-tarball.sh new file mode 100755 index 0000000..0d2f36c --- /dev/null +++ b/generate-tarball.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + +name=jansi +version="$(sed -n 's/Version:\s*//p' *.spec)" + +# RETRIEVE +wget "https://github.com/fusesource/jansi/archive/jansi-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz" + +rm -rf tarball-tmp +mkdir tarball-tmp +pushd tarball-tmp +tar xf "../${name}-${version}.orig.tar.gz" + +# CLEAN TARBALL +rm -r */src/main/native/inc_{mac,win}/ + +tar -czf "../${name}-${version}.tar.gz" * +popd +rm -r tarball-tmp "${name}-${version}.orig.tar.gz" diff --git a/jansi.spec b/jansi.spec index bed0c6f..1c65f57 100644 --- a/jansi.spec +++ b/jansi.spec @@ -2,12 +2,16 @@ Name: jansi Version: 2.1.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Generate and interpret ANSI escape sequences in Java - License: ASL 2.0 URL: http://fusesource.github.io/jansi/ -Source0: https://github.com/fusesource/jansi/archive/jansi-%{version}.tar.gz + +# ./generate-tarball.sh +Source0: %{name}-%{version}.tar.gz +# Remove bundled binaries which cannot be easily verified for licensing +Source1: generate-tarball.sh + # Change the location of the native artifact to where Fedora wants it Patch0: %{name}-jni.patch @@ -98,6 +102,10 @@ cp -p src/main/native/libjansi.so %{buildroot}%{_libdir}/%{name} %license license.txt %changelog +* Fri Jun 18 2021 Mikolaj Izdebski - 2.1.1-7 +- Clean tarball from content with questionable licensing +- Resolves: rhbz#1973750 + * Wed Jun 09 2021 Mikolaj Izdebski - 2.1.1-6 - Rebuild to workaround DistroBaker issue diff --git a/sources b/sources index 8f107e7..a2c0656 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jansi-2.1.1.tar.gz) = ccdb7b13da6715398b0b1d53bb1272ac445774dea7f643882c7df0182e17350b41dd1c782161f5350028209c82ac3588c22ceaaacd4930ec78645230b335bc4a +SHA512 (jansi-2.1.1.tar.gz) = 532b6c959e38fa8a1c3563dcafd78fd6634f96b85976b5c0e32808481e5f73c2323a89ace55e13da0f77ab45678d1e844e967dd0ceac19efb0c587af3257b4da