From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Feb 29 01:50: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 9111E106566B for ; Wed, 29 Feb 2012 01:50:13 +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 7B51D8FC0C for ; Wed, 29 Feb 2012 01:50:13 +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 q1T1oD9d093342 for ; Wed, 29 Feb 2012 01:50:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q1T1oDlD093341; Wed, 29 Feb 2012 01:50:13 GMT (envelope-from gnats) Date: Wed, 29 Feb 2012 01:50:13 GMT Message-Id: <201202290150.q1T1oDlD093341@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Yoshiaki Kasahara Cc: Subject: Re: 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: Wed, 29 Feb 2012 01:50:13 -0000 The following reply was made to PR ports/164306; it has been noted by GNATS. From: Yoshiaki Kasahara To: scheidell@FreeBSD.org Cc: bug-followup@FreeBSD.org Subject: Re: ports/164306: update mail/mailagent to 3.1.77 and utmpx fix Date: Wed, 29 Feb 2012 10:46:12 +0900 (JST) Thank you very much for the pointer, but I'm afraid that it is not applicable to this case. The patch for net/msend looks clean because msend already has codes for utmpx (calling get/setutxent instead of directly reading the utmp file when USE_UTMPX is defined). The patch just defines USE_UTMPX and fixes incompatibility of a member name. The actual problem (or difficulty for me) is that mailagent is a Perl script and there seems no way to obtain utmpx data structure by a Perl script (maybe except writing a C module calling set/getutxent ?). utmp-era programs can read and parse utmp file directly, but utmpx file is not directly readable (the file format (futx?) is hidden inside libc and there seems no way to read it in a portable way). CPAN has User::Utmp module, but it is not in FreeBSD ports collection. I tried to build it by myself but failed on 9.x. Also the author of mailagent seems to have a policy not to use any external modules. So I was stucked and decided to call /usr/bin/who instead, because mailagent just needs users and tty names they are on. mailagent uses them to decide which ttys to biff. I don't use biff function, but at least I want it to work as expected. I have only a little knowledge about utmpx on FreeBSD 9.x so my understanding might be wrong. If there is a clean way to access utmpx from a Perl script, I'd like to know. -- Yoshiaki Kasahara Research Institute for Information Technology, Kyushu University kasahara@nc.kyushu-u.ac.jp