Ludovic Courtès <ludo@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 25 Dec 2022 17:26:37 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 25 12:26:37 2022 Received: from localhost ([127.0.0.1]:50072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p9Ulg-0007IA-QU for submit <at> debbugs.gnu.org; Sun, 25 Dec 2022 12:26:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1p9Ule-0007Ht-Lr for 59845 <at> debbugs.gnu.org; Sun, 25 Dec 2022 12:26:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1p9UlY-0004mI-4g; Sun, 25 Dec 2022 12:26:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=qd1m0avPh08yeNWkGmjTv71KCAQ0sxMgDzqbO0S+/Yk=; b=U2U9UStT+eECxOfZAch4 wge/FWj2SQqDDF0y7LoJiHlh8zPUEx6S7gIOjF4tBmicpH88nAejVFQYitORJlvPRU2B6sDTwEiq5 Gyoph5uA+BsdHOhEwDm5lDr4xlFEGkAS44Tt7rI/REqAxVgWQ3CPqYf6GZTe5CV7hrtxfbXqtj0h3 paeXJkx8M8BLHQYO6iztdcnpDCHZbXv3kTMK1Iku0wwFTrTgnNOZfDgNhIj+MGatzyxTnOcEk6PxE RJr9qi2qSzv+3KfGZ3LnYRSVkMiFuQO6Jvmbbjsq1J5/LCsya+v2cp18y3h2YadOUJj2LB5a+f4g7 jpP9mLMTbtDKcw==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1p9UlX-0001Zq-Fo; Sun, 25 Dec 2022 12:26:27 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: "yarl baudig" <yarl-baudig@HIDDEN> Subject: Re: bug#59845: [PATCH 0/4] Add PMB (Integrated Library System) References: <ea-mime-63a56432-4d4d-141e6f09@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 5 =?utf-8?Q?Niv=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Chien X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 25 Dec 2022 18:26:25 +0100 In-Reply-To: <ea-mime-63a56432-4d4d-141e6f09@HIDDEN> (yarl baudig's message of "Fri, 23 Dec 2022 09:17:54 +0100 (CET)") Message-ID: <87pmc7wg1q.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59845 Cc: Julien Lepiller <julien@HIDDEN>, 59845 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, "yarl baudig" <yarl-baudig@HIDDEN> skribis: >> > >> > Now, I see one solution to avoid the copy (and the chown), apart from = the=20 >> very first activation. That's keeping even more state into http-director= y :=20 >> for example a file ".version" with the hash of the pmb package used insi= de.=20 >> That way we know if there's really an upgrade. What do you think? >>=20 >> It sounds like it=E2=80=99s going a bit far in terms of complexity. >>=20 >> Why do we need to copy these files every time? Do they actually have to >> be writable? If not, whatever this copying step is doing could be done >> in a =E2=80=98computed-file=E2=80=99. >>=20 >> Does that make sense? >>=20 > > Hmm no, not really. Yes it has to be writable for the interactive initial= ization through web browser to take place. At least two operations take pla= ce there that need RW : > 1/ renaming of both install.php and install_req.php. > 2/ saving into a file the url and credentials for connexion to the databa= se. Credentials have to be handled out-of-band anyway (keep in mind that /gnu/store is world-readable so in general we cannot have password in transit via the store). > There is no _need_ to copy every time. I did like this in my first patchs= because it was _correct_ (I didn't think about efficiency then). > > That's why I am proposing the solution which copy only for the very fist = activation and for the first activation after a package upgrade (or downgra= de). > > I don't see how we could avoid this. I don't think it's a good idea to tr= y to avoid the interactive installation as it gives informations and option= s on the installation to the user. OK. > Why "computed-file"? Take it with a grain of salt because I still have an incomplete understanding of the initialization process of PMB. My thought was that, if there=E2=80=99s a =E2=80=9Ccomputation=E2=80=9D (co= pying files around, renaming some) that can be done once and for all, then we could do that in =E2=80=98computed-file=E2=80=99. But what you=E2=80=99re saying, IIUC, = is that this is not done =E2=80=9Conce and for all=E2=80=9D. HTH, Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 23 Dec 2022 08:18:11 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 23 03:18:11 2022 Received: from localhost ([127.0.0.1]:36816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p8dFr-0004Ys-8M for submit <at> debbugs.gnu.org; Fri, 23 Dec 2022 03:18:11 -0500 Received: from msg-2.mailo.com ([213.182.54.12]:44438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yarl-baudig@HIDDEN>) id 1p8dFp-0004Yl-M8 for 59845 <at> debbugs.gnu.org; Fri, 23 Dec 2022 03:18:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1671783474; bh=8PPbU6az/lfjMeMOJiv8HocgIKenfuqhcxlXKf+rDBY=; h=X-EA-Auth:From:To:Cc:Date:Subject:MIME-Version:X-Mailer: Message-ID:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=l5RkciF5/MXR+krTKdIL1Sjs9S7rCeSJisiPve+4JDj2wJ7EkRywiaRKoQflx9hrd B7b+7LcalxAJioST0RplsRza1D67QQzgJI0J8IR/DY53AFIMNP2dsfs0NUB1B0Ij/T MTDeMVYKjoWpsLVFMvdBrSHrOKONndzoH+CUd2J0= Received: by www.mailo.com with http webmail; Fri, 23 Dec 2022 09:17:54 +0100 (CET) X-EA-Auth: WsxY16deJsJp4ePfs5wEA1G4ARW1/HRzRdPxEGq6omIvAxMh8YiZzYQ/dOILzSGLFRlAsJzFu5Z4L1l5+OWTU7Ta7aqLdVze From: "yarl baudig" <yarl-baudig@HIDDEN> To: ludo@HIDDEN Date: Fri, 23 Dec 2022 09:17:54 +0100 (CET) Subject: Re: bug#59845: [PATCH 0/4] Add PMB (Integrated Library System) X-Priority: 3 MIME-Version: 1.0 X-Mailer: COMS/EA22.05/r20221103 Message-ID: <ea-mime-63a56432-4d4d-141e6f09@HIDDEN> In-Reply-To: <87bknv12q3.fsf@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59845 Cc: Julien Lepiller <julien@HIDDEN>, 59845 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > > > > Now, I see one solution to avoid the copy (and the chown), apart from = the=20 > very first activation. That's keeping even more state into http-director= y :=20 > for example a file ".version" with the hash of the pmb package used insi= de.=20 > That way we know if there's really an upgrade. What do you think? >=20 > It sounds like it=E2=80=99s going a bit far in terms of complexity. >=20 > Why do we need to copy these files every time? Do they actually have to= > be writable? If not, whatever this copying step is doing could be done > in a =E2=80=98computed-file=E2=80=99. >=20 > Does that make sense? >=20 Hmm no, not really. Yes it has to be writable for the interactive initiali= zation through web browser to take place. At least two operations take plac= e there that need RW : 1/ renaming of both install.php and install_req.php. 2/ saving into a file the url and credentials for connexion to the databas= e. There is no _need_ to copy every time. I did like this in my first patchs = because it was _correct_ (I didn't think about efficiency then). That's why I am proposing the solution which copy only for the very fist a= ctivation and for the first activation after a package upgrade (or downgrad= e). I don't see how we could avoid this. I don't think it's a good idea to try= to avoid the interactive installation as it gives informations and options= on the installation to the user. Why "computed-file"?
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 22 Dec 2022 22:41:04 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 22 17:41:03 2022 Received: from localhost ([127.0.0.1]:36398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p8UFL-0006h6-F2 for submit <at> debbugs.gnu.org; Thu, 22 Dec 2022 17:41:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1p8UFJ-0006gV-8H for 59845 <at> debbugs.gnu.org; Thu, 22 Dec 2022 17:41:01 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1p8UFC-0006AM-Ap; Thu, 22 Dec 2022 17:40:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=cX6n84p8zWkjFTXMeXhf8dZg0hpvnBhFKu5otgASlEc=; b=FknUiNWRqnvHmuJFCyRr PV5KhApsT2RnGupnbNBE7abeolrneRlIx0pV4/QC0VGBshwk0SuDWGPUddbYoKtJGfO28Tf/QvEgo 3h7/GksSVxtmEfNWe4MsOKTMCrAC1FHwzb25OBkvKzgQuERY3fpJGoLV1Dpe4fRkiY86EW7Z9/7YI KEDVwqtOJrlnhyleok7/IpsPD97lNdA5tUXj/82qajBtAWsSJdRGYFwgdNZoW/Jam/yihhSrIYpde QVpIMnwTDY7d41jMnWDoAk6D1nC75BFoJ/bEgTPoXFDTxTqFd5IE3ruTeU6/T5dKWUu1QwhjnUBwL mqebdTRy4I0/bw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1p8UFB-0000VS-Or; Thu, 22 Dec 2022 17:40:54 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: "yarl baudig" <yarl-baudig@HIDDEN> Subject: Re: bug#59845: [PATCH 0/4] Add PMB (Integrated Library System) References: <ea-mime-63a49151-25d2-14de0e0e@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Duodi 2 =?utf-8?Q?Niv=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour de la Houille X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 22 Dec 2022 23:40:52 +0100 In-Reply-To: <ea-mime-63a49151-25d2-14de0e0e@HIDDEN> (yarl baudig's message of "Thu, 22 Dec 2022 18:18:09 +0100 (CET)") Message-ID: <87bknv12q3.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59845 Cc: Julien Lepiller <julien@HIDDEN>, 59845 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, (Cc: Julien who=E2=80=99s worked on PHP packaging before.) "yarl baudig" <yarl-baudig@HIDDEN> skribis: > I know there is a problem with this package/service. I feel I am sort of = breaking the functional paradigm. I also feel the package is "leaking" into= the service, because the package is completely useful by itself, I'm not e= ven talking about web server, PHP or MYSQL. The package is only a 'source' = for a service. If that makes sense. Hmm, I see what you mean. But maybe the same can be said of many (most?) PHP packages? >> > + ;; Those are to hide installation files on a re-activation >> > + (if >> > + (file-exists? (string-append #$http-directory=20 >> "/tables/noinstall.php")) >> > + (delete-file (string-append #$http-directory=20 >> "/tables/install.php"))) >> > + (if >> > + (file-exists? (string-append #$http-directory=20 >> "/tables/noinstall_rep.php")) >> > + (delete-file (string-append #$http-directory=20 >> "/tables/install_rep.php")))))) >>=20 >> Or just: >>=20 >> (false-if-exception (delete-file =E2=80=A6)) >>=20 > > That's not the same thing (check noinstall to remove install). Oops, my bad, sorry. > Indeed, after the first service installation, user interaction is > required, as explained in the manual : set up of database password > then (and that's the problematic part) initialization/configuration of > pmb through a web browser by running "install.php". So, you need > install.php. One time. This initialization takes care of (at least) > moving install.php to noinstall.php. Same logic for install_rep.php. > This is also the why of the snippet below (the copy), because the > application need to be in a read-write directory. The purpose of the > code above is only to differentiate between an installation and an > upgrade. The service keeps state of itself in http-directory, already > installed or not, here I break the functional paradigm? Or that's not > so bad as it's not a package but a service? That=E2=80=99s quite unusual, it would be nice for the comment to explain t= his. But it=E2=80=99s okay to do it this way; don=E2=80=99t fear the paradigm, i= t=E2=80=99s here to serve us, not the other way around. :-) >> > + #~(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=20 >> "/share/http/pmb") >> > + #$http-directory))))) >>=20 >> Do we really need to copy these files? >>=20 >> Keep in mind that activation snippets run each time you boot the system, >> and each time you reconfigure. It=E2=80=99s best to avoid doing too muc= h work >> there. >> > > Now, I see one solution to avoid the copy (and the chown), apart from the= very first activation. That's keeping even more state into http-directory = : for example a file ".version" with the hash of the pmb package used insid= e. That way we know if there's really an upgrade. What do you think? It sounds like it=E2=80=99s going a bit far in terms of complexity. Why do we need to copy these files every time? Do they actually have to be writable? If not, whatever this copying step is doing could be done in a =E2=80=98computed-file=E2=80=99. Does that make sense? Thanks, Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 22 Dec 2022 17:18:29 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 22 12:18:29 2022 Received: from localhost ([127.0.0.1]:36114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p8PDA-00017s-TO for submit <at> debbugs.gnu.org; Thu, 22 Dec 2022 12:18:29 -0500 Received: from msg-4.mailo.com ([213.182.54.15]:47152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yarl-baudig@HIDDEN>) id 1p8PD9-00017k-Hj for 59845 <at> debbugs.gnu.org; Thu, 22 Dec 2022 12:18:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1671729489; bh=0T9/XCF5sPpIJV41EyZz0s3yd14uPYYTBm/NKsb0VMw=; h=X-EA-Auth:From:To:Cc:Date:Subject:MIME-Version:X-Mailer: Message-ID:Content-Type:Content-Transfer-Encoding; b=TU41Pn06Yy4C9T7UqL4CZxL9GSfxHapxa1RNYoh8XfHa5aAkeC6TjbSwX5MX8rK3r YIpcDXVYNWfqAx/n6VwNNfmP1lW4ijhg/UkrSEIDyP9FXR92LgBs5fNh8M2bGra91t eVi5ghE0qyOmOVXXQqp8jz5t+0zP5wnRUE5ri+oo= Received: by www.mailo.com with http webmail; Thu, 22 Dec 2022 18:18:09 +0100 (CET) X-EA-Auth: dXYAp+wsFxnD6V+mKfDThiY6vvLQ/AQnZ5cVHLJBXi90oZEDqKrYjZevhLp0RNA/aS9DM6QiKRCwBYcrwYOwsB+XsEvL8oDH From: "yarl baudig" <yarl-baudig@HIDDEN> To: ludo@HIDDEN Date: Thu, 22 Dec 2022 18:18:09 +0100 (CET) Subject: Re: bug#59845: [PATCH 0/4] Add PMB (Integrated Library System) X-Priority: 3 MIME-Version: 1.0 X-Mailer: COMS/EA22.05/r20221103 Message-ID: <ea-mime-63a49151-25d2-14de0e0e@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59845 Cc: 59845 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Thank you for all your comments. I will rework this. I have some questions = if you will. I know there is a problem with this package/service. I feel I am sort of b= reaking the functional paradigm. I also feel the package is "leaking" into = the service, because the package is completely useful by itself, I'm not ev= en talking about web server, PHP or MYSQL. The package is only a 'source' f= or a service. If that makes sense. >=20 > > + ;; Those are to hide installation files on a re-activation > > + (if > > + (file-exists? (string-append #$http-directory=20 > "/tables/noinstall.php")) > > + (delete-file (string-append #$http-directory=20 > "/tables/install.php"))) > > + (if > > + (file-exists? (string-append #$http-directory=20 > "/tables/noinstall_rep.php")) > > + (delete-file (string-append #$http-directory=20 > "/tables/install_rep.php")))))) >=20 > Or just: >=20 > (false-if-exception (delete-file =E2=80=A6)) >=20 That's not the same thing (check noinstall to remove install). Indeed, aft= er the first service installation, user interaction is required, as explain= ed in the manual : set up of database password then (and that's the problem= atic part) initialization/configuration of pmb through a web browser by run= ning "install.php". So, you need install.php. One time. This initialization takes care of (at = least) moving install.php to noinstall.php. Same logic for install_rep.php.= This is also the why of the snippet below (the copy), because the applicat= ion need to be in a read-write directory. The purpose of the code above is only to differentiate between an installa= tion and an upgrade. The service keeps state of itself in http-directory, already installed or = not, here I break the functional paradigm? Or that's not so bad as it's not= a package but a service? > > + #~(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=20 > "/share/http/pmb") > > + #$http-directory))))) >=20 > Do we really need to copy these files? >=20 > Keep in mind that activation snippets run each time you boot the system,= > and each time you reconfigure. It=E2=80=99s best to avoid doing too muc= h work > there. > Now, I see one solution to avoid the copy (and the chown), apart from the = very first activation. That's keeping even more state into http-directory := for example a file ".version" with the hash of the pmb package used inside= . That way we know if there's really an upgrade. What do you think?
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 20 Dec 2022 15:13:28 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 20 10:13:28 2022 Received: from localhost ([127.0.0.1]:45425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p7eJ6-0005fW-1B for submit <at> debbugs.gnu.org; Tue, 20 Dec 2022 10:13:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1p7eJ4-0005fL-17 for 59845 <at> debbugs.gnu.org; Tue, 20 Dec 2022 10:13:26 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1p7eIy-0007pk-L5; Tue, 20 Dec 2022 10:13:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Gi22lJCLc3va2NcJI6jW57RCFx6KSLoBWuWDurWyHXs=; b=cUePXmf4SXQEBvGnH0zv BnB/wcBLqQ3iU4vOTYC76tVprPT0i3cqyxMTMP12ejZRZBuJEHSVSzrCLYOS+x33zTKqdsgIqzql+ PhgccyWyVRgoManEDwUiCnh9096UNeKBQsNly17LVCIyP1+mHdxHKOzM8+hOsK38wmITumE/CSfMC Did3HegZod/gR9/edEmWanROVMAHl+1CoES4cmNn0K4xMZpsrodZMQp0YR1zl7gt6dHNt+ZOtapty wc4Q2HCk4BixYPjhlScLbOmi42P2oPOkiD5lmvv9s+ZI3slq2C0xo7k+wn0bUTlB6hJKoo1hlwM34 Qh5ASebBinOO+Q==; Received: from [193.50.110.60] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1p7eIt-0004YR-Tt; Tue, 20 Dec 2022 10:13:20 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Yarl Baudig <yarl-baudig@HIDDEN> Subject: Re: bug#59845: [PATCH 0/4] Add PMB (Integrated Library System) References: <20221209115349.5821-1-yarl-baudig@HIDDEN> <20221209115349.5821-4-yarl-baudig@HIDDEN> Date: Tue, 20 Dec 2022 16:13:13 +0100 In-Reply-To: <20221209115349.5821-4-yarl-baudig@HIDDEN> (Yarl Baudig's message of "Fri, 9 Dec 2022 12:53:49 +0100") Message-ID: <87tu1q5cs6.fsf_-_@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59845 Cc: 59845 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Yarl Baudig <yarl-baudig@HIDDEN> skribis: > doc/guix.texi (System Configuration, Services): Add Integrated Library Sy= stem Services section. > doc/guix.texi (System Configuration, Services, Integrated Library System = Services): Add PMB. Neat! Note that this should go in the same commit that adds the service. Likewise, we also expect system tests for each new service. This should also come in the same commit. Here the system test would check that the web server is up and running and that PMB correctly responds to basic HTTP requests. See =E2=80=98gnu/tests=E2=80=99 for example and do not hesi= tate to ask on IRC if you have any questions. > +@node Integrated Library System Services > +@subsection Integrated Library System Services > + > +@cindex PMB Service > +@subsubheading PMB Service > + Please add a couple of introductory sentences to give context. > +@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{<pmb-configuration>} record. > + > +The PMB service needs a web server, @code{mariadb}/@code{mysql}, @code{p= hp} 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") I think we shouldn=E2=80=99t have to provide full OS declarations to illust= rate use of the service. But as I wrote in a previous message, it we can boil down configuration to (service pmb-service-type), then the example will be much more concise. > +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 Please leave two spaces after end-of-sentence periods (this gives a hint to Texinfo and to Emacs). > +Now let's run @command{guix system container -N pmb.scm} (@pxref{Invokin= g 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 (b= ecause during > +the application setup (see below), the php files will be slightly modifi= ed. That is also why > +the PMB files need to be copied (and chowned) outside the store), we nee= d to create > +two folders, say @file{/mnt/data/pmb} and @file{/mnt/data/mysql} and pas= s @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=3D/mnt/data/pmb=3D/srv/http/pmb \ > +--share=3D/mnt/data/mysql=3D/var/lib/mysql > +# nsenter -a -t <replace-with-pid> > +# mysql > +> SET PASSWORD FOR 'root'@'localhost' =3D PASSWORD('guixisgreat'); > +@end example Neat. We should clarify that this is in case one wants to run it in a container (there=E2=80=99s no obligation; one might want to run it on the b= are metal). WDYT? Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 20 Dec 2022 15:03:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 20 10:03:42 2022 Received: from localhost ([127.0.0.1]:45356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p7e9e-0005YW-7G for submit <at> debbugs.gnu.org; Tue, 20 Dec 2022 10:03:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1p7e9d-0005YO-EW for 59845 <at> debbugs.gnu.org; Tue, 20 Dec 2022 10:03:41 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1p7e9P-0005kk-LQ; Tue, 20 Dec 2022 10:03:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Ob4+M/dWbVo58HQCuFcTyyj7zFjUTJnWPtfPYidxWsg=; b=AtSMMTKgUYAL8PRgGaTB wuxaJkT4eqbznBAPVfvmeYvW801p4CK7WvM65m9FrhbZKZ60Zn0Ds8QVW9QTNECJnc6sK9nUG8Ra7 Ndl7SeamAGcuGU+cB7UzeEU47s67xVvDa9ZNIkGEfdRYcSI55di6bSVBjO5e0Oabjas27vCe1dNBc RPIGrB0p0EZiU6nARVoC/bv1zKB/jy5Av9hj5UXqHbbyP1NtNtx7LP/jYz+IuvHhTadbnyH+ts4pn CYRFs9Wj+p1PIp9LhpxFldXPif6GmJDhCBRYJeCmm788M5AVq6FRBaES2s+Sb8z8EXU6MxnYarA9C 79IY2hXjcs5MCQ==; Received: from [193.50.110.60] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1p7e9O-00036b-Fc; Tue, 20 Dec 2022 10:03:27 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Yarl Baudig <yarl-baudig@HIDDEN> Subject: Re: bug#59845: [PATCH 0/4] Add PMB (Integrated Library System) References: <20221209115349.5821-1-yarl-baudig@HIDDEN> <20221209115349.5821-3-yarl-baudig@HIDDEN> Date: Tue, 20 Dec 2022 16:03:24 +0100 In-Reply-To: <20221209115349.5821-3-yarl-baudig@HIDDEN> (Yarl Baudig's message of "Fri, 9 Dec 2022 12:53:48 +0100") Message-ID: <87359a6rsz.fsf_-_@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59845 Cc: 59845 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Yarl Baudig <yarl-baudig@HIDDEN> skribis: > * gnu/services/ils.scm: New file. > * gnu/local.mk: Add it. [...] > + #~(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))))) Do we really need to copy these files? Keep in mind that activation snippets run each time you boot the system, and each time you reconfigure. It=E2=80=99s best to avoid doing too much w= ork there. > + (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-dire= ctory) This can be simplified along these lines: (for-each lchown (find-files #$http-directory #:directories? #t)) But again, that=E2=80=99s a lot of I/O. > + ;; Those are to hide installation files on a re-activation > + (if > + (file-exists? (string-append #$http-directory "/tables/noinstal= l.php")) > + (delete-file (string-append #$http-directory "/tables/install.p= hp"))) > + (if > + (file-exists? (string-append #$http-directory "/tables/noinstal= l_rep.php")) > + (delete-file (string-append #$http-directory "/tables/install_r= ep.php")))))) Or just: (false-if-exception (delete-file =E2=80=A6)) > +(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"))) Should it extend =E2=80=98nginx-service-type=E2=80=99 with =E2=80=98%defaul= t-pmb-location=E2=80=99? Likewise, it looks like it=E2=80=99d be nice to extend =E2=80=98mysql-servi= ce-type=E2=80=99 with the extra config. That=E2=80=99s not currently possible but we should add = it. That way, adding (service pmb-service-type) is all it would take to get the service up and running.
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 20 Dec 2022 14:57:02 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 20 09:57:02 2022 Received: from localhost ([127.0.0.1]:45327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p7e3C-0005U5-C7 for submit <at> debbugs.gnu.org; Tue, 20 Dec 2022 09:57:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1p7e3A-0005Ti-09 for 59845 <at> debbugs.gnu.org; Tue, 20 Dec 2022 09:57:00 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1p7e34-0004kG-1l; Tue, 20 Dec 2022 09:56:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=YjZILnqMbJDcWWUy2IUpjFb+2n871yla2D/IL6OSgZs=; b=BtqcaVDAHM4WsyrNcZyw bmu9JWy2BA4VcCebUWq4x/FvWfG06hEN39xpTujBTlOc/cjj3tRXAB42xHC0iDN+ibEEc/Q6/ccvr Vb+pObdas1Kp/C4Mt242LgkW5ZBrwyVr9kgL0DDXVYtYqFsMBMtBD5X/ZeRJkiMNn+4mAwhORlIP5 ofB7JPCpdHL2mkXz6ciYfhANe00tKVwhZ+Y2gXFcc5P50Z/9MevAV+3HBpukNRr9z07+LjEYbANLI 2d6MnthIoqalppNnEpTYzMgrIF2XtsvqEC/2XpJfsyk9hK7ied7mLG5bsZ9cP7PV7ZN/2vcGpVZRf FE9bmlanZiVO6A==; Received: from [193.50.110.60] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1p7e31-00081v-1k; Tue, 20 Dec 2022 09:56:52 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Yarl Baudig <yarl-baudig@HIDDEN> Subject: Re: bug#59845: [PATCH 0/4] Add PMB (Integrated Library System) References: <20221209115349.5821-1-yarl-baudig@HIDDEN> <20221209115349.5821-2-yarl-baudig@HIDDEN> Date: Tue, 20 Dec 2022 15:56:49 +0100 In-Reply-To: <20221209115349.5821-2-yarl-baudig@HIDDEN> (Yarl Baudig's message of "Fri, 9 Dec 2022 12:53:47 +0100") Message-ID: <87a63i6s3y.fsf_-_@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59845 Cc: 59845 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi! Yarl Baudig <yarl-baudig@HIDDEN> skribis: > * gnu/packages/ils.scm: New file. > * gnu/local.mk: Add it. The gnu/packages changes LGTM and to qa.guix! Minor suggestions: > + (synopsis "Integrated Library System") Maybe =E2=80=9CIntegrated library system=E2=80=9D? > + (description "PMB is an Integrated Library System for librarians, do= cumentalists and =E2=80=A6 and =E2=80=9C@acronym{ILS, integrated library system}=E2=80=9D. > +information managers. > + > +This contains only the PMB archive (html, php and css files), you will n= eed a web > +server, php and a SQL database server. See the guix pmb service.") Please capitalize things: HTML, PHP, CSS. You can remove =E2=80=9CSee =E2= =80=A6=E2=80=9D at the end. Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 9 Dec 2022 11:54:23 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 09 06:54:23 2022 Received: from localhost ([127.0.0.1]:35564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p3bxP-0006oO-6F for submit <at> debbugs.gnu.org; Fri, 09 Dec 2022 06:54:23 -0500 Received: from msg-2.mailo.com ([213.182.54.12]:42010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yarl-baudig@HIDDEN>) id 1p3bxN-0006nu-NE for 59845 <at> debbugs.gnu.org; Fri, 09 Dec 2022 06:54:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1670586855; bh=6NHzOuOrErU1BzGbzy4R1HE/vt426QHHnI2V0ni/Bi8=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=UipttwcCgkr9J/PiM+Jz548toCeb85q36kqPGH6+FjdRv6/jCjtxu5i3GgSPWzAkh 9VoBUxjPbHoB+M1ISvjkRSRQSnRecZsFrb/BqCObBC8Ul1LbOYuKrCKCnTMdMQkaDJ jkhgdOrjaIZUn6YtsRV+5syemrScyqg2H5636GpQ= Received: by b-5.in.mailobj.net [192.168.90.15] with ESMTP via ip-206.mailobj.net [213.182.55.206] Fri, 9 Dec 2022 12:54:15 +0100 (CET) X-EA-Auth: QABgaujEkKdbKUqapKKVWdsuXRSj3Z5g7lPJBJgGDTmLxMv3L6y33OYstCCc4COu9yZn897e3o0mS/kfA4WQ4f5ZA5Kf1PfZKPC4a/QSGeA= From: Yarl Baudig <yarl-baudig@HIDDEN> To: 59845 <at> debbugs.gnu.org Subject: [PATCH v2 4/4] doc: Add Integrated Library System section. Date: Fri, 9 Dec 2022 12:53:49 +0100 Message-Id: <20221209115349.5821-4-yarl-baudig@HIDDEN> In-Reply-To: <20221209115349.5821-1-yarl-baudig@HIDDEN> References: <20221209115349.5821-1-yarl-baudig@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59845 Cc: Yarl Baudig <yarl-baudig@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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 | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index a79b777826..60f0072409 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,130 @@ 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{<pmb-configuration>} 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{<pmb-configuration>}. +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 <replace-with-pid> +# 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 -- 2.38.1
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 9 Dec 2022 11:54:21 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 09 06:54:21 2022 Received: from localhost ([127.0.0.1]:35561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p3bxM-0006oC-Ks for submit <at> debbugs.gnu.org; Fri, 09 Dec 2022 06:54:21 -0500 Received: from msg-1.mailo.com ([213.182.54.11]:38534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yarl-baudig@HIDDEN>) id 1p3bxK-0006nr-Ji for 59845 <at> debbugs.gnu.org; Fri, 09 Dec 2022 06:54:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1670586852; bh=4iuKjnwQq0cPi7skiLLE5eIZdJ0uoNcpeWJ2vYP062A=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=GRvUQBI/YVVAbXdPKelrsYXHm7MycsuRXYBNBfXidDTHWxnf/89NGxSMci4sXLBzz lH37P+gc7RbMzUmFK+CakG7VVl/siuihGgx/25EGE4go3NXg01M71K+RPzeksRqowD JuUKn9kodC5FlKUSYqIJvUBpyb5/NralFaWkTGCo= Received: by b-5.in.mailobj.net [192.168.90.15] with ESMTP via ip-206.mailobj.net [213.182.55.206] Fri, 9 Dec 2022 12:54:12 +0100 (CET) X-EA-Auth: fYWvL/PJ+hPZzreRTlZ2e92IxnQjNmoLEIvqGkVLBARcHfQc0+fb9BwbxRvnd/GdyADObajQSHm17BRVuk6sO1Ca/KB7gX7UzTYSQvhI7CM= From: Yarl Baudig <yarl-baudig@HIDDEN> To: 59845 <at> debbugs.gnu.org Subject: [PATCH v2 3/4] gnu: Add PMB service. Date: Fri, 9 Dec 2022 12:53:48 +0100 Message-Id: <20221209115349.5821-3-yarl-baudig@HIDDEN> In-Reply-To: <20221209115349.5821-1-yarl-baudig@HIDDEN> References: <20221209115349.5821-1-yarl-baudig@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59845 Cc: Yarl Baudig <yarl-baudig@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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..5a704d368b --- /dev/null +++ b/gnu/services/ils.scm @@ -0,0 +1,128 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Yarl Baudig <yarl-baudig@HIDDEN> +;;; +;;; 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 <http://www.gnu.org/licenses/>. + +(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> + 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-configuration> + (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"))) -- 2.38.1
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 9 Dec 2022 11:54:19 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 09 06:54:19 2022 Received: from localhost ([127.0.0.1]:35559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p3bxL-0006o0-1S for submit <at> debbugs.gnu.org; Fri, 09 Dec 2022 06:54:19 -0500 Received: from msg-4.mailo.com ([213.182.54.15]:40798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yarl-baudig@HIDDEN>) id 1p3bxI-0006nq-Tf for 59845 <at> debbugs.gnu.org; Fri, 09 Dec 2022 06:54:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1670586846; bh=PxHJlr0cvjUo/H4XaNnAS0JZXStk+HvgwyiVIqvOQcg=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=BBO21CDuvoDJPs0Nv5LJMKvx/tO6rE+tSpJRuwcdiVe0EQ4N464N/Ag1rOO33L4Hm wHH36nGcCVQd4EpJmJvT6JK9wmzxZHoQYkhc5ySX5auvNYuU/xqH37AOjukG46aOU8 2zcrE6ViXSwbqUFeiGSpATlC1U2NnC8FTLRP4j04= Received: by b-5.in.mailobj.net [192.168.90.15] with ESMTP via ip-206.mailobj.net [213.182.55.206] Fri, 9 Dec 2022 12:54:06 +0100 (CET) X-EA-Auth: dI2C18XlXmEUjNZfqE3qTZV4ETaT5Hf7CmALN/zOkNmf3dYjdFlKT1MXIsNlvgX6iDL6czJoXgSdp4X6XBX9UxVpM+3E2VjHFv7v4DUDyFY= From: Yarl Baudig <yarl-baudig@HIDDEN> To: 59845 <at> debbugs.gnu.org Subject: [PATCH v2 2/4] gnu: Add PMB. Date: Fri, 9 Dec 2022 12:53:47 +0100 Message-Id: <20221209115349.5821-2-yarl-baudig@HIDDEN> In-Reply-To: <20221209115349.5821-1-yarl-baudig@HIDDEN> References: <20221209115349.5821-1-yarl-baudig@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59845 Cc: Yarl Baudig <yarl-baudig@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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..61908b06b7 --- /dev/null +++ b/gnu/packages/ils.scm @@ -0,0 +1,61 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Yarl Baudig <yarl-baudig@HIDDEN> +;;; +;;; 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 <http://www.gnu.org/licenses/>. + +(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))) + -- 2.38.1
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 9 Dec 2022 11:54:06 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 09 06:54:06 2022 Received: from localhost ([127.0.0.1]:35554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p3bx7-0006ni-Pe for submit <at> debbugs.gnu.org; Fri, 09 Dec 2022 06:54:05 -0500 Received: from msg-4.mailo.com ([213.182.54.15]:40776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yarl-baudig@HIDDEN>) id 1p3bx5-0006nJ-0w for 59845 <at> debbugs.gnu.org; Fri, 09 Dec 2022 06:54:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1670586837; bh=kcNhFiEasVj/5zfnPHeh0dEjfptpqK0UAgMF3I9iXHI=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding; b=CqnxSOTa1IccMdDNlcLbDf/UALj64U6RgC51Y5jAQsdppOTKwBiwlRdYDaEi4idYX gshQ/WQcHRYaBl6pwROe5i1c7F0u9bIKwz2tZRY3rCvjWxEQjRM+Z1o+vO57LbB55j 7XCqrXf4AhXlcd/zbe+aeOBiQijSanpu/i4Birdg= Received: by b-5.in.mailobj.net [192.168.90.15] with ESMTP via ip-206.mailobj.net [213.182.55.206] Fri, 9 Dec 2022 12:53:56 +0100 (CET) X-EA-Auth: fgule2SAAxFBSDWUdqZSYWia3QI4hctu/Ed2YCzF1O+D/vrO09K91JnLqPZfXxILjn/vzws205/Sbz2Ff67rkajDO/vLDvdkAjMZ6kKVtOc= From: Yarl Baudig <yarl-baudig@HIDDEN> To: 59845 <at> debbugs.gnu.org Subject: [PATCH v2 1/4] gnu: php: Add '--enable-soap' configure option. Date: Fri, 9 Dec 2022 12:53:46 +0100 Message-Id: <20221209115349.5821-1-yarl-baudig@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59845 Cc: Yarl Baudig <yarl-baudig@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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..558f5c8521 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 base-commit: c3713d53e0bdf1186e08880b9e0ae6dd85f55fc4 -- 2.38.1
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 9 Dec 2022 11:52:58 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 09 06:52:58 2022 Received: from localhost ([127.0.0.1]:35547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p3bw2-0006mk-DH for submit <at> debbugs.gnu.org; Fri, 09 Dec 2022 06:52:58 -0500 Received: from msg-2.mailo.com ([213.182.54.12]:41908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yarl-baudig@HIDDEN>) id 1p3bvz-0006me-Fe for 59845 <at> debbugs.gnu.org; Fri, 09 Dec 2022 06:52:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1670586767; bh=an/Y+mLQrk0amMO6pXjP9cj80M43f2PYSwL39wZbg5U=; h=X-EA-Auth:From:To:Date:Subject:MIME-Version:X-Mailer:Message-ID: Content-Type:Content-Transfer-Encoding; b=PjJZTejB3a7x/SNHaWQjqbpUN2YLIjQbAlEnvRZ1774ZF15Ywjh8x14RsPTHgseTw 8JCnYnR4klXmEqaimJJxrc/RGqwOhU8zoB2Po0ZQXIKW7DO/9PWurE1iAdNYutDLt9 eXoWVQL+3Bgp1A6hONmbhXzinto/bc8qmrt7z3Hw= Received: by www.mailo.com with http webmail; Fri, 9 Dec 2022 12:52:47 +0100 (CET) X-EA-Auth: DUjejF2ss4F+uGVb070nTDAGneXjuASy2LrwwIWCa/HcuzE9/K+zZZBa5/1QfPfS7aQxj83vdXub/YrM6l4wMKBcRofo3dZ+ From: "yarl baudig" <yarl-baudig@HIDDEN> To: 59845 <at> debbugs.gnu.org Date: Fri, 9 Dec 2022 12:52:47 +0100 (CET) Subject: V2 X-Priority: 3 MIME-Version: 1.0 X-Mailer: COMS/EA22.05/r20221103 Message-ID: <ea-mime-6393218f-7e20-7ce54077@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59845 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) I'm sending a version 2 to clean lint errors (badly configured emacs) + fix= some random typo in the manual patch. I hope this will pass the qa test.
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 5 Dec 2022 21:52:58 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 05 16:52:58 2022 Received: from localhost ([127.0.0.1]:38615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p2JOT-000209-Rb for submit <at> 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 <yarl-baudig@HIDDEN>) id 1p2JOR-0001zo-Nr for 59845 <at> 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 <yarl-baudig@HIDDEN> To: 59845 <at> debbugs.gnu.org Subject: [PATCH 4/4] doc: Add Integrated Library System section. Date: Mon, 5 Dec 2022 22:52:24 +0100 Message-Id: <20221205215224.27623-4-yarl-baudig@HIDDEN> In-Reply-To: <20221205215224.27623-1-yarl-baudig@HIDDEN> References: <20221205215224.27623-1-yarl-baudig@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59845 Cc: Yarl Baudig <yarl-baudig@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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{<pmb-configuration>} 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{<pmb-configuration>}. +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 <replace-with-pid> +# 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")) -- 2.38.1
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 5 Dec 2022 21:52:54 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 05 16:52:54 2022 Received: from localhost ([127.0.0.1]:38612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p2JOQ-0001zw-Bi for submit <at> 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 <yarl-baudig@HIDDEN>) id 1p2JOO-0001zg-9m for 59845 <at> 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 <yarl-baudig@HIDDEN> To: 59845 <at> debbugs.gnu.org Subject: [PATCH 3/4] gnu: Add PMB service. Date: Mon, 5 Dec 2022 22:52:23 +0100 Message-Id: <20221205215224.27623-3-yarl-baudig@HIDDEN> In-Reply-To: <20221205215224.27623-1-yarl-baudig@HIDDEN> References: <20221205215224.27623-1-yarl-baudig@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59845 Cc: Yarl Baudig <yarl-baudig@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 <yarl-baudig@HIDDEN> +;;; +;;; 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 <http://www.gnu.org/licenses/>. + +(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> + 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-configuration> + (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"))) -- 2.38.1
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 5 Dec 2022 21:52:48 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 05 16:52:48 2022 Received: from localhost ([127.0.0.1]:38609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p2JOJ-0001zh-TV for submit <at> 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 <yarl-baudig@HIDDEN>) id 1p2JOH-0001zT-LB for 59845 <at> 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 <yarl-baudig@HIDDEN> To: 59845 <at> debbugs.gnu.org Subject: [PATCH 2/4] gnu: Add PMB. Date: Mon, 5 Dec 2022 22:52:22 +0100 Message-Id: <20221205215224.27623-2-yarl-baudig@HIDDEN> In-Reply-To: <20221205215224.27623-1-yarl-baudig@HIDDEN> References: <20221205215224.27623-1-yarl-baudig@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59845 Cc: Yarl Baudig <yarl-baudig@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 <yarl-baudig@HIDDEN> +;;; +;;; 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 <http://www.gnu.org/licenses/>. + +(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))) + -- 2.38.1
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at 59845) by debbugs.gnu.org; 5 Dec 2022 21:52:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 05 16:52:40 2022 Received: from localhost ([127.0.0.1]:38605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p2JOC-0001zU-Im for submit <at> 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 <yarl-baudig@HIDDEN>) id 1p2JOA-0001zN-3x for 59845 <at> 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 <yarl-baudig@HIDDEN> To: 59845 <at> debbugs.gnu.org Subject: [PATCH 1/4] gnu: php: Add '--enable-soap' configure option. Date: Mon, 5 Dec 2022 22:52:21 +0100 Message-Id: <20221205215224.27623-1-yarl-baudig@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59845 Cc: Yarl Baudig <yarl-baudig@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 -- 2.38.1
guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 5 Dec 2022 21:48:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 05 16:48:50 2022 Received: from localhost ([127.0.0.1]:38579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p2JKU-0001x0-Fj for submit <at> debbugs.gnu.org; Mon, 05 Dec 2022 16:48:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:41108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yarl-baudig@HIDDEN>) id 1p2JKS-0001wu-Sf for submit <at> debbugs.gnu.org; Mon, 05 Dec 2022 16:48:49 -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 <yarl-baudig@HIDDEN>) id 1p2JKS-0007HP-HB for guix-patches@HIDDEN; Mon, 05 Dec 2022 16:48:48 -0500 Received: from msg-1.mailo.com ([213.182.54.11]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <yarl-baudig@HIDDEN>) id 1p2JKQ-0006nw-Jt for guix-patches@HIDDEN; Mon, 05 Dec 2022 16:48:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1670276923; bh=3APGy7kXelJnrUaPAvPyhxwtk4fGVzPKw7JgWyOcezQ=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding; b=B7QWlvWhOKp8Q3CPYzp4ou5b5CHwwo8iEfasc9pu4xaBHEFLDyw9X8bRz8z2ttPrI G+ihn6OkET7WHTkOQJqeFjP2ToQH67cKUcrZJFAuckqyu/edeKmGNRXo9A7y3grg5Q +LPv6b8388iJColzuvNTO7Pyu47XalxXfEJoIeYY= Received: by b-2.in.mailobj.net [192.168.90.12] with ESMTP via ip-206.mailobj.net [213.182.55.206] Mon, 5 Dec 2022 22:48:43 +0100 (CET) X-EA-Auth: 1MO0TTVp24O+iIifJVVaHksYIHiiuM3vJf/rN7SvPA91y51IezeWypFjuUbm8WSvaDN8Wn9R3MJbqcIVP/7v6oxieLuWf1NeYVQcK6vNjdY= From: Yarl Baudig <yarl-baudig@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH 0/4] Add PMB (Integrated Library System) Date: Mon, 5 Dec 2022 22:48:38 +0100 Message-Id: <20221205214838.27594-1-yarl-baudig@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=213.182.54.11; envelope-from=yarl-baudig@HIDDEN; helo=msg-1.mailo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Yarl Baudig <yarl-baudig@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Yarl Baudig (4): gnu: php: Add '--enable-soap' configure option. gnu: Add PMB. gnu: Add PMB service. doc: Add Integrated Library System section. doc/guix.texi | 128 ++++++++++++++++++++++++++++++++++++++++++- gnu/local.mk | 2 + gnu/packages/ils.scm | 61 +++++++++++++++++++++ gnu/packages/php.scm | 3 +- gnu/services/ils.scm | 128 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 320 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/ils.scm create mode 100644 gnu/services/ils.scm base-commit: c3713d53e0bdf1186e08880b9e0ae6dd85f55fc4 -- 2.38.1
Yarl Baudig <yarl-baudig@HIDDEN>
:guix-patches@HIDDEN
.
Full text available.guix-patches@HIDDEN
:bug#59845
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.