From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wIZ+F5sAnGHUTAEAgWs5BA (envelope-from ) for ; Mon, 22 Nov 2021 21:42:03 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id UG8ZE5sAnGESQAAAbx9fmQ (envelope-from ) for ; Mon, 22 Nov 2021 20:42:03 +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 ED36EC93D for ; Mon, 22 Nov 2021 21:42:02 +0100 (CET) Received: from localhost ([::1]:45212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpG8Y-0006W1-3T for larch@yhetil.org; Mon, 22 Nov 2021 15:42:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpG8N-0006Vt-LA for guix-devel@gnu.org; Mon, 22 Nov 2021 15:41:51 -0500 Received: from [2607:f8b0:4864:20::733] (port=37776 helo=mail-qk1-x733.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpG8L-00081B-NI; Mon, 22 Nov 2021 15:41:51 -0500 Received: by mail-qk1-x733.google.com with SMTP id m186so4921676qkb.4; Mon, 22 Nov 2021 12:41:48 -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=u3fSNhPPD3CjXDy01U6zupUAcQMCeSQOIpTDuMWMJSg=; b=W3AXSHlDHuCXQtvCGrZJEV+ipN1hAviGQNZHQFoUJAFPY/XEtpEUCJQ1Ci+BADBgdv uBGYrp4xjVFB7eEpwZ3FPT6AIy8TcUxr6JRyMSBUp3OTgf7ma/4BIviCMFngO2IaYSl1 4x0yro5eHvPRbypttsZxowQsFExQAIJatKI7Wp/J5xjlR6yzUA9+7Ie0rNNaqzhY4uop RhFAfVXalHC2UoXIzUKs5Qju3JhFmvis79o96sGhr7swmIpMtfU+hpJPPeTiw+S8O0Cf 4HndABx/aaqQtzSC95Ym6wgWRoXXwv/1hX91fMOOEZuiKOSByeFcfArILwMZaY1j8ZRR zPKg== 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=u3fSNhPPD3CjXDy01U6zupUAcQMCeSQOIpTDuMWMJSg=; b=HMmz6InV4fknwsJgtjVWm0dPR9kqfDepiprz92p7zjynT/+Djt4cjZjEjlyrcBdSsS XUPSGUw5PXJnkxU1nIIqk1HEwiD6tdm8uzDsWzcH3AJPlCA9K5unttj/m1Gn/BE0iT2G ph9nX6/8iFJNE9jR809mBqS3ZU0xwuVpv0HUm8mT8BsuLtFEe/Dk91Gj/+YscJroCWts s9/SvV1iDvSaXYEIuLdASJWAu3yQbIAo8gNWASNn+R5hdhUd1F0P5SzMsmTH493laG29 0zRp/YsroJCn9AdLkfwiQHukc1KJTfnaWZuaOhAsSxV1/9wS11uYYJPeis+0ZJCJ0hfa c+AQ== X-Gm-Message-State: AOAM5305bkmOKCRapyO6ItbKEo8uQLQ5EMRKBWic+NeWtDo+Fl5ULTr7 ML21fybKbdfWtkcWIUyhxY/SIlP4IuXleA== X-Google-Smtp-Source: ABdhPJw8gswFLfbwNr63IVFCdVO3Wx0duIaVi+6uGY3Wg9ReN48PDR0OQbriPny9q/QOA7DQsbrvbA== X-Received: by 2002:a05:620a:400f:: with SMTP id h15mr50892786qko.226.1637613708164; Mon, 22 Nov 2021 12:41:48 -0800 (PST) Received: from hurd (dsl-149-45.b2b2c.ca. [66.158.149.45]) by smtp.gmail.com with ESMTPSA id s11sm5326771qki.95.2021.11.22.12.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Nov 2021 12:41:47 -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> Date: Mon, 22 Nov 2021 15:41:43 -0500 In-Reply-To: <87a6hwnwqn.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 22 Nov 2021 14:30:40 +0100") Message-ID: <871r37c48o.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::733 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::733; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x733.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=1637613723; 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=u3fSNhPPD3CjXDy01U6zupUAcQMCeSQOIpTDuMWMJSg=; b=M11a0ZhFl5L7jKwjuJkjnuW8zKV0vuO1/qfwqVmpThJh6hRlaCk6Nb1p5R0fhEMQ7DG/3l e/QOVcTbK3cpQ85Ua9Z3TVZ37OwyVsoDqA4NDqGUCv1Sug8AXFBlezJPzA1hjTF8SIe8oW i1lawUIfjQLhjgIKbW5bwMBBoAkHFF6gIPajbM6Jku40/ZPWRdpPT50FkUVO1Rq0eQlPJK tNtspmnzkZa4sJkTfR4/I2ULmAEKIy6+o3HQcfXClixPQbzA5LCMXcEOZ3a8WDGQAaiYCZ rhB1KOzxh7i+92vHmS/z3QwlHVey/CZeUzLNAeK5xjH92tAVa8scv9CZ9Ho6LA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637613723; a=rsa-sha256; cv=none; b=F5fvTvuDxWMzZNwm8byGn1QySH1b3LW9bKAZdIMZA8toOx/VUrKLyYYHZfaxBJr4z/UMHN awMXQptMLdm1F1gnhyJ6NLSIuN2mvjVRSRh7fx+UA0OaCDbYVkSmcjl28skAT6xqt5ss3G 5MiHLPRKgLUqh/6/Gt/OeoRzmG3S0IyC5XrmDulg0yD3isHznwKIuGhgEm3SBYsaafXO5e /bWBQHIgt2H5udB8bbPB7k3YY1Sq6mj7rzcOhyunnUaSLhqkOz9WDdxJ8M73JBjomh7VHN rQ5mlkQkqJV8XpotyBARoFD2zefv77DUyi8IzdFBlFJ+2V2uJ1UlP0BZvzOr0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=W3AXSHlD; 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.78 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=W3AXSHlD; 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: ED36EC93D X-Spam-Score: -0.78 X-Migadu-Scanner: scn1.migadu.com X-TUID: Jn7FgR07EhNO Hello again, I've now tried this: --8<---------------cut here---------------start------------->8--- 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. 1 file changed, 44 insertions(+), 27 deletions(-) gnu/packages/polkit.scm | 71 ++++++++++++++++++++++++++++++++++++++++++++--------------------------- modified gnu/packages/polkit.scm @@ -48,7 +48,7 @@ (define-module (gnu packages polkit) #:use-module (gnu packages qt) #:use-module (gnu packages xml)) -(define-public polkit +(define-public polkit* (package (name "polkit") (version "0.120") @@ -151,32 +151,49 @@ (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 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-system) (%current-target-system))))) (define-public polkit-qt (package --8<---------------cut here---------------end--------------->8--- But my "test" fails the same: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build --system=aarch64-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--- I'd have expected to see 'polkit-duktape' as the name of the package in the output. Thanks, Maxim