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 8PQvE6v3qV8aMQAA0tVLHw (envelope-from ) for ; Tue, 10 Nov 2020 02:15:07 +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 gLYPD6v3qV/vcgAA1q6Kng (envelope-from ) for ; Tue, 10 Nov 2020 02:15:07 +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 5FD2E9403E7 for ; Tue, 10 Nov 2020 02:15:06 +0000 (UTC) Received: from localhost ([::1]:34580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcJBX-0006xz-VX for larch@yhetil.org; Mon, 09 Nov 2020 21:15:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcJBQ-0006xq-Cl for help-guix@gnu.org; Mon, 09 Nov 2020 21:14:56 -0500 Received: from zancanaro.com.au ([45.76.117.151]:44744) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcJBN-0005jG-DC for help-guix@gnu.org; Mon, 09 Nov 2020 21:14:55 -0500 Received: by zancanaro.com.au (Postfix, from userid 116) id C83AF3273B; Tue, 10 Nov 2020 02:14:46 +0000 (UTC) Received: from jolteon (unknown [27.96.215.68]) by zancanaro.com.au (Postfix) with ESMTPSA id 6D42132738; Tue, 10 Nov 2020 02:14:45 +0000 (UTC) References: <87y2jjgz7a.fsf@disroot.org> <58ED72A6-E00F-4E9F-A111-6E4C082212D3@lepiller.eu> <87k0v2ez25.fsf@disroot.org> <87lffa84on.fsf@disroot.org> User-agent: mu4e 1.4.13; emacs 27.1 From: Carlo Zancanaro To: Gary Johnson Subject: Re: How do I correctly relocate PostGIS control files? In-reply-to: <87lffa84on.fsf@disroot.org> Date: Tue, 10 Nov 2020 13:14:44 +1100 Message-ID: <87ft5ihsa3.fsf@zancanaro.id.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=45.76.117.151; envelope-from=carlo@zancanaro.id.au; helo=zancanaro.com.au X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/09 21:14:47 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: help-guix@gnu.org 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=none; dmarc=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: -0.01 X-TUID: zTCNwckAPNTS --=-=-= Content-Type: text/plain; format=flowed Hi Gary, On Tue, Nov 10 2020, Gary Johnson wrote: > It's been a week since my original post requesting assistance > with getting Postgresql and PostGIS to work together correctly, > but unfortunately I still haven't received any help with this > issue. > ... > Does anyone know how this code works or how to fix this issue? I didn't respond initially because I don't have any specialist knowledge about this. I had some free time today, so I did a bit of an investigation and I think I've figured out what's gone wrong for you here. In your original email you gave this definition for postgresql-13: (define-public postgresql-13 (package (inherit postgresql) (name "postgresql") (version "13.0") (source (origin (method url-fetch) (uri (string-append "https://ftp.postgresql.org/pub/source/v" version "/postgresql-" version ".tar.bz2")) (sha256 (base32 "15i2b7m9a9430idqdgvrcyx66cpxz0v2d81nfqcm8ss3inz51rw0")))))) However, this is missing one important line from the original postgresql definition, which applies a patch to the source: (patches (search-patches "postgresql-disable-resolve_symlinks.patch")) This patch changes how Postgres treats symlinks, which Guix uses extensively. If we add this patch the definition of postgresql-13 we should get: (define-public postgresql-13 (package (inherit postgresql) (name "postgresql") (version "13.0") (source (origin (method url-fetch) (uri (string-append "https://ftp.postgresql.org/pub/source/v" version "/postgresql-" version ".tar.bz2")) (sha256 (base32 "15i2b7m9a9430idqdgvrcyx66cpxz0v2d81nfqcm8ss3inz51rw0")) (patches (search-patches "postgresql-disable-resolve_symlinks.patch")))))) I put this into a system definition (a bit hacky, but attached) and built it using "guix system vm helping-gary.scm". Logging into the system as root I was able to run this successfully: sudo -u postgres psql -c 'create extension postgis' I hope that helps! Carlo --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=helping-gary.scm Content-Transfer-Encoding: base64 KHVzZS1tb2R1bGVzIChnbnUpCiAgICAgICAgICAgICAoZ3VpeCBtb2R1bGVzKQogICAgICAgICAg ICAgKGd1aXggcGFja2FnZXMpCiAgICAgICAgICAgICAoZ3VpeCBkb3dubG9hZCkKICAgICAgICAg ICAgIChnbnUgc3lzdGVtIGZpbGUtc3lzdGVtcykKICAgICAgICAgICAgIChnbnUgcGFja2FnZXMg ZGF0YWJhc2VzKQogICAgICAgICAgICAgKGdudSBwYWNrYWdlcyBnZW8pCiAgICAgICAgICAgICAo Z251IHBhY2thZ2VzIGltYWdlKQogICAgICAgICAgICAgKGdudSBwYWNrYWdlcyB3ZWIpCiAgICAg ICAgICAgICAoZ251IHBhY2thZ2VzIGltYWdlKQogICAgICAgICAgICAgKGdudSBwYW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CIgLGdkYWwpCiAgICAgICgiZ2VvcyIgLGdlb3MpCiAgICAg ICgiZ2lmbGliIiAsZ2lmbGliKQogICAgICAoImpzb24tYyIgLGpzb24tYykKICAgICAgKCJsaWJq cGVnIiAsbGlianBlZy10dXJibykKICAgICAgKCJsaWJ4bWwyIiAsbGlieG1sMikKICAgICAgKCJw Y3JlIiAscGNyZSkKICAgICAgKCJwb3N0Z3Jlc3FsIiAscG9zdGdyZXNxbC0xMykKICAgICAgKCJw cm9qIiAscHJvaikpKSkpCgoob3BlcmF0aW5nLXN5c3RlbQogIChib290bG9hZGVyIChib290bG9h ZGVyLWNvbmZpZ3VyYXRpb24KICAgICAgICAgICAgICAgKGJvb3Rsb2FkZXIgZ3J1Yi1ib290bG9h ZGVyKQogICAgICAgICAgICAgICAodGFyZ2V0ICIvZGV2L3ZkYSIpKSkKICAoaG9zdC1uYW1lICI/ PyIpCiAgKGZpbGUtc3lzdGVtcyAlYmFzZS1maWxlLXN5c3RlbXMpCiAgKHRpbWV6b25lICJVVEMi KQogIChwYWNrYWdlcyAoY29ucyogcG9zdGdyZXNxbC0xMyBwb3N0Z2lzLWZvci1wb3N0Z3Jlc3Fs LTEzICViYXNlLXBhY2thZ2VzKSkKICAoc2VydmljZXMgKGNvbnMqIChzZXJ2aWNlIHBvc3RncmVz cWwtc2VydmljZS10eXBlIChwb3N0Z3Jlc3FsLWNvbmZpZ3VyYXRpb24KICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9zdGdyZXNxbCBwb3N0Z3Jl c3FsLTEzKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChleHRlbnNpb24tcGFja2FnZXMgKGxpc3QgcG9zdGdpcy1mb3ItcG9zdGdyZXNxbC0xMykp KSkKICAgICAgICAgICAgICAgICAgICViYXNlLXNlcnZpY2VzKSkpCg== --=-=-=--