Re: how to build from ports without downloading ports
> 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. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how to build from ports without downloading ports
On Tue, 20 Oct 2009 13:35:54 -0700 Noah wrote: > Hi there, > > 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? > There's a howto here: http://codeidol.com/unix/bsd/Keeping-Up-to-Date/Build-a-Port-Without-the-Ports-Tree/ However the ports tree is only ~0.5GB, so you would have to be very short of space to go to that much trouble ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how to build from ports without downloading ports
Roland Smith writes: > But why go to all this trouble? Disk space is cheap these days, > why not add an extra disk? If you don't have space in the > chassis, consider using an external USB disk for /usr/ports. Sometimes ... because the machine hardware is not under your control. In the mid 90's, I worked on a major workstation upgrade for the customer support division of a large financial services firm: we were replacing 386/20s with Pentium 90s. Most of the old machines were still serviceable - even the ones that were half-filled with dust still ran - so we looked around for something to do with them other than the scrap heap. Off in a cranny in one of the machine rooms was a 286/, whose job it was to dial out twice a day, retrieve a specific piece of data, and put it in an equally specific place on the file server. It had been running 24/7 for, well, since you could hook a 286 up to a network file server.. Surely, we thought, we could move things over and increase reliability, etc.. The word came down from two or threee levels up the food chain: "Absolutely not. Don't even shut it down to dust." Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how to build from ports without downloading ports
-- From: "Noah" Sent: Tuesday, October 20, 2009 4:35 PM To: "User Questions" Subject: how to build from ports without downloading ports Hi there, 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? I assume you mean that you have such little space that you would not be able to download an entire port and its prerequisites and then delete it after everything is compiled and installed as you could with a simple "make install clean" I would recommend doing make install clean in spurts so that you don't run out of space (get a couple of prerequisites out of the way at a time), or install the packages for the programs you want and then update them with ports. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how to build from ports without downloading ports
Chuck Swiger writes: > > 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're describing the default behavior of ports-- it only > downloads sources which are needed for the current build. To > clean up sources and so forth, look to portsclean (from > portupgrade). There is also the "distclean" target of make, which will get rid of the source tarball. Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how to build from ports without downloading ports
On Tue, Oct 20, 2009 at 01:35:54PM -0700, Noah wrote: > Hi there, > > I have a server with minimal disk space. is there a way to build from > ports without downloading ports Not directly. But you can install pre-built packages instead. The only downside in that case is that you cannot choose which options a package is built with. Another option is to build the ports on another machine (with the same FreeBSD version and hardware architecture!) and just copy (using e.g. rsync or tar & nc) /usr/local from the build machine to the server. The latter is especially handy if you have more than one machine to keep up to date. > or only downloading what is needed for > the build and then it is removed? Ports as a rule do not download more than is needed to build and run the port. After installing the port, you should always run 'make clean' in the port directory to reclaim space used for the build. Additionally you can reclaim disk space by e.g. removing everything under /usr/ports/distfiles. But why go to all this trouble? Disk space is cheap these days, why not add an extra disk? If you don't have space in the chassis, consider using an external USB disk for /usr/ports. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgp2YYs2iEw87.pgp Description: PGP signature
Re: how to build from ports without downloading ports
On Tuesday 20 October 2009 22:35:54 Noah wrote: > 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? That is technically possible but it's usually a lot easier to mount the ports tree from an NFS server. If you share the ports tree between a number of servers make sure WRKDIRPREFIX is set to a local path before you start building ports or you might run into concurrency issues when multiple servers build a port at the same time. Regards, Pieter ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how to build from ports without downloading ports
On Oct 20, 2009, at 1:35 PM, Noah wrote: 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're describing the default behavior of ports-- it only downloads sources which are needed for the current build. To clean up sources and so forth, look to portsclean (from portupgrade). You might also consider using pre-built packages, where available. Regards, -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
how to build from ports without downloading ports
Hi there, 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? Cheers, Noah ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"