From owner-freebsd-questions@FreeBSD.ORG Fri Aug 29 14:33:14 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03D4AFD for ; Fri, 29 Aug 2014 14:33:14 +0000 (UTC) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C267314BA for ; Fri, 29 Aug 2014 14:33:13 +0000 (UTC) Received: from [192.168.0.27] (rbn1-216-180-19-81.adsl.hiwaay.net [216.180.19.81]) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id s7TEXCAw019718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 29 Aug 2014 09:33:12 -0500 Message-ID: <5400909F.4070508@hiwaay.net> Date: Fri, 29 Aug 2014 09:39:27 -0500 From: "William A. Mahaffey III" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: "FreeBSD Questions !!!!" Subject: Re: Re-2: Ports question .... References: <0000BD3F.54009A01@rainbow.spectrumcs.net> In-Reply-To: <0000BD3F.54009A01@rainbow.spectrumcs.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2014 14:33:14 -0000 On 08/29/14 09:19, steve wrote: > > -------- Original Message -------- > Subject: Re: Ports question .... (29-Aug-2014 14:45) > From: Arthur Chance > To: freebsd-questions@spectrumcs.net > >> On 29/08/2014 13:59, William A. Mahaffey III wrote: >> [huge snip] >> >>> I have been using portsnap, I just couldn't figure out how to get it to >>> tell me what ports had been updated since I last fetched (w/o fetching >>> again) .... >> It's my experience that you don't want to be told which ports have been >> updated, as most updates are to ports you're not the slightest bit >> interested in. There are nearly 25,000 ports according to FreshPorts and >> I personally have only about 400 installed on my desktop machine (and >> far fewer on my servers). That means on average I'm totally uninterested >> in 98+% of all port updates. >> >> What you need to know is what *installed* ports are out of date with >> respect to the new ports tree. That's where the 400.status-pkg periodic >> script is useful. I update my ports tree via a crontab entry at 23:00 on >> Fridays, and the weekly periodic script runs at 4:15 on Saturday, so I >> get mail every Saturday morning telling me which installed ports are out >> of date. > For what it's worth I have two scripts I've created. > > # ll /usr/local/sbin/scs-check-for-* > /usr/local/sbin/scs-check-for-ports-updates-cron.sh > /usr/local/sbin/scs-check-for-ports-updates.sh > > # less /usr/local/sbin/scs-check-for-ports-updates-cron.sh > #!/bin/sh > /usr/sbin/portsnap cron update && /usr/sbin/pkg version -vIL= > > # less /usr/local/sbin/scs-check-for-ports-updates.sh > #!/bin/sh > /usr/sbin/portsnap fetch update && /usr/sbin/pkg version -vIL= > read -r -p "Press Enter key to continue..." key > less /usr/ports/UPDATING > > and then I have a symlink set to call the cron version on a daily basis. > > ll /etc/periodic/daily/*scs-check-for-ports* > lrwxr-xr-x 1 root wheel 51B Jan 14 2013 /etc/periodic/daily/610.scs-check-for-ports-updates-cron.sh -> /usr/local/sbin/scs-check-for-ports-updates-cron.sh > > The use of the cron command vs a simple fetch means portsnap waits a random time between 0 and 3600 seconds (1 hour) before fetching. This helps to prevent everyone hitting the port tree servers at exactly the same time (usually we admins cron on the hour). > > # portsnap > usage: portsnap [options] command ... [path] > > Options: > -d workdir -- Store working files in workdir > (default: /var/db/portsnap/) > -f conffile -- Read configuration options from conffile > (default: /etc/portsnap.conf) > -I -- Update INDEX only. (update command only) > -k KEY -- Trust an RSA key with SHA256 hash of KEY > -l descfile -- Merge the specified local describes file into the INDEX. > -p portsdir -- Location of uncompressed ports tree > (default: /usr/ports/) > -s server -- Server from which to fetch updates. > (default: portsnap.FreeBSD.org) > path -- Extract only parts of the tree starting with the given > string. (extract command only) > Commands: > fetch -- Fetch a compressed snapshot of the ports tree, > or update an existing snapshot. > cron -- Sleep rand(3600) seconds, and then fetch updates. > extract -- Extract snapshot of ports tree, replacing existing > files and directories. > update -- Update ports tree to match current snapshot, replacing > files and directories which have changed. > > Because this script is cron daily in my "[HOSTNAME] daily run output" email I get every morning I see something like.... > > amavisd-new-2.8.0_2,1 < needs updating (index has 2.9.1,1) > syslog-ng-3.5.4.1 < needs updating (index has 3.5.6_3) > > > > Regards > > Scotter > > > To: freebsd@qeng-ho.org > wam@hiwaay.net > freebsd-questions@freebsd.org > > > DISCLAIMER > This email is for the use of the intended recipient(s) only. If you have received this email in error, please notify the sender immediately and then delete it. > If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this email without the authors prior permission. > We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this message. > We cannot accept liability for any loss or damage caused by software viruses. > The information contained in this communication may be confidential and may be subject to the attorney-client privilege. > If you are the intended recipient and you do not wish to receive similar electronic messages from us in future then please respond to the sender to this effect. > > > _______________________________________________ > 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" > *Thanks* !!!! That answers *much* :-) .... -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.