NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.38k stars 13.61k forks source link

`zeromq` package is missing optional features provided by other distributions #337508

Closed PJungkamp closed 1 week ago

PJungkamp commented 2 weeks ago

Describe the bug

The zeromq package providing libzmq is missing several features that other distributions enable by default.

Some examples:

Features like ENABLE_CURVE and WITH_LIBSODIUM should probably be enabled by default. I was expecting curve support from the package and even saw libsodium in the package's inputs, yet I ran into an ENOTSUP on zmq_curve_keypair.

Expected behavior

An we should probably provide build options similar to the upstream RHEL packaging. See https://github.com/zeromq/libzmq/blob/1f4dd54f94009cb57bb68bfc856edc1c0bd3df06/packaging/redhat/zeromq.spec#L184-L193

Most should probably be enabled by default.

Notify maintainers

@fpletz


Add a :+1: reaction to issues you find important.

smancill commented 2 weeks ago

I can work on this tomorrow, but I'd rather follow what Debian does:

override_dh_auto_configure:
    dh_auto_configure -- --with-pgm --with-libsodium --with-norm=yes \
        --with-libgssapi_krb5=yes --disable-Werror

Certainly we need to enable the flag to use libsodium. About CurveZMQ, I'd say the best option is to provide an input flag as false that can be overridden by those who prefer it.

fpletz commented 2 weeks ago

About CurveZMQ, I'd say the best option is to provide an input flag as false that can be overridden by those who prefer it.

Since we depend on libsodium anyway I don't think there is any harm in enabling CurveZMQ by default - even without a flag. Are there negative side effects when enabling CurveZMQ?

PJungkamp commented 2 weeks ago
override_dh_auto_configure:
  dh_auto_configure -- --with-pgm --with-libsodium --with-norm=yes \
      --with-libgssapi_krb5=yes --disable-Werror

Is OpenPGM or NORM even present in nixpkgs? I don't think that we can enable these.

smancill commented 2 weeks ago

About CurveZMQ, I'd say the best option is to provide an input flag as false that can be overridden by those who prefer it.

Since we depend on libsodium anyway I don't think there is any harm in enabling CurveZMQ by default - even without a flag. Are there negative side effects when enabling CurveZMQ?

Sorry, I was confusing the CurveCP protocol, which is supported by enabling libsodium, with CurveZMQ, which is a CurveCP implementation but its a whole different library that depends on libzmq.

There is no flag related to CurveZMQ on ZeroMQ. But we do need to enable the flag to build with CurveCP support.

override_dh_auto_configure:
    dh_auto_configure -- --with-pgm --with-libsodium --with-norm=yes \
        --with-libgssapi_krb5=yes --disable-Werror

Is OpenPGM or NORM even present in nixpkgs? I don't think that we can enable these.

Yes, sure, if the flag doesn't apply to Nix then it will not be considered.

smancill commented 1 week ago

Closed by #338064.

(Why it wasn't closed automatically if it was linked?)