# How do you managae updates for a FreeBSD desktop?



## lungten (Dec 29, 2010)

I've used FreeBSD as a desktop for home and work for about a year. I used to run Fluxbox with XDM.

The biggest problem I faced was updating as desktop usually has a large number of software installed. Some ports are broken sometimes and some needs constant interaction (I know I can do a BATCH update but sometimes you don't want to go by the defaults). This takes up a big amount of time.

So, I moved to Ubuntu for home and work use but still run FreeBSD on servers. I would like to go back to using FreeBSD and would like to get some tips from the veterans here about how you manage those stuff on FreeBSD.

Happy new year!


----------



## vermaden (Dec 29, 2010)

Mostly like that:
http://forums.freebsd.org/showthread.php?t=17722


----------



## lungten (Dec 29, 2010)

vermaden said:
			
		

> Mostly like that:
> http://forums.freebsd.org/showthread.php?t=17722



Thanks a lot. Its is a really good HOWTO. It'll definitely be of great help when I run my next FreeBSD-Fluxbox desktop. I've already used and followed a lot of your resources/guides while learning and building my previous FreeBSD desktop.

Thanks again. :e


----------



## vermaden (Dec 29, 2010)

Welcome mate, I also used Fluxbox some time ago: http://browse.deviantart.com/?q=fluxbox+by:vermaden


----------



## phospher (Dec 29, 2010)

Simple, PC-BSD does it for you


----------



## vermaden (Dec 29, 2010)

phospher said:
			
		

> Simple, PC-BSD does it for you



In what way? It updates packages as its needed? Any links on that topic?


----------



## danbi (Dec 29, 2010)

It is much smarter to use portupgrade/portmaster to do the binary upgrade. Just specify the -PP flag. These tools are designed to follow dependencies, package name changes etc.

Trouble is, there are no precompiled packages for the latest ports.


----------



## wblock@ (Dec 29, 2010)

I update like this: Upgrading FreeBSD Ports

And a bonus hint: avoid problematic software: KDE and PHP.


----------



## lungten (Dec 29, 2010)

wblock said:
			
		

> I update like this: Upgrading FreeBSD Ports


Thanks for the tips. I use most of those tools. portupgrade and portsnap are my favourites. 



			
				wblock said:
			
		

> And a bonus hint: avoid problematic software: KDE and PHP.



With availability of lang/php52 ports, its easier now.


----------



## lungten (Dec 29, 2010)

vermaden said:
			
		

> Welcome mate, I also used Fluxbox some time ago: http://browse.deviantart.com/?q=fluxbox+by:vermaden



Those are some of the coolest Fluxbox themes and I still have some in my backup disk. Mind sharing what you've moved to now and why?


----------



## lungten (Dec 29, 2010)

danbi said:
			
		

> It is much smarter to use portupgrade/portmaster to do the binary upgrade. Just specify the -PP flag. These tools are designed to follow dependencies, package name changes etc.



Yes, I use those tools. The trouble is when you have to walk along with the update/upgrade process looking for warning/error messages. I've faced errors trying to update all ports together on many occasions.


----------



## phospher (Dec 29, 2010)

vermaden said:
			
		

> In what way? It updates packages as its needed? Any links on that topic?



I use portsnap and portupgrade for all my servers. However, I recently started using PC-BSD as my desktop machine at home and I've been very impressed. To answer your PC-BSD software upgrade question check out: http://wiki.pcbsd.org/index.php/Using_Software_Manager

I would highly recommend giving PC-BSD a shot as a desktop OS and you'll be right at home from the shell.


----------



## vermaden (Jan 4, 2011)

lungten said:
			
		

> Those are some of the coolest Fluxbox themes and I still have some in my backup disk. Mind sharing what you've moved to now and why?


I have moved to *Openbox* mate,the workspace menu is just great, that great that I did not used taskbar for about a year, its compilance with EWMH and other open desktop standarts allows You to make *Openbox* into TILING window manager (like dwm/awesome) with python scripts like PyTYLE/PyWO, which I do at least.

I felt Fluxbox was just bunch of happen to work hacks, check the ~/.fluxbox/init file for example, or all the hacks I needed to do to make themes look right 

I also wanted to try something new, I also tried *PekWM*, but its too limited for me, although *PekWM *also has some nice features.



			
				phospher said:
			
		

> I use portsnap and portupgrade for all my servers. However, I recently started using PC-BSD as my desktop machine at home and I've been very impressed. To answer your PC-BSD software upgrade question check out: http://wiki.pcbsd.org/index.php/Using_Software_Manager
> 
> I would highly recommend giving PC-BSD a shot as a desktop OS and you'll be right at home from the shell.


Thanks mate, I will take a look into that.


----------



## morbit (Jan 7, 2011)

Mostly by: 


```
#!/bin/sh

portsnap fetch update && rm -rf /usr/obj && \
portmaster --packages-build --delete-build-only \
-a -d -x office && \
pkg_cleanup && portmaster --check-port-dbdir && \
portmaster --check-depends && echo removed distfiles: && \
rm -vrf /usr/ports/distfiles/* && echo removing objects... && \
rm -rf /usr/obj && rm -rf /usr/ports/packages/* && portmaster -l | grep installed
```

and


```
#!/bin/sh

cd /usr/src
rm -rf /usr/obj && make cleandir && \
make cleandir && svn update && \
make -j4 buildworld && make -j4 buildkernel KERNCONF=STRIPPED && \
make installkernel KERNCONF=STRIPPED && rm -r /usr/share/man && \
make installworld && \
make cleandir && make cleandir && \
rm -rf /usr/obj && make delete-old -DBATCH_DELETE_OLD_FILES && \
make delete-old-libs -DBATCH_DELETE_OLD_FILES && \
mergemaster
```

YMMV, recommended upgrading procedure requires reboots, this is
real life example and it's tuned according to my (mis)judgement.

( http://www.freebsd.org/doc/handbook/makeworld.html )

P.S. WRKDIRPREFIX= /usr/obj obviously.


----------

