FreeBSD Ports Tricks
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."
And you can even find the Bittorrent client.
my sig
These are pretty useful little tips, thought it looks like almost all of them are in the FreeBSD handbook already.
Maybe not but it sure as hell runs Debian!
-uso.
Dreams, dreams, don't doubt dreams, dreaming children's dreaming dreams. Sailor Moon SS
Somebody is working on iPortage, a Cocoa-based GUI front-end to Gentoo's packaging system...
$x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
$x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
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."
"The strong will do what they want, the weak will do what they must."
-Thucydides
I certainly don't wish to cast dispersions on OS-X, but since I work w/ FBSD, I'm more comfortable with this scenario, as the "critical data", i.e. 2 years of stuff, is still in its place on the Mac, and the new server is ready and willing to do whatever we throw at it.
So, mostly a fear of screwing up the OS-X stuff (I am nervous about a server-capable machine with a gui), I fall back to what I know. A colleague of his is running a WAP and Postgres from his Mac laptop, so, I suppose it's really about what you're comfortable with - provided it works, and is secure out of the box.
Before you flame, in my noob days, I got r00ted in RH (6.2 default) and FBSD (OpenSSH). But that was a lifetime ago, three years. In that time, the modularity of FBSD, IMHO, has allowed me to more easily and efficiently stay current and less vulnerable.
The ports tree rocks.
The install process asks you: "Do you wish to enable Linux compatibility?"
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.
When I installed FreeBSD for the first time, I noticed that on some configurations the default install is broken. Basically, if you have a small (500MB) /usr partition, you cannot instal ports by default as the standard newfs call used by the installer to create the initial filesystem does not allocate enough inodes.
/usr by hand using the "-i 2048" switch. This one got me the first time round, as it's not mentioned in any of the documentation.
IIRC, you need to format
const int one = 65536; (Silvermoon, Texture.cs)
SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
the netbsd pkgsrc collection works fine on osx...
[netbsd-pkgsrc]
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
DebianThere are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
Just do a 'make package'. This will install the port and create a binary package which you can install with pkg_add(1) on other boxes.
Of course it runs NetBSD. BTC: 1NT7QvbetmANwaMzhpVL6
the author didn't mention, but making your package repository fetchable via ftp (or http i guess), and seeting PACKAGEROOT=ftp://yourserver allows you to do pkg_add -r from your machines, and the dependencies will fetch and install themselves.
There's a great utility in the ports tree called portupgrade. It's very handy and allows for quick and easy upgrading of your ports.
/usr/ports/sysutils/portupgrade
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.
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.
If your /usr directory is that small then you should not be using ports anyway. Just install binary packages using /stand/sysinstall instead. That's what I do on my old Cyrix 5x86/100 mhz machine.
Thought I'd save someone some unnecessary building.
"The lesson to be learned is not to take the comments on slashdot too literally." --Vinnie Falco, BearShare
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.
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...
The differences that exist aren't really all that big - I regularly work on Solaris, AIX, FreeBSD, NetBSD, Debian, Redhat and Mandrake. Yes, there are differences, but checking the syntax via 'man' or even 'info' (if you have info pages installed of course) usually clears it up pretty quickly. Only real problem I have is when I have to work on pesky Windows platforms. The syntax is REALLY different there.
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>)
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.
|>
Here be Dragons