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

openldap: fix build if openssl or cyrus_sasl are overridden to null, add flag for cyrus_sasl, require openssl #108046

Merged

Conversation

sternenseemann
Copy link
Member

@sternenseemann sternenseemann commented Dec 31, 2020

Motivation for this change

Compiling openldap.override { cyrus_sasl = null; } results in an evaluation error.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

cc @lovek323

@SuperSandro2000
Copy link
Member

Other than that LGTM.

@sternenseemann sternenseemann force-pushed the openldap-without-tls-or-sasl branch 2 times, most recently from fc11023 to 52df434 Compare January 15, 2021 11:37
@sternenseemann sternenseemann force-pushed the openldap-without-tls-or-sasl branch 3 times, most recently from bbd87c0 to 4a5d3be Compare February 13, 2021 11:45
@SuperSandro2000
Copy link
Member

@sternenseemann you did not rebase cleanly and left a merge conflict in.

Note that compiling without openssl is only a theoretical possibility
since we have no alternative crypto backends supported by the package.
@sternenseemann
Copy link
Member Author

Should be fine now.

* instead of cyrus_sasl == null, withCyrusSasl = false is now the proper
  way to disable sasl support for openldap.
* the ability to compile without openssl has been removed, since openssl
  is required as the package needs it for libcrypto.
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that the diff LGTM. @lovek323

pkgs/development/libraries/openldap/default.nix Outdated Show resolved Hide resolved
* Quote some shell arguments
* Make rm fail if openldap ever ceases to install var to $out
@SuperSandro2000
Copy link
Member

openldap.override { withCyrusSasl = true; }

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Feb 18, 2021

Also cross compiles to aarch64-multiplatform.

pkgs/development/libraries/openldap/default.nix Outdated Show resolved Hide resolved
rm -r libraries/*/.libs
rm -r contrib/slapd-modules/passwd/*/.libs
for f in "$out/lib/libldap.la" "$out/lib/libldap_r.la"; do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for f in "$out/lib/libldap.la" "$out/lib/libldap_r.la"; do
for f in $out/lib/libldap.la $out/lib/libldap_r.la; do

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove quoting? This is really bizarre bikeshedding.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it is not required and most parts of nixpkgs is not doing it.

@SuperSandro2000 SuperSandro2000 changed the title openldap: fix build if openssl or cyrus_sasl are overridden to null openldap: fix build if openssl or cyrus_sasl are overridden to null, add flag for cyrus_sasl, require openssl Feb 19, 2021
@SuperSandro2000 SuperSandro2000 merged commit dc7769b into NixOS:staging Feb 19, 2021
@sternenseemann sternenseemann deleted the openldap-without-tls-or-sasl branch February 19, 2021 00:45
@sternenseemann
Copy link
Member Author

What GitHub merge method did you use? Apparently this is one where it loses all commit messages except for the (in this case slightly out of date) PR title and number? Would be nice to use one which preserves the commit messages even when squashing.

@SuperSandro2000
Copy link
Member

Squashing. The is no never method to squash and keep the title. I would need to force push that to your branch.

@Profpatsch
Copy link
Member

@SuperSandro2000 Please don’t squash PRs with sensible commits.

@Profpatsch
Copy link
Member

Rebase them instead

@Profpatsch
Copy link
Member

Alternatively, squash them locally to keep all descriptions and then push the squashed commit before merging. All extended descriptions that @sternenseemann wrote just went away.

@SuperSandro2000
Copy link
Member

Alternatively, squash them locally to keep all descriptions and then push the squashed commit before merging. All extended descriptions that @sternenseemann wrote just went away.

git sometimes takes 10 minutes to force push other peoples branches and runs out of memory. I am to lazy to wait for that.

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

3 participants