From 201930c54438f08f87dbe4b46af4838e419e7866 Mon Sep 17 00:00:00 2001 From: Jean-Francois GUILLAUME Date: Wed, 8 Feb 2023 21:50:51 +0000 Subject: [PATCH 01/23] updating podman to 4.4.1 --- glicid/packages/containers.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glicid/packages/containers.scm b/glicid/packages/containers.scm index 1e94e9b..1fd118e 100644 --- a/glicid/packages/containers.scm +++ b/glicid/packages/containers.scm @@ -19,14 +19,14 @@ (define-public podman (package (name "podman") - (version "4.4.0") + (version "4.4.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/containers/podman") (commit (string-append "v" version)))) - (sha256 (base32 "0v1zcb2v7b8k2aw30bws1ir94daw1llc4gfx3rfja25vqhvqw9wk")) + (sha256 (base32 "0qbr6rbyig3c2hvdvmd94jjkg820hpdz6j7dgyv62dl6wfwvj5jj")) (modules '((guix build utils))) (snippet '(begin (substitute* "Makefile" ((".*hack/btrfs.*") "")) From edc0fbc3d5b5a5b4d66957cbf5d7e8dd6accc482 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Thu, 9 Feb 2023 14:10:23 +0100 Subject: [PATCH 02/23] backporting cross-compilation from upstream --- glicid/packages/openldap.scm | 94 +++++++++++------------------------- 1 file changed, 28 insertions(+), 66 deletions(-) diff --git a/glicid/packages/openldap.scm b/glicid/packages/openldap.scm index 55bd908..af4b65d 100644 --- a/glicid/packages/openldap.scm +++ b/glicid/packages/openldap.scm @@ -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) @@ -31,72 +30,34 @@ (uri (list (string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz"))) (sha256 (base32 "0ihddk8c6hg9lkjv0wk0w13g8kb75r8dfsn1n6b77mzk3pbs38nj")))) (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,11 +82,12 @@ (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) - 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 - Authentication Module} (PAM) to do identity and authentication management with - an LDAP server.") - (license license:lgpl2.1+))) + (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 + Authentication Module} (PAM) to do identity and authentication management with + an LDAP server.") + (license license:lgpl2.1+))) + +openldap From f66335f354170acd92ba9a929de97a8909e050b5 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Thu, 9 Feb 2023 22:12:01 +0100 Subject: [PATCH 03/23] adding up-to-date gitlab-runner from hpc-non-free --- glicid/packages/gitlab.scm | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 glicid/packages/gitlab.scm diff --git a/glicid/packages/gitlab.scm b/glicid/packages/gitlab.scm new file mode 100644 index 0000000..804c4f9 --- /dev/null +++ b/glicid/packages/gitlab.scm @@ -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.1") + (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 "0dbkji70wxn61q1zkayr4al365lz09nd1f8b06dady3yfplr91yv")))) + (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))) From 29c2c06e67cd37230d5b8c075e2e3caac4b0b272 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Thu, 16 Feb 2023 11:07:48 +0100 Subject: [PATCH 04/23] bump openldap to 2.6.4 --- glicid/packages/openldap.scm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/glicid/packages/openldap.scm b/glicid/packages/openldap.scm index af4b65d..ffde07e 100644 --- a/glicid/packages/openldap.scm +++ b/glicid/packages/openldap.scm @@ -24,11 +24,11 @@ (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 openssl libevent libgcrypt libltdl lz4 perl snappy unixodbc wiredtiger zlib)) (native-inputs (list bdb groff libtool pkg-config)) @@ -89,5 +89,3 @@ Authentication Module} (PAM) to do identity and authentication management with an LDAP server.") (license license:lgpl2.1+))) - -openldap From cd93c824a2d9b28067f85fe3abaa6b4efc7e2ba6 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Thu, 16 Feb 2023 11:13:06 +0100 Subject: [PATCH 05/23] bump gitlab-runner to 15.8.2 --- glicid/packages/gitlab.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glicid/packages/gitlab.scm b/glicid/packages/gitlab.scm index 804c4f9..21abc15 100644 --- a/glicid/packages/gitlab.scm +++ b/glicid/packages/gitlab.scm @@ -12,12 +12,12 @@ (define-public gitlab-runner (package (name "gitlab-runner") - (version "15.8.1") + (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 "0dbkji70wxn61q1zkayr4al365lz09nd1f8b06dady3yfplr91yv")))) + (sha256 (base32 "1d0hvrzmrdar2dvzvz6dq3950dw185grjs0iv2y62jicb6jz56id")))) (build-system trivial-build-system) (arguments '(#:modules ((guix build utils)) From ba1163ea09273a093599856978d040a534418cee Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Fri, 17 Feb 2023 17:04:05 +0100 Subject: [PATCH 06/23] bump nghttp2 --- glicid/packages/web.scm | 59 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 glicid/packages/web.scm diff --git a/glicid/packages/web.scm b/glicid/packages/web.scm new file mode 100644 index 0000000..bcb41ab --- /dev/null +++ b/glicid/packages/web.scm @@ -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))) From bb8c8fa014970fb0a2ff2227121c49b3683fb633 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Fri, 17 Feb 2023 17:41:38 +0100 Subject: [PATCH 07/23] bump bind version and adding service --- glicid/packages/dns.scm | 59 +++++++++++++++++++++++++++++++++++++++++ glicid/services/dns.scm | 55 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 glicid/packages/dns.scm create mode 100644 glicid/services/dns.scm diff --git a/glicid/packages/dns.scm b/glicid/packages/dns.scm new file mode 100644 index 0000000..8d097a4 --- /dev/null +++ b/glicid/packages/dns.scm @@ -0,0 +1,59 @@ +(define-module (glicid packages isc-bind) + #: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)))) + +isc-bind diff --git a/glicid/services/dns.scm b/glicid/services/dns.scm new file mode 100644 index 0000000..8e42fae --- /dev/null +++ b/glicid/services/dns.scm @@ -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 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-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") + "-f" + "-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."))) From 966d226970a25681ad56e131c30c5292a44a3c4b Mon Sep 17 00:00:00 2001 From: Jean-Francois GUILLAUME Date: Fri, 17 Feb 2023 16:46:09 +0000 Subject: [PATCH 08/23] Update dns.scm --- glicid/packages/dns.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glicid/packages/dns.scm b/glicid/packages/dns.scm index 8d097a4..c3fd508 100644 --- a/glicid/packages/dns.scm +++ b/glicid/packages/dns.scm @@ -1,4 +1,4 @@ -(define-module (glicid packages isc-bind) +(define-module (glicid packages dns) #:use-module (guix build-system gnu) #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) From 921ad57de24b92d0abcf78ca3d6e7acce083346d Mon Sep 17 00:00:00 2001 From: Jean-Francois GUILLAUME Date: Mon, 20 Feb 2023 09:10:00 +0000 Subject: [PATCH 09/23] Update dns.scm --- glicid/packages/dns.scm | 2 -- 1 file changed, 2 deletions(-) diff --git a/glicid/packages/dns.scm b/glicid/packages/dns.scm index c3fd508..aa6a017 100644 --- a/glicid/packages/dns.scm +++ b/glicid/packages/dns.scm @@ -55,5 +55,3 @@ (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)))) - -isc-bind From f80b291a80d6071294ae09f6c6985a0af2db4434 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Mon, 20 Feb 2023 11:13:03 +0100 Subject: [PATCH 10/23] removing yade as it raise error --- glicid/packages/science.scm | 168 ++++++++++++++++++------------------ 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/glicid/packages/science.scm b/glicid/packages/science.scm index dff206a..1c86e7e 100644 --- a/glicid/packages/science.scm +++ b/glicid/packages/science.scm @@ -49,87 +49,87 @@ (home-page "http://loki-lib.sourceforge.net/index.php?n=Main.HomePage") (license gpl3+))) -(define-public yade - (package - (name "yade") - (version "2022.01a") - (source (origin - (method url-fetch) - (uri (string-append - "https://gitlab.com/yade-dev/trunk/-/archive/2022.01a/trunk-" - version ".tar.gz")) - (sha256 - (base32 - "0k4hnvi70cqzl0q54kkbij6jwxydhfwcacp9s49n3fkaf1dihxiv")))) - (build-system cmake-build-system) - (arguments - `(#:configure-flags (list "-DENABLE_POTENTIAL_BLOCKS=OFF" - (string-append "-DCMAKE_INSTALL_PREFIX=" - (assoc-ref %outputs "out")) - (string-append "-DQGLVIEWER_INCLUDE_DIR=" - (assoc-ref %build-inputs - "libqglviewer"))) - ;; (string-append "-DQGLVIEWER_INCLUDE_DIR=" - ;; libqglviewer)))) - #:phases (modify-phases %standard-phases - (add-after 'unpack 'post-unpack - (lambda* (#:key outputs inputs #:allow-other-keys) - (mkdir-p "./build") - (chdir "./build"))) - (replace 'configure - (lambda* (#:key inputs outputs configure-flags - #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (apply invoke "cmake" "../" configure-flags))))) - #:tests? #f)) - ;; (lambda _ (invoke - ;; "cmake" "../trunk" - ;; configure-flags)))))) - (propagated-inputs `(("gdb" ,gdb) - ("sqlite" ,sqlite) - ("openmpi" ,openmpi) - ("python" ,python) - ("python-numpy" ,python-numpy) - ("python-matplotlib" ,python-matplotlib) - ("python-sphinx" ,python-sphinx) - ("python-ipython" ,python-ipython) - ("python-mpi4py" ,python-mpi4py) - ("python-mpmath" ,python-mpmath) - ("python-pygraphviz" ,python-pygraphviz) - ("python-xlib" ,python-xlib) - ("python-future" ,python-future) - ("python-pyqt" ,python-pyqt) - ("python-pyqtwebengine" ,python-pyqtwebengine) - ("python-qtpy" ,python-qtpy))) - (inputs `(("boost" ,boost) - ("qtbase-5" ,qtbase-5) - ;; ("qt" ,qt) - ("freeglut" ,freeglut) - ("gts" ,gts) - ("pkg-config" ,pkg-config) - ("libqglviewer" ,libqglviewer) - ("eigen" ,eigen) - ;; ("loki" ,loki) - ;; ("vtk" ,vtk) - ("qtwebkit" ,qtwebkit) - ("openblas" ,openblas) - ("suitesparse" ,suitesparse) - ("gcc-toolchain" ,gcc-toolchain) - ("metis" ,metis) - ("cgal" ,cgal) - ("qtsvg" ,qtsvg) - ("qtwebengine" ,qtwebengine) - ("mpfr" ,mpfr))) - - (synopsis - "Yade is an extensible open-source framework for discrete numerical models, focused on Discrete Element Method.") - (description - "Yade is an extensible open-source framework for discrete numerical models, focused on Discrete Element Method. The computation parts are written in c++ using flexible object model, allowing independent implementation of new algorithms and interfaces. Python is used for rapid and concise scene construction, simulation control, postprocessing and debugging.") - (home-page "https://www.yade-dem.org/") - (license gpl3+))) - -(define-public yade-glicid-waves - (package - (inherit (transform-package ((instead-of "openmpi-glicid-waves" openmpi) - yade) "waves")) - (name "yade-glicid-waves"))) +;(define-public yade +; (package +; (name "yade") +; (version "2022.01a") +; (source (origin +; (method url-fetch) +; (uri (string-append +; "https://gitlab.com/yade-dev/trunk/-/archive/2022.01a/trunk-" +; version ".tar.gz")) +; (sha256 +; (base32 +; "0k4hnvi70cqzl0q54kkbij6jwxydhfwcacp9s49n3fkaf1dihxiv")))) +; (build-system cmake-build-system) +; (arguments +; `(#:configure-flags (list "-DENABLE_POTENTIAL_BLOCKS=OFF" +; (string-append "-DCMAKE_INSTALL_PREFIX=" +; (assoc-ref %outputs "out")) +; (string-append "-DQGLVIEWER_INCLUDE_DIR=" +; (assoc-ref %build-inputs +; "libqglviewer"))) +; ;; (string-append "-DQGLVIEWER_INCLUDE_DIR=" +; ;; libqglviewer)))) +; #:phases (modify-phases %standard-phases +; (add-after 'unpack 'post-unpack +; (lambda* (#:key outputs inputs #:allow-other-keys) +; (mkdir-p "./build") +; (chdir "./build"))) +; (replace 'configure +; (lambda* (#:key inputs outputs configure-flags +; #:allow-other-keys) +; (let ((out (assoc-ref outputs "out"))) +; (apply invoke "cmake" "../" configure-flags))))) +; #:tests? #f)) +; ;; (lambda _ (invoke +; ;; "cmake" "../trunk" +; ;; configure-flags)))))) +; (propagated-inputs `(("gdb" ,gdb) +; ("sqlite" ,sqlite) +; ("openmpi" ,openmpi) +; ("python" ,python) +; ("python-numpy" ,python-numpy) +; ("python-matplotlib" ,python-matplotlib) +; ("python-sphinx" ,python-sphinx) +; ("python-ipython" ,python-ipython) +; ("python-mpi4py" ,python-mpi4py) +; ("python-mpmath" ,python-mpmath) +; ("python-pygraphviz" ,python-pygraphviz) +; ("python-xlib" ,python-xlib) +; ("python-future" ,python-future) +; ("python-pyqt" ,python-pyqt) +; ("python-pyqtwebengine" ,python-pyqtwebengine) +; ("python-qtpy" ,python-qtpy))) +; (inputs `(("boost" ,boost) +; ("qtbase-5" ,qtbase-5) +; ;; ("qt" ,qt) +; ("freeglut" ,freeglut) +; ("gts" ,gts) +; ("pkg-config" ,pkg-config) +; ("libqglviewer" ,libqglviewer) +; ("eigen" ,eigen) +; ;; ("loki" ,loki) +; ;; ("vtk" ,vtk) +; ("qtwebkit" ,qtwebkit) +; ("openblas" ,openblas) +; ("suitesparse" ,suitesparse) +; ("gcc-toolchain" ,gcc-toolchain) +; ("metis" ,metis) +; ("cgal" ,cgal) +; ("qtsvg" ,qtsvg) +; ("qtwebengine" ,qtwebengine) +; ("mpfr" ,mpfr))) +; +; (synopsis +; "Yade is an extensible open-source framework for discrete numerical models, focused on Discrete Element Method.") +; (description +; "Yade is an extensible open-source framework for discrete numerical models, focused on Discrete Element Method. The computation parts are written in c++ using flexible object model, allowing independent implementation of new algorithms and interfaces. Python is used for rapid and concise scene construction, simulation control, postprocessing and debugging.") +; (home-page "https://www.yade-dem.org/") +; (license gpl3+))) +; +;(define-public yade-glicid-waves +; (package +; (inherit (transform-package ((instead-of "openmpi-glicid-waves" openmpi) +; yade) "waves")) +; (name "yade-glicid-waves"))) From c9fc39f0484db46d7929127a4c9236bae151de18 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Mon, 20 Feb 2023 13:35:18 +0100 Subject: [PATCH 11/23] adding pynetbox and deps --- glicid/packages/python-xyz.scm | 80 ++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 glicid/packages/python-xyz.scm diff --git a/glicid/packages/python-xyz.scm b/glicid/packages/python-xyz.scm new file mode 100644 index 0000000..e496314 --- /dev/null +++ b/glicid/packages/python-xyz.scm @@ -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))) From c1c473947dd44a2b692719f9ec98e409bebdeede Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Mon, 20 Feb 2023 15:59:32 +0100 Subject: [PATCH 12/23] changing named logging --- glicid/services/dns.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glicid/services/dns.scm b/glicid/services/dns.scm index 8e42fae..eb20a71 100644 --- a/glicid/services/dns.scm +++ b/glicid/services/dns.scm @@ -33,7 +33,7 @@ (start #~(make-forkexec-constructor (list #$(file-append named-pkg "/sbin/named") - "-f" + "-g" "-c" #$config-file ) #:pid-file #$pid-file From b56872396f693937565364f78a0a40dee0b88b3b Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Thu, 23 Feb 2023 09:55:25 +0100 Subject: [PATCH 13/23] bump timescaledb to 2.10.0 --- glicid/packages/databases.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glicid/packages/databases.scm b/glicid/packages/databases.scm index e25cf7c..668244e 100644 --- a/glicid/packages/databases.scm +++ b/glicid/packages/databases.scm @@ -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) From 4c262a7f88e589ba20d8e1d90c13356b678f2351 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Fri, 24 Feb 2023 15:37:44 +0100 Subject: [PATCH 14/23] chronyd --- glicid/services/ntp.scm | 100 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 glicid/services/ntp.scm diff --git a/glicid/services/ntp.scm b/glicid/services/ntp.scm new file mode 100644 index 0000000..93ec8f6 --- /dev/null +++ b/glicid/services/ntp.scm @@ -0,0 +1,100 @@ +(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 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-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 + (unless (file-exists? "/etc/chrony/chrony.keys") + (mkdir-p "/etc/chrony") + (touch "/etc/chrony/chrony.keys")) + (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)))) + (description "Run chronyd."))) From 18edf4409a6ced9e819f0d9431989f04743c9203 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Wed, 1 Mar 2023 12:33:02 +0100 Subject: [PATCH 15/23] podman 4.4.2 --- glicid/packages/containers.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glicid/packages/containers.scm b/glicid/packages/containers.scm index 1fd118e..e623f5d 100644 --- a/glicid/packages/containers.scm +++ b/glicid/packages/containers.scm @@ -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.*") "")) From 29a2172e6c1812c5b0809e85e8c396d7975488dc Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Fri, 3 Mar 2023 08:24:45 +0100 Subject: [PATCH 16/23] bumping timescaledb supported version to 2.10 --- glicid/packages/monitoring.scm | 116 +++++++----------- .../glicid-zabbix-timescaledb-2.10.patch | 27 ++++ 2 files changed, 71 insertions(+), 72 deletions(-) create mode 100644 glicid/packages/patches/glicid-zabbix-timescaledb-2.10.patch diff --git a/glicid/packages/monitoring.scm b/glicid/packages/monitoring.scm index 82c00d5..0b5bc16 100644 --- a/glicid/packages/monitoring.scm +++ b/glicid/packages/monitoring.scm @@ -1,82 +1,54 @@ (define-module (glicid packages monitoring) - #:use-module (guix packages) - #:use-module (guix utils) - - #:use-module ((gnu packages monitoring) - #:prefix gnu:) - #:use-module (guix download)) + #:use-module (guix packages) + #:use-module (guix utils) + #: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") - (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")) - (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"))))) - -)) + (package + (inherit gnu:zabbix-agentd) + (version "6.0.13") + (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")) + (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") + (("/usr/sbin/fping6?") "/run/setuid-programs/fping"))))))) (define-public zabbix-agent2 - (package - (inherit gnu:zabbix-agent2) - (version "6.0.13") - (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")) - (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"))))) - -)) + (package + (inherit gnu:zabbix-agent2) + (version "6.0.13") + (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")) + (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") + (("/usr/sbin/fping6?") "/run/setuid-programs/fping"))))))) (define-public zabbix-server - (package - (inherit gnu:zabbix-server) - (version "6.0.13") - (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")) - (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"))))) - - - ) -) - + (package + (inherit gnu:zabbix-server) + (version "6.0.13") + (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")) + (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") + (("/usr/sbin/fping6?") "/run/setuid-programs/fping"))))))) diff --git a/glicid/packages/patches/glicid-zabbix-timescaledb-2.10.patch b/glicid/packages/patches/glicid-zabbix-timescaledb-2.10.patch new file mode 100644 index 0000000..132afe7 --- /dev/null +++ b/glicid/packages/patches/glicid-zabbix-timescaledb-2.10.patch @@ -0,0 +1,27 @@ +From 2ba64970de034357f22dd5f0fca0e588f4060fcd Mon Sep 17 00:00:00 2001 +From: JEAN-FRANCOIS GUILLAUME +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 + From 61331cfd509b50ef450318d4a8f9f7cb78c2b67a Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Fri, 3 Mar 2023 11:58:20 +0100 Subject: [PATCH 17/23] chronyd --- glicid/services/ntp.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/glicid/services/ntp.scm b/glicid/services/ntp.scm index 93ec8f6..c8c9341 100644 --- a/glicid/services/ntp.scm +++ b/glicid/services/ntp.scm @@ -79,9 +79,8 @@ (define %chronyd-activation #~(begin - (unless (file-exists? "/etc/chrony/chrony.keys") - (mkdir-p "/etc/chrony") - (touch "/etc/chrony/chrony.keys")) + (mkdir-p "/etc/chrony") + (touch "/etc/chrony/chrony.keys") (mkdir-p "/var/run/chrony") (mkdir-p "/var/lib/chrony") (mkdir-p "/var/log/chrony") From d9ef437f0be7fffd4ce8b0df303dc70e2dc421f0 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Fri, 3 Mar 2023 12:23:40 +0100 Subject: [PATCH 18/23] chronyd --- glicid/services/ntp.scm | 2 -- 1 file changed, 2 deletions(-) diff --git a/glicid/services/ntp.scm b/glicid/services/ntp.scm index c8c9341..fb5799a 100644 --- a/glicid/services/ntp.scm +++ b/glicid/services/ntp.scm @@ -79,8 +79,6 @@ (define %chronyd-activation #~(begin - (mkdir-p "/etc/chrony") - (touch "/etc/chrony/chrony.keys") (mkdir-p "/var/run/chrony") (mkdir-p "/var/lib/chrony") (mkdir-p "/var/log/chrony") From 947ddd8a1c85417def7860c462e49d29773b71f7 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Fri, 3 Mar 2023 15:44:56 +0100 Subject: [PATCH 19/23] backporting old php version for zabbix --- .../packages/patches/php-bug-74093-test.patch | 48 +++ glicid/packages/patches/php-curl-compat.patch | 17 + glicid/packages/php.scm | 386 ++++++++++++++++++ 3 files changed, 451 insertions(+) create mode 100644 glicid/packages/patches/php-bug-74093-test.patch create mode 100644 glicid/packages/patches/php-curl-compat.patch create mode 100644 glicid/packages/php.scm diff --git a/glicid/packages/patches/php-bug-74093-test.patch b/glicid/packages/patches/php-bug-74093-test.patch new file mode 100644 index 0000000..07b1949 --- /dev/null +++ b/glicid/packages/patches/php-bug-74093-test.patch @@ -0,0 +1,48 @@ +From c641825c64e42627a2c9cac969b371ed532e0b57 Mon Sep 17 00:00:00 2001 +From: Ryan Sundberg +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-- + + --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 diff --git a/glicid/packages/patches/php-curl-compat.patch b/glicid/packages/patches/php-curl-compat.patch new file mode 100644 index 0000000..0617251 --- /dev/null +++ b/glicid/packages/patches/php-curl-compat.patch @@ -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) diff --git a/glicid/packages/php.scm b/glicid/packages/php.scm new file mode 100644 index 0000000..63f5bb8 --- /dev/null +++ b/glicid/packages/php.scm @@ -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") + ;; PHP’s 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 From d8629ef1b93a2786da5e5636f265e5bbabdf7a26 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Wed, 8 Mar 2023 10:05:14 +0100 Subject: [PATCH 20/23] adding account as deps --- glicid/services/ntp.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/glicid/services/ntp.scm b/glicid/services/ntp.scm index fb5799a..705508d 100644 --- a/glicid/services/ntp.scm +++ b/glicid/services/ntp.scm @@ -93,5 +93,7 @@ (name 'chronyd) (extensions (list (service-extension shepherd-root-service-type chronyd-shepherd-service) - (service-extension activation-service-type (const %chronyd-activation)))) + (service-extension activation-service-type (const %chronyd-activation)) + (service-extension account-service-type (const %chrony-accounts)) + )) (description "Run chronyd."))) From 74a4937910c53643e4908fc873dc4bd6a6196c9f Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Thu, 9 Mar 2023 15:47:04 +0100 Subject: [PATCH 21/23] updating to 6.0.14 --- glicid/packages/monitoring.scm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/glicid/packages/monitoring.scm b/glicid/packages/monitoring.scm index 0b5bc16..7f25297 100644 --- a/glicid/packages/monitoring.scm +++ b/glicid/packages/monitoring.scm @@ -8,12 +8,12 @@ (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")) + (sha256 (base32 "0n6fqa9vbhh2syxii7ds2x6dnplrgrj98by1zl0ij1wfbnbxa6k3")) (patches (search-patches "glicid/packages/patches/glicid-zabbix-timescaledb-2.10.patch")) (modules '((guix build utils))) (snippet @@ -24,12 +24,12 @@ (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")) + (sha256 (base32 "0n6fqa9vbhh2syxii7ds2x6dnplrgrj98by1zl0ij1wfbnbxa6k3")) (patches (search-patches "glicid/packages/patches/glicid-zabbix-timescaledb-2.10.patch")) (modules '((guix build utils))) (snippet @@ -40,15 +40,14 @@ (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")) + (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") (("/usr/sbin/fping6?") "/run/setuid-programs/fping"))))))) - From 562156e951528ce333b5a017a65b448e3951b924 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Thu, 23 Mar 2023 17:42:19 +0100 Subject: [PATCH 22/23] adding nginx-module-vts --- glicid/packages/nginx.scm | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/glicid/packages/nginx.scm b/glicid/packages/nginx.scm index 4b953e6..a148f7c 100644 --- a/glicid/packages/nginx.scm +++ b/glicid/packages/nginx.scm @@ -88,7 +88,7 @@ (inherit nginx) (name "nginx-ldap-auth-module") (version "83c059b") - (source (origin + (source (origin (method url-fetch) (uri (list (string-append "https://github.com/kvspb/nginx-auth-ldap/archive/" version ".tar.gz"))) (sha256 (base32 "0r44dhsbw2ssg84vc5i68zdnhd0131nkbkbmxq7rpq9avddlw339")))) @@ -252,3 +252,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))))))) From 9915561cc3a06f48b7c270550f0651e66c6f1b27 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Fri, 24 Mar 2023 12:30:46 +0100 Subject: [PATCH 23/23] updating nginx --- glicid/packages/nginx.scm | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/glicid/packages/nginx.scm b/glicid/packages/nginx.scm index a148f7c..49ec707 100644 --- a/glicid/packages/nginx.scm +++ b/glicid/packages/nginx.scm @@ -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))