/var/cache/pkg on network

Didn't you ask the very same question just a few days ago? Have you tried it? I don't see a reason why this wouldn't work, after all, it's just a cache. You should of course expect the clean command to clean the cache based on the packages installed on the machine you're running it on.
 
Didn't you ask the very same question just a few days ago? Have you tried it? I don't see a reason why this wouldn't work, after all, it's just a cache. You should of course expect the clean command to clean the cache based on the packages installed on the machine you're running it on.
No, that was using the host's cache from within a jail. That gave me the idea that I might be able to use the cache on a totally different system.
No idea if this is feasible or if it would work.
 
I'd argue that's conceptually the same, and I'd suggest you just give it a try. Just, as already mentioned, be aware that pkg clean might clean out more than you'd probably want.
 
I was wondering whether I could use /etc/pkg/FreeBSD.conf and within that set

url: "file:///mnt/nfs/var/cache/pkg"

or somesuch where a different systems cache is mounted....
 
Don't edit /etc/pkg/FreeBSD.conf. Add a /usr/local/etc/pkg/repos/FreeBSD.conf if you want to make changes. And yes, you can use a file:// URL.

Code:
dice@molly:~ % cat /usr/local/etc/pkg/repos/dicelan.conf
dicelan-server: {
  enabled: yes
  url: file:///usr/local/poudriere/data/packages/14-stable-server/
}

url: "file:///mnt/nfs/var/cache/pkg"
So, where is it going to fetch a package from if it's not in the cache?
 
Hello balanga,
I have had running a completely different approach some time ago. I have had setup www/squid with a reasonable cache size. The configuration has been to cache only the stuff related to FreeBSD package updates and files received due to freebsd-update. The other machines must be configured to use the computer running squid as a proxy.
 
Back
Top