Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iana-etc: 2.30 -> 20170317 #24053

Merged
merged 2 commits into from Mar 28, 2017
Merged

iana-etc: 2.30 -> 20170317 #24053

merged 2 commits into from Mar 28, 2017

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Mar 19, 2017

Motivation for this change

builds on #23621
Uses new upstream repo to get iana protocols as the previous one is unmaintained.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@Mic92, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @avnik and @LnL7 to be potential reviewers.

@Mic92 Mic92 changed the title Iana etc iana-etc: 2.30 -> 20170317 Mar 19, 2017
@Mic92 Mic92 force-pushed the iana-etc branch 2 times, most recently from 8e8c2a7 to ef9d31f Compare March 19, 2017 12:08
@ndowens
Copy link
Contributor

ndowens commented Mar 19, 2017

#23621 There is a newer PR now

@Mic92
Copy link
Member Author

Mic92 commented Mar 19, 2017

no, my one is newer and does things different.

@ndowens
Copy link
Contributor

ndowens commented Mar 19, 2017 via email

@c0bw3b
Copy link
Contributor

c0bw3b commented Mar 19, 2017

This is a bloated solution to a simple problem.

  • a 200LOC Python script running on TravisCI is fancy but pointless to a task that boils down to parsing a flat file.
  • maybe there is no need to ship both XML and processed files in your releases since the XML won't be installed in the store
  • your processed files contains duplicated entries :
subntbcst-tftp   247/tcp    # SUBNTBCST_TFTP
subntbcst_tftp   247/tcp    # SUBNTBCST_TFTP
subntbcst-tftp   247/udp    # SUBNTBCST_TFTP
subntbcst_tftp   247/udp    # SUBNTBCST_TFTP
[...]
redstorm-join    2346/tcp   # Game Connection Port
redstorm_join    2346/tcp   # Game Connection Port
redstorm-join    2346/udp   # Game Connection Port
redstorm_join    2346/udp   # Game Connection Port
redstorm-find    2347/tcp   # Game Announcement and Location
redstorm_find    2347/tcp   # Game Announcement and Location
redstorm-find    2347/udp   # Game Announcement and Location
redstorm_find    2347/udp   # Game Announcement and Location
redstorm-info    2348/tcp   # Information to query for game status
redstorm_info    2348/tcp   # Information to query for game status
redstorm-info    2348/udp   # Information to query for game status
redstorm_info    2348/udp   # Information to query for game status
redstorm-diag    2349/tcp   # Diagnostics Port
redstorm_diag    2349/tcp   # Diagnostics Port
redstorm-diag    2349/udp   # Diagnostics Port
redstorm_diag    2349/udp   # Diagnostics Port
[...]
mapper-nodemgr   3984/tcp   # MAPPER network node manager
mapper-nodemgr   3984/udp   # MAPPER network node manager
mapper-mapethd   3985/tcp   # MAPPER TCP/IP server
mapper-mapethd   3985/udp   # MAPPER TCP/IP server
mapper-ws-ethd   3986/tcp   # MAPPER workstation server
mapper-ws_ethd   3986/tcp   # MAPPER workstation server
mapper-ws-ethd   3986/udp   # MAPPER workstation server
mapper-ws_ethd   3986/udp   # MAPPER workstation server
  • I don't think that keeping descriptions as comments adds any valuable information (most of the time the desc just repeats the service name) but this is subjective

@Mic92
Copy link
Member Author

Mic92 commented Mar 19, 2017

  • the package does not install xml into the nix store (I want to keep the xml as the project might be interesting for other people as well)
  • Duplicate entries are fixed.
  • This pull request does not contain python code, just data (and tries not to win a code golfing challenge)
  • The travis job is not pointless as it make it easier to track updates and I get emails if things start failing.

@edolstra
Copy link
Member

This looks good to me. It seems preferable over #23621, which adds a 120 Kloc source file (https://github.com/NixOS/nixpkgs/pull/23621/files#diff-07b8b5731748622cee5bb9a2f6a73bd3) to the repository.

@c0bw3b
Copy link
Contributor

c0bw3b commented Mar 21, 2017

@edolstra No the original proposition of #23621 is to fetch content directly from IANA website and not rely on a third-party to provide a system file.
It has been re-updated just now in that sense. Also now it will always fetch the most up-to-date content from IANA, which means it would continuously make reliable etc files without the need to regularly update a hash in the Nix definition of iana-etc

@edolstra
Copy link
Member

@c0bw3b That's impure though. In Nix, you cannot have packages that fetch the latest version from upstream. Otherwise you could have two systems built from identical Nixpkgs, where one fails because it has an outdated version of /etc/services and the other succeeds. That violates the reproducibility goals.

@dtzWill
Copy link
Member

dtzWill commented Mar 24, 2017

👍 for getting one of these two PR's merged!

Turns out, after lots of debugging, our outdated /etc/protocols is behind the problems I'm experiencing with mono as part of #24093 (!!). I wouldn't be surprised if other things were similarly broken in confounding ways-- it turns out that with our current /etc/protocols, looking up "ip" protocol yields '4' (ipip/ipencaps) instead of '0'. If it's not problematic this might be worth getting into 17.03 O:).

@dtzWill
Copy link
Member

dtzWill commented Mar 24, 2017

FWIW locally I just grabbed the files from debian's "netbase": https://packages.debian.org/sid/netbase (git source repo: https://anonscm.debian.org/cgit/users/md/netbase.git/tree/) which might be a reasonable source for the data.

EDIT: Another alternative, which is apparently used as one of the sources for the debian version, would be to use these files from FreeBSD: /etc/protocols and /etc/services. They seem more up-to-date and complete than what's included in Debian (not sure why).

@Mic92 Mic92 merged commit f19547b into NixOS:master Mar 28, 2017
@Mic92 Mic92 deleted the iana-etc branch March 28, 2017 20:36
@c0bw3b
Copy link
Contributor

c0bw3b commented Mar 31, 2017

@dtzWill Debians' netbase is not complete enough. They handpick and add only what they think is useful.
FreeBSD files are more complete but a little messy.
Arch package is both complete and up-to-date.

At least this PR provides updated content now.
But relying on one external source to provide some system files is what has been done with the previous package. And it has proven unreliable over time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants