modified: glicid/packages/nginx.scm

modified:   glicid/packages/sssd.scm
	modified:   glicid/services/networking.scm
This commit is contained in:
Jean-François GUILLAUME 2022-11-30 16:50:37 +01:00
parent ed70a51d2b
commit dedae47561
GPG key ID: 38751DAE145EFB5A
3 changed files with 314 additions and 388 deletions

View file

@ -15,8 +15,7 @@
#:use-module (gnu packages web) #:use-module (gnu packages web)
#:use-module (gnu packages xml) #:use-module (gnu packages xml)
#:use-module (gnu packages tls) #:use-module (gnu packages tls)
#:use-module (glicid packages openldap) #:use-module (glicid packages openldap))
)
(define-public nginx (define-public nginx
(package (package
@ -31,7 +30,8 @@
(arguments (arguments
`(#:tests? #f `(#:tests? #f
#:phases #:phases
(modify-phases %standard-phases (modify-phases
%standard-phases
(add-before 'configure 'patch-/bin/sh (add-before 'configure 'patch-/bin/sh
(lambda _ (lambda _
(substitute* "auto/feature" (substitute* "auto/feature"
@ -95,8 +95,8 @@
(synopsis "HTTP and reverse proxy server") (synopsis "HTTP and reverse proxy server")
(description (description
"Nginx (\"engine X\") is a high-performance web and reverse proxy server "Nginx (\"engine X\") is a high-performance web and reverse proxy server
created by Igor Sysoev. It can be used both as a stand-alone web server created by Igor Sysoev. It can be used both as a stand-alone web server
and as a proxy to reduce the load on back-end HTTP or mail servers.") and as a proxy to reduce the load on back-end HTTP or mail servers.")
(license (list license:bsd-2 license:expat license:bsd-3 license:bsd-4)))) (license (list license:bsd-2 license:expat license:bsd-3 license:bsd-4))))
@ -110,13 +110,9 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "https://github.com/kvspb/nginx-auth-ldap") (url "https://github.com/kvspb/nginx-auth-ldap")
(commit version) (commit version)))
)
)
(file-name (git-file-name "nginx-ldap-auth-module" version)) (file-name (git-file-name "nginx-ldap-auth-module" version))
(sha256 (base32 "023zmdir7w92dnb508ggskkc7kmd7k71hc597sb7i4xfgpwxzq1s")) (sha256 (base32 "023zmdir7w92dnb508ggskkc7kmd7k71hc597sb7i4xfgpwxzq1s"))))
)
)
(synopsis "LDAP Authentication module for nginx") (synopsis "LDAP Authentication module for nginx")
(description "LDAP module for nginx which supports authentication against multiple LDAP servers.") (description "LDAP module for nginx which supports authentication against multiple LDAP servers.")
(build-system gnu-build-system) (build-system gnu-build-system)
@ -127,39 +123,23 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(arguments (arguments
(substitute-keyword-arguments (substitute-keyword-arguments
`(#:configure-flags '("--add-dynamic-module=.") `(#:configure-flags '("--add-dynamic-module=.")
#:make-flags '("modules") #:make-flags '("modules") ,@(package-arguments nginx))
,@(package-arguments nginx)
)
((#:phases phases) ((#:phases phases)
`(modify-phases ,phases `(modify-phases ,phases
(add-after 'unpack 'unpack-nginx-sources (add-after 'unpack 'unpack-nginx-sources
(lambda* (#:key inputs native-inputs #:allow-other-keys) (lambda* (#:key inputs native-inputs #:allow-other-keys)
(begin (begin
;; The nginx source code is part of the modules source.
(format #t "decompressing nginx source code~%") (format #t "decompressing nginx source code~%")
(let ((tar (assoc-ref inputs "tar")) (nginx-srcs (assoc-ref inputs "nginx-sources"))) (let ((tar (assoc-ref inputs "tar")) (nginx-srcs (assoc-ref inputs "nginx-sources")))
(invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1") (invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1"))
) #t )))
#t
)
)
)
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules"))) (let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules")))
(install-file "objs/ngx_http_auth_ldap_module.so" modules-dir) (install-file "objs/ngx_http_auth_ldap_module.so" modules-dir)
#t #t )))
)
)
)
(delete 'fix-root-dirs) (delete 'fix-root-dirs)
(delete 'install-man-page) (delete 'install-man-page)))))))
)
)
)
)
)
)
(define-public modsecurity (define-public modsecurity
(package (package
@ -171,9 +151,7 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(uri (list (uri (list
(string-append "https://github.com/SpiderLabs/ModSecurity/releases/download/v" version "/modsecurity-v" version ".tar.gz") (string-append "https://github.com/SpiderLabs/ModSecurity/releases/download/v" version "/modsecurity-v" version ".tar.gz")
)) ))
(sha256 (base32 "1isng4z2xijqq92105si1zxkzlx4ifdnn38d7n38mrfp7jdwhhg2")) (sha256 (base32 "1isng4z2xijqq92105si1zxkzlx4ifdnn38d7n38mrfp7jdwhhg2"))))
)
)
(synopsis "modsecurity module for nginx") (synopsis "modsecurity module for nginx")
(description "modsecurity module for nginx.") (description "modsecurity module for nginx.")
(license license:asl2.0) (license license:asl2.0)
@ -190,16 +168,12 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
("pkg-config", pkg-config) ("pkg-config", pkg-config)
("nginx-sources", (package-source nginx)) ("nginx-sources", (package-source nginx))
)) ))
(arguments `( (arguments
#:configure-flags (list `( #:configure-flags (list
(string-append "--with-curl=" (assoc-ref %build-inputs "curl")) (string-append "--with-curl=" (assoc-ref %build-inputs "curl"))
(string-append "--with-pcre=" (assoc-ref %build-inputs "pcre:bin") "/bin/pcre-config") (string-append "--with-pcre=" (assoc-ref %build-inputs "pcre:bin") "/bin/pcre-config")
(string-append "--with-libxml=" (assoc-ref %build-inputs "libxml2")) (string-append "--with-libxml=" (assoc-ref %build-inputs "libxml2"))
"--enable-standalone-module" "--enable-standalone-module" )))))
)
))
)
)
(define-public nginx-modsecurity-module (define-public nginx-modsecurity-module
(package (package
@ -238,26 +212,14 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(let ((tar (assoc-ref inputs "tar")) (nginx-srcs (assoc-ref inputs "nginx-sources"))) (let ((tar (assoc-ref inputs "tar")) (nginx-srcs (assoc-ref inputs "nginx-sources")))
(invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1") (invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1")
) )
#t #t )))
)
)
)
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules"))) (let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules")))
(install-file "objs/ngx_http_modsecurity_module.so" modules-dir) (install-file "objs/ngx_http_modsecurity_module.so" modules-dir)
#t #t )))
)
)
)
(delete 'fix-root-dirs) (delete 'fix-root-dirs)
(delete 'install-man-page) (delete 'install-man-page)))))))
)
)
)
)
)
)
(define-public nginx-geoip2-module (define-public nginx-geoip2-module
(package (package
@ -270,9 +232,7 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(uri (list (uri (list
(string-append "https://github.com/leev/ngx_http_geoip2_module/archive/refs/tags/" version ".tar.gz") (string-append "https://github.com/leev/ngx_http_geoip2_module/archive/refs/tags/" version ".tar.gz")
)) ))
(sha256 (base32 "0lllgnasd97r6xkj70q42rp61cxrz8qlb64l14rmlwcd6hizqwmd")) (sha256 (base32 "0lllgnasd97r6xkj70q42rp61cxrz8qlb64l14rmlwcd6hizqwmd"))))
)
)
(synopsis "GeoIP2 module for nginx") (synopsis "GeoIP2 module for nginx")
(description "GeoIP2 module for nginx.") (description "GeoIP2 module for nginx.")
(build-system gnu-build-system) (build-system gnu-build-system)
@ -283,9 +243,7 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(arguments (arguments
(substitute-keyword-arguments (substitute-keyword-arguments
`(#:configure-flags '("--add-dynamic-module=.") `(#:configure-flags '("--add-dynamic-module=.")
#:make-flags '("modules") #:make-flags '("modules") ,@(package-arguments nginx))
,@(package-arguments nginx)
)
((#:phases phases) ((#:phases phases)
`(modify-phases ,phases `(modify-phases ,phases
(add-after 'unpack 'unpack-nginx-sources (add-after 'unpack 'unpack-nginx-sources
@ -296,27 +254,15 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(let ((tar (assoc-ref inputs "tar")) (nginx-srcs (assoc-ref inputs "nginx-sources"))) (let ((tar (assoc-ref inputs "tar")) (nginx-srcs (assoc-ref inputs "nginx-sources")))
(invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1") (invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1")
) )
#t #t )))
)
)
)
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules"))) (let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules")))
(install-file "objs/ngx_http_geoip2_module.so" modules-dir) (install-file "objs/ngx_http_geoip2_module.so" modules-dir)
(install-file "objs/ngx_stream_geoip2_module.so" modules-dir) (install-file "objs/ngx_stream_geoip2_module.so" modules-dir)
#t #t )))
)
)
)
(delete 'fix-root-dirs) (delete 'fix-root-dirs)
(delete 'install-man-page) (delete 'install-man-page)))))))
)
)
)
)
)
)
(define-public nginx-http_subs_filter-module (define-public nginx-http_subs_filter-module
(package (package
@ -329,9 +275,7 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(uri (list (uri (list
(string-append "https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/" version ".tar.gz") (string-append "https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/" version ".tar.gz")
)) ))
(sha256 (base32 "1cxb3yv6085rj50s001p2vblvz5px2v92whwjhb14kl8fnm2cans")) (sha256 (base32 "1cxb3yv6085rj50s001p2vblvz5px2v92whwjhb14kl8fnm2cans"))))
)
)
(synopsis "substitutions_filter module for nginx") (synopsis "substitutions_filter module for nginx")
(description "substitutions_filter module for nginx.") (description "substitutions_filter module for nginx.")
(build-system gnu-build-system) (build-system gnu-build-system)
@ -341,9 +285,7 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(arguments (arguments
(substitute-keyword-arguments (substitute-keyword-arguments
`(#:configure-flags '("--add-dynamic-module=.") `(#:configure-flags '("--add-dynamic-module=.")
#:make-flags '("modules") #:make-flags '("modules") ,@(package-arguments nginx))
,@(package-arguments nginx)
)
((#:phases phases) ((#:phases phases)
`(modify-phases ,phases `(modify-phases ,phases
(add-after 'unpack 'unpack-nginx-sources (add-after 'unpack 'unpack-nginx-sources
@ -354,23 +296,11 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(let ((tar (assoc-ref inputs "tar")) (nginx-srcs (assoc-ref inputs "nginx-sources"))) (let ((tar (assoc-ref inputs "tar")) (nginx-srcs (assoc-ref inputs "nginx-sources")))
(invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1") (invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1")
) )
#t #t )))
)
)
)
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules"))) (let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules")))
(install-file "objs/ngx_http_subs_filter_module.so" modules-dir) (install-file "objs/ngx_http_subs_filter_module.so" modules-dir)
#t #t )))
)
)
)
(delete 'fix-root-dirs) (delete 'fix-root-dirs)
(delete 'install-man-page) (delete 'install-man-page)))))))
)
)
)
)
)
)

