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 ms0.migadu.com with LMTPS id 2B2pJFq5nWGc6wAAgWs5BA (envelope-from ) for ; Wed, 24 Nov 2021 05:02:34 +0100 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 UBprIFq5nWE5FAAA1q6Kng (envelope-from ) for ; Wed, 24 Nov 2021 04:02:34 +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 181E732D27 for ; Wed, 24 Nov 2021 05:02:34 +0100 (CET) Received: from localhost ([::1]:50236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpjUP-000284-6K for larch@yhetil.org; Tue, 23 Nov 2021 23:02:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpjU7-00027q-HE for guix-devel@gnu.org; Tue, 23 Nov 2021 23:02:15 -0500 Received: from [2607:f8b0:4864:20::735] (port=33696 helo=mail-qk1-x735.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpjU5-0001d8-BF; Tue, 23 Nov 2021 23:02:15 -0500 Received: by mail-qk1-x735.google.com with SMTP id de30so1523388qkb.0; Tue, 23 Nov 2021 20:02:12 -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; bh=u73FQZi35p5zlWiY/qTqFhPY9g9HJ9WCYiRHV4NSM08=; b=ZfZygojf+4VU381H2+Nt8Ly3MVsNwQGdNT0OQdEXsq/0AN4zmpow/YaPUusdu/mz17 P1S4Y3t1J6rD3plz7RdwlK+xSWmSdx6REoIQqEeFJE7cqctB4XqrAqHgubmDTYsvvZZ7 cTxuSkT5xW4RIJo3hwG6/7tFzS5qqjMTJoPwCcQJSJulbSyQIq6u+1qxKb5/WhRAge5+ d/EiJ5hFvHFh8CQsVNAr+kPbU9qNgZdlJbrRlbGKRPylRkM4iWCg2ASfAlsiqmJBxiAE ImuWBq8HmDDU3PYFZZncfuyux8Y9sCYjYmHHtp/Dnkt+CaU9pNh8kq36MGeTwsjWaN5a afng== 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; bh=u73FQZi35p5zlWiY/qTqFhPY9g9HJ9WCYiRHV4NSM08=; b=6MhMVukGozrKVcpqh5dToGXzT9yQFHubsLN0V7SN0cB4GgGLON0bOuJcqJf8GhHK2Z 89uy4VYxRQpokbEN43mrpVLvMBVgKfhJzmMf6Iah4dD1B9LGv7dm2ZFLMD2SiC1GNflM cdAtFjL02PpIOoZNr6unNyKKBjo5jBKYV0nbUtUpc/UnwG3U1TZo3dRfg63XR2HP8ru7 h6UvR/mJMX88r2YtWJrarHjhfCOb7xKNzxe/xEEL1Vs5b+ESGtzsxOm3ewGuVgidGR82 jPIroCL0iMfEm2hY9ph8OePwchhVUEJ3zWkAKv7h8YrnCidVO+GIZbI0Rc0XCKrTIfSH KBFA== X-Gm-Message-State: AOAM532nRYwZfaWc9loSqmbL3XyZTc7s7GAwqxrIcC3VLjdQxlEawgNg eDeVwcooREBiEyoMJ5QD86H0D2eA1zRTqw== X-Google-Smtp-Source: ABdhPJwMaKNtj3gqG5UqhQHWowo9+lePBWXqj7xJhbjDBlg4ED6ZFouk1N7DsPab9/c2yvM5s9wUOg== X-Received: by 2002:a05:620a:404c:: with SMTP id i12mr2775348qko.298.1637726531607; Tue, 23 Nov 2021 20:02:11 -0800 (PST) Received: from hurd (dsl-149-45.b2b2c.ca. [66.158.149.45]) by smtp.gmail.com with ESMTPSA id y9sm7645466qko.74.2021.11.23.20.02.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 20:02: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> <87mtlwc175.fsf@gmail.com> <87a6hwnwqn.fsf@gnu.org> <871r37c48o.fsf@gmail.com> <87lf1eiyel.fsf@gnu.org> Date: Tue, 23 Nov 2021 23:02:10 -0500 In-Reply-To: <87lf1eiyel.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 23 Nov 2021 18:18:10 +0100") Message-ID: <87h7c219rx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::735 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::735; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x735.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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637726554; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=u73FQZi35p5zlWiY/qTqFhPY9g9HJ9WCYiRHV4NSM08=; b=nkATFJ49XQmWQxZsWsMLhdCB8FOfBbXQdgsDboo1Fhpqp3holMCeq264dve5UeUEPASNuq 89dJegzwv7C7OH7QVU71qra3wnoIWEB3pDaQOKZvx3gJqP2preb6UZRQNEXHxtDcyZVnWt tEZB8ujD3Zsb7+4gdvfX7wgq4UoKehviqCc9SypOw6yfsW3FCGkCB8bXDbcomK8tSEu6GO Oh9mdzl3J+1dqfQsP590LwGM115o28hcbb1tckuAbh9uqXXypbGJnLQ7+wnn8QUJuFJGoD i/e2IO55r3i4f9hvSTKx4vo3u/0u+RUgcQlCEZ0UGzuepXlKxVDv+xqwg/Amag== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637726554; a=rsa-sha256; cv=none; b=GwVM+vaq16FFq8UYKsbHOC58UO+uokvtKefMvcG9u74JJXpK0dMsjar7+DKZXTuWIANFGn 8nWYQl2JgI85K82ZA5nzPWzIx7dqFy1puLKhlucY8W+/uvQxdAAY/nnODzmHM/uUSCIuS3 xy7IVEUdzdFdGukG6EoPaWSV9nTzjZZ/bbitgkYeCNs+kvAFuA3EYMFtHIwKFSRWuUUYjY YIpJxqfvbd4gSbLkHGruIyGyfR4tUM2/LFx18UVm0axZuFdamLVxgjslo03OOXc/Lahp9o s2OR1CIENj51KZFGibE/7eT+Xobl0VUyAm9CzZPPhUu+saVTSOQyF5OI7lKrEg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ZfZygojf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -0.79 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ZfZygojf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 181E732D27 X-Spam-Score: -0.79 X-Migadu-Scanner: scn1.migadu.com X-TUID: tem3YE0z1uyn --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >> gnu: polkit: Define polkit package variable based on architecture. >> >> * gnu/packages/polkit.scm (polkit): Rename to... >> (polkit*): ... this. >> (polkit-duktape): Adjust to inherit from polkit*. >> (polkit-for-system): New procedure. >> (polkit): New variable. > > LGTM! > >> But my "test" fails the same: >> >> $ ./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 > > That=E2=80=99s expected because here you=E2=80=99re effectively calling > (%current-system) from the top level, and that=E2=80=99s x86_64. > > A good test is to try and build one of its dependents: > > guix build -s aarch64-linux gnome-control-center -n > > should list polkit-duktape. Arf, here's what it throws, after adding the missing polkit export: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build -s aarch64-linux gnome-control-center -n guix build: error: gnu/packages/gnome.scm:5299:2: package `colord-minimal@1= .4.5' has an invalid input: ("polkit" #) --8<---------------cut here---------------end--------------->8--- I don't see how it's different from pkg-config... Ideas? > Are we done and ready for merging once this patch has been applied to > =E2=80=98core-updates-frozen=E2=80=99? Mostly, after applying fixes from jpoiret for GDM icons I believe (thanks!); I'll also have to debug why my GDM-less desktop won't allow me to login anymore (https://issues.guix.gnu.org/52051). Thank you! Maxim --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-polkit-Define-polkit-package-variable-based-on-a.patch >From 48730390fbfa618216c9e8db65643755ff585175 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 21 Nov 2021 22:20:35 -0500 Subject: [PATCH] gnu: polkit: Define polkit package variable based on architecture. * gnu/packages/polkit.scm (polkit): Rename to... (polkit*): ... this. (polkit-duktape): Adjust to inherit from polkit*. (polkit-for-system): New procedure. (polkit): New variable. --- gnu/packages/polkit.scm | 76 ++++++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 28 deletions(-) diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm index c9edc53cf5..a1bf9786fd 100644 --- a/gnu/packages/polkit.scm +++ b/gnu/packages/polkit.scm @@ -29,6 +29,7 @@ (define-module (gnu packages polkit) #:use-module ((guix licenses) #:select (lgpl2.0+)) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix memoization) #:use-module (guix utils) #:use-module (guix build utils) #:use-module (guix build-system cmake) @@ -46,9 +47,10 @@ (define-module (gnu packages polkit) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages qt) - #:use-module (gnu packages xml)) + #:use-module (gnu packages xml) + #:export (polkit)) -(define-public polkit +(define-public polkit* (package (name "polkit") (version "0.120") @@ -151,32 +153,50 @@ (define-public polkit ;;; Variant of polkit built with Duktape, a lighter JavaScript engine compared ;;; 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 polkit-for-system + (mlambda (system) + "Return a polkit package that can be built for SYSTEM; that is, either the +regular polkit that requires mozjs or its duktape variant." + (if (string-prefix? "x86_64" system) + polkit* + polkit-duktape))) + +;;; 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-syntax polkit + (identifier-syntax (polkit-for-system + (or (%current-target-system) (%current-system))))) (define-public polkit-qt (package -- 2.34.0 --=-=-=--