Compare commits
53 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fda6835b8 | ||
|
|
a273b97b3c | ||
|
|
bd105aa406 | ||
|
|
ccf12e5755 | ||
|
|
ded9ed1d6e | ||
|
|
0ab0dc9f92 | ||
|
|
9ac76eea7a | ||
|
|
b5fd4867b5 | ||
|
|
273e94d412 | ||
|
|
ed57bd937d | ||
|
|
db71ef6dc7 | ||
|
|
117a17ea1a | ||
|
|
bbdba7e831 | ||
|
|
3e62739092 | ||
|
|
7c4321d4ed | ||
|
|
b804f81aee | ||
|
|
3f0e538cf2 | ||
|
|
a997b7ce13 | ||
|
|
4818060cf2 | ||
|
|
79a96dfd81 | ||
|
|
18dce84b4d | ||
|
|
a5d5429c4a | ||
|
|
6303ab5854 | ||
|
|
7b07641ed6 | ||
|
|
d029799810 | ||
|
|
97e8b39310 | ||
|
|
601cbc6938 | ||
|
|
b1ccc7043a | ||
|
|
0a4e3a489d | ||
|
|
0049cf85ad | ||
|
|
5a19752d44 | ||
|
|
852fe4dee3 | ||
|
|
21a4777483 | ||
|
|
c53c0704dd | ||
|
|
3b20ecf02a | ||
|
|
bf8ee1d26a | ||
|
|
1ce8b695a0 | ||
|
|
f5ec062085 | ||
|
|
07488b3cb4 | ||
|
|
6e7ebf3e9e | ||
|
|
8799d71bc9 | ||
|
|
da1b7a87b0 | ||
|
|
73a3157661 | ||
|
|
40b38cdf26 | ||
|
|
761f0a537d | ||
|
|
a2e4849514 | ||
|
|
81480215ab | ||
|
|
1bebd8899c | ||
|
|
816475d029 | ||
|
|
adc3c9169f | ||
|
|
f3143bfd9f | ||
|
|
9d07b6a807 | ||
|
|
00d1ca514c |
6 changed files with 242 additions and 124 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -2,3 +2,10 @@
|
|||
/libnet-3.07.tar.gz
|
||||
/libnet-3.08.tar.gz
|
||||
/libnet-3.09.tar.gz
|
||||
/libnet-3.10.tar.gz
|
||||
/libnet-3.10_repackaged.tar.gz
|
||||
/libnetFAQ.pod
|
||||
/libnet-3.11_repackaged.tar.gz
|
||||
/libnet-3.12.tar.gz
|
||||
/libnet-3.13.tar.gz
|
||||
/libnet-3.15.tar.gz
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ diff --git a/Changes b/Changes
|
|||
index 831e061..27fda24 100644
|
||||
--- a/Changes
|
||||
+++ b/Changes
|
||||
@@ -236,7 +236,7 @@ Revision history for Perl distribution libnet
|
||||
@@ -299,7 +299,7 @@ Revision history for Perl distribution libnet
|
||||
|
||||
1.24 2014-01-06
|
||||
|
||||
|
|
|
|||
|
|
@ -1,91 +0,0 @@
|
|||
From 72d07cb0d6a2e32a6a18a1794a592a8f6bf71665 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
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ř <ppisar@redhat.com>
|
||||
---
|
||||
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
|
||||
|
||||
205
perl-libnet.spec
205
perl-libnet.spec
|
|
@ -1,23 +1,33 @@
|
|||
%global base_version 3.15
|
||||
|
||||
# Run optional test
|
||||
%if ! (0%{?rhel})
|
||||
%bcond_without perl_libnet_enables_optional_test
|
||||
%else
|
||||
%bcond_with perl_libnet_enables_optional_test
|
||||
%endif
|
||||
# SASL support
|
||||
%bcond_without perl_libnet_enables_sasl
|
||||
# SSL support
|
||||
%bcond_without perl_libnet_enables_ssl
|
||||
|
||||
Name: perl-libnet
|
||||
Version: 3.09
|
||||
Release: 2%{?dist}
|
||||
Version: 3.15
|
||||
Release: 521%{?dist}
|
||||
Summary: Perl clients for various network protocols
|
||||
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
|
||||
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
||||
URL: https://metacpan.org/release/libnet
|
||||
Source0: https://cpan.metacpan.org/authors/id/S/SH/SHAY/libnet-%{base_version}.tar.gz
|
||||
# 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
|
||||
# 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: coreutils
|
||||
BuildRequires: make
|
||||
BuildRequires: perl
|
||||
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)
|
||||
|
|
@ -43,7 +53,7 @@ BuildRequires: perl(Time::Local)
|
|||
# Optional run-time:
|
||||
# Authen::SASL not used at tests
|
||||
# Digest::MD5 not used at tests
|
||||
%if !%{defined perl_bootstrap}
|
||||
%if %{with perl_libnet_enables_ssl} && !%{defined perl_bootstrap}
|
||||
# Core modules must be built without non-core dependencies
|
||||
BuildRequires: perl(IO::Socket::SSL) >= 2.007
|
||||
%endif
|
||||
|
|
@ -55,16 +65,13 @@ BuildRequires: perl(Cwd)
|
|||
BuildRequires: perl(File::Temp)
|
||||
BuildRequires: perl(IO::File)
|
||||
BuildRequires: perl(Test::More)
|
||||
%if %{with perl_libnet_enables_optional_test}
|
||||
# Optional tests:
|
||||
%if !%{defined perl_bootstrap}
|
||||
%if %{with perl_libnet_enables_ssl} && !%{defined perl_bootstrap}
|
||||
# Core modules must be built without non-core dependencies
|
||||
BuildRequires: perl(IO::Socket::SSL::Utils)
|
||||
%endif
|
||||
# Test::CPAN::Changes not used
|
||||
# Test::Perl::Critic not used
|
||||
# Test::Pod 1.00 not used
|
||||
# Test::Pod::Coverage 0.08 not used
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
%endif
|
||||
Requires: perl(File::Basename)
|
||||
Requires: perl(IO::Socket) >= 1.05
|
||||
# Prefer IO::Socket::IP over IO::Socket::INET6 and IO::Socket::INET
|
||||
|
|
@ -73,14 +80,15 @@ Requires: perl(POSIX)
|
|||
Requires: perl(Socket) >= 2.016
|
||||
# Optional run-time:
|
||||
# Core modules must be built without non-core dependencies
|
||||
%if !%{defined perl_bootstrap}
|
||||
%if %{with perl_libnet_enables_sasl} && !%{defined perl_bootstrap}
|
||||
Suggests: perl(Authen::SASL)
|
||||
Suggests: perl(MIME::Base64)
|
||||
%endif
|
||||
Suggests: perl(Digest::MD5)
|
||||
%if !%{defined perl_bootstrap}
|
||||
# Digest::MD5 or MD5
|
||||
Requires: perl(Digest::MD5)
|
||||
%if %{with perl_libnet_enables_ssl} && !%{defined perl_bootstrap}
|
||||
Suggests: perl(IO::Socket::SSL) >= 2.007
|
||||
%endif
|
||||
Suggests: perl(MIME::Base64)
|
||||
Conflicts: perl < 4:5.22.0-347
|
||||
|
||||
# Filter under-specified dependencies
|
||||
|
|
@ -92,18 +100,16 @@ consistent programming interface (API) to the client side of various
|
|||
protocols used in the internet community.
|
||||
|
||||
%prep
|
||||
%setup -q -n libnet-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%setup -q -n libnet-%{base_version}
|
||||
%patch -P0 -p1
|
||||
%patch -P1 -p1
|
||||
|
||||
%build
|
||||
perl Makefile.PL INSTALLDIRS=vendor </dev/null
|
||||
make %{?_smp_mflags}
|
||||
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 </dev/null
|
||||
%{make_build}
|
||||
|
||||
%install
|
||||
make pure_install DESTDIR=$RPM_BUILD_ROOT
|
||||
find $RPM_BUILD_ROOT -type f -name .packlist -delete
|
||||
%{make_install}
|
||||
%{_fixperms} $RPM_BUILD_ROOT/*
|
||||
|
||||
%check
|
||||
|
|
@ -116,6 +122,143 @@ make test
|
|||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.15-521
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Tue Jul 08 2025 Jitka Plesnikova <jplesnik@redhat.com> - 3.15-520
|
||||
- Perl 5.42 re-rebuild of bootstrapped packages
|
||||
|
||||
* Mon Jul 07 2025 Jitka Plesnikova <jplesnik@redhat.com> - 3.15-519
|
||||
- Increase release to favour standalone package
|
||||
|
||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.15-513
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.15-512
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Wed Jun 12 2024 Jitka Plesnikova <jplesnik@redhat.com> - 3.15-511
|
||||
- Perl 5.40 re-rebuild of bootstrapped packages
|
||||
|
||||
* Mon Jun 10 2024 Jitka Plesnikova <jplesnik@redhat.com> - 3.15-510
|
||||
- Increase release to favour standalone package
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.15-503
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.15-502
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.15-501
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Wed Jul 12 2023 Jitka Plesnikova <jplesnik@redhat.com> - 3.15-500
|
||||
- Perl 5.38 re-rebuild of bootstrapped packages
|
||||
|
||||
* Tue Jul 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 3.15-499
|
||||
- Increase release to favour standalone package
|
||||
|
||||
* Tue Mar 21 2023 Jitka Plesnikova <jplesnik@redhat.com> - 3.15-1
|
||||
- 3.15 bump
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.14-491
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.14-490
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Fri Jun 03 2022 Jitka Plesnikova <jplesnik@redhat.com> - 3.14-489
|
||||
- Perl 5.36 re-rebuild of bootstrapped packages
|
||||
|
||||
* Mon May 30 2022 Jitka Plesnikova <jplesnik@redhat.com> - 3.14-488
|
||||
- Increase release to favour standalone package
|
||||
|
||||
* Thu May 12 2022 Jitka Plesnikova <jplesnik@redhat.com> - 3.14-1
|
||||
- Upgrade to 3.14 as provided in perl-5.35.11
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.13-480
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.13-479
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Mon May 24 2021 Jitka Plesnikova <jplesnik@redhat.com> - 3.13-478
|
||||
- Perl 5.34 re-rebuild of bootstrapped packages
|
||||
|
||||
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 3.13-477
|
||||
- Increase release to favour standalone package
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.13-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Mon Jan 04 2021 Jitka Plesnikova <jplesnik@redhat.com> - 3.13-1
|
||||
- 3.13 bump
|
||||
|
||||
* Wed Dec 09 2020 Jitka Plesnikova <jplesnik@redhat.com> - 3.12-1
|
||||
- 3.12 bump
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-458
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Fri Jun 26 2020 Jitka Plesnikova <jplesnik@redhat.com> - 3.11-457
|
||||
- Perl 5.32 re-rebuild of bootstrapped packages
|
||||
|
||||
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 3.11-456
|
||||
- Increase release to favour standalone package
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-441
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-440
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sun Jun 02 2019 Jitka Plesnikova <jplesnik@redhat.com> - 3.11-439
|
||||
- Perl 5.30 re-rebuild of bootstrapped packages
|
||||
|
||||
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 3.11-438
|
||||
- Increase release to favour standalone package
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-419
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-418
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Sat Jun 30 2018 Jitka Plesnikova <jplesnik@redhat.com> - 3.11-417
|
||||
- Perl 5.28 re-rebuild of bootstrapped packages
|
||||
|
||||
* Wed Jun 27 2018 Jitka Plesnikova <jplesnik@redhat.com> - 3.11-416
|
||||
- Increase release to favour standalone package
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Tue Dec 12 2017 Petr Pisar <ppisar@redhat.com> - 3.11-2
|
||||
- Require Digest::MD5 for APOP login method
|
||||
|
||||
* Wed Nov 15 2017 Petr Pisar <ppisar@redhat.com> - 3.11-1
|
||||
- 3.11 bump
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.10-395
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 3.10-394
|
||||
- Perl 5.26 re-rebuild of bootstrapped packages
|
||||
|
||||
* Sat Jun 03 2017 Jitka Plesnikova <jplesnik@redhat.com> - 3.10-393
|
||||
- Perl 5.26 rebuild
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.10-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* 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
|
||||
- 3.10 bump
|
||||
|
||||
* Wed Jul 27 2016 Petr Pisar <ppisar@redhat.com> - 3.09-2
|
||||
- Fix blocking in Net::FTP and other subclasses (bug #1360610)
|
||||
|
||||
|
|
@ -132,7 +275,7 @@ make test
|
|||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Wed Jan 06 2016 Petr Pisar <ppisar@redhat.com> - 3.08-1
|
||||
- 8.08 bump
|
||||
- 3.08 bump
|
||||
|
||||
* Mon Jul 20 2015 Petr Pisar <ppisar@redhat.com> - 3.07-1
|
||||
- 3.07 bump
|
||||
|
|
|
|||
59
repackage.sh
Executable file
59
repackage.sh
Executable 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
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
adb1ba477d02391860619f341cd58a50 libnet-3.09.tar.gz
|
||||
SHA512 (libnet-3.15.tar.gz) = 8ae71a32e350b73d97eed87f51507e7c88fb37501b66a5c118cee894de664e6728444950dc32a3ca4b2c4e47974b8e90b5747cceff266fda46575fd995bedcf6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue