Suggested improvements for ports

John E Hein jhein at
Sun Jan 13 19:13:43 PST 2008

Doug Barton wrote at 13:45 -0800 on Jan 12, 2008:
 > I have actually advocated in the past that ALL ports should have version 
 > numbers, and that we then create virtual ports (symlinks, whatever) that 
 > point to whatever is the "current" version of that software. Different 
 > developers dislike that idea for different reasons, but my opinion is 
 > still that from the user perspective this would make life a lot easier.

I do this for a site-wide nfs shared installed apps dir at work
(ignoring the many edge cases, it's basically this: install to
PREFIX=/site/dist/${PKGNAME} and make sym links to /site/bin,
/site/lib).  It's not particularly easy given the current ports
propensity to have everything in /usr/local, but I find it worthwhile.
It does make life easier (for both users and admins) for at least a
few reasons:

 - multiple versions of the same port can co-exist (sometimes until a
   newer one is proven to work)

 - live upgrades don't affect people that may be running an older
   version of a port since the old port is still around (and
   just re-pointing a sym link to the new version doesn't make
   an existing running instance of a program fail).

 - updates are generally transparent to users

 - having a common shared nfs dir means only having to install
   a port once and all machines instantly get access.

I have my own hacks to the port tree to accomodate this strategy.  And
no, I won't publish them as they are quite hacky in places, but if
there were moves in the direction you describe (not likely as far as I
can see due to resistance of the kind you described - and it's not a
particularly small task to support something like this officially), I
could chime in about how I've been doing it for the last 10 years.
Ports based on pkg-config have made this much easier, and for those
ports I almost don't have to do anything special at all except set
PREFIX to point somewhere other than /usr/local.

It's had some bumps in the road over the years, but it mostly just
works now.

I must say it's been much nicer now that the pointyhat checks for
ports that don't handle PREFIX properly.  10 years ago that was a much
more prevalent problem.

More information about the freebsd-ports mailing list