I know many people already answered but I'm sort of ignoring all that because I cannot help but think that programs such as Synth are serious overhead for what the OP is asking.
I need to know how to save the xf86-video-ati, sddm and plasma5-sddm-kcm files to cd/dvd/usb in a kind of offline repository.
It's actually really easy, and you don't need much else besides the base tools. You can simply download the individual package files and then use
# pkg add
to add those to your other system.
However... keep well in mind that some packages have specific dependencies which you're also going to have to satisfy, otherwise things don't work:
Code:
root@psi:/usr/local/etc # pkg search -d xf86-video-ati
xf86-video-ati-18.1.0,1
Comment : X.Org ati display driver
Depends on :
libXi-1.7.9_2,1
xorg-server-1.18.4_10,1
mesa-libs-18.1.9_4
libdrm-2.4.96,1
libpciaccess-0.13.5
So if you don't make sure that you also include these packages as well then you'll eventually run into problems. Fortunately there's an easy solution: let the package manager sort it all out for you. We do that by "installing" the package (which would also pull in its dependencies) but without actually installing.
To avoid problems we're also going to download those packages into another, separate, directory. We can learn about these options by studying
/usr/local/etc/pkg.conf:
Code:
root@psi:/usr/local/etc # grep -i cache pkg.conf
#PKG_CACHEDIR = "/var/cache/pkg";
That option specifies where the downloaded packages get stored. And if you take a look at
pkg-install(8) you'll notice a few interesting options:
-F ('fetch only') and the fact that we can use environment variables to override some options in
pkg.conf, including the cache directory.
SO...
Code:
root@psi:~ # mkdir pkg
root@psi:~ # set PKG_CACHEDIR=/root/pkg
root@psi:~ # echo $PKG_CACHEDIR
/root/pkg
root@psi:~ # pkg install -qyF xf86-video-ati
Note that I used
set because I'm using the default
csh shell, on Bourne based shells (
sh or
bash) you'd probably want to use
export. I also used
-qy for demonstration purposes only, you can easily stick with
-F if you're using this interactively.
Problem: I seem to be experiencing a bug or I'm overlooking something obvious because even though
pkg.conf(5) tells me that the environment variable should override any (default) settings in
pkg.conf my experiences are different. In the above situation everything got downloaded to the default directory of
/var/cache/pkg and I have no idea why that is so right now.
So worst case scenario: edit
/usr/local/etc/pkg.conf, set the variable
PKG_CACHEDIR to point at your directory and use the command above.
Now, the install command doesn't only pull in dependencies from
xf86-video-ati, it recurses this operation; so it also pulls in dependencies from the packages that the 'ATI package' depends on. This could be a good thing of course, but if you only want to concentrate on the direct dependencies of these packages then use this:
Code:
root@psi:/var/cache/pkg # ls xf86*
xf86-video-ati-18.1.0,1-9deda9fb07.txz xf86-video-ati-18.1.0,1.txz@
root@psi:/var/cache/pkg # pkg info -dF ./xf86-video-ati-*txz
xf86-video-ati-18.1.0,1:
libXi-1.7.9_2,1
libdrm-2.4.96,1
libpciaccess-0.13.5
mesa-libs-18.1.9_4
xorg-server-1.18.4_10,1
root@psi:/var/cache/pkg # mv xf86-video-ati*txz libXi-1* libdrm* libpciacc* mesa* xorg-serv* /root/pkg
root@psi:/var/cache/pkg # ls /root/pkg
libXi-1.7.9_2,1-2d0ca2f640.txz mesa-dri-18.1.9_3.txz@
libXi-1.7.9_2,1.txz@ mesa-libs-18.1.9_4-629a58ec07.txz
libdrm-2.4.96,1-9af5283799.txz mesa-libs-18.1.9_4.txz@
libdrm-2.4.96,1.txz@ xf86-video-ati-18.1.0,1-9deda9fb07.txz
libpciaccess-0.13.5-ed1d77b50e.txz xf86-video-ati-18.1.0,1.txz@
libpciaccess-0.13.5.txz@ xorg-server-1.18.4_10,1-ac7f448db9.txz
mesa-dri-18.1.9_3-47dab7e4fd.txz xorg-server-1.18.4_10,1.txz@
Ok, so this also copied the symlinks but you can easily get rid of those:
find /root/pkg -type l -delete
.
And now you only have the 'ATI package' plus its direct dependencies. On the new system you can use
# pkg add /root/pkg/*
to actually install all those packages. Of course you don't have to include the dependencies if you don't want to, but I suggest that you do because otherwise you'll run into problems.
Hope this can help.