From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: gnu: cups: Update to 2.1.3 - request for help patching Makefiles Date: Tue, 23 Feb 2016 16:52:59 +0100 Message-ID: References: <20160220055736.GC9159@jasmine> 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]:57084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYFGz-0008D9-Vz for guix-devel@gnu.org; Tue, 23 Feb 2016 10:53:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYFGu-0008E7-Vc for guix-devel@gnu.org; Tue, 23 Feb 2016 10:53:13 -0500 Received: from pegasus.bbbm.mdc-berlin.de ([141.80.25.20]:34413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYFGu-0008Dz-It for guix-devel@gnu.org; Tue, 23 Feb 2016 10:53:08 -0500 In-Reply-To: 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: swedebugia@riseup.net Cc: guix-devel swedebugia@riseup.net writes: > On 2016-02-20 05:57, Leo Famulari wrote: >> On Fri, Feb 19, 2016 at 11:18:02PM +0100, swedebugia@riseup.net wrote: >>> Hi >>>=20 >>> This patch almost work. >>>=20 >>> I really tried hard understanding what made cups fail after modifying= =20 >>> the >>> configure flags and found lines in two makefiles under /notifier:65=20 >>> and >>> /scheduler:159 to be patched. >>=20 >> I'm not sure what the specific problem is. If you share the error >> messages we may be able to give specific advice. >>=20 >>>=20 >>> How do I best create a patch for those? >>=20 >> This is my approach. There may be a better approach but this does work= . >>=20 >> $ tar xf $(./pre-inst-env guix build --source foo) && cd foo >> $ git init && git add --all && git commit -m "Initial import of >> upstream sources" >> $ # make changes >> $ git add --update && git commit && git format-patch HEAD^ >>=20 >> Then, I move the patch into the Guix source tree, add it to the packag= e >> definition and gnu-system.am, and see if it works as expected. > > Thanks. > > I realize that I'm way in over my head in trying to get this=20 > cups-package to work. > > Could somebody mentor me on this one? > > Outstanding issues are: > > 1) understanding whether patching of the makefiles is necessary given=20 > that what we want is it to log to /var/log/cups/? In the case yes I=20 > would like to patch the makefiles. I haven=E2=80=99t looked at this yet, but usually the directory that=E2=80= =99s used for storing logs can be specified at configure time, i.e. by passing an additional configure flag, such as =E2=80=9C--localstatedir=3D/var=E2=80=9D= or similar. > 2) understanding how to code the package object to put the cups.conf=20 > locally in .guix-profile/etc/cups/cups.conf and if it should be a=20 > symlink to the store or an editable file? By default a package=E2=80=99s files are stored in =E2=80=9C$prefix/=E2=80= =9D, which is the unique directory in =E2=80=9C/gnu/store/=E2=80=9D for this particular var= iant of the package. When you *install* a package its contents are linked into a profile, so installing the =E2=80=9Ccups=E2=80=9D package into the defaul= t profile would make the configuration file available in =E2=80=9C~/.guix-profile/etc/cups/cups.conf=E2=80=9D if the file=E2=80=99= s location in the store is =E2=80=9C/gnu/store/....-cups-.../etc/cups/cups.conf=E2=80=9D. As all= the store items are immutable, any file in a profile is read-only. In the case of CUPS I think it would be valuable to have it first look for a configuration file somewhere under =E2=80=9C/etc/=E2=80=9D, which w= ould allow users to create a suitable custom configuration file (e.g. by defining a service providing such file). Only if that file does not exist should CUPS look for its default configuration file in the store (but maybe that=E2=80=99s not necessary at all). Are you familiar with how GuixSD handles services? We would need a service that creates a CUPS configuration file based on a CUPS configuration value. ~~ Ricardo