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

doas: add enablePAM option #94040

Merged
merged 1 commit into from Oct 15, 2020
Merged

doas: add enablePAM option #94040

merged 1 commit into from Oct 15, 2020

Conversation

@KAction
Copy link
Contributor

@KAction KAction commented Jul 27, 2020

New option "enablePAM" controls whether to build support for pluggable
authetincation modules. Default value is "true", which correspond to
existing behaviour. Futhermore, with default configuration, this change
do not cause rebuild.

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.
@KAction
Copy link
Contributor Author

@KAction KAction commented Oct 7, 2020

@cole-h @cstrahan Can you please review and merge this change?

, enablePAM ? true

Copy link
Member

@cole-h cole-h Oct 7, 2020

Keeping with the established style of the file:

Suggested change
, enablePAM ? true
, withPAM ? true

@@ -24,7 +25,7 @@ stdenv.mkDerivation rec {
configureFlags = [
(lib.optionalString withTimestamp "--with-timestamp") # to allow the "persist" setting
"--pamdir=${placeholder "out"}/etc/pam.d"
];
] ++ lib.optional (!enablePAM) "--without-pam";
Copy link
Member

@cole-h cole-h Oct 7, 2020

I'd prefer this went inside the configureFlags list, just as withTimestamp above.

New option "withPAM" controls whether to build support for pluggable
authetincation modules. Default value is "true", which correspond to
existing behaviour. Futhermore, with default configuration, this change
do not cause rebuild.
@KAction
Copy link
Contributor Author

@KAction KAction commented Oct 9, 2020

@cole-h Applied your suggestions.

cole-h
cole-h approved these changes Oct 9, 2020
Copy link
Member

@cole-h cole-h left a comment

LGTM, thanks. One minor question below, but approval stands either way.

[2 built, 1 copied (0.1 MiB), 0.0 MiB DL]
https://github.com/NixOS/nixpkgs/pull/94040
1 package built:
doas

@@ -23,6 +24,7 @@ stdenv.mkDerivation rec {

configureFlags = [
(lib.optionalString withTimestamp "--with-timestamp") # to allow the "persist" setting
(lib.optionalString (!withPAM) "--without-pam")
"--pamdir=${placeholder "out"}/etc/pam.d"
Copy link
Member

@cole-h cole-h Oct 9, 2020

Should we also gate this with lib.optionalString withPAM "..."?

Copy link
Contributor Author

@KAction KAction Oct 9, 2020

Well, upstream build system defaults to "--with-pam", so it is not strictly necessary.

@KAction
Copy link
Contributor Author

@KAction KAction commented Oct 10, 2020

Ofborg seems unhappy, but I don't understand why: attribute 'providerSourceAddress' missing. What should I do about it?

@cole-h
Copy link
Member

@cole-h cole-h commented Oct 10, 2020

@ofborg eval

Master was broken a few times yesterday, causing this issue.

cole-h
cole-h approved these changes Oct 10, 2020
@cole-h cole-h requested a review from adisbladis Oct 11, 2020
@KAction
Copy link
Contributor Author

@KAction KAction commented Oct 14, 2020

@cole-h Looks like everything is ready now.

@samueldr samueldr merged commit f3e4fc9 into NixOS:master Oct 15, 2020
19 checks passed
19 checks passed
@github-actions[bot]
tests tests
Details
@github-actions[bot]
action
Details
@ofborg[bot]
Evaluation Performance Report Evaluator Performance Report
Details
@github-actions[bot]
Wait for ofborg
Details
@ofborg[bot]
doas, doas.passthru.tests on aarch64-linux Success
Details
@ofborg[bot]
doas, doas.passthru.tests on x86_64-linux Success
Details
@ofborg[bot]
grahamcofborg-eval ^.^!
Details
@ofborg[bot]
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
@ofborg[bot]
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
@ofborg[bot]
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="99de53b"; rev="99de53b79bb8642d1fc865b70a55bc4da9f0d669"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
@ofborg[bot]
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="99de53b"; rev="99de53b79bb8642d1fc865b70a55bc4da9f0d669"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="99de53b"; rev="99de53b79bb8642d1fc865b70a55bc4da9f0d669"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="99de53b"; rev="99de53b79bb8642d1fc865b70a55bc4da9f0d669"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="99de53b"; rev="99de53b79bb8642d1fc865b70a55bc4da9f0d669"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="99de53b"; rev="99de53b79bb8642d1fc865b70a55bc4da9f0d669"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="99de53b"; rev="99de53b79bb8642d1fc865b70a55bc4da9f0d669"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
@ofborg[bot]
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants