Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
Jitka Plesnikova | 8cdd77d0b1 | |
Jitka Plesnikova | 0047a33f4e |
|
@ -14,3 +14,4 @@ DBI-1.613.tar.gz
|
|||
/DBI-1.628.tar.gz
|
||||
/DBI-1.630.tar.gz
|
||||
/DBI-1.631.tar.gz
|
||||
/DBI-1.631_repackaged.tar.gz
|
||||
|
|
|
@ -10,12 +10,17 @@
|
|||
|
||||
Name: perl-DBI
|
||||
Version: 1.631
|
||||
Release: 5%{?dist}
|
||||
Release: 7%{?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
|
||||
# "./repackage.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
|
||||
# Add a security warning about use of RPC::PlClient, bug #1030578, CPAN RT#90475
|
||||
Patch0: DBI-1.630-Security-notice-for-Proxy.patch
|
||||
BuildRequires: perl
|
||||
|
@ -159,6 +164,12 @@ make test
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Mar 12 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.631-7
|
||||
- Remove script strip_FAQ.sh from sources
|
||||
|
||||
* Mon Mar 09 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.631-6
|
||||
- Repackage source tarball to remove non-free DBI/FAQ.pm (bug #1199532)
|
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.631-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2010 Red Hat, Inc.
|
||||
# Authors:
|
||||
# Thomas Woerner <twoerner@redhat.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script was a bit changed for DBI, because command below breaks tar index
|
||||
# tar -f <tarball> --delete <file>
|
||||
# Jitka Plesnikova <jplesnik@redhat.com>
|
||||
|
||||
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"
|
||||
|
||||
# no changes below this line should be needed
|
||||
|
||||
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
|
Loading…
Reference in New Issue