Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Mar 2004 11:43:56 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        adp <dap99@i-55.com>
Cc:        questions@freebsd.org
Subject:   Re: Handling lots of custom packages..
Message-ID:  <20040307114356.GB52694@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <001701c403f5$1a0ff220$6401a8c0@yourqqh4336axf>
References:  <001701c403f5$1a0ff220$6401a8c0@yourqqh4336axf>

next in thread | previous in thread | raw e-mail | index | archive | help

--LpQ9ahxlCli8rRTG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Mar 06, 2004 at 09:33:32PM -0600, adp wrote:

> So this means I can't really just dump our custom packages to packages/All
> since files will get overwritten. So I wanted to do something like:
>=20
> /repos/ftp.freebsd.org/.../packages/All
> /repos/ftp.freebsd.org/.../packages/mail-custom
> /repos/ftp.freebsd.org/.../packages/db-custom
> /repos/ftp.freebsd.org/.../packages/web-custom
>=20
> The All are the original packages from ftp.freebsd.org and everything else
> is custom compiled packages. I then create symlinks for everything in All=
 to
> mail-custom/, db-custom/, and so on.
>=20
> This doesn't work. When I pkg_add -r it always ends up looking in All/.

pkg_add(1) has an environment variable PKG_PATH which should help with
what you want to do.  So what you'ld do is maintain a copy of the
default packages in, say:

    /repos/ftp.freebsd.org/.../packages/All

Then have your own package repository structures:

   /repos/mail-custom/.../packages/All/
                               .../mail/
                               etc.
   /repos/db-custom/.../packages/All
                            .../databases/
   /repos/web-custom/.../packages/All/
                              .../www/

(Actually, if I was doing this, and only had to support one OS version
and one system architecture, I'd probably dispense with all those
intermediate directories shown as '...' and just keep a nice shallow
directory tree).

Although I've shown other port category directories here, you're not
really interested in them: however, when you're building the packages,
say for a mail server, you can just set the PACKAGES environment
variable to /repos/mail-custom/.../packages and the package will be
automatically installed to the right directory -- but the extra
package category stuff will be created at the same time.

The copy of the package collection from ftp.freebsd.org needs no local
modification, so you could just setup an automated job to synchronise
your copy with the FTP server and download any updated packages --
with the permission of the administrators of the server you mirror
=66rom, obviously.

Then on your mail server machines, just set:

    PKG_PATH=3D/repos/mail-custom/.../packages/All:/repos/ftp.freebsd.org/.=
=2E./packages/All"

and similarly for the other classes of machines you're maintaining.

Now pkg_add(1) will search the current working directory, and then, in
order that list of directories on PKG_PATH to locate the package you
want to install.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--LpQ9ahxlCli8rRTG
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFASwr8dtESqEQa7a0RAkVIAJ0fay7cpkSn/AA9+jE0v0rZPAON6ACfVlqY
pfErMnymHeBK6jui1p6Xfqg=
=GulQ
-----END PGP SIGNATURE-----

--LpQ9ahxlCli8rRTG--



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