From patchwork Sat Aug 13 06:54:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41596 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E5D8D27BBEA; Sat, 13 Aug 2022 07:56:45 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 62DE527BBE9 for ; Sat, 13 Aug 2022 07:56:45 +0100 (BST) Received: from localhost ([::1]:44036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4e-0005dC-Ez for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:56:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl32-0004LU-R2 for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41528) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl30-0006GG-Rv for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl30-0006ol-MJ for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 03/14] gnu: accountsservice: Provide a means to locate extensions. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037369426137 (code B ref 57168); Sat, 13 Aug 2022 06:55:02 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:54:54 +0000 Received: from localhost ([127.0.0.1]:59500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2r-0006nI-H6 for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:54 -0400 Received: from mail-qt1-f181.google.com ([209.85.160.181]:41911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2m-0006mA-2m for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:50 -0400 Received: by mail-qt1-f181.google.com with SMTP id c20so2283975qtw.8 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=OFy/XpNwdYperVaJc3PNBDp3Ic3SuFkYjOztPEosXpQ=; b=EHuqUZtQKOwC7A5sPNtmfkMMNhC/qVFw9ZdAji+pWZAxgK0MHcPK0TsEx7AX6jcWQo n/UOKi7anL4NmlVCoW2j2KYExOAF4ARnFq+dh9MHnNwbeq4ZyGDxzNLr3LZ3UxcRa9mz VDDNKF5XBlt2/qiY1BWCoNMLsUkS8LA27s3TDId0jnlagAkAyFwihH7YqhS1wBJJZydV kWo+fVEnu1jxde9LaYz7DxpM6AKIyH8n1ZbTtODslt487wwAeOfGOrjOq/qIpVq20kcz zX7vGVz+YKGAy0KIrAryywNb2YmYzrKJrjLc70/YMUrNe3fFsnNq1tgVgqytiUHF6Vq+ 9XRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=OFy/XpNwdYperVaJc3PNBDp3Ic3SuFkYjOztPEosXpQ=; b=scme8f3gK8Q4TbL5m4Te8NDVFUcgL48EN8Krn8BYBDrEh5AdAqL1NVkQ8J7y6EAQTc kASUFa0iAAz/pdpz6lTmqV1uzgiND0MQ/wEsUkXLk1JUSF59K/4M+lRzQbrBXVsd70a6 7ijkzJTb20f8ca9zz5jTTovEQ1/7uUxPgjGOVFPMyMGZ+KvYfn4f44EfXTaXiGIsORF7 fxfj2fLkh7NMgWPRNbZ6PfNHohX3+tPsoLsxFw1GslAEONwOtYJI53gCeaf/f7isHNaR RZdo2rVOfAssb8c0ec44mBOxxryBCKu9lLc33gIdeNsYLoELrrIEy8vYNiVwQvTCxOW7 nXhQ== X-Gm-Message-State: ACgBeo2s92hB9YAdky2p44DBN9xUVPyHjBrskTFuPyCgT3fLWqndw3JP fO+J5jH1s+GeWSWg5mmZgdb/eKLpMCo= X-Google-Smtp-Source: AA6agR47vvik7YEfewQ/XEvtuL9QUK7WMI0muyE/yfylm5a3aQSXCFIsPWf8IDuTHVlm8EjZHHD7JQ== X-Received: by 2002:a05:622a:1989:b0:344:52ff:66e6 with SMTP id u9-20020a05622a198900b0034452ff66e6mr407783qtc.76.1660373682477; Fri, 12 Aug 2022 23:54:42 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:41 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:22 -0400 Message-Id: <20220813065433.27319-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/accountsservice-extensions.patch: New patch. * gnu/packages/freedesktop.scm (accountsservice)[source]: Apply it. [phases]{wrap-with-xdg-data-dirs}: New phase. --- gnu/local.mk | 1 + gnu/packages/freedesktop.scm | 12 +++++++-- .../patches/accountsservice-extensions.patch | 25 +++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/accountsservice-extensions.patch diff --git a/gnu/local.mk b/gnu/local.mk index 2d32d85d47..c2a33fa7d1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -840,6 +840,7 @@ dist_patch_DATA = \ %D%/packages/patches/abseil-cpp-fix-strerror_test.patch \ %D%/packages/patches/adb-add-libraries.patch \ %D%/packages/patches/adb-libssl_11-compatibility.patch \ + %D%/packages/patches/accountsservice-extensions.patch \ %D%/packages/patches/aegis-constness-error.patch \ %D%/packages/patches/aegis-perl-tempdir1.patch \ %D%/packages/patches/aegis-perl-tempdir2.patch \ diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 8ebd0e5359..ab6fb480a7 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -1443,7 +1443,8 @@ (define-public accountsservice "accountsservice/accountsservice-" version ".tar.xz")) (sha256 - (base32 "14d3lwik048h62qrzg1djdd2sqmxf3m1r859730pvzhrd6krg6ch")))) + (base32 "14d3lwik048h62qrzg1djdd2sqmxf3m1r859730pvzhrd6krg6ch")) + (patches (search-patches "accountsservice-extensions.patch")))) (build-system meson-build-system) (arguments `(#:configure-flags @@ -1479,7 +1480,14 @@ (define-public accountsservice (("/usr/bin/passwd") (search-input-file inputs "bin/passwd")) (("/usr/bin/chage") - (search-input-file inputs "bin/chage")))))))) + (search-input-file inputs "bin/chage"))))) + (add-after 'install 'wrap-with-xdg-data-dirs + ;; This is to allow accountsservice finding extensions, which + ;; should be installed to the system profile. + (lambda* (#:key outputs #:allow-other-keys) + (wrap-program (search-input-file outputs "libexec/accounts-daemon") + '("XDG_DATA_DIRS" prefix + ("/run/current-system/profile/share")))))))) (native-inputs (list docbook-xml-4.1.2 docbook-xsl diff --git a/gnu/packages/patches/accountsservice-extensions.patch b/gnu/packages/patches/accountsservice-extensions.patch new file mode 100644 index 0000000000..2cfab580e3 --- /dev/null +++ b/gnu/packages/patches/accountsservice-extensions.patch @@ -0,0 +1,25 @@ +Patch from NixOS retrieved from +https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/libraries/accountsservice/drop-prefix-check-extensions.patch. + +diff --git a/src/extensions.c b/src/extensions.c +index 038dcb2..830465d 100644 +--- a/src/extensions.c ++++ b/src/extensions.c +@@ -121,16 +121,7 @@ daemon_read_extension_directory (GHashTable *ifaces, + continue; + } + +- /* Ensure it looks like "../../dbus-1/interfaces/${name}" */ +- const gchar * const prefix = "../../dbus-1/interfaces/"; +- if (g_str_has_prefix (symlink, prefix) && g_str_equal (symlink + strlen (prefix), name)) { +- daemon_read_extension_file (ifaces, filename); +- } +- else { +- g_warning ("Found accounts service vendor extension symlink %s, but it must be exactly " +- "equal to '../../dbus-1/interfaces/%s' for forwards-compatibility reasons.", +- filename, name); +- } ++ daemon_read_extension_file (ifaces, filename); + } + + g_dir_close (dir);