FreeBSD Ports Tricks 201
BSD Forums writes "One of FreeBSD's biggest benefits is its ports collection. You can go years without learning more than just make install clean, but there are dozens of features built into the ports tools. OnLamp's Dru Lavigne demonstrates several of these tricks to simplify your life."
Gee golly! (Score:2, Funny)
Re:Gee golly! (Score:5, Funny)
yes (Score:4, Informative)
Re:yes (Score:1)
Re:yes (Score:1)
Re:yes (Score:1, Interesting)
Guys, what happens if I remove a piece of software after it's been installed and lots of other software depends on it. Will "Ports" warn me about what will break, or will it just go ahead and do it, and leave me scratching my head trying to figure out what happened?
Seems to cut to the heart of a real package system, IMO.
Re:yes (Score:5, Informative)
Re:yes (Score:2, Informative)
Useful (Score:5, Informative)
Re:Useful (Score:2, Funny)
Re:Useful (Score:1, Informative)
Re:Useful (Score:1, Interesting)
Re:Useful (Score:1, Informative)
Still a dated comparison though.
Re:Useful (Score:2)
Another thing - everybody interested in performance and nobody in reliability. Try yank powercord from computer and look how different OSes behave after boot. Ext2 I believe would be loser. Journalled FS could do better but then there is a performance impact...
The feature I like most: (Score:5, Funny)
You just type e.g.:
goat@blindeyes> make emacs --D UNDEAD=1
And your installation of emacs is zombiefied. That means that an emacs process can never crash, is much stronger albeit slower and can only be killed by kill PID -SIGCUTINTOHALFWITHCHAINSAW.
In fact I have a zombiefied apache running here for 742 days without any trouble. Although it eats sometimes other processes.
So all you "*BSD is dead whiners": In fact the death of *BSD is a good thing. It has given the system many new occult powers of which a living system like Linux/MacOS X can only dream. With all these undead processes, vampiric servers and banshee IDS your system is much better than the boring old standard rubbish.
I even heard some rumors from Redmond that MS is working on killing Windows, too. Just for gaining the great powers of an undead system.
Re:The feature I like most: (Score:1)
Re:The feature I like most: (Score:2)
Obviously you've never configured this for running within a jailed environment. Only so many places to run in that tiny cyber-cell.
Re:The feature I like most: (Score:1)
Look elsewhere for your process-eater.
Re:The feature I like most: (Score:2)
Does it have a core system called the Red Queen? And cool lazer things (and no frickin' sharks either) protecting it?
ResidentBSD: No-one is immune.
Re:The feature I like most: (Score:3, Funny)
I use dead OS's. All the time. They don't know there dead.
Re:The feature I like most: (Score:2)
[Prepares to slapped down -1: Flamebait]
Yeah, well, with *BSD, it's kinda like large animal... it takes a while for the message that it's dead to travel through the nervous system and the brain to take notice of it.
Zealotry (Score:5, Funny)
Re:Zealotry (Score:2)
GNU/Linux: Where to you want to go today?
BSD: Hey, are you guys comming or what?!?!
You forgot:
OSX: Hey, where do you think you are going to?
Re:Zealotry (Score:1)
You say that like it's a bad thing.
Zealotry? You asked for it! (Score:5, Funny)
I know that you're making fun of Gentoo zealots, but in the process, you're in danger of awaking a sleeping giant: The BSD Snob [linuxisforbitches.com]. Because you didn't think before posting, innocent Slashdot readers will be forced to read how the BSDs are better designed, more carefully developed, and are more portable across different platforms. Readers will even be forced to endure accusations that, being Linux users, they wet the bed [spatula.net]. Gentoo certainly has its zealots, but BSD users have been looking down their noses at AT&T UNIX since, like, the 1970s. They're the original OS zealots!
See, you've unleashed an Army of Darkness upon us all. Where's Bruce Campbell [imdb.com] when you need him?
Steve
Linux and BSD User
Re:Zealotry? You asked for it! (Score:1)
BSD Good.
Linux Bad.
No Gentoo! (Score:1, Funny)
[note: I actually use Gentoo, but Gentoo fanboys usually get on my nerves]
Kudos to the author! (Score:5, Interesting)
There are tons of really neat things about FreeBSD; I won't list them here because they're probably quite off topic. But for anybody interested in learning more; feel free to contact me and/or check out the FreeBSD handbook [freebsd.org] and the FreeBSD diary [freebsddiary.org].
Re:Kudos to the author! (Score:1, Interesting)
While this is wonderful news, does this mean us mere Linux users should want to switch to *BSD now?
another one.. (Score:1, Funny)
$ make install
Envy (Score:5, Interesting)
The closest thing available right now is DarwinPorts but it's horrendously incomplete; I don't think any good package system can get away with lacking any way to track installed packages or perform upgrades; not only is there no facility for system-wide upgrades, but even upgrading an individual package requires an explicit uninstall, download, and reinstall.
I know that the Gentoo, Fink, and OpenDarwin folks are supposed to be collaborating on a unified package system for OS X. Does anyone in the know have any inklings that it might be like BSD ports? A BSD ports system does seem ideal for an OS that is, at the core, BSD.
Re:Envy (Score:4, Informative)
Re:Envy (Score:3, Informative)
I certainly don't wish to cast dispersions on
Re:Envy (Score:2)
What can I say??? That's really your own fault for not blocking access to SSH, and whatever else they exploited that you didn't specifically need publicly accessible.
And BTW, if you are concerned with exploits, you should really use OpenBSD. Heavily audited, and new secrurity features as of 3.3 that make even exploitable bugs, exploitable no more. Systrace is installed so you can VERY finely control exactly what each
Re:Envy (Score:2)
Darwin, the userspace anyway, is LARGELY based on FreeBSD. The means that with your sexy gui, you get a neat kernel that is very freebsd like, so you, the freebsd-loving son, have a minimal ammount of learning(if any?) to take care of that.
Secondly, a mac is infact a mac. which means a powerful gui. Things are easy to setup with the mac gui, things like servers, apache, etc. so that means your dad can fiddle around without having to learn a ne
Re:Envy (Score:2, Informative)
[netbsd-pkgsrc] [netbsd.org]
Re:Envy (Score:1)
I'm going to be giving this a shot when I have some time tomorrow. Looks like I finally have an excuse to format a UFS partition.
Thanks
Re:Envy (Score:2, Funny)
"netbsd works fine".
-Lasse
(Running NetBSD on my PCs, my good old MacIIci, and my iMac DV Special Edition)
Re:Envy (Score:2, Interesting)
I'm no BSD ports expert, but from what I hear the Gentoo team is porting their Portage system, which is heavily inspired by the BSD ports system, to other platforms (OS X).
Portage does support the things you mention, system-wide upgrades and tracking installed packages.
Checkout the Gentoo website [gentoo.org] for more information.
Re:Envy (Score:1)
But yeah, I wish there were something better too
Re:Gentoo!! (Score:3, Interesting)
Broken?
I killed my Gentoo install when it failed compiling some new ebuild, or just while upgrading, again. And after getting tired of it beeping while compiling Mozilla more often then if someone was typing their thesis in vi in command mode.
Meanwhile everything compiles with FreeBSD on the same computer. So, hey...
My beef with FreeBSDs port system.. (Score:5, Insightful)
It would be a whole lot better if the ports tree was frozen together with the OS when it's released and later only security and bug fixes were merged into the ports (preferably by patching the originally released package instead of just using the latest version, but that would be too much to ask from non-paid volunteers, although Debian does manage to do it).
Re:My beef with FreeBSDs port system.. (Score:5, Insightful)
May your wish become reality... ala kazzam, *pooof*
There ya go, now you can go to your favorite computer retail store, FreeBSD Mall, or even an absolutely free ISO, and get a RELEASE copy of FreeBSD.
Yes, just recently (several years ago) FreeBSD started putting things on CDs. These CDs include on them at no extra charge... packages! These "packages" are pretty well frozen in time, and install the exact same code on every machine that CD is used on.
later only security and bug fixes were merged into the ports
Boy, demanding fella. Well, that's exactly what happens with the FreeBSD ports! Between application releases bug fixes go into the ports tree via patches, aka diff files.
Case in point, there was a nasty layout problem with Konqueror that a KDE developer posted a patch for in the KDE bugzilla. I altered the files paths a bit and submitted to the KDE-FreeBSD project. This was then committed to the ports tree, which then produces new packages.
This process took all of 2 days. I don't honestly know if any other OS has this fix in their build process or packages. My guess is that the rest of the Unix world either needs to manually patch and compile their KDE or wait for 3.1.3a.
Bug fixes like this go into the applications in the ports tree every day, without having to wait for the originating project to release a new version. Best of all, since the FreeBSD ports utilize its own versioning scheme important changes, such as security fixes or major bugs, can flag "pkg_version" to let an admin know that there's an upgraded version to install.
there is no easy way to tell whether a package has been updated because of security issues/bugs or because the port maintainers simply feel like bumping the package version.
Port maintainers don't go willy nilly into bumping port revisions. Changes in maintanership, documentation, or other administrative issues do not warrant, nor do they get, a change in their port version.
As for an easy way to determine why a port was upgraded, a quick visit to Fresh Ports [freshports.org] can give you the exact reason why the port was upgraded, by who, and when.
but that would be too much to ask from non-paid volunteers
No it's not really. In fact, these kinds of issues are addressed every single day in the ports tree. It may look like a tangled mess upon first glance, but I assure you it is anything but. There's over 9000 applications being maintained for the OS. Every day many are added, a few deleted, and several are updated for a variety of reasons. This tree is as alive as the free software community it reflects.
Re:My beef with FreeBSDs port system.. (Score:2)
Granted, it is binary packages for the most part (occasionally someone will mention apt-get -b source packagename) but releases and bugfixes come fast and furious in Debian Unstable.
Re:My beef with FreeBSDs port system.. (Score:2)
They change slowly.
Re:My beef with FreeBSDs port system.. (Score:4, Funny)
Re:My beef with FreeBSDs port system.. (Score:1)
Re:My beef with FreeBSDs port system.. (Score:2)
Re:My beef with FreeBSDs port system.. (Score:2, Interesting)
It's not fun downloading individual files but it has saved my day on several occations.
http://www.freebsd.org/cgi/cvsweb.cgi/ports/
Re:My beef with FreeBSDs port system.. (Score:2, Informative)
Re:My beef with FreeBSDs port system.. (Score:2)
IF anything the bsd ports are more stable then Gentoo. Case in point is php. If you look at the makefiles with vi you will see if they are marked release candidates or unstable. I found out that only php 3.x is considered stable with FreeBSD 4.8??
I tried the rc php 4.3x and it would not compile with all all the libraries during an
Re:My beef with FreeBSDs port system.. (Score:1)
You can generate packages (cd /usr/ports/www/whatever && make package) of whichever applications you want to install on a number of s
Re:My beef with FreeBSDs port system.. (Score:4, Informative)
You have not much idea of what you are talking about, have you?
Together with the OS comes a complete ports tree. If that ports tree is being changed to newer versions, it's because the sysadmin has set up a task to do so. It's no problem to keep an unchanged ports tree, additionally, if there is need for it.
You can also make a binary package from a port, if you want to install software on several machines in the same way...
BSD is an operating system for people who know what they're doing...
Re:My beef with FreeBSDs port system.. (Score:2)
Re:My beef with FreeBSDs port system.. (Score:3, Informative)
Simply copy the old ports tree before cvsupping...: /usr/ports /usr/ports.dist
cp -Rp
That's all...
(Ok, you might have to resolve dependencies on your own if you want to mix distribution/updated packages, but that really should be trivial. <grin>)
Re:My beef with FreeBSDs port system.. (Score:1)
So you can just check out the same revision / day as the system you want to clone, if you can't just copy it over.
Re:My beef with FreeBSDs port system.. (Score:2)
You can also use date tags in your ports supfiles to get the same ports tree across all your FreeBSD installations.
And you can always just tar up the ports tree on one system, and untar is on all your other systems.
Re:My beef with FreeBSDs port system.. (Score:2)
If you don't like that you can go to the first system and make packages out of the installed ports (literally type "make packages") and install them on the second system. There are more details in the article here.
Warning for first time installers (Score:3, Informative)
IIRC, you need to format
use packages (Score:1, Informative)
Feeling of unease (Score:4, Interesting)
I'd spent quite a bit of time learning Redhat 8, relearned Redhat 9, and again started over with NetBSD. (looking at mandrake, gentoo, and a raft of others as well)
Why is is that these OS's are alike in name only? The package management is entirely different, the disk partitioning is entirely different, heck FINDING files is different ( find * | grep foo vs. find | grep foo)
Enough is slightly different to make it feel like you're learning over from scratch (adduser v. useradd), and enough is COMPLETELY different to prove the point.
One thing I've determined: If I get an applicant who says they know 'Unix' without specifying the flavor will get roundfiled.
Re:Feeling of unease (Score:3, Interesting)
But why use grep with find? Why not just 'find . -name foo' This has the benefit that you can match on characteristics other than file name too. Like 'f
Finding with grep (Score:3, Informative)
One of my most common uses for this is to look for ports that do certain things not included in their one line description, eg: Just a quick FYI, in case you were unaware of this handy thing.
Re:Feeling of unease (Score:1, Informative)
Re:Feeling of unease (Score:1)
there is nothing alike about the names "redhat" and "netbsd"
they are different OSs and people complaining about differences as minor as that are missing the point. when you get a new car do you complain that the knobs are not placed exactly as your old car? you paid for the chassis - the placement of the headlight switch is insignificant (unless it is under the seat, in which case it serves you right if you bought it). IMO, unix gets easier if you spend less time reading and more time doing.
auto dependency install (Score:1, Informative)
I'm surprised no one has mentioned portupgrade... (Score:5, Informative)
It lives in
Check it out. Start with the manual page (man portupgrade) after you install it, then use Google for more info. It's well worth it.
Lavigne? (Score:2)
If there's any family connection, this article was written for him by an editor, and repackaged to sell his image.
Worthless page (Score:5, Informative)
That page is almost worthless. Don't waste your time reading it, the only tip worth anything is the one about doing a "make readmes". Everything else is better accomplished by using the portupgrade scripts.
Trust me on this one, once you use portupgrade you will not go back to the pkg_* commands.
The latest FBSD already has README.htmls (Score:4, Informative)
Portupgrade! (Score:5, Informative)
Every FreeBSD admin should know about portupgrade.
It's in ports. It has several tools. One of them, portupgrade, upgrades ports. Another, pkgdb, fixes your ports db by updating out-of-date deps, merging multiple versions of the same port, etc. A third, pkg_version, is like port_version but much faster. A fourth, portsclean, cleans any debris from using ports, such as outdated shared libs.
Get it. Learn it. Love it.
Re:Portupgrade! (Score:4, Informative)
Actually, pkg_version is in the base system, portversion is the program that comes with portupgrade.
portversion is faster because it relies on a database of installed packages, whereas pkg_version depends only on knowing what ports are installed (via pkg_info) plus either an up-to-date ports tree or an INDEX file. Both are useful IMHO.
But I agree with the general sentiment...the whole portupgrade package is extremely useful, and it's one of the first things that goes on a system that I install if I think I'll ever be upgrading ports on it.
Re:BSD is Dying (Score:5, Informative)
-uso.
Re:BSD is Dying (Score:5, Informative)
From http://www.freebsd.org/doc/en_US.ISO8859-1/books/h andbook/linuxemu.html , actually it can in fact run quite a few Linux applications.
"In a nutshell, the compatibility allows FreeBSD users to run about 90% of all Linux applications without modification. This includes applications such as Star Office, the Linux version of Netscape, Adobe Acrobat, RealPlayer 5 and 7, VMWare, Oracle, WordPerfect, Doom, Quake, and more. It is also reported that in some situations, Linux binaries perform better on FreeBSD than they do under Linux." "In a nutshell, the compatibility allows FreeBSD users to run about 90% of all Linux applications without modification. This includes applications such as Star Office, the Linux version of Netscape, Adobe Acrobat, RealPlayer 5 and 7, VMWare, Oracle, WordPerfect, Doom, Quake, and more. It is also reported that in some situations, Linux binaries perform better on FreeBSD than they do under Linux."
Yes, FreeBSD does run Linux. (Score:4, Informative)
If you answer yes, it installs a loader that translates a Linux program's system calls into FreeBSD ones. It works rather well.
I've personally run the Linux binaries of Unreal Tournament 2003 on FreeBSD 4.8 with full OpenGL 3D acceleration on my Pentium 3/800 with an NVidia GEForce 3. It ran better than the Windows version does on the same hardware.
Many other 3D accelerated Linux games (like Quake 3) also run just fine under FreeBSD.
Re:Yes, FreeBSD does run Linux. (Score:3, Interesting)
Re:BSD is Dying (Score:5, Informative)
why yes, it does
which would you like ?
Red Hat
/usr/ports/emulators/linux_base-6/pkg-descr
/usr/ports/emulators/linux_base-8/pkg-descr
or
DebianRe:Something wrong? (Score:1)
Re:Something wrong? (Score:1)
Re:Something wrong? (Score:1)
Also, your post isn't funny. Just redundant.
That's a brilliant idea. (Score:1)
Re:FreeBSD ported to slashcode! (Score:1)
Re:9000 ports can't be ALL wrong (Score:1)
Re:I don't want to start a holy war here (Score:1)
FreeBSD has NEVER given me performan
Re:I don't want to start a holy war here (Score:1)