tech-pkg archive

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

Re: Using RC scripts unprivileged and on more platforms

			Hi tech-pkg@,

> On 17. May 2021, at 05:21, Pierre Pronchery <> wrote:
>> On 14. May 2021, at 05:11, Pierre Pronchery <> wrote:
>> Currently dealing with the pain of starting services installed with pkgsrc (unprivileged) on macOS, I just had the following idea:
>> - ship an equivalent to rc.subr in pkgsrc (possibly a port for the target platform)
>> - modify RC scripts to source it instead of /etc/rc.subr (when relevant)
> @joerg: thanks for the heads up, I wasn’t aware of pkgtools/rc.subr!
>> The two patches attached are my first attempt at implementing exactly that; while the first one deals with the infrastructure, the second updates RC scripts in bulk. Both are against 2021Q1, but the latter should be easy to adapt to current:
>> pkgsrc$ find */ -name '*.sh' -exec gsed -i -e s,/etc/rc.subr,@SYSCONFBASE@/rc.subr, {} \+
>> (revbumps not included)
> I have updated my patches to modify pkgtools/rc.subr as suggested.
> It adds support for unprivileged builds and for NetBSD in pkgtools/rc.subr.
> It also seems to work on macOS in my first tests.
> Now the intrusive changes should be limited to mk.conf (new SYSCONFBASE variable).
> Does it look like it could make its way into HEAD?

Can I commit the first part? (patch-sysconfbase.diff)

I would then update the RC scripts more carefully (basically one by one, manually) as some changes are actually more involved than just a dynamic path to rc.subr.

This should have no impact on privileged builds, while allowing unprivileged builds to use the RC scripts provided by pkgsrc on many platforms, including NetBSD and macOS.


Attachment: signature.asc
Description: Message signed with OpenPGP

Home | Main Index | Thread Index | Old Index