Merge branch 'main' into 'devel'

# Conflicts:
#   glicid/packages/science.scm
This commit is contained in:
Yann Dupont 2023-03-28 13:30:30 +00:00
commit bfcc1246da
15 changed files with 1004 additions and 152 deletions

View file

@ -19,14 +19,14 @@
(define-public podman
(package
(name "podman")
(version "4.4.1")
(version "4.4.2")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/containers/podman")
(commit (string-append "v" version))))
(sha256 (base32 "0qbr6rbyig3c2hvdvmd94jjkg820hpdz6j7dgyv62dl6wfwvj5jj"))
(sha256 (base32 "152qybqh5wj5waqz0jfnsq0zpvsgn2938pkih9abm6y6qcbcyznz"))
(modules '((guix build utils)))
(snippet '(begin
(substitute* "Makefile" ((".*hack/btrfs.*") ""))

View file

@ -13,14 +13,14 @@
(define-public timescaledb
(package
(name "timescaledb")
(version "2.9.3")
(version "2.10.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/timescale/timescaledb")
(commit version)))
(file-name (git-file-name name version))
(sha256 (base32 "0ybrd1h8cjfhvvld6s1p82jwifmd8grl9abv3626dzx59nrgyjbr"))))
(sha256 (base32 "0xyvqi5r5v9h1gws0gs2z5i44854dnf15finv9pn5wjgpzhdxyfw"))))
(build-system cmake-build-system)
(arguments
(list #:imported-modules `((guix build union)

57
glicid/packages/dns.scm Normal file
View file

@ -0,0 +1,57 @@
(define-module (glicid packages dns)
#:use-module (guix build-system gnu)
#:use-module (guix download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (gnu packages linux)
#:use-module (gnu packages libevent)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages tls)
#:use-module (gnu packages xml)
#:use-module (glicid packages web))
(define-public isc-bind
(package
(name "bind")
(version "9.18.12")
(source (origin
(method url-fetch)
(uri (list (string-append "https://downloads.isc.org/isc/bind9/" version "/bind-" version ".tar.xz")))
(sha256 (base32 "1rr7418jdi0fqckx9br78i918v3zma8b31j30nnvpak3n2vnnxj7"))))
(build-system gnu-build-system)
(outputs `("out" "utils"))
(inputs
(list libcap libuv libxml2 openssl p11-kit python `(,nghttp2 "lib") python-ply))
(native-inputs
(list perl pkg-config))
(arguments
`(
#:configure-flags
(list "--with-sysroot=/")
#:phases
(modify-phases %standard-phases
(add-after 'strip 'move-to-utils
(lambda _
(for-each
(lambda (file)
(let ((target (string-append (assoc-ref %outputs "utils") file))
(src (string-append (assoc-ref %outputs "out") file)))
(mkdir-p (dirname target))
(link src target)
(delete-file src)))
'("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
"/share/man/man1/dig.1" "/share/man/man1/host.1" "/share/man/man1/nslookup.1"
"/share/man/man1/nsupdate.1"))
#t))
(replace 'check
(lambda _
(with-directory-excursion "fuzz" (invoke "make" "check"))
#t)))))
(synopsis "@acronym{DNS, Domain Name System} implementation")
(description "BIND implements the @acronym{DNS, Domain Name System} protocols for the Internet. check gnu/packages/dns for more")
(home-page "https://www.isc.org/bind/")
(license (list license:mpl2.0))))

View file

@ -0,0 +1,44 @@
(define-module (glicid packages gitlab)
#:use-module (guix)
#:use-module (ice-9 match)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module (guix build-system trivial)
#:use-module (gnu packages bash)
#:use-module (gnu packages version-control))
(define-public gitlab-runner
(package
(name "gitlab-runner")
(version "15.8.2")
(source (origin
(method url-fetch)
(uri (string-append "https://" name "-downloads.s3.amazonaws.com/v" version "/binaries/" name "-linux-amd64"))
(file-name (string-append name "-linux-amd64"))
(sha256 (base32 "1d0hvrzmrdar2dvzvz6dq3950dw185grjs0iv2y62jicb6jz56id"))))
(build-system trivial-build-system)
(arguments
'(#:modules ((guix build utils))
#:builder (begin
(use-modules (guix build utils))
(let* ((source (assoc-ref %build-inputs "source"))
(out (assoc-ref %outputs "out"))
(install-dir (string-append out "/bin"))
(executable (string-append install-dir "/gitlab-runner"))
(bash (string-append (assoc-ref %build-inputs "bash") "/bin/"))
(git-dir (string-append (assoc-ref %build-inputs "git") "/bin/")))
(setenv "PATH" (string-append (getenv "PATH") ":" bash))
(mkdir-p install-dir)
(copy-file source executable)
(chmod executable #o555)
(wrap-program executable `("PATH" ":" prefix (,git-dir)))))))
(inputs (list git bash))
(synopsis "Gitlab Runner")
(description
"The official GitLab Runner written in Go. It runs tests and sends the
results to GitLab. GitLab CI is the open-source continuous integration
service included with GitLab that coordinates the testing.")
(home-page "https://gitlab.com/gitlab-org/gitlab-runner")
(license license:expat)))

View file

