Hi there. I'm sorry if this seems like a basic question but slowly drifting back to the FreeBSD world after 10 years away in the Linux world ;) After some consideration, I believe I still like the idea of source based updating versus binary. This raises my first question - getting updating source. Where do I obtain it from and how do I know when it's updated? I presume only during major updates/upgrades and/or security issues is when the source tree ever changes? I understand (or believe I do) on the whole "make buildworld", "make installworld", "mergemaster -v" steps unless anything has changed in 7.2-RELEASE that I need to know about. I also remember how to build my own kernels and see that you can now do "make buildkernel KERNCONF=NEWKERNEL" and "make installkernel KERNCONF=NEWKERNEL" which is nice too. With that aside, I've been running "portsnap update" to keep the ports updated.. am I missing anything here? I presume that when portsnap finds an updated port then I just need to rebuild it and upgrade? I guess I'm kinda wondering the "condensed quick version" of what people are typically doing to keep their system updated from source without making life difficult ;) Yes, I've been reading through various things to get myself updated to newer info but there's also a lot of stuff on the Internet based on older info hence why I'm asking. Cheers, Paul
On Wed, May 6, 2009 at 9:23 AM, Paul Stewart <paul@paulstewart.org> wrote: <snip>> I guess I'm kinda wondering the "condensed quick version" of what people are > typically doing to keep their system updated from source without making life > difficult ;) ?Yes, I've been reading through various things to get myself > updated to newer info but there's also a lot of stuff on the Internet based > on older info hence why I'm asking.This is what I do. I don't claim that it's perfect, nor that it's the recommended way, but it works nicely, and provides some safety nets, just in case. For ports (requires the installation of portmaster and portaudit): # portsnap fetch update # portaudit -Fda > ~/ports-with-issues # pkg_version -vl '<' > ~/ports-with-updates # more /usr/ports/UPDATING If there's anything in ports-with-issues, then look if there's an update in ports-with-updates. If there's anything in ports-with-updates that *needs* to be updated (security fix, bug fix, major feature needed, etc), then update only those ports: # portmaster -bd [portname] For source: Subscribe to the freebsd security announcement mailing list. Copy /usr/share/examples/cvsup/stable-supfile to /etc/supfile.source Edit /etc/supfile.source to set tag= to RELENG_X_Y where X_Y is the version you want to upgrade to (7_2, for example). Then, whenever a security announcement is made: # csup /etc/supfile.source # cd /usr/src # make buildworld # make KERNCONF=WHATEVER buildkernel # make KERNCONF=WHATEVER KODIR=/boot/newkernel installkernel # nextboot -k newkernel # shutdown -r now <if it comes back up without errors> # cd /usr/src # make installworld # mergemaster -iU # mv /boot/kernel /boot/kernel.bak # mv /boot/newkernel /boot/kernel # shutdown -r now Using KODIR and nextboot allows you a safety net. If the boot using /boot/newkernel fails, a simple reboot will bring it back up with /boot/kernel (the old, working kernel). -- Freddie Cash fjwcash@gmail.com
Paul Stewart wrote:> This raises my first question - getting updating source. Where do I obtain > it from and how do I know when it's updated? I presume only during major > updates/upgrades and/or security issues is when the source tree ever > changes?Umm... No. Or depends on what you mean. http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html#STABLE> I understand (or believe I do) on the whole "make buildworld", "make > installworld", "mergemaster -v" steps unless anything has changed in > 7.2-RELEASE that I need to know about. I also remember how to build my own > kernels and see that you can now do "make buildkernel KERNCONF=NEWKERNEL" > and "make installkernel KERNCONF=NEWKERNEL" which is nice too.http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html#CANONICAL-BUILD> I guess I'm kinda wondering the "condensed quick version" of what people are > typically doing to keep their system updated from source without making life > difficult ;) Yes, I've been reading through various things to get myself > updated to newer info but there's also a lot of stuff on the Internet based > on older info hence why I'm asking.I don't know if remember this, but the Handbook is pretty much always up-to-date and along with manual pages should be your first reference for anything. http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/index.html To be more specific, you seemed to be interested in these topics (but don't limit your reading to these): http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading.html -- Tuomo ... Google "how to hook up a hose to a kitchen sink" Did you mean: "how to hook up a /horse/ to a kitchen sink" >> I hope there was a non-return valve in the hose connection somewhere; >> horse-sh!t in your water supply is baaaaad. > No, horse-shit in your water is just disgusting. > Sheep-shit in your water is baaaaaaaaad! :-) Sheep puns are baaaaaaaaad. ;) -- on http://thedailywtf.com/Comments/ Yes,_That_0x27_s_Exactly_What_I_Meant.aspx
Paul,> I guess I'm kinda wondering the "condensed quick version" of what > people are typically doing to keep their system updated from source > without making life difficult ;)In addition to the reference already given, there is a concise description under "COMMON ITEMS" near the end of src/UPDATING, with header "To rebuild everything and install it on the current system". I note what might be a missed correction where it says "make kernel" as opposed to "make buildkernel". I do it the wrong way, which has always worked perfectly for me for many years using http://halplant.com:2001/software/FreeBSD/scripts/update_fbsd to fetch sources, build world and kernel while in multi-user, run from cron. When I'm ready to install, I shutdown and run http://halplant.com:2001/software/FreeBSD/scripts/install_fbsd This is wrong because I don't boot the new kernel before installing the new world. -- -Andrew J. Caines- Unix Systems Engineer A.J.Caines@halplant.com FreeBSD/Linux/Solaris, Web/Mail/Proxy/... http://halplant.com:2001/ "Machines take me by surprise with great frequency" - Alan Turing
Paul Stewart wrote:> I guess I'm kinda wondering the "condensed quick version" of what people are > typically doing to keep their system updated from source without making life > difficult ;) Yes, I've been reading through various things to get myself > updated to newer info but there's also a lot of stuff on the Internet based > on older info hence why I'm asking.Not to take away from any of the other great responses, I just want to throw out there that I use fastest_cvsup to find the csup server with the lowest latency: # pkg_add -r fastest_cvsup ... and then run it like this: # fastest_cvsup -c ca,us Given that I know where you are, you will likely always be best off with cvsup.ca.FreeBSD.org, and put that into your supfile against default host. I then run "csup -L 2 -g /etc/supfile" in cron for once a week. I'll then update the actual system for advisories, new features if they apply to me, or generally any time I turn up a new system or VM to keep them all consistent. Cheers, Steve