From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KJhwMwUQm2G3VwAAgWs5BA (envelope-from ) for ; Mon, 22 Nov 2021 04:35:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id KMwsLwUQm2FdHgAAB5/wlQ (envelope-from ) for ; Mon, 22 Nov 2021 03:35:33 +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 6ECDB37B12 for ; Mon, 22 Nov 2021 04:35:33 +0100 (CET) Received: from localhost ([::1]:50644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mp079-0006LY-Lw for larch@yhetil.org; Sun, 21 Nov 2021 22:35:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mp06v-0006LN-R4 for guix-devel@gnu.org; Sun, 21 Nov 2021 22:35:18 -0500 Received: from [2607:f8b0:4864:20::82f] (port=39747 helo=mail-qt1-x82f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mp06u-0002aM-9z; Sun, 21 Nov 2021 22:35:17 -0500 Received: by mail-qt1-x82f.google.com with SMTP id l8so15360455qtk.6; Sun, 21 Nov 2021 19:35:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=Z6r440J0l0BvRdV4Ii6PirF3klr7QmDCqzvXSk8oMlI=; b=C6mZgX74u8usDVwXJRUEVNaJjsQF172V4LzpcqvxsDh6M3OrtEBVWY3ggTN0QztE8A o4xX3K5wNNZ+qx7ljHBCUyvYBsZiOcLeP1UlIpc2RMs7MfRXBf/6qrveLXpL/2+I/uWf l1gLYEIpJCAIAQpGRn1K0wQzr5NJoRfmg+5X9DIUgaIMwll+NtoPjYQMokhwiqhMVR0A k4y+2DjBPR0emTxHrJELGn+5x+eCyxwFrpMCoaku34kJ/5XUKLjq+GTQFNtD6h2eWSWx quXd2fMX724ney0nVOCTWlGA5O6jvcRN5VUjJfkBo+zRSVxeCh6EZ3/B+cEhIssHTSol G6ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=Z6r440J0l0BvRdV4Ii6PirF3klr7QmDCqzvXSk8oMlI=; b=AC7w4nUM0A5ZXvtierQjTS4wUL2osTCSsnLw1tX7xwhA9VWuAs5MfqCI18qbMP3Yv+ 582hM4H96e9LW09vn8Mt9i/zChTLjo4WReHtwslVu5qp0v+rVEAX5ygqb7qcJdXMRQ8p erX8UddndWmnT2wwt5y14agtpgXluGAbyQ+YvjLmN0qP/DuCQ9o9cgLWRWrCEj8u7G6z Ey+lubY5/7x8dre6Je+RPfb1dqJTxwgKkvgbg1PwgkJi3wTZb4Pt9Tybm5/m9JNU+uf/ 8nFeb/5qsxFhZqtfaEKWSvtp1Efb/3wP7VZqS9PNTSh3DGn4nbvtcdc4JDKiJLeT7mYA wY0A== X-Gm-Message-State: AOAM533UK7kp0vKzGrZ2V16oTMXe8APfI0JF9RCqLIb4JQAZ0AS2znsS 84/++8plb6+qRvKhqZwZWELXtKFEAnCI2kAF X-Google-Smtp-Source: ABdhPJy4tfbk42GAGUdHfGU4rmCdxOy2pquA6Y8tXVy5TJewBNuKfXvEO4pW1QkOxFF09/ywxeI63g== X-Received: by 2002:ac8:74c7:: with SMTP id j7mr27755305qtr.118.1637552112446; Sun, 21 Nov 2021 19:35:12 -0800 (PST) Received: from hurd (dsl-10-148-124.b2b2c.ca. [72.10.148.124]) by smtp.gmail.com with ESMTPSA id j19sm3957595qkp.28.2021.11.21.19.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 19:35:11 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Replacing polkit by polkit-duktape on core-updates-frozen ? References: <87k0hetuty.fsf@gmail.com> <2505829.NYjHvEFHQz@popigai> <87v90rxcnr.fsf@gnu.org> Date: Sun, 21 Nov 2021 22:35:10 -0500 In-Reply-To: <87v90rxcnr.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Wed, 17 Nov 2021 12:08:24 +0100") Message-ID: <87mtlwc175.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::82f (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::82f; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x82f.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637552133; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Z6r440J0l0BvRdV4Ii6PirF3klr7QmDCqzvXSk8oMlI=; b=X7015hs1OQ2QWBySg7IQ5sDCrqoGXtKKOp3iKHg/n/NFFUim/czk/x8WxR6Pt8/Av9Sa4w fM+LoTQlmWUCtsmdYepWv6cYw5PQejRgQeR16K6ALb6zBLnw/cJzPYJL5XyxIJXRmNQ0uB wiIjKtJcLs1lxzsK9qFuJ2DKuSA0D3xSsCsHhuilAg+MJHribHNCGaTZ9ZJbjOdyjKwJo5 YP2REUrcIo5xjvSHTDKvrb4HGeM7noNjeSgh18QEydteOv2AZ3ZltK0Gm2p7VGJm+rRPLD u5w4J3UVB13lKyQibkaqNPXyELBSGH9UVqBaEA29COkK+dD7ZQNDQCPKsi/PEA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637552133; a=rsa-sha256; cv=none; b=Z+TBH4M5fr/VxBC0+NNMxQgzsekivBGOPApabUWlIp+I4Lplk8IoifGZGC1/l2Qzp0h9EQ nYa2XKw6WanilHjpKZZ6QZfi3FS9qOPj9q6P1h+Mmt3akAfS+BP2j6/yKDm/KyBBnK9TcZ 5iPz3anv0gFpKw66jzazHQ03eAIK5l/KRDEwWDh0th8C6H/BPTI0cw4iWEdu7HqUGSJM0p /tZXgvSg9WEh1y6sUy8HS/KWvT2bhkysxW1M/Z/1y+Y4x474PWxR+UgHiwFZRG91yJKcMi wlMtPtdgdX+Ed/M3lukAwgefK2WQTbq+PXMQhPpV4mM0G9q50+KgI0+YtdBycQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=C6mZgX74; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.78 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=C6mZgX74; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6ECDB37B12 X-Spam-Score: -0.78 X-Migadu-Scanner: scn0.migadu.com X-TUID: Xwr1+/JAjTHI Hello, Ludovic Court=C3=A8s writes: > Hi, > > Thiago Jung Bauermann skribis: > >> Em quinta-feira, 11 de novembro de 2021, =C3=A0s 15:23:37 -03, Maxim Cou= rnoyer=20 >> escreveu: >>> Hello Guix! >>>=20 >>> I've finally merged the core-updates-frozen-batched-changes to >>> core-updates-frozen.=20 >> >> Hooray! >> >>> One thing we could do in the meantime is to replace our polkit package >>> with polkit-duktape, which uses an (unmerged) patch to build polkit >>> against duktape rather than mozjs [1]. The patch seems to have garnered >>> some attention recently. This would enable to build GTK and parts of >>> GNOME without rust, I believe. >> >> I=E2=80=99d suggest replacing polkit with polkit-duktape only for non-x8= 6_64=20 >> architectures. What do you think?=C2=A8 > > Yes, that seems like the most reasonable option. How do we do this, though? I tried to make it so that referring to the 'polkit' *variable* would always expand to something supported (switching between vanilla polkit and polkit-duktape variant based on the system): --8<---------------cut here---------------start------------->8--- 1 file changed, 38 insertions(+), 27 deletions(-) gnu/packages/polkit.scm | 65 ++++++++++++++++++++++++++++++++++++++--------= ------------------- modified gnu/packages/polkit.scm @@ -48,7 +48,7 @@ (define-module (gnu packages polkit) #:use-module (gnu packages qt) #:use-module (gnu packages xml)) =20 -(define-public polkit +(define-public polkit* (package (name "polkit") (version "0.120") @@ -151,32 +151,43 @@ (define-public polkit ;;; Variant of polkit built with Duktape, a lighter JavaScript engine comp= ared ;;; to mozjs. (define-public polkit-duktape - (package/inherit polkit - (name "polkit-duktape") - (source - (origin - (inherit (package-source polkit)) - (patches - (append - (search-patches "polkit-use-duktape.patch") - (origin-patches (package-source polkit)))))) - (arguments - (substitute-keyword-arguments (package-arguments polkit) - ((#:configure-flags flags) - `(cons "--with-duktape" ,flags)) - ((#:phases phases) - `(modify-phases ,phases - (add-after 'unpack 'force-gnu-build-system-bootstrap - (lambda _ - (delete-file "configure"))))))) - (native-inputs - (append `(("autoconf" ,autoconf) - ("automake" ,automake) - ("libtool" ,libtool) - ("pkg-config" ,pkg-config)) - (package-native-inputs polkit))) - (inputs (alist-replace "mozjs" `(,duktape) - (package-inputs polkit))))) + (let ((base polkit*)) + (package/inherit base + (name "polkit-duktape") + (source + (origin + (inherit (package-source base)) + (patches + (append + (search-patches "polkit-use-duktape.patch") + (origin-patches (package-source base)))))) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:configure-flags flags) + `(cons "--with-duktape" ,flags)) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'force-gnu-build-system-bootstrap + (lambda _ + (delete-file "configure"))))))) + (native-inputs + (append `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config)) + (package-native-inputs base))) + (inputs (alist-replace "mozjs" `(,duktape) + (package-inputs base)))))) + +;;; Define a top level polkit variable that can be built on any of the +;;; supported platforms. This is to work around the fact that our +;;; mrustc-bootstrapped rust toolchain currently only supports the x86_64 +;;; architecture... +(define-public polkit + (if (string-prefix? "x86_64" + (or (%current-system) (%current-target-system))) + polkit* + polkit-duktape)) =20 (define-public polkit-qt (package --8<---------------cut here---------------end--------------->8--- it builds, and doesn't seem to break things, but: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build --system=3Daarch64-linux \ -e '(@ (gnu packages polkit) polkit)' -n \ |& grep polkit /gnu/store/dw11y85xfsb8hcg7w2cw57f1xfs4i74m-polkit-0.120.drv /gnu/store/ric7yf4ra2p14p29fwsh18m1nakciakv-polkit-0.120.tar.xz --8<---------------cut here---------------end--------------->8--- suggests it isn't working. Ideas? Thanks! Maxim