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 <> writes:

> +.if empty(UNPRIVILEGED:M[Yy][Ee][Ss])
> +.else
> +DARWIN_LAUNCHD_PATH=	${HOME}/Library/LaunchAgents
> +.endif

I understand what you are trying to do (and should have been described
in the commit message that you didn't include :-)

  for privileged installs, make no change

  for unprivileged installs, use PKG_SYSCONFDIR instead of /etc (this is
  fine and not controversial; a simple bug fix I think)

  for unprivileged installs, don't try to write to /System, because it
  is wrong and won't work

  instead, *assume* that the user running the build is the user that
  will install the packages, and use that user's homedir

Comments from review (and I am not an expert.launchfoo.macos):

  Using $HOME, rather than adding a dir to use as part of bootstrap,
  seems awkward.  Maybe this is ok, and bootstrap is too much pain.
  Maybe a new variable for mk.conf which can default to HOME if not set.
  But the big point is to work well with binary packages, and not get
  tangled up in wrong assumptions.

  I am not sure we have a requirement that HOME is set when doing pkgsrc

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

  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.

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index