nginx-shib / nginx-http-shibboleth

Shibboleth auth request module for nginx
https://github.com/nginx-shib/nginx-http-shibboleth/wiki
Other
209 stars 27 forks source link

Unable to Install Shibboleth Modules for NGINX on Amazon Linux 2023 (AWS Elastic Beanstalk) #54

Closed atnjqt closed 9 months ago

atnjqt commented 9 months ago

Description the bug

I am unable to install the rpm on Amazon Linux 2023

Expected behaviour

$ sudo wget https://hg.nginx.org/pkg-oss/raw-file/default/build_module.sh 
$ sudo chmod a+x build_module.sh
$ sudo ./build_module.sh -v 1.24.0 -n shibboleth https://github.com/nginx-shib/nginx-http-shibboleth.git

$ cd build-module-artifacts/
$ sudo dnf install ./nginx-module-shibboleth-1.24.0+1.0-1.amzn2023.ngx.x86_64.rpm
Error:
 Problem: conflicting requests
  - nothing provides nginx-r1.24.0 needed by nginx-module-shibboleth-1.24.0+1.0-1.amzn2023.ngx.x86_64

Versions and Systems

davidjb commented 9 months ago

This is related to your installation environment and not having the specific version of nginx available for installation (nothing provides nginx-r1.24.0) - check your ability to sudo dnf install nginx-r1.24.0 and you should find that it errors, unable to find a match.

I'm not sure where your current nginx executable is coming from, but I'm guessing it's from the default amazonlinux repos. Wherever this is from, its rpm spec file doesn't provide nginx-r1.24.0, but the nginx packages from nginx.org do: https://hg.nginx.org/pkg-oss/file/default/rpm/SPECS/nginx.spec.in#l112.

Setup instructions for the nginx repos are at https://nginx.org/en/linux_packages.html#RHEL, though you'll need to adjust the base URL to suit Amazon Linux; URL structures for the nginx repos can be browsed from https://nginx.org/packages/.

In other words, create the nginx.repo file, update baseurl=http://nginx.org/packages/amzn/2023/$basearch/ and you should be good to go to install your built module and the correct version of nginx.