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 xml)
#:use-module (gnu packages tls)
#:use-module (glicid packages openldap)
)
#:use-module (glicid packages openldap))
(define-public nginx
(package
@ -31,7 +30,8 @@
(arguments
`(#:tests? #f
#:phases
(modify-phases %standard-phases
(modify-phases
%standard-phases
(add-before 'configure 'patch-/bin/sh
(lambda _
(substitute* "auto/feature"
@ -110,13 +110,9 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(method git-fetch)
(uri (git-reference
(url "https://github.com/kvspb/nginx-auth-ldap")
(commit version)
)
)
(commit version)))
(file-name (git-file-name "nginx-ldap-auth-module" version))
(sha256 (base32 "023zmdir7w92dnb508ggskkc7kmd7k71hc597sb7i4xfgpwxzq1s"))
)
)
(sha256 (base32 "023zmdir7w92dnb508ggskkc7kmd7k71hc597sb7i4xfgpwxzq1s"))))
(synopsis "LDAP Authentication module for nginx")
(description "LDAP module for nginx which supports authentication against multiple LDAP servers.")
(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
(substitute-keyword-arguments
`(#:configure-flags '("--add-dynamic-module=.")
#:make-flags '("modules")
,@(package-arguments nginx)
)
#:make-flags '("modules") ,@(package-arguments nginx))
((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'unpack-nginx-sources
(lambda* (#:key inputs native-inputs #:allow-other-keys)
(begin
;; The nginx source code is part of the modules source.
(format #t "decompressing nginx source code~%")
(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")
)
#t
)
)
)
(invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1"))
#t )))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules")))
(install-file "objs/ngx_http_auth_ldap_module.so" modules-dir)
#t
)
)
)
#t )))
(delete 'fix-root-dirs)
(delete 'install-man-page)
)
)
)
)
)
)
(delete 'install-man-page)))))))
(define-public modsecurity
(package
@ -171,9 +151,7 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(uri (list
(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")
(description "modsecurity module for nginx.")
(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)
("nginx-sources", (package-source nginx))
))
(arguments `(
#:configure-flags (list
(arguments
`( #:configure-flags (list
(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-libxml=" (assoc-ref %build-inputs "libxml2"))
"--enable-standalone-module"
)
))
)
)
"--enable-standalone-module" )))))
(define-public nginx-modsecurity-module
(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")))
(invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1")
)
#t
)
)
)
#t )))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules")))
(install-file "objs/ngx_http_modsecurity_module.so" modules-dir)
#t
)
)
)
#t )))
(delete 'fix-root-dirs)
(delete 'install-man-page)
)
)
)
)
)
)
(delete 'install-man-page)))))))
(define-public nginx-geoip2-module
(package
@ -270,9 +232,7 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(uri (list
(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")
(description "GeoIP2 module for nginx.")
(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
(substitute-keyword-arguments
`(#:configure-flags '("--add-dynamic-module=.")
#:make-flags '("modules")
,@(package-arguments nginx)
)
#:make-flags '("modules") ,@(package-arguments nginx))
((#:phases phases)
`(modify-phases ,phases
(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")))
(invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1")
)
#t
)
)
)
#t )))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(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_stream_geoip2_module.so" modules-dir)
#t
)
)
)
#t )))
(delete 'fix-root-dirs)
(delete 'install-man-page)
)
)
)
)
)
)
(delete 'install-man-page)))))))
(define-public nginx-http_subs_filter-module
(package
@ -329,9 +275,7 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
(uri (list
(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")
(description "substitutions_filter module for nginx.")
(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
(substitute-keyword-arguments
`(#:configure-flags '("--add-dynamic-module=.")
#:make-flags '("modules")
,@(package-arguments nginx)
)
#:make-flags '("modules") ,@(package-arguments nginx))
((#:phases phases)
`(modify-phases ,phases
(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")))
(invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1")
)
#t
)
)
)
#t )))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules")))
(install-file "objs/ngx_http_subs_filter_module.so" modules-dir)
#t
)
)
)
#t )))
(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 download)
#:use-module (guix git-download)
#:use-module (gnu packages dns)
#:use-module ((gnu packages sssd) #:prefix gnu:)
)
(define-public sssd-upstream-orig
(define-public sssd
(package
(inherit gnu:sssd)
(name "sssd-upstream")
(version "1_16_5")
(name "sssd")
(version "2.8.1")
(source
(origin
(inherit (package-source gnu:sssd))
(method git-fetch)
(uri (git-reference
(url "https://github.com/SSSD/sssd")
(commit (string-append "sssd-" version))
))
(file-name (git-file-name name version))
(sha256 (base32 "0zbs04lkjbp7y92anmafl7gzamcnq1f147p13hc4byyvjk9rg6f7"))
)
)
)
)
(method url-fetch)
(uri (string-append "https://github.com/SSSD/sssd/releases/download/2.8.1/sssd-" version ".tar.gz"))
(sha256 (base32 "121i1xh89r3bv59rndnrdlra3fvzam88g15gq0acpj1n6ib3ay0s"))))
(inputs `( bind
,@(package-inputs gnu:sssd)
))))
sssd

View file

@ -23,8 +23,7 @@
(squid-loglevel squid-loglevel (default 1))
(squid-config-file squid-config-file (default (file-append squid "/etc/squid.conf")))
(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
(match-lambda