View Full Version : make package without install
spock
November 16th, 2008, 19:07
Hello, everybody here :)
Is there any way to create package by "make package" without actually installing package on build system.
I'm creating packages for jails by building them on different server. As a result there is more and more packages in this system.
If it isn't possible - is there a way do remove all packages (dependency) installed by "make package" ??
Best regards,
brd@
November 16th, 2008, 19:15
Currently the FreeBSD Ports build processes requires installing it before the package can be built. There is a project to have the port installed into a temporary area so that the package can be built without requiring the install, but it is not complete yet.
I normally have a Jail on a build server that I build packages on for distribution out to other systems.
bradfa
November 16th, 2008, 23:47
You might take a look at portmaster (http://dougbarton.us/portmaster.html) (it's in ports). Try the portmaster -e and -s switches to remove a package and all dependencies (but leave any dependencies that are depended upon by other packages).
keramida@
November 17th, 2008, 07:50
If you go the "special package-building jail" route, then the tinderbox scripts described at
http://tinderbox.marcuscom.com/
may be useful too.
I've been using the marcuscom tinderbox to test the build of editors/emacs and editors/emacs-devel, and I have a local installation in a separate workstation to pre-build the packages for my laptop.
It is a wonderful set of tools that has saved me from a lot of trouble over the past years. The only caveat I can think of is that it may require a bit of Perl-foo to get it going "right(TM)" for your own personal preferences.
kamikaze
November 17th, 2008, 08:50
# env PREFIX=/tmp/local PKG_DBDIR=/tmp/pkgdb make package deinstall
You'd probably have to copy /var/db/pkg to /tmp/pkgdb to prevent the ports system to build and install all dependencies into /tmp/local.
If it's not your intention to keep the original database untouched you can avoid setting PKG_DBDIR and spare you the copying.
Daemony
November 17th, 2008, 11:41
I normally have a Jail on a build server that I build packages on for distribution out to other systems.
Yes. This is good idea, and I also have a "builder" jail on main server machine. But... I wouldn't try to compile lang/mono (open source implementation of .NET Development Framework)...
Mel_Flynn
November 19th, 2008, 20:06
# env PREFIX=/tmp/local PKG_DBDIR=/tmp/pkgdb make package deinstall
You'd probably have to copy /var/db/pkg to /tmp/pkgdb to prevent the ports system to build and install all dependencies into /tmp/local.
If it's not your intention to keep the original database untouched you can avoid setting PKG_DBDIR and spare you the copying.
This kludge won't work, as soon as libtool libraries come into play, that have hardcoded runpaths. And by default these packages will install into /tmp/local, unless you run pkg_add -P.
The only good reason to mess with PREFIX is if you really want the port to live somewhere else, good example:
make -C /usr/ports/shells/bash -DWITH_STATIC_BASH PREFIX=/ install
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.