Slashdot Mirror


Portupgrade on FreeBSD

BSD Forums writes "In her previous article, OnLamp's Dru Lavigne took a look at the built-in utilities that can be used to manage the FreeBSD ports collection. In this article, she'd like to continue in that vein. She takes a look at portupgrade, a feature-rich port designed to help you get the most out of the ports collection."

13 of 119 comments (clear)

  1. portupgrade is a port by JDizzy · · Score: 4, Insightful

    The thing that tweaks me is that portupgrade should be part of the base system. Portupgrade and friends should be writen in something aside from ruby (becuse we dont' want ruby in base). It is probably the most usefull and powerfull package/port managment tool ever created since the freebsd ports is already the best package system in all of open source. FreeBSD ports is always immitated, yet never replicated in full glory. It nice that portupgrade traces down dependancies automatically (forward, or reverse), and can cleanout stale lib's and such.

    --
    It isn't a lie if you belive it.
    1. Re:portupgrade is a port by drdink · · Score: 4, Insightful

      Portupgrade should not be part of the base system. If you look, you'll see that CVSup is not part of the base system, either. CVSup is the tool you use to update both your source and ports trees, and it isn't part of the base! I believe the current mindset among many is that the base should be smaller, and more should be offloaded to ports. For example, Sendmail shouldn't be part of the base system. Ports are a great tool, but they are not a necessary part of the system.

      --
      Beware, Nugget is watching... See?
  2. Wow by Sevn · · Score: 4, Interesting

    I'm humbled. I used ports forever, even dabbled with portupgrade on FreeBSD and still was of the opinion that Gentoo portage was "better". If anything, I'd say they are neck and neck now. VERY good article. From someone that has to manage a whole bunch of FreeBSD machines, this article hit the spot. Now I'll just add portsdb -Uu and pkgdb -F to my nightly cvsup cron job. If you take the time to set up your cvsup stuff in /etc/defaults/make.conf, updating your sources and ports is as easy as:

    cd /usr/src
    make update

    To translate for Gentoo users:

    emerge -upD world becomes:

    portversion -L "="

    and emerge -uD world becomes:

    portupgrade -arR

    Oh, and etc-update has always been:

    mergemaster

    Though mergemaster does kinda suck until you get used to it. Not that etc-update is an e-ticket ride either.

    --
    For every annoying gentoo user, are three even more annoying anti-gentoo crybabies. Take Yosh from #Gimp for example.
    1. Re:Wow by pillohead · · Score: 5, Insightful

      Are you a developer? I can't think of a reason why you need to cvsup nightly. Also you can have one machine do the cvsup then export /usr/ports via nfs to the other machines.

      I wouldn't edit the /etc/defaults/make.conf, in fact I wouldn't edit anything in the /etc/defaults folder. Copy that file to /etc/make.conf it will override the default without altering it.

    2. Re:Wow by Sevn · · Score: 4, Interesting

      I cvsup nightly because it really doesn't matter. That and a lot of these machines are commercial webhosting platforms. One very tiny nightly cvsup is going to take a lot less time than a weekly or monthly update. If it's done nightly, chances are that any security update I hear about from freebsd-security-announce is already there. Also more likely any port with a security problem is upgraded also. That's why I cvsup nightly. I admin 300+ machines that are all facing the world. On each network, I cvsup ONE machine, then push the packages out to the other machines in the farm. In keeping with my "hands off, zero administration" approach, I prefer using cron'd rsync to keep a package directory updated instead of using nfs which is sometimes thought of as an acronym for "NO FUCKING SECURITY". My scripts then install my pre-approved packages from the local package directories on each slave machine. Editing /etc/default/make.conf is of little concern to me because I know the meaning of every single line in the file as I've been using FreeBSD since version 2.1.7. I suppose I could copy it to /etc and only put the differences in there, but it's really not that big of a deal. Rc.conf is something I don't mess with though. I do edit the one in /etc and leave the one in /etc/defaults alone. FreeBSD is kinda how I pay for my car and my house and my food. But hey, thanks for the tips!

      --
      For every annoying gentoo user, are three even more annoying anti-gentoo crybabies. Take Yosh from #Gimp for example.
    3. Re:Wow by dodell · · Score: 3, Insightful

      Not to troll, but your hostility is completely unnecessary. You could have said you were familiar with the process you needed to take and say thanks anyway. The sarcasm is really unnecessary. It adds to an "elitist" outlook on the BSD community (one that OpenBSD already contributes enough to) and discourages people from migrating. The dude has no way to know you've got such experience with FreeBSD.

      Granted Linux has got a whole lot of these pissing contests going on all the time... we don't need them in BSD.

  3. No by cperciva · · Score: 5, Insightful

    The ports tree is good. Better than the base system; stuff in the ports tree is split into nice self-contained packages, while the base system is a single monolithic mess.

    We need to hack parts of the base system off and put them into ports (like kerberos), not add more stuff into the base system.

    1. Re:No by JDizzy · · Score: 4, Informative

      I admit you have an intersting perspective, and i would point out that you can build your system without kerberos via make.conf options. Same for Sendmail, etc...

      --
      It isn't a lie if you belive it.
  4. Excellent by thanjee · · Score: 3, Interesting

    Dru Lavigne writes so many really useful articles. Has she got a book on the way?

    --
    Saying your OS is the best because more people use it is like saying MacDonalds make the best food
  5. Re:I don't mean to be a jerk, by kruntiform · · Score: 5, Interesting

    portupgrade is at least 2 years old... It kicks ass, but it's hardly news

    portupgrade is not news, but new user documentation is news. Well, if it's good documentation, then it's news. I read a few sections of it just now, and I think it's pretty good. It's written in a direct, readable style and has lots of examples. Since it answered some questions I had about portupgrade, it seems to me to be comprehensive. So, this is pretty cool. One of the best things about BSD is the quality of the documentation.

  6. sense of humor by doiuf · · Score: 5, Funny
    Dru's written some excellent articles, and she manages to put in some humor as well. Keep up the good work :)
    "If you're ever asked to run pkgdb -F, do it. However, don't interrupt this command, or you'll end up with an inconsistent database. If you're ever in that unfortunate situation, this command will fix the inconsistencies:

    % pkgdb -fu

    That's a pretty easy switch combo to remember, as similar thoughts will probably be running through your head at the time."

  7. But.... by xA40D · · Score: 4, Informative

    Reasonable article.... But running an automatic portupgrage without paying attention to what's actually being upgraded is a really bad move.

    Upgrading Apache for instance will trash your running config. Whereas MySQL is a bitch to upgrade as by default it will fail if there is an existing DB.

    I find portupgrade -ai is a much better option.

    And a backup of /etc/ and /usr/local/etc would be a good idea first....

    --
    Do you mind, your karma has just run over my dogma.
    1. Re:But.... by OpperNerd · · Score: 5, Informative

      I always use the -P option:

      portupgrade -aRrPv

      this does check if there's a package available. Saves a lot of time.

      --
      -- unix is for people without a social life - Patrick van Eijk