@ -1,82 +1,53 @@
(define-module (glicid packages monitoring)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module ((gnu packages monitoring)
#:prefix gnu:)
#:use-module (gnu packages)
#:use-module ((gnu packages monitoring) #:prefix gnu:)
#:use-module (guix download))
(define-public zabbix-agentd
(package
(inherit gnu:zabbix-agentd)
(version "6.0.13")
(version "6.0.14")
(source
(origin
(method url-fetch)
(uri (string-append
"https://cdn.zabbix.com/zabbix/sources/stable/"
(version-major+minor version) "/zabbix-" version ".tar.gz"))
(sha256
(base32 "0d9aws19rvmsrhkvihnwmr4r1drhl20v9lppdw5wjacp7377xqdy"))
(uri (string-append "https://cdn.zabbix.com/zabbix/sources/stable/" (version-major+minor version) "/zabbix-" version ".tar.gz"))
(sha256 (base32 "0n6fqa9vbhh2syxii7ds2x6dnplrgrj98by1zl0ij1wfbnbxa6k3"))
(patches (search-patches "glicid/packages/patches/glicid-zabbix-timescaledb-2.10.patch"))
(modules '((guix build utils)))
(snippet
'(substitute* '("src/zabbix_proxy/proxy.c"
"src/zabbix_server/server.c")
;; 'fping' must be setuid, so look for it in the usual location.
(("/usr/sbin/fping6?")
"/run/setuid-programs/fping")))))
))
'(substitute* '("src/zabbix_proxy/proxy.c" "src/zabbix_server/server.c")
(("/usr/sbin/fping6?") "/run/setuid-programs/fping")))))))
(define-public zabbix-agent2
(package
(inherit gnu:zabbix-agent2)
(version "6.0.13")
(version "6.0.14")
(source
(origin
(method url-fetch)
(uri (string-append
"https://cdn.zabbix.com/zabbix/sources/stable/"
(version-major+minor version) "/zabbix-" version ".tar.gz"))
(sha256
(base32 "0d9aws19rvmsrhkvihnwmr4r1drhl20v9lppdw5wjacp7377xqdy"))
(uri (string-append "https://cdn.zabbix.com/zabbix/sources/stable/" (version-major+minor version) "/zabbix-" version ".tar.gz"))
(sha256 (base32 "0n6fqa9vbhh2syxii7ds2x6dnplrgrj98by1zl0ij1wfbnbxa6k3"))
(patches (search-patches "glicid/packages/patches/glicid-zabbix-timescaledb-2.10.patch"))
(modules '((guix build utils)))
(snippet
'(substitute* '("src/zabbix_proxy/proxy.c"
"src/zabbix_server/server.c")
;; 'fping' must be setuid, so look for it in the usual location.
(("/usr/sbin/fping6?")
"/run/setuid-programs/fping")))))
))
'(substitute* '("src/zabbix_proxy/proxy.c" "src/zabbix_server/server.c")
(("/usr/sbin/fping6?") "/run/setuid-programs/fping")))))))
(define-public zabbix-server
(package
(inherit gnu:zabbix-server)
(version "6.0.13")
(version "6.0.14")
(source
(origin
(method url-fetch)
(uri (string-append
"https://cdn.zabbix.com/zabbix/sources/stable/"
(version-major+minor version) "/zabbix-" version ".tar.gz"))
(sha256
(base32 "0d9aws19rvmsrhkvihnwmr4r1drhl20v9lppdw5wjacp7377xqdy"))
(uri (string-append "https://cdn.zabbix.com/zabbix/sources/stable/" (version-major+minor version) "/zabbix-" version ".tar.gz"))
(sha256 (base32 "0n6fqa9vbhh2syxii7ds2x6dnplrgrj98by1zl0ij1wfbnbxa6k3"))
(patches (search-patches "glicid/packages/patches/glicid-zabbix-timescaledb-2.10.patch"))
(modules '((guix build utils)))
(snippet
'(substitute* '("src/zabbix_proxy/proxy.c"
"src/zabbix_server/server.c")
;; 'fping' must be setuid, so look for it in the usual location.
(("/usr/sbin/fping6?")
"/run/setuid-programs/fping")))))
)
)
'(substitute* '("src/zabbix_proxy/proxy.c" "src/zabbix_server/server.c")
(("/usr/sbin/fping6?") "/run/setuid-programs/fping")))))))

View file

