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 14. May 2021, at 05:11, Pierre Pronchery <khorben%defora.org@localhost> 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?

Attachment: patch-sysconfbase.diff
Description: Binary data

Attachment: patch-sysconfbase_rcd.diff
Description: Binary data


Cheers,
--
khorben

Attachment: signature.asc
Description: Message signed with OpenPGP



Home | Main Index | Thread Index | Old Index