Date: Thu, 19 Jan 2012 18:24:31 +0900 (JST) From: Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/164306: update mail/mailagent to 3.1.77 and utmpx fix Message-ID: <201201190924.q0J9OVpP034285@elvenbow.cc.kyushu-u.ac.jp> Resent-Message-ID: <201201190930.q0J9U7MM082951@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <bsd.port.pre.mk> +.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 <bsd.port.mk> +.include <bsd.port.post.mk> 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 (<WHO>) { ++ 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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201190924.q0J9OVpP034285>