From 1694750fa87e2bd6db16665a3be50e46e335fd09 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Mon, 1 Aug 2016 15:15:49 +0200 Subject: [PATCH 1/4] 3.10 bump --- .gitignore | 1 + ...-method-in-Net-FTP-and-other-subclas.patch | 91 ------------------- perl-libnet.spec | 10 +- sources | 2 +- 4 files changed, 7 insertions(+), 97 deletions(-) delete mode 100644 libnet-3.09-Override-timeout-method-in-Net-FTP-and-other-subclas.patch diff --git a/.gitignore b/.gitignore index dd31284..d4b4b2b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /libnet-3.07.tar.gz /libnet-3.08.tar.gz /libnet-3.09.tar.gz +/libnet-3.10.tar.gz diff --git a/libnet-3.09-Override-timeout-method-in-Net-FTP-and-other-subclas.patch b/libnet-3.09-Override-timeout-method-in-Net-FTP-and-other-subclas.patch deleted file mode 100644 index 7d2fa91..0000000 --- a/libnet-3.09-Override-timeout-method-in-Net-FTP-and-other-subclas.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 72d07cb0d6a2e32a6a18a1794a592a8f6bf71665 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Wed, 27 Jul 2016 12:57:23 +0200 -Subject: [PATCH] Override timeout method in Net::FTP and other subclasses -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -After adding Net::Cmd::timeout() in commit -91e593b615334fa76ef0454c4e601b98b6663841, the method masked -IO::Socket:IP::timeout() in Net::FTP objects causing infitive block in -select() on a FTP connection. - -CPAN RT#116345 - -Signed-off-by: Petr Písař ---- - lib/Net/FTP.pm | 5 +++++ - lib/Net/NNTP.pm | 6 ++++++ - lib/Net/POP3.pm | 5 +++++ - lib/Net/SMTP.pm | 5 +++++ - 4 files changed, 21 insertions(+) - -diff --git a/lib/Net/FTP.pm b/lib/Net/FTP.pm -index 905d830..42c33f5 100644 ---- a/lib/Net/FTP.pm -+++ b/lib/Net/FTP.pm -@@ -1210,6 +1210,11 @@ sub _data_cmd { - ## - - -+sub timeout { -+ $IOCLASS->can('timeout')->(@_); -+} -+ -+ - sub debug_text { $_[2] =~ /^(pass|resp|acct)/i ? "$1 ....\n" : $_[2]; } - - -diff --git a/lib/Net/NNTP.pm b/lib/Net/NNTP.pm -index 764d580..f1b5c17 100644 ---- a/lib/Net/NNTP.pm -+++ b/lib/Net/NNTP.pm -@@ -419,6 +419,12 @@ sub slave { - $nntp->_SLAVE; - } - -+ -+sub timeout { -+ $ISA[-1]->can('timeout')->(@_); -+} -+ -+ - ## - ## The following methods are not implemented by all servers - ## -diff --git a/lib/Net/POP3.pm b/lib/Net/POP3.pm -index bb18aaf..7f1cf5a 100644 ---- a/lib/Net/POP3.pm -+++ b/lib/Net/POP3.pm -@@ -387,6 +387,11 @@ sub quit { - } - - -+sub timeout { -+ $ISA[-1]->can('timeout')->(@_); -+} -+ -+ - sub DESTROY { - my $me = shift; - -diff --git a/lib/Net/SMTP.pm b/lib/Net/SMTP.pm -index 0dd966f..895c884 100644 ---- a/lib/Net/SMTP.pm -+++ b/lib/Net/SMTP.pm -@@ -586,6 +586,11 @@ sub quit { - } - - -+sub timeout { -+ $ISA[-1]->can('timeout')->(@_); -+} -+ -+ - sub DESTROY { - - # ignore --- -2.5.5 - diff --git a/perl-libnet.spec b/perl-libnet.spec index eb6d619..d31dd31 100644 --- a/perl-libnet.spec +++ b/perl-libnet.spec @@ -1,6 +1,6 @@ Name: perl-libnet -Version: 3.09 -Release: 2%{?dist} +Version: 3.10 +Release: 1%{?dist} Summary: Perl clients for various network protocols License: GPL+ or Artistic Group: Development/Libraries @@ -10,8 +10,6 @@ Source0: http://www.cpan.org/authors/id/S/SH/SHAY/libnet-%{version}.tar.g Patch0: libnet-3.09-Normalize-Changes-encoding.patch # Do not create Net/libnet.cfg, bug #1238689 Patch1: libnet-3.08-Do-not-create-Net-libnet.cfg.patch -# Fix blocking in Net::FTP and other subclasses, bug #1360610, CPAN RT#116345 -Patch2: libnet-3.09-Override-timeout-method-in-Net-FTP-and-other-subclas.patch BuildArch: noarch BuildRequires: findutils BuildRequires: make @@ -95,7 +93,6 @@ protocols used in the internet community. %setup -q -n libnet-%{version} %patch0 -p1 %patch1 -p1 -%patch2 -p1 %build perl Makefile.PL INSTALLDIRS=vendor - 3.10-1 +- 3.10 bump + * Wed Jul 27 2016 Petr Pisar - 3.09-2 - Fix blocking in Net::FTP and other subclasses (bug #1360610) diff --git a/sources b/sources index 405d97a..14962d9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -adb1ba477d02391860619f341cd58a50 libnet-3.09.tar.gz +9c298eb72753cd58cee6ed777484e44a libnet-3.10.tar.gz From 65e2880ba41a5b13f05ed1544bdd52ac07aa63bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 16 Sep 2016 14:58:21 +0200 Subject: [PATCH 2/4] Net::libnetFAQ document replaced with a hyper link because of the Artistic license --- .gitignore | 2 ++ perl-libnet.spec | 21 +++++++++++++++-- repackage.sh | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ sources | 3 ++- 4 files changed, 82 insertions(+), 3 deletions(-) create mode 100755 repackage.sh diff --git a/.gitignore b/.gitignore index d4b4b2b..91eb64e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /libnet-3.08.tar.gz /libnet-3.09.tar.gz /libnet-3.10.tar.gz +/libnet-3.10_repackaged.tar.gz +/libnetFAQ.pod diff --git a/perl-libnet.spec b/perl-libnet.spec index d31dd31..8e5ec86 100644 --- a/perl-libnet.spec +++ b/perl-libnet.spec @@ -1,16 +1,27 @@ Name: perl-libnet Version: 3.10 -Release: 1%{?dist} +Release: 2%{?dist} 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 Group: Development/Libraries 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 Patch0: libnet-3.09-Normalize-Changes-encoding.patch # Do not create Net/libnet.cfg, bug #1238689 Patch1: libnet-3.08-Do-not-create-Net-libnet.cfg.patch BuildArch: noarch +BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl @@ -91,6 +102,8 @@ protocols used in the internet community. %prep %setup -q -n libnet-%{version} +# Provide dummy Net::libnetFAQ document, CPAN RT#117888 +install -m 0644 %{SOURCE1} lib/Net %patch0 -p1 %patch1 -p1 @@ -113,6 +126,10 @@ make test %{_mandir}/man3/* %changelog +* Fri Sep 16 2016 Petr Pisar - 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 - 3.10-1 - 3.10 bump diff --git a/repackage.sh b/repackage.sh new file mode 100755 index 0000000..b9b8a9a --- /dev/null +++ b/repackage.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# +# Copyright (C) 2010 Red Hat, Inc. +# Authors: +# Thomas Woerner +# +# 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 . +# + +version=$1 +[ -z "$version" ] && { echo "Usage: $0 "; exit 1; } + +# files to be removed without the main libnet-/ 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 diff --git a/sources b/sources index 14962d9..55bf31f 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -9c298eb72753cd58cee6ed777484e44a libnet-3.10.tar.gz +7a9dada2b4dc886c0932ad4f3d6534ab libnetFAQ.pod +631c42b40d36bcc689b2d8093ba09545 libnet-3.10_repackaged.tar.gz From 0e451c58bd0be2e5893ab1e6879bff3e5aee775b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 12 Jul 2017 14:50:17 +0200 Subject: [PATCH 3/4] perl dependency renamed to perl-interpreter --- perl-libnet.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl-libnet.spec b/perl-libnet.spec index 8e5ec86..0c99e6a 100644 --- a/perl-libnet.spec +++ b/perl-libnet.spec @@ -24,7 +24,7 @@ BuildArch: noarch BuildRequires: coreutils BuildRequires: findutils BuildRequires: make -BuildRequires: perl +BuildRequires: perl-interpreter BuildRequires: perl-generators BuildRequires: perl(ExtUtils::MakeMaker) >= 6.64 # Getopt::Std not used because of Do-not-create-Net-libnet.cfg.patch From 3115b494e76318635313f2be4ab078fb5466e159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 15 Nov 2017 09:09:37 +0100 Subject: [PATCH 4/4] 3.11 bump --- .gitignore | 1 + perl-libnet.spec | 16 ++++++++-------- sources | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 91eb64e..9fe8032 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /libnet-3.10.tar.gz /libnet-3.10_repackaged.tar.gz /libnetFAQ.pod +/libnet-3.11_repackaged.tar.gz diff --git a/perl-libnet.spec b/perl-libnet.spec index 0c99e6a..efbad92 100644 --- a/perl-libnet.spec +++ b/perl-libnet.spec @@ -1,6 +1,6 @@ Name: perl-libnet -Version: 3.10 -Release: 2%{?dist} +Version: 3.11 +Release: 1%{?dist} Summary: Perl clients for various network protocols # other files: GPL+ or Artistic ## Not in binary packages @@ -8,7 +8,6 @@ Summary: Perl clients for various network protocols ## Removed from upstream sources: # lib/Net/libnetFAQ.pod: Artistic (CPAN RT#117888) License: GPL+ or Artistic -Group: Development/Libraries URL: http://search.cpan.org/dist/libnet/ # Origin source archive contains Artistic only files, CPAN RT#117888. # Local archive produced by "./repackage.sh %%{version}" command. @@ -22,11 +21,10 @@ Patch0: libnet-3.09-Normalize-Changes-encoding.patch Patch1: libnet-3.08-Do-not-create-Net-libnet.cfg.patch BuildArch: noarch BuildRequires: coreutils -BuildRequires: findutils BuildRequires: make -BuildRequires: perl-interpreter BuildRequires: perl-generators -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.64 +BuildRequires: perl-interpreter +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 # Getopt::Std not used because of Do-not-create-Net-libnet.cfg.patch # IO::File not used because of Do-not-create-Net-libnet.cfg.patch BuildRequires: perl(strict) @@ -108,12 +106,11 @@ install -m 0644 %{SOURCE1} lib/Net %patch1 -p1 %build -perl Makefile.PL INSTALLDIRS=vendor - 3.11-1 +- 3.11 bump + * Fri Sep 16 2016 Petr Pisar - 3.10-2 - Net::libnetFAQ document replaced with a hyper link because of the Artistic license (CPAN RT#117888) diff --git a/sources b/sources index 55bf31f..14d3475 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -7a9dada2b4dc886c0932ad4f3d6534ab libnetFAQ.pod -631c42b40d36bcc689b2d8093ba09545 libnet-3.10_repackaged.tar.gz +SHA512 (libnetFAQ.pod) = 234082350814967ac3bfc0e4c57e53f7473be69f6cc9618cef061aaaaaddfaaf0e1542d38e7775c2fc78fc16d92e45b30ccb48c07d118a0a4b5e1c90d030c42f +SHA512 (libnet-3.11_repackaged.tar.gz) = 77f88f84d8669179c5a70a147822ae09b9a1f94f13c7df0a78d713d65754862cb9fdae41aa632885449b93adaf674990da65b8558a9ef116e5d5c2870be09100