From owner-freebsd-ports@freebsd.org Tue Mar 27 13:07:14 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DEE6F50A52 for ; Tue, 27 Mar 2018 13:07:14 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) Received: from sonic313-10.consmr.mail.ne1.yahoo.com (sonic313-10.consmr.mail.ne1.yahoo.com [66.163.185.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF582836A5 for ; Tue, 27 Mar 2018 13:07:13 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) X-YMail-OSG: IGm2gw4VM1kFGIihTsAgvE2DrMSeSn0s1BWx_TkkCrgJlJ9EtVGZKth.H5HLQNj SLUG84NX0QrEzvBbqR4c9wZ38W1dFoigO9m0GG1Oc75ocG4HYoxoz3OJIg69zJ3l5sRw44T3zokj fiyeExuXY7AFcHxc.Tl9jaxS4DsVmhBdYVOmlBAeD8MZ0_S.nBDS.GWU9ms8ZzrgpWWBsdrsUHok 4tCB9f58hUGyicaWvrlkCI9zYHARe70YA0gry8sOKZ4O7yh01yulTD5lLRC9Qp7JWQ9mQGzcd7ys 9AcY.EnYVMljFmSq0rT.DK3FEKpb56V_k0npOmyTzBRfVdDLsnBtezSQkYcYQnW1LBKdNvceBhJI 2Q85Nb_Rf2Z8aYJO.byNRZm.veqER4ii6QtBsKckpAEK2nz7qR2joyTToXwpsGnxQPvLUSdgWxvV lto8nwqBHyQh3_gUShkH9rOnEfZ17gaDiGbd9vgPaEC2Q.pHYByLOgQVjEpr.hvAqHaBkvnnOEII wFL6xDASQaA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Tue, 27 Mar 2018 13:07:07 +0000 Received: from 192.34.49.8 (EHLO ajenkins-hplaptop.mydomain.local) ([192.34.49.8]) by smtp432.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 37ebd2ddc747928916e62f862d2cee03 for ; Tue, 27 Mar 2018 12:56:59 +0000 (UTC) To: freebsd-ports@freebsd.org From: Anthony Jenkins Subject: Two pkg(8) repo configs pointing to same repo Message-ID: <1f9c9001-a6fa-55aa-2362-2b80d597b18f@yahoo.com> Date: Tue, 27 Mar 2018 08:56:57 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2018 13:07:14 -0000 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