commit a664819767bb20ca681904cc14d365900fdf34f5 Author: Jitka Plesnikova <jplesnik@xxxxxxxxxx> Date: Mon Mar 9 13:53:34 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 e7b18fb..64b0874 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ DBI-1.613.tar.gz /DBI-1.631.tar.gz /DBI-1.632.tar.gz /DBI-1.633.tar.gz +/DBI-1.633_repackaged.tar.gz diff --git a/perl-DBI.spec b/perl-DBI.spec index bd72509..7a448cb 100644 --- a/perl-DBI.spec +++ b/perl-DBI.spec @@ -10,12 +10,18 @@ Name: perl-DBI Version: 1.633 -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) @@ -165,6 +171,9 @@ make test %endif %changelog +* Mon Mar 09 2015 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 1.633-2 +- Repackage source tarball to remove non-free DBI/FAQ.pm (bug #1199532) + * Tue Jan 13 2015 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 1.633-1 - 1.633 bump diff --git a/sources b/sources index 480df6b..4b2be8d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b4fe13b9a51c1446c5f3cf93e69a2044 DBI-1.633.tar.gz +edb8878df0f086d2759ce688a0359164 DBI-1.633_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