Handling lots of custom packages..
dap99 at i-55.com
Sat Mar 6 19:35:58 PST 2004
I use the software from ports extensively. I also use a lot of compile-time
options (for example, WITH_IMAP=yes for lang/php4). Rather than recompile
our source each time we bring up a server we just build from ports and then
build a package using 'make ..options.. package'. We then use this package.
Now, if we just want to add this package to a system using pkg_add we have
to first install the dependencies:
# pkg_add dep1.tgz
# pkg_add dep2.tgz
# pkg_add php4-..tgz
Instead, we have a copy of ftp.freebsd.org/.../packages/All and we use:
# pkg_add -r ftp://localftp/.../packages/All/php4-...tgz
This has the benefit that we don't know or care what needs to get pulled in.
(Well, we know, we just don't have to add it to an install script.)
So far so good.
But we may have different options for different packages of the same
software depending on where we will use it. So on a general purpose web
server I may have a lot of options for php4, but for running php4 on a much
more targeted use (say, on a webmail server that only connects using imap) I
will have less options specified. (And there are other examples, this is
just the easiest to consider.)
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:
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.
This doesn't work. When I pkg_add -r it always ends up looking in All/.
I have to rename a dir to All, like so:
# mv All All.old
# mv mail-custom All
And then it works.
What is the best way to do this?
Again, my goal is to only need to specify the one package I want rather than
all of the dependencies too.
More information about the freebsd-questions