commit fc5a11c3170fa83705b8a4ee26653a667034604a Author: Jitka Plesnikova <jplesnik@xxxxxxxxxx> Date: Mon Mar 9 15:19:55 2015 +0100 Repackage source tarball to remove non-free DBI/FAQ.pm .gitignore | 1 + perl-DBI.spec | 13 +++++++++++-- sources | 2 +- strip_FAQ.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 3 deletions(-) --- diff --git a/.gitignore b/.gitignore index f660965..cd06c9b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ DBI-1.613.tar.gz /DBI-1.627.tar.gz /DBI-1.628.tar.gz /DBI-1.630.tar.gz +/DBI-1.630_repackaged.tar.gz diff --git a/perl-DBI.spec b/perl-DBI.spec index 4e87dcf..5deb7f2 100644 --- a/perl-DBI.spec +++ b/perl-DBI.spec @@ -8,12 +8,18 @@ Name: perl-DBI Version: 1.630 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A database access API for perl Group: Development/Libraries License: GPL+ or Artistic URL: http://dbi.perl.org/ -Source0: http://www.cpan.org/authors/id/T/TI/TIMB/DBI-%{version}.tar.gz +# The source tarball must be repackaged to remove the DBI/FAQ.pm, since the +# license is not a FSF free license. +# When upgrading, download the new source tarball, and run +# "./strip-FAQ.sh <version>" to produce the "-repackaged" tarball. +# Source0: http://www.cpan.org/authors/id/T/TI/TIMB/DBI-%{version}.tar.gz +Source0: DBI-%{version}_repackaged.tar.gz +Source1: strip_FAQ.sh BuildRequires: perl BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(File::Find) @@ -138,6 +144,9 @@ make test %{_mandir}/man3/*.3* %changelog +* Mon Mar 09 2015 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 1.630-2 +- Repackage source tarball to remove non-free DBI/FAQ.pm (bug #1199532) + * Tue Oct 29 2013 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 1.630-1 - 1.630 bump diff --git a/sources b/sources index 3ecf5de..bf5ad8a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -306020fe7b54a53773f54ad581af8c54 DBI-1.630.tar.gz +cc1ccae7b79bad622a9c358a6dd4e7fe DBI-1.630_repackaged.tar.gz diff --git a/strip_FAQ.sh b/strip_FAQ.sh new file mode 100755 index 0000000..8d8f138 --- /dev/null +++ b/strip_FAQ.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +version=$1 +[ -z "$version" ] && { echo "Usage: $0 <version>"; exit 1; } + +# files to be removed without the main DBI-<version>/ prefix +declare -a REMOVE +REMOVE[${#REMOVE[*]}]="lib/DBI/FAQ.pm" + +orig="DBI-${version}" +orig_tgz="${orig}.tar.gz" +repackaged="${orig}_repackaged" +repackaged_tgz="${repackaged}.tar.gz" + +# pre checks +[ ! -f "${orig_tgz}" ] && { echo "ERROR: ${orig_tgz} does not exist"; exit 1; } +[ -f "${repackaged_tgz}" ] && { echo "ERROR: ${repackaged_tgz} already exist"; exit 1; } + +# repackage +tdir=`mktemp -d tmpXXXXXX` +pushd "${tdir}" + +tar -xpzf ../${orig_tgz} +for file in "${REMOVE[@]}"; do + rm -rf "${orig}/${file}" +done +tar -cpzf ../"${repackaged_tgz}" "${orig}" + +popd +rm -rf "${tdir}" + +# post checks +RET=0 +for file in "${REMOVE[@]}"; do + found=$(tar -ztvf "${repackaged_tgz}" | grep "${file}") + [ -n "$found" ] && { echo "ERROR: file ${file} is still in the repackaged archive."; RET=1; } +done + +[ $RET == 0 ] && echo "Sucessfully repackaged ${orig}: ${repackaged_tgz}" + +exit $RET -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel