ANy difference between 5.X ports tree and 4.X ports tree ?
Stephen Hilton
nospam at hiltonbsd.com
Thu Jan 15 07:13:49 PST 2004
On Thu, 15 Jan 2004 08:12:55 -0600
Stephen Hilton <nospam at hiltonbsd.com> wrote:
> On Thu, 15 Jan 2004 07:18:44 -0600
> Tillman Hodgson <tillman at 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 at 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.
>
After reading my post I see that the issue of package building for
5.2 and 4.9 was not addressed.
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'] + '/packages5.2'
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'] + '/packages4.9'
ENV['PKG_PATH'] ||= ENV['PACKAGES'] + '/All'
------------------------------------------
Then mkdir /usr/ports/packages5.2 and mkdir /usr/ports/packages4.9
This also seems to work fine for me, but would like some feedback as to
whether this is the correct way to accomplish this. My /usr/ports dir
is an NFS mount (rw) so either machine can add distfiles and the ports
work directorys are set to /var/portswrk by this environment variable
set in my /etc/make.conf:
------------------------------------------
# Ports can place their working directories somewhere other than under
# /usr/ports.
WRKDIRPREFIX= /var/portswrk
------------------------------------------
Things to keep in mind, /var in my examples has _lots_ of free space,
running "portsclean -DD" is probably not a good idea if the 4.9 box
and the 5.2 box have different installed ports, due to distfile
deletions.
Regards,
Stephen Hilton
nospam at hiltonbsd.com
More information about the freebsd-stable
mailing list