formating

This commit is contained in:
Jean-François GUILLAUME 2021-11-04 22:02:40 +01:00
parent b1568128a0
commit fb1a259b1e
3 changed files with 88 additions and 74 deletions

View file

@ -26,9 +26,9 @@
(origin (origin
(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" ))
@ -86,9 +86,8 @@
(origin (origin
(method url-fetch) (method url-fetch)
(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 "1sarp7bjvkkdlpky5j9axfi0qmb177vw2vn2s10c8fcdg9dgj6vm" )) (sha256 (base32 "1sarp7bjvkkdlpky5j9axfi0qmb177vw2vn2s10c8fcdg9dgj6vm" ))
) )
) )
@ -128,9 +127,8 @@
(origin (origin
(method url-fetch) (method url-fetch)
(uri (list (uri (list
(string-append "https://github.com/SpiderLabs/ModSecurity-nginx/releases/download/v" version "/modsecurity-nginx-v" version ".tar.gz") (string-append "https://github.com/SpiderLabs/ModSecurity-nginx/releases/download/v" version "/modsecurity-nginx-v" version ".tar.gz")
) ))
)
(sha256 (base32 "0clcny8276d3j73ws661lh983vqq9m29rw7qb7gn132ha066d9j1" )) (sha256 (base32 "0clcny8276d3j73ws661lh983vqq9m29rw7qb7gn132ha066d9j1" ))
) )
) )
@ -177,4 +175,3 @@
) )
) )
) )
nginx-modsecurity-module

View file

@ -35,24 +35,41 @@
) )
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs `( (inputs `(
("libltdl", libltdl) ("libltdl", libltdl)
("pkg-config", pkg-config) ("pkg-config", pkg-config)
("libevent", libevent) ("libevent", libevent)
("openssl", openssl) ("openssl", openssl)
("argon2", argon2) ("argon2", argon2)
("wiredtiger", wiredtiger) ("wiredtiger", wiredtiger)
("snappy", snappy) ("snappy", snappy)
("lz4", lz4) ("lz4", lz4)
,@(package-inputs gnu:openldap) ,@(package-inputs gnu:openldap)
)) ))
(arguments '( (arguments '(
; this is needed because the make check does not work inside guix ; this is needed because the make check does not work inside guix
#:tests? #f #:tests? #f
#:configure-flags '( #:configure-flags '(
"--enable-debug" "--enable-dynamic" "--enable-syslog" "--enable-ipv6" "--enable-local" "--enable-slapd" "--enable-dynacl" "--enable-debug"
"--enable-aci" "--enable-cleartext" "--enable-crypt" "--enable-spasswd" "--enable-modules" "--enable-rlookups" "--enable-slapi" "--enable-dynamic"
"--enable-backends=mod" "--enable-overlays=mod" "--enable-argon2" "--enable-balancer" "--disable-static" "--enable-syslog"
"--enable-shared" "--with-tls=openssl" "--enable-ipv6"
"--enable-local"
"--enable-slapd"
"--enable-dynacl"
"--enable-aci"
"--enable-cleartext"
"--enable-crypt"
"--enable-spasswd"
"--enable-modules"
"--enable-rlookups"
"--enable-slapi"
"--enable-backends=mod"
"--enable-overlays=mod"
"--enable-argon2"
"--enable-balancer"
"--disable-static"
"--enable-shared"
"--with-tls=openssl"
) )
#:make-flags '("STRIP=") #:make-flags '("STRIP=")
#:phases (modify-phases %standard-phases #:phases (modify-phases %standard-phases

View file

@ -13,68 +13,68 @@
) )
(define-record-type* <openldap-configuration> (define-record-type* <openldap-configuration>
openldap-configuration make-openldap-configuration openldap-configuration make-openldap-configuration
openldap-configuration? openldap-configuration?
(openldap openldap-configuration-openldap ;<package> (openldap openldap-configuration-openldap ;<package>
(default openldap-glicid) (default openldap-glicid)
) )
(arguments openldap-configuration-arguments ;list of strings (arguments openldap-configuration-arguments ;list of strings
(default '()) (default '())
) )
(logflags openldap-configuration-logflags ;number (logflags openldap-configuration-logflags ;number
(default "0") (default "0")
) )
(log-file openldap-configuration-log-file ; string (log-file openldap-configuration-log-file ; string
(default "/var/log/slapd.log") (default "/var/log/slapd.log")
) )
(pid-file openldap-configuration-pid-file ; string (pid-file openldap-configuration-pid-file ; string
(default "/var/run/openldap/slapd.pid") (default "/var/run/openldap/slapd.pid")
) )
(config-file openldap-configuration-config-file ; string (config-file openldap-configuration-config-file ; string
(default %default-slapd.conf) (default %default-slapd.conf)
) )
(schema-dir openldap-configuration-schema-dir ; string (schema-dir openldap-configuration-schema-dir ; string
(default '()) (default '())
) )
) )
(define %default-slapd.conf (define %default-slapd.conf
(plain-file "slapd.conf" " (plain-file "slapd.conf" "
# Empty file for test # Empty file for test
")) "))
(define schema_dir (local-file "ldap_schema" #:recursive? #t)) (define schema_dir (local-file "ldap_schema" #:recursive? #t))
(define openldap-shepherd-service (define openldap-shepherd-service
(match-lambda (match-lambda
(($ <openldap-configuration> openldap arguments logflags log-file pid-file config-file schema-dir) (($ <openldap-configuration> openldap arguments logflags log-file pid-file config-file schema-dir)
(list
(shepherd-service
(provision '(slapd) )
(documentation "Run openldap.")
(requirement '(user-processes))
(respawn? #f)
(start #~(make-forkexec-constructor
(list (list
(shepherd-service #$(file-append openldap-glicid "/libexec/slapd")
(provision '(slapd) ) "-h 'ldap:/// ldaps:///'"
(documentation "Run openldap.") "-d" #$logflags
(requirement '(user-processes)) "-f" #$config-file
(respawn? #f)
(start #~(make-forkexec-constructor
(list
#$(file-append openldap-glicid "/libexec/slapd")
"-h 'ldap:/// ldaps:///'"
"-d" #$logflags
"-f" #$config-file
)
#:pid-file #$pid-file
))
(stop #~(make-kill-destructor))
)
) )
#:pid-file #$pid-file
))
(stop #~(make-kill-destructor))
) )
)
) )
)
) )
(define openldap-service-type (define openldap-service-type
(service-type (name 'slapd) (service-type (name 'slapd)
(extensions (extensions
(list ( (list (
service-extension service-extension
shepherd-root-service-type shepherd-root-service-type
openldap-shepherd-service openldap-shepherd-service
)) ))
)
(description "Run @uref{https://www.openldap.org, Openldap} community developped LDAP software.")
) )
(description "Run @uref{https://www.openldap.org, Openldap} community developped LDAP software.")
)
) )