From mboxrd@z Thu Jan 1 00:00:00 1970 From: swedebugia@riseup.net Subject: [PATCH] gnu: cups: Update to 2.1.3 (was gnu: cups: Update to 2.1.3 - request for help patching Makefiles) Date: Wed, 24 Feb 2016 19:20:20 +0100 Message-ID: <64e80cbba672d68ca21844d997f93022@riseup.net> References: <20160220055736.GC9159@jasmine> <9415c297723d5ea0e4cc85fbbfd46b57@riseup.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_3cee342579e5283eb47a3a386757af4e" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYe33-0000NP-9u for guix-devel@gnu.org; Wed, 24 Feb 2016 13:20:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYe31-0008H3-NE for guix-devel@gnu.org; Wed, 24 Feb 2016 13:20:29 -0500 In-Reply-To: <9415c297723d5ea0e4cc85fbbfd46b57@riseup.net> 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 , guix-devel-bounces+swedebugia=riseup.net@gnu.org --=_3cee342579e5283eb47a3a386757af4e Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2016-02-23 21:00, swedebugia@riseup.net wrote: > 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=20 >> 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 = variant 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 def= ault 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= =99s location in the=20 >> 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. >>=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, whic= h 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. >=20 > No, not yet. :p >=20 > I will focus on getting it to compile with the appropriate > configure-flags and afterwards we can collaborate on creating a > service for cups (with a config file). >=20 > Patching is necessary because we want cups to write logs and state/run > files to /var/cups and when compiling it fails when trying to create > those directories. I succeeded in getting it patched and compiling. :) cupsd still refuses to run for the following reason: sdb@unknown=20 /gnu/store/gm397jmdp3jafz6gm5ry6c459dvapcf7-cups-minimal-2.1.3/sbin$=20 sudo cupsd -t "/gnu/store/qs3xymcsgxa68i8m188261rhxsszx7za-cups-2.1.0/etc/cups/cups-fil= es.conf"=20 contains errors. --=_3cee342579e5283eb47a3a386757af4e Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=0001-gnu-cups-Update-to-2.1.3-and-add-configure-flags-to-.patch Content-Disposition: attachment; filename=0001-gnu-cups-Update-to-2.1.3-and-add-configure-flags-to-.patch; size=2933 RnJvbSAxNmU1ZWNiY2UxZWQ5OTc0ODBkMmViNmNlNDJkODhmODJlODAzOGYyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBzd2VkZWJ1Z2lhIDxzd2VkZWJ1Z2lhQHJpc2V1cC5uZXQ+CkRh dGU6IEZyaSwgMTkgRmViIDIwMTYgMjM6MTE6MTYgKzAxMDAKU3ViamVjdDogW1BBVENIXSBnbnU6 IGN1cHM6IFVwZGF0ZSB0byAyLjEuMyBhbmQgYWRkIGNvbmZpZ3VyZSBmbGFncyB0byBlbmFibGUK IGdudXRscyBhbmQgd3JpdGluZyBsb2dzIGFuZCBzdGF0ZSB0byAvdmFyCgotLS0KIGdudS1zeXN0 ZW0uYW0gICAgICAgICB8ICAxICsKIGdudS9wYWNrYWdlcy9jdXBzLnNjbSB8IDIxICsrKysrKysr K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IEBAIGZpbHRlcnMgZm9yIHRoZSBQREYtY2VudHJpYyBwcmludGluZyB3b3JrZmxvdyBpbnRyb2R1 Y2VkIGJ5IE9wZW5QcmludGluZy4iKQogKGRlZmluZS1wdWJsaWMgY3Vwcy1taW5pbWFsCiAgIChw YWNrYWdlCiAgICAgKG5hbWUgImN1cHMtbWluaW1hbCIpCi0gICAgKHZlcnNpb24gIjIuMS4wIikK KyAgICAodmVyc2lvbiAiMi4xLjMiKQogICAgIChzb3VyY2UgKG9yaWdpbgogICAgICAgICAgICAg ICAobWV0aG9kIHVybC1mZXRjaCkKICAgICAgICAgICAgICAgKHVyaSAoc3RyaW5nLWFwcGVuZCAi aHR0cDovL3d3dy5jdXBzLm9yZy9zb2Z0d2FyZS8iCiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgdmVyc2lvbiAiL2N1cHMtIiB2ZXJzaW9uICItc291cmNlLnRhci5iejIiKSkKICAg ICAgICAgICAgICAgKHNoYTI1NgogICAgICAgICAgICAgICAgKGJhc2UzMgotICAgICAgICAgICAg ICAgICIxamZqcXN3OWw3amJuNWtiOWk5Nmswd2oxMmtqZGJneDByZDgxNTdkaWYyMmhpMGtoMG1z IikpKSkKKyAgICAgICAgICAgICAgICAiMWx5bDN6MDF4aGc5eGI5YzhtNDIzOThjNmg5a3c4cXI2 andpdjhiamRzamFiMTFodjlybiIpKQorICAgICAgICAgICAgICAocGF0Y2hlcworICAgICAgICAg ICAgICAgKGxpc3QKKyAgICAgICAgICAgICAgICA7OyBQYXRjaCB0byB0aGUgTWFrZWZpbGVzIGlu IC9ub3RpZmllciBhbmQgL3NjaGVkdWxlcgorICAgICAgICAgICAgICAgIDs7IHRvIHJlbW92ZSBj YWxscyB0byBta2RpciBvdXRzaWRlIHRoZSBjaHJvb3QuCisgICAgICAgICAgICAgICAgKHNlYXJj aC1wYXRjaCAiY3Vwcy1kaXIucGF0Y2giKSkpKSkKICAgICAoYnVpbGQtc3lzdGVtIGdudS1idWls ZC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gICAgICAiLS1sb2NhbHN0YXRlZGly PS92YXIiKQogICAgICAgICM6cGhhc2VzCiAgICAgICAgKGFsaXN0LWNvbnMtYmVmb3JlCiAgICAg ICAgICdjb25maWd1cmUKLS0gCjIuNi4zCgo= --=_3cee342579e5283eb47a3a386757af4e--