Date: 13 Jun 2003 23:00:05 -0000 From: Sergei Kolobov <sergei@kolobov.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: bjk@m-net.arbornet.org Subject: ports/53300: [PATCH] sysutils/userinfo: unbreak under 5.x Message-ID: <20030613230005.17436.qmail@kolobov.com> Resent-Message-ID: <200306132300.h5DN0VGu019822@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 53300 >Category: ports >Synopsis: [PATCH] sysutils/userinfo: unbreak under 5.x >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri Jun 13 16:00:30 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Sergei Kolobov >Release: FreeBSD 5.1-CURRENT i386 >Organization: >Environment: System: FreeBSD elf.chetwood.ru 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Thu Jun 5 02:19:41 MSD >Description: - Unbreak under 5.x (changes in kinfo_proc struct) - Use the same CONFIGURE_TARGET as other ports - Allow the manpage to be compressed Added files: - files/patch-src::common.h - files/patch-src::process.c Port maintainer - bjk@m-net.arbornet.org - has been copied. >How-To-Repeat: >Fix: --- userinfo-1.10a.patch begins here --- diff -ruN --exclude=CVS userinfo.cvs/Makefile userinfo/Makefile --- userinfo.cvs/Makefile Tue Apr 15 00:13:56 2003 +++ userinfo/Makefile Sat Jun 14 02:53:00 2003 @@ -14,19 +14,11 @@ COMMENT= Show information about local users GNU_CONFIGURE= yes +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} MAN1= ui.1 -MANCOMPRESSED= no - -CONFIGURE_TARGET= pre-build: - ${CP} ${WRKSRC}/doc/ui.man ${WRKSRC}/doc/ui.1 - -.include <bsd.port.pre.mk> - -.if ${OSVERSION} > 500000 -BROKEN= "Doesn't work on 5.x, mainainter informed - 2003-04-07" -.endif + ${MV} ${WRKSRC}/doc/ui.man ${WRKSRC}/doc/ui.1 -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff -ruN --exclude=CVS userinfo.cvs/files/patch-src::common.h userinfo/files/patch-src::common.h --- userinfo.cvs/files/patch-src::common.h Thu Jan 1 03:00:00 1970 +++ userinfo/files/patch-src::common.h Sat Jun 14 02:46:30 2003 @@ -0,0 +1,10 @@ +--- src/common.h.orig Sat Jun 14 02:45:40 2003 ++++ src/common.h Sat Jun 14 02:21:13 2003 +@@ -16,6 +16,7 @@ + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ ++#include <sys/types.h> + #include <pwd.h> + #include "config.h" + diff -ruN --exclude=CVS userinfo.cvs/files/patch-src::process.c userinfo/files/patch-src::process.c --- userinfo.cvs/files/patch-src::process.c Thu Jan 1 03:00:00 1970 +++ userinfo/files/patch-src::process.c Sat Jun 14 02:47:07 2003 @@ -0,0 +1,27 @@ +--- src/process.c.orig Sat Jun 14 02:33:21 2003 ++++ src/process.c Sat Jun 14 02:42:29 2003 +@@ -63,15 +63,24 @@ + } + + for (i = 0; i < cnt; i++) { ++#if __FreeBSD_version < 500000 + if (kp[i].kp_eproc.e_flag & EPROC_SLEADER && kp[i].kp_eproc.e_tdev != + -1) { + pid = kp[i].kp_proc.p_pid; ++#else ++ if (kp[i].ki_kiflag & KI_SLEADER && kp[i].ki_tdev != -1) { ++ pid = kp[i].ki_pid; ++#endif + break; + } + } + + if (!pid) ++#if __FreeBSD_version < 500000 + pid = kp[0].kp_eproc.e_ppid; ++#else ++ pid = kp[0].ki_ppid; ++#endif + + return (pid > 1) ? pid : -1; + } --- userinfo-1.10a.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030613230005.17436.qmail>