Using only packages - scenarios

I wish to avoid ports in general and stick to -RELEASE versions, but I don't get the updated packages like OpenOffice and other software in -STABLE.

Is there any way to install packages with dependencies from other distribution sets without breaking the base system?

I ask because the documentation always talks of ports and not packages. I cannot afford to use ports because 1. I have a slow network connection and ports sources are generally larger in size and 2. The time taken to compile apps, especially non-trivial ones are too much and I am willing to accept slightly lower versions.

So any suggestions on what package management technique to use? I find pkg_add pkg_delete etc. too basic. Is there any software for purely package management without using ports at all?

Also should I keep my base system as RELEASE and use packages from other branches?
 
harishankar said:
but I don't get the updated packages like OpenOffice and other software in -STABLE.
Interesting. Do you ever get OOo in -RELEASE? o_O

harishankar said:
Is there any way to install packages with dependencies from other distribution sets without breaking the base system?
You can install whatever you want without breaking the base system because ports/packages and the base system are completely independent entities.

harishankar said:
I ask because the documentation always talks of ports and not packages.
You must've missed it...

harishankar said:
I cannot afford to use ports because 1. I have a slow network connection and ports sources are generally larger in size
This was posted today.

harishankar said:
So any suggestions on what package management technique to use? I find pkg_add pkg_delete etc. too basic.
They are the official way, and trust me they work just as good as the port system if you want binary packages.

harishankar said:
Is there any software for purely package management without using ports at all?
Don't know. Browse the port collection.

harishankar said:
Also should I keep my base system as RELEASE and use packages from other branches?
Some people will tell you you can mix them, but I'd rather use STABLE packages with an updated (i.e. STABLE) base system, or stick with RELEASE for both. Mixing might work for some applications with few dependencies, but bigger applications that depend on huge libs (e.g. GTK+) will ultimately fail within a few months at most.
 
There is no -RELEASE or -STABLE ports tree. There's also no difference between 7.x and 8.x. There is only one (1) ports tree.

The packages on a -RELEASE cd (or the website) are packages that were created when the -RELEASE was made. They are NEVER updated, not even for security patches.
 
Well, I tried this today and it didn't work.

Code:
harishankar# pkg_add -r openoffice.org
Error: Unable to get [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/openoffice.org.tbz:[/url] No address record
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/openoffice.org.tbz' by URL


I'm assuming OpenOffice should be present in RELEASE, right?

From the handbook

# pkg_add -r openoffice.org


Note: When running a -RELEASE version of FreeBSD, this should work. Otherwise, you should look on the FreeBSD OpenOffice.org Porting Team's web site to download and install the appropriate package using pkg_add(1). Both the current release and development version are available for download at this location.

Once the package is installed, you just have to type the following command to run OpenOffice.org:
 
SirDice said:
There is no -RELEASE or -STABLE ports tree. There's also no difference between 7.x and 8.x. There is only one (1) ports tree.

The packages on a -RELEASE cd (or the website) are packages that were created when the -RELEASE was made. They are NEVER updated, not even for security patches.

I know all about the ports tree and I wish to avoid it altogether. I hate compiling software. It takes too much time and I need a lot of software on my desktop. I program, develop my website, I design and I draw comics, write etc. etc.

That's why I am asking about how to get updated packages from a STABLE branch and whether it is safe or not to use.

I also tried portupgrade but it is not a satisfactory solution. I want to use the latest package if possible while updating, but portupgrade overrides the package in favour of the port and fails if there is no latest package found.
 
harishankar said:
I know all about the ports tree and I wish to avoid it altogether. I hate compiling software. It takes too much time and I need a lot of software on my desktop. I program, develop my website, I design and I draw comics, write etc. etc.
Especially for you it would be beneficial to compile from source. It means you can add/remove features and you're not stuck with the default options.

That's why I am asking about how to get updated packages from a STABLE branch and whether it is safe or not to use.
Yes, you can safely use the /stable/ branch for packages. I'd actually recommend it for the simple reason that the /release/ packages are never, ever, updated.
 
Actually you're right. But the problem is I have an extremely slow and unstable internet connection (max speed around 30 kB/s) and we get frequent power cuts. Compiling software is risky even with my laptop because the battery doesn't last too long. I hate to redo a lot of work and I cannot leave my laptop unattended for a long period of time. So except very small software, I prefer not to compile and especially not Oo_Org or Gnome or similar.

For me at least packages seem to be a safer option.
 
Simply what I want to achieve is this:

1. Points the PACKAGESITE to a reasonably recent branch and update all my existing packages from the newer ones.

2. Move my base system eventually to the higher version using freebsd-update

3. Once again update packages using the above method.

I know it sounds simple but the basic pkg_* tools don't give any mass-management options does it. Is there any command that says "update all the packages in this system to the package version found in BRANCH x.y and ignore ports completely"

I think portupgrade with the -PP option will do this. Am I right?
 
harishankar said:
I know it sounds simple but the basic pkg_* tools don't give any mass-management options does it. Is there any command that says "update all the packages in this system to the package version found in BRANCH x.y and ignore ports completely"
Install ports-mgmt/portmaster or ports-mgmt/portupgrade.

I think portupgrade with the -PP option will do this. Am I right?
Correct.
 
Hiya harishankar,

I am in the same boat as you although my reason is just that I do not like being tied to the internet.

I usually make offline package backups on the university machines and then copy them via usb hard drive to my home offline PC.

Whilst this works flawlessly for RELEASE packages, I find that STABLE usually causes problems because it tends to need newer libraries yet my existing applications require the older ones etc... (All the joys of using a single library system)

What I tend to do is copy ideas from Mac OS X and Windows (and PC-BSD) here and in the /opt directory I create completely standalone installs of the packages I need, each with all their required libraries. It takes forever but unfortunately due to this slight "flaw" in package managed systems (that only seems to affect people like us) it has to be done.

PC-BSD whilst isn't an alternative for me, may interest you because its .pbi package system apparently rolls up whole applications and required libraries into standalone installs. This makes it easier for offline management.

Also: I am finishing off an application that lets you recursively download packages and dependencies from the freebsd package collection using windows, let me know if you would like a copy. It helps when you only have access to the internet via a windows machine.

Regards,

Karsten
 
kpedersen said:
I usually make offline package backups on the university machines and then copy them via usb hard drive to my home offline PC.

Whilst this works flawlessly for RELEASE packages, I find that STABLE usually causes problems because it tends to need newer libraries yet my existing applications require the older ones etc... (All the joys of using a single library system)
What you should do is update all your packages, not just the ones you need.
 
SirDice said:
What you should do is update all your packages, not just the ones you need.

Yes... I know, unfortunately university closes at night :p
I simply do not want to do this. Especially since STABLE packages might change again, so I would have to do this all over again. This really is not feasible for me.

So yes, I can really only use pkg_add for RELEASE packages and must create separate installs (as mentioned above) for things like VirtualBox. It isn't a problem, afterall even Windows ties users down to their servers via online activation :)

I would be interested to know if I updated my ports collection, and tried to compile VirtualBox, would it start downloading dist files and compiling all updated libraries too, or would it compile VirtualBox against my currently installed libraries?
Does it check what package version is installed and just use that and only compile a latest version if a required package (any version) is not installed.

Perhaps I could create my own 8.0-RELEASE-EXTRA packages directory at university.

Cheers,
 
kpedersen said:
I would be interested to know if I updated my ports collection, and tried to compile VirtualBox, would it start downloading dist files and compiling all updated libraries too, or would it compile VirtualBox against my currently installed libraries?
That depends. If you do a make install in the port's directory it'll just use the already installed versions. If you use portmaster, portmaster will update all dependencies first.

Does it check what package version is installed and just use that and only compile a latest version if a required package (any version) is not installed.
That depends on the port. Some ports require specific versions, other's just need a minimal version.

Perhaps I could create my own RELEASE-EXTRA packages directory at university.
I've been building my own package repository for years ;)
 
I'm doing this at the moment

portupgrade -aFPPRr

because I want to fetch all the package and recursive dependencies first before running the update. My home internet connection is pathetically slow and many packages keep failing to download.

Another related problem is that if for some reason the power goes off and the wireless modem switches off and when it powers back on, FreeBSD simply does not re-associate the access point and I am no longer able to use the internet. Using /etc/rc.d/netif restart has no effect. :(
 
It's extremely frustrating at the moment as the power keeps getting cut off and the damn modem turns off and then on and FreeBSD is unable to reaccess that AP without a reboot. Any hints will be appreciated.

I use the if_wpi driver Intel 3945ABG.
 
I think a UPS would be a wise investment ;)

Have you tried # /etc/rc.d/hostapd restart
 
We have a UPS. The thing is when the UPS takes over from the mains, the modem reboots. Just that fraction of a second delay is enough :(

I'll try that, thanks.
 
Install sysutils/bsdadminscripts and use the pkg_upgrade tool that comes with it.

Between that and pkg_add and pkg_delete, you have everything you need for a packages-only system.

Once bsdadminscripts is installed, you can completely delete /usr/ports from your system.

pkg_add -r is used to install new applications.
pkg_delete -xi is used to delete (uninstall) applications.
pkg_upgrade is used to upgrade installed applications to newer versions.

Just be sure to set PACKAGESITE to point to the -stable directory for your version of FreeBSD:
 
to resume download
Code:
wget -c -nd [name of .gz or]
to resume compiles
Code:
cd /usr/ports/lang/gcc42 # for example
make build 
[cntl-c]
(  later... )

make build
(  should continue where the first left off. )
you can install /yell/ to notify at the end
...
Those might solve just a few of the issues.
 
Thanks mates. I'll install the bsdadmin scripts and use pkg_upgrade.

portupgrade is nice and all, but it works poorly with -PP option, meaning that syncing the ports tree is necessary and it tries to download a package even if it is non-existent and when it fails it downloads an already existing package version.
 
Back
Top