@ -7,7 +7,9 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
#:use-module (gnu packages curl)
#:use-module (gnu packages gd)
#:use-module (gnu packages geo)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
@ -26,7 +28,7 @@
(uri (string-append "https://nginx.org/download/nginx-" version ".tar.gz"))
(sha256 (base32 "0m5s8a04jlpv6qhk09sfqbj4rxj38g6923w12j5y3ymrvf3mgjvm"))))
(build-system gnu-build-system)
(inputs (list libxml2 libxslt openssl pcre zlib))
(inputs (list libxml2 libxslt openssl pcre zlib gd gperftools))
(arguments
`(#:tests? #f
#:phases (modify-phases %standard-phases
@ -36,16 +38,30 @@
(lambda* (#:key configure-flags inputs outputs #:allow-other-keys)
(let ((flags (append (list
(string-append "--prefix=" (assoc-ref outputs "out"))
"--with-threads"
"--with-file-aio"
"--with-http_ssl_module"
"--with-http_v2_module"
"--with-http_xslt_module"
"--with-http_gzip_static_module"
"--with-http_gunzip_module"
"--with-http_realip_module"
"--with-http_addition_module"
"--with-http_xslt_module"
"--with-http_image_filter_module"
"--with-http_sub_module"
"--with-pcre-jit"
"--with-debug"
"--with-http_dav_module"
"--with-http_flv_module"
"--with-http_mp4_module"
"--with-http_gunzip_module"
"--with-http_gzip_static_module"
"--with-http_auth_request_module"
"--with-http_random_index_module"
"--with-http_secure_link_module"
"--with-http_degradation_module"
"--with-http_slice_module"
"--with-http_stub_status_module"
"--with-mail"
"--with-stream"
"--with-google_perftools_module"
"--with-pcre-jit"
,(let ((system "Linux")
(release "3.2.0")
(machine (match (or (%current-target-system) (%current-system))
@ -252,3 +268,36 @@
(install-file "objs/ngx_http_subs_filter_module.so" modules-dir) #t)))
(delete 'fix-root-dirs)
(delete 'install-man-page)))))))
(define-public nginx-module-vts
(package
(inherit nginx)
(name "nginx-module-vts")
(version "v0.2.1")
(source (origin
(method url-fetch)
(uri (list (string-append "https://github.com/vozlt/nginx-module-vts/archive/" version ".tar.gz")))
(sha256 (base32 "1x046w94n026f2aa4zmaf6yw1k86w3p6wqbslnriipz47a6xfqqs"))))
(synopsis "Nginx virtual host traffic status module")
(description "Nginx virtual host traffic status module.")
(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
(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_vhost_traffic_status_module.so" modules-dir) #t)))
(delete 'fix-root-dirs)
(delete 'install-man-page)))))))

View file

@ -14,8 +14,7 @@
#:use-module (gnu packages kerberos)
#:use-module (gnu packages libevent)
#:use-module (gnu packages linux)
#:use-module ((gnu packages openldap)
#:prefix gnu:)
#:use-module ((gnu packages openldap) #:prefix gnu:)
#:use-module (gnu packages password-utils)
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
@ -25,78 +24,40 @@
(define-public openldap
(package
(name "openldap")
(version "2.6.3")
(version "2.6.4")
(source (origin
(method url-fetch)
(uri (list (string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz")))
(sha256 (base32 "0ihddk8c6hg9lkjv0wk0w13g8kb75r8dfsn1n6b77mzk3pbs38nj"))))
(sha256 (base32 "1489li52sjxm1f97v927jxaxzfk6v9sa32ixrw30qhvq07jh85ym"))))
(build-system gnu-build-system)
(inputs (list argon2
cyrus-sasl
libevent
libgcrypt
libltdl
lz4
openssl
perl
snappy
unixodbc
wiredtiger
zlib))
(inputs (list argon2 cyrus-sasl openssl libevent libgcrypt libltdl lz4 perl snappy unixodbc wiredtiger zlib))
(native-inputs (list bdb groff libtool pkg-config))
(arguments '(
(arguments `(
#:tests? #f
#:configure-flags '("--enable-debug" "--enable-dynamic"
"--enable-syslog"
"--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")
#:configure-flags '( "--enable-debug" "--enable-dynamic" "--enable-syslog" "--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"
,@(if (%current-target-system)
'("--with-yielding_select=yes" "ac_cv_func_memcmp_working=yes")
'()))
#:make-flags '("STRIP=")
#:phases (modify-phases %standard-phases
,@(if (%current-target-system)
'((add-before 'configure 'fix-cross-gcc
(lambda* (#:key target #:allow-other-keys)
(setenv "CC" (string-append target "-gcc"))
#t)))
'())
(add-before 'build 'make-depend
(lambda* (#:key input #:allow-other-keys)
(invoke "make" "depend"))))))
(invoke "make" "depend")))
)))
(synopsis "Implementation of the Lightweight Directory Access Protocol")
(description
"OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.")
(description "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.")
(license license:openldap2.8)
(home-page "https://www.openldap.org/")))
(define-public openldap-2.4.59
(package
(inherit openldap)
(name "openldap")
(version "2.4.59")
(source (origin
(method url-fetch)
(uri (list (string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz")))
(sha256 (base32 "0d1gw898gbkv46mw0gll3q0w2j2y9midlzh6f320d0nq8xkpvwwr"))))))
(define-public openldap-2.5.13
(package
(inherit openldap)
(name "openldap")
(version "2.5.13")
(source (origin
(method url-fetch)
(uri (list (string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz")))
(sha256 (base32 "13007pv1vpp31dvnf9xzzcknqv9p75rqq412nrbprf7p9q646g7f"))))))
(define-public nss-pam-ldapd
(package
(name "nss-pam-ldapd")
@ -121,8 +82,7 @@
(inputs (list linux-pam mit-krb5 openldap python))
(home-page "https://arthurdejong.org/nss-pam-ldapd")
(synopsis "NSS and PAM modules for LDAP")
(description
"nss-pam-ldapd provides a @dfn{Name Service Switch} (NSS)
(description "nss-pam-ldapd provides a @dfn{Name Service Switch} (NSS)
module that allows your LDAP server to provide user account, group, host name,
alias, netgroup, and basically any other information that you would normally
get from @file{/etc} flat files or NIS. It also provides a @dfn{Pluggable

View file

@ -0,0 +1,27 @@
From 2ba64970de034357f22dd5f0fca0e588f4060fcd Mon Sep 17 00:00:00 2001
From: JEAN-FRANCOIS GUILLAUME <mrbear@yam-it.net>
Date: Fri, 3 Mar 2023 08:20:47 +0100
Subject: [PATCH] bumping timescaledb supported version to 2.10
---
include/zbxdb.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/zbxdb.h b/include/zbxdb.h
index 111d89a..4716f75 100644
--- a/include/zbxdb.h
+++ b/include/zbxdb.h
@@ -197,8 +197,8 @@ int zbx_db_strlen_n(const char *text_loc, size_t maxlen);
#define ZBX_TIMESCALE_MIN_SUPPORTED_VERSION 20001
#define ZBX_TIMESCALE_MIN_SUPPORTED_VERSION_FRIENDLY "2.0.1"
#define ZBX_TIMESCALE_MIN_VERSION_WITH_LICENSE_PARAM_SUPPORT 20000
-#define ZBX_TIMESCALE_MAX_VERSION 20999
-#define ZBX_TIMESCALE_MAX_VERSION_FRIENDLY "2.9"
+#define ZBX_TIMESCALE_MAX_VERSION 21000
+#define ZBX_TIMESCALE_MAX_VERSION_FRIENDLY "2.10"
#define ZBX_TIMESCALE_LICENSE_APACHE "apache"
#define ZBX_TIMESCALE_LICENSE_APACHE_FRIENDLY "TimescaleDB Apache 2 Edition"
#define ZBX_TIMESCALE_LICENSE_COMMUNITY "timescale"
--
2.39.2

View file

@ -0,0 +1,48 @@
From c641825c64e42627a2c9cac969b371ed532e0b57 Mon Sep 17 00:00:00 2001
From: Ryan Sundberg <ryan@arctype.co>
Date: Mon, 4 Oct 2021 20:12:25 -0700
Subject: [PATCH] Zend/tests/bug74093.phpt: Fix failing test case
This test case fails (on non-Windows hosts, where it is enabled) due
to mismatching output in the error log language. This fixes the
expectation, and also rewrites the test procedure in a more stable
fashion.
The objective of the test case is to run a program that exceeds
the max_execution_time and verify that the process was aborted. The
previous implementation tested this using a loop on array_intersect with
large enough inputs to "probably" take enough time to trigger
max_execution_time to abort it. With faster CPUs, over time this test
can become flaky. Instead we simply spin a loop until enough
wall clock time has passed to check our assertion.
---
Zend/tests/bug74093.phpt | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Zend/tests/bug74093.phpt b/Zend/tests/bug74093.phpt
index 7f20285805..32eb445ddc 100644
--- a/Zend/tests/bug74093.phpt
+++ b/Zend/tests/bug74093.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
+Bug #74093 (Maximum execution time exceeded not written in error_log)
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
@@ -12,9 +12,9 @@ max_execution_time=1
hard_timeout=1
--FILE--
<?php
-$a1 = range(1, 1000000);
-$a2 = range(100000, 1999999);
-array_intersect($a1, $a2);
+$start = time();
+while (time() - $start < 5);
+die("Failed to interrupt execution");
?>
--EXPECTF--
-Fatal error: Maximum execution time of 1+1 seconds exceeded %s
+Fatal error: Maximum execution time of 1 second exceeded in %s
--
2.31.1

View file

@ -0,0 +1,17 @@
Fix test result with cURL 7.83 and later.
Taken from upstream:
https://github.com/php/php-src/commit/a4179e4c92b6365d39e09cb9cd63c476848013af
diff --git a/ext/curl/tests/curl_basic_007.phpt b/ext/curl/tests/curl_basic_007.phpt
index 3b53658d6a7e..3834e4674f82 100644
--- a/ext/curl/tests/curl_basic_007.phpt
+++ b/ext/curl/tests/curl_basic_007.phpt
@@ -20,5 +20,5 @@ curl_close($ch);
?>
--EXPECTF--
-string(%d) "No URL set!%w"
+string(%d) "No URL set%A"
int(3)

386
glicid/packages/php.scm Normal file
View file

@ -0,0 +1,386 @@
(define-module (glicid packages php)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages aspell)
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
#:use-module (gnu packages curl)
#:use-module (gnu packages cyrus-sasl)
#:use-module (gnu packages databases)
#:use-module (gnu packages dbm)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gd)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages openldap)
#:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages readline)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages textutils)
#:use-module (gnu packages tls)
#:use-module (gnu packages web)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:))
(define-public php
(package
(name "php")
(version "7.4.30")
(home-page "https://secure.php.net/")
(source (origin
(method url-fetch)
(uri (string-append home-page "distributions/"
"php-" version ".tar.xz"))
(sha256
(base32
"03d7icwys4ikl45q3rgsxv1m3i7kfxhykpx75nn7jzn6697s6wpa"))
(patches (search-patches "glicid/packages/patches/php-bug-74093-test.patch"
"glicid/packages/patches/php-curl-compat.patch"))
(modules '((guix build utils)))
(snippet
'(with-directory-excursion "ext"
(for-each delete-file-recursively
;; Some of the bundled libraries have no proper upstream.
;; Ideally we'd extract these out as separate packages:
;;"mbstring/libmbfl"
;;"date/lib"
;;"bcmath/libbcmath"
;;"fileinfo/libmagic" ; a patched version of libmagic
'("gd/libgd"
"pcre/pcre2lib"
"xmlrpc/libxmlrpc"))))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
(let-syntax ((with (syntax-rules ()
((_ option input)
(string-append option "="
(assoc-ref %build-inputs input))))))
(list (with "--with-bz2" "bzip2")
(with "--with-curl" "curl")
(with "--with-gdbm" "gdbm")
(with "--with-gettext" "libc") ; libintl.h
(with "--with-gmp" "gmp")
(with "--with-ldap" "openldap")
(with "--with-ldap-sasl" "cyrus-sasl")
(with "--with-pdo-pgsql" "postgresql")
(with "--with-pdo-sqlite" "sqlite")
(with "--with-pgsql" "postgresql")
;; PHPs Pspell extension, while retaining its current name,
;; now uses the Aspell library.
(with "--with-pspell" "aspell")
(with "--with-readline" "readline")
(with "--with-sodium" "libsodium")
(with "--with-sqlite3" "sqlite")
(with "--with-tidy" "tidy")
(with "--with-xsl" "libxslt")
(with "--with-zlib-dir" "zlib")
;; We could add "--with-snmp", but it requires netsnmp that
;; we don't have a package for. It is used to build the snmp
;; extension of php.
"--with-external-pcre"
"--with-external-gd"
"--with-iconv"
"--with-openssl"
"--with-mysqli" ; Required for, e.g. wordpress
"--with-pdo-mysql"
"--with-zip"
"--with-zlib"
"--enable-bcmath" ; Required for, e.g. Zabbix frontend
"--enable-calendar"
"--enable-dba=shared"
"--enable-exif"
"--enable-flatfile"
"--enable-fpm"
"--enable-ftp"
"--enable-gd"
"--enable-inifile"
"--enable-intl"
"--enable-mbstring"
"--enable-pcntl"
"--enable-sockets"))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'do-not-record-build-flags
(lambda _
;; Prevent configure flags from being stored and causing
;; unnecessary runtime dependencies.
(substitute* "scripts/php-config.in"
(("@CONFIGURE_OPTIONS@") "")
(("@PHP_LDFLAGS@") ""))
;; This file has ISO-8859-1 encoding.
(with-fluids ((%default-port-encoding "ISO-8859-1"))
(substitute* "main/build-defs.h.in"
(("@CONFIGURE_COMMAND@") "(omitted)")))))
(add-before 'build 'patch-/bin/sh
(lambda _
(substitute* '("run-tests.php" "ext/standard/proc_open.c")
(("/bin/sh") (which "sh")))))
(add-before 'check 'prepare-tests
(lambda _
;; Some of these files have ISO-8859-1 encoding, whereas others
;; use ASCII, so we can't use a "catch-all" find-files here.
(with-fluids ((%default-port-encoding "ISO-8859-1"))
(substitute* '("ext/mbstring/tests/mb_send_mail02.phpt"
"ext/mbstring/tests/mb_send_mail04.phpt"
"ext/mbstring/tests/mb_send_mail05.phpt"
"ext/mbstring/tests/mb_send_mail06.phpt")
(("/bin/cat") (which "cat"))))
(substitute* '("ext/mbstring/tests/mb_send_mail01.phpt"
"ext/mbstring/tests/mb_send_mail03.phpt"
"ext/mbstring/tests/bug52681.phpt"
"ext/standard/tests/general_functions/bug34794.phpt"
"ext/standard/tests/general_functions/bug44667.phpt"
"ext/standard/tests/general_functions/proc_open.phpt")
(("/bin/cat") (which "cat")))
;; The encoding of this file is not recognized, so we simply drop it.
(delete-file "ext/mbstring/tests/mb_send_mail07.phpt")
(substitute* "ext/standard/tests/streams/bug60602.phpt"
(("'ls'") (string-append "'" (which "ls") "'")))
,@(if (string-prefix? "arm" (or (%current-system)
(%current-target-system)))
;; Drop tests known to fail on armhf.
'((for-each delete-file
(list
"ext/calendar/tests/unixtojd_error1.phpt"
;; arm can be a lot slower, so a time-related test fails
"ext/fileinfo/tests/cve-2014-3538-nojit.phpt"
"ext/pcntl/tests/pcntl_unshare_01.phpt"
"ext/pcre/tests/bug76514.phpt"
"ext/pcre/tests/preg_match_error3.phpt"
"ext/pcre/tests/cache_limit.phpt"
"ext/sockets/tests/socket_getopt.phpt"
"ext/sockets/tests/socket_sendrecvmsg_error.phpt"
"ext/standard/tests/general_functions/var_export-locale.phpt"
"ext/standard/tests/general_functions/var_export_basic1.phpt"
"ext/intl/tests/timezone_getErrorCodeMessage_basic.phpt"
"ext/intl/tests/timezone_getOffset_error.phpt"
"sapi/cli/tests/cli_process_title_unix.phpt"
"sapi/cli/tests/upload_2G.phpt"
"Zend/tests/concat_003.phpt")))
'())
,@(if (target-ppc64le?)
;; Drop tests known to fail on powerpc64le.
'((for-each delete-file
(list
;; phpdbg watchpoints don't work.
;; Bug tracked upstream at:
;; https://bugs.php.net/bug.php?id=81408
"sapi/phpdbg/tests/watch_001.phpt"
"sapi/phpdbg/tests/watch_003.phpt"
"sapi/phpdbg/tests/watch_004.phpt"
"sapi/phpdbg/tests/watch_005.phpt"
"sapi/phpdbg/tests/watch_006.phpt")))
'())
;; Drop tests that are known to fail.
(for-each delete-file
'("ext/posix/tests/posix_getgrgid.phpt" ; Requires /etc/group.
"ext/posix/tests/posix_getgrnam_basic.phpt" ; Requires /etc/group.
"ext/sockets/tests/bug63000.phpt" ; Fails to detect OS.
"ext/sockets/tests/socket_shutdown.phpt" ; Requires DNS.
"ext/sockets/tests/socket_send.phpt" ; Likewise.
"ext/sockets/tests/mcast_ipv4_recv.phpt" ; Requires multicast.
;; These needs /etc/services.
"ext/standard/tests/general_functions/getservbyname_basic.phpt"
"ext/standard/tests/general_functions/getservbyport_basic.phpt"
"ext/standard/tests/general_functions/getservbyport_variation1.phpt"
;; And /etc/protocols.
"ext/standard/tests/network/getprotobyname_basic.phpt"
"ext/standard/tests/network/getprotobynumber_basic.phpt"
;; And exotic locales.
"ext/standard/tests/strings/setlocale_basic1.phpt"
"ext/standard/tests/strings/setlocale_basic2.phpt"
"ext/standard/tests/strings/setlocale_basic3.phpt"
"ext/standard/tests/strings/setlocale_variation1.phpt"
;; This failing test is skipped on PHP's Travis CI as it is
;; supposedly inaccurate.
"ext/standard/tests/file/disk_free_space_basic.phpt"
;; The following test erroneously expect the link
;; count of a sub-directory to increase compared to
;; its parent.
"ext/standard/tests/file/lstat_stat_variation8.phpt"
;; This tests whether microseconds differ enough and
;; fails inconsistently on fast machines.
"ext/date/tests/bug73837.phpt"
;; XXX: These gd tests fails. Likely because our version
;; is different from the (patched) bundled one.
;; Here, gd quits immediately after "fatal libpng error"; while the
;; test expects it to additionally return a "setjmp" error and warning.
"ext/gd/tests/bug39780_extern.phpt"
"ext/gd/tests/libgd00086_extern.phpt"
;; Extra newline in gd-png output.
"ext/gd/tests/bug45799.phpt"
;; Test expects generic "gd warning" but gets the actual function name.
"ext/gd/tests/createfromwbmp2_extern.phpt"
;; This bug should have been fixed in gd 2.2.2.
;; Is it a regression?
"ext/gd/tests/bug65148.phpt"
;; This bug should have been fixed in the gd 2.2
;; series. Perhaps a regression introduced by gd
;; 2.3.0?
"ext/gd/tests/bug66590.phpt"
;; This bug should have been fixed in the php-5.5
;; series. Perhaps a regression introduced by gd
;; 2.3.0?
"ext/gd/tests/bug70102.phpt"
;; This bug should have been fixed in the php-5.6
;; series. Perhaps a regression introduced by gd
;; 2.3.0?
"ext/gd/tests/bug73869.phpt"
;; Some WebP related tests fail.
"ext/gd/tests/webp_basic.phpt"
"ext/gd/tests/imagecreatefromstring_webp.phpt"
;; Expected error message, but from the wrong function
"ext/gd/tests/bug77269.phpt"
;; TODO: Enable these when libgd is built with xpm support.
"ext/gd/tests/xpm2gd.phpt"
"ext/gd/tests/xpm2jpg.phpt"
"ext/gd/tests/xpm2png.phpt"
;; Whitespace difference, probably caused by a very
;; long store path
"ext/gd/tests/bug77479.phpt"
;; Expected invalid XBM but got EOF before image was
;; complete. It's a warning in both cases and test
;; result is the same.
"ext/gd/tests/bug77973.phpt"
;; Test expects uninitialized value to be false, but
;; instead gets "resource(5) of type (gd)".
"ext/gd/tests/bug79067.phpt"
;; The following test fails with "The image size
;; differs: expected 114x115, got 117x117".
"ext/gd/tests/bug79068.phpt"
;; XXX: These iconv tests have the expected outcome,
;; but with different error messages.
;; Expects "illegal character", instead gets "unknown error (84)".
"ext/iconv/tests/bug52211.phpt"
"ext/iconv/tests/bug60494.phpt"
;; Expects "wrong charset", gets unknown error (22).
"ext/iconv/tests/iconv_strlen_error2.phpt"
"ext/iconv/tests/iconv_substr_error2.phpt"
;; Expects conversion error, gets "error condition Termsig=11".
"ext/iconv/tests/iconv_strpos_error2.phpt"
"ext/iconv/tests/iconv_strrpos_error2.phpt"
;; Expects "invalid multibyte sequence" but got
;; "unknown error".
"ext/iconv/tests/bug76249.phpt"
;; XXX: These test failures appear legitimate, needs investigation.
;; open_basedir() restriction failure.
"ext/curl/tests/bug61948-unix.phpt"
;; Expects a false boolean, gets empty array from glob().
"ext/standard/tests/file/bug41655_1.phpt"
"ext/standard/tests/file/glob_variation5.phpt"
;; The test expects an Array, but instead get the contents(?).
"ext/gd/tests/bug43073.phpt"
;; imagettftext() returns wrong coordinates.
"ext/gd/tests/bug48732-mb.phpt"
"ext/gd/tests/bug48732.phpt"
;; Similarly for imageftbbox().
"ext/gd/tests/bug48801-mb.phpt"
"ext/gd/tests/bug48801.phpt"
;; Different expected output from imagecolorallocate().
"ext/gd/tests/bug53504.phpt"
;; Wrong image size after scaling an image.
"ext/gd/tests/bug73272.phpt"
;; Expects iconv to detect illegal characters, instead gets
;; "unknown error (84)" and heap corruption(!).
"ext/iconv/tests/bug48147.phpt"
;; Expects illegal character ".", gets "=?utf-8?Q?."
"ext/iconv/tests/bug51250.phpt"
;; iconv throws "buffer length exceeded" on some string checks.
"ext/iconv/tests/iconv_mime_encode.phpt"
;; file_get_contents(): iconv stream filter
;; ("ISO-8859-1"=>"UTF-8") unknown error.
"ext/standard/tests/file/bug43008.phpt"
;; Table data not created in sqlite(?).
"ext/pdo_sqlite/tests/bug_42589.phpt"
;; Expects an Array with 3 preg_matches; gets 0.
"ext/pcre/tests/bug79846.phpt"
;; Expects an empty Array; gets one with " " in it.
"ext/pcre/tests/bug80118.phpt"
;; Renicing a process fails in the build environment.
"ext/standard/tests/general_functions/proc_nice_basic.phpt"
;; Can fail on fast machines?
"Zend/tests/bug74093.phpt"))
;; Accomodate two extra openssl errors flanking the expected one:
;; random number generator:RAND_{load,write}_file:Cannot open file
;; This is due to an invalid $HOME, but changing it in the test
;; still prints the first one & changing it globally is overkill.
(substitute* "ext/openssl/tests/bug80747.phpt"
((".*error:%s:key size too small.*" match)
(string-append "%s\n" match "%s\n")))
;; Skip tests requiring network access.
(setenv "SKIP_ONLINE_TESTS" "1")
;; Without this variable, 'make test' passes regardless of failures.
(setenv "REPORT_EXIT_STATUS" "1")
;; Skip tests requiring I/O facilities that are unavailable in the
;; build environment
(setenv "SKIP_IO_CAPTURE_TESTS" "1"))))
#:test-target "test"))
(inputs
`(("aspell" ,aspell)
("bzip2" ,bzip2)
("curl" ,curl)
("cyrus-sasl" ,cyrus-sasl)
("gd" ,gd)
("gdbm" ,gdbm)
("gmp" ,gmp)
("gnutls" ,gnutls)
("icu4c" ,icu4c)
("libgcrypt" ,libgcrypt)
("libpng" ,libpng)
("libsodium" ,libsodium)
("libxml2" ,libxml2)
("libxslt" ,libxslt)
("libx11" ,libx11)
("libzip" ,libzip)
("oniguruma" ,oniguruma)
("openldap" ,openldap)
("openssl" ,openssl-1.1)
("pcre" ,pcre2)
("postgresql" ,postgresql)
("readline" ,readline)
("sqlite" ,sqlite)
("tidy" ,tidy)
("zlib" ,zlib)))
(native-inputs
`(("pkg-config" ,pkg-config)
("bison" ,bison)
("gettext" ,gettext-minimal)
("procps" ,procps))) ; for tests
(synopsis "PHP programming language")
(description
"PHP (PHP Hypertext Processor) is a server-side (CGI) scripting
language designed primarily for web development but is also used as
a general-purpose programming language. PHP code may be embedded into
HTML code, or it can be used in combination with various web template
systems, web content management systems and web frameworks." )
(license (list
(license:non-copyleft "file://LICENSE") ; The PHP license.
(license:non-copyleft "file://Zend/LICENSE") ; The Zend license.
license:lgpl2.1 ; ext/mbstring/libmbfl
license:lgpl2.1+ ; ext/bcmath/libbcmath
license:bsd-2 ; ext/fileinfo/libmagic
license:expat)))) ; ext/date/lib
php

View file

@ -0,0 +1,80 @@
(define-module (glicid packages python-xyz)
#:use-module (guix build-system python)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages python-web)
#:use-module (gnu packages check)
#:use-module (gnu packages python-build)
#:use-module (gnu packages serialization)
#:use-module (gnu packages python-xyz)
)
(define-public python-pynetbox
(package
(name "python-pynetbox")
(version "7.0.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "pynetbox" version))
(sha256 (base32 "16ps9zgcjzyzn95lry277741i8php4ci3plsyd2vqxd57havba7b"))))
(build-system python-build-system)
(inputs (list python-setuptools-scm python-pytest ))
(propagated-inputs (list python-requests))
(home-page "https://github.com/netbox-community/pynetbox")
(synopsis "NetBox API client library")
(description "NetBox API client library")
(license #f)))
(define-public python-jinja2
(package
(name "python-jinja2")
(version "3.1.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "Jinja2" version))
(sha256 (base32 "0lp86yadzf8dph67f6g3yxmvnhrzzi863z58jmsrx2j059q1ld9i"))))
(build-system python-build-system)
(propagated-inputs (list python-markupsafe))
(home-page "https://palletsprojects.com/p/jinja/")
(synopsis "A very fast and expressive template engine.")
(description
"This package provides a very fast and expressive template engine.")
(license #f)))
(define-public python-pyyaml
(package
(name "python-pyyaml")
(version "6.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "PyYAML" version))
(sha256 (base32 "18imkjacvpxfgg1lbpraqywx3j7hr5dv99d242byqvrh2jf53yv8"))))
(build-system python-build-system)
(inputs (list libyaml python-cython))
(home-page "https://pyyaml.org/")
(synopsis "YAML parser and emitter for Python")
(description "YAML parser and emitter for Python")
(license license:expat)))
(define-public python-setuptools-scm
(package
(name "python-setuptools-scm")
(version "7.1.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "setuptools_scm" version))
(sha256
(base32
"09wg4zg30ir1c2cvwqipaz3hwaxz503fgw5zdvaxgakilx2q6l3c"))))
(build-system python-build-system)
(propagated-inputs (list python-importlib-metadata python-packaging
python-setuptools python-tomli
python-typing-extensions))
(native-inputs (list python-pytest python-virtualenv))
(home-page "https://github.com/pypa/setuptools_scm/")
(synopsis "the blessed package to manage your versions by scm tags")
(description "the blessed package to manage your versions by scm tags")
(license license:expat)))

59
glicid/packages/web.scm Normal file
View file

@ -0,0 +1,59 @@
(define-module (glicid packages web)
#:use-module (guix build-system gnu)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages adns)
#:use-module (gnu packages xml)
#:use-module (gnu packages tls)
#:use-module (gnu packages linux)
#:use-module (gnu packages compression)
#:use-module (gnu packages libevent)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages check)
#:use-module (gnu packages python)
#:use-module (gnu packages base)
#:use-module ((gnu packages web) #:prefix gnu:)
)
(define-public nghttp2
(package
(name "nghttp2")
(version "1.52.0")
(source (origin
(method url-fetch)
(uri (list (string-append "https://github.com/"name "/" name "/releases/download/v" version "/" name "-" version ".tar.xz")))
(sha256 (base32 "0zdsz0hrv7zypykhd3kyvllvkzw4hs9lkcwwsga9lik0kr1z1a9y"))))
(build-system gnu-build-system)
(outputs (list "out" "lib"))
(native-inputs
(list pkg-config cunit python tzdata-for-tests))
(inputs (list c-ares gnu:jansson libev libxml2 openssl libbpf zlib ))
(arguments
`(#:configure-flags
(list (string-append "--libdir=" (assoc-ref %outputs "lib") "/lib")
"--enable-app"
"--enable-hpack-tools"
"--disable-examples"
"--disable-static"
,@(if (%current-target-system)
'("--disable-python-bindings")
'()))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'break-circular-reference
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "lib/libnghttp2.pc.in"
(("@prefix@")
(assoc-ref outputs "lib")))
#t))
(add-before 'check 'set-timezone-directory
(lambda* (#:key inputs native-inputs #:allow-other-keys)
(setenv "TZDIR" (string-append
(assoc-ref (or native-inputs inputs) "tzdata")
"/share/zoneinfo"))
#t)))))
(home-page "https://nghttp2.org/")
(synopsis "HTTP/2 protocol client, proxy, server, and library")
(description "nghttp2 implements the Hypertext Transfer Protocol, version 2.")
(license license:expat)))

55
glicid/services/dns.scm Normal file
View file

@ -0,0 +1,55 @@
(define-module (glicid services dns)
#:use-module (gnu packages dns)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
#:use-module (guix)
#:use-module (guix records)
#:use-module (ice-9 match)
#: export (
named-configuration
named-configuration?
named-shepherd-service
named-service-type
))
(define-record-type*
<named-configuration>
named-configuration make-named-configuration
named-configuration?
(named-pkg named-pkg (default isc-bind))
(config-file config-file (default (file-append named "/etc/named/named.conf")))
(pid-file pid-file (default "/var/run/named.pid"))
(log-file log-file (default "/var/log/named.log")))
(define named-shepherd-service
(match-lambda
(($ <named-configuration> named-pkg config-file pid-file log-file )
(list
(shepherd-service
(provision '(named))
(documentation "Run named.")
(requirement '(user-processes))
(respawn? #t)
(start #~(make-forkexec-constructor
(list
#$(file-append named-pkg "/sbin/named")
"-g"
"-c" #$config-file
)
#:pid-file #$pid-file
#:log-file #$log-file ))
(stop #~(make-kill-destructor)))))))
(define %named-activation
#~(begin
(mkdir-p "/var/run/named")
(mkdir-p "/var/lib/named")
#t ))
(define named-service-type
(service-type
(name 'named)
(extensions (list
(service-extension shepherd-root-service-type named-shepherd-service)
(service-extension activation-service-type (const %named-activation))))
(description "Run named.")))

99
glicid/services/ntp.scm Normal file
View file

@ -0,0 +1,99 @@
(define-module (glicid services ntp)
#:use-module (gnu packages bash)
#:use-module (gnu packages ntp)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
#:use-module (gnu system shadow)
#:use-module (guix)
#:use-module (guix build utils)
#:use-module (guix records)
#:use-module (ice-9 match)
#:use-module (glicid utils)
#:export (
chronyd-configuration
chronyd-configuration?
chronyd-shepherd-service
chronyd-service-type
%default-chrony-conf
%chrony-group
%chrony-account
%chrony-accounts
))
(define %default-chrony-conf
(plain-file "chrony.conf" "
pool pool.ntp.org iburst
driftfile /var/lib/chrony/drift
ntsdumpdir /var/lib/chrony
leapsectz right/UTC
makestep 1.0 3
rtcsync
keyfile /etc/chrony/chrony.keys
"))
(define %chrony-group
(user-group
(name "chrony")
(system? #t)))
(define %chrony-account
(user-account
(name "chrony")
(group "chrony")
(system? #t)
(comment "chrony server user")
(uid 969)
(home-directory "/var/lib/chrony")
(shell (file-append bash "/bin/bash"))))
(define %chrony-accounts
(list %chrony-group %chrony-account))
(define-record-type*
<chronyd-configuration>
chronyd-configuration make-chronyd-configuration
chronyd-configuration?
(chronyd-pkg chronyd-pkg (default chrony))
(config-file config-file (default %default-chrony-conf))
(pid-file pid-file (default "/var/run/chrony/chronyd.pid"))
(log-file log-file (default "/var/log/chrony/chrony.log")))
(define chronyd-shepherd-service
(match-lambda
(($ <chronyd-configuration> chronyd-pkg config-file pid-file log-file )
(list
(shepherd-service
(provision '(chronyd))
(documentation "Run chronyd.")
(requirement '(user-processes))
(respawn? #t)
(start #~(make-forkexec-constructor
(list
#$(file-append chronyd-pkg "/sbin/chronyd")
"-d"
"-f" #$config-file
)
#:pid-file #$pid-file
#:log-file #$log-file))
(stop #~(make-kill-destructor)))))))
(define %chronyd-activation
#~(begin
(mkdir-p "/var/run/chrony")
(mkdir-p "/var/lib/chrony")
(mkdir-p "/var/log/chrony")
(chown "/var/run/chrony" (passwd:uid (getpwnam "chrony")) (passwd:gid (getpwnam "chrony")))
(chown "/var/lib/chrony" (passwd:uid (getpwnam "chrony")) (passwd:gid (getpwnam "chrony")))
(chown "/var/log/chrony" (passwd:uid (getpwnam "chrony")) (passwd:gid (getpwnam "chrony")))
(chmod "/var/run/chrony" #o770)
#t))
(define chronyd-service-type
(service-type
(name 'chronyd)
(extensions (list
(service-extension shepherd-root-service-type chronyd-shepherd-service)
(service-extension activation-service-type (const %chronyd-activation))
(service-extension account-service-type (const %chrony-accounts))
))
(description "Run chronyd.")))