From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: Re: [PATCH] improve nginx-service Date: Fri, 4 Nov 2016 23:58:01 +0100 Message-ID: <4b44538a-ed70-aacd-4867-5267847aee42@crazy-compilers.com> References: <20161016143347.38d8a6f2@polymos.lepiller.eu> <874m483vap.fsf@gnu.org> <20161020143744.516a1184@polymos.lepiller.eu> <87shrlzd0w.fsf@gnu.org> <20161026214507.45445d14@lepiller.eu> <87y41aklqp.fsf@gnu.org> <20161027195949.354cae8e@lepiller.eu> <87pomhse6w.fsf@gnu.org> <87lgx0txz0.fsf@gnu.org> <87h97n1iu0.fsf@gnu.org> <20161104190129.684844b4@lepiller.eu> <20161104231253.4b52d70f@lepiller.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2nR7-00066F-2u for guix-devel@gnu.org; Fri, 04 Nov 2016 18:58:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2nR2-0003i8-8M for guix-devel@gnu.org; Fri, 04 Nov 2016 18:58:13 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:59597) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2nR2-0003ge-2T for guix-devel@gnu.org; Fri, 04 Nov 2016 18:58:08 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3t9cgf2FLqz3hj7X for ; Fri, 4 Nov 2016 23:58:06 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3t9cgf1kD0zvng9 for ; Fri, 4 Nov 2016 23:58:06 +0100 (CET) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id rCRP6TEs-cPj for ; Fri, 4 Nov 2016 23:58:01 +0100 (CET) Received: from hermia.goebel-consult.de (ppp-188-174-155-245.dynamic.mnet-online.de [188.174.155.245]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Fri, 4 Nov 2016 23:58:01 +0100 (CET) Received: from thisbe.goebel-consult.de (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id 20C2A60589 for ; Fri, 4 Nov 2016 23:58:01 +0100 (CET) In-Reply-To: <20161104231253.4b52d70f@lepiller.eu> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Am 04.11.2016 um 23:12 schrieb Julien Lepiller: > I'd like to get these patches accepted first, but I'm already working > on adding more configuration lines. BTW: I just started typing down a simple "location" record type, and started to think if these record types are really the way to go for the configuration. In nginx AFAIK you can define many options on the server level, on the vhost level and per location. Additionally locations can be nested. And some configuration options are quite complex, e.g. "listen" [1] and maybe worth their own type. So we'll create a lot of code for both the record types and for converting them to config-file text. In the long run, we will get maintenance problems, I'm afraid, if we are only allow options known to us and written into the service. On each update we'd need to check if any option was added. So IMHO the recard types are not the way to go. We need a more flexible way, maybe like used for XML (see default-build.xml in guix/build/ant-build-system.scm), but with support for default values. Unfortunatly I'm no scheme hacker and can not propose any solution for this :-( [1] https://nginx.org/en/docs/http/ngx_http_core_module.html#listen --=20 Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |