pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/p5-Sys-Utmp Importing package for Sys::Utmp -...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a053451e9dfb
branches: trunk
changeset: 556578:a053451e9dfb
user: sno <sno%pkgsrc.org@localhost>
date: Sun Mar 22 21:17:03 2009 +0000
description:
Importing package for Sys::Utmp - an object(ish) interface to UTMP files.
Sys::Utmp provides a vaguely object oriented interface to the Unix user
accounting file (sometimes /etc/utmp or /var/run/utmp). Whilst it would
prefer to use the getutent() function from the systems C libraries it will
attempt to provide its own if they are missing.
Oked by joerg@
diffstat:
sysutils/p5-Sys-Utmp/DESCR | 8 ++++
sysutils/p5-Sys-Utmp/Makefile | 19 +++++++++
sysutils/p5-Sys-Utmp/distinfo | 6 +++
sysutils/p5-Sys-Utmp/patches/patch-aa | 68 +++++++++++++++++++++++++++++++++++
4 files changed, 101 insertions(+), 0 deletions(-)
diffs (117 lines):
diff -r c2869cf58257 -r a053451e9dfb sysutils/p5-Sys-Utmp/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/p5-Sys-Utmp/DESCR Sun Mar 22 21:17:03 2009 +0000
@@ -0,0 +1,8 @@
+Sys::Utmp provides a vaguely object oriented interface to the Unix user
+accounting file (sometimes /etc/utmp or /var/run/utmp). Whilst it would
+prefer to use the getutent() function from the systems C libraries it will
+attempt to provide its own if they are missing.
+
+This may not be the module that you are looking for - there is a User::Utmp
+which provides a different procedural interface and may well be more
+complete for your purposes.
diff -r c2869cf58257 -r a053451e9dfb sysutils/p5-Sys-Utmp/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/p5-Sys-Utmp/Makefile Sun Mar 22 21:17:03 2009 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1.1.1 2009/03/22 21:17:03 sno Exp $
+
+DISTNAME= Sys-Utmp-1.6
+PKGNAME= p5-${DISTNAME}
+CATEGORIES= sysutils perl5
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Sys/}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= http://search.cpan.org/dist/Sys-Utmp
+COMMENT= Object(ish) Interface to UTMP files
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+PKG_INSTALLATION_TYPES= overwrite pkgviews
+
+PERL5_PACKLIST= auto/Sys/Utmp/.packlist
+
+.include "../../lang/perl5/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r c2869cf58257 -r a053451e9dfb sysutils/p5-Sys-Utmp/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/p5-Sys-Utmp/distinfo Sun Mar 22 21:17:03 2009 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2009/03/22 21:17:03 sno Exp $
+
+SHA1 (Sys-Utmp-1.6.tar.gz) = 45548135e888d87f5c8f184b83048e04dadbfa5f
+RMD160 (Sys-Utmp-1.6.tar.gz) = fd3adb315ca2791e22054110127b85e3c54feacf
+Size (Sys-Utmp-1.6.tar.gz) = 8818 bytes
+SHA1 (patch-aa) = 47c20eac627a092f6eed64c0a3061df0a8da7a40
diff -r c2869cf58257 -r a053451e9dfb sysutils/p5-Sys-Utmp/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/p5-Sys-Utmp/patches/patch-aa Sun Mar 22 21:17:03 2009 +0000
@@ -0,0 +1,68 @@
+--- Utmp.xs.orig 2006-10-13 16:10:30.000000000 +0200
++++ Utmp.xs 2009-02-13 13:45:12.000000000 +0100
+@@ -4,8 +4,11 @@
+
+ #include <utmp.h>
+
+-#ifdef NOUTFUNCS
++#ifdef _AIX
++#define _HAVE_UT_HOST 1
++#endif
+
++#ifdef NOUTFUNCS
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <time.h>
+@@ -15,6 +18,7 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+
++
+ #ifdef BSD
+ #define _NO_UT_ID
+ #define _NO_UT_TYPE
+@@ -42,23 +46,12 @@
+ #define ACCOUNTING 9
+ #endif
+
+-
+ /*
+ It is almost certain that if these are not defined the fields they are
+ for are not present or this is BSD :)
+ */
+
+
+-#ifndef UT_LINESIZE
+-# define UT_LINESIZE 32
+-#endif
+-#ifndef UT_NAMESIZE
+-# define UT_NAMESIZE 32
+-#endif
+-#ifndef UT_HOSTSIZE
+-# define UT_HOSTSIZE
+-#endif
+-
+ static int ut_fd = -1;
+
+ static char _ut_name[] = _PATH_UTMP;
+@@ -207,7 +200,7 @@
+ static SV *ut_ref;
+ static char *_ut_id;
+ static struct utmp *utent;
+- static char ut_host[UT_HOSTSIZE];
++ static char ut_host[sizeof(utent->ut_host)];
+
+ HV *self_hash;
+
+@@ -249,9 +242,9 @@
+ ut_tv = (IV)utent->ut_time;
+ #endif
+ #ifdef _HAVE_UT_HOST
+- strncpy(ut_host, utent->ut_host,UT_HOSTSIZE);
++ strncpy(ut_host, utent->ut_host,sizeof(utent->ut_host));
+ #else
+- strcpy(ut_host, "",1);
++ strncpy(ut_host, "",1);
+ #endif
+
+
Home |
Main Index |
Thread Index |
Old Index