From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#26302: [website] translations Date: Mon, 04 Nov 2019 18:19:32 +0100 Message-ID: <87ftj38spn.fsf@gnu.org> References: <20170329154040.ddscahwp2agknihb@abyayala> <16d07cb5a1d.ca69255821627.8144164908931126811@zoho.com> <20190908171638.cna67eearj4rbn2k@pelzflorian.localdomain> <16d18a5a9e8.12ab66c8254154.2756956535677606704@zoho.com> <20190915201819.3yxm25fayvbxwdpl@pelzflorian.localdomain> <20191007081502.wog4q4wjptvhmejf@pelzflorian.localdomain> <874kznbqa5.fsf@gnu.org> <20191102131515.sq6mlvwsfybagsd2@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:60264) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRg1N-0007V6-Uv for bug-guix@gnu.org; Mon, 04 Nov 2019 12:20:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRg1M-0002Rs-DL for bug-guix@gnu.org; Mon, 04 Nov 2019 12:20:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56869) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iRg1M-0002Rn-9q for bug-guix@gnu.org; Mon, 04 Nov 2019 12:20:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iRg1L-0002x5-Ss for bug-guix@gnu.org; Mon, 04 Nov 2019 12:20:04 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20191102131515.sq6mlvwsfybagsd2@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Sat, 2 Nov 2019 14:15:15 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: "pelzflorian (Florian Pelz)" Cc: sirgazil , 26302 <26302@debbugs.gnu.org> Hi, "pelzflorian (Florian Pelz)" skribis: > On Fri, Nov 01, 2019 at 03:54:42PM +0100, Ludovic Court=C3=A8s wrote: >> > + (modules '((guix build utils) >> > + (ice-9 popen))) >> > + (snippet >> > + #~(begin >> > + ;; the nginx source code is part of the module=E2=80=99= s source >> > + (format #t "decompressing nginx source code~%") >> > + (call-with-output-file "nginx.tar" >> > + (lambda (out) >> > + (let ((pipe (open-pipe* OPEN_READ >> > + #+(file-append gzip "/bin/g= zip") "-cd" >> > + #$(package-source nginx)))) >> > + (dump-port pipe out) >> > + (unless (=3D (status:exit-val (close-pipe pipe)) = 0) >> > + (error "gzip decompress failed"))))) >> > + (invoke #+(file-append tar "/bin/tar") "xvf" "nginx.tar" >> > + "--strip-components=3D1") >> > + (delete-file "nginx.tar") >>=20 >> I=E2=80=99d suggest doing it in a phase. > > This changes many things. :) > > With a phase, `guix build -S` would only return the source files of > nginx-accept-language-module directly but not of statically linked > nginx. I have added a further patch to doc/guix.texi warning of `guix > build -S` not always returning complete and corresponding sources, see > attachment. > > The good thing is that with a phase I no longer get an import cycle > because I no longer need a reference to the tar package. So I put > nginx-accept-language-module inside web.scm now and there is no need > for a separate module. Good! >> > + (license (delete-duplicates >> > + (cons license:bsd-2 ;license of nginx-mod-accept-lang= uage >> > + (package-license nginx))))))) ;the module=E2=80= =99s code is linked >>=20 >> To avoid circular dependencies in top-level references, I suggest >> copying the license of =E2=80=98nginx=E2=80=99 instead of writing (packa= ge-license >> nginx). >>=20 > > I believe this is no longer an issue now that > nginx-accept-language-module is in the same Guile module as nginx, is > it? You=E2=80=99re right: it=E2=80=99s no longer an issue. >> > +++ b/gnu/packages/web-xyz.scm >> > @@ -0,0 +1,175 @@ >> > +;;; GNU Guix --- Functional package management for GNU >> > +;;;; TODO should I really add copyright lines for people I copied fro= m?? >> > +;;; Copyright =C2=A9 2014, 2015 Mark H Weaver >> > +;;; Copyright =C2=A9 2016 Tobias Geerinckx-Rice >> > +;;; Copyright =C2=A9 2017, 2018 Marius Bakke >>=20 >> I don=E2=80=99t think you need to add these 3 lines here; the package de= finition >> is yours. >>=20 > > This does not matter anymore after putting > nginx-accept-language-module in the same Guile module file as nginx. > > In general though: IANAL but I have largely copied nginx=E2=80=99 configu= re > phase, so at least Mark would surely have copyright on parts of it. > However I believe copyright lines have limited legal significance > anyway and adding these authorship lines in a file not added by Mark > seems unreasonable. Agreed. >> [=E2=80=A6] >> Perhaps =E2=80=9Cnginx-accept-language-module=E2=80=9D, to match the nam= e of the >> upstream repo? >>=20 > > I agree. Arch (who have no package for nginx-accept-language-module) > change their various nginx module package names to be more consistent, > I think, but this is not necessary in Guix, I think. For Guix the general rule is to follow upstream (info "(guix) Package Naming"). > From b6da504736866bae655e2b4025729345e1ea19b7 Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Sat, 2 Nov 2019 13:13:01 +0100 > Subject: [PATCH 1/3] doc: Add warning on the '--source' build option when > linking statically. > > * doc/guix.texi (Additional Build Options): Add warning. > --- > doc/guix.texi | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/doc/guix.texi b/doc/guix.texi > index da2423b422..30b69d8869 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -8328,6 +8328,12 @@ The returned source tarball is the result of apply= ing any patches and > code snippets specified in the package @code{origin} (@pxref{Defining > Packages}). >=20=20 > +Note that for statically linked packages, @command{guix build -S} will > +@emph{not} return the complete and corresponding sources since these > +would include the sources of statically linked dependencies. In this > +case, when distributing sources for license compliance, you may want to > +play it safe and use the following @code{--sources} option instead. I don=E2=80=99t think this bit is necessary: =E2=80=98-S=E2=80=99 is docume= nted to return =E2=80=9Cthe source of the package=E2=80=9D and that=E2=80=99s exactly what it does; sta= tic vs. dynamic linking is not a concern at this level, as I see it. WDYT? > From 21e6064f42defad1e2d35bbf95a4825fec9e4615 Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Sat, 2 Nov 2019 12:43:47 +0100 > Subject: [PATCH 2/3] gnu: Add Nginx Accept Language module. > > * gnu/packages/web.scm (nginx-accept-language-module): New public variabl= e. LGTM! Thanks for taking the time to rewrite the snippet as a build phase. > From 250ae2011ac1c976508136e9f50cb04e6ab5f23c Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Sat, 2 Nov 2019 14:05:30 +0100 > Subject: [PATCH 3/3] services: Make it possible to include dynamic module= s in > nginx. > > * gnu/services/web.scm (): Add modules field. > (nginx-configuration-modules): New field accessor. > (emit-load-module): New procedure. > (default-nginx-config): Add support for the modules field. > * doc/guix.texi (NGINX): Document it. > --- > doc/guix.texi | 4 ++++ > gnu/services/web.scm | 8 ++++++++ > 2 files changed, 12 insertions(+) > > diff --git a/doc/guix.texi b/doc/guix.texi > index 30b69d8869..898123da2b 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -19770,6 +19770,10 @@ use the size of the processors cache line. > @item @code{server-names-hash-bucket-max-size} (default: @code{#f}) > Maximum bucket size for the server names hash tables. >=20=20 > +@item @code{modules} (default: @code{'()}) > +List of nginx dynamic modules to load. Should be a list of strings or > +string valued G-expressions. Then=E2=80=A6 how does nginx find the module in question, specifically the =E2=80=98nginx-accept-language-module=E2=80=99 package? One has to specify =E2=80=98nginx-accept-language-module=E2=80=99 as the nginx package to use,= is that right? (I had overlooked that before.) What about adding an example with the =E2=80=98accept-language=E2=80=99 mod= ule? Thank you! Ludo=E2=80=99.