tech-pkg archive

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

Re: Unprivileged rc.d-boot on Darwin



Frédéric Fauberteau <triaxx%NetBSD.org@localhost> writes:

> What I would like to do is actually:
> +.if empty(UNPRIVILEGED:M[Yy][Ee][Ss])
> +DARWIN_LAUNCHD_PATH= ${SLASH_TO_MOLLIFY_PKGLINT}Library/LaunchDaemons
> +.else
> +DARWIN_LAUNCHD_PATH= \$${HOME}/Library/LaunchAgents
> +.endif
>
> DARWIN_LAUNCHD_PATH is only used in INSTALL file. This installs org.pkgsrc.rc.d-boot.plist in the home directory of the user who installs the package.

Which is perhaps different than the build, and that's ok.  The user
doing the install has to be able to write the LOCALBASE of the package,
and it could be some /opt/unpriv-pkgsrc that is created as root and set
to the user, or it could be a personal build under $HOME.

>>  This is a bit subtle and rc.d-boot should probably have a few
>>  comments about the big picture, especially the $HOME issue.

This comment stands; I think what is committed should make this all
clear to someone is not already familiar with the subtleties of
mac/launch.

>>  This uses /System/LaunchDaemons now and $HOME/Library/LaunchAgents in
>>  the user case.  That seems obviously not right as failing parallel
>>  structure, and if it is right (which I am now thinking it probably is)
>>  it deserves a comment.

This comment stands.  Presumably you understand, in which case a comment
is in order, because I do not, and I think I have some degree of
mac/launch clue.

> If I am correct, $HOME is no more used in the pkgsrc build. The only
> assumption I make is that the user who installs the package has $HOME
> defined in its environment.

I guess that's ok, as long  as it fails if HOME is not defined, vs doing
someting like sticking files in some wrong place.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index