From owner-freebsd-questions@FreeBSD.ORG Wed Oct 21 03:16:46 2009 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BA62106568B for ; Wed, 21 Oct 2009 03:16:46 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id DAA6D8FC23 for ; Wed, 21 Oct 2009 03:16:45 +0000 (UTC) Received: by ewy5 with SMTP id 5so2860463ewy.36 for ; Tue, 20 Oct 2009 20:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=/s9qTovxD8zKh4Sr/fyQHuaL8zC5PGKhvoyiA1m/aBo=; b=fhXwpZDxwLyRoIvnbN5enOyuhlhJYLVftt5dLaTd/BtMq/ePbwQbaQUccvd8NN36fi gpK8ZyjTlm3JV96y4LU/gePy7osd/TeaObyjhpC3592XJJKlhCQA0xjgXC+8X0q+XCRV r+FIdtyHl7WurNlTWWvC2aHFx/tmpJF6kpFow= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=K7BfI7NDKJcSj1bG1VQukN56nIR0muWJQz9fkGqeWykNlSJ6ocmrdmHQBIPpA50zdi n5UW6tgY7lN5n4BAOpz4duzHQW/fm/EWaHphHQYbT8Ek/eNQS2OKxGUm1I64YlHsriD1 xnHWpu1jOhod+3Pw4j+1ZPoDCCqHnyXfr9eNc= MIME-Version: 1.0 Received: by 10.216.93.6 with SMTP id k6mr2421593wef.89.1256095004807; Tue, 20 Oct 2009 20:16:44 -0700 (PDT) Date: Wed, 21 Oct 2009 03:16:44 +0000 Message-ID: From: "b. f." To: freebsd-questions@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: noah-list@enabled.com Subject: Re: how to build from ports without downloading ports X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2009 03:16:46 -0000 > 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.