From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id cOiGEQDe7WYrfgEAqHPOHw:P1 (envelope-from ) for ; Fri, 20 Sep 2024 20:41:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id cOiGEQDe7WYrfgEAqHPOHw (envelope-from ) for ; Fri, 20 Sep 2024 22:41:36 +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=L276YdYE; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=d7qVQ7R9; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726864880; 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: 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=hc7VHbjagNnoGkqriDSZL+cvz5v/9LXxF2gvnBV503g=; b=pHoOHR8mr2QgfxPBSETdgjc/pp+FPrIdgRr5vN6s37sxoKN+CKFWJg+du+bwWYPeL/EXRu Z6YJ9HR9Ofc+K41bur2Tc+3V5OuEIz8fUmJW6F6UItG6XSKQD//DcFj8MgMGcco5NPQLba W4opL0juWg2LYVk77RVMWepVoYnipoD0UrW7IOZY8zToR/ExNPDI+42f2gkosu+9LvAoTd ljoDLB+j53ePH6QxXJEEymcqb4RhkXT7R673gk1TmZEYDtk7EP+RuVpVayrfYzgHfWtEha JELuB5S6RVNqCAE3IoVNOOdYrJ/zyWoaCeCn6SSgn2cmqG6T1255Ns7+THMsVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=L276YdYE; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=d7qVQ7R9; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726864880; a=rsa-sha256; cv=none; b=CZ2sPBOGM9jflYIUs5fT9clDDAuMooyVupGmKLQIYVKxHN+jGRTYFh/FfU9VBLD1iINxDu PfZTIV17utz70hBy7ExYRI0idrsQLl7Vrr9pLKgHUtForobQ8r6z+hxl2UR2kR+Lps78El 5eXwkNpxapLHsR5E+y/y9O86OjW1rLv66G6I1TLLt24yr4xofi4lg4bdxuaE0LEtq3ixmY zyzK8cHtRyVpTd00nS5aDvdoMnxNIsjUckfbGnC8cH3yuVZa6qvzwR8jIDhl5ScsvNWJle BWTfST6BChC1mdb2PY06NOERsg8Xbw7mkxMPnWgxFzDNaZpP2g2gVkRq8x/5Zg== 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 7CEEB28D8 for ; Fri, 20 Sep 2024 22:41:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srkQm-0007Hq-Ql; Fri, 20 Sep 2024 16:40:44 -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 1srkQl-0007HI-Q2 for guix-patches@gnu.org; Fri, 20 Sep 2024 16:40:43 -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 1srkQl-0005z0-H9 for guix-patches@gnu.org; Fri, 20 Sep 2024 16:40:43 -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=hc7VHbjagNnoGkqriDSZL+cvz5v/9LXxF2gvnBV503g=; b=L276YdYEAw0pynVRyW00qxQ6CfW1MWXifQGn9sh6/2LLZ003U3Cq44XoKQlKSa/U2sRcQeEwBMbURdGfB+KtVLPPP3hCpmzBEKmzs4x6fC0wOio05BB431ZInmgRfknKRSzQprQq95wh1dQ3HGHj1tq93CzlD3O9smiUIHXj1og/DemmOCE3RAHwJrrM5/P7BClFr6KkbXALXmqaw7HVAujVXPq+28rVow74Zu9VDRf+mAIblqZdGCyCdNKzWpJGFklbC/RKrZArBWzJDvLv5wwzELGtmjMUu+jY8LSxEukVlSjYKz/9BjllO/GeaJVpSABeiV2AUxINIXEB2X7fSA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srkR4-0002tG-Oz for guix-patches@gnu.org; Fri, 20 Sep 2024 16:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73391] [PATCH v2 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 20:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73391 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73391@debbugs.gnu.org Cc: Adrien 'neox' Bourmault Received: via spool by 73391-submit@debbugs.gnu.org id=B73391.172686485311071 (code B ref 73391); Fri, 20 Sep 2024 20:41:02 +0000 Received: (at 73391) by debbugs.gnu.org; 20 Sep 2024 20:40:53 +0000 Received: from localhost ([127.0.0.1]:36435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srkQv-0002sV-3R for submit@debbugs.gnu.org; Fri, 20 Sep 2024 16:40:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srkQs-0002sA-Ua for 73391@debbugs.gnu.org; Fri, 20 Sep 2024 16:40:52 -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 1srkQU-0005xY-Ce; Fri, 20 Sep 2024 16:40:26 -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=hc7VHbjagNnoGkqriDSZL+cvz5v/9LXxF2gvnBV503g=; b=d7qVQ7R9F2/1rjyyUGix U6025bPg2Ry8T9ESW73xhdR5hWITtq+ejjX3cyyzr8YNzjxc2vJ2/K1EwIqs137G2uldKDUsmivsF U7F/Gtl3TfGTaXSp151zVYrERDoQCx3DvAS4LT0NH7wdkyV/Rh/fw8FSMP4qUonVePFRIvvkJYgR/ pfxX9oA0XFCJhCaunPDl2jkh37ViwT/2l1JaieSX0etLYd9sO39tYyO7I3XZu+4l4nRuf8GfSLuhr lJC/8KtCGeI4UjPp9plO8XpJXTipTF1lVbPBgIsOoxx7h/GwiQ51gN76AfXaFarugsGCG9hbCDieA pyXnlM9AuKDkqg==; From: neox Date: Fri, 20 Sep 2024 22:39:30 +0200 Message-ID: <8604617ae2896e2d73d24958aab7ee534c656dfa.1726864525.git.neox@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.01 X-Spam-Score: -6.01 X-Migadu-Queue-Id: 7CEEB28D8 X-Migadu-Scanner: mx10.migadu.com X-TUID: 5A2fIdawOx3X 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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 274aeeef9b..500527cb50 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2021, 2022 muradm ;;; Copyright © 2023 Bruno Victal ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2024 Adrien Bourmault ;;; ;;; This file is part of GNU Guix. ;;; @@ -1408,6 +1409,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 +1430,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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 qFpcHjV+7mZuRgAA62LTzQ:P1 (envelope-from ) for ; Sat, 21 Sep 2024 08:05:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id qFpcHjV+7mZuRgAA62LTzQ (envelope-from ) for ; Sat, 21 Sep 2024 10:05:09 +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=FENoiL98; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=JRwuNUuv; 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=1726905909; 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: 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=/5ublfufOcudc9IjBbBZJgcwCwVNsKfI9gGUTgLELzc=; b=Bwiyzbg/40YIrOeDpSUTtP6vnOElz88FoWCgKouyd81GxnydaPJ0ptJP2qNEoTiJeRmYC2 ed2r5DVTI5xZeNr9c7Bi+ruClzLcVqAoj2S1o6kuwWCqy9BYoLdgkPvXi2JLEwdeUaPpE+ +xn7qk26pjCBSpdGQ3nGT1sPQMAUj40UkuyerWBeHeHAXUkQBwvcLmOOFriAYHf2sd4jZt CLxKrT1b/khLM/LGCG7P7cU2qZyfA8Cyis1HVL1VkSWqlN/LW6On75atB6/B5jgGOLhB2B sxdk13A+7/a6Ew/QLSqtZ+Gx8dVcBtmT9rc/H/Qf6y9LBsYomCALZMCfcidNUA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726905909; a=rsa-sha256; cv=none; b=QurB7ehGdhqBJpokZ37hppbYC4ciWeD56Vh7m1UEi5ID68KPP6W0GBJeyg0W/JULWWrAUX tMaK5NPV3xX5Q+BKPqkr0IVoqd4ZPRSS2/kuOzPHNmD0NUMKZyrRzQRzC2l9j3La6cpMMJ vwmcuYqm/2UffBfohTqmFmu3wznyY9Q9zEhjmXg6Au7PwSJB9IaBV6p8vMpts58z1ab+FC O/grsYMIjLwvHN8VDPv7xpuTxpsYLrzoml/+99DhuvTJ9A/9l4yN+lKJuFYowY8TpfyZp8 EOeDgmAENc7UInLThbSbb+TUu68RbUe9ipaeMkcWwIg6xg6/ouLqrFORTA4dHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=FENoiL98; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=JRwuNUuv; 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 43EBA135A1 for ; Sat, 21 Sep 2024 10:05:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srv6i-00026b-O8; Sat, 21 Sep 2024 04:04:44 -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 1srv6g-000262-Rs for guix-patches@gnu.org; Sat, 21 Sep 2024 04:04:43 -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 1srv6g-0007Zx-Ip for guix-patches@gnu.org; Sat, 21 Sep 2024 04:04:42 -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=/5ublfufOcudc9IjBbBZJgcwCwVNsKfI9gGUTgLELzc=; b=FENoiL98Ux3IzBZTjT8WIzYQz+9Tl1vLASeRz7ugtXtlPqKHkx7j1R1Dyfzs9JdWi8oao5VcQs78UeSPdrOuhRlfP+7wgWQNuPNsJOJ1GFXLXcWDaFrL2H/vhWcA7BqW2rwloj/xS0JN1Qd66oR9r7GcXZwRQP6dg7GVRSZzjYPa4nJy/8qy1XGHzHmwcR1q8b+rKIxvMBUVWT9Bus0niAofj9WcmLM/IFXd6AuHl/mOtdtNf92/mMNW/5RfHZAgX9g1eVSC05hDFRiWP73p7OjoHceFAx6nQyQmlt8Tp2bkpmZCmXvtDQc9mPepy7hr0i7FzqfXXR2U8g3iJx/qUg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srv70-0006XX-FO for guix-patches@gnu.org; Sat, 21 Sep 2024 04:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73406] [PATCH v2 2/2] services: sane-service-type: create lock path for plustek backend Resent-From: Adrien 'neox' Bourmault Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 21 Sep 2024 08:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73406 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73406@debbugs.gnu.org Cc: Adrien 'neox' Bourmault Received: via spool by 73406-submit@debbugs.gnu.org id=B73406.172690586125053 (code B ref 73406); Sat, 21 Sep 2024 08:05:02 +0000 Received: (at 73406) by debbugs.gnu.org; 21 Sep 2024 08:04:21 +0000 Received: from localhost ([127.0.0.1]:37010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srv6L-0006W0-9I for submit@debbugs.gnu.org; Sat, 21 Sep 2024 04:04:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srv6I-0006VW-TL for 73406@debbugs.gnu.org; Sat, 21 Sep 2024 04:04:19 -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 1srv5t-0007Xh-Mg; Sat, 21 Sep 2024 04:03:53 -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=/5ublfufOcudc9IjBbBZJgcwCwVNsKfI9gGUTgLELzc=; b=JRwuNUuvT5cbO+h0sOP+ 8XDpahv1tavqLBqz9734gZFh2H1zYIt2qkhRSDDNKNUT0mUN/pe2K1dNPQlfKJazoJjyhBlFXVMYW l2FP02i1lToNkvfwKBunXs40W8qoDKpgiXACzZiIlgQa0qaubPw/CYTDAfWtiodOiDCfg3QoHBmJz swu3tHVte0665wEWj0bLjvGs80rGBfRDg3tA5FjyqCjEY6fLPOg2lzZs36oXOY0m2YBtOye+F/I0t khFDp/pjyVkEhHMwHOshCi5oTNq6IW5lJhihSzkCjh6TfKxyHDm1d0LRKLxk2Nxe+NsrnFgSIBNic KapARR1YKmlVIg==; From: Adrien 'neox' Bourmault Date: Sat, 21 Sep 2024 10:03:48 +0200 Message-ID: <8604617ae2896e2d73d24958aab7ee534c656dfa.1726864525.git.neox@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: -6.01 X-Spam-Score: -6.01 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Queue-Id: 43EBA135A1 X-TUID: RB/x5Tgaz6HD Message-ID: <20240921080348.56uSs9wd70TXPfy5SC74ByuwfokgEZBKgdn6s-TyO3A@z> * 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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 274aeeef9b..500527cb50 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2021, 2022 muradm ;;; Copyright © 2023 Bruno Victal ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2024 Adrien Bourmault ;;; ;;; This file is part of GNU Guix. ;;; @@ -1408,6 +1409,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 +1430,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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 6Hy9Lbje72ZY0gAA62LTzQ:P1 (envelope-from ) for ; Sun, 22 Sep 2024 09:09:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 6Hy9Lbje72ZY0gAA62LTzQ (envelope-from ) for ; Sun, 22 Sep 2024 11:09:12 +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=DkrByYdB; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=o4jM4+II; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726996152; 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: 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=/5ublfufOcudc9IjBbBZJgcwCwVNsKfI9gGUTgLELzc=; b=dClweYvlwMIo2KUU5xeTD+1aQY2EeG3Y4NGUW/H3tZUN4cW5ejO6R8IQUZ+SVqONQcuLiE javAilUwEQri0f+xcheX2xcu4m9y5GTBkkzTkQGZF7P96OyNBuolkxUEkpk+l7IrkrDCbm t91EtaWuDn1wsNmG/X6qN26fWPCkWVVP5ihC1Ea1PXyPGnyOUW1Vwxos6wRCLpSphnc/vf 3f5moIeLwe+lBUD7YY7h4+P/snozpizzZweZX+QlvFa6336V9dTYxbjjbQYAssfRRubDmT QZEWA3BIX09+MFWCyzp7wYB/1eMZz/l41yGgtM7QTYZfUx4K7ACtW/zgoU34pA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726996152; a=rsa-sha256; cv=none; b=KrYDRL7ogfFJq8MNMEhlI49QW6ZJSYQd1FWVTkf/SVM2BKGCcn5d5qfJBKOxMCB5T67aNA 6WCMvum/iQLroYXND4od/JNXn5luOZpTE4NIyzO3Um6e67RwF1ud7NoZg8NvRktD+8DqkZ xtNOI0qqyvLX12Bizat0df5NPV8QrYjQ5XPykrUR4QhFOJnED8TUXjJ+SdgYjmR3wutejQ 3uxe7XYPQL0X0XaoSuzEhvK1uwG8M5OWsnrsld5jCablAE49LsQqQLFtzZETUkamLP46GG mCYz7wvX1pNQMzAQmmMTEwe7Q/OtbJaOMw22cipqnjoA1CqMkD8UCAtwuGpkwQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=DkrByYdB; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=o4jM4+II; 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"; dmarc=pass (policy=none) header.from=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 8703879312 for ; Sun, 22 Sep 2024 11:09:12 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssIaD-0003Ps-Cc; Sun, 22 Sep 2024 05:08: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 1ssIaA-0003PK-0C for guix-patches@gnu.org; Sun, 22 Sep 2024 05:08:42 -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 1ssIa9-0002EK-GA for guix-patches@gnu.org; Sun, 22 Sep 2024 05:08:41 -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=/5ublfufOcudc9IjBbBZJgcwCwVNsKfI9gGUTgLELzc=; b=DkrByYdBW3c7hnlit0ofLWa0H/O3BP82cyQd9eM0Kqtkble5FBCItyCOy89RoC8YJXDZndJ1RREqWS+9dt3tdG2jcwpjibNPj9/gXZm8CNcoBRdHtmiNqmD3y4LrxA9XAltQTzeUvplORP3MBdJBJu8Nr8cEItzri+8IQ+zqiCABHchoGvyBVQwA7vb6NAH41E1mr0aySS9nCEWgyKJ34cSEx3gL0e2EaECpuSl84BGn3o4StVA3id5x9Pj3ZYM8lm+tMsy/7p2QG/RuKRGXss9hZSSHqDlz/kVzvuf6h6X2JApKZmjp5aGOBNWizvbqf5F8PZhS8zIVKWf1xXlIbA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ssIaU-0005IG-Ql for guix-patches@gnu.org; Sun, 22 Sep 2024 05:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73393] [PATCH v2 2/2] services: sane-service-type: create lock path for plustek backend Resent-From: Adrien 'neox' Bourmault Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Sep 2024 09:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73393 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73393@debbugs.gnu.org Cc: Adrien 'neox' Bourmault Received: via spool by 73393-submit@debbugs.gnu.org id=B73393.172699613320317 (code B ref 73393); Sun, 22 Sep 2024 09:09:02 +0000 Received: (at 73393) by debbugs.gnu.org; 22 Sep 2024 09:08:53 +0000 Received: from localhost ([127.0.0.1]:40877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssIaL-0005Hd-3Z for submit@debbugs.gnu.org; Sun, 22 Sep 2024 05:08:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssIaH-0005H1-If for 73393@debbugs.gnu.org; Sun, 22 Sep 2024 05:08:50 -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 1ssIZq-0002CS-T0; Sun, 22 Sep 2024 05:08:22 -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=/5ublfufOcudc9IjBbBZJgcwCwVNsKfI9gGUTgLELzc=; b=o4jM4+IIOkfVvspJseoP wRhUFQlfRoTxj6jekHLpH4GGbVTYokMjhOIS06vtVksmmYmDSekVYH9LPqgoWyyWgjjj2toe6AeW1 AFsvRtCEp0/AWJEmuvOd1816G/pVvVvpvq5n6UOttrYiy198ogNEUhOlPPGELkWOZjSCMzo3LImfK M3f7krKynp5vgEgrCD+cuTM9JRjjQ0EdmvY0lfUqmg6EKVC9k9Lt5k9YNwMP3NpPFC7tXCQYd4WT0 L3rBPkTZHE0tsyOMgS70fAEW74XQZTXb/BAaAId5NQ5rc25UpxYRv30cMs2on6H1zz+A2rBcbonEF JmpvZgOIaFdv6Q==; From: Adrien 'neox' Bourmault Date: Sun, 22 Sep 2024 11:07:58 +0200 Message-ID: <8604617ae2896e2d73d24958aab7ee534c656dfa.1726864525.git.neox@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.11 X-Migadu-Queue-Id: 8703879312 X-Spam-Score: -8.11 X-TUID: LMKG5oQ1mjyw Message-ID: <20240922090758.x2jhCKWh8d30sfet2L5AnROZJLVWpsxHvwaH2kELerM@z> * 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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 274aeeef9b..500527cb50 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2021, 2022 muradm ;;; Copyright © 2023 Bruno Victal ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2024 Adrien Bourmault ;;; ;;; This file is part of GNU Guix. ;;; @@ -1408,6 +1409,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 +1430,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