Net::libnetFAQ document replaced with a hyper link because of the Artistic license

This commit is contained in:
Petr Písař 2016-09-16 14:58:21 +02:00
parent 00d1ca514c
commit 9d07b6a807
4 changed files with 82 additions and 3 deletions

2
.gitignore vendored
View File

@ -3,3 +3,5 @@
/libnet-3.08.tar.gz /libnet-3.08.tar.gz
/libnet-3.09.tar.gz /libnet-3.09.tar.gz
/libnet-3.10.tar.gz /libnet-3.10.tar.gz
/libnet-3.10_repackaged.tar.gz
/libnetFAQ.pod

View File

@ -1,16 +1,27 @@
Name: perl-libnet Name: perl-libnet
Version: 3.10 Version: 3.10
Release: 1%{?dist} Release: 2%{?dist}
Summary: Perl clients for various network protocols Summary: Perl clients for various network protocols
# other files: GPL+ or Artistic
## Not in binary packages
# repackage.sh: GPLv2+
## Removed from upstream sources:
# lib/Net/libnetFAQ.pod: Artistic (CPAN RT#117888)
License: GPL+ or Artistic License: GPL+ or Artistic
Group: Development/Libraries Group: Development/Libraries
URL: http://search.cpan.org/dist/libnet/ URL: http://search.cpan.org/dist/libnet/
Source0: http://www.cpan.org/authors/id/S/SH/SHAY/libnet-%{version}.tar.gz # Origin source archive contains Artistic only files, CPAN RT#117888.
# Local archive produced by "./repackage.sh %%{version}" command.
# http://www.cpan.org/authors/id/S/SH/SHAY/libnet-%%{version}.tar.gz
Source0: libnet-%{version}_repackaged.tar.gz
# Replacement for the Artistic only file, CPAN RT#117888.
Source1: libnetFAQ.pod
# Convert Changes to UTF-8 # Convert Changes to UTF-8
Patch0: libnet-3.09-Normalize-Changes-encoding.patch Patch0: libnet-3.09-Normalize-Changes-encoding.patch
# Do not create Net/libnet.cfg, bug #1238689 # Do not create Net/libnet.cfg, bug #1238689
Patch1: libnet-3.08-Do-not-create-Net-libnet.cfg.patch Patch1: libnet-3.08-Do-not-create-Net-libnet.cfg.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: coreutils
BuildRequires: findutils BuildRequires: findutils
BuildRequires: make BuildRequires: make
BuildRequires: perl BuildRequires: perl
@ -91,6 +102,8 @@ protocols used in the internet community.
%prep %prep
%setup -q -n libnet-%{version} %setup -q -n libnet-%{version}
# Provide dummy Net::libnetFAQ document, CPAN RT#117888
install -m 0644 %{SOURCE1} lib/Net
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
@ -113,6 +126,10 @@ make test
%{_mandir}/man3/* %{_mandir}/man3/*
%changelog %changelog
* Fri Sep 16 2016 Petr Pisar <ppisar@redhat.com> - 3.10-2
- Net::libnetFAQ document replaced with a hyper link because of the Artistic
license (CPAN RT#117888)
* Mon Aug 01 2016 Jitka Plesnikova <jplesnik@redhat.com> - 3.10-1 * Mon Aug 01 2016 Jitka Plesnikova <jplesnik@redhat.com> - 3.10-1
- 3.10 bump - 3.10 bump

59
repackage.sh Executable file
View File

@ -0,0 +1,59 @@
#!/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/>.
#
version=$1
[ -z "$version" ] && { echo "Usage: $0 <version>"; exit 1; }
# files to be removed without the main libnet-<version>/ prefix
declare -a REMOVE
REMOVE[${#REMOVE[*]}]="lib/Net/libnetFAQ.pod"
# no changes below this line should be needed
orig="libnet-${version}"
orig_tgz="${orig}.tar.gz"
repackaged="${orig}_repackaged"
repackaged_tar="${repackaged}.tar"
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
failure=0
gzip -dc "${orig_tgz}" > "${repackaged_tar}"
for file in "${REMOVE[@]}"; do
tar -f "${repackaged_tar}" --delete "${orig}/${file}" >> repackage.log
[ $? != 0 ] && { echo "ERROR: Could not remove file ${orig}/${file} from archive."; failure=1; } || echo "Removed ${orig}/${file} from archive."
done
[ $failure != 0 ] && { echo "See repackage.log for details."; exit 1; }
gzip -9 -n "${repackaged_tar}"
# 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

View File

@ -1 +1,2 @@
9c298eb72753cd58cee6ed777484e44a libnet-3.10.tar.gz 7a9dada2b4dc886c0932ad4f3d6534ab libnetFAQ.pod
631c42b40d36bcc689b2d8093ba09545 libnet-3.10_repackaged.tar.gz