Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Sep 2018 10:10:09 -0500
From:      Eric van Gyzen <eric@vangyzen.net>
To:        Alan Somers <asomers@freebsd.org>, FreeBSD CURRENT <freebsd-current@freebsd.org>, Steffen Nurpmeso <steffen@sdaoden.eu>
Subject:   Re: Request for Review: Generate /etc/services from the IANA registry
Message-ID:  <f7d97e9c-e880-1a87-e7f0-3f8a8b8661ac@vangyzen.net>
In-Reply-To: <20180911150456.JQd44%steffen@sdaoden.eu>
References:  <8b7930bc-1086-05d3-c019-052368ddf097@vangyzen.net> <59cd421e-f5d4-855a-83ec-65726f792555@vangyzen.net> <20180911142000.unrYV%steffen@sdaoden.eu> <CAOtMX2iHph_mS9PBkSaSs%2BdsjVa9niScQ9-Q-efr5pavf_9tZw@mail.gmail.com> <20180911150456.JQd44%steffen@sdaoden.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/11/18 10:04 AM, Steffen Nurpmeso wrote:
> Alan Somers wrote in <CAOtMX2iHph_mS9PBkSaSs+dsjVa9niScQ9-Q-efr5pavf_9tZ\
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f7d97e9c-e880-1a87-e7f0-3f8a8b8661ac>