diff --git a/glicid/packages/nginx.scm b/glicid/packages/nginx.scm index c180f47..7b8e5a9 100644 --- a/glicid/packages/nginx.scm +++ b/glicid/packages/nginx.scm @@ -1,376 +1,306 @@ (define-module (glicid packages nginx) - #:use-module (ice-9 match) - #:use-module (guix) - #:use-module (guix build-system gnu) - #:use-module (guix download) - #:use-module (guix git-download) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix utils) - #:use-module (gnu packages compression) - #:use-module (gnu packages curl) - #:use-module (gnu packages geo) - #:use-module (gnu packages pcre) - #:use-module (gnu packages perl) - #:use-module (gnu packages pkg-config) - #:use-module (gnu packages web) - #:use-module (gnu packages xml) - #:use-module (gnu packages tls) - #:use-module (glicid packages openldap) -) + #:use-module (ice-9 match) + #:use-module (guix) + #:use-module (guix build-system gnu) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix utils) + #:use-module (gnu packages compression) + #:use-module (gnu packages curl) + #:use-module (gnu packages geo) + #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages web) + #:use-module (gnu packages xml) + #:use-module (gnu packages tls) + #:use-module (glicid packages openldap)) (define-public nginx - (package - (name "nginx") - (version "1.23.2") - (source (origin - (method url-fetch) - (uri (string-append "https://nginx.org/download/nginx-" version ".tar.gz")) - (sha256 (base32 "0ihbkfcqlqadzkdk813raq15qqrahss1gdd81bkswanpsdrc4358")))) - (build-system gnu-build-system) - (inputs (list libxml2 libxslt openssl pcre zlib)) - (arguments - `(#:tests? #f - #:phases - (modify-phases %standard-phases - (add-before 'configure 'patch-/bin/sh - (lambda _ - (substitute* "auto/feature" - (("/bin/sh") (which "sh"))) - #t)) - (replace 'configure - ;; The configure script is hand-written, not from GNU autotools. - (lambda* (#:key configure-flags inputs outputs #:allow-other-keys) - (let ((flags - (append (list (string-append "--prefix=" (assoc-ref outputs "out")) - "--with-http_ssl_module" - "--with-http_v2_module" - "--with-http_xslt_module" - "--with-http_gzip_static_module" - "--with-http_gunzip_module" - "--with-http_addition_module" - "--with-http_sub_module" - "--with-pcre-jit" - "--with-debug" - "--with-stream" - ;; Even when not cross-building, we pass the - ;; --crossbuild option to avoid customizing for the - ;; kernel version on the build machine. - ,(let ((system "Linux") ; uname -s - (release "3.2.0") ; uname -r - ;; uname -m - (machine (match (or (%current-target-system) - (%current-system)) - ("x86_64-linux" "x86_64") - ("i686-linux" "i686") - ("mips64el-linux" "mips64") - (_ "UNSUPPORTED")))) - (string-append "--crossbuild=" system ":" release ":" machine) - )) - configure-flags))) - (setenv "CC" ,(cc-for-target)) - (setenv "CFLAGS" ; CPPFLAGS is not respected - (string-append "-I" (assoc-ref inputs "libxml2") - "/include/libxml2")) - (format #t "configure flags: ~s~%" flags) - (apply invoke "./configure" flags) - #t))) - (add-after 'install 'install-man-page - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (man (string-append out "/share/man"))) - (install-file "objs/nginx.8" (string-append man "/man8")) - #t))) - (add-after 'install 'fix-root-dirs - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (share (string-append out "/share/nginx"))) - (rmdir (string-append out "/logs")) - (mkdir-p share) - (rename-file (string-append out "/conf") - (string-append share "/conf")) - (rename-file (string-append out "/html") - (string-append share "/html")) - #t)))))) - (home-page "https://nginx.org") - (synopsis "HTTP and reverse proxy server") - (description - "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 -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)))) + (package + (name "nginx") + (version "1.23.2") + (source (origin + (method url-fetch) + (uri (string-append "https://nginx.org/download/nginx-" version ".tar.gz")) + (sha256 (base32 "0ihbkfcqlqadzkdk813raq15qqrahss1gdd81bkswanpsdrc4358")))) + (build-system gnu-build-system) + (inputs (list libxml2 libxslt openssl pcre zlib)) + (arguments + `(#:tests? #f + #:phases + (modify-phases + %standard-phases + (add-before 'configure 'patch-/bin/sh + (lambda _ + (substitute* "auto/feature" + (("/bin/sh") (which "sh"))) + #t)) + (replace 'configure + ;; The configure script is hand-written, not from GNU autotools. + (lambda* (#:key configure-flags inputs outputs #:allow-other-keys) + (let ((flags + (append (list (string-append "--prefix=" (assoc-ref outputs "out")) + "--with-http_ssl_module" + "--with-http_v2_module" + "--with-http_xslt_module" + "--with-http_gzip_static_module" + "--with-http_gunzip_module" + "--with-http_addition_module" + "--with-http_sub_module" + "--with-pcre-jit" + "--with-debug" + "--with-stream" + ;; Even when not cross-building, we pass the + ;; --crossbuild option to avoid customizing for the + ;; kernel version on the build machine. + ,(let ((system "Linux") ; uname -s + (release "3.2.0") ; uname -r + ;; uname -m + (machine (match (or (%current-target-system) + (%current-system)) + ("x86_64-linux" "x86_64") + ("i686-linux" "i686") + ("mips64el-linux" "mips64") + (_ "UNSUPPORTED")))) + (string-append "--crossbuild=" system ":" release ":" machine) + )) + configure-flags))) + (setenv "CC" ,(cc-for-target)) + (setenv "CFLAGS" ; CPPFLAGS is not respected + (string-append "-I" (assoc-ref inputs "libxml2") + "/include/libxml2")) + (format #t "configure flags: ~s~%" flags) + (apply invoke "./configure" flags) + #t))) + (add-after 'install 'install-man-page + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (man (string-append out "/share/man"))) + (install-file "objs/nginx.8" (string-append man "/man8")) + #t))) + (add-after 'install 'fix-root-dirs + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share/nginx"))) + (rmdir (string-append out "/logs")) + (mkdir-p share) + (rename-file (string-append out "/conf") + (string-append share "/conf")) + (rename-file (string-append out "/html") + (string-append share "/html")) + #t)))))) + (home-page "https://nginx.org") + (synopsis "HTTP and reverse proxy server") + (description + "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 + 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)))) (define-public nginx-ldap-auth-module - (package - (inherit nginx) - (name "nginx-ldap-auth-module") - (version "83c059b73566c2ee9cbda920d91b66657cf120b7") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/kvspb/nginx-auth-ldap") - (commit version) - ) - ) - (file-name (git-file-name "nginx-ldap-auth-module" version)) - (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) - (inputs - `(("nginx-sources" ,(package-source nginx)) - ("openldap", openldap) - ,@(package-inputs nginx))) - (arguments - (substitute-keyword-arguments - `(#:configure-flags '("--add-dynamic-module=.") - #: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 module’s 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 - ) - ) - ) - (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 - ) - ) - ) - (delete 'fix-root-dirs) - (delete 'install-man-page) - ) - ) - ) - ) - ) -) + (package + (inherit nginx) + (name "nginx-ldap-auth-module") + (version "83c059b73566c2ee9cbda920d91b66657cf120b7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/kvspb/nginx-auth-ldap") + (commit version))) + (file-name (git-file-name "nginx-ldap-auth-module" version)) + (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) + (inputs + `(("nginx-sources" ,(package-source nginx)) + ("openldap", openldap) + ,@(package-inputs nginx))) + (arguments + (substitute-keyword-arguments + `(#:configure-flags '("--add-dynamic-module=.") + #: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 + (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 ))) + (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 ))) + (delete 'fix-root-dirs) + (delete 'install-man-page))))))) (define-public modsecurity - (package - (name "modsecurity") - (version "3.0.8") - (source - (origin - (method url-fetch) - (uri (list - (string-append "https://github.com/SpiderLabs/ModSecurity/releases/download/v" version "/modsecurity-v" version ".tar.gz") - )) - (sha256 (base32 "1isng4z2xijqq92105si1zxkzlx4ifdnn38d7n38mrfp7jdwhhg2")) - ) - ) - (synopsis "modsecurity module for nginx") - (description "modsecurity module for nginx.") - (license license:asl2.0) - (home-page "https://github.com/SpiderLabs/ModSecurity") - (build-system gnu-build-system) - (inputs `( - ("curl", curl) - ("libxml2", libxml2) - ("libxslt", libxslt) - ("openssl", openssl) - ("pcre", pcre) - ("pcre:bin", pcre "bin") - ("zlib", zlib) - ("pkg-config", pkg-config) - ("nginx-sources", (package-source nginx)) - )) - (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" - ) - )) - ) -) + (package + (name "modsecurity") + (version "3.0.8") + (source + (origin + (method url-fetch) + (uri (list + (string-append "https://github.com/SpiderLabs/ModSecurity/releases/download/v" version "/modsecurity-v" version ".tar.gz") + )) + (sha256 (base32 "1isng4z2xijqq92105si1zxkzlx4ifdnn38d7n38mrfp7jdwhhg2")))) + (synopsis "modsecurity module for nginx") + (description "modsecurity module for nginx.") + (license license:asl2.0) + (home-page "https://github.com/SpiderLabs/ModSecurity") + (build-system gnu-build-system) + (inputs `( + ("curl", curl) + ("libxml2", libxml2) + ("libxslt", libxslt) + ("openssl", openssl) + ("pcre", pcre) + ("pcre:bin", pcre "bin") + ("zlib", zlib) + ("pkg-config", pkg-config) + ("nginx-sources", (package-source nginx)) + )) + (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" ))))) (define-public nginx-modsecurity-module - (package - (inherit nginx) - (name "nginx-modsecurity-module") - (version "1.0.3") - (source - (origin - (method url-fetch) - (uri (list - (string-append "https://github.com/SpiderLabs/ModSecurity-nginx/releases/download/v" version "/modsecurity-nginx-v" version ".tar.gz") - )) - (sha256 (base32 "1pcayz0kkpr0fvs8fwai0xv7jw9r7ph66vwxm6vrq0mc11r1r0df")) - ) - ) - (synopsis "ModSecurity module for nginx") - (description "ModSecurity module for nginx.") - (build-system gnu-build-system) - (inputs - `(("nginx-sources" ,(package-source nginx)) - ("modsecurity", modsecurity) - ,@(package-inputs nginx))) - (arguments - (substitute-keyword-arguments - `(#:configure-flags '("--add-dynamic-module=.") - #: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 module’s 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 - ) - ) - ) - (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 - ) - ) - ) - (delete 'fix-root-dirs) - (delete 'install-man-page) - ) - ) - ) - ) - ) -) + (package + (inherit nginx) + (name "nginx-modsecurity-module") + (version "1.0.3") + (source + (origin + (method url-fetch) + (uri (list + (string-append "https://github.com/SpiderLabs/ModSecurity-nginx/releases/download/v" version "/modsecurity-nginx-v" version ".tar.gz") + )) + (sha256 (base32 "1pcayz0kkpr0fvs8fwai0xv7jw9r7ph66vwxm6vrq0mc11r1r0df")) + ) + ) + (synopsis "ModSecurity module for nginx") + (description "ModSecurity module for nginx.") + (build-system gnu-build-system) + (inputs + `(("nginx-sources" ,(package-source nginx)) + ("modsecurity", modsecurity) + ,@(package-inputs nginx))) + (arguments + (substitute-keyword-arguments + `(#:configure-flags '("--add-dynamic-module=.") + #: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 module’s 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 ))) + (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 ))) + (delete 'fix-root-dirs) + (delete 'install-man-page))))))) (define-public nginx-geoip2-module - (package - (inherit nginx) - (name "nginx-geoip2-module") - (version "3.4") - (source - (origin - (method url-fetch) - (uri (list - (string-append "https://github.com/leev/ngx_http_geoip2_module/archive/refs/tags/" version ".tar.gz") - )) - (sha256 (base32 "0lllgnasd97r6xkj70q42rp61cxrz8qlb64l14rmlwcd6hizqwmd")) - ) - ) - (synopsis "GeoIP2 module for nginx") - (description "GeoIP2 module for nginx.") - (build-system gnu-build-system) - (inputs - `(("nginx-sources" ,(package-source nginx)) - ("libmaxminddb", libmaxminddb) - ,@(package-inputs nginx))) - (arguments - (substitute-keyword-arguments - `(#:configure-flags '("--add-dynamic-module=.") - #: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 module’s 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 - ) - ) - ) - (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 - ) - ) - ) - (delete 'fix-root-dirs) - (delete 'install-man-page) - ) - ) - ) - ) - ) -) + (package + (inherit nginx) + (name "nginx-geoip2-module") + (version "3.4") + (source + (origin + (method url-fetch) + (uri (list + (string-append "https://github.com/leev/ngx_http_geoip2_module/archive/refs/tags/" version ".tar.gz") + )) + (sha256 (base32 "0lllgnasd97r6xkj70q42rp61cxrz8qlb64l14rmlwcd6hizqwmd")))) + (synopsis "GeoIP2 module for nginx") + (description "GeoIP2 module for nginx.") + (build-system gnu-build-system) + (inputs + `(("nginx-sources" ,(package-source nginx)) + ("libmaxminddb", libmaxminddb) + ,@(package-inputs nginx))) + (arguments + (substitute-keyword-arguments + `(#:configure-flags '("--add-dynamic-module=.") + #: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 module’s 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 ))) + (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 ))) + (delete 'fix-root-dirs) + (delete 'install-man-page))))))) (define-public nginx-http_subs_filter-module - (package - (inherit nginx) - (name "nginx-http_subs_filter-module") - (version "e12e965") - (source - (origin - (method url-fetch) - (uri (list - (string-append "https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/" version ".tar.gz") - )) - (sha256 (base32 "1cxb3yv6085rj50s001p2vblvz5px2v92whwjhb14kl8fnm2cans")) - ) - ) - (synopsis "substitutions_filter module for nginx") - (description "substitutions_filter module for nginx.") - (build-system gnu-build-system) - (inputs - `(("nginx-sources" ,(package-source nginx)) - ,@(package-inputs nginx))) - (arguments - (substitute-keyword-arguments - `(#:configure-flags '("--add-dynamic-module=.") - #: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 module’s 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 - ) - ) - ) - (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 - ) - ) - ) - (delete 'fix-root-dirs) - (delete 'install-man-page) - ) - ) - ) - ) - ) -) + (package + (inherit nginx) + (name "nginx-http_subs_filter-module") + (version "e12e965") + (source + (origin + (method url-fetch) + (uri (list + (string-append "https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/" version ".tar.gz") + )) + (sha256 (base32 "1cxb3yv6085rj50s001p2vblvz5px2v92whwjhb14kl8fnm2cans")))) + (synopsis "substitutions_filter module for nginx") + (description "substitutions_filter module for nginx.") + (build-system gnu-build-system) + (inputs + `(("nginx-sources" ,(package-source nginx)) + ,@(package-inputs nginx))) + (arguments + (substitute-keyword-arguments + `(#:configure-flags '("--add-dynamic-module=.") + #: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 module’s 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 ))) + (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 ))) + (delete 'fix-root-dirs) + (delete 'install-man-page))))))) diff --git a/glicid/packages/sssd.scm b/glicid/packages/sssd.scm deleted file mode 100644 index b9fee8b..0000000 --- a/glicid/packages/sssd.scm +++ /dev/null @@ -1,26 +0,0 @@ -(define-module (glicid packages sssd) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix git-download) - #:use-module ((gnu packages sssd) #:prefix gnu:) -) - -(define-public sssd-upstream-orig - (package - (inherit gnu:sssd) - (name "sssd-upstream") - (version "1_16_5") - (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")) - ) - ) - ) -) diff --git a/glicid/services/authentication.scm b/glicid/services/authentication.scm index c2888e1..993e703 100644 --- a/glicid/services/authentication.scm +++ b/glicid/services/authentication.scm @@ -17,15 +17,15 @@ (define-record-type* sssd-configuration make-sssd-configuration sssd-configuration? - (sssd-pkg sssd-pkg (default sssd)) - (sssd-config-file sssd-config-file (default "/etc/sssd/sssd.conf")) - (sssd-logger sssd-logger (default "stderr")) - (sssd-debug-level sssd-debug-level (default "3")) + (pkg pkg (default sssd)) + (config-file config-file (default "/etc/sssd/sssd.conf")) + (logger logger (default "stderr")) + (debug-level debug-level (default "3")) (log-file log-file (default "/var/log/sssd/sssd.log"))) (define sssd-service (match-lambda - (($ sssd-pkg sssd-config-file sssd-logger sssd-debug-level log-file) + (($ pkg config-file logger debug-level log-file) (list (shepherd-service (provision '(sssd)) @@ -34,11 +34,11 @@ (respawn? #t) (start #~(make-forkexec-constructor (list - #$(file-append sssd-pkg "/sbin/sssd") + #$(file-append pkg "/sbin/sssd") "-i" - "-c" #$sssd-config-file - "--logger" #$sssd-logger - "-d" #$sssd-debug-level + "-c" #$config-file + "--logger" #$logger + "-d" #$debug-level ) #:log-file #$log-file )) @@ -51,7 +51,7 @@ (mkdir-p "/var/lib/sss/db") (mkdir-p "/var/lib/sss/mc") (mkdir-p "/var/lib/sss/pipes/private") - (install-file #$(file-append sssd-pkg "/lib/sssd/conf/sssd.conf") "/etc/sssd/") + (install-file #$(file-append pkg "/lib/sssd/conf/sssd.conf") "/etc/sssd/") #t )) (define sssd-service-type diff --git a/glicid/services/networking.scm b/glicid/services/networking.scm index a97b6fd..a548206 100644 --- a/glicid/services/networking.scm +++ b/glicid/services/networking.scm @@ -18,17 +18,16 @@ squid-configuration make-squid-configuration squid-configuration? - (squid-pkg squid-pkg (default squid)) - (squid-port squid-port (default 3128)) - (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")) - ) + (pkg pkg (default squid)) + (port port (default 3128)) + (loglevel loglevel (default 1)) + (config-file config-file (default (file-append squid "/etc/squid.conf"))) + (pid-file pid-file (default "/var/run/squid/squid.pid")) + (log-file log-file (default "/var/log/squid/squid.log"))) (define squid-shepherd-service (match-lambda - (($ squid-pkg squid-port squid-loglevel squid-config-file pid-file log-file) + (($ pkg port loglevel config-file pid-file log-file) (list (shepherd-service (provision '(squid)) @@ -37,8 +36,8 @@ (respawn? #t) (start #~(make-forkexec-constructor (list - #$(file-append squid-pkg "/sbin/squid") - "-f" #$squid-config-file + #$(file-append pkg "/sbin/squid") + "-f" #$config-file ) #:pid-file #$pid-file #:log-file #$log-file diff --git a/glicid/services/openldap.scm b/glicid/services/openldap.scm index e6d526f..60abdf6 100644 --- a/glicid/services/openldap.scm +++ b/glicid/services/openldap.scm @@ -17,15 +17,15 @@ openldap-configuration make-openldap-configuration openldap-configuration? (openldap-pkg openldap-pkg (default openldap)) - (uri openldap-uri (default "ldapi:// ldap://")) - (logflags openldap-logflags (default "0")) - (pid-file openldap-pid-file (default "/var/run/openldap/slapd.pid")) - (config-file openldap--config-file (default (file-append openldap "/etc/openldap/slapd.conf"))) - (log-file openldap-log-file (default "/var/log/slapd.log"))) + (uri uri (default "ldapi:// ldap://")) + (logflags logflags (default "0")) + (pid-file pid-file (default "/var/run/openldap/slapd.pid")) + (config-file config-file (default (file-append openldap "/etc/openldap/slapd.conf"))) + (log-file log-file (default "/var/log/slapd.log"))) (define openldap-shepherd-service (match-lambda - (($ openldap-pkg uri logflags pid-file config-file log-file) + (($ pkg uri logflags pid-file config-file log-file) (list (shepherd-service (provision '(slapd)) @@ -34,7 +34,7 @@ (respawn? #t) (start #~(make-forkexec-constructor (list - #$(file-append openldap "/libexec/slapd") + #$(file-append pkg "/libexec/slapd") "-h" #$uri "-d" #$logflags "-f" #$config-file diff --git a/glicid/services/parallel.scm b/glicid/services/parallel.scm index 35936f8..a48ad27 100644 --- a/glicid/services/parallel.scm +++ b/glicid/services/parallel.scm @@ -29,8 +29,7 @@ slurmd-service-type %slurm-group %slurm-account - %slurm-accounts - )) + %slurm-accounts )) ; ; Munged ; @@ -58,23 +57,21 @@ "-f" ; until we fix the permissions "--key-file" #$key-file ) - #:log-file #$log-file - )) + #:log-file #$log-file )) (stop #~(make-kill-destructor))))))) (define %munged-activation #~(begin (mkdir-p "/var/run/munge") (mkdir-p "/var/lib/munge") - #t - )) + #t )) (define munged-service-type (service-type (name 'munged) (extensions (list (service-extension shepherd-root-service-type munged-service) - (service-extension activation-service-type (const %munged-activation)) ) ) + (service-extension activation-service-type (const %munged-activation)))) (description "Run munged"))) ; @@ -90,8 +87,7 @@ (home-directory "/var/spool/slurm") (shell (file-append bash "/bin/bash")))) -(define %slurm-accounts - (list %slurm-group %slurm-account)) +(define %slurm-accounts (list %slurm-group %slurm-account)) ; ; slurmdbd @@ -100,9 +96,9 @@ slurmdbd-configuration make-slurmdbd-configuration slurmdbd-configuration? - (slurm slurm-configuration-slurm (default slurm)) - (slurmdbd-conf slurmdbd-slurmdbd-conf (default (file-append slurm "/etc/slurm/slurmdbd.conf"))) - (log-file slurmdbd-log-file (default "/var/log/slurm/slurmdbd.log"))) + (slurm slurm (default slurm)) + (slurmdbd-conf slurmdbd-conf (default (file-append slurm "/etc/slurm/slurmdbd.conf"))) + (log-file log-file (default "/var/log/slurm/slurmdbd.log"))) (define slurmdbd-service (match-lambda @@ -116,12 +112,10 @@ (start #~(make-forkexec-constructor (list #$(file-append slurm "/sbin/slurmdbd") - "-D" - ) + "-D" ) #:log-file #$log-file #:user (passwd:uid (getpwnam "slurm")) - #:group (passwd:gid (getpwnam "slurm")) - )) + #:group (passwd:gid (getpwnam "slurm")))) (stop #~(make-kill-destructor))))))) (define %slurmdbd-activation @@ -144,8 +138,7 @@ (chown slurm-file (passwd:uid (getpwnam "slurm")) (passwd:gid (getpwnam "slurm"))) (chmod slurm-file #o600) )(find-files "/etc/slurm/")) - #t - )) + #t )) (define slurmdbd-service-type (service-type @@ -153,7 +146,7 @@ (extensions (list (service-extension shepherd-root-service-type slurmdbd-service) (service-extension activation-service-type (const %slurmdbd-activation)) - (service-extension account-service-type (const %slurm-accounts)) ) ) + (service-extension account-service-type (const %slurm-accounts)))) (description "Run slurmdbd"))) ; @@ -163,9 +156,9 @@ slurmctld-configuration make-slurmctld-configuration slurmctld-configuration? - (slurm slurm-configuration-slurm (default slurm)) - (slurmctld-conf slurmctld-slurmctld-conf (default (file-append slurm "/etc/slurm/slurmctld.conf"))) - (log-file slurmctld-log-file (default "/var/log/slurm/slurmctld.log"))) + (slurm slurm (default slurm)) + (slurmctld-conf slurmctld-conf (default (file-append slurm "/etc/slurm/slurmctld.conf"))) + (log-file log-file (default "/var/log/slurm/slurmctld.log"))) (define slurmctld-service (match-lambda @@ -180,12 +173,10 @@ (list #$(file-append slurm "/sbin/slurmctld") "-D" "-R" - "-f" #$slurmctld-conf - ) + "-f" #$slurmctld-conf ) #:log-file #$log-file #:user (passwd:uid (getpwnam "slurm")) - #:group (passwd:gid (getpwnam "slurm")) - )) + #:group (passwd:gid (getpwnam "slurm")))) (stop #~(make-kill-destructor))))))) (define %slurmctld-activation @@ -216,7 +207,7 @@ (extensions (list (service-extension shepherd-root-service-type slurmctld-service) (service-extension activation-service-type (const %slurmctld-activation)) - (service-extension account-service-type (const %slurm-accounts)) ) ) + (service-extension account-service-type (const %slurm-accounts)))) (description "Run slurmctld"))) ; @@ -226,12 +217,11 @@ slurmd-configuration make-slurmd-configuration slurmd-configuration? - (slurm slurm-configuration-slurm (default slurm)) - (slurmd-conf slurmd-slurmd-conf (default (file-append slurm "/etc/slurm/slurm.conf"))) - (log-file slurmd-log-file (default "/var/log/slurm/slurmd.log")) - (slurmctld-host slurmd-slurmctld-host (default #f)); string slurmctld-host[:port] - (log-level slurmd-log-level (default #f)); string Verbose mode. Multiple -v's increase verbosity - ) + (slurm slurm (default slurm)) + (slurmd-conf slurmd-conf (default (file-append slurm "/etc/slurm/slurm.conf"))) + (log-file log-file (default "/var/log/slurm/slurmd.log")) + (slurmctld-host slurmctld-host (default #f)) + (log-level log-level (default #f))) (define slurmd-service (match-lambda @@ -248,16 +238,11 @@ "-D" #$@(if slurmctld-host (list (string-append "--conf-server" slurmctld-host)) - (list (string-append "-f" slurmd-conf)) - ) + (list (string-append "-f" slurmd-conf))) #$@(if log-level (list log-level) - '() - ) - - ) - #:log-file #$log-file - )) + '())) + #:log-file #$log-file )) (stop #~(make-kill-destructor))))))) (define %slurmd-activation @@ -277,5 +262,5 @@ (extensions (list (service-extension shepherd-root-service-type slurmd-service) (service-extension activation-service-type (const %slurmd-activation)) - (service-extension account-service-type (const %slurm-accounts)) ) ) + (service-extension account-service-type (const %slurm-accounts)))) (description "Run slurmd")))