From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id gRekHQvBoF+FTQAA0tVLHw (envelope-from ) for ; Tue, 03 Nov 2020 02:31:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2BHzGAvBoF8jfwAA1q6Kng (envelope-from ) for ; Tue, 03 Nov 2020 02:31:39 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8F0BB9402A9 for ; Tue, 3 Nov 2020 02:31:38 +0000 (UTC) Received: from localhost ([::1]:53846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZm6i-0003q5-Ux for larch@yhetil.org; Mon, 02 Nov 2020 21:31:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZlzt-0006Uw-PD for help-guix@gnu.org; Mon, 02 Nov 2020 21:24:37 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]:38810) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZlzU-0005Rl-8U; Mon, 02 Nov 2020 21:24:32 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id a84677f8; Tue, 3 Nov 2020 02:23:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date :in-reply-to:references:mime-version:content-type :content-transfer-encoding:subject:to:from:message-id; s=dkim; bh=a1LUnlGdxGDZDdjwArnEubilIii1RkJqeD453t5PDK4=; b=HQyxtE9+sxk0 MFUbH/LTi+0RlA09erI+JHMeGCwsCF9bFJVOubtNcvUyCJcP0nJAS97L/PaTgArH GVZz/PuqlEvAh8ydY6QUQbdp6V5XjgEN34MJ0NSQyisWkLNvmQjLZNRMltJa1bxf 5ja6chJ6SndIQivzM2WGl4aupURDW02uV646gsXVlEOHbwPL9xzSK+Q95+69ZNoM +ZCe3VhJ8dfoJPbjEWoDah+10kTcQSb09D3DyNT7LgXyJZIBsXIsN9Tlf2TGHGYY hGHAEV2BnUDTlrkciMtsVV9UENCqcDKuEyZS90Q3HHABOrAQTrOnzLGBziNPkqNM lN813ayO6g== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id c1fe1c0f (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 3 Nov 2020 02:23:55 +0000 (UTC) Date: Mon, 02 Nov 2020 21:23:42 -0500 User-Agent: K-9 Mail for Android In-Reply-To: <87y2jjgz7a.fsf@disroot.org> References: <87y2jjgz7a.fsf@disroot.org> MIME-Version: 1.0 Subject: Re: How do I correctly relocate PostGIS control files? To: help-guix@gnu.org, Gary Johnson , help-guix From: Julien Lepiller Message-ID: <58ED72A6-E00F-4E9F-A111-6E4C082212D3@lepiller.eu> Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=lepiller.eu header.s=dkim header.b=HQyxtE9+; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: 1.09 X-TUID: OtH+PbViCjae The service simply builds a union-build of the postgis and postgresql packa= ges, because postgresql looks for its extensions in the directory it's run = from=2E It could be that this behavior changed, or that the postgis package doesn'= t build its extension as expected=2E To cgeck these hypothesis: can you check the error message contains the st= ore path of the union (as opposed to only postresql)=2E You should be able = to find some of postgis files there in addition to postgresql files=2E For = the second hypothesis, can you find the postgis=2Econtrol file in the postg= is package itself? Le 2 novembre 2020 17:40:09 GMT-05:00, Gary Johnson a =C3=A9crit : >Hi Guix, > >I use Postgresql with PostGIS extensively for geospatial software >development=2E While the default set of postgresql (v10=2E13) and postgis >(v3=2E0=2E2) packages in Guix have worked well for me for some time, I am >now in need of upgrading to the latest version in order to utilize >newer >functionality in the database software=2E > >To do this, I created a derivative package for postgresql (v13=2E0) as >well as a derivative postgis package that uses the new postgresql >package as an input=2E These packages compile and install correctly with >"guix package -i"=2E > >Here's my code: > >;;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > >(define-module (my-packages postgresql-13) >#:use-module ((guix packages) #:select (package origin >base32)) > #:use-module ((guix download) #:select (url-fetch)) > #:use-module ((gnu packages databases) #:select (postgresql)) >#:use-module ((gnu packages geo) #:select (postgis gdal geos >proj)) > #:use-module ((gnu packages image) #:select (giflib)) > #:use-module ((gnu packages web) #:select (json-c)) > #:use-module ((gnu packages image) #:select (libjpeg-turbo)) > #:use-module ((gnu packages xml) #:select (libxml2)) > #:use-module ((gnu packages pcre) #:select (pcre))) > >(define-public postgresql-13 > (package > (inherit postgresql) > (name "postgresql") > (version "13=2E0") > (source (origin > (method url-fetch) > (uri (string-append "https://ftp=2Epostgresql=2Eorg/pub/source/= v" > version "/postgresql-" version "=2Etar=2Ebz2"= )) > (sha256 > (base32 > "15i2b7m9a9430idqdgvrcyx66cpxz0v2d81nfqcm8ss3inz51rw0")))))) > >(define-public postgis-for-postgresql-13 > (package > (inherit postgis) > (name "postgis") > (version "3=2E0=2E2") > (inputs > `(("gdal" ,gdal) > ("geos" ,geos) > ("giflib" ,giflib) > ("json-c" ,json-c) > ("libjpeg" ,libjpeg-turbo) > ("libxml2" ,libxml2) > ("pcre" ,pcre) > ("postgresql" ,postgresql-13) > ("proj" ,proj))))) > >;;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > >Next, I moved to my OS config=2Escm file to set up the Postgresql >Shepherd >service and add PostGIS as an extension package for the DB, which >should >make its control files available to Postgresql at runtime=2E > >Here are the relevant sections: > >;;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > >(use-modules =2E=2E=2E =20 >((gnu services databases) #:select (postgresql-service-type >postgresql-configuration postgresql-config-file)) >((my-packages postgresql-13) #:select (postgresql-13 >postgis-for-postgresql-13))) > >(operating-system > =2E=2E=2E > (packages (cons* =2E=2E=2E >postgresql-13 postgis-for-postgresql-13 ; psql, raster2pgsql, >shp2pgsql, etc=2E > %base-packages)) > (services (cons* =2E=2E=2E > (service postgresql-service-type (postgresql-configuration > (postgresql postgresql-13) > (extension-packages (list postgis-for-postgresql-13)) > (config-file (postgresql-config-file > (hba-file my-postgres-hba) > (extra-config '(("max_worker_processes" "12") > ("max_parallel_workers" "40") > ("max_parallel_maintenance_workers" "8") > ("max_parallel_workers_per_gather" "4") > ("parallel_leader_participation" "on"))))))) > %desktop-services))) > >;;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > >This compiles and installs successfully with "guix system reconfigure"=2E > >However, when I connect to the Postgresql server with "psql -U >postgres" >and attempt to add the PostGIS extension to a database, I get the >dreaded "could not open extension control file" error: > >;;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > >db=3D# create extension postgis; >ERROR: could not open extension control file >"/gnu/store/8m48v5132qpmxim9s4g9vca59qgay2d9-postgresql-13=2E0/share/exte= nsion/postgis=2Econtrol": >No such file or directory > >;;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > >This error does not occur when using the stock postgresql (v10=2E13) and >postgis (v3=2E0=2E2) packages that come with the current Guix, so somethi= ng >is going wrong with the "extension-packages" code from my config=2Escm's >"postgresql-configuration" record=2E > >I am very much hoping that one of the Guix maintainers can look into >this and help me resolve the issue as I suspect it may be affecting any >user that wants to use a different version of Postgres=2E > >Thanks in advance, > Gary > >--=20 >GPG Key ID: 7BC158ED >Use `gpg --search-keys lambdatronic' to find me >Protect yourself from surveillance: https://emailselfdefense=2Efsf=2Eorg >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >() ascii ribbon campaign - against html e-mail >/\ www=2Easciiribbon=2Eorg - against proprietary attachments > >Please avoid sending me MS-Office attachments=2E >See http://www=2Egnu=2Eorg/philosophy/no-word-attachments=2Ehtml