How do I download ports

I am trying to deal with an installation of FreeBSD 13.2-RELEASE on a computer which, although it has a Realtek NIC, during the installation of FreeBSD that NIC was not discovered by the system. Therefore, my installation has no network connection.

So, I need to find out where I can download the tarballs or distfiles for both realtek-re-kmod and for pkg-1.20.9_GH0.tar.gz. I will copy those from this computer to a USB drive, haul that to the other computer in my shop, then copy those to the shop computer and install them.

But I have not yet figured out from where to download those. Might anyone know?

Ken Gordon
 
But I have not yet figured out from where to download those.

The problem is that it doesn't allow you to browse. So you kind of have to guess the filename part. The package name is fairly predictable, as it's always the same. But the exact version can change over time. That said, I can explain how to get there.

So, we take the base URL like above; https://pkg.freebsd.org/FreeBSD:13:amd64/ The reference to 13 (major version) and AMD64 (architecture) should be fairly obvious. Adjust if necessary. The path from there will be /quarterly/All/ for the 'quarterly' packages, then the packagename; pkg-, realtek-re-kmod-. The exact version is the tricky bit. It changes, if I give the exact version now that link will be dead on the next update. So you need to figure this out when you're fetching the packages.

Look up the package on https://www.freshports.org for example ports-mgmt/pkg. It will tell you what the package name is. Scroll down the page a bit, there will be a list of package versions. For each supported version and architecture, a version from quarterly and latest. Pick the version from the 'quarterly' column. Last is the .pkg extension.

Put all this together (quarterly has 1.20.9 now): https://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/All/pkg-1.20.9.pkg
Clicky link: https://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/All/pkg-1.20.9.pkg

net/realtek-re-kmod: https://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/All/realtek-re-kmod-198.00_3.pkg
https://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/All/realtek-re-kmod-198.00_3.pkg

I will copy those from this computer to a USB drive, haul that to the other computer in my shop, then copy those to the shop computer and install them.
Copy them to a FAT32 formatted USB stick. You can read that on a "bare" FreeBSD install.


In case it wasn't obvious, this downloads the package, not the distfiles required to build the port. Building typically requires a bunch of other build dependencies. Lots of files to download. Plus it'll take time to build it all. Just grab the packages and quickly install those. Get it online. Then you can build everything from source if you really want.
 
I have been told the pkg files have changed and are no longer in tar.gz format.
The new file extension is .pkg
These are both compressed and non-compress from what I can gander.
Please correct me if wrong.

So take *.pkg files from a working FreeBSD-13.2 installation (same arch) and put on usb stick.
Begin by cleaning up your existing packages with pkg clean.
This will clean your file repository in /var/cache/pkg/
Now install the package you want on "other" machine and when complete scrape file out of /var/cache/pkg/

You can also scrape them out without pkg clean. It just makes it easier to see newest files.
I don't know what pkg-1.20.9_GHO.pkg looks like....
 
I may be overlooking something, but what I see:
Code:
# pkg search realtek-re-kmod
realtek-re-kmod-198.00_3       Kernel driver for Realtek PCIe Ethernet Controllers
# pkg install realtek-re-kmod   
<... snap ...>
# pkg list realtek-re-kmod
/boot/modules/if_re.ko
/usr/local/share/licenses/realtek-re-kmod-198.00_3/BSD4CLAUSE
/usr/local/share/licenses/realtek-re-kmod-198.00_3/LICENSE
/usr/local/share/licenses/realtek-re-kmod-198.00_3/catalog.mk
You only need /boot/modules/if_re.ko

If the browsing PC with internet access has the same CPU architecture (i.e intel/AMD), why not use a live FreeBSD USB stick to boot from on the browsing PC with internet access, install the realtek package* on it and copy /boot/modules/if_re.ko to the destination PC and adding if_re_load="YES" to loader.conf
Edit: according to pkg info -D realtek-re-kmod, you should add to loader.conf:
Code:
if_re_load="YES"
if_re_name="/boot/modules/if_re.ko"
on the destination PC. That should be sufficient for internet access, right?

Then after booting on the destination PC, you can (now having internet access) easily do pkg install realtek-re-kmod and you're set to go.

___
* provided of course that the browsing PC does have a NIC where the FreeBSD USB stick has the driver already on board.
 
Last edited:
I have been told the pkg files have changed and are no longer in tar.gz format.

They haven't been .tgz for ages. More recently they've been .txz ie tar.xz format.

The new file extension is .pkg

Confusingly for some, all .txz files were renamed to .pkg before 12.3 and 13.1 IIRC. Only the extension changed, and pkg can still work with .tgz, .txz and other (internal) formats.

These are both compressed and non-compress from what I can gander.
Please correct me if wrong.

No, you're no goose :)
 
I keep a USB-to-ethernet adapter handy for situations like this... FreeBSD is pretty good at detecting those from get-go. It's a pretty good backup connection that OP can use to download drivers for built-in NIC.
 
Back
Top