# Package Updates



## bsd10 (Jun 1, 2010)

Is there something comparable to freebsd-update, but for packages? I've tried portupgrade -PP, but it doesn't seem to work well, and I don't need to update to the most recent version of the ports tree. I'm just interested in making sure I get security updates.


----------



## SirDice (Jun 1, 2010)

bsd10 said:
			
		

> I don't need to update to the most recent version of the ports tree. I'm just interested in making sure I get security updates.



No dice :e

It's all or nothing. The packages (-stable) on the freebsd servers are in constant flux. They lag a little behind the ports tree but both are pretty much in constant motion. The only times they are relatively 'constant' is during a ports freeze, just before a new release. You can get the -release packages on the servers too but they're the same as on the CDs/DVDs. They're never updated.

Which is one of the reasons why I decided a long time ago to build my own packages :stud


----------



## bsd10 (Jun 1, 2010)

I was slowly coming to the same conclusion, but aren't there issues when tracking a -release branch? The FreeBSD site http://www.freebsd.org/ports/ says that ports only support -current and -stable. I like the idea of staying on the 7.3 extended release until 2012, but not if my ports will break every time I update them. Do you run -stable?


----------



## SirDice (Jun 1, 2010)

Using -stable packages on a -RELEASE usually isn't a problem. It can cause problems when certain base OS calls change though.

And yes, I do run -STABLE. But even that I don't constantly rebuild


----------



## phoenix (Jun 1, 2010)

I believe you are looking for sysutils/bsdadminscripts which includes the handy pkg_upgrade tool.  No need for /usr/ports to even exist on your system, as it uses only binary packages.

Alternatively, you can use ports-mgmt/portmaster with the *--index-only* and *--packages-only* switches.  This does a binary packages only upgrade, and does not need /usr/ports installed.


----------



## bsd10 (Jun 2, 2010)

Thanks, I'm building a package server now


----------



## bsd10 (Jun 2, 2010)

phoenix said:
			
		

> I believe you are looking for sysutils/bsdadminscripts which includes the handy pkg_upgrade tool.  No need for /usr/ports to even exist on your system, as it uses only binary packages.
> 
> Alternatively, you can use ports-mgmt/portmaster with the *--index-only* and *--packages-only* switches.  This does a binary packages only upgrade, and does not need /usr/ports installed.



Sorry, I missed your post, but this looks promising. Is there a better url to set PACKAGESITE to? The stock portmaster finds packages that are older than ports I have already installed.


----------



## DutchDaemon (Jun 2, 2010)

bsd10 said:
			
		

> Is there a better url to set PACKAGESITE to? The stock portmaster finds packages that are older than ports I have already installed.



If you're on FreeBSD 8, one of these will work fine:

ftp://ftp.freebsd.org/pub/FreeBSD/ports/*i386*/packages-8-stable/Latest/
ftp://ftp.freebsd.org/pub/FreeBSD/ports/*amd64*/packages-8-stable/Latest/


----------



## bsd10 (Jun 2, 2010)

DutchDaemon said:
			
		

> If you're on FreeBSD 8, one of these will work fine:
> 
> ftp://ftp.freebsd.org/pub/FreeBSD/ports/*i386*/packages-8-stable/Latest/
> ftp://ftp.freebsd.org/pub/FreeBSD/ports/*amd64*/packages-8-stable/Latest/



I'm on 7.3-RELEASE-p1/amd64, but one of the things I notice that ports has that those repositories don't is postgresql84-server.


----------



## SirDice (Jun 2, 2010)

Postgresql84-client is currently producing errors. Since -server depends on it it can't be build.

http://pointyhat.freebsd.org/errorl....7.20100529233808/postgresql-client-8.4.4.log

See http://pointyhat.freebsd.org


----------



## DutchDaemon (Jun 2, 2010)

The port is broken:


```
[/usr/ports/databases/postgresql84-server] # grep -i brok Makefile                                                                                 
BROKEN=		"You must remove heimdal's /usr/bin/krb5-config and /usr/lib/libkrb5.so*, and set NO_KERBEROS=true in /etc/make.conf to 
build successfully with MIT-KRB"
BROKEN=		incomplete plist
```


----------



## hansivers (Jun 2, 2010)

phoenix said:
			
		

> Alternatively, you can use ports-mgmt/portmaster with the *--index-only* and *--packages-only* switches.  This does a binary packages only upgrade, and does not need /usr/ports installed.



Thanks for this helpful advice. 

I've installed portmaster (pkg_add -r portmaster) on a 7.3 RELEASE server where no port tree has ever been installed. But when I start it (portmaster --index-only --packages-only OR portmaster -L), I got this error message :


```
"/usr/share/mk/bsd.port.mk", line 11: Could not find /usr/ports/Mk/bsd.port.mk
make: fatal errors encountered -- cannot continue

===>>> The value of PORTSDIR cannot be empty
===>>> Aborting update
```

The file "bsd.port.mk" is usually located in the ports.tbz archive. So, I understand that portmaster need at least an initial port tree installation before being usable? 

Also, I have fetched the INDEX file from ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/ and copied it in a brand new /usr/ports folder. But i still got the same error.

Any suggestions? Many thanks!


----------



## bsd10 (Jun 2, 2010)

I'm trying not to overload this thread, but is there a reason gnome2.tbz is not in ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7-stable/Latest/ ? It's in 7-stable for i386 and in 8-stable for both architectures.

I've installed xorg with pkg_upgrade -rrRR x11/xorg, and it worked great, but it can't find the package for gnome2 in the index. Thanks again for the help.


----------



## phoenix (Jun 2, 2010)

hansivers said:
			
		

> Thanks for this helpful advice.
> 
> I've installed portmaster (pkg_add -r portmaster) on a 7.3 RELEASE server where no port tree has ever been installed. But when I start it (portmaster --index-only --packages-only OR portmaster -L), I got this error message :
> 
> ...



Read the man page.  There's a bit of setup you need to do to use portmaster without a ports tree.

When in doubt:  *read the man page*.


----------



## hansivers (Jun 3, 2010)

I read the man page and set the four environment variables accordingly. I've made some progress but still, the "--index-only" option refuses to work (I get an error about --index and --index-only being mutually exclusive, even if I don't use the --index option). 

Finally, I gave up and install bsdadminscripts (to get "pkg_upgrade" tool) following your previous suggestion. Working right after download! Yes! I love it!!

Thanks Phoenix for your support.


----------

