Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Aug 1999 21:30:17 +0200
From:      Neil Blakey-Milner <nbm@mithrandr.moria.org>
To:        Will Andrews <andrews@TECHNOLOGIST.COM>
Cc:        ports@FreeBSD.ORG
Subject:   Re: arb patch to tell who installed port and when
Message-ID:  <19990824213017.A99983@rucus.ru.ac.za>
In-Reply-To: <XFMail.990824121955.andrews@TECHNOLOGIST.COM>; from Will Andrews on Tue, Aug 24, 1999 at 12:19:55PM -0400
References:  <19990824144734.A73970@rucus.ru.ac.za> <XFMail.990824121955.andrews@TECHNOLOGIST.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue 1999-08-24 (12:19), Will Andrews wrote:
> On Tue, 24 Aug 1999 14:47:34 +0200, Neil Blakely-Milner stated:
> > +             if [ -n "${RECORD_USER}" ]; then \
> > +                     echo ${USER} > ${PKG_DBDIR}/${PKGNAME}/+WHOM; \
> 
> Where does the value for ${USER} come from? It is not currently defined
> anywhere in bsd.port.mk.
> 
> Yes, it's true that in some shell environments, ${USER} is defined. BUT how is
> it going to achieve the stated purpose if it only returns the effective
> username? Many folks su to root to install ports (that's how they're designed
> to be installed by default), and ${USER} will only return 'root', thereby
> nullifying the hope of finding out precisely WHO installed the port.

hrm, I never thought of that - it doesn't fail if it isn't set though.

In most environments I know that use su, su -m is used, which allows
things like RCS and similar to give _actual_ user, not "root" all the
time.

> Also, why not use ${ECHO}?

I'm forgetful?

> I notice that you would be saving the information in /var/db/pkg/packagename/
> (by default, that is what it would resolve to). I assume you have a script or
> something similar to show this information? Or a patch to pkg_info? How else
> would this information be made useful?

Well, the theory being that ifpeople think it's a good idea, I'd then
propose adding an option to pkg*, which isn't too important.  For the
moment, it's reasonably arbitrary to write a script to work this out, and
even manual is useful.

Neil
-- 
Neil Blakey-Milner
nbm@rucus.ru.ac.za


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990824213017.A99983>