Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#31055 - [iana-etc] /etc/services missing comments; unable to build using ABS

Attached to Project: Arch Linux
Opened by Phillip Smith (fukawi2) - Wednesday, 08 August 2012, 04:33 GMT
Last edited by Gaetan Bisson (vesath) - Wednesday, 08 August 2012, 06:44 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The latest update for iana-etc (2.30-3) has stripped almost all comments from /etc/services. These comments are very useful as textual descriptions of ports, rather than cryptic shortnames.

For example, shortname vs text description:
"ntp" vs # Network Time Protocol
"netbios-ns" vs # NETBIOS Name Service

I'm also unable to rebuild myself using ABS. The output file I get now is empty apart from a heading comment:

# See also: services(5), http://www.sethwklein.net/projects/iana-etc/
#

I suspect it's something related to the Makefile patch that is applied, but I'm not familiar with gawk enough to debug it further.


Additional info:
iana-etc (2.30-3)
x86_64

Steps to reproduce:
Install iana-etc 2.30-3, /etc/services.pacnew will be created.
This task depends upon

Closed by  Gaetan Bisson (vesath)
Wednesday, 08 August 2012, 06:44 GMT
Reason for closing:  Won't fix
Comment by Gaetan Bisson (vesath) - Wednesday, 08 August 2012, 06:12 GMT
See  FS#30644 : upstream has switched to a new XML format and there is no easy way to convert it to /etc/services while keeping the metadata presented meaningfully.

Also, building from ABS works fine for me. If you had copy-pasted an error message or two into your bug report, it might have been a little more useful...
Comment by Gaetan Bisson (vesath) - Wednesday, 08 August 2012, 06:14 GMT
I will take a wild guess that:
- You did not update your ABS tree before trying to build iana-etc.
- You did not see the first line of /etc/services which refers you to /usr/share/iana-etc/port-numbers.iana for the comments/metadata you were looking for.
Comment by Phillip Smith (fukawi2) - Wednesday, 08 August 2012, 06:19 GMT
Apologies, I did forget to update the ABS tree first; disregard the issue with being unable to build.

I did see the comment regarding the XML file, but it's still not very friendly to read, especially if you want to grep for something in particular. It's just not sanely possible to `grep 554/tcp /etc/services` within the XML file.
Comment by Phillip Smith (fukawi2) - Wednesday, 08 August 2012, 06:21 GMT
RE the other (closed) FS... What's wrong with pulling the plain text version IANA provide?
http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt
Comment by Phillip Smith (fukawi2) - Wednesday, 08 August 2012, 06:31 GMT
It might not be overly pretty, but it can be parsed in one line:

cat service-names-port-numbers.txt | grep -Po '\S+\s+\d+\s+(tcp|udp)\s+[^\[]*' | perl -e 'while (<>) { ($sn, $pn, $prot, $c) = split(/\s+/, $_, 4); print "$sn\t$pn/$prot\t#$cmt"; }'
Comment by Gaetan Bisson (vesath) - Wednesday, 08 August 2012, 06:42 GMT
Since IANA dropped their last plain text fromat without notice, I'm not really enclined to rely on the new one.

Also, your script outputs garbage here: no newline, mysterious $cmt variable, etc. But the plain text file has fundamental problems anyway, such as multi-line comments appearing before and after service lines (see for instance tcp/90 aka dnsix), etc. It seems to me that IANA generated some HTML from the XML and just fed that to `w3m -dump` or the like... So I would not even try to parse this file.

Of course, I would be interested if you found a simple and robust way to generate a nicer-to-read /etc/services. But nothing better than the current iana-etc came out of the thoughts I spent on this...
Comment by Gaetan Bisson (vesath) - Wednesday, 08 August 2012, 06:44 GMT
I'll close this bug report but please drop me an email if/when you find a good way of generating a meaningful /etc/services.

Loading...