View file

@ -2,25 +2,22 @@
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (gnu packages dns)
#:use-module ((gnu packages sssd) #:prefix gnu:) #:use-module ((gnu packages sssd) #:prefix gnu:)
) )
(define-public sssd-upstream-orig (define-public sssd
(package (package
(inherit gnu:sssd) (inherit gnu:sssd)
(name "sssd-upstream") (name "sssd")
(version "1_16_5") (version "2.8.1")
(source (source
(origin (origin
(inherit (package-source gnu:sssd)) (method url-fetch)
(method git-fetch) (uri (string-append "https://github.com/SSSD/sssd/releases/download/2.8.1/sssd-" version ".tar.gz"))
(uri (git-reference (sha256 (base32 "121i1xh89r3bv59rndnrdlra3fvzam88g15gq0acpj1n6ib3ay0s"))))
(url "https://github.com/SSSD/sssd") (inputs `( bind
(commit (string-append "sssd-" version)) ,@(package-inputs gnu:sssd)
)) ))))
(file-name (git-file-name name version))
(sha256 (base32 "0zbs04lkjbp7y92anmafl7gzamcnq1f147p13hc4byyvjk9rg6f7")) sssd
)
)
)
)

View file

@ -23,8 +23,7 @@
(squid-loglevel squid-loglevel (default 1)) (squid-loglevel squid-loglevel (default 1))
(squid-config-file squid-config-file (default (file-append squid "/etc/squid.conf"))) (squid-config-file squid-config-file (default (file-append squid "/etc/squid.conf")))
(pid-file squid-pid-file (default "/var/run/squid/squid.pid")) (pid-file squid-pid-file (default "/var/run/squid/squid.pid"))
(log-file squid-log-file (default "/var/log/squid/squid.log")) (log-file squid-log-file (default "/var/log/squid/squid.log")))
)
(define squid-shepherd-service (define squid-shepherd-service
(match-lambda (match-lambda