Local pkg repository

Was wondering whether I could do a host override on my router to redirect pkg.freebsd.org to 192.168.1.31 (my repository host) so that I could leave /etc/pkg/FreeBSD.conf untouched....

Can I expect that to work?
 
Well it seemed realatively easy enough to create

/usr/local/www/apache24/data/FreeBSD:12:amd64

and then copy over files from pkg.FreeBSD.org although I have yet to copy over the contents as I'm not sure about how much space the directories take up.

I changed the redirection on my router and pkg install -y mc seemed to work once I worked out which files were required. However I'm not sure whether I downloaded the files from my local repository or from FreeBSD since there is no logfile entry for accessing the repository...
 
It returns
FreeBSD
Not sure what that tells me...
ping pkg.freebsd.org pings 192.168.1.34 which is my local repository, however there are no enties in apache's access.log showing the files have been accessed..
 
What is set in /etc/pkg/FreeBSD.conf or /usr/local/etc/pkg/repos/FreeBSD.conf as local repository name? Ex.:
Rich (BB code):
FreeBSD: {
           url: "pkg+http://pkg.freebsd.org/${ABI}/latest",
           enabled:    true,
Set the name to something unique, ex.: Balanga: { , reinstall mc, check again. If it's from the local repository, it should return Balanga.
 
You're missing what I've done... I haven't changed anything on the system I'm testing. It is a first boot environment where FreeBSD has just been installed and a firstboot script is being run. I'm attempting to reroute requests to pkg.freebsd.org via my router without making any manual changes to the newly installed system.
 
Just found the problem with the apache access logs... looks like they had been access, but it didn't look right.. the reason... the web server was in a jail and had a PDT timezone whereas it should have been a GMT timezone :oops:
 
Now that I have configured a local pkgs repository I need to install some pkgs... how much space does
/FreeBSD:12:amd64/quarterly/All/
take up?

Just wondered if it's possible to use my local repository as more of a cache so pkgs would be served if previously retrieved, but if not they would be directly retrieved from FreeBSD...
 
86.9731 Gigabytes to be exact:
pkg stats
Code:
Local package database:
    Installed packages: 1035
    Disk space occupied: 10 GiB

Remote package database(s):
    Number of repositories: 1
    Packages available: 31541
    Unique packages: 31541
    Total size of packages: 81 GiB
 
So the question, for me, is given that I'll probably only ever want 1% of 31,000 apps should I allocate 81GB of disk space for a repository where 99% of the space will never be used?

How to decide what to add to the repository?
 
Back
Top