Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Oct 2009 03:16:44 +0000
From:      "b. f." <bf1783@googlemail.com>
To:        freebsd-questions@FreeBSD.org
Cc:        noah-list@enabled.com
Subject:   Re: how to build from ports without downloading ports
Message-ID:  <d873d5be0910202016v690dc352nb2b6ab6e4bec8fc@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
> I have a server with minimal disk space.  is there a way to build
> from ports without downloading ports or only downloading what is
> needed for the build and then it is removed?
>

You could:

1) build packages on another machine or cluster, and  then install the
packages via a remote PKG_PATH/PACKAGEROOT/PACKAGESITE shared over a
network (you could even use a remote PKG_TMPDIR as a staging area to
save further space during installation);

2) build ports on the server but use a filesystem on a removable
drive, memory-backed filesystem (tmpfs(5) or mdmfs(8)), or remote
filesystem shared over a network  to hold your PORTSDIR, DISTDIR
and/or WRKDIR. While building the ports, you could pursue the strategy
outlined in previous posts where you only download portions of a ports
tree that are necessary for the ports that you want, and build the
ports one at a time in dependency order(you can do this with
ports-mgmt/portupgrade or ports-mgmt/portmaster, or via a hand-rolled
script using make(1) and tsort(1), for example), cleaning the WRKDIR
after each port build, and perhaps the DISTDIR as well.  You can
configure the ports to save space via OPTIONS, NO_INSTALL_MANPAGES,
and NOPORTDOCS.  Finally, you could compress many of your binaries
after installation with archivers/upx, or place the ports on a
filesystem with transparent compression, using ZFS or geom_uzip(4).

Don't forget that you can remove unneeded parts of the base system via
src.conf(5) and a custom (compressed) kernel, too.

b.



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