Compare commits

...

No commits in common. "c8-stream-5.3" and "stream-perl-bootstrap-5.30-rhel-8.9.0" have entirely different histories.

8 changed files with 69 additions and 8 deletions

9
.gitignore vendored
View File

@ -1 +1,8 @@
SOURCES/libnet-3.11_repackaged.tar.gz /libnet-3.06.tar.gz
/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

View File

@ -1 +0,0 @@
a4d57be085667743c2d040bc309a61b036b2c6e0 SOURCES/libnet-3.11_repackaged.tar.gz

View File

@ -1,6 +0,0 @@
=encoding utf-8
The L<libnetFAQ document is not distributed because of the
license|https://rt.cpan.org/Public/Bug/Display.html?id=117888>. You can
access the original document on
L<http://search.cpan.org/~shay/libnet/lib/Net/libnetFAQ.pod>.

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

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (libnetFAQ.pod) = 234082350814967ac3bfc0e4c57e53f7473be69f6cc9618cef061aaaaaddfaaf0e1542d38e7775c2fc78fc16d92e45b30ccb48c07d118a0a4b5e1c90d030c42f
SHA512 (libnet-3.11_repackaged.tar.gz) = 77f88f84d8669179c5a70a147822ae09b9a1f94f13c7df0a78d713d65754862cb9fdae41aa632885449b93adaf674990da65b8558a9ef116e5d5c2870be09100