Using Macports to distribute custom software?

Ryan Schmidt ryandesign at macports.org
Thu May 31 13:00:36 PDT 2012


On May 29, 2012, at 04:40, Tomáš Znamenáček wrote:

> We have some in-house tools I’d like to distribute to our machines. It seems to me like a good idea to use Macports for this, ie. create a custom package with our tools, upload it on our server and add the server into sources.conf. The Macports support is nearly there, at least the support for local portfile repositories looks quite promising for what I need.
> 
> My questions: 1) Can I simply add another rsync:// line before the macports.org one, will the ports get picked up by the local Macports installation? And more importantly, 2) is it possible to somehow switch to rsync over ssh for this one source? I can’t use regular rsync as we can’t let strangers install our custom tools.

Yes it should be possible to use MacPorts to install custom private ports you've written. I do so on my system.

There are two aspects: 1) MacPorts needs to know where to get the portfiles. To do this you enter the location into sources.conf. MacPorts can retrieve portfiles using rsync (tarball or individual files), http/https (tarball) or svn (individual files). I'm not sure if any of these methods support username/password authentication. You could try it out (put the username/password into the URL in sources.conf) and see if it works. I'm not aware of any support in MacPorts for rsync with ssh. You mentioned these machines being in-house. If that means they are on a private network, then you can host the portfiles on a server that's also on that private network. That way nobody outside your network can access them, even if there's no username / password protection.

Even if unauthorized users could get your portfiles, they wouldn't do them any good unless they also had the second aspect: 2) the distfiles containing the source code to be compiled. Presumably you should definitely host these on a server only authorized users can access. MacPorts can retrieve distfiles va http/https or ftp, or can download source from git, hg, bzr, svn or cvs, optionally with username / password authentication (which you would hardcode into the portfile).



More information about the macports-users mailing list