Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Apr 2007 21:36:07 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Alex Zbyslaw <xfb52@dial.pipex.com>
Cc:        Milan Knizek <knizek@volny.cz>, freebsd-questions@freebsd.org
Subject:   Re: Own ports organization
Message-ID:  <46140C37.4070903@infracaninophile.co.uk>
In-Reply-To: <4613F9A3.3080206@dial.pipex.com>
References:  <200704042052.19897.knizek@volny.cz> <4613F9A3.3080206@dial.pipex.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig6582A9A274A25E249296B440
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

Alex Zbyslaw wrote:
> Milan Knizek wrote:
>=20
>> Hello,
>>
>> are there any recommendation how to organize own ports?
>>
>> Should I keep them within official /usr/ports structure or rather
>> separately? If kept separately, how does it work with pkg* commands th=
en?
>> =20
>>
> For what it's worth, if you use cvsup then you can store your own ports=

> safely under /usr/ports.  You can also store extra files (like extra
> patches, for example), though I'm not sure what would happen if that
> port got deleted.  Probably just your patch would remain.
>=20
> I have no idea if csup is safe in this regard, and portsnap was
> definitely not safe, last I heard.
>=20
> I'm sure you could easily concoct a solution where you kept new ports i=
n
> a separate tree, and had something like a Makefile to make links into
> /usr/ports after each time you used say portsnap.  A symlink to a
> directory should work just as well as a real directory.  I find it
> easier to stick with cvsup.

There's already support in the tree for adding local ports, or even
entire local categories of ports.

Simply create /usr/ports/Makefile.local containing eg:

    SUBDIR +=3D my-ports

and make /usr/ports/my-ports a link to your directory of local ports.

Or you can tack another port into the existing hierarchy -- eg.
suppose you have a customised version of apache22.  Then you can create
/usr/ports/www/Makefile.local containing

   SUBDIR +=3D my-apache22

and /usr/ports/www/my-apache22 either as a link to, or as a directory
containing your modified apache22 port.

The SUBDIR links are probably only really necessary if you're going to
try and build an INDEX incorporating your custom stuff. As the mods go
into separate files, this is cvsup proof.

This approach generally works OK with the pkg_* tools -- so long as
each of your homegrown ports has an origin accessible within the ports
tree.  You may find you need a bit of 'pkgdb -F' action to sort out=20
dependencies if one of your custom ports replaces a port that others
depend on.  On the whole though, it should work nicely.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
                                                      Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW


--------------enig6582A9A274A25E249296B440
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.3 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGFAw98Mjk52CukIwRCJU6AJ9tAbTyP+oPxhRxDh0AGGB6k5/BqgCfSVF1
aTr3sa98BmLbi9+0ffg03ps=
=N//q
-----END PGP SIGNATURE-----

--------------enig6582A9A274A25E249296B440--



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