ppisar pushed to perl-libnet (master). "Do not create Net/libnet.cfg"

notifications at fedoraproject.org notifications at fedoraproject.org
Fri Jul 10 11:13:34 UTC 2015


From 7b43766b3f9e6a302e99664b4be8653db5833e20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
Date: Fri, 10 Jul 2015 13:05:42 +0200
Subject: Do not create Net/libnet.cfg


diff --git a/libnet-3.06-Do-not-create-Net-libnet.cfg.patch b/libnet-3.06-Do-not-create-Net-libnet.cfg.patch
new file mode 100644
index 0000000..d2f5fef
--- /dev/null
+++ b/libnet-3.06-Do-not-create-Net-libnet.cfg.patch
@@ -0,0 +1,43 @@
+From ba16451e323a585ba0ca3ff88bf7bbd2c2c3a76a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Fri, 10 Jul 2015 13:02:00 +0200
+Subject: [PATCH] Do not create Net/libnet.cfg
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+I will remove the Net/libnet.cfg because:
+
+(1) it's content equals to default configuration hard-coded in the
+code
+(2) it's kind of configuration file we do not mark it as a configuration
+file, so it's overwritten on each update
+(3) it's loaded from directory based on Net::Config module location.
+I.e. core module will search it in core path, vendor module in vendor
+path and site module in site path.
+
+perl.spec does not provide it either.
+
+<https://bugzilla.redhat.com/show_bug.cgi?id=1238689>
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ Makefile.PL | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index af24976..2d9790b 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -234,7 +234,7 @@ MAIN: {
+ sub MY::post_initialize {
+     my $self = shift;
+ 
+-    return '' if $self->{PERL_CORE};
++    return '';
+ 
+     if (not -f $CfgFile) {
+         my @args = qw(Configure);
+-- 
+2.4.3
+
diff --git a/perl-libnet.spec b/perl-libnet.spec
index f599161..0aac5a9 100644
--- a/perl-libnet.spec
+++ b/perl-libnet.spec
@@ -8,14 +8,16 @@ URL:            http://search.cpan.org/dist/libnet/
 Source0:        http://www.cpan.org/authors/id/S/SH/SHAY/libnet-%{version}.tar.gz
 # Convert Changes to UTF-8
 Patch0:         libnet-3.06-Normalize-Changes-encoding.patch
+# Do not create Net/libnet.cfg, bug #1238689
+Patch1:         libnet-3.06-Do-not-create-Net-libnet.cfg.patch
 BuildArch:      noarch
 BuildRequires:  coreutils
 BuildRequires:  findutils
 BuildRequires:  make
 BuildRequires:  perl
 BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.64
-BuildRequires:  perl(Getopt::Std)
-BuildRequires:  perl(IO::File)
+# 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)
 BuildRequires:  perl(warnings)
 # Run-time:
@@ -51,6 +53,7 @@ BuildRequires:  perl(IO::Socket::SSL) >= 2.007
 BuildRequires:  perl(Config)
 BuildRequires:  perl(Cwd)
 BuildRequires:  perl(File::Temp)
+BuildRequires:  perl(IO::File)
 BuildRequires:  perl(Test::More)
 # Optional tests:
 %if !%{defined perl_bootstrap}
@@ -82,6 +85,7 @@ protocols used in the internet community.
 %prep
 %setup -q -n libnet-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor </dev/null
@@ -104,3 +108,4 @@ make test
 %changelog
 * Wed Jul 01 2015 Petr Pisar <ppisar at redhat.com> 3.06-1
 - Specfile autogenerated by cpanspec 1.78.
+- Do not create Net/libnet.cfg (bug #1238689)
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/perl-libnet.git/commit/?h=master&id=7b43766b3f9e6a302e99664b4be8653db5833e20


More information about the perl-devel mailing list