From mboxrd@z Thu Jan 1 00:00:00 1970 From: swedebugia@riseup.net Subject: Re: gnu: cups: Update to 2.1.3 - request for help patching Makefiles Date: Tue, 23 Feb 2016 21:00:10 +0100 Message-ID: <9415c297723d5ea0e4cc85fbbfd46b57@riseup.net> References: <20160220055736.GC9159@jasmine> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYJ86-000729-8z for guix-devel@gnu.org; Tue, 23 Feb 2016 15:00:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYJ82-00082e-Sm for guix-devel@gnu.org; Tue, 23 Feb 2016 15:00:18 -0500 Received: from mx1.riseup.net ([198.252.153.129]:49651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYJ82-00082Z-D7 for guix-devel@gnu.org; Tue, 23 Feb 2016 15:00:14 -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: Ricardo Wurmus Cc: guix-devel On 2016-02-23 16:52, Ricardo Wurmus wrote: > swedebugia@riseup.net writes: >=20 >> On 2016-02-20 05:57, Leo Famulari wrote: >>> On Fri, Feb 19, 2016 at 11:18:02PM +0100, swedebugia@riseup.net=20 >>> wrote: >>>> Hi >>>>=20 >>>> This patch almost work. >>>>=20 >>>> I really tried hard understanding what made cups fail after=20 >>>> modifying >>>> the >>>> configure flags and found lines in two makefiles under /notifier:65 >>>> 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=20 >>> 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=20 >>> package >>> definition and gnu-system.am, and see if it works as expected. >>=20 >> Thanks. >>=20 >> I realize that I'm way in over my head in trying to get this >> cups-package to work. >>=20 >> Could somebody mentor me on this one? >>=20 >> Outstanding issues are: >>=20 >> 1) understanding whether patching of the makefiles is necessary given >> that what we want is it to log to /var/log/cups/? In the case yes I >> would like to patch the makefiles. >=20 > 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. >=20 >> 2) understanding how to code the package object to put the cups.conf >> locally in .guix-profile/etc/cups/cups.conf and if it should be a >> symlink to the store or an editable file? >=20 > 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 v= ariant 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 defa= ult profile=20 > 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=20 > store > is =E2=80=9C/gnu/store/....-cups-.../etc/cups/cups.conf=E2=80=9D. As a= ll the store > items are immutable, any file in a profile is read-only. >=20 > 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= would allow > users to create a suitable custom configuration file (e.g. by defining=20 > 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). >=20 > 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. No, not yet. :p I will focus on getting it to compile with the appropriate=20 configure-flags and afterwards we can collaborate on creating a service=20 for cups (with a config file). Patching is necessary because we want cups to write logs and state/run=20 files to /var/cups and when compiling it fails when trying to create=20 those directories.