Solved Using downloaded packages on multiple pc

hello

I installed FB FreeBSD 10.1 on one of my home PCs, it runs fine. Now I'd like to install on my other PCs. Since I have a slow internet connection at home, I'm hoping that I could take advantage the packages already downloaded (Xorg, Xfce, etc) and install them onto other PCs.

Is it possible? If so, how do I accomplish it?
 
Everything downloaded should be in /var/cache/pkg. Copy them to the other PCs and use pkg add <pkg file name>, rather than pkg install ....
 
This is just an idea. I've never done this.

I think you can create your own repository with pkg-repo(8), then create packages out of all installed packages with pkg-create(8), export the repository somehow (e.g. using HTTP or copy it to your other computers), and create a /usr/local/etc/pkg/repos/whatever.conf on the other computers so pkg uses that repository.

If you want to install exactly the same software on them you could also just copy /usr/local and /var/db/pkg directly.
 
ljboiler's suggestion was probably the easiest method. But whichever method you choose, you're still likely to lack some of the dependency packages. Which will necessitate pkg(8) fetching them. But in the end, you'll still save time not having to download/fetch those you've copied to /var/cache/pkg. :)

--Chris
 
Everything downloaded should be in /var/cache/pkg. Copy them to the other PCs and use pkg add <pkg file name>, rather than pkg install ....


thanks!

Another question:
Are the packages (i.e. Xorg and XFCE ) the same for 32- and 64-bit installation?
 
Packages are built specifically for an architecture. And if the question is, are the same packages available for 64 and 32 bit? Then yes. At least most of them, there are some exceptions for ports that do not work on 64 bit. But there's only a couple of them (of the 24.000+).
 
Packages are built specifically for an architecture. And if the question is, are the same packages available for 64 and 32 bit? Then yes. At least most of them, there are some exceptions for ports that do not work on 64 bit. But there's only a couple of them (of the 24.000+).

tThanks.

tThe reason iI asked is because iI've got a mixture of i386 and amd64 desktops/laptops at home. iI've looked at /var/cache/pkg of a 64-bit installation, and judging by names, the packages there (xorg, xfce etc) don't seem to indicate it's 64-bit specific. sSo iI was wondering whether iI can just carry over the packages to machine with 32-bit FreeBSD installation.
 
thanks

the reason i asked is because i've got a mixture of i386 and amd64 desktops/laptops at home. i've looked at /var/cache/pkg of a 64-bit installation, and judging by names, the packages there (xorg, xfce etc) don't seem to indicate it's 64-bit specific. so i was wondering whether i can just carry over the packages to machine with 32-bit FreeBSD installation.

The package names don't have the ${ABI} encoded to them *) but they are architecture specific (with few exceptions that are so called noarch packages). You can't use AMD64 packages on i386.

*) This may seem a bit odd considering how many of the Linux packaging systems name the packages but the developers of the new pkg system didn't want to change the package naming too much from the old packaging system. Another case of POLA, "principle of least astonishment".
 
Everything downloaded should be in /var/cache/pkg. Copy them to the other PCs and use pkg add <pkg file name>, rather than pkg install ....

I copied contents from /var/cache/pkg to another machine and run pkg add xorg

Error returned:
Code:
pkg: xorg: no such file or directory
pkg: was 'pkg install xorg' meant?
failed to install the following 1 package: xorg
 
OK, still need to use pkg install instead of pkg add.

pkg install xorg: it then extracts the 'xorg' packages from local repository and install them.

Although some other copied packages cannot be extracted this way, 'icewm' 'opera' still need to be downloaded from internet.
 
The pkg add command needs a full path to the package being added, pkg install uses the remote repositories defined in the configuration.
 
Back
Top