From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jan 19 09:30:07 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 9EA5C1065670 for ; Thu, 19 Jan 2012 09:30:07 +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 6C0FB8FC17 for ; Thu, 19 Jan 2012 09:30:07 +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 q0J9U71Q082953 for ; Thu, 19 Jan 2012 09:30:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0J9U7MM082951; Thu, 19 Jan 2012 09:30:07 GMT (envelope-from gnats) Resent-Date: Thu, 19 Jan 2012 09:30:07 GMT Resent-Message-Id: <201201190930.q0J9U7MM082951@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yoshiaki Kasahara Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82FE41065672 for ; Thu, 19 Jan 2012 09:24:37 +0000 (UTC) (envelope-from kasahara@elvenbow.cc.kyushu-u.ac.jp) Received: from elvenbow.cc.kyushu-u.ac.jp (unknown [IPv6:2001:200:905:1407:21b:21ff:fe52:5260]) by mx1.freebsd.org (Postfix) with ESMTP id B92098FC15 for ; Thu, 19 Jan 2012 09:24:36 +0000 (UTC) Received: from elvenbow.cc.kyushu-u.ac.jp (kasahara@localhost [127.0.0.1]) by elvenbow.cc.kyushu-u.ac.jp (8.14.5/8.14.5) with ESMTP id q0J9OVXM034286 for ; Thu, 19 Jan 2012 18:24:31 +0900 (JST) (envelope-from kasahara@elvenbow.cc.kyushu-u.ac.jp) Received: (from kasahara@localhost) by elvenbow.cc.kyushu-u.ac.jp (8.14.5/8.14.5/Submit) id q0J9OVpP034285; Thu, 19 Jan 2012 18:24:31 +0900 (JST) (envelope-from kasahara) Message-Id: <201201190924.q0J9OVpP034285@elvenbow.cc.kyushu-u.ac.jp> Date: Thu, 19 Jan 2012 18:24:31 +0900 (JST) From: Yoshiaki Kasahara To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/164306: update mail/mailagent to 3.1.77 and utmpx fix X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Yoshiaki Kasahara List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jan 2012 09:30:07 -0000 >Number: 164306 >Category: ports >Synopsis: update mail/mailagent to 3.1.77 and utmpx fix >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: Thu Jan 19 09:30:06 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Yoshiaki Kasahara >Release: FreeBSD 9.0-STABLE amd64 >Organization: Kyushu University >Environment: System: FreeBSD elvenbow.cc.kyushu-u.ac.jp 9.0-STABLE FreeBSD 9.0-STABLE #0 r230040: Fri Jan 13 14:00:19 JST 2012 root@elvenbow.cc.kyushu-u.ac.jp:/usr/obj/usr/src/sys/GENERIC amd64 >Description: The revision of upstream had become 77, and I updated the distfile provided at http://eron.info/ . Also I noticed that it won't be built on FreeBSD 9 due to utmpx migration. I couldn't find a good way to access the utmpx structure from Perl without using C or other packages, so I decided not to compile utmp_ph.c and directly provide a simplified version of utmp.pl which parses the output of "/usr/bin/who". It is only used by biff function, and I confirmed it worked. Please tell me if someone knows better solution... >How-To-Repeat: >Fix: Here is the patch: diff -urN /usr/ports/mail/mailagent/Makefile mailagent/Makefile --- /usr/ports/mail/mailagent/Makefile 2011-06-03 22:32:40.000000000 +0900 +++ mailagent/Makefile 2012-01-19 17:35:49.302887382 +0900 @@ -6,7 +6,7 @@ # PORTNAME= mailagent -PORTVERSION= 3.1.71 +PORTVERSION= 3.1.77 CATEGORIES= mail MASTER_SITES= http://eron.info/ @@ -34,6 +34,12 @@ MLINKS= mailhelp.1 maildist.1 mailhelp.1 mailpatch.1 \ mailhelp.1 maillist.1 +.include +.if ${OSVERSION} > 900006 +EXTRA_PATCHES= ${PATCHDIR}/utmpx-agent::pl::utmp::utmp.pl \ + ${PATCHDIR}/utmpx-agent::pl::utmp::Makefile.SH +.endif + pre-extract: @if [ `${SH} -c umask` != 0022 ]; then \ ${ECHO} "Please set umask to 022 before running make,"; \ @@ -58,4 +64,4 @@ ${CP} -pR ${WRKSRC}/misc/* ${EXAMPLESDIR}/misc @${LN} -fs ${PREFIX}/lib/mailagent/examples ${EXAMPLESDIR}/agent -.include +.include diff -urN /usr/ports/mail/mailagent/distinfo mailagent/distinfo --- /usr/ports/mail/mailagent/distinfo 2011-06-03 22:32:40.000000000 +0900 +++ mailagent/distinfo 2012-01-19 11:28:23.447871926 +0900 @@ -1,2 +1,2 @@ -SHA256 (mailagent-3.1.71.tar.bz2) = 4785a018797d4405f8708ba59197f249f77cd4f22f87b086c04c7226cb64ebdb -SIZE (mailagent-3.1.71.tar.bz2) = 446820 +SHA256 (mailagent-3.1.77.tar.bz2) = 89d399ee9aa87399070309e18b1e4237edf62b345ee1d8061202913de8e027b3 +SIZE (mailagent-3.1.77.tar.bz2) = 450202 diff -urN /usr/ports/mail/mailagent/files/utmpx-agent::pl::utmp::Makefile.SH mailagent/files/utmpx-agent::pl::utmp::Makefile.SH --- /usr/ports/mail/mailagent/files/utmpx-agent::pl::utmp::Makefile.SH 1970-01-01 09:00:00.000000000 +0900 +++ mailagent/files/utmpx-agent::pl::utmp::Makefile.SH 2012-01-19 17:37:57.864888796 +0900 @@ -0,0 +1,20 @@ +--- ../mailagent-3.1.77/agent/pl/utmp/Makefile.SH 2006-08-24 22:24:12.354556000 +0900 ++++ agent/pl/utmp/Makefile.SH 2012-01-19 17:37:50.697895588 +0900 +@@ -107,7 +107,6 @@ + cp Makefile.new Makefile + $(RM) Makefile.new + +-all:: utmp_ph + + local_realclean:: + $(RM) utmp_ph +@@ -122,8 +121,7 @@ + local_realclean:: + $(RM) utmp.pl + +-utmp.pl: utmp_pl.sh utmp_ph +- /bin/sh utmp_pl.sh ++utmp.pl: + + ######################################################################## + # Common rules for all Makefiles -- do not edit diff -urN /usr/ports/mail/mailagent/files/utmpx-agent::pl::utmp::utmp.pl mailagent/files/utmpx-agent::pl::utmp::utmp.pl --- /usr/ports/mail/mailagent/files/utmpx-agent::pl::utmp::utmp.pl 1970-01-01 09:00:00.000000000 +0900 +++ mailagent/files/utmpx-agent::pl::utmp::utmp.pl 2012-01-19 17:53:39.916881854 +0900 @@ -0,0 +1,25 @@ +--- /dev/null 2012-01-19 17:47:14.000000000 +0900 ++++ agent/pl/utmp/utmp.pl 2012-01-19 17:53:06.536872534 +0900 +@@ -0,0 +1,22 @@ ++# ++# utmp file primitives ++# ++ ++package utmp; ++ ++# Return the ttys on which a given user is logged ++sub ttys { ++ local($user) = @_; # User's login name ++ local(@u); ++ open(WHO, '/usr/bin/who |') || warn "Can't invoke /usr/bin/who: $!\n"; ++ while () { ++ next unless /^$user\s/; ++ my ($name, $line, $dummy) = split; ++ push(@u, $line); ++ } ++ close WHO; ++ return @u; # Returns array of ttys ++} ++ ++package main; ++ >Release-Note: >Audit-Trail: >Unformatted: