pkgsrc-Changes archive

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

Re: CVS commit: pkgsrc



                        Hi,

> On 31. May 2021, at 09:07, nia <nia%NetBSD.org@localhost> wrote:
> 
> On Sun, May 30, 2021 at 11:41:05PM +0000, Pierre Pronchery wrote:
>> Log Message:
>> Introduce a new SYSCONFBASE variable (defaults to /etc)
> 
> I'm not sure I like this change -- it's confusing paired with
> SYSCONFDIR. The status quo is that pkgsrc doesn't modify anything
> outside of its own PREFIX, so on NetBSD the expectation is that you
> copy the rc script to /etc yourself, possibly with local changes.


The aim here is not to copy anything automatically; that behaviour is unaffected.

On the contrary, this allows (unprivileged) builds to expect RC scripts in e.g. $PREFIX/etc/rc.d instead of always /etc/rc.d, and to use them from there. rc.subr gets installed there instead of going 
in /etc, therefore allowing pkgsrc's RC scripts to be used in unprivileged mode.
There is already a PKG_SYSCONFBASE for packages, so SYSCONFBASE is the same for the base system.

This requires every RC script to be updated, with e.g. s,/etc/rc.subr,@SYSCONFBASE@/rc.subr,.
I have tested this with OpenLDAP (slapd), PostgreSQL (with s,su -m pgsql,sh,), nginx, php-fpm, dovecot, and more.
Updating them is part 3 of the changes, and I will go one by one to be sure they work.

The only danger that I can think of at this point is that now, pkgtools/rc.subr can be built and installed in privileged mode on NetBSD; this would probably overwrite the system's /etc/rc.subr. It 
might make sense to have this package only allow builds on NetBSD in unprivileged mode and with SYSCONFBASE not set to /etc.

HTH,
--
khorben

Attachment: signature.asc
Description: Message signed with OpenPGP



Home | Main Index | Thread Index | Old Index