From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTAhw-0004BI-2Y for guix-patches@gnu.org; Sun, 24 Dec 2017 13:09:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eTAhq-0000PE-Ja for guix-patches@gnu.org; Sun, 24 Dec 2017 13:09:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:42207) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eTAhq-0000P5-FY for guix-patches@gnu.org; Sun, 24 Dec 2017 13:09:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eTAhq-0004bL-72 for guix-patches@gnu.org; Sun, 24 Dec 2017 13:09:02 -0500 Subject: [bug#29741] [PATCH 2/2] gnu: services: web: Add service for apache-httpd. Resent-Message-ID: References: <20171216201700.23564-1-mail@cbaines.net> <20171216201700.23564-2-mail@cbaines.net> <87zi6gtkhx.fsf@gnu.org> From: Christopher Baines In-reply-to: <87zi6gtkhx.fsf@gnu.org> Date: Sun, 24 Dec 2017 18:08:00 +0000 Message-ID: <878tdst2wv.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 29741@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hello, > > Christopher Baines skribis: > >> * gnu/services/web.scm (, >> , >> ): New record types. >> (%default-apache-httpd-modules, %apache-httpd-accounts, >> apache-httpd-service-type): New variables. >> (apache-httpd-shepherd-services, apache-httpd-activation, >> apache-httpd-process-extensions): New procedures. >> * gnu/tests/web.scm (run-apache-httpd-test): New procedure. >> (%apache-httpd-os, %tests-apache-httpd): New variables. > > Nice! Documentation will be welcome. :-) Great, I've sent a couple of updated patches, which now include documentation. >> + #:export ( >> + apache-httpd-configuration >> + apache-httpd-configuration? >> + apache-httpd-configuration-package >> + apache-httpd-configuration-pid-file >> + apache-httpd-configuration-config > > In this context I think =E2=80=98httpd-=E2=80=99 would be good enough as = a prefix. Ok, I've changed the prefix to 'httpd-'. >> +(define %default-apache-httpd-modules >> + (map (match-lambda >> + ((name file) >> + (apache-httpd-load-module >> + (name name) >> + (file file)))) >> + '(("authn_file_module" "modules/mod_authn_file.so") >> + ("authn_core_module" "modules/mod_authn_core.so") >> + ("authz_host_module" "modules/mod_authz_host.so") > > I think having this list here is the right approach. However could you > write where it comes from? I guess it=E2=80=99s equal to the current def= ault in > httpd, right? > > How often do you expect this to be updated? I got this from the etc/httpd/httpd.conf file in the httpd package, and I've now added a comment in to the code saying this. I don't expect it will need updating often. >> +(define-record-type* >> + apache-httpd-config-file make-apache-httpd-config-file >> + apache-httpd-config-file? >> + (load-modules apache-httpd-config-file-load-modules >> + (default %default-apache-httpd-modules)) > > Or =E2=80=9Cloaded-modules=E2=80=9D or just =E2=80=9Cmodules=E2=80=9D? I've gone with modules, and changed this field and the corresponding record type. >> +(define* (run-apache-httpd-test #:optional (http-port 8080)) >> + "Run tests in %APACHE-HTTPD-OS, which has apache-httpd running and li= stening on >> +HTTP-PORT." > > I wonder if we could abstract =E2=80=98run-nginx-test=E2=80=99 just enoug= h so it can be > used for both. It=E2=80=99d need to take a service name, log file, and P= ID file > as arguments. That sounds good to me. I've now updated the first patch to generalise the test, so that it can be used for both the nginx and httpd service. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlo/7QBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xes3w//ZJk2mQbSn7a7mBhSJnuj4CVyGDUjhoCp8iXF0+89gczRAMxF5TlzzXnp hlYQhHw939lbmOgtc3ToFs/ekuxGSChW9TeCS0WapkSXMz9HT+FDh4edwDjjcwM1 rYtnGSoi5qny/5FWcwOUedw/axWwNsRbDcBC0y/c6or5MYxagPAWThxNae9Z3K05 uK1b6gkepzEiBS14oclDS2H75RKu8Z05ZLk2BdTszWmfC06CmYH2yalgIwUkuwdu T5NaMMYHTm+z8LuzQm1xQufgQdm+uzbNO2IsFp+LpzTmRC9AWWBxqkhbTgfCgf9S W5r39P7exLUcK9ZrxBFrz/aDhqAGlXEvhAOed5sa2YF4ETIZHFoknCurvUPGyxR8 dQFmfQ5ENSL5Fe2z/P3MupnCaI+HYwq8ix6xTPQud2NNboSoD4gCwa+Poq54+Wvo 8fPbHwMmdTqKeGmgMY+6Bf0cPIkJNOXcMdaqJilKoFHsKnhXIZaZn337h+zonovG trHziQD6csWocIE7Mg9zlDMGZDz8+h7bvA92hnq4/6g2PYjoTifKMG8J8UkBmUqh yPP4GLoi+qPAtexR9ibAdEe1ag9aXB7L63L2ODb6NmVL1zhKKCDa5IN9v/2217e9 eG0w7K4D0FvRyQe0+E3BGQ4CYKwEtP+yBR+YY3s72W1QDMsM/0c= =BCYg -----END PGP SIGNATURE----- --=-=-=--