From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Feb 17 18:10:13 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E249A1065679; Fri, 17 Feb 2012 18:10:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B7C108FC14; Fri, 17 Feb 2012 18:10:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q1HIACb8099541; Fri, 17 Feb 2012 18:10:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q1HIACQA099540; Fri, 17 Feb 2012 18:10:12 GMT (envelope-from gnats) Resent-Date: Fri, 17 Feb 2012 18:10:12 GMT Resent-Message-Id: <201202171810.q1HIACQA099540@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Cc: ed@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Chris Rees Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8B23106564A for ; Fri, 17 Feb 2012 18:03:49 +0000 (UTC) (envelope-from crees@pegasus.bayofrum.net) Received: from mk-outboundfilter-5.mail.uk.tiscali.com (mk-outboundfilter-5.mail.uk.tiscali.com [212.74.114.1]) by mx1.freebsd.org (Postfix) with ESMTP id 330F88FC1C for ; Fri, 17 Feb 2012 18:03:48 +0000 (UTC) Received: from host-2-102-105-187.as13285.net (HELO pegasus.bayofrum.net) ([2.102.105.187]) by smtp.pipex.tiscali.co.uk with ESMTP; 17 Feb 2012 18:03:47 +0000 Received: from pegasus.bayofrum.net (localhost [127.0.0.1]) by pegasus.bayofrum.net (8.14.5/8.14.5) with ESMTP id q1HI3f2m095865 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Fri, 17 Feb 2012 18:03:41 GMT (envelope-from crees@pegasus.bayofrum.net) Received: (from crees@localhost) by pegasus.bayofrum.net (8.14.5/8.14.5/Submit) id q1HI3f1T095864; Fri, 17 Feb 2012 18:03:41 GMT (envelope-from crees) Message-Id: <201202171803.q1HI3f1T095864@pegasus.bayofrum.net> Date: Fri, 17 Feb 2012 18:03:41 GMT From: Chris Rees To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: ed@FreeBSD.org Cc: Subject: ports/165244: [PATCH] Fix port: net/v6eval on 9+ X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Chris Rees List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2012 18:10:13 -0000 >Number: 165244 >Category: ports >Synopsis: [PATCH] Fix port: net/v6eval on 9+ >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Feb 17 18:10:12 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Chris Rees >Release: FreeBSD 9.0-RELEASE amd64 >Organization: >Environment: System: FreeBSD pegasus.bayofrum.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sat Jan 28 15:45:27 GMT 2012 root@pegasus.bayofrum.net:/usr/obj/usr/src/sys/PEGASUS amd64 >Description: Use utmpx.h, thus fixing on 9+ (Patch written by Ed Schouten ed@FreeBSD.org) Remove obsolete perl workaround; 5.8 is lowest version in the tree >How-To-Repeat: >Fix: --- v6eval-ed.diff begins here --- ? work Index: Makefile =================================================================== RCS file: /home/pcvs/ports/net/v6eval/Makefile,v retrieving revision 1.23 diff -u -r1.23 Makefile --- Makefile 21 Sep 2010 16:08:09 -0000 1.23 +++ Makefile 17 Feb 2012 18:01:08 -0000 @@ -7,7 +7,7 @@ PORTNAME= v6eval PORTVERSION= 3.0.1 -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 1 CATEGORIES= net ipv6 MASTER_SITES= http://www.tahi.org/release/v6eval/ @@ -27,17 +27,7 @@ MAKE_JOBS_UNSAFE= yes SUB_FILES= pkg-message -.include - -.if ${PERL_LEVEL} < 500703 -RUN_DEPENDS+= p5-Digest-MD5>=2.16:${PORTSDIR}/security/p5-Digest-MD5 -.endif - -.if ${OSVERSION} > 900007 -BROKEN= fails to build with new utmpx -.endif - post-install: @${CAT} ${PKGMESSAGE} -.include +.include Index: files/patch-lib_Cm_CmMain.cc =================================================================== RCS file: files/patch-lib_Cm_CmMain.cc diff -N files/patch-lib_Cm_CmMain.cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-lib_Cm_CmMain.cc 17 Feb 2012 18:01:08 -0000 @@ -0,0 +1,66 @@ +$FreeBSD$ + +Utmpx implementation by ed@FreeBSD.org; utmp was removed for 9-RELEASE + +--- lib/Cm/CmMain.cc.orig 2003-10-23 05:37:30.000000000 +0100 ++++ lib/Cm/CmMain.cc 2012-02-16 15:55:58.878522227 +0000 +@@ -47,7 +47,14 @@ + #include + #include + #include ++#if (defined(__unix__) || defined(unix)) && !defined(USG) ++#include ++#endif ++#if __FreeBSD_version < 900007 + #include ++#else ++#include ++#endif + #include + #include + #include +@@ -128,6 +135,7 @@ + + //---------------------------------------------------------------------- + // 障害解析情報作成 ++#if __FreeBSD_version < 900007 + static struct utmp *myUtmpEnt(FILE *in,struct utmp *u) { + int s=ttyslot(); + if(s<0||fseek(in,sizeof(struct utmp)*s,0)<0|| +@@ -140,9 +148,36 @@ + u=myUtmpEnt(in,ux); fclose(in); + if(!u) {return;} + #define A(a)sizeof(a),sizeof(a),a + sprintf(p,catch2,A(u->ut_line),A(u->ut_name),A(u->ut_host)); + #undef A + return;} ++#else /* No utmp */ ++void CmMain::makeCatch2Eye(STR p) { ++static char catch2[]=" on %*.*s:%-*.*s from %*.*s"; ++ struct utmpx ul, *u; ++ const char *tty; ++ ++ tty = ttyname(0); ++ if (tty == NULL) ++ tty = ttyname(1); ++ if (tty == NULL) ++ tty = ttyname(2); ++ if (tty == NULL) ++ return; ++ if (strncmp(tty, "/dev/", 5) == 0) ++ tty += 5; ++ strncpy(ul.ut_line, tty, sizeof(ul.ut_line)); ++ setutxent(); ++ u = getutxline(&ul); ++ endutxent(); ++ if (u == NULL || u->ut_type != USER_PROCESS) ++ return; ++#define A(a)sizeof(a),sizeof(a),a ++ sprintf(p,catch2,A(u->ut_line),A(u->ut_user),A(u->ut_host)); ++#undef A ++ return;} ++#endif ++ + void CmMain::makeCatchEye(const STR pgmName) { + static char catch1[]="@(#) %02d/%02d/%02d %02d:%02d:%02d %s STARTED by %s@%s"; + time_t now=time(0); struct tm *m=localtime(&now); --- v6eval-ed.diff ends here --- -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. >Release-Note: >Audit-Trail: >Unformatted: