From owner-freebsd-current@freebsd.org Tue Sep 11 15:10:17 2018 Return-Path: Delivered-To: freebsd-current@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 7C09810940BA for ; Tue, 11 Sep 2018 15:10:17 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27D487B156; Tue, 11 Sep 2018 15:10:16 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from hammy.vangyzen.net (unknown [70.97.188.230]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 50F965646F; Tue, 11 Sep 2018 10:10:10 -0500 (CDT) Subject: Re: Request for Review: Generate /etc/services from the IANA registry To: Alan Somers , FreeBSD CURRENT , Steffen Nurpmeso References: <8b7930bc-1086-05d3-c019-052368ddf097@vangyzen.net> <59cd421e-f5d4-855a-83ec-65726f792555@vangyzen.net> <20180911142000.unrYV%steffen@sdaoden.eu> <20180911150456.JQd44%steffen@sdaoden.eu> From: Eric van Gyzen Message-ID: Date: Tue, 11 Sep 2018 10:10:09 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180911150456.JQd44%steffen@sdaoden.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2018 15:10:17 -0000 On 9/11/18 10:04 AM, Steffen Nurpmeso wrote: > Alan Somers wrote in w@mail.gmail.com>: > |Don't worry Steffen.  Python won't be a build requirement for FreeBSD \ > |even after Eric's patch.  His Python script will only need to be run \ > |whenever IANA > |updates its database, and the results will be checked into source contro\ > |l.  So for a normal user, there is no change to "make buildworld && make > |installworld". > > I cannot, unfortunately. I use binary updates and even > preinstalled VM images (thanks for that, by the way). So there will be no impact on you at all, except that /etc/services will have a lot more services. As Alan said, Python and XML will only be added to the developer workflow. > |As for Python vs Awk, I too tried to do this with Awk.  However, Awk \ > |can't easily handle things like IANA's representation of aliases, and \ > |it can't > |easily format the list in the same order as our current list.  Python \ > |is truly a better choice. > > I absolutely fail to see what you mean. The script (which is in > actual use, mind you) generates the desired output except that > comments get lost, but this could be added upon interest, of > course. It (or a derivative) would have been a good candidate for > /usr/share/misc/ in elder times i guess, too. That awk script depends on the formatting of the XML file. It will break if the IANA decides to format it differently. Granted, this is unlikely, but it's possible. Also, that script would become much more complex if it supported local additions and overrides, which are unfortunately necessary in our case. Eric