-
Notifications
You must be signed in to change notification settings - Fork 136
Add DESTDIR and PREFIX capabilities for packaged installs #540
Comments
@dreness @wsanchez @cyrusdaboo @m0rgen @glyph Also, if any of you have specific comments or suggestions about how macports/macports-ports#4978 is implemented, your feedback would be most welcome. I have this running myself, and it's working very well. Known issues are mentioned in
This is a hack to provide twistedcaldav authentication access. See: https://github.com/apple/ccs-calendarserver/blob/master/twistedcaldav/util.py. An alternate approach must be used if non-trusted local accounts exist on the Calendar and Contacts Server.
|
Hi,
Hmm... the intention for ./bin/package is to provide a fully coherent and localized installation at the desired path. The supplied path is indeed encoded in various places within the results. I'm not doubting that you're finding a bug, though... Are the results any different if you build first (i.e. ./bin/develop) and then ./bin/package, without -F? In theory there should be no difference, but maybe there is. Also, kudos on your work for this port, and all the related efforts. I'll try to find some time to do a more thorough review. |
@dreness Thank you for your pointers here and elsewhere. I’ll give your suggestion a go. I realize this isn’t a bug, but it is an “undesirable feature.” At the least, it would be nice to be able to hack around it with some temporarily created symlinks during the build, but for some reason the build scripts are seeing through those. |
@dreness Thanks for the suggestion, but that still doesn't work:
This find for
|
I've ported Apple Calendar and Contacts Server to MacPorts. See macports/macports-ports#4978
ccs-calendarserver does not provide a standard GNU-like/compliant
DESTDIR
capability for staged installs.PREFIX
(or--prefix
) tells the compiler to build everything for the ultimate destination.DESTDIR
tells the compiler to install its builds in this (typically temporary, staged) location.A package manager like MacPorts or Brew can then copy everything from
DESTDIR
toPREFIX
, or archive everything inDESTDIR
, to track and control what’s been installed, and how to uninstall or upgrade.Without both
DESTDIR
andPREFIX
options, there’s no reliable way for the package manager to manage its packages. E.g. see MacPorts’sdestroot
stage in https://guide.macports.org/chunked/reference.phases.html.Sometime it’s possible to hack around this limitation (
calendar-contacts-server
example,ihaskell
example), but it’s pretty awful. There is rudimentary--prefix
capability in _build.sh, but this doesn't work like a standard packagePREFIX
or--prefix
does.In my own tests, running
./bin/package -F ${DESTDIR}
hard codes the build directory within all the virtualenv compiled Python code and object libraries, and therefore does not work. Even hacky workarounds like creating symbolic links toDESTDIR
and building within the symlinks don't work.Now that Server.app has deprecated Calendar and Contacts Server to open source projects, the only reasonable approach is using a package manager like MacPorts to handle installs and upgrades, and that means having
DESTDIR
andPREFIX
capabilities.The text was updated successfully, but these errors were encountered: