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

Libprefixed to multioutput/heimdal #42295

Merged
merged 5 commits into from Sep 5, 2018

Conversation

avnik
Copy link
Contributor

@avnik avnik commented Jun 20, 2018

Motivation for this change

Say "farewell" to long-lived ad-hoc hack, when we had two derivations for one package -- one for library-only version, second one with programs and daemons built.

This PR contain finalized heimdal rework, factored out of #38494
(because it hard to maintain so long live branch, which cause significant local rebuild)

See #14693 for problem history and details.

Actually I haven't test nixos service module, because IDK how to run heimdal kerberos server.
So some feedback for users welcomed. Applications which build against heimdal kerberos buildds and run (at least some of them, which I tried)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

find $out/bin -type f | grep -v 'krb5-config' | xargs rm
preConfigure = ''
configureFlagsArray+=(
"--bindir=$out/bin" # Put binaries to $out, then move them to $bin,
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure what you're doing is safe then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possible one of binaries referenced by libs, and it created cross reference, I make one more try to figure out, which binary does it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dezgeg well, I found source libkrb5 have some inner macro processor, which able to expand %{BINDIR} so we have $out (aka lib) refer to $bin.

So we have 2 options:

  • patch out BINDIR and SBINDIR tokens from macro
  • keep current solution (put all to $out and sort later in postInstall)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dezgeg so do you have any idea which option is better? I'd like to have it merged sometimes ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds like the safest thing to do is to have both binaries and libraries in $out then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So could you find a time, and review/merge please?

@@ -76,14 +66,27 @@ stdenv.mkDerivation rec {
(cd lib/hcrypto; make -j $NIX_BUILD_CORES)
'';

# FIXME: share/info hits $bin, IDK why, but I decide is to minor to block
Copy link
Contributor

Choose a reason for hiding this comment

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

You can add an info output for the info pages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

info fixed

@avnik avnik force-pushed the libprefixed-to-multioutput/heimdal branch from 4fd3bfe to 73d8d33 Compare June 21, 2018 04:42
@@ -21,53 +16,49 @@ stdenv.mkDerivation rec {
sha256 = "1j38wjj4k0q8vx168k3d3k0fwa8j1q5q8f2688nnx1b9qgjd6w1d";
};

outputs = [ "out" "bin" "dev" "man" "info" ];
Copy link
Member

Choose a reason for hiding this comment

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

I would just leave out the bin output. It is fine to have binaries in out.

@avnik
Copy link
Contributor Author

avnik commented Jul 30, 2018 via email

@avnik avnik force-pushed the libprefixed-to-multioutput/heimdal branch from 73d8d33 to e0a6e41 Compare August 8, 2018 10:38
@avnik
Copy link
Contributor Author

avnik commented Sep 5, 2018

@matthewbauer done everything month ago ;) May be time to finish it?

@matthewbauer matthewbauer merged commit 4120a9d into NixOS:master Sep 5, 2018
@matthewbauer
Copy link
Member

Sorry - forgot about this. Looks good!

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

4 participants