-
Notifications
You must be signed in to change notification settings - Fork 161
Add nftables / libnftables dependencies #1256
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
Conversation
49c2067 to
2791749
Compare
|
This one probably also needs to be opened in the packaging repo; And we need to check if this PR made its way there as well; |
|
Looks like it fails to install on CentOS; does it perhaps require one of the optional, disabled by default repositories to be enabled? ---> Making bundle: dynbinary (in bundles/dynbinary)
Building dynamic bundles/dynbinary-daemon/dockerd (linux/arm64)...
# github.com/moby/moby/v2/daemon/libnetwork/internal/nftables
# [pkg-config --cflags -- libnftables]
Package libnftables was not found in the pkg-config search path.
Perhaps you should add the directory containing `libnftables.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libnftables', required by 'virtual:world', not found
error: Bad exit status from /var/tmp/rpm-tmp.68S0ik (%build) |
|
OH! Nevermind; you only updated the RHEL variants, not the CentOS ones; so just updating those probably should fix it? |
Looking at it now ... it's the conditional check added to the rpm spec in this PR, I need to find a way to match RHEL and not CentOS. |
|
oh! yes, I recall I ran into similar ones; they are .... finicky |
It builds ok with dynamic linking on CentOS, so the build-tag isn't needed in the CentOS Dockerfiles. It's only RHEL that wants a subscription for the So, just a case of getting the conditionals right in the spec ... looks like |
|
@robmry these two diffs may help; they added / removed some conditionals also on distro-name IIRC; |
By default, dynamically linked dockerd builds now link against libnftables, instead of exec-ing the nft binary. So, add build deps on libnftables-dev / nftables-devel for those builds ... apart from on RHEL. RHEL's nftables-devel package is only available with a subscription from its CRB repo. For now, just set the Go build tag "no_libnftables" for these builds so they don't try to link against libnftables. Signed-off-by: Rob Murray <rob.murray@docker.com>
2791749 to
1a73c6b
Compare
|
I couldn't find a way to tell the difference between RHEL/CentOS in the RPM spec file, so @thaJeztah suggested using a That works fine for the I couldn't work out a way to get the shell expansion right when passing the Not very satisfactory, but it works ... better ideas very welcome! |
I think that's OK; maybe even better as it allows comparing the Dockerfiles and see where they differ. Overall, this repository is on its way out with things having moved to |
| iptables, | ||
| nftables, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point, we should make the change to make iptables a weak dependency (or no dependency at all), and only nftables a required dependency.
Given that it's still experimental, we could make nftables a weak dependency, but maybe that's little gain, as it will become a hard requirement in the near future (I expect).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed on Slack - let's just make it a hard dependency now. It'll already be installed in most places anyway, it'll be required when we deprecate iptables support, and it's needed to try out the experimental nftables support.
I'll make the update.
thaJeztah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
left some comment, in case we do want to start with "weak" dependency, but probably a bit too pedantic (even for me 😂)
|
I'll bring this one in; we discussed on slack that most users would already have |
- What I did
By default, dynamically linked dockerd builds now link against libnftables, instead of exec-ing the nft binary.
So, add build deps on libnftables-dev / nftables-devel for those builds ... apart from on RHEL.
RHEL's nftables-devel package is only available with a subscription from its CRB repo. For now, just set the Go build tag "no_libnftables" for these builds so they don't try to link against libnftables.
This is only needed for moby 29.x ... so, unfortunately, I think we'll need to branch this repo again for 28.x builds.
- Description for the changelog
- Dynamically linked dockerd now depends on package "nftables" and has a build dependency on the nftables dev package, apart from on RHEL.