Re: portupgrade stale dependencies

From: Andrew P. (infofarmer_at_gmail.com)
Date: 10/31/05

  • Next message: Micah: "Re: ghostscript headaches"
    Date: Mon, 31 Oct 2005 05:00:36 +0300
    To: John DeStefano <john.destefano@gmail.com>
    
    

    On 10/31/05, John DeStefano <john.destefano@gmail.com> wrote:
    > On 10/29/05, Andrew P. <infofarmer@gmail.com> wrote:
    > > On 10/29/05, John DeStefano <john.destefano@gmail.com> wrote:
    > > >
    > > > Needless to say, this process wasn't much fun. What can I do to keep
    > > > this from happening again? What can/can't I safely include in cron to
    > > > automate database and index maintenance?
    > > >
    > >
    > > cvsup or portsnap, then portsdb -uUF. Work under
    > > any circumstances, leave you with updated ports
    > > tree and indexes.
    >
    > If I were to continue to use portsnap, which arguments can I safely
    > add to /etc/crontab? I know "portsnap cron" should be safe, but if I
    > want to completely automate the update process (not for installing
    > packages, but for keeping the ports tree, database, and indexes
    > current), should I also add an entry for "portsnap update" and
    > "portsdb -uUF"?
    >
    > >
    > > You can also try portupgrade -aF (prefetches
    > > needed files to speed up manual upgrade at a later
    > > time) and portsclean -DP (removes sources and
    > > packages which become outdated due to ports
    > > tree updates).
    > >
    >
    > Would you also recommend cron entries for these two commands?
    >
    > I used to use a cron job to run cvsup, and I'd like to implement a
    > better, more complete automated solution, so I don't tangle up my
    > system's packages and dependencies again.
    >

    I think the best way is to create a shell script, like this:

    #!/bin/sh
    /usr/local/sbin/portsnap cron && \
    /usr/local/sbin/portsnap update && \
    /usr/local/sbin/portsdb -uUF && \
    /usr/local/sbin/portupgrade -aF && \
    /usr/local/sbin/portsclean -DP

    and run it at an hour, when you're most unlikely to
    perform any kind of port upgrading. As portsnap
    manpage warns, if both portsnap (in the process
    of update) and portupgrade ever happen to access
    the same directory at once, it might ruin your
    ports tree. You'll have to do "portsnap extract"
    after that. You can leave out portsclean and run
    it manually, because it can create some load
    (which is not desirable on a production server).

    I run this script daily at 8-9 in the morning (I usually
    start messing with servers after 11). It never failed,
    and it always keeps everything up-to-date.
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Micah: "Re: ghostscript headaches"

    Relevant Pages

    • Re: [HOW-TO] cvsup for ports -- Re: compact portsnap db
      ... It is better to use all ports or all packages so either do: ... people install php at all. ... And yes there are some ports that don't have packages for licencing ... Preferring cvsup to portsnap is kinda like preferring vim ...
      (freebsd-questions)
    • Re: [HOW-TO] cvsup for ports -- Re: compact portsnap db
      ... The only problems I've ever seen with installing packages is that at ... And yes there are some ports that don't have packages for licencing etc ... though I can't recall ever having to install one of those. ... >> Preferring cvsup to portsnap is kinda like preferring vim over ...
      (freebsd-questions)
    • Re: portupgrade stale dependencies
      ... >> If I were to continue to use portsnap, ... >> system's packages and dependencies again. ... My server is not "production", as it's just my personal web/database ... should be okay with this procedure, and I'll manually update any ports ...
      (freebsd-questions)
    • RE: Reflections on Trusting Trust
      ... > tree - which gets back to the issue of trusting the FreeBSD distribution. ... Anyone who is between you and freebsd cvsup server can make his own ports ... yet, installing a ca-root certificates port, downloading a public key or ... resynching your ports tree implies on network transmission of certificates, ...
      (FreeBSD-Security)
    • Re: Totally lost
      ... There is a target there for "updating" the tree via ... that it's not in the ports. ... what's the difference in using cvsup or portupdate to update the ... (I can only assume that if there's such a thing as 'portupdate', ...
      (freebsd-questions)