From owner-freebsd-ports@FreeBSD.ORG Wed Dec 1 06:18:28 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C5B9106566C; Wed, 1 Dec 2010 06:18:28 +0000 (UTC) (envelope-from ws@au.dyndns.ws) Received: from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net [150.101.137.141]) by mx1.freebsd.org (Postfix) with ESMTP id 96ED68FC13; Wed, 1 Dec 2010 06:18:27 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApEBABJx9UyWZWdv/2dsb2JhbAAH53CFRwSJcg Received: from ppp103-111.static.internode.on.net (HELO [192.168.1.144]) ([150.101.103.111]) by ipmail04.adl6.internode.on.net with ESMTP; 01 Dec 2010 16:32:53 +1030 From: Wayne Sierke To: Doug Barton In-Reply-To: <4CF552E3.2080904@FreeBSD.org> References: <201011301824.15550.david@vizion2000.net> <4CF552E3.2080904@FreeBSD.org> Content-Type: text/plain; charset="ASCII" Date: Wed, 01 Dec 2010 16:32:50 +1030 Message-ID: <1291183370.2093.35516.camel@predator-ii.buffyverse> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: David Southwell , freebsd-ports@freebsd.org Subject: Re: Ports - installation & upgrade history X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2010 06:18:28 -0000 On Tue, 2010-11-30 at 11:39 -0800, Doug Barton wrote: > On 11/30/2010 10:24, David Southwell wrote: > > > > Hi > > > > I was idly wondering how easy/difficult it might be to maintain and access an > > historical record of port installations and upgrades on a particular system. > > ports-mgmt/portmaster has the capability to log this information for > you. Look in the man page in the ENVIRONMENT section for more information. ports-mgmt/portupgrade also has a logging capability. See this post for details on configuring pkgtools.conf for date-stamped logfiles: http://lists.freebsd.org/pipermail/freebsd-ports/2004-December/019221.html I've been using this to retain the date-stamped portupgrade history for each port: require "date" PORTUPGRADE_ARGS = ENV['PORTUPGRADE'] || \ '-v -D --results-file /var/tmp/portupgrade.results ' + \ '--log-file /var/tmp/portupgrade-%s::%s-' + \ DateTime.now.strftime("%Y%m%d%H%M%S") + '.log' Of course, this technique is only effective when the corresponding tool is used, but not for "cd portdir && make [de|re]install" installs/updates. I'm currently working on a script to record config file changes to a subversion repo and had already thought that it should be useful for recording changes in /var/db/ports and /var/db/pkg which ought to track something useful about port upgrades and port options changes. I suppose it wouldn't be too hard to keep a "shadow" copy of these dirs and cron a daily script to record diffs, etc., too. Wayne