[nycbug-talk] Building FreeBSD packages without installing
Charles Sprickman
spork
Fri Jan 13 00:26:05 EST 2006
On Tue, 10 Jan 2006, Marc Spitzer wrote:
> On 1/10/06, Charles Sprickman <spork at bway.net> wrote:
>> Hi all,
>>
>> I'm building a few hundred ports that will get shoved to another machine
>> when done. I have no desire to actually have these ports installed on the
>> build machine... Looking at the ports manpage and the handbook, this is
>> not possible ("make package" and "make package-recursive" install then
>> build the pkg from the installed files).
>>
>> I know OpenBSD handles this well, in fact they seem to default to building
>> a package and THEN install that. Very nifty.
>>
>> Are there any tricks to emulate this behaviour in FreeBSD, like somehow
>> installing into a dummy hierarchy?
>>
>> Thanks,
>>
>> Charles
>
> you could do it in a jail.
I found a few other things that kind of work... But there are issues.
First off, you can set LOCAL_BASE to something like /usr/local/pkgbuild
and set PKG_DBDIR to something like /var/db/pkgbuild and the port will
install and register into these dummy directories.
A few gotchas there... things like perl that like to hit /etc/make.conf
and /etc/manpath.conf will still spam those files. I'm sure there are
plenty of other odd gotchas where the port fiddles with things outside of
LOCAL_BASE. Also, if you just pkg_add the pkg in the jail, it will
dutifully install into your dummy LOCAL_BASE in the jail. Using the "-P"
flag seems to fix this, but again, I bet there's some cases where that
does not quite work.
Doing more googling seems to indicate that while lots of people request
the "build package without installing it" option, FreeBSD won't be seeing
this anytime soon since attempting a change like that is likely to break
things left and right.
So I'm somewhat sold on the jail idea... I don't want a full-fledged
jail, anyone have pointers to how to build the most minimal of jails? I
don't even want to ssh to it, I'd just like to start it with a shell and
not call /etc/rc, do my work, then exit the shell. Maybe I shouldn't even
be worrying about trimming it, I do have the disk space...
Thoughts?
Thanks,
Charles
> marc
>
>
>>
>> _______________________________________________
>> % NYC*BUG talk mailing list
>> http://lists.nycbug.org/mailman/listinfo/talk
>> %Be sure to check out our Jobs and NYCBUG-announce lists
>> %We meet the first Wednesday of the month
>>
>
>
> --
> "We trained very hard, but it seemed that every time we were beginning to
> form into teams we would be reorganized. I was to learn later in life that
> we tend to meet any new situation by reorganizing, and a wonderful method it
> can be for creating the illusion of progress, while producing confusion,
> inefficiency and demoralization."
> -Gaius Petronius, 1st Century AD
>
More information about the talk
mailing list