From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KNntCypL92I4KAAAbAwnHQ (envelope-from ) for ; Sat, 13 Aug 2022 08:56:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kEMXCypL92IT2wAAG6o9tA (envelope-from ) for ; Sat, 13 Aug 2022 08:56:42 +0200 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 9BFFB275F9 for ; Sat, 13 Aug 2022 08:56:41 +0200 (CEST) Received: from localhost ([::1]:44036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4a-0005dC-KJ for larch@yhetil.org; Sat, 13 Aug 2022 02:56:40 -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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660373801; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=OFy/XpNwdYperVaJc3PNBDp3Ic3SuFkYjOztPEosXpQ=; b=G+MIy5uuUK7Y6q8vvAiOrM3UcmsFSOPk/nvALe7Tz9VZxKomubvl8j0PPFm0d3DrJeRgSF L+KUZcGRGiVSApFR2lPH5cdE5tiIglVffYob7TTSn6sucOOy3bysDRY/4IDLvxdTlmPpIR bzxp/Qz5+RNuO+j9Ug3Kivj3vKVhdMEtzedUwQi9FQHs2Gv/F9CvJDpgCQzUUkOZAVqNcS 1ESZNwBxEScpkbkFb1CkUIdmIp4BBt2ZAUG7uKkNQiGuqaIBCi6GCVQ0mJwJBoS0kxP4X4 uacUEVTT8KhU3F/bhs/OyIE+tml/ay5vcI8ZbgqFxzMvoUJuwLGRTLSwaNMkUQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660373801; a=rsa-sha256; cv=none; b=CErY6QK8SbckKzGvxKERYZho7gc3x9fbaDJQe7b962GpyuVtr69b02XGaUzstmqvFEWK51 RBmfRJzAplo5/Fl/7rexOjFz2p9w36TmATJvHg7j0UPLrhoNu/PJoh91zh3FhUewLtAr7X ntmpomT9vE0LIZP7xAGCUoAEo3hKS+GAaGpAKNb3ZAYs7ssiPyAmZmsWNb3q1HZA7AM02n PI4TAVYIVC83hKtKei0INhNxFk/B89TaTApcAA7ScDsUCch0X8BCcEXELxbgsMI7BEnjn7 AXL/i2bbcgvtncTgNfKfKNuqIhl7lvUq5lrc99/qv7KyTGakrCXMcw7sT4UD3Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=EHuqUZtQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 7.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=EHuqUZtQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9BFFB275F9 X-Spam-Score: 7.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: b5Fjx2ukp+G7 * 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); -- 2.36.1