pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: pkgsrc/pkgtools/bootstrap-mk-files/files



Alistair Crooks <agc%pkgsrc.org@localhost> writes:

> On Sun, Feb 24, 2013 at 04:26:30AM +0400, Aleksej Saushev wrote:
>> Alistair Crooks <agc%pkgsrc.org@localhost> writes:
>> 
>> > On Sat, Feb 23, 2013 at 11:52:33PM +0000, Aleksej Saushev wrote:
>> >> Module Name:      pkgsrc
>> >> Committed By:     asau
>> >> Date:             Sat Feb 23 23:52:32 UTC 2013
>> >> 
>> >> Modified Files:
>> >>   pkgsrc/pkgtools/bootstrap-mk-files/files: bootstrap.sh
>> >> 
>> >> Log Message:
>> >> Help people using mk files outside pkgsrc, provide saner default values.
>> >
>> > --- pkgsrc/pkgtools/bootstrap-mk-files/files/bootstrap.sh:1.2   Fri Jun 17 
>> > 11:00:36 2011
>> > +++ pkgsrc/pkgtools/bootstrap-mk-files/files/bootstrap.sh       Sat Feb 23 
>> > 23:52:32 2013
>> > @@ -12,6 +12,14 @@
>> >  # - SYSCONFDIR
>> >  #
>> >  
>> > +: ${CP:=cp}
>> > +: ${SED:=sed}
>> > +: ${OPSYS:=$(uname)}
>> > +: ${ROOT_USER:=$(id -un 0)}
>> > +: ${ROOT_GROUP:=$(id -gn "${ROOT_USER}")}
>> > +: ${MK_DST:=/usr/local/share/mk}
>> > +: ${SYSCONFDIR:=/usr/local/etc}
>> > +
>> >  for file in bsd.README bsd.dep.mk bsd.depall.mk bsd.doc.mk bsd.files.mk \
>> >         bsd.hostprog.mk bsd.inc.mk bsd.info.mk bsd.kernobj.mk bsd.kinc.mk \
>> >         bsd.kmod.mk bsd.lib.mk bsd.links.mk bsd.man.mk bsd.nls.mk \
>> >
>> > It's unclear to me why you decided that /usr/local is a "saner" default 
>> > value
>> > than any other location.
>> >
>> > For a start, it's way more likely to collide with other packaging systems
>> > files in that location. It's not "prefix" based, so people have to specify
>> > both MK_DST and SYSCONFDIR when using this by hand.
>> >
>> > Yes, these are only default values - but that makes it more important that 
>> > we
>> > get these correct in the first place.
>> 
>> I find empty values less sane than these, and /usr/local is traditionally
>> considered a place for manually built and maintained software.
>
> Thanks, I'd been wondering why /usr/local was chosen.  Very
> informative.  Doesn't really address my point that if you want to help
> out people who have similar files installed there already, though. Clashes
> in this area are a pig to find - believe me, I've had to do that fairly
> recently - and this really doesn't help.

I have a choice either to leave it as is, and let it go to root of file system
(with broken empty values for user IDs), or let it go to some more or less
traditional place. /usr/local is traditional at least for autoconf-based
software, thus people can expect it going there.

The only way not to step on something already existing is to generate random
directory in $TMPDIR. This works, for sure, but it is rather unusual and 
surprising.
Do you have any better suggestion?

Alternatively, it is possible to bail out when directories are not supplied.

>> I would rework this script deeper. These are minimal changes I've come up,
>> they require no changes in the rest pkgsrc code around while helping
>> other people to reuse this code.
>
> Might be best to run the changes past some other people before you commit
> them, then, so that we're not all subject to "saner defaults" without any
> warning.

This change doesn't affect anything before you start using mk files outside 
pkgsrc
and you stop passing values of expected environment variables.


-- 
HE CE3OH...



Home | Main Index | Thread Index | Old Index