Hello community,
here is the log from the commit of package perl-BSD-Resource
checked in at Wed Jul 12 20:47:24 CEST 2006.
--------
--- perl-BSD-Resource/perl-BSD-Resource.changes 2006-01-25 21:39:29.000000000 +0100
+++ perl-BSD-Resource/perl-BSD-Resource.changes 2006-07-12 14:07:32.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Jul 12 14:06:48 CEST 2006 - anicka@suse.cz
+
+- update to 1.28
+ * many bugfixes added
+- remove unneccessary test patch
+
+-------------------------------------------------------------------
Old:
----
BSD-Resource-1.24-test.diff
BSD-Resource-1.24.tar.bz2
New:
----
BSD-Resource-1.28.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-BSD-Resource.spec ++++++
--- /var/tmp/diff_new_pack.sTqiqx/_old 2006-07-12 20:45:37.000000000 +0200
+++ /var/tmp/diff_new_pack.sTqiqx/_new 2006-07-12 20:45:37.000000000 +0200
@@ -1,17 +1,17 @@
#
-# spec file for package perl-BSD-Resource (Version 1.24)
+# spec file for package perl-BSD-Resource (Version 1.28)
#
-# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-# Please submit bugfixes or comments via http://bugs.opensuse.org
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: perl-BSD-Resource
-Version: 1.24
-Release: 5
+Version: 1.28
+Release: 1
Requires: perl = %{perl_version}
Autoreqprov: on
Group: Development/Libraries/Perl
@@ -19,7 +19,6 @@
URL: http://cpan.org/modules/by-module/BSD
Summary: BSD::Resource Perl Module
Source: BSD-Resource-%{version}.tar.bz2
-Patch: BSD-Resource-%{version}-test.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -34,7 +33,6 @@
%prep
%setup -q -n BSD-Resource-%{version}
-%patch
%build
perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
@@ -60,6 +58,10 @@
/var/adm/perl-modules/%{name}
%changelog -n perl-BSD-Resource
+* Wed Jul 12 2006 - anicka@suse.cz
+- update to 1.28
+ * many bugfixes added
+- remove unneccessary test patch
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Nov 15 2005 - uli@suse.de
++++++ BSD-Resource-1.24.tar.bz2 -> BSD-Resource-1.28.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/BSD-Resource-1.24/ChangeLog new/BSD-Resource-1.28/ChangeLog
--- old/BSD-Resource-1.24/ChangeLog 2004-02-29 16:03:31.000000000 +0100
+++ new/BSD-Resource-1.28/ChangeLog 2006-05-26 21:57:32.000000000 +0200
@@ -1,3 +1,49 @@
+2006-05-26 Jarkko Hietaniemi
+
+ * Tweak the regexp parsing the ps -o output in setpriority.t,
+ from Alexey Tourbin and Rafael Garcia-Suarez. Still just
+ a best-effort attempt, but one can only try.
+
+ * Release 1.28.
+
+2006-05-25 Jarkko Hietaniemi
+
+ * Address rt.cpan.org #13130 and #19412: try to cope with
+ an already reniced shell running the setpriority.t. The
+ tricks used are trying "ps -o pid,nice" and looking for $$,
+ and if that fails, then trying whether the nice(1) is the
+ GNU one, and if so, running it without arguments.
+
+ * Release 1.27.
+
+2006-05-21 Jarkko Hietaniemi
+
+ * Address rt.cpan.org #19298: bug in getrusage(): 'inblock' was
+ misspelt as 'inlock' (the end result being that people looking
+ for the 'inblock' field got zero)
+
+ * For Mac OS X reword the message about the RLIM_NPROC test failure
+ (or rather, the possible failure). Still a mystery under what
+ exact conditions the test fails or succeeds.
+
+ * Add Test::Pod and Test::Pod::Coverage tests.
+
+ * Release 1.26.
+
+2006-04-09 Jarkko Hietaniemi
+
+ * Address rt.cpan.org #13131: setrlimit.t tries to increase hard
+ limits, cannot raise limits higher than the hard limit.
+
+ * Address rt.cpan.org #13130: getpriority.t and setpriority.t
+ assume priority = 0, solution hopefully portable. Now should
+ work under e.g. "nice make test".
+
+ * Add more verbosity to the case of the known rlimit.t test
+ failure in Mac OS X.
+
+ * Release 1.25.
+
Sun Feb 29 16:51:34 2004 Jarkko Hietaniemi
* No functional changes but document the known fact that
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/BSD-Resource-1.24/MANIFEST new/BSD-Resource-1.28/MANIFEST
--- old/BSD-Resource-1.24/MANIFEST 2003-10-07 21:01:05.000000000 +0200
+++ new/BSD-Resource-1.28/MANIFEST 2006-05-21 10:01:45.000000000 +0200
@@ -6,6 +6,8 @@
t/getrlimit.t
t/setrlimit.t
t/getpriority.t
+t/pod.t
+t/pod-coverage.t
t/setpriority.t
t/times.t
README
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/BSD-Resource-1.24/META.yml new/BSD-Resource-1.28/META.yml
--- old/BSD-Resource-1.24/META.yml 2004-02-29 16:08:10.000000000 +0100
+++ new/BSD-Resource-1.28/META.yml 2006-05-26 22:13:04.000000000 +0200
@@ -1,10 +1,10 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: BSD-Resource
-version: 1.24
+version: 1.28
version_from: Resource.pm
installdirs: site
requires:
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+generated_by: ExtUtils::MakeMaker version 6.30
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/BSD-Resource-1.24/Resource.pm new/BSD-Resource-1.28/Resource.pm
--- old/BSD-Resource-1.24/Resource.pm 2004-02-29 16:07:48.000000000 +0100
+++ new/BSD-Resource-1.28/Resource.pm 2006-05-26 21:54:08.000000000 +0200
@@ -13,7 +13,7 @@
use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD $VERSION);
-$VERSION = '1.24';
+$VERSION = '1.28';
use Carp;
use AutoLoader;
@@ -461,10 +461,12 @@
In B<HP-UX> the getrusage() is not Officially Supported at all but for
the time being, it does seem to be.
-In Mac OS X 10.3.2 (and probably earlier) the t/setrlimit.t subtest #8
-will fail because of bug(s?) in the setrlimit/getrlimit functionality,
-setting/getting resource limits on the maximum number of processes
-(RLIM_NPROC) behaves nonsensically. The bug has been reported to Apple.
+In Mac OS X releases from 10.3.2 (and probably earlier) to at least
+10.4.6 the t/setrlimit.t subtest #9 will fail because of bug(s?) in
+the setrlimit/getrlimit functionality, setting/getting resource limits
+on the maximum number of processes (RLIM_NPROC) behaves nonsensically
+(sometimes it works, sometimes it doesn't). The bug has been reported
+to Apple.
Because not all UNIX kernels are BSD and also because of the sloppy
support of getrusage() by many vendors many of the getrusage() values
@@ -505,7 +507,7 @@
my $key;
for $key (qw(utime stime maxrss ixrss idrss isrss minflt majflt nswap
- inlock oublock msgsnd msgrcv nsignals nvcsw nivcsw)) {
+ inblock oublock msgsnd msgrcv nsignals nvcsw nivcsw)) {
$rusage->{$key} = shift(@rusage);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/BSD-Resource-1.24/t/getpriority.t new/BSD-Resource-1.28/t/getpriority.t
--- old/BSD-Resource-1.24/t/getpriority.t 1997-04-08 08:54:17.000000000 +0200
+++ new/BSD-Resource-1.28/t/getpriority.t 2006-04-09 12:59:10.000000000 +0200
@@ -4,36 +4,35 @@
use BSD::Resource;
-use Config;
-
$debug = 1;
print "1..3\n";
# AIX without BSD libs has 0..39 priorities, not -20..20.
-$okpriopat = $Config{'osname'} eq 'aix' ? '0|19' : '0';
-$okpriopat = "^($okpriopat)";
+my $okpriosub_std = sub { -20 <= $_[0] && $_[0] <= 20 };
+my $okpriosub_aix = sub { 0 <= $_[0] && $_[0] <= 39 };
+my $okpriosub = sub { &$okpriosub_std($_[0]) || ($^O eq 'aix' && &$okpriosub_aix($_[0]))};
$nowprio1 = getpriority(PRIO_PROCESS, 0);
print "# nowprio1 = $nowprio1\n" if ($debug);
-print 'not ' unless ($nowprio1 =~ /$okpriopat/);
+print 'not ' unless (&$okpriosub($nowprio1));
print "ok 1\n";
$nowprio2 = getpriority(PRIO_PROCESS);
print "# nowprio2 = $nowprio2\n" if ($debug);
-print 'not ' unless ($nowprio2 =~ /$okpriopat/ and $nowprio1 == $nowprio2);
+print 'not ' unless ($nowprio1 == $nowprio2 && &$okpriosub($nowprio2));
print "ok 2\n";
$nowprio3 = getpriority();
print "# nowprio3 = $nowprio3\n" if ($debug);
-print 'not ' unless ($nowprio3 =~ /$okpriopat/ and $nowprio2 == $nowprio3);
+print 'not ' unless ($nowprio2 == $nowprio3 && &$okpriosub($nowprio3));
print "ok 3\n";
# eof
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/BSD-Resource-1.24/t/pod-coverage.t new/BSD-Resource-1.28/t/pod-coverage.t
--- old/BSD-Resource-1.24/t/pod-coverage.t 1970-01-01 01:00:00.000000000 +0100
+++ new/BSD-Resource-1.28/t/pod-coverage.t 2006-05-21 09:58:55.000000000 +0200
@@ -0,0 +1,6 @@
+use Test::More;
+eval "use Test::Pod::Coverage 1.00";
+plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@;
+all_pod_coverage_ok({ also_private => [ qr/^constant$/ ] });
+
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/BSD-Resource-1.24/t/pod.t new/BSD-Resource-1.28/t/pod.t
--- old/BSD-Resource-1.24/t/pod.t 1970-01-01 01:00:00.000000000 +0100
+++ new/BSD-Resource-1.28/t/pod.t 2006-05-21 09:41:58.000000000 +0200
@@ -0,0 +1,4 @@
+use Test::More;
+eval "use Test::Pod 1.00";
+plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
+all_pod_files_ok();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/BSD-Resource-1.24/t/setpriority.t new/BSD-Resource-1.28/t/setpriority.t
--- old/BSD-Resource-1.24/t/setpriority.t 1997-04-08 08:55:29.000000000 +0200
+++ new/BSD-Resource-1.28/t/setpriority.t 2006-05-26 21:58:30.000000000 +0200
@@ -8,44 +8,100 @@
print "1..3\n";
-$gotlower = setpriority(PRIO_PROCESS, 0, 5);
+my $nice = 0;
-print "# gotlower = $gotlower\n" if ($debug);
+my $ps = "ps -o pid,nice";
-# we must use getpriority() to find out whether setpriority() really worked
+if (open(PS, "$ps 2>/dev/null|")) {
+ while(<PS>) {
+ if (/^\s*$$\s+(-?\d+)\s*$/) {
+ $nice = $1;
+ last;
+ }
+ }
+ close(PS);
+} else {
+ print "# open(..., '$ps >/dev/null|') failed: $!\n";
+ if (open(NICE, "nice --version 2>/dev/null|")) {
+ my $gnu = 0;
+ while (<NICE>) {
+ if (/GNU/) {
+ $gnu = 1;
+ last;
+ }
+ }
+ close(NICE);
+ if ($gnu) {
+ if (open(NICE, "nice|")) {
+ chomp($nice = <NICE>);
+ unless ($nice =~ /^-?\d+$/) {
+ print "# nice returned: '$nice'\n";
+ $nice = 0;
+ }
+ } else {
+ print "# nice failed: $!\n";
+ }
+ }
+ } else {
+ print "# nice --version failed: $!\n";
+ }
+}
-$lowerprio = getpriority(PRIO_PROCESS, 0);
+print "# nice = $nice\n";
-print "# lowerprio = $lowerprio\n" if ($debug);
+if ($nice <= 0) {
+ $origprio = getpriority(PRIO_PROCESS, 0);
-$fail = (not $gotlower or not $lowerprio == 5);
+ print "# origprio = $origprio ($!)\n" if ($debug);
-print 'not '
- if ($fail);
-print "ok 1\n";
-if ($fail) {
- print "# syserr = '$!' (",$!+0,"), ruid = $<, euid = $>\n";
- print "# gotlower = $gotlower, lowerprio = $lowerprio\n";
-}
+ $gotlower = setpriority(PRIO_PROCESS, 0, $origprio + 1);
+
+ print "# gotlower = $gotlower ($!)\n" if ($debug);
+
+ # we must use getpriority() to find out whether setpriority() really worked
+
+ $lowerprio = getpriority(PRIO_PROCESS, 0);
+
+ print "# lowerprio = $lowerprio ($!)\n" if ($debug);
-$gotlower = setpriority();
+ $fail = (not $gotlower or not $lowerprio == $origprio + 1);
-print "# gotlower = $gotlower\n" if ($debug);
+ print 'not '
+ if ($fail);
+ print "ok 1\n";
+ if ($fail) {
+ print "# syserr = '$!' (",$!+0,"), ruid = $<, euid = $>\n";
+ print "# gotlower = $gotlower, lowerprio = $lowerprio\n";
+ }
-# we must use getpriority() to find out whether setpriority() really worked
+ if ($origprio == 0) {
-$lowerprio = getpriority();
+ $gotlower = setpriority();
-print "# lowerprio = $lowerprio\n" if ($debug);
+ print "# gotlower = $gotlower ($!)\n" if ($debug);
-$fail = (not $gotlower or not $lowerprio == 10);
+ # we must use getpriority() to find out whether setpriority()
+ # really worked.
-print 'not '
- if ($fail);
-print "ok 2\n";
-if ($fail) {
- print "# syserr = '$!' (",$!+0,"), ruid = $<, euid = $>\n";
- print "# gotlower = $gotlower, lowerprio = $lowerprio\n";
+ $lowerprio = getpriority();
+
+ print "# lowerprio = $lowerprio\n" if ($debug);
+
+ $fail = (not $gotlower or not $lowerprio == 10);
+
+ print 'not '
+ if ($fail);
+ print "ok 2\n";
+ if ($fail) {
+ print "# syserr = '$!' (",$!+0,"), ruid = $<, euid = $>\n";
+ print "# gotlower = $gotlower, lowerprio = $lowerprio\n";
+ }
+ } else {
+ print "ok 2 # skipped (origprio = $origprio)\n";
+ }
+} else {
+ print "ok 1 # skipped\n";
+ print "ok 2 # skipped\n";
}
if ($> == 0) { # only effective uid root can even attempt this
@@ -56,13 +112,13 @@
$fail = (not $gothigher or not $higherprio == -5);
print 'not '
if ($fail);
+ if ($fail) {
+ print "# syserr = '$!' (",$!+0,"), ruid = $<, euid = $>\n";
+ print "# gothigher = $gothigher, higherprio = $higherprio\n";
+ }
+ print "ok 3 # (euid = $>) \n";
} else {
- $fail = 0;
-}
-print "ok 3\n";
-if ($fail) {
- print "# syserr = '$!' (",$!+0,"), ruid = $<, euid = $>\n";
- print "# gothigher = $gothigher, higherprio = $higherprio\n";
+ print "ok 3 # skipped (euid = $>)\n";
}
# eof
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/BSD-Resource-1.24/t/setrlimit.t new/BSD-Resource-1.28/t/setrlimit.t
--- old/BSD-Resource-1.24/t/setrlimit.t 2002-11-22 15:54:58.000000000 +0100
+++ new/BSD-Resource-1.28/t/setrlimit.t 2006-05-21 09:45:21.000000000 +0200
@@ -4,7 +4,7 @@
use BSD::Resource;
-$debug = 1;
+$debug = 0;
$LIM = get_rlimits();
@@ -15,13 +15,22 @@
@test = ();
sub newlim {
- my $old = shift;
+ my ($oldlim, $oldhard) = @_;
- return ($old == RLIM_INFINITY) ? $old : ($old ? int(0.95 * $old) : 1);
+ my $newlim =
+ ($oldlim == RLIM_INFINITY) ? $oldlim : $oldlim ? int(0.95 * $oldlim) : 1;
+
+ # print "newlim/1 = $newlim\n";
+
+ $newlim = $oldhard if $oldhard > 0 && $newlim > $oldhard;
+
+ # print "newlim/2 = $newlim\n";
+
+ return $newlim;
}
sub klim {
- print "# klim: $_[0]\n";
+ print "# klim: $_[0]\n" if ($debug);
$_[0] =~ /^RLIM_(?:AS|CORE|DATA|MEMLOCK|RSS|STACK|VMEM)$/;
}
@@ -35,8 +44,8 @@
($oldsoft, $oldhard) = getrlimit($lim);
print "# RLIM_INFINITY = ", RLIM_INFINITY, "\n" if ($debug);
print "# lim = $lim, oldsoft = $oldsoft, oldhard = $oldhard\n" if ($debug);
- $newsoft = newlim($oldsoft);
- $newhard = newlim($oldhard);
+ $newsoft = newlim($oldsoft, $oldhard);
+ $newhard = newlim($oldhard, $oldhard);
print "# lim = $lim, newsoft = $newsoft, newhard = $newhard\n" if ($debug);
$set = setrlimit($lim, $newsoft, $newhard);
$ser = $!;
@@ -61,8 +70,16 @@
$ntest = scalar @test;
print "1..$ntest\n";
for $i (1..$ntest) {
- print 'not ' if $test[$i-1];
- print "ok $i\n";
+ my $ok = !$test[$i-1];
+ if ($^O eq 'darwin' && $LIM[$i-1] eq 'RLIMIT_NPROC') {
+ $ok = 1;
+ if ($test[$i-1]) {
+ print STDERR "# The RLIMIT_NPROC test is known to fail in Mac OS X.\n";
+ } else {
+ print STDERR "\n# The RLIMIT_NPROC test seems to work this time in Mac OS X.\n";
+ }
+ }
+ printf "%s $i # $LIM[$i-1]\n", $ok ? "ok" : "not ok";
}
} else {
die "could not find any resource limits to test\n";
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...