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."
EARLY GODDAMN POST!
BSD IS DYING!
It's a good thing that SCO isn't claiming ownership to ALL Unix variants... otherwise they'd have to call it 699DollarsBSD!
The GNAA is a small loose knit group of trolls whose sole purpose is to post retarded shit to various websites. Membership of the group is really irrelevant, but they do have guidelines, which are really just part of their elaborate "troll". Basically, you gotta be a nigger, gay, or both, blah blah. Post an fp for the group and your ub3r l33t, bs ,bs . ...
The cold hard facts about the GNAA
There's nothing gay or black about the GNAA. In fact, the GNAA doesnt have a single gay or black member at all, and most likely never will.
IRC Chat log
(Nws4Turds) pocide
(Nws4Turds) i m teh luv j00!
(koft) yo, st0p b3ing teh gay
(koft) gh3y is teh sux0r
(pocide) i luv u 2 Nws4Turds !, lets felch!
(Nws4Turds) y3s!
(Nws4Turds) pocide
(koft) ph3lch is teh sux0r
(Nws4Turds) i like teh ph3lch
(koft) thats nasty, yall are gay niggers if i ever saw gay niggers
(Nws4Turds) i'm a gay nigger
(koft) stop being t3h gh3y.
(Nws4Turds) actually, i'm a straight honkey
And at this point, Nws4Turds ebraces his heterosexuality, coming out of a "reverse closet" for a brief moment, exposing his inner self. He then feels the need to expound on this idea.
(Nws4Turds) i had sex this morning
(Nws4Turds) it felt good
(Nws4Turds) she came twice
After these statements i was threatened!
(pocide) k0ft: do not even attempt to fr0st
(pocide) not only will YFI but you'd be testin my gangsta and you don't wanna do that, oh no
Following our conversation, my ids picked up a portscan from 24.174.81.26, the address from a user in the channel known as "penisbird".
(pocide) I see your running IIS and exchange. your machine is going down the deep dark anus hole of goatse!
(koft) Damn, i didnt realize that apache and sendmail were part of IIS and exchange... You guys are leeter that i immagined...
Truth: GNAA is a group of wanna be script kiddies who troll on lame message boards like 'Slashdot'
Truth: The GNAA leader 'PenisBird' has a prefrence for porn depicting under age individuals
Truth: All GNAA members are white
Truth: None of the GNAA members are gay
Truth: All GNAA members live with their mothers
Don't take my word for it though, check out the lameness for yourself. efnet #GNAA
For endless "BSD is dying"....
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.
Yes, but does it run Linux?
After configuring the setup and all that stuff I tried to add a package:
% pkg_add /mnt/www/smp-support-fo-freebsd.tbz
I just would not work so I would appreciate some help. Have I missed something?
(I do know that this is not a help-forum etc so please don't mod me as offtopic. Thanks.)
Proud patriot and republican voter.
SlashcodeBIOS 2.5.8
/dev/tty1.
Dectecting decives
USB 2.0 Fullspeed ports
100 Gb Maxtor HD
AA-BB-CC CDW
512 Mb DDR 500 Ram
5 ISA Slots
AMD Opteron 3000+ @ 1.999 Ghz.
Now booting from bootsector 0...
Loading.............
FreeBSD (Version 5.3, compiled by Mookore for slashdcode on a i786)
Decting devices..
Decting drives
Decting spellchecker...
ERROR : Unable to intialise spel checker, spellin mai be wron.
Kernel HALT!!! Cow dectected in stack. Dumping stack to
0x01: ______________
0x02:< BSD IS DYING >
0x03: --------------
0x04: \ ^__^
0x05: \ (oo)\_______
0x06: (__)\ )\/\
0x07: ||----w |
0x08: || ||
0x09: Lameness filter encountred
0:0A: Reason : perl may be powerful, but it can't
0:0B: Be an operating system.
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.
Owner of a Mensa membership card.
[to save Slashdot users' bandwidth, a reply about how Gentoo GNU/Linux does most of this stuff, too, and some of it (like making package repositories) in an easier way has been deleted from this space]
Please, all these lame SCO jokes are starting to get on my nerves. In the last 50+ stories I have yet to se one without a bad SCO joke.
Okay, some of them are funny and all that stuff but common.
And people should respect SCO's right to come with claims about Intellectual Property just as any other company. I'm pretty certain that they would not have made such a fuzz about it unless they have some basis behind their claims. So I guess they know what they are doing.
Melius mori in libertate quam vivere in servitute.
Let's keep this thread Gentoo-free, shall we?
[note: I actually use Gentoo, but Gentoo fanboys usually get on my nerves]
OLPC Australia
The complaint of many people who don't want to switch to BSD from Linux is that there aren't binary packages available and that they don't want to compile everything in ports. This article demonstrates that, indeed, using the ports collection, it is possible to check out and install binary packages using the pkg-* utilities.
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 and the FreeBSD diary.
www.sitetronics.com/wordpress
What the fuck happened?
Ahhh sometimes I hate html and at the same time I frgot the Preview button. At the same time I did a Ctrl-v from some posting in a journal and everything got screwed up. So my post above is just pure crap, missing context, sentences, logic and uhh everything. Someone please mod it down. Thanks.
Melius mori in libertate quam vivere in servitute.
/ Is the only +5 insightful thing here on \ /
| slashdot.org go troll www.osnews.com |
\ instead
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
$ make install
Reading the article just makes me yearn for a true BSD ports system on OS X.
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.
smp-support-fo-freebsd.tbz
heh, good one
If you just change the spelling a little bit and call it "e-chair", people will line up to try it.
Really. Download the source for BitTorrent, unpack it and run the script. The command line version "just works" out of the box if you have Python installed, graphical versions may not depending on what packages you've got installed.
There wasn't much to "port" except dependancies.
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.
I just heard some sad news on talk radio - Horror/Sci Fi writer Stephen King was found dead in his Maine home this morning. There weren't any more details. I'm sure everyone in the Slashdot community will miss him - even if you didn't enjoy his work, there's no denying his contributions to popular culture. Truly an American icon.
But Portage is...
Screw it, I can't be arsed. You've heard it all before.
My biggest concern about FreeBSD's port collection is that it's essentially "unstable". That is, it seems to be changing on the time. Imagine that you need to setup a web server at one customer's site that requires a set of packages from the ports collection to make the site work. A couple of months later, if you need another server like this, perhaps for a different customer, you might end up with different versions of the tools even though you're running the same version of FreeBSD at both sites. Perhaps, this is a great system for someone who wants to always keep running the latest and greatest but for people who'd like a stable working environment this is an annoyance. Since, I am averse to change, I also like to update only say the packages that have serious bugs or security problems. But with the ports collection, 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.
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).
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
let's guess that you have some near-term ability to operate your os/network, even if it's the whoreabull payper liesense BugWear(tm) distributed buy the evile kingdumb.
now what are you going to do?
more breathing. consult with/trust in yOUR creator. vote with yOUR wallet. that's the spirit.
yOUR intentions/behaviours will disempower the greed/fear based georgewellian fuddite murdering thieves. that's not a trick you say? right again.
should we (that includes you) fail to assist in the termination of the behaviours of the Godless execrable, there'll be few ports that are worth visiting.
pay attention. it's affordable, & can leave one with the sense of not being misled by the walking dead.
we don't need no stinking bombs. if you're in the bomb making/shipping/firing 'business', you need to check yourself out. don't think that 'got to make a living' lament will hold up at all.
the lights are coming up now. we're in crisis mode. you can help. do us all a favor, for a change.
[ed. note: in the following text, former FreeBSD developer Mike Smith gives his reasons for abandoning FreeBSD]
When I stood for election to the FreeBSD core team nearly two years ago, many of you will recall that it was after a long series of debates during which I maintained that too much organisation, too many rules and too much formality would be a bad thing for the project.
Today, as I read the latest discussions on the future of the FreeBSD project, I see the same problem; a few new faces and many of the old going over the same tired arguments and suggesting variations on the same worthless schemes. Frankly I'm sick of it.
FreeBSD used to be fun. It used to be about doing things the right way. It used to be something that you could sink your teeth into when the mundane chores of programming for a living got you down. It was something cool and exciting; a way to spend your spare time on an endeavour you loved that was at the same time wholesome and worthwhile.
It's not anymore. It's about bylaws and committees and reports and milestones, telling others what to do and doing what you're told. It's about who can rant the longest or shout the loudest or mislead the most people into a bloc in order to legitimise doing what they think is best. Individuals notwithstanding, the project as a whole has lost track of where it's going, and has instead become obsessed with process and mechanics.
So I'm leaving core. I don't want to feel like I should be "doing something" about a project that has lost interest in having something done for it. I don't have the energy to fight what has clearly become a losing battle; I have a life to live and a job to keep, and I won't achieve any of the goals I personally consider worthwhile if I remain obligated to care for the project.
Discussion
I'm sure that I've offended some people already; I'm sure that by the time I'm done here, I'll have offended more. If you feel a need to play to the crowd in your replies rather than make a sincere effort to address the problems I'm discussing here, please do us the courtesy of playing your politics openly.
From a technical perspective, the project faces a set of challenges that significantly outstrips our ability to deliver. Some of the resources that we need to address these challenges are tied up in the fruitless metadiscussions that have raged since we made the mistake of electing officers. Others have left in disgust, or been driven out by the culture of abuse and distraction that has grown up since then. More may well remain available to recruitment, but while the project is busy infighting our chances for successful outreach are sorely diminished.
There's no simple solution to this. For the project to move forward, one or the other of the warring philosophies must win out; either the project returns to its laid-back roots and gets on with the work, or it transforms into a super-organised engineering project and executes a brilliant plan to deliver what, ultimately, we all know we want.
Whatever path is chosen, whatever balance is struck, the choosing and the striking are the important parts. The current indecision and endless conflict are incompatible with any sort of progress.
Trying to dissect the above is far beyond the scope of any parting shot, no matter how distended. All I can really ask of you all is to let go of the minutiae for a moment and take a look at the big picture. What is the ultimate goal here? How can we get there with as little overhead as possible? How would you like to be treated by your fellow travellers?
Shouts
To the Slashdot "BSD is dying" crowd - big deal. Death is part of the cycle; take a look at your soft, pallid bodies and consider that right this very moment, parts of you are dying. See? It's not so bad.
To the bulk of the FreeBSD committerbase and the developer community at large - keep your eyes on the real goals. I
Once you get past the fact that *BSD is fragmented between a myriad of incompatible kernels, there is the historical record of failure and of failed operating systems. *BSD experienced moderate success about 15 years ago in academic circles. Since then it has been in steady decline. We all know *BSD keeps losing market share but why? Is it the problematic personalities of many of the key players? Or is it larger than their troubled personalities?
The record is clear on one thing: no operating system has ever come back from the grave. Efforts to resuscitate *BSD are one step away from spiritualists wishing to communicate with the dead. As the situation grows more desperate for the adherents of this doomed OS, the sorrow takes hold. An unremitting gloom hangs like a death shroud over a once hopeful *BSD community. The hope is gone; a mournful nostalgia has settled in. Now is the end time for *BSD.
How many "ports" stories do we really need? Every other story in the BSD
section is a rehash of the same "ports" story. Enough already.
"[to save Slashdot users' bandwidth, a reply about how Gentoo GNU/Linux does most of this stuff, too, and some of it (like making package repositories) in an easier way has been deleted from this space]"
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. 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. 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 when you need him?
Steve
Linux and BSD User
It is mostly common knowledge that *BSD is dying, that ever hapless *BSD is mired in an irrecoverable and mortifying tangle of fatal trouble. It is perhaps anybody's guess as to which *BSD is the worst off of an admittedly suffering *BSD community. The numbers continue to decline for *BSD but FreeBSD may be hurting the most. Look at the numbers. The loss of user base for FreeBSD continues in a head spinning downward spiral.
OpenBSD leader Theo states that there are 7000 users of OpenBSD. How many users of BSD are there? Let's see. The number of OpenBSD versus NetBSD posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 NetBSD users. BSD/OS posts on Usenet are about half of the volume of NetBSD posts. Therefore there are about 700 users of BSD/OS. A recent article put FreeBSD at about 80 percent of the *BSD market. Therefore there are (7000+1400+700)*4 = 36400 FreeBSD users. This is consistent with the number of FreeBSD Usenet posts.
Due to the troubles of Walnut Creek, abysmal sales and so on, FreeBSD went out of business and was taken over by BSDI who sell another troubled OS. Now BSDI is also dead, its corpse turned over to yet another charnel house.
All major marketing surveys show that *BSD has steadily declined in market share. *BSD is very sick and its long term survival prospects are very dim. If *BSD is to survive at all it will be among OS hobbyist dilettante dabblers. In truth, for all practical purposes *BSD is already dead. It is a dead man walking.
Fact: *BSD is dying
I've got a NetBSD box running as my external (wild, hairy, unsafe) webserver.
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.
"Draco dormiens nunquam titillandus."
Mod this up to at least a 3 - it's FUNNY! Where's that sense of humor on a Sunday morn?
Too lazy to create a sig...
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.
"OnLamp's Dru Lavigne demonstrates several of these tricks to simplify your life."
If there's any family connection, this article was written for him by an editor, and repackaged to sell his image.
"Dru Lavigne (snip) where she teaches"
FreeBSD carries more free packages than debian! That ports system is great.
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.
I don't want to start a holy war here, but what is the deal with you BSD fanatics? I've been sitting here at my freelance gig in front of a BSD box (a PIII 800 w/512 Megs of RAM) for about 20 minutes now while it attempts to copy a 17 Meg file from one folder on the hard drive to another folder. 20 minutes. At home, on my Pentium Pro 200 running NT 4, which by all standards should be a lot slower than this BSD box, the same operation would take about 2 minutes. If that.
In addition, during this file transfer, Netscape will not work. And everything else has ground to a halt. Even Emacs Lite is straining to keep up as I type this.
I won't bore you with the laundry list of other problems that I've encountered while working on various BSD machines, but suffice it to say there have been many, not the least of which is I've never seen a BSD box that has run faster than its Windows counterpart, despite the BSD machines faster chip architecture. My 486/66 with 8 megs of ram runs faster than this 800 mhz machine at times. From a productivity standpoint, I don't get how people can claim that BSD is a "superior" machine.
BSD addicts, flame me if you'd like, but I'd rather hear some intelligent reasons why anyone would choose to use a BSD over other faster, cheaper, more stable systems.
Someone read the man page about something and posted an article about it. This is such an amazing event that it meritys front page news on slashdot.
By Chinese Karma Whore, Version 1.0
Everyone knows about BSD's failure and imminent demise. As we pore over the history of BSD, we'll uncover a story of fatal mistakes, poor priorities, and personal rivalry, and we'll learn what mistakes to avoid so as to save Linux from a similarly grisly fate.
Let's not be overly morbid and give BSD credit for its early successes. In the 1970s, Ken Thompson and Bill Joy both made significant contributions to the computing world on the BSD platform. In the 80s, DARPA saw BSD as the premiere open platform, and, after initial successes with the 4.1BSD product, gave the BSD company a 2 year contract.
These early triumphs would soon be forgotten in a series of internal conflicts that would mar BSD's progress. In 1992, AT&T filed suit against Berkeley Software, claiming that proprietary code agreements had been haphazardly violated. In the same year, BSD filed countersuit, reciprocating bad intentions and fueling internal rivalry. While AT&T and Berkeley Software lawyers battled in court, lead developers of various BSD distributions quarreled on Usenet. In 1995, Theo de Raadt, one of the founders of the NetBSD project, formed his own rival distribution, OpenBSD, as the result of a quarrel that he documents on his website. Mr. de Raadt's stubborn arrogance was later seen in his clash with Darren Reed, which resulted in the expulsion of IPF from the OpenBSD distribution.
As personal rivalries took precedence over a quality product, BSD's codebase became worse and worse. As we all know, incompatibilities between each BSD distribution make code sharing an arduous task. Research conducted at MIT found BSD's filesystem implementation to be "very poorly performing." Even BSD's acclaimed TCP/IP stack has lagged behind, according to this study.
Problems with BSD's codebase were compounded by fundamental flaws in the BSD design approach. As argued by Eric Raymond in his watershed essay, The Cathedral and the Bazaar, rapid, decentralized development models are inherently superior to slow, centralized ones in software development. BSD developers never heeded Mr. Raymond's lesson and insisted that centralized models lead to 'cleaner code.' Don't believe their hype - BSD's development model has significantly impaired its progress. Any achievements that BSD managed to make were nullified by the BSD license, which allows corporations and coders alike to reap profits without reciprocating the goodwill of open-source. Fortunately, Linux is not prone to this exploitation, as it is licensed under the GPL.
The failure of BSD culminated in the resignation of Jordan Hubbard and Michael Smith from the FreeBSD core team. They both believed that FreeBSD had long lost its earlier vitality. Like an empire in decline, BSD had become bureaucratic and stagnant. As Linux gains market share and as BSD sinks deeper into the mire of decay, their parting addresses will resound as fitting eulogies to BSD's demise.
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