From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2I3AJF7H7Wb5UAAAe85BDQ:P1 (envelope-from ) for ; Fri, 20 Sep 2024 19:05:02 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2I3AJF7H7Wb5UAAAe85BDQ (envelope-from ) for ; Fri, 20 Sep 2024 21:05:02 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=FKZrw2sP; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=juLkFoYx; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726859102; 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=0bWR2krmzD221EFq5rP/IpgjBZZyPz9xyoT9/ogyu0k=; b=OoAzAAFBHEzkz8uLgW+YByWwLUbryxnlSqzauOuRBSaYd7khLgFed08iPPlB5xkvG5aKjR MxiL5Y9UUGrtKfCLgt+E664iTgk8iNfZgHTzkYunKCwf1O6lGGQ86Uteil8WC3cqOHfZXM gRfi0UuwwwmM4oJIPZ3r7bCwix1yCuREQxhnsevTcYCpzlipozWyFY3meGJbICRH819Gbk GWi6tNoNcBFycfoBgLHgIJAcrlR9y7cH0BSr/2CDdbEEPR3HQosaCFB0W4pGgPZrHolfHf Ttgf4P9m5gpqpKQl6CVwtH53lKsiUplfM7/p0T2BVpBtIvv77e0AQHILgUnXqg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726859102; a=rsa-sha256; cv=none; b=tofGfvvnxNuOiwmTQhGVF37+ynJAK8rBgjC4e3nFYKUUVN8lhFgciqBzQ0pXwsnteJiTFe o/d5ZY+Em7IOhRCvxbGZX4/LWqIVVtoBgGlGdDwVfJnJjJG0cCgM9rA/cmUK5MUizz7uzC d0RGC+s5Aqhcbx98USI6Jb1Y6vEScmaHz83j6XvGFQLCTq4ShsrpiPGj8XOJDs4GoJkexT aR8bigcTGSfEOO//LcZ6Bwv7R8A73Do691UPVf/6N/WvWw+kTY/9iYzGpe2u3qq9u/WI5w XHJO/tSdNQxEVdUs0OMK2vWqTsV3uRKgH6/iUd9BJSkdGaMS3OGIvcuzzgdGnQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=FKZrw2sP; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=juLkFoYx; dmarc=pass (policy=none) header.from=gnu.org; 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" 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 04DBF6AB2D for ; Fri, 20 Sep 2024 21:05:01 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srivw-0003j9-RR; Fri, 20 Sep 2024 15:04:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srivu-0003ib-P8 for guix-patches@gnu.org; Fri, 20 Sep 2024 15:04:46 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1srivt-0001mF-7V for guix-patches@gnu.org; Fri, 20 Sep 2024 15:04:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=0bWR2krmzD221EFq5rP/IpgjBZZyPz9xyoT9/ogyu0k=; b=FKZrw2sP8zGLFzbzSnOKuyScnY8lqD5LeYE7MPnhMuMuJGM5EtGsoDijHUIwj88XJh9MVNp5dmmTJBy/9VgUUEWobQmyt6pcwSOT6u1vjniO5LrQNIXruVczyAzCPgeJ7El9IbC65mzNU52ItA6EcfOxceWk15G4BcLkQLciwsloYEeMzrmmwqoiqT3lSP+cstsDQj2EUQj/9NwoIEfoxATNwb1CQHq4xsNDTeDNFZyjpS7BT6VPP2j06VOeKC3mlcH1VhDQrNxJ7R0y+Q9XiVDtXz5Qxqbg31RoeqMotJwvEzSOUOqz7cENy6M1BQsQA7Reczeogb7g5raQeEbRWA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sriwC-0005vj-AI for guix-patches@gnu.org; Fri, 20 Sep 2024 15:05:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73393] [PATCH 2/2] services: sane-service-type: create lock path for plustek backend Resent-From: neox Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 Sep 2024 19:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73393 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73393@debbugs.gnu.org Cc: Adrien 'neox' Bourmault X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172685908722726 (code B ref -1); Fri, 20 Sep 2024 19:05:04 +0000 Received: (at submit) by debbugs.gnu.org; 20 Sep 2024 19:04:47 +0000 Received: from localhost ([127.0.0.1]:36364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srivu-0005uS-J3 for submit@debbugs.gnu.org; Fri, 20 Sep 2024 15:04:46 -0400 Received: from lists.gnu.org ([209.51.188.17]:54886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srivt-0005uK-6g for submit@debbugs.gnu.org; Fri, 20 Sep 2024 15:04:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srivZ-0003gq-45 for guix-patches@gnu.org; Fri, 20 Sep 2024 15:04:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srivY-0001lF-1W; Fri, 20 Sep 2024 15:04:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=0bWR2krmzD221EFq5rP/IpgjBZZyPz9xyoT9/ogyu0k=; b=juLkFoYxoCo4XaSikYQH SfGQ9deJm2R29hPLnMw6xWK+9Ibh+wFCw+FvV+Fd9BWutHtZ9JSqHDs4dNeGsNL3pDELQ+PmxW1p2 vaKbYWqtDlaS1SxLfK+GOOOkrutEOCvtzjo+dgnQtrs7bvfXK3lrwcjzHacCdWU+XH0lDr29janOA NVvEirwkeNAIibmAT2qT4nYreUTxItkgb5MQ+DCfLhKBOwdRM/yFTduWBexlqRdqUgMvX+PW+IcwL m2I2k63JZIlnR+0+snT+Ix+eDt+ycYpOL9QHLhHX8Awn2kadFH3xATr2hmXHweb/FtYAVGDZkOiWf i8O9MzO1ax5NCw==; From: neox Date: Fri, 20 Sep 2024 21:03:33 +0200 Message-ID: <3ad4ed8a692d86a9bef0b2ea56921ae2bf882957.1726827449.git.neox@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -5.51 X-Spam-Score: -5.51 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Queue-Id: 04DBF6AB2D X-TUID: jHR41wt1NlXC From: Adrien 'neox' Bourmault * gnu/services/desktop.scm (sane-service-type): extend with an activation service to create the lockpath and give the right permissions Change-Id: I187886d12b5f0b4fe21b03de178ea2187205387a Signed-off-by: Adrien 'neox' Bourmault --- gnu/services/desktop.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 274aeeef9b..9eae4178fb 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1408,6 +1408,17 @@ (define %sane-accounts ;; The '60-libsane.rules' udev rules refers to the "scanner" group. (list (user-group (name "scanner") (system? #t)))) +(define %sane-activation + #~(begin + (use-modules (guix build utils)) + (let ((lockpath "/var/lock/sane") + (gid (vector-ref (getgrnam "scanner") 2))) + ;; Create the lock directory at runtime and give right perms + (mkdir-p lockpath) + (chown lockpath -1 gid) + (chmod lockpath #o770)) + #t)) + (define sane-service-type (service-type (name 'sane) @@ -1418,6 +1429,8 @@ (define sane-service-type (default-value sane-backends-minimal) (extensions (list (service-extension udev-service-type list) + (service-extension activation-service-type + (const %sane-activation)) (service-extension account-service-type (const %sane-accounts)))))) -- 2.46.0