From patchwork Mon Dec 5 21:52:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yarl baudig X-Patchwork-Id: 45066 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DA7CA27BBEB; Mon, 5 Dec 2022 21:53:55 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0149827BBE9 for ; Mon, 5 Dec 2022 21:53:51 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2JOj-0007hH-RD; Mon, 05 Dec 2022 16:53:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2JOY-0007fp-ME for guix-patches@gnu.org; Mon, 05 Dec 2022 16:53:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2JOY-0007WP-7Z for guix-patches@gnu.org; Mon, 05 Dec 2022 16:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2JOY-00020N-3B for guix-patches@gnu.org; Mon, 05 Dec 2022 16:53:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59845] [PATCH 1/4] gnu: php: Add '--enable-soap' configure option. References: <20221205214838.27594-1-yarl-baudig@mailoo.org> In-Reply-To: <20221205214838.27594-1-yarl-baudig@mailoo.org> Resent-From: Yarl Baudig Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Dec 2022 21:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59845 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59845@debbugs.gnu.org Cc: Yarl Baudig Received: via spool by 59845-submit@debbugs.gnu.org id=B59845.16702771617660 (code B ref 59845); Mon, 05 Dec 2022 21:53:02 +0000 Received: (at 59845) by debbugs.gnu.org; 5 Dec 2022 21:52:41 +0000 Received: from localhost ([127.0.0.1]:38605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2JOC-0001zU-Im for submit@debbugs.gnu.org; Mon, 05 Dec 2022 16:52:40 -0500 Received: from msg-2.mailo.com ([213.182.54.12]:48870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2JOA-0001zN-3x for 59845@debbugs.gnu.org; Mon, 05 Dec 2022 16:52:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1670277150; bh=/31NdDKlYYpCyrZkfWVXtXeiDHERJ5SLenZmnohIC/o=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding; b=PYHQYh57kUD/FJH+YzTmQb6xDtR+JSmHxG2lLrXZvwoxBlHQYQh1kQ6uUZ+Q522Wk Gh6JIjfseRlzj8d89tb34vmulIw/2NmImiIjbRYP0lpJjJxRxS55D4u4eJE5lozOId NM0yqTbj1aS7NGE3C8pIST/seolIgU5VXtSPVaEc= Received: by b-3.in.mailobj.net [192.168.90.13] with ESMTP via ip-206.mailobj.net [213.182.55.206] Mon, 5 Dec 2022 22:52:30 +0100 (CET) X-EA-Auth: uvjxVw+Ryf0zl6zijgqzFHJeWxH73zlvynBSklBV7Knjxbivy/QPHdMyW2XRQG3pJZ8rw7fv6pDIspLLyXpo4x4+tVd7x0pkP3f7O9syEQQ= From: Yarl Baudig Date: Mon, 5 Dec 2022 22:52:21 +0100 Message-Id: <20221205215224.27623-1-yarl-baudig@mailoo.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/php.scm: Add '--enable-soap' configure option. --- gnu/packages/php.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm index 645a8edee1..9bc4af5092 100644 --- a/gnu/packages/php.scm +++ b/gnu/packages/php.scm @@ -134,7 +134,8 @@ (define-public php "--enable-intl" "--enable-mbstring" "--enable-pcntl" - "--enable-sockets")) + "--enable-sockets" + "--enable-soap")) #:phases (modify-phases %standard-phases (add-after 'unpack 'do-not-record-build-flags From patchwork Mon Dec 5 21:52:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: yarl baudig X-Patchwork-Id: 45064 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 59F5C27BBEC; Mon, 5 Dec 2022 21:53:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2F66627BBE9 for ; Mon, 5 Dec 2022 21:53:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2JOg-0007gS-4r; Mon, 05 Dec 2022 16:53:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2JOY-0007fq-R0 for guix-patches@gnu.org; Mon, 05 Dec 2022 16:53:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2JOY-0007WT-JH for guix-patches@gnu.org; Mon, 05 Dec 2022 16:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2JOY-00020U-Ei for guix-patches@gnu.org; Mon, 05 Dec 2022 16:53:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59845] [PATCH 2/4] gnu: Add PMB. Resent-From: Yarl Baudig Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Dec 2022 21:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59845 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59845@debbugs.gnu.org Cc: Yarl Baudig Received: via spool by 59845-submit@debbugs.gnu.org id=B59845.16702771687673 (code B ref 59845); Mon, 05 Dec 2022 21:53:02 +0000 Received: (at 59845) by debbugs.gnu.org; 5 Dec 2022 21:52:48 +0000 Received: from localhost ([127.0.0.1]:38609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2JOJ-0001zh-TV for submit@debbugs.gnu.org; Mon, 05 Dec 2022 16:52:48 -0500 Received: from msg-4.mailo.com ([213.182.54.15]:37468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2JOH-0001zT-LB for 59845@debbugs.gnu.org; Mon, 05 Dec 2022 16:52:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1670277159; bh=FUmbx6PuRW1BRm/SXot6iIWIURqUHgXqWXgcVbCxwX8=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=i94xdaOu3HOKF+civgn8XSJH8u4ay7BUSx4hkxyUFRPIAugBBLTF3eC7Wg0kE/8rX H7P2E1fAdL9bPKboQ8mgmam4uljzmiC9/2+SCtb/IjXlLyZKSnDVbxOmJH41qjL7Vl 7+M/D1mRdYPH/UWL+nqBL3yc4gdmyKy8JGLlQVxE= Received: by b-3.in.mailobj.net [192.168.90.13] with ESMTP via ip-206.mailobj.net [213.182.55.206] Mon, 5 Dec 2022 22:52:39 +0100 (CET) X-EA-Auth: seJRaDI/p6nn/eCEpNc1AQbkVx1BS8XM40aN+5dGW0QVEjIRp8aTFXIBaDPPIkzMnKdLvvK1uXIc/OmUFk73/kYI2/zhzfeyqXAeXAFjkpE= From: Yarl Baudig Date: Mon, 5 Dec 2022 22:52:22 +0100 Message-Id: <20221205215224.27623-2-yarl-baudig@mailoo.org> In-Reply-To: <20221205215224.27623-1-yarl-baudig@mailoo.org> References: <20221205215224.27623-1-yarl-baudig@mailoo.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/ils.scm: New file. * gnu/local.mk: Add it. --- gnu/local.mk | 1 + gnu/packages/ils.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 gnu/packages/ils.scm diff --git a/gnu/local.mk b/gnu/local.mk index 1bfbe28bde..ff0c86584a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -323,6 +323,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/icu4c.scm \ %D%/packages/idris.scm \ %D%/packages/idutils.scm \ + %D%/packages/ils.scm \ %D%/packages/image.scm \ %D%/packages/image-processing.scm \ %D%/packages/image-viewers.scm \ diff --git a/gnu/packages/ils.scm b/gnu/packages/ils.scm new file mode 100644 index 0000000000..3f3eb0705a --- /dev/null +++ b/gnu/packages/ils.scm @@ -0,0 +1,61 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Yarl Baudig +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages ils) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system copy) + #:use-module (guix licenses) + #:use-module (gnu packages gawk) + #:use-module (gnu packages compression) + #:use-module (gnu packages php) + #:use-module (gnu packages perl)) + +;;; Commentary +;;; +;;; Integrated Library Systems packages. +;;; +;;; Code + +(define-public pmb + (package + (name "pmb") + (version "7.4.6") + (source (origin + (method url-fetch) + (uri + (string-append + "https://forge.sigb.net/attachments/download/3968/pmb" + version + ".zip")) + (sha256 + (base32 + "0ana1w8d60n2gznhh1zyjdld4xi4p2pm2hc05m8n7fh2bvlmw0cr")))) + (build-system copy-build-system) + (arguments '(#:install-plan '(("." "share/http/pmb")))) + (native-inputs (list unzip)) + (propagated-inputs (list php perl)) + (synopsis "Integrated Library System") + (description "PMB is an Integrated Library System for librarians, documentalists and +information managers. + +This contains only the PMB archive (html, php and css files), you will need a web +server, php and a SQL database server. See the guix pmb service.") + (home-page "https://www.sigb.net") + (license cecill))) + From patchwork Mon Dec 5 21:52:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: yarl baudig X-Patchwork-Id: 45065 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 644E027BBEC; Mon, 5 Dec 2022 21:53:44 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2897927BBEB for ; Mon, 5 Dec 2022 21:53:43 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2JOh-0007gY-IW; Mon, 05 Dec 2022 16:53:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2JOZ-0007fr-6n for guix-patches@gnu.org; Mon, 05 Dec 2022 16:53:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2JOY-0007WZ-Ut for guix-patches@gnu.org; Mon, 05 Dec 2022 16:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2JOY-00020b-QO for guix-patches@gnu.org; Mon, 05 Dec 2022 16:53:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59845] [PATCH 3/4] gnu: Add PMB service. Resent-From: Yarl Baudig Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Dec 2022 21:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59845 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59845@debbugs.gnu.org Cc: Yarl Baudig Received: via spool by 59845-submit@debbugs.gnu.org id=B59845.16702771747688 (code B ref 59845); Mon, 05 Dec 2022 21:53:02 +0000 Received: (at 59845) by debbugs.gnu.org; 5 Dec 2022 21:52:54 +0000 Received: from localhost ([127.0.0.1]:38612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2JOQ-0001zw-Bi for submit@debbugs.gnu.org; Mon, 05 Dec 2022 16:52:54 -0500 Received: from msg-1.mailo.com ([213.182.54.11]:38518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2JOO-0001zg-9m for 59845@debbugs.gnu.org; Mon, 05 Dec 2022 16:52:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1670277166; bh=HKpuFhMhREohhrTOp+i8Av3SPEv92DCHmUfmr82MduA=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=HmbJJwNlJMXDEPUBAGXqhMU4Xiut2XLzKquyLrDLRe+1zri/wMcApY3phsj21eFp6 A58w8IAqyc7Zy/x4umc2Qg0x0OFzKLCwUjBtLPyFA7Du9BNkGzUIp4QefpKvMCRsik I4Hle5IJdBBvqoYdSqDfGIBleKHsLt1Ivq+2BB8s= Received: by b-3.in.mailobj.net [192.168.90.13] with ESMTP via ip-206.mailobj.net [213.182.55.206] Mon, 5 Dec 2022 22:52:46 +0100 (CET) X-EA-Auth: Ni86JNYfk7hMo+86O3UFhTMfP3d27JYjZ8hKXi7y0iKzLnGxPTqi/RlQXnreYoW8ICvRh2A49lPr2ql1iFZ/YaNeRMqIpG1HUc4ykVr7irQ= From: Yarl Baudig Date: Mon, 5 Dec 2022 22:52:23 +0100 Message-Id: <20221205215224.27623-3-yarl-baudig@mailoo.org> In-Reply-To: <20221205215224.27623-1-yarl-baudig@mailoo.org> References: <20221205215224.27623-1-yarl-baudig@mailoo.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/ils.scm: New file. * gnu/local.mk: Add it. --- gnu/local.mk | 1 + gnu/services/ils.scm | 128 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 gnu/services/ils.scm diff --git a/gnu/local.mk b/gnu/local.mk index ff0c86584a..16de11e31e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -670,6 +670,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/getmail.scm \ %D%/services/guix.scm \ %D%/services/hurd.scm \ + %D%/services/ils.scm \ %D%/services/kerberos.scm \ %D%/services/lightdm.scm \ %D%/services/linux.scm \ diff --git a/gnu/services/ils.scm b/gnu/services/ils.scm new file mode 100644 index 0000000000..16c0dbab22 --- /dev/null +++ b/gnu/services/ils.scm @@ -0,0 +1,128 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Yarl Baudig +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services ils) + #:use-module (gnu services) + #:use-module (gnu services web) + #:use-module (gnu packages ils) + #:use-module (guix records) + #:use-module (guix utils) + #:use-module (guix gexp) + #:use-module (ice-9 match) + #:use-module (ice-9 format) + #:export (pmb-configuration + pmb-service-type + %default-nginx-pmb-location + %default-pmb-php-fpm-configuration + %default-pmb-mysql-configuration-extra-content)) + +;;; Commentary +;;; +;;; Integrated Library Systems services. +;;; +;;; Code + +(define %default-nginx-pmb-location + (let ((base (nginx-php-location))) + (nginx-location-configuration + (inherit base) + (body (cons + "fastcgi_read_timeout 300;" + (nginx-location-configuration-body base)))))) + +(define %default-pmb-php-fpm-configuration + "expose_php=off +max_execution_time=300 +max_input_vars=50000 +memory_limit=256M +post_max_size=64M +upload_max_filesize=64M +date.timezone=Europe/Paris") + +(define %default-pmb-mysql-configuration-extra-content + "[server] +sql_mode=NO_AUTO_CREATE_USER +collation_server=utf8_unicode_ci +key_buffer_size=1000001536 +join_buffer_size=4000000") + +(define-record-type* + pmb-configuration make-pmb-configuration + pmb-configuration? + (pmb pmb-configuration-pmb (default pmb)) + (http-directory pmb-configuration-http-directory + (default "/srv/http/pmb")) + (php-fpm-user pmb-configuration-php-fpm-user + (default "php-fpm")) + (php-fpm-group pmb-configuration-php-fpm-group + (default "php-fpm"))) + +(define (pmb-activation config) + (match-record + config + + (pmb http-directory php-fpm-user php-fpm-group) + #~(begin + (use-modules (guix build utils)) + (use-modules (ice-9 ftw)) + (format #t "Copying pmb '~a' to http directory '~a'~%" + (string-append #$pmb "/share/http/pmb") + #$http-directory) + (mkdir-p #$http-directory) + ;; Please be quiet + (call-with-output-file "/dev/null" + (lambda (port) + (with-output-to-port port + (lambda () + (copy-recursively (string-append #$pmb "/share/http/pmb") + #$http-directory))))) + (define (enter? name stat result) + #t) + (define (lchown obj) + (let ((user (getpwnam #$php-fpm-user)) + (group (getgrnam #$php-fpm-group))) + (chown obj (passwd:uid user) (group:gid group)))) + (define (leaf name stat result) + (lchown name) + result) + (define (down name stat result) + (lchown name) + result) + (define (up name stat result) result) + (define (skip name stat result) result) + (define (error name stat errno result) + (warning (G_ "~a: ~a~%") + name (strerror errno)) + result) + (file-system-fold enter? leaf down up skip error '() #$http-directory) + ;; Those are to hide installation files on a re-activation + (if + (file-exists? (string-append #$http-directory "/tables/noinstall.php")) + (delete-file (string-append #$http-directory "/tables/install.php"))) + (if + (file-exists? (string-append #$http-directory "/tables/noinstall_rep.php")) + (delete-file (string-append #$http-directory "/tables/install_rep.php")))))) + +(define pmb-service-type + (service-type + (name 'guix) + (extensions + (list (service-extension activation-service-type + pmb-activation))) + (default-value (pmb-configuration)) + (description "Install the pmb Integrated Library System"))) From patchwork Mon Dec 5 21:52:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yarl baudig X-Patchwork-Id: 45067 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6933027BBE9; Mon, 5 Dec 2022 21:53:56 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0ABD827BBEC for ; Mon, 5 Dec 2022 21:53:52 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2JOk-0007hM-H2; Mon, 05 Dec 2022 16:53:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2JOZ-0007g2-QA for guix-patches@gnu.org; Mon, 05 Dec 2022 16:53:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2JOZ-0007We-ID for guix-patches@gnu.org; Mon, 05 Dec 2022 16:53:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2JOZ-00020i-9E for guix-patches@gnu.org; Mon, 05 Dec 2022 16:53:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59845] [PATCH 4/4] doc: Add Integrated Library System section. Resent-From: Yarl Baudig Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Dec 2022 21:53:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59845 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59845@debbugs.gnu.org Cc: Yarl Baudig Received: via spool by 59845-submit@debbugs.gnu.org id=B59845.16702771787701 (code B ref 59845); Mon, 05 Dec 2022 21:53:03 +0000 Received: (at 59845) by debbugs.gnu.org; 5 Dec 2022 21:52:58 +0000 Received: from localhost ([127.0.0.1]:38615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2JOT-000209-Rb for submit@debbugs.gnu.org; Mon, 05 Dec 2022 16:52:58 -0500 Received: from msg-2.mailo.com ([213.182.54.12]:48886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2JOR-0001zo-Nr for 59845@debbugs.gnu.org; Mon, 05 Dec 2022 16:52:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1670277170; bh=QnhvS1kLbUsmlEpdchGwjtB2jd+/hfj+IT/w5NeGz9A=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=d9a+2AglYU3tFPgIKrcXbffdhBYGGUJLSOnKPZ8+17+JdFoCh3m2oUKyWrfuuIy1j UCKFw+rMZv8DkiE6+DuKngwnL8yhJEmwO9pDXX1xHx7QAByVJtsX1tBSwcjnKVmb4o d0h/+72Q29Teb4VDCyQd+v9tClWE96k8eFhbU/Qs= Received: by b-3.in.mailobj.net [192.168.90.13] with ESMTP via ip-206.mailobj.net [213.182.55.206] Mon, 5 Dec 2022 22:52:50 +0100 (CET) X-EA-Auth: f41oaE/t42JDNDVB/zCClgmWQIkxRrjag2/peuq5tTgqpXSxQLqpUo1B8Z+RzxbrsbZ0L1UOe8kM5Q8pSKEQcG0C498OqA0v+AAjklat52M= From: Yarl Baudig Date: Mon, 5 Dec 2022 22:52:24 +0100 Message-Id: <20221205215224.27623-4-yarl-baudig@mailoo.org> In-Reply-To: <20221205215224.27623-1-yarl-baudig@mailoo.org> References: <20221205215224.27623-1-yarl-baudig@mailoo.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches doc/guix.texi (System Configuration, Services): Add Integrated Library System Services section. doc/guix.texi (System Configuration, Services, Integrated Library System Services): Add PMB. --- doc/guix.texi | 128 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 127 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index a79b777826..5ec72f9ce7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -109,6 +109,7 @@ Copyright @copyright{} 2022 Reily Siegel@* Copyright @copyright{} 2022 Simon Streit@* Copyright @copyright{} 2022 (@* Copyright @copyright{} 2022 John Kehayias@* +Copyright @copyright{} 2022 Yarl Baudig Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -402,6 +403,7 @@ Services * Guix Services:: Services relating specifically to Guix. * Linux Services:: Services tied to the Linux kernel. * Hurd Services:: Services specific for a Hurd System. +* Integrated Library System Services:: ILS services. * Miscellaneous Services:: Other services. Defining Services @@ -17720,6 +17722,7 @@ declaration. * Guix Services:: Services relating specifically to Guix. * Linux Services:: Services tied to the Linux kernel. * Hurd Services:: Services specific for a Hurd System. +* Integrated Library System Services:: ILS services. * Miscellaneous Services:: Other services. @end menu @@ -36726,6 +36729,129 @@ An integer specifying the baud rate of the tty. @end table @end deftp +@node Integrated Library System Services +@subsection Integrated Library System Services + +@cindex PMB Service +@subsubheading PMB Service + +@defvr {Scheme Variable} pmb-service-type +Service type for the @uref{https://www.sigb.net/,PMB} Integrated Library System. +The value for this service type is a @code{} record. + +The PMB service needs a web server, @code{mariadb}/@code{mysql}, @code{php} and +is only responsible for copying and changing ownership of files from the +@code{pmb} package. +@end defvr + +Let's start with a demonstration. Here is a sample system configuration (@file{pmb.scm}): + +@lisp +(use-modules (gnu)) +(use-service-modules ils web networking databases) +(use-package-modules databases) + +(operating-system + (host-name "pmb") + (timezone "Europe/Paris") + (file-systems (cons (file-system + (device (file-system-label "does-not-matter")) + (mount-point "/") + (type "ext4")) + %base-file-systems)) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (targets '("/dev/sdX")))) + (packages (cons* mariadb %base-packages)) + (services + (cons* (service dhcp-client-service-type) + (service php-fpm-service-type + (php-fpm-configuration + (php-ini-file + (plain-file "php.ini" + %default-pmb-php-fpm-configuration)))) + (service nginx-service-type + (nginx-configuration + (server-blocks + (list (nginx-server-configuration + (locations + (list + %default-nginx-pmb-location)) + (listen '("localhost:8080")) + (root "/srv/http/pmb") + (index '("index.php"))))))) + (service mysql-service-type + (mysql-configuration + (extra-content + %default-pmb-mysql-configuration-extra-content))) + (service pmb-service-type) + %base-services))) +@end lisp + +The interesting points are as follows. +We import the @code{mariadb} package so that we will have access to the program +@command{mysql}. This will be useful to set the password of the database's +administrator. We declare a @code{php-fpm} service whose @file{php.ini} file +is set to @code{%default-pmb-php-fpm-configuration}. +The @code{NGinx} service is declared, with a location set to +@code{%default-nginx-pmb-location} and a root set to @file{/srv/http/pmb}, which +is the default for the @code{http-directory} field of @code{}. +The @code{mysql} service is declared with an @code{extra-content} to its configuration: +@code{default-pmb-mysql-configuration-extra-content}. Finally the pmb service. + +Now let's run @command{guix system container -N pmb.scm} (@pxref{Invoking guix system}). +Run the resulting @file{/gnu/store/...run-container}. +Note that we want to keep the state of the database and the php files (because during +the application setup (see below), the php files will be slightly modified. That is also why +the PMB files need to be copied (and chowned) outside the store), we need to create +two folders, say @file{/mnt/data/pmb} and @file{/mnt/data/mysql} and pass @option{--share} +two times. @command{nsenter} into it to set the database's administrator password. + +@example +# mkdir /mnt/data/mysql /mnt/data/pmb +# /gnu/store/...run-container --share=/mnt/data/pmb=/srv/http/pmb \ +--share=/mnt/data/mysql=/var/lib/mysql +# nsenter -a -t +# mysql +> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('guixisgreat'); +@end example + +Go to @uref{localhost:8080}. Follow the steps. Note that for the database server parameters, +``localhost'' won't work, it's ``127.0.0.1'' and the user is ``root''. +Once the installation is complete, you are redirected to the login page. The name is ``admin'', +the password is ``admin''. + +Now lets detail fields. + +@defvr {Scheme Variable} %default-pmb-php-fpm-configuration +This is meant to represent the content of @file{php.ini} for the +@code{php-fpm} service for a recommended configuration. +@end defvr + +@defvr {Scheme Variable} %default-pmb-mysql-configuration-extra-content +Extra content to be added to @code{mariadb}/@code{mysql} configuration for recommended configuration. +@end defvr + +@defvr {Scheme Variable} %default-nginx-pmb-location +Location for nginx based on @code{nginx-php-location}. +@end defvr + +@deftp {Data Type} pmb-configuration +This data type represents the configuration for PMB. + +@table @asis +@item @code{pmb} (default: @code{pmb}) + +@item @code{http-directory} (default: @file{/srv/http/pmb}) +Must match a webserver's root. + +@item @code{php-fpm-user} (default: @code{php-fpm}) + +@item @code{php-fpm-group} (default: @code{php-fpm}) + +@end table +@end deftp + @node Miscellaneous Services @subsection Miscellaneous Services @@ -38369,7 +38495,7 @@ description: Install the given fonts on the specified ttys (fonts are per + tty/font pairs. The font can be the name of a font provided by the `kbd' + package or any valid argument to `setfont', as in this example: + -+ '(("tty1" . "LatGrkCyr-8x16") ++ 6 '(("tty1" . "LatGrkCyr-8x16") + ("tty2" . (file-append + font-tamzen + "/share/kbd/consolefonts/TamzenForPowerline10x20.psf"))