From unknown Fri Jun 13 10:01:51 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#68747 <68747@debbugs.gnu.org> To: bug#68747 <68747@debbugs.gnu.org> Subject: Status: Extending postgresql-role-service-type as shown in manual leads to crash Reply-To: bug#68747 <68747@debbugs.gnu.org> Date: Fri, 13 Jun 2025 17:01:51 +0000 retitle 68747 Extending postgresql-role-service-type as shown in manual lea= ds to crash reassign 68747 guix submitter 68747 Maxim Cournoyer severity 68747 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 26 21:15:00 2024 Received: (at submit) by debbugs.gnu.org; 27 Jan 2024 02:15:00 +0000 Received: from localhost ([127.0.0.1]:53147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTYDk-0002aM-F9 for submit@debbugs.gnu.org; Fri, 26 Jan 2024 21:15:00 -0500 Received: from lists.gnu.org ([2001:470:142::17]:49926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTYDi-0002a6-Ai for submit@debbugs.gnu.org; Fri, 26 Jan 2024 21:14:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTYDV-0003aQ-EL for bug-guix@gnu.org; Fri, 26 Jan 2024 21:14:46 -0500 Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTYDT-00037Y-RJ for bug-guix@gnu.org; Fri, 26 Jan 2024 21:14:45 -0500 Received: by mail-qv1-xf31.google.com with SMTP id 6a1803df08f44-68196a09e2eso6141376d6.3 for ; Fri, 26 Jan 2024 18:14:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706321682; x=1706926482; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=c5SUns1FKKLpU3uBnuzXmsvODaSbvzBy6moT5DGPVY4=; b=FzkLgFY19lGgFiylRgTKupBAxyPMDH8+1+t+Mg/FK3y3ge+rI7sVynh4Tl0S0KmI44 +Gk81/F26QqlRVb4+ErjzVISgcfWud/mMqjGIsTtXyeijWRXXG7muHlEGtH8qGNwmiuY jRO9ArICtY0LiB0RXqY4SmlMtQK8bqDPHS07hwBfkeKNZdRHpDBhwA/3qH7p0RCY1ect GxAHfFTp22Bk7oxPGRPIW1UmYbn01E2QhYWUi9jT50MuaLcMIATeF3I6j+X6WNoN5MPN QeTKenvgFDQU8OkkZ68oj7G8oLEaUYQrb7ZGZi19l9sPyInpEIp/sHzla7F1SAqO4Sgb bWFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706321682; x=1706926482; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=c5SUns1FKKLpU3uBnuzXmsvODaSbvzBy6moT5DGPVY4=; b=fNjL1/E8RbnMpr6+c8IdS8+CIR9U/UwEuuj+aJbPeJ7Gho2zm+tLDlkGkwiLRzrEBI SlUt2GfQLX7ty2TbclO31yA26s6zmTpT+kOAxATtUrqWbLY13Ln4fgOPqXrWKuEHJ3Sx VQZIFzX3wyiL2plfW/w6Xi2oHQIaXKZ1W5PJuAzws6aK/tPhhUkBm16uMFgEXSUdZMJS Z9Obz8MZFIEX/qCI26oCilOnV9WJUP8+YtWc5lFcNCc/prJmViHvEOeFWAuYJmsZyZAr Jj3k4cTZv2XfDyki5fIsEfmYzA4/bUbWzF6WOmDxzViiF/3l1LB92mU4XXa1mDtRUIr+ cI8A== X-Gm-Message-State: AOJu0YxbY1l6FYtbi7GWbelt8lxa6ZJKBL/BwZ0Rp+m2Omerijat2Dxr wOgy2jMCZ/AWqeIxS5wRrU49/QtpF7hodz2fZ5tiPA73EIeOE1BbzGCXl2dN X-Google-Smtp-Source: AGHT+IG32d71GR9D3+z4sjA1OuO7d7CTEXlHCgrlsaAzlXTWN1b9VZbqShKrd1uz3F4EtuiaNjKkdQ== X-Received: by 2002:a05:6214:f06:b0:684:836f:9abe with SMTP id gw6-20020a0562140f0600b00684836f9abemr1071678qvb.30.1706321682073; Fri, 26 Jan 2024 18:14:42 -0800 (PST) Received: from hurd (dsl-153-164.b2b2c.ca. [66.158.153.164]) by smtp.gmail.com with ESMTPSA id on6-20020a056214448600b006819a4354basm1040002qvb.37.2024.01.26.18.14.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 18:14:41 -0800 (PST) From: Maxim Cournoyer To: bug-guix Subject: Extending postgresql-role-service-type as shown in manual leads to crash Date: Fri, 26 Jan 2024 21:14:39 -0500 Message-ID: <87a5or1q0g.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::f31; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf31.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, We have this example in the manual, in (info "(guix) Database Services"): --8<---------------cut here---------------start------------->8--- (service-extension postgresql-role-service-type (const (postgresql-role (name "alice") (create-database? #t)))) --8<---------------cut here---------------end--------------->8--- Unfortunately, it doesn't seem to work as intended. Adding the following to my configuration: --8<---------------cut here---------------start------------->8--- (service postgresql-service-type) (service postgresql-role-service-type (postgresql-role-configuration (roles (list (postgresql-role (name "maxim") (create-database? #t)))))) (service-extension postgresql-role-service-type (const (postgresql-role (name "cuirass") (create-database? #t)))) --8<---------------cut here---------------end--------------->8--- I get the following error upon reconfiguration: --8<---------------cut here---------------start------------->8--- Backtrace: 18 (primitive-load "/home/maxim/.config/guix/current/bin/g=E2=80= =A6") In guix/ui.scm: 2324:7 17 (run-guix . _) 2287:10 16 (run-guix-command _ . _) In ice-9/boot-9.scm: 1752:10 15 (with-exception-handler _ _ #:unwind? _ # _) In guix/status.scm: 859:3 14 (_) 839:4 13 (call-with-status-report _ _) In guix/scripts/system.scm: 1305:4 12 (_) In ice-9/boot-9.scm: 1752:10 11 (with-exception-handler _ _ #:unwind? _ # _) In guix/store.scm: 661:37 10 (thunk) 1300:8 9 (call-with-build-handler # =E2=80=A6) 2180:25 8 (run-with-store # =E2=80= =A6) In guix/scripts/system.scm: 847:2 7 (_ _) 721:8 6 (_ #) In gnu/system.scm: 1295:19 5 (operating-system-derivation _) In gnu/services.scm: 1166:6 4 (instantiate-missing-services _) In srfi/srfi-1.scm: 460:18 3 (fold # =E2=80=A6) In gnu/services.scm: 1167:27 2 (_ #< target: # =E2=80=A6) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure service-kind: Wrong type argument: #< targe= t: # compute: #> --8<---------------cut here---------------end--------------->8--- --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 30 17:18:19 2024 Received: (at 68747) by debbugs.gnu.org; 30 Jan 2024 22:18:19 +0000 Received: from localhost ([127.0.0.1]:37040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUwQt-0007WG-Ee for submit@debbugs.gnu.org; Tue, 30 Jan 2024 17:18:19 -0500 Received: from jpoiret.xyz ([206.189.101.64]:35540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUwQr-0007W8-SK for 68747@debbugs.gnu.org; Tue, 30 Jan 2024 17:18:18 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id B5EFF185453; Tue, 30 Jan 2024 22:18:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1706653087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=htU4gJG0zh3VOiHURu8lwJ/83CW/f9Nzxig0HemUMJM=; b=Yg7yrWhkt3GKBP/eC8qjks+gTOOSmeawU7miZasfqbRWVUug0zFjLYu9FURZYjbD7RsvSR WVl6Sca9WkRFqA11u43pRQNUaox80I76PFGw/BzbXQKu+YwcheenUYQg69cKe+prpQBSOv sdRd8UCjgXPCrFU0k77DOLppWCDIh/FRehIMQ1UUhuULnluXFYV8tF8PEjFnNK2QJlga+D pQSoyY4snPBvxnHLOxQuvSP/QM5R2ZS/uWs566trt0Ki8NbYC4LfKzmpxI99a7Tgp3LhL3 YUJlPe2JIupXgU5lC3iPtqddDjlqhtMfFVLBzdvR4ZrMz1XzfWd5Zh2d8fni3g== From: Josselin Poiret To: Maxim Cournoyer , 68747@debbugs.gnu.org Subject: Re: bug#68747: Extending postgresql-role-service-type as shown in manual leads to crash In-Reply-To: <87a5or1q0g.fsf@gmail.com> References: <87a5or1q0g.fsf@gmail.com> Date: Tue, 30 Jan 2024 23:18:06 +0100 Message-ID: <87plxizcrl.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spamd-Bar: / Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68747 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Maxim, I guess this is not explained that well, but the service-extension snippet is supposed to go under the (extensions ...) field of a record. If you want to extend this in your system config, you want (simple-service ...) instead, with e.g. =2D-8<---------------cut here---------------start------------->8--- (simple-service 'alice-role postgresql-role-service-type (postgresql-role (name "alice") (create-database? #t))) =2D-8<---------------cut here---------------end--------------->8--- Best, =2D-=20 Josselin Poiret --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHEBAEBCAAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmW5dZ4QHGRldkBqcG9p cmV0Lnh5egAKCRBQXkC5FhcaikyLC/0cSblNRGRy3Pu+S92FQXjYWIQo4/hJ/2jY 4CWkyL9/07KjC3ZbSe84QoDzL39ONadTFq/8FTWySAQmmxhodUSH1Lvj2lT/Nelo z1P9fZBe4+NdlguIVbH51Qc5illsbCf7IrX5pbShsQUw2XIpplh98xbk1x0U/7cd I5mnukBDvFCtfV8J1wte2B11biMHWYAE0nf8Lq+M+hLIBKpMZf0z2iDSwHKpxs7p hbLALTIUo/aSp5gOEaDLTk8nuj5uHDP/FKWvl1Yy6y60UFVxFYAe/36o9RMA5ZY7 nD1FwyAMRqH3RFjEWDVuaOC9p8cXH3iYQUFsoNQnZiISmo9lX35LEEQlhXkSASqh 2cYMzMw5se+rONdD7O1Udyzktw7bNcsfsBLe3YarArXQWsSXsU31WD4gzkJwTt2a U07YQxJuGbX3k86+widQLO91Y87TdiH0l6eKoMIIKPLu0mqPA0IoZGSwg44Is22X xrodPm+uGB1k+s0AO3dTTkJZ9uBHzrI= =oYmy -----END PGP SIGNATURE----- --=-=-=--