ports/130748: [MAINTAINER] devel/p5-Unix-Uptime: Makes $boot_seconds be assigned correctly
Murilo Opsfelder
mopsfelder at gmail.com
Mon Jan 19 15:50:01 UTC 2009
>Number: 130748
>Category: ports
>Synopsis: [MAINTAINER] devel/p5-Unix-Uptime: Makes $boot_seconds be assigned correctly
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Jan 19 15:50:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Murilo Opsfelder
>Release: FreeBSD 8.0 i386
>Organization:
BluePex Security Solutions
>Environment:
FreeBSD opsfelder.bplab.local 8.0-CURRENT FreeBSD 8.0-CURRENT #37 r187296: Thu Jan 15 10:08:42 BRST 2009 root at opsfelderm.bplab.local:/usr/obj/usr/src/sys/PANDA i386
>Description:
Before patch, $boot_seconds only received 1 for a successfully string matching or 0 for a failed string matching.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/p5-Unix-Uptime/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile 19 Jan 2009 12:50:11 -0000 1.1
+++ Makefile 19 Jan 2009 15:28:16 -0000
@@ -7,6 +7,7 @@
PORTNAME= Unix-Uptime
PORTVERSION= 0.1
+PORTREVISION= 1
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
Index: files/patch-lib__Unix__Uptime.pm
===================================================================
RCS file: files/patch-lib__Unix__Uptime.pm
diff -N files/patch-lib__Unix__Uptime.pm
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-lib__Unix__Uptime.pm 19 Jan 2009 15:28:16 -0000
@@ -0,0 +1,12 @@
+--- lib/Unix/Uptime.pm.orig 2009-01-19 13:22:27.000000000 -0200
++++ lib/Unix/Uptime.pm 2009-01-19 13:23:38.000000000 -0200
+@@ -62,7 +62,8 @@
+ my $class = shift;
+
+ my $boottime = `sysctl kern.boottime`;
+- my $boot_seconds = $boottime =~ /\s+sec\s+=\s+(\d+),/;
++ $boottime =~ /\s+sec\s+=\s+(\d+),/;
++ my $boot_seconds = $1;
+ my $time = time();
+ my $uptime = $time - $boot_seconds;
+ return $uptime;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list