Date: Tue, 27 Mar 2018 08:56:57 -0400 From: Anthony Jenkins <Scoobi_doo@yahoo.com> To: freebsd-ports@freebsd.org Subject: Two pkg(8) repo configs pointing to same repo Message-ID: <1f9c9001-a6fa-55aa-2362-2b80d597b18f@yahoo.com>
next in thread | raw e-mail | index | archive | help
I've set up a poudriere package server on my home FreeBSD desktop. My laptop has two ways to access this server, depending on whether it's inside or outside my home LAN (thanks to my stupid ISP router). When I'm on my home network, I have to use its local IP address (e.g. 192.168.1.5, or the locally-resolvable name my router gives it). When I'm on the Internet, I use my publicly resolvable name (e.g. myserver.mydomain.com). I can resolve myserver.mydomain.com on my LAN, but that's the public IP address of my router and it will not route packets to my poudriere server using that address (I used to have an ISP router that /would/ send my internal packets back through the NAT). Because of these two mutually-exclusive ways of referring to my poudriere web server, and unless there's a better solution (e.g. fix the underlying routing or name resolution problem), I have to maintain two pkg repo configuration files - /usr/local/etc/pkg/repos/poudriere.conf and .../poudriere-local.conf. They're identical except for the URL and I only have one enabled at a time. Is there a way to configure a pkg(8) repo such that it has multiple ways to refer to the same physical repository? I'm picturing the "url:" parameter being either a string or a list of strings: my-repo: { url: { "http://192.168.1.5/poudriere/packages/freebsd_12-1-amd64-HEAD", "http://myserver.mydomain.com/poudriere/packages/freebsd_12-1-amd64-HEAD" }, mirror_type: "http", signature_type: "pubkey", enabled: yes, priority: 1 } but I don't think that's in the pkg(8) specification. I can try to implement this and submit patches if it's worthwhile, or is there a better way to fix/workaround my inside/outside LAN addressing problem? Thanks, Anthony
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1f9c9001-a6fa-55aa-2362-2b80d597b18f>