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

Add netbase to docker-stacks-foundation image - fixes #2128 #2129

Merged
merged 2 commits into from
Aug 4, 2024

Conversation

AlexHill
Copy link
Contributor

Describe your changes

Add the netbase Ubuntu package to the docker-stacks-foundation image.

This could also go in base, or minimal, but as a part of POSIX it seems like this belongs in the foundation image. It also seems analogous to the locales package installed in the same spot.

Issue ticket if applicable

Fix: #2128

Checklist (especially for first-time contributors)

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests
  • I will try not to use force-push to make the review process easier for reviewers
  • I have updated the documentation for significant changes

@mathbunnyru
Copy link
Member

@mathbunnyru, @consideRatio, @yuvipanda, and @manics, please vote 👍 to accept this change and 👎 not to accept it (use a reaction to this message)

The voting deadline is the 6th of August (a week since I posted this message).
The change is accepted, if there are at least 2 positive votes.

We can have a discussion until the deadline, so please express your opinions.

@consideRatio
Copy link
Collaborator

Its very small (12kB download, 40kB installed) and its maintained by ubuntu people so I also expect this to be sufficiently secure and robust.

I'm looking to understand the value of this package on a bit higher level. I understand /etc/protocols shows up thanks to this for example, and that is required by some C functions - @AlexHill did you run into a limitation of not having /etc/protocols using Python/R/Julia or some CLI etc, or did you use these C functions directly?

@yuvipanda
Copy link
Contributor

getprotocolbynumber was rejected for inclusion in CPython as being 'rarely used' (python/cpython#68997), but getprotobyname (https://github.com/python/cpython/blob/1cac0908fb6866c30b7fe106bc8d6cd03c7977f9/Modules/socketmodule.c#L6142) is part of cpython. That calls the glibc function, which as I understand requires these files to work (as they're part of POSIX).

This means if there is at least one package that calls getprotobyname, I'm happy for this to be included. I quickly checked the two obvious culprits (requests and aiohttp), and found no uses of getprotobyname. Do you have a link to any library that actually uses that call?

@AlexHill
Copy link
Contributor Author

Yes, I ran into this trying to use the spead2 Python package to analyse astronomical data, (though I’m not sure whether the calls in question are in Python code or in the C++ extension).

Took a bit of tracking down - my test case in base ubuntu:22.04 with just git and python added works, because netbase is a recommended package of git. But we install git with --no-install-recommends in the minimal image, so it doesn’t end up installed.

@yuvipanda
Copy link
Contributor

Good enough explanation for me :) given it is part of posix / glibc, i voted +1

@mathbunnyru
Copy link
Member

Nice, thanks, everyone! Waiting for the comment to be added in the dockerfile and then I'll merge this

@AlexHill
Copy link
Contributor Author

AlexHill commented Aug 1, 2024

Thanks - added a comment.

@mathbunnyru mathbunnyru merged commit 6ed34af into jupyter:main Aug 4, 2024
73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include netbase Ubuntu package in images
6 participants