monitoring/PerlModules
by Dennis Gilmore
monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/BUILD | 46 -
monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/ChangeLog | 28
monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/IPv4Addr.pm | 384 ----------
monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/IPv4Addr.spec | 81 --
monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/MANIFEST | 8
monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/Makefile.PL | 8
monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/README | 43 -
monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/ipv4calc | 89 --
monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/test.pl | 66 -
9 files changed, 753 deletions(-)
New commits:
commit b655f163c24ae03122deb9dcae37173b87169329
Author: Dennis Gilmore <dennis(a)ausil.us>
Date: Mon Aug 24 15:18:42 2009 -0500
use Net::IPv4Addr module that is in fedora. its the same module just renamed in newer versions
diff --git a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/BUILD b/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/BUILD
deleted file mode 100644
index 1803595..0000000
--- a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/BUILD
+++ /dev/null
@@ -1,46 +0,0 @@
-# Macros
-
-#control upversion
-%define external_package 1
-
-%define cvs_package PerlModules/CPAN/Network-IPv4Addr-0.05
-
-# Package specific stuff
-Name: perl-Network-IPv4Addr
-Version: 0.6.0
-Release: 1.3
-Packager: Dave Parker <dparker(a)nocpulse.com>
-Summary: Perl IPV4 addr calculations
-Source: %name-%PACKAGE_VERSION.tar.gz
-BuildArch: noarch
-Requires: perl
-Group: unsorted
-License: GPL or Artistic
-Vendor: Red Hat, Inc.
-Prefix: %{_our_prefix}
-BuildRoot: %{_tmppath}/%cvs_package
-
-%description
-
-Network::IPv4Addr provides functions for parsing IPv4
-addresses both in traditional address/netmask format and
-in the new CIDR format. There are also methods for
-calculating the network and broadcast address and also to
-see check if a given address is in a specific network.
-
-%prep
-%entirely_abstract_build_step
-
-%build
-%makefile_build
-
-%install
-cd $RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION
-%makefile_install
-%point_scripts_to_correct_perl
-%make_file_list
-
-%files -f %{name}-%{version}-%{release}-filelist
-
-%clean
-%abstract_clean_script
diff --git a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/ChangeLog b/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/ChangeLog
deleted file mode 100644
index 78965ad..0000000
--- a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/ChangeLog
+++ /dev/null
@@ -1,28 +0,0 @@
-1999-09-15 Francis J. Lacoste <francis.lacoste(a)iNsu.COM>
-
- * IPv4Addr.pm: Corrected errors in the documentation.
-
- TAG: IPV4ADDR_0_05.
-
-1999-08-15 Francis J. Lacoste <francis.lacoste(a)iNsu.COM>
-
- * IPv4Addr.pm (ipv4_in_netwrok): Fixed broken logic
- of ipv4_in_network. It didn't handle
- correctly network which weren't of
- the same size.
-
- TAG: IPV4ADDR_0_04.
-
-1999-07-05 Francis J. Lacoste <francis.lacoste(a)iNsu.COM>
-
- * IPv4Addr.pm (ipv4_in_network): Added check for universal
- broadcast address (255.255.255.255) and
- no address (0.0.0.0).
-
- TAG: IPV4ADDR_0_03.
-
-1999-05-27 Francis J. Lacoste <francis.lacoste(a)iNsu.COM>
-
- * IPv4Addr.pm: (ipv4_parse) removed some undefined warnings.
- Updated version to 0.02.
-
diff --git a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/IPv4Addr.pm b/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/IPv4Addr.pm
deleted file mode 100644
index 15a0ea7..0000000
--- a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/IPv4Addr.pm
+++ /dev/null
@@ -1,384 +0,0 @@
-# IPv4Addr.pm - Perl module to manipulate IPv4 addresses.
-#
-# Author: Francis J. Lacoste <francis(a)Contre.COM>
-#
-# Copyright (C) 1999 Francis J. Lacoste, iNsu Innovations Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms as perl itself.
-#
-
-package Network::IPv4Addr;
-
-use strict;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-require Exporter;
-require AutoLoader;
-
-@ISA = qw(Exporter AutoLoader);
-
-# Items to export into callers namespace by default. Note: do not export
-# names by default without a very good reason. Use EXPORT_OK instead.
-# Do not simply export all your public functions/methods/constants.
-@EXPORT = qw();
-
-%EXPORT_TAGS = (
- all => [qw{ ipv4_parse ipv4_checkip
- ipv4_network ipv4_broadcast
- ipv4_cidr2msk ipv4_msk2cidr
- ipv4_in_network ipv4_dflt_netmask
- } ],
- );
-
-@EXPORT_OK = qw();
-
-Exporter::export_ok_tags('all');
-
-$VERSION = '0.05';
-
-# Preloaded methods go here.
-use Carp;
-
-# Functions to manipulate IPV4 address
-my $ip_rgx = "\\d+\\.\\d+\\.\\d+\\.\\d+";
-
-# Given an IPv4 address in host, ip/netmask or cidr format
-# returns a ip / cidr pair.
-sub ipv4_parse($;$) {
- my ($ip,$msk);
- # Called with 2 args, assume first is IP address
- if ( defined $_[1] ) {
- $ip = $_[0];
- $msk= $_[1];
- } else {
- ($ip) = $_[0] =~ /($ip_rgx)/o;
- ($msk) = $_[0] =~ m!/(.+)!o;
- }
-
- # Remove white spaces
- $ip = ipv4_chkip( $ip ) or
- croak __PACKAGE__, ": invalid IPv4 address: ", $ip, "\n";
- $msk =~ s/\s//g if defined $msk;
-
- # Check Netmask to see if it is a CIDR or Network
- if (defined $msk ) {
- if ($msk =~ /^\d{1,2}$/) {
- # Check cidr
- croak __PACKAGE__, ": invalid cidr: ", $msk, "\n"
- if $msk < 0 or $msk > 32;
- } elsif ($msk =~ /^$ip_rgx$/o ) {
- $msk = ipv4_msk2cidr($msk);
- } else {
- croak __PACKAGE__, ": invalid netmask specification: ", $msk, "\n";
- }
- } else {
- # Host
- return $ip;
- }
- wantarray ? ($ip,$msk) : "$ip/$msk";
-}
-
-sub ipv4_dflt_netmask($) {
- my ($ip) = ipv4_parse($_[0]);
-
- my ($b1) = split /\./, $ip;
-
- return "255.0.0.0" if $b1 <= 127;
- return "255.255.0.0" if $b1 <= 191;
- return "255.255.255.0";
-}
-
-# Check form a valid IPv4 address.
-sub ipv4_chkip($) {
- my ($ip) = $_[0] =~ /($ip_rgx)/o;
-
- return undef unless $ip;
-
- # Check that bytes are in range
- for (split /\./, $ip ) {
- return undef if $_ < 0 or $_ > 255;
- }
- return $ip;
-}
-
-# Transform a netmask in a CIDR mask length
-sub ipv4_msk2cidr($) {
- my $msk = ipv4_chkip( $_[0] )
- or croak __PACKAGE__, ": invalid netmask: ", $_[0], "\n";
-
- my @bytes = split /\./, $msk;
-
- my $cidr = 0;
- for (@bytes) {
- my $bits = unpack( "B*", pack( "C", $_ ) );
- $cidr += $bits =~ tr /1/1/;
- }
- return $cidr;
-}
-
-# Transform a CIDR mask length in a netmask
-sub ipv4_cidr2msk($) {
- my $cidr = shift;
- croak __PACKAGE__, ": invalid cidr: ", $cidr, "\n"
- if $cidr < 0 or $cidr > 32;
-
- my $bits = "1" x $cidr . "0" x (32 - $cidr);
-
- return join ".", (unpack 'CCCC', pack("B*", $bits ));
-}
-
-# Return the network address of
-# an IPv4 address
-sub ipv4_network($;$) {
- my ($ip,$cidr) = ipv4_parse( $_[0], $_[1] );
-
- # If only an host is given, use the default netmask
- unless ($cidr) {
- $cidr = ipv4_msk2cidr( ipv4_dflt_netmask($ip) );
- }
- my $u32 = unpack "N", pack "CCCC", split /\./, $ip;
- my $bits = "1" x $cidr . "0" x (32 - $cidr );
-
- my $msk = unpack "N", pack "B*", $bits;
-
- my $net = join ".", unpack "CCCC", pack "N", $u32 & $msk;
-
- wantarray ? ( $net, $cidr) : "$net/$cidr";
-}
-
-sub ipv4_broadcast($;$) {
- my ($ip,$cidr) = ipv4_parse( $_[0], $_[1] );
-
- # If only an host is given, use the default netmask
- unless ($cidr) {
- $cidr = ipv4_msk2cidr( ipv4_dflt_netmask($ip) );
- }
-
- my $u32 = unpack "N", pack "CCCC", split /\./, $ip;
- my $bits = "1" x $cidr . "0" x (32 - $cidr );
-
- my $msk = unpack "N", pack "B*", $bits;
-
- my $broadcast = join ".", unpack "CCCC", pack "N", $u32 | ~$msk;
-
- $broadcast;
-}
-
-sub ipv4_in_network($$;$$) {
- my ($ip1,$cidr1,$ip2,$cidr2);
- if ( @_ >= 3) {
- ($ip1,$cidr1) = ipv4_parse( $_[0], $_[1] );
- ($ip2,$cidr2) = ipv4_parse( $_[2], $_[3] );
- } else {
- ($ip1,$cidr1) = ipv4_parse( $_[0]);
- ($ip2,$cidr2) = ipv4_parse( $_[1]);
- }
-
- # Check for magic addresses.
- return 1 if $ip1 eq "255.255.255.255" or $ip1 eq "0.0.0.0";
- return 1 if $ip2 eq "255.255.255.255" or $ip2 eq "0.0.0.0";
-
- # Case where first argument is really an host
- return $ip1 eq $ip2 unless ($cidr1);
-
- # Case where second argument is an host
- if ( not defined $cidr2) {
- return ipv4_network( $ip1, $cidr1) eq ipv4_network( $ip2, $cidr1 );
- } elsif ( $cidr2 > $cidr1 ) {
- # Netmask 2 is more specific than netmask 1
- return ipv4_network( $ip1, $cidr2) eq ipv4_network( $ip2, $cidr2);
- } else {
- # Netmask 1 is more specific than netmask 2
- return ipv4_network( $ip1, $cidr1) eq ipv4_network( $ip2, $cidr1);
- }
-}
-# Autoload methods go after =cut, and are processed by the autosplit program.
-
-1;
-__END__
-# Below is the stub of documentation for your module. You better edit it!
-=pod
-
-=head1 NAME
-
-Network::IPv4Addr - Perl extension for manipulating IPv4 addresses.
-
-=head1 SYNOPSIS
-
- use Network::IPv4Addr qw( :all );
-
- my ($ip,$cidr) = ipv4_parse( "127.0.0.1/24" );
- my ($ip,$cidr) = ipv4_parse( "192.168.100.10 / 255.255.255.0" );
-
- my ($net,$msk) = ipv4_network( "192.168.100.30" );
-
- my $broadcast = ipv4_broadcast( "192.168.100.30/26" );
-
- if ( ipv4_in_network( "192.168.100.0", $her_ip ) ) {
- print "Welcome !";
- }
-
- etc.
-
-=head1 DESCRIPTION
-
-Network::IPv4Addr provides functions for parsing IPv4 addresses both
-in traditional address/netmask format and in the new CIDR format.
-There are also methods for calculating the network and broadcast
-address and also to see check if a given address is in a specific
-network.
-
-=head1 ADDRESSES
-
-All of Network::IPv4Addr functions accepts addresses in many
-format. The parsing is very liberal.
-
-All these addresses would be accepted:
-
- 127.0.0.1
- 192.168.001.010/24
- 192.168.10.10/255.255.255.0
- 192.168.30.10 / 21
- 10.0.0.0 / 255.0.0.0
- 255.255.0.0
-
-Those wouldn't though:
-
- 272.135.234.0
- 192.168/16
-
-Most functions accepts the address and netmask or masklength in the
-same scalar value or as separate values. That is either
-
- my($ip,$masklength) = ipv4_parse($cidr_str);
- my($ip,$masklength) = ipv4_parse($ip_str,$msk_str);
-
-=head1 USING
-
-No functions are exported by default. Either use the C<:all> tag
-to import them all or explicitly import those you need.
-
-=head1 FUNCTIONS
-
-=over
-
-=item ipv4_parse
-
- my ($ip,$msklen) = ipv4_parse($cidr_str);
- my $cidr = ipv4_parse($ip_str,$msk_str);
- my ($ip) = ipv4_parse($ip_str,$msk_str);
-
-Parse an IPv4 address and in scalar context the address in CIDR
-format and in an array context the address and the mask length.
-
-If the parameters doesn't contains a netmask or a mask length,
-in scalar context only the IPv4 address is returned and in an
-array context the mask length is undefined.
-
-If the function cannot parse its input, it croaks. Trap it using
-C<eval> if don't like that.
-
-=item ipv4_network
-
- my $cidr = ipv4_network($ip_str);
- my $cidr = ipv4_network($cidr_str);
- my ($net,$msk) = ipv4_network( $net_str, $msk_str);
-
-In scalar context, this function returns the network in CIDR format in
-which the address is. In array context, it returns the network address and
-its mask length as a two elements array. If the input is an host without
-a netmask of mask length, the default netmask is assumed.
-
-Again, the function croak if the input is invalid.
-
-=item ipv4_broadcast
-
- my ($broadcast) = ipv4_broadcast($ip_str);
- my $broadcast = ipv4_broadcast($ip_str,$msk_str);
-
-This function returns the broadcast address. If the input doesn't
-contains a netmask or mask length, the default netmask is assumed.
-
-This function croaks if the input is invalid.
-
-=item ipv4_network
-
- my $cidr = ipv4_network($net_str);
- my $cidr = ipv4_network($cidr_sstr);
- my ($net,$msk) = ipv4_network( $ip_str, $mask_str);
-
-In scalar context, this function returns the network in CIDR format in
-which the address is. In array context, it returns the network address and
-its mask length as a two elements array. If the input is an host without
-a netmask or mask length, the default netmask is assumed.
-
-Again, the function croak if the input is invalid.
-
-=item ipv4_in_network
-
- print "Yes" if ipv4_in_network( $cidr_str1, $cidr_str2);
- print "Yes" if ipv4_in_network( $ip_str1, $mask_str1, $cidr_str2 );
- print "Yes" if ipv4_in_network( $ip1, $mask1, $ip2, $msk2 );
-
-This function checks if the second network is contained in
-the first one and it implements the following semantics :
-
- If net1 or net2 is a magic address (0.0.0.0 or 255.255.255.255)
- than this function returns true.
-
- If net1 is an host, net2 will be in the same net only if
- it is the same host.
-
- If net2 is an host, it will be contained in net1 only if
- it is part of net1.
-
- If net2 is only part of net1 if it is entirely contained in
- net1.
-
-Trap bad input with C<eval> or else.
-
-=item ipv4_checkip
-
- if ($ip = ipv4_checkip($str) ) {
- # Do something
- }
-
-Return the IPv4 address in the string or undef if the input
-doesn't contains a valid IPv4 address.
-
-=item ipv4_cidr2msk
-
- my $netmask = ipv4_cidr2msk( $cidr );
-
-Returns the netmask corresponding to the mask length given in input.
-As usual, croaks if it doesn't like your input (in this case a number
-between 0 and 32).
-
-=item ipv4_msk2cidr
-
- my $masklen = ipv4_msk2cidr( $msk );
-
-Returns the mask length of the netmask in input. As usual, croaks if it
-doesn't like your input.
-
-=back
-
-=head1 AUTHOR
-
-Francis J. Lacoste francis.lacoste(a)iNsu.COM
-
-=head1 COPYRIGHT
-
-Copyright (c) 1999 Francis J. Lacoste and iNsu Innovations Inc.
-All rights reserved.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms as perl itself.
-
-=head1 SEE ALSO
-
-perl(1) ipv4calc(1).
-
-=cut
-
diff --git a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/IPv4Addr.spec b/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/IPv4Addr.spec
deleted file mode 100644
index 7fa2b0b..0000000
--- a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/IPv4Addr.spec
+++ /dev/null
@@ -1,81 +0,0 @@
-Summary: Perl modules to manipulates Ipv4 addresses.
-Name: Network-IPv4Addr
-Version: 0.05
-Release: 1i
-Source: http://iNDev.iNsu.COM/IPv4Addr/%{name}-%{version}.tar.gz
-Copyright: GPL or Artistic License
-Group: Development/Libraries/Perl
-Prefix: /usr
-URL: http://iNDev.iNsu.COM/IPv4Addr/
-BuildRoot: /var/tmp/%{name}-%{version}
-BuildArchitectures: noarch
-Requires: perl
-
-%description
-Network::IPv4Addr provides methods for parsing IPv4
-addresses both in traditional address/netmask format and
-in the new CIDR format. There are also methods for
-calculating the network and broadcast address and also to
-see check if a given address is in a specific network.
-
-%prep
-%setup -q
-# Update all path to the perl interpreter
-find -type f -exec sh -c 'if head -c 100 $0 | grep -q "^#!.*perl"; then \
- perl -p -i -e "s|^#!.*perl|#!/usr/bin/perl|g" $0; fi' {} \;
-
-%build
-perl Makefile.PL
-make OPTIMIZE="$RPM_OPT_FLAGS"
-make test
-
-%install
-rm -fr $RPM_BUILD_ROOT
-eval `perl '-V:installarchlib'`
-mkdir -p $RPM_BUILD_ROOT/$installarchlib
-make PREFIX=$RPM_BUILD_ROOT/usr \
- INSTALLMAN1DIR=$RPM_BUILD_ROOT/usr/man/man1 \
- INSTALLMAN3DIR=$RPM_BUILD_ROOT/`dirname $installarchlib`/man/man3 \
- pure_install
-
-# Fix packing list
-for packlist in `find $RPM_BUILD_ROOT -name '.packlist'`; do
- mv $packlist $packlist.old
- sed -e "s|$RPM_BUILD_ROOT||g" < $packlist.old > $packlist
- rm -f $packlist.old
-done
-
-# Make a file list
-find $RPM_BUILD_ROOT -type f -o -type l | \
- grep -v perllocal.pod | \
- sed -e "s|$RPM_BUILD_ROOT||g" > %{name}-file-list
-perl -n -i -e 'print "%doc " if m!man/man|\.pod!; print; ' %{name}-file-list
-
-%clean
-rm -fr $RPM_BUILD_ROOT
-
-%files -f %{name}-file-list
-%defattr(-,root,root)
-%doc README ChangeLog
-
-%changelog
-* Wed Sep 15 1999 Francis J. Lacoste <francis.lacoste(a)iNsu.COM>
- [0.05-1i]
-- Updated to version 0.05.
-
-* Sun Aug 15 1999 Francis J. Lacoste <francis.lacoste(a)iNsu.COM>
- [0.04-1i]
-- Updated to version 0.04.
-
-* Mon Jul 05 1999 Francis J. Lacoste <francis.lacoste(a)iNsu.COM>
- [0.03-1i]
-- Updated to version 0.03.
-
-* Sat May 15 1999 Francis J. Lacoste <francis(a)iNsu.COM>
- [0.02-2i]
-- Updated to version 0.02.
-
-* Sat May 15 1999 Francis J. Lacoste <francis(a)iNsu.COM>
- [0.01-1i]
-- First RPM release.
-
diff --git a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/MANIFEST b/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/MANIFEST
deleted file mode 100644
index d53bca3..0000000
--- a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/MANIFEST
+++ /dev/null
@@ -1,8 +0,0 @@
-README
-ChangeLog
-IPv4Addr.pm
-MANIFEST
-Makefile.PL
-test.pl
-IPv4Addr.spec
-ipv4calc
diff --git a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/Makefile.PL b/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/Makefile.PL
deleted file mode 100644
index 3b8d5c6..0000000
--- a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/Makefile.PL
+++ /dev/null
@@ -1,8 +0,0 @@
-use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
-WriteMakefile(
- 'NAME' => 'Network::IPv4Addr',
- 'VERSION_FROM' => 'IPv4Addr.pm', # finds $VERSION
- 'EXE_FILES' => [ ipv4calc ],
-);
diff --git a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/README b/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/README
deleted file mode 100644
index 8657885..0000000
--- a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/README
+++ /dev/null
@@ -1,43 +0,0 @@
-Network::IPv4Addr
-=================
-
-Version: 0.05
-
-Description
------------
-
-Network::IPv4Addr provides functions for parsing IPv4 addresses both
-in traditional address/netmask format and in the new CIDR format.
-There are also methods for calculating the network and broadcast
-address and also to see check if a given address is in a specific
-network.
-
-Installing
-----------
-
-The usual:
-
- perl Makefile.PL
- make
- make install
-
-Initial Release
-----------------
-
-Although this is the first release, I don't have more plans
-for this modules, unless someone sends me interesting
-suggestions.
-
-Bugs
-----
-
-Send bug reports and suggestions to francis.lacoste(a)iNsu.COM.
-
-Copyright
----------
-
-Copyright (c) 1999 Francis J. Lacoste and iNsu Innovations Inc .
-All rights reserved.
-
-This package is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
diff --git a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/ipv4calc b/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/ipv4calc
deleted file mode 100644
index a5d6899..0000000
--- a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/ipv4calc
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use Network::IPv4Addr qw (:all);
-use Getopt::Long;
-
-my %opts = ();
-
-sub usage() {
- die <<EOU;
-usage: ipv4calc [--network | --broadcast | --netmask |
- --cidr | --address ] addr
-EOU
-}
-
-GetOptions( \%opts, "network", "broadcast", "netmask", "cidr", "address")
- or usage;
-
-my $str = shift;
-$str or usage;
-
-my ($ip,$cidr) = ipv4_parse($str);
-my ($network,$msk) = ipv4_network($ip,$cidr);
-my ($broadcast) = ipv4_broadcast($ip,$cidr);
-
-if ( $opts{network}) {
- print $network,"\n";
-} elsif ($opts{broadcast}) {
- print $broadcast,"\n";
-} elsif ( $opts{netmask} ) {
- print ipv4_cidr2msk( $msk ), "\n";
-} elsif ( $opts{address} ) {
- print $ip, "\n";
-} elsif ( $opts{cidr} ) {
- print $msk, "\n";
-} else {
- print <<EOF;
-Host: $ip
-Network: $network/$msk
-Broadcast: $broadcast
-EOF
-}
-
-1;
-
-__END__
-# Below is the stub of documentation for your module. You better edit it!
-=pod
-
-=head1 NAME
-
- ipv4calc - Calculates IPv4 elements from an address.
-
-=head1 SYNOPSIS
-
- ipv4calc [ --network | --broadcast | --netmask |
- --address | --cidr ] addr
-
-=head1 DESCRIPTION
-
-If an option is specified B<ipv4calc> calculates the requested element
-from the address and prints it on stdout.
-
-If multiple options are specified, only the first one is printed.
-
-If no options are specified, the program prints the host part of the
-address, the network and the broadcast address as deduced from the
-given address.
-
-If address doesn't contains a netmask or mask length, the default
-one is assumed.
-
-=head1 AUTHOR
-
-Francis J. Lacoste <francis.lacoste(a)iNsu.COM>
-
-=head1 COPYRIGHT
-
-Copyright (c) 1999 Francis J. Lacoste and iNsu Innovations Inc.
-All rights reserved.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms as perl itself.
-
-=head1 SEE ALSO
-
-Network::IPv4Addr(3).
-
-=cut
diff --git a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/test.pl b/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/test.pl
deleted file mode 100644
index 065f993..0000000
--- a/monitoring/PerlModules/CPAN/Network-IPv4Addr-0.05/test.pl
+++ /dev/null
@@ -1,66 +0,0 @@
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl test.pl'
-
-use strict;
-use Test;
-
-# Change 1..1 below to 1..last_test_to_print .
-# (It may become useful if the test is moved to ./t subdirectory.)
-
-BEGIN { plan tests => 37 }
-use Network::IPv4Addr qw(/^ipv4/);
-
-
-# ipv4_parse
-ok( scalar ipv4_parse( "127.0.0.1" ), "127.0.0.1" );
-ok( scalar ipv4_parse( "192.168.100.1 / 24" ), "192.168.100.1/24" );
-ok( scalar ipv4_parse( "130.10.2.10", "255.255.255.0"), "130.10.2.10/24");
-ok( scalar ipv4_parse( "130.10.2.10", "255.255.255.240"), "130.10.2.10/28");
-ok( scalar ipv4_parse( "130.10.2.10/28"), "130.10.2.10/28");
-
-# ipv4_dftl_netmask
-ok( ipv4_dflt_netmask( "127.0.0.1" ), "255.0.0.0" );
-ok( ipv4_dflt_netmask( "172.0.0.01" ), "255.255.0.0" );
-ok( ipv4_dflt_netmask( "198.0.0.20" ), "255.255.255.0" );
-
-# ipv4_network
-ok( scalar ipv4_network( "127.0.0.1"), "127.0.0.0/8" );
-ok( scalar ipv4_network( "192.168.100.10" ), "192.168.100.0/24" );
-ok( scalar ipv4_network( "192.168.100.100/255.255.255.192"), "192.168.100.64/26" );
-
-# ipv4_broadcast
-ok( ipv4_broadcast( "127.0.0.1"), "127.255.255.255" );
-ok( ipv4_broadcast( "192.168.100.10/24" ), "192.168.100.255" );
-ok( ipv4_broadcast( "192.168.100.100/255.255.255.192"), "192.168.100.127" );
-
-# ipv4_in_network
-ok( ipv4_in_network( "127.0.0.1", "127.0.0.1" ) );
-ok( not ipv4_in_network( "127.0.0.0/8", "192.168.30.1" ));
-ok( not ipv4_in_network( "192.168.100.10", "192.168.100.30"));
-ok( ipv4_in_network( "192.168.100.10/24", "192.168.100.255"));
-ok( ipv4_in_network( "192.168.100.0/24", "192.168.100.0"));
-ok( not ipv4_in_network( "192.16.100.63/26", "192.168.100.65"));
-ok( ipv4_in_network( "192.168.100.0/24", "0.0.0.0" ) );
-ok( ipv4_in_network( "192.168.100.0/24", "255.255.255.255" ) );
-ok( ipv4_in_network( "0.0.0.0", "192.168.1.1" ) );
-ok( ipv4_in_network( "255.255.255.255", "192.176.1.8" ) );
-ok( ipv4_in_network( "192.168.199.0/30", "192.168.199.1" ) );
-
-# ipv4_cidr2msk
-ok( ipv4_cidr2msk( 24 ), "255.255.255.0" );
-ok( ipv4_cidr2msk( 16 ), "255.255.0.0" );
-ok( ipv4_cidr2msk( 8 ), "255.0.0.0" );
-ok( ipv4_cidr2msk( 26 ), "255.255.255.192" );
-ok( ipv4_cidr2msk( 0 ), "0.0.0.0" );
-ok( ipv4_cidr2msk( 32 ), "255.255.255.255" );
-
-# ipv4_msk2cidr
-ok( ipv4_msk2cidr( "255.255.255.0" ), 24);
-ok( ipv4_msk2cidr( "255.255.0.0" ), 16 );
-ok( ipv4_msk2cidr( "255.0.0.0" ), 8 );
-ok( ipv4_msk2cidr( "255.255.255.192" ), 26 );
-ok( ipv4_msk2cidr( "0.0.0.0" ), 0 );
-ok( ipv4_msk2cidr( "255.255.255.255" ), 32 );
-
-
-
14 years, 7 months
Changes to 'refs/tags/spacewalk-java-0.6.46-1'
by Justin Sherrill
Tag 'spacewalk-java-0.6.46-1' created by Justin Sherrill <jsherril(a)redhat.com> at 2009-08-24 18:46 +0000
Tagging package [spacewalk-java] version [0.6.46-1] in directory [java/].
Changes since spacewalk-java-0.6.45-1:
Justin Sherrill (1):
Automatic commit of package [spacewalk-java] release [0.6.46-1].
Mark Chappell (1):
Log files should be ghosted rather than belonging to a package
---
client/solaris/rhnclient/rhnclient.spec | 2 +-
java/spacewalk-java.spec | 6 +++---
rel-eng/packages/spacewalk-java | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
---
14 years, 7 months
Branch 'SPACEWALK-0.6' - java/spacewalk-java.spec rel-eng/packages
by Justin Sherrill
java/spacewalk-java.spec | 4 ++--
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 29298d90d603c6fd1b697ab7e35b3dad18d1d264
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Aug 24 14:46:41 2009 -0400
Automatic commit of package [spacewalk-java] release [0.6.46-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 5230685..42ced3b 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.6.45
+Version: 0.6.46
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -257,7 +257,7 @@ fi
%attr(644, root, root) %{_datadir}/rhn/lib/rhn.jar
%changelog
-* Mon Aug 24 2009 Justin Sherrill <jsherril(a)redhat.com> 0.6.45-1
+* Mon Aug 24 2009 Justin Sherrill <jsherril(a)redhat.com> 0.6.46-1
- 518342 - adding workaround for RHEL5u4 bug failing to register when dbus and
hal are not running (jsherril(a)redhat.com)
- new way of waiting on process for RepoSync task. This method read all
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 0b8a29e..be85bec 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.6.45-1 java/
+0.6.46-1 java/
14 years, 7 months
Branch 'SPACEWALK-0.6' - client/solaris java/spacewalk-java.spec
by Justin Sherrill
client/solaris/rhnclient/rhnclient.spec | 2 +-
java/spacewalk-java.spec | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 0920a2e3add36e14800ac3935434ded1cec47ee4
Author: Mark Chappell <m.d.chappell(a)bath.ac.uk>
Date: Thu Aug 20 15:28:28 2009 +0100
Log files should be ghosted rather than belonging to a package
diff --git a/client/solaris/rhnclient/rhnclient.spec b/client/solaris/rhnclient/rhnclient.spec
index 3b3afa0..4ce4cb2 100644
--- a/client/solaris/rhnclient/rhnclient.spec
+++ b/client/solaris/rhnclient/rhnclient.spec
@@ -58,7 +58,7 @@ rm -rf $RPM_BUILD_ROOT
%{shareroot}/rhn/*
/usr/sbin/*
%{rhnconf}/*
-/var/log/up2date
+%ghost /var/log/up2date
/var/run/.keep
%defattr(0744,root,sys)
/etc/init.d/rhnsd
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index b562d45..5230685 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -238,7 +238,7 @@ fi
%config(noreplace) %{_sysconfdir}/tomcat5/Catalina/localhost/rhn.xml
%{realcobsnippetsdir}/spacewalk
%attr(755, apache, root) %{_var}/satellite/systemlogs
-%attr(644, tomcat, root) %{_var}/satellite/systemlogs/audit-review.log
+%ghost %attr(644, tomcat, root) %{_var}/satellite/systemlogs/audit-review.log
%files -n spacewalk-taskomatic
%attr(755, root, root) %{_initrddir}/taskomatic
14 years, 7 months
Changes to 'refs/tags/spacewalk-java-0.6.45-1'
by Justin Sherrill
Tag 'spacewalk-java-0.6.45-1' created by Justin Sherrill <jsherril(a)redhat.com> at 2009-08-24 17:57 +0000
Tagging package [spacewalk-java] version [0.6.45-1] in directory [java/].
Changes since rhn-client-tools-0.6.3-1:
Justin Sherrill (3):
new way of waiting on process for RepoSync task. Hopefully this does not bail out after a long time
518342 - adding workaround for RHEL5u4 bug failing to register when dbus and hal are not running
Automatic commit of package [spacewalk-java] release [0.6.45-1].
---
java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java | 5 +++++
java/code/src/com/redhat/rhn/taskomatic/task/RepoSyncTask.java | 6 +++++-
java/spacewalk-java.spec | 8 +++++++-
rel-eng/packages/spacewalk-java | 2 +-
4 files changed, 18 insertions(+), 3 deletions(-)
---
14 years, 7 months
Branch 'SPACEWALK-0.6' - java/spacewalk-java.spec rel-eng/packages
by Justin Sherrill
java/spacewalk-java.spec | 8 +++++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
New commits:
commit b75d73978a27b55fa66201a26250c212b12169c9
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Aug 24 13:57:48 2009 -0400
Automatic commit of package [spacewalk-java] release [0.6.45-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 8c3bd38..b562d45 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.6.44
+Version: 0.6.45
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -257,6 +257,12 @@ fi
%attr(644, root, root) %{_datadir}/rhn/lib/rhn.jar
%changelog
+* Mon Aug 24 2009 Justin Sherrill <jsherril(a)redhat.com> 0.6.45-1
+- 518342 - adding workaround for RHEL5u4 bug failing to register when dbus and
+ hal are not running (jsherril(a)redhat.com)
+- new way of waiting on process for RepoSync task. This method read all
+ standard out, hopefully not filling the buffer (jsherril(a)redhat.com)
+
* Wed Aug 19 2009 jesus m. rodriguez <jesusr(a)redhat.com> 0.6.44-1
- adding config option for disabling the ability to access child channel repo
through kickstart (jsherril(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 5cd6bb7..0b8a29e 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.6.44-1 java/
+0.6.45-1 java/
14 years, 7 months
Branch 'SPACEWALK-0.6' - 2 commits - java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java | 5 +++++
java/code/src/com/redhat/rhn/taskomatic/task/RepoSyncTask.java | 6 +++++-
2 files changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 3801b0bfd244ac3170f1a841303c5b3c717dc82a
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Aug 19 19:20:30 2009 -0400
518342 - adding workaround for RHEL5u4 bug failing to register when dbus and hal are not running
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
index b19e112..dc94a64 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
@@ -682,6 +682,11 @@ public class KickstartFormatter {
retval.append(KSTREE);
retval.append(NEWLINE);
+ //RHEL 5u4 hack for bz 495680
+ if (ksdata.isRhel5()) {
+ retval.append("/etc/init.d/messagebus restart" + NEWLINE);
+ retval.append("/etc/init.d/haldaemon restart" + NEWLINE);
+ }
retval.append("# begin cobbler snippet" + NEWLINE);
retval.append("$SNIPPET('redhat_register')" + NEWLINE);
retval.append("# end cobbler snippet" + NEWLINE);
commit 90eac7ecae4919d091afb6c6434e8602de525890
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu Aug 20 13:08:40 2009 -0400
new way of waiting on process for RepoSync task. Hopefully this does not bail out after a long time
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/RepoSyncTask.java b/java/code/src/com/redhat/rhn/taskomatic/task/RepoSyncTask.java
index 57b9f8b..4d32ff8 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/RepoSyncTask.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/RepoSyncTask.java
@@ -81,7 +81,11 @@ public class RepoSyncTask implements Job {
Process p = Runtime.getRuntime().exec(
getSyncCommand(src).toArray(new String[0]));
src.setLastSynced(new Date());
- p.waitFor();
+ int chr = p.getInputStream().read();
+ while (chr != -1) {
+ Thread.sleep(10000);
+ chr = p.getInputStream().read();
+ }
}
catch (IOException e) {
14 years, 7 months
client/solaris
by Jan Pazdziora
client/solaris/rhnclient/rhnclient.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit ed2d833b38c035d3f252e3a37bf7294448b8e2bc
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Aug 24 11:57:00 2009 +0200
Reverting the client/solaris/rhnclient/rhnclient.spec part of the patch.
diff --git a/client/solaris/rhnclient/rhnclient.spec b/client/solaris/rhnclient/rhnclient.spec
index 4ce4cb2..3b3afa0 100644
--- a/client/solaris/rhnclient/rhnclient.spec
+++ b/client/solaris/rhnclient/rhnclient.spec
@@ -58,7 +58,7 @@ rm -rf $RPM_BUILD_ROOT
%{shareroot}/rhn/*
/usr/sbin/*
%{rhnconf}/*
-%ghost /var/log/up2date
+/var/log/up2date
/var/run/.keep
%defattr(0744,root,sys)
/etc/init.d/rhnsd
14 years, 7 months
Changes to 'refs/tags/rhn-client-tools-0.6.3-1'
by Pradeep Kilambi
Tag 'rhn-client-tools-0.6.3-1' created by Pradeep Kilambi <pkilambi(a)redhat.com> at 2009-08-20 19:45 +0000
Tagging package [rhn-client-tools] version [0.6.3-1] in directory [client/rhel/rhn-client-tools/].
Changes since spacewalk-java-0.6.44-1:
Pradeep Kilambi (2):
518336 - if hal or messagebus is not accessible log the error and proceed with rest of the registration.
Automatic commit of package [rhn-client-tools] release [0.6.3-1].
---
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6 ++++-
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 14 +++++++-----
rel-eng/packages/rhn-client-tools | 2 -
3 files changed, 15 insertions(+), 7 deletions(-)
---
14 years, 7 months
Branch 'SPACEWALK-0.6' - client/rhel rel-eng/packages
by Pradeep Kilambi
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6 +++++-
rel-eng/packages/rhn-client-tools | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 39d38d9063fdf92d6b95e353379f1524238afc7d
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Aug 20 15:45:23 2009 -0400
Automatic commit of package [rhn-client-tools] release [0.6.3-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index ad972bd..4739984 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -4,7 +4,7 @@ Group: System Environment/Base
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
URL: https://fedorahosted.org/spacewalk
Name: rhn-client-tools
-Version: 0.6.2
+Version: 0.6.3
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -204,6 +204,10 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/applications/rhn_register.desktop
%changelog
+* Thu Aug 20 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 0.6.3-1
+- 518336 - if hal or messagebus is not accessible log the error and proceed
+ with rest of the registration. (pkilambi(a)redhat.com)
+
* Wed Aug 05 2009 John Matthews <jmatthew(a)redhat.com> 0.6.2-1
- 494019 - Fixing the registration on python 2.6 to not include dbus.String
objects in hardware profile as new xmlrpclib _dump method validates based on
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 624e94b..4a51b37 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-0.6.2-1 client/rhel/rhn-client-tools/
+0.6.3-1 client/rhel/rhn-client-tools/
14 years, 7 months