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

nginxModules: add auth-a2aclr #134332

Merged
merged 2 commits into from Jan 26, 2022
Merged

Conversation

fufexan
Copy link
Contributor

@fufexan fufexan commented Aug 16, 2021

Motivation for this change

Add ARPA2 resource ACL and HTTP SASL modules for NGINX as part of Summer of Nix.

I will revert the formatting if needed.

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 packages 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/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@putchar
Copy link
Contributor

putchar commented Aug 18, 2021

Result of nixpkgs-review pr 134332 run on x86_64-linux 1

$ nix-env --option system x86_64-linux -f /home/putchar/.cache/nixpkgs-review/pr-134332-1/nixpkgs -qaP --xml --out-path --show-trace --meta
Nothing to be built.

@fufexan fufexan mentioned this pull request Aug 20, 2021
12 tasks
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/423

inputs = [
(pkgs.arpa2common.overrideAttrs
(old: rec {
version = "0.7.1";
Copy link
Member

Choose a reason for hiding this comment

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

That version is two years old. Can't we use a newer one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The homepage https://gitlab.com/arpa2/nginx-auth-a2aclr says the requirements are:

  • source of liba2aclr 0.7.1 (ARPA2 Resource ACLs, part of libarpa2common)
  • source of nginx >=1.17

arpa2common has advanced quite a bit since, and I'm not sure if it's compatible anymore.

Copy link
Member

Choose a reason for hiding this comment

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

Can you please check if newer versions still work?

@fufexan
Copy link
Contributor Author

fufexan commented Jan 26, 2022

As expected, the header file was (re)moved:

error: builder for '/nix/store/i4wb519qc5w0g9p0rvi1xp4gq7lfri7h-nginx-1.20.2.drv' failed with exit code 2;
       last 10 log lines:
       > gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I /nix/store/2ysp5ichpccf4lv1wp2qcwz0bmm840f1-rtmp -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/stream \
       >     -o objs/addon/y5a68vw53lbwkqyfqwq9j8af8hjg0z6b-auth-a2aclr/ngx_http_auth_a2aclr_module.o \
       >     /nix/store/y5a68vw53lbwkqyfqwq9j8af8hjg0z6b-auth-a2aclr/ngx_http_auth_a2aclr_module.c
       > /nix/store/y5a68vw53lbwkqyfqwq9j8af8hjg0z6b-auth-a2aclr/ngx_http_auth_a2aclr_module.c:24:10: fatal error: arpa2/a2aclr.h: No such file or directory
       >    24 | #include <arpa2/a2aclr.h>
       >       |          ^~~~~~~~~~~~~~~~
       > compilation terminated.
       > make[1]: *** [objs/Makefile:2090: objs/addon/y5a68vw53lbwkqyfqwq9j8af8hjg0z6b-auth-a2aclr/ngx_http_auth_a2aclr_module.o] Error 1
       > make[1]: Leaving directory '/build/nginx-1.20.2'
       > make: *** [Makefile:10: build] Error 2

It seems to have been removed in v2.0.0. An update to the nginx module itself is required to keep it working with the latest version.

@SuperSandro2000 SuperSandro2000 merged commit 188fd37 into NixOS:master Jan 26, 2022
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

6 participants