Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jan 2004 08:12:55 -0600
From:      Stephen Hilton <nospam@hiltonbsd.com>
To:        Tillman Hodgson <tillman@seekingfire.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: ANy difference between 5.X ports tree and 4.X ports tree ?
Message-ID:  <20040115081255.428a385f.nospam@hiltonbsd.com>
In-Reply-To: <20040115131844.GL415@seekingfire.com>
References:  <E1AgoC5-000Jwa-O6@dilbert.firstcallgroup.co.uk> <20040114172740.GA24901@memnoch.jk.homeunix.net> <xzpisjdmwld.fsf@dwp.des.no> <20040115091632.GA74072@ruminary.org> <20040115131844.GL415@seekingfire.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 15 Jan 2004 07:18:44 -0600
Tillman Hodgson <tillman@seekingfire.com> wrote:

> On Thu, Jan 15, 2004 at 01:16:32AM -0800, clark shishido wrote:
> > On Thu, Jan 15, 2004 at 09:42:38AM +0100, Dag-Erling Sm?rgrav wrote:
> > > John Kennedy <jk@jk.homeunix.net> writes:
> > >>   There are *lots* of differences between 4.x, 5.x and current given some
> > > 
> > > there is no "more or less".  there is only one ports tree, and a
> > > freshly updated ports tree on a 4.9 box is exactly the same as a
> > > freshly updated ports tree on a 5.2 box.
> > 
> > the actual CVS tree yes, but from a user perspective where some
> > packages may build on 4-STABLE and not on 5-CURRENT there are
> > differences, that's why separate INDEX and INDEX-5 ports listings
> > exist where some ports will build under 4-STABLE but not 5-CURRENT.
> > 
> > One behavioral difference which I like is "make package" where
> > *.tgz packages are 4-STABLE and *.tbz packages are 5-CURRENT.
> 
> It's because of that that I NFS export two copies of the ports tree, one
> for 4.X and one for 5.X. Otherwise the INDEXes were clobbering each
> other and /usr/ports/packages was ... interesting. I also have both i386
> and sparc64 machines, which is yet another twist on packages.
> 
> I'd love to reclaim the disk the disk space by running only a single
> ports tree. I'd also love to have the build server (which is -STABLE)
> perform the all the INDEX making. Is there a clean way to do this?
> 

I am also interested in a solution for this. I use portupgrade and can 
"make index" from 4.9 and get the INDEX file, then "make index" from a 
5.2 box and get INDEX-5, but the "portsdb -u" step seems to make a 
common INDEX.db from 5.2 INDEX-5 or from the 4.9 INDEX file.

In the man page for portsdb there is an environment option for 
"PORTS_DBDIR". If I set my environment options in the pkgtools.conf file 
for the 4.9 and 5.2 boxes to place the INDEX.db in /var/db/pkg and 
rm the INDEX.db from the /usr/ports directory then each machine should 
have its "version appropriate" INDEX.db file in its /var/db/pkg dir.

Snipped from my /usr/local/etc/pkgtools.conf files:

FreeBSD 5.2
------------------------------------------
   ENV['PORTSDIR'] ||= '/usr/ports'
   ENV['PORTS_INDEX'] ||= ENV['PORTSDIR'] + '/INDEX-5'
   ENV['PKG_DBDIR'] ||= '/var/db/pkg'
   ENV['PKG_TMPDIR'] ||= '/var/tmp'
   ENV['PORTS_DBDIR'] ||= ENV['PKG_DBDIR']
   ENV['PACKAGES'] ||= ENV['PORTSDIR'] + '/packages'
   ENV['PKG_PATH'] ||= ENV['PACKAGES'] + '/All'
------------------------------------------

FreeBSD 4.9
------------------------------------------
   ENV['PORTSDIR'] ||= '/usr/ports'
   ENV['PORTS_INDEX'] ||= ENV['PORTSDIR'] + '/INDEX'
   ENV['PKG_DBDIR'] ||= '/var/db/pkg'
   ENV['PKG_TMPDIR'] ||= '/var/tmp'
   ENV['PORTS_DBDIR'] ||= ENV['PKG_DBDIR']
   ENV['PACKAGES'] ||= ENV['PORTSDIR'] + '/packages'
   ENV['PKG_PATH'] ||= ENV['PACKAGES'] + '/All'
------------------------------------------

This seems to work for me, but would like some feedback as to whether 
this is the correct way to accomplish this.


Regards,


Stephen Hilton
nospam@hiltonbsd.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040115081255.428a385f.nospam>