Updates from my binary files

  • Thread starter Thread starter Hanky-panky
  • Start date Start date
H

Hanky-panky

Guest
Hi, I'm not so new anymore. It is now like three months that I use FreeBSD (9.0-release) and I can say I'm happy about it related to everything but ports and updates/upgrades management.

I just updated a box after days of compiling and now I have all those binary packages. Is it possible to use them to update another similar machine?

I think I should say portmaster (this is the program I mainly do use to upgrade my packages to use binary (and if memory serves me well the correct string is -PP) then I can't figure out how I can tell portmaster to use my packages, the ones I compiled myself on the other machine, and not the packages on the FreeBSD binary server (usually very outdated).

How can I accomplish this job?

Thank you to all if you can help this noob.
 
1... search the forums ("gnuls"), see the post I made in April about copying to/from a thumbdrive.
2... copy to the thumbdrive (if the files are in /usr/ports/packages/portmaster-download or somewhere near it, or created with pkg_create -b /var/db/pkg/...
3... put the thumdrive on the other machine (or setup FTP) and there, put them in /usr/ports/packages/portmaster-download
4...
Code:
 portmaster -d -B -P -i /var/db/pkg...
, though in this case due to the large number of ports I automated it with an xargs script.
Code:
cat fil | grep -v [some problematic port(s) ] | awk '{print $1}' | xargs -J % portmaster -d -B -P -i -g --update-if-newer --force-config %
the fil first line should read like
Code:
graphics/png      ...
graphics/giflib ...
graphics/dri   ...
...........
That is an overview probably, it may not fit your situation but in most cases would work once the procedure above is tweaked into workability for the machines...
 
Hello and thank you for your kind reply.

I was inspecting the updated machine to find the tbz packages and I'm surprissed I can't find them in any location. My packages were built with this string: [cmd=]portmaster -a -B -d --no-confirm[/cmd]

They shouldn't be cleaned up after installation with a string like the one above. Where are they?

Under /usr/ports/packages I do have the All, portmaster-backup, and portmaster-download directories. They are all empty.

A search using this command: [cmd=]find / -name *tbz -print[/cmd] found no packages.

So, where are my beloved packages, they cost me days and days of downtime, and I want them back.

Where am I wrong?
 
portmaster builds them if the -g flag is used; otherwise you could
Code:
cd /usr/ports/packages/portmaster-download
pkg_create -b /var/db/pkg...
pkg_create -b /var/db/pkg 
# sometimes fails, might work with
pkg_create -h -z -b /var/db/pkg 
# flags in that order, -b final one...
That is code to run on the newer install.
 
jb_fvwm2 said:
portmaster builds them if the -g flag is used; otherwise you could
Code:
cd /usr/ports/packages/portmaster-download
pkg_create -b /var/db/pkg...
pkg_create -b /var/db/pkg 
# sometimes fails, might work with
pkg_create -h -z -b /var/db/pkg 
# flags in that order, -b final one...
That is code to run on the newer install.
Thank you! All the variants of this program works as expected but... just one package at a time. I do have like 1,000 packages installed. Is there a batch option allowing to process all the /var/db/pkg/* files at the same time?

I say, a command like [CMD=]pkg_create -b /var/db/pkg/*[/CMD](this does not work) to make all the packages at the same time?
 
Don't know. In various shells I get a "permission denied" when trying a one-line loop... maybe with
Code:
 | xargs -J % pkg_create -b %
? No time to test... I usually get those working, but more often than not after an hour or two.
 
Back
Top