Re: Request for Review: Generate /etc/services from the IANA registry

From: Steffen Nurpmeso <steffen_at_sdaoden.eu>
Date: Wed, 12 Sep 2018 02:10:44 +0200
Eric van Gyzen wrote in <f7d97e9c-e880-1a87-e7f0-3f8a8b8661ac_at_vangyzen.net>:
 |On 9/11/18 10:04 AM, Steffen Nurpmeso wrote:
 |> Alan Somers wrote in <CAOtMX2iHph_mS9PBkSaSs+dsjVa9niScQ9-Q-efr5pavf_9tZ\
 |> w_at_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.

Oh please, of course.  For me personally the FreeBSD version is
good enough anyway, it is just that i discovered this script for
a pretty common Linux distribution, and adopted it for a lesser
common one when there was a need to update the DBs.  To be honest
i have discovered it in the packaging system in some repository,
and that is a pity.  FreeBSD as i got to know it, and i would have
snooped around in /usr/share/misc of a default install in that
case first, and if i would have been lucky i would have discovered
good stuff to help me out.  That is all.

 |>|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.

If you argue like this, anything is possible, is it.  If IANA
changes the XML tags, the Python script needs to be adjusted, too.
And if you ask me, i would vote for, and change to JSON.  No
offense, i said the same on a Unicode list, for example.

 |Also, that script would become much more complex if it supported local 
 |additions and overrides, which are unfortunately necessary in our case.

Come one.  I mean, come on.  What are you talking about?  You have
written these things, and they will likely enter FreeBSD.  This
does not make it just just any better in my eyes.  (Though the
counting program could be adjusted and be used as a test if the
sorted output would be compared against a sed(1) run on
/etc/services.)  If it would be me, a very small awk script would
enter /usr/share/misc, and some makefile would be adjusted and
call it, or a duplicate.  Base system self-contained, and some
nice hint to be found for someone who looks around.

I mean, i really looked out of interest at some review page in the
webbrowser (glad that you posted this for people who do not like
browsers that much, or get email notifications or whatever), which
was so large or whatever, anyway it blocked the tab.  Isn't that
absurd for a simple update framework for IANA databases in /etc?
(And what about protocols, by the way.)
Just my one cent, of course.  I am not even a developer.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
Received on Tue Sep 11 2018 - 22:09:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:18 UTC