Re:FreeBSD 10′s New Technologies and Features
by jhh on Friday September 20, 2013 @09:50AM
(#6417667)
So how do you use ports in practice? Do you use sources or binary packages? Which management solution do you use, or do you just use the make files? I am constantly thinking about revisiting BSD, but in contrast to your experience I found the apt package solution to work very well and just be better.
Re:FreeBSD 10′s New Technologies and Features
by jonhohle on Friday September 20, 2013 @11:47AM
(#6418435)
I install everything from source. Except for thing like desktop environments, building from source is a non-issue on modern hardware. It also gives me some confidence in the binary compatibility of the packages I have installed.
For installing:
pushd /usr/ports/*/$PACKAGE ; sudo make install clean && popd
For upgrading (ports): sudo portsnap fetch update ; sudo portmaster -ad
(In reality, portsnap is run nightly).A quick read - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/po...
I use FreeBSD on a desktop at home and for a personal web server. I'm not performing large scale deployments (but if I were, I'd probably write a port for my application, define my dependencies, and install it just like anything else).
Re:FreeBSD 10′s New Technologies and Features
by jon-wood on Friday September 20, 2013 @12:23PM
(#6418703)
I'm not about to move to FreeBSD, but I did just discover pushd and popd from this comment. Thanks!
Re:FreeBSD 10′s New Technologies and Features
by idupree on Friday September 20, 2013 @01:27PM
(#6419152)
You can also use parentheses to create a scope for the current directory and environment variables (the shell forks a subprocess to run parenthesized commands).
(cd /usr/ports/*/$PACKAGE ; sudo make install clean)
See http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu...
Re:FreeBSD 10′s New Technologies and Features
by jonhohle on Friday September 20, 2013 @02:11PM
(#6419472)
In your example, however, the failure of `make install clean` will put you back in the original directory and not in the port's directory where you probably want to be to debug the failure. My original example keeps you in the port's directory in the event of installation failure.
Re:FreeBSD 10′s New Technologies and Features
by dscrd on Friday September 20, 2013 @01:31PM
(#6419179)
Personally, I couldn't anymore handle the way ports asks for configuration options for every package that has configurable options. I'm spoiled by the "sane defaults" stance of better Linux distros like Arch.
Re:FreeBSD 10′s New Technologies and Features
by Freaky on Friday September 20, 2013 @07:01PM
(#6421051)
echo BATCH=1 >>/etc/make.conf
No more prompts for options - they should all certainly have sane defaults. If not, it's a good reason to run send-pr.
Re:FreeBSD 10′s New Technologies and Features
by lcampbell on Saturday September 21, 2013 @01:42AM
(#6422109)
I've always been a fan of
make config-recursive && make install clean
which runs `make config` on the package and all dependencies before installing. It's the best of both worlds IMO -- the port will build unattended and you still have a chance up-front to skim the available options for things you need.
Re:FreeBSD 10′s New Technologies and Features
by mkup on Saturday September 21, 2013 @05:54AM
(#6422501)
Also
make -DBATCH install clean
in port directory will do unattended build with default settings. It affects current port and all of its dependencies.
Re:FreeBSD 10′s New Technologies and Features
by klibertp on Sunday September 22, 2013 @09:59AM
(#6426686)
Either set BATCH env variable or use portupgrade/portinstall with -c or -C flags. The latter gathers all the dependencies of a given port and let's you configure them up front, and then the compilation and installation goes without any interruptions.
-c
--config
Run "make config-conditional" before everything for all tasks.
-C
--force-config
Run "make config" before everything for all tasks.
http://www.gsp.com/cgi-bin/man.cgi?topic=portupgrade
Re:FreeBSD 10′s New Technologies and Features
by Freaky on Friday September 20, 2013 @11:25AM
(#6418296)
I use poudriere and pkgng - the former for building my own package repository, the latter for installing and upgrading. The pkgng side is comparable to apt: `pkg install vim`, `pkg upgrade`, `pkg autoremove` etc; the poudriere side isn't much worse: https://fossil.etoilebsd.net/poudriere/doc/trunk/doc/pkgng_r...
I admit I had some level of apt-envy back when I was using portupgrade. pkgng has nicely eliminated that.
Re:FreeBSD 10′s New Technologies and Features
by harrytuttle on Friday September 20, 2013 @09:58AM
(#6417710)
From my perspective (I'm not the GP), I will be using a custom configuration management system that I wrote back in 1999. It's. Like puppet but ssh based, written in sh and standard Unix tooling. It doesn't use a DAG so you have to order dependencies carefully.
That will pull binary packages from ports builds on another machine and install and configure them.
I've used FreeBSD and before that Gentoo (which has a package manager, portage, influenced by BSDs ports system) for more than a decade, and I've never understood the appeal of apt or the other Debian tools. In my experience, they just don't work as well as ports, constantly require adding additional repositories (because the official repository is missing some relatively popular package for who knows what reason) - which may or may not conflict with others I have -, and in general, are just more work than ports, portage, or MacPorts.
Inflicting apt on a system with a superior package management system seems like a sysadmin's bright idea - having no experience with ports or other package managers.
I've used apt on several systems - Maemo, Debian, Ubuntu, OS X (as fink), and always found it to be one of the weakest package managers (I've even had better experience with yum/RPM).