From unknown Sat Aug 16 00:29:51 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32358 <32358@debbugs.gnu.org> To: bug#32358 <32358@debbugs.gnu.org> Subject: Status: Add pcscd service Reply-To: bug#32358 <32358@debbugs.gnu.org> Date: Sat, 16 Aug 2025 07:29:51 +0000 retitle 32358 Add pcscd service reassign 32358 guix-patches submitter 32358 Arun Isaac severity 32358 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 03 06:23:34 2018 Received: (at submit) by debbugs.gnu.org; 3 Aug 2018 10:23:34 +0000 Received: from localhost ([127.0.0.1]:39540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1flXF2-00032L-VM for submit@debbugs.gnu.org; Fri, 03 Aug 2018 06:23:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1flXF1-000328-8K for submit@debbugs.gnu.org; Fri, 03 Aug 2018 06:23:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1flXEu-0002nA-57 for submit@debbugs.gnu.org; Fri, 03 Aug 2018 06:23:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51187) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1flXEt-0002mq-Vg for submit@debbugs.gnu.org; Fri, 03 Aug 2018 06:23:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1flXEr-0000Au-QA for guix-patches@gnu.org; Fri, 03 Aug 2018 06:23:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1flXEq-0002f8-00 for guix-patches@gnu.org; Fri, 03 Aug 2018 06:23:17 -0400 Received: from [2001:19f0:5:274f:351:616f:fec3:2694] (port=54938 helo=vultr.systemreboot.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1flXEp-0002Sd-Dk for guix-patches@gnu.org; Fri, 03 Aug 2018 06:23:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qPxKtTyK0S8pJTji1WkGM8mNHJk9+m+XfhvGXC4oDbE=; b=mbitfoz17zwkqQjJn0+/CClqXJ ZbawrZT69aNwO2ieVfQgktOv6flQGcg0cBpHDddMZeri5CXHJMpFGkd0wVOkXgRIxZob5YkMWmXyG /7jdKejm6KSoAGsDjdRpB87v7njwhtcduicx51LJIiCNy9xtVp5LTPEhWuLtJHMneL6s=; Received: from [192.168.2.1] (helo=steel) by systemreboot.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1flXEi-0001pu-RW for guix-patches@gnu.org; Fri, 03 Aug 2018 15:53:10 +0530 From: Arun Isaac To: guix-patches@gnu.org Subject: Add pcscd service Date: Fri, 03 Aug 2018 15:53:02 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) --=-=-= Content-Type: text/plain This patchset adds pcscd service. It is required for gpg to detect and use security tokens such as the Nitrokey and the Gnuk. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-pcsc-lite-Link-to-USB-drivers-from-ccid.patch Content-Transfer-Encoding: quoted-printable >From 3fe4571e27afcecd5cfb72059ece22969fd6f72a Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 2 Aug 2018 05:24:37 +0530 Subject: [PATCH 1/2] gnu: pcsc-lite: Link to USB drivers from ccid. * gnu/packages/security-token.scm (pcsc-lite-bootstrap): New variable. (ccid)[inputs]: Remove pcsc-lite. [native-inputs]: Add pcsc-lite-bootstrap. (pcsc-lite)[inputs]: Add ccid. [arguments]: Set --enable-usbdropdir configure flag, linking to USB drivers from ccid. --- gnu/packages/security-token.scm | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.= scm index 7fdcaaf1e..424f4626e 100644 --- a/gnu/packages/security-token.scm +++ b/gnu/packages/security-token.scm @@ -7,6 +7,7 @@ ;;; Copyright =C2=A9 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2017 Ricardo Wurmus ;;; Copyright =C2=A9 2018 Chris Marusich +;;; Copyright =C2=A9 2018 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +30,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) #:use-module (gnu packages autotools) @@ -75,11 +77,11 @@ (("/bin/echo") (which "echo"))) #t))))) (native-inputs - `(("perl" ,perl) + `(("pcsc-lite-bootstrap" ,pcsc-lite-bootstrap) ; only required for he= aders + ("perl" ,perl) ("pkg-config" ,pkg-config))) (inputs - `(("libusb" ,libusb) - ("pcsc-lite" ,pcsc-lite))) + `(("libusb" ,libusb))) (home-page "https://ccid.apdu.fr/") (synopsis "PC/SC driver for USB smart card devices") (description @@ -169,13 +171,16 @@ the low-level development kit for the Yubico YubiKey = authentication device.") "1jc9ws5ra6v3plwraqixin0w0wfxj64drahrbkyrrwzghqjjc9ss")))) (build-system gnu-build-system) (arguments - `(#:configure-flags '("--enable-usbdropdir=3D/var/lib/pcsc/drivers" - "--disable-libsystemd"))) + `(#:configure-flags + (list (string-append "--enable-usbdropdir=3D" + (assoc-ref %build-inputs "ccid") "/pcsc/driver= s") + "--disable-libsystemd"))) (native-inputs `(("perl" ,perl) ; for pod2man ("pkg-config" ,pkg-config))) (inputs - `(("libudev" ,eudev))) + `(("ccid" ,ccid) + ("libudev" ,eudev))) (home-page "https://pcsclite.apdu.fr/") (synopsis "Middleware to access a smart card using PC/SC") (description @@ -186,6 +191,16 @@ from a client application and provide access to the de= sired reader.") license:isc ; src/strlcat.c src/strlcp= y.c license:gpl3+)))) ; src/spy/* =20 +(define pcsc-lite-bootstrap + (package + (inherit pcsc-lite) + (name "pcsc-lite-bootstrap") + (inputs + `(("libudev" ,eudev))) + (arguments + (substitute-keyword-arguments (package-arguments pcsc-lite) + ((#:configure-flags _) '(list "--disable-libsystemd")))))) + (define-public ykclient (package (name "ykclient") --=20 2.18.0 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0002-gnu-services-Add-pcscd-service.patch Content-Transfer-Encoding: quoted-printable >From d565f247fc34680bf39c2618ea0ff05c229c2b54 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 2 Aug 2018 05:32:56 +0530 Subject: [PATCH 2/2] gnu: services: Add pcscd service. * gnu/services/security-token.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Miscellaneous Services): Document the service. --- doc/guix.texi | 28 +++++++++++++++ gnu/local.mk | 1 + gnu/services/security-token.scm | 63 +++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 gnu/services/security-token.scm diff --git a/doc/guix.texi b/doc/guix.texi index 080b091b3..7e5212a66 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20326,6 +20326,34 @@ An association list specifies kernel parameters an= d their values. @end table @end deftp =20 +@cindex pcscd +@subsubheading PC/SC Smart Card Daemon Service + +The @code{(gnu services security-token)} module provides the following ser= vice +to run @command{pcscd}, the PC/SC Smart Card Daemon. @command{pcscd} is t= he +daemon program for pcsc-lite and the MuscleCard framework. It is a resource +manager that coordinates communications with smart card readers, smart car= ds +and cryptographic tokens that are connected to the system. + +@defvr {Scheme Variable} pcscd-service-type +Service type for the @command{pcscd} service. Its value must be a +@code{pcscd-configuration} object. To run pcscd in the default +configuration, instantiate it as: + +@example +(service pcscd-service-type) +@end example +@end defvr + +@deftp {Data Type} pcscd-configuration +The data type representing the configuration of @command{pcscd}. + +@table @asis +@item @code{pcsc-lite} (default: @code{pcsc-lite}) +The pcsc-lite package that provides pcscd. +@end table +@end deftp + @cindex lirc @subsubheading Lirc Service =20 diff --git a/gnu/local.mk b/gnu/local.mk index d1f9a193b..c637f0954 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -485,6 +485,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/services/monitoring.scm \ %D%/services/networking.scm \ %D%/services/nfs.scm \ + %D%/services/security-token.scm \ %D%/services/shepherd.scm \ %D%/services/sound.scm \ %D%/services/herd.scm \ diff --git a/gnu/services/security-token.scm b/gnu/services/security-token.= scm new file mode 100644 index 000000000..888c92fb1 --- /dev/null +++ b/gnu/services/security-token.scm @@ -0,0 +1,63 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2018 Arun Isaac +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services security-token) + #:use-module (gnu services) + #:use-module (gnu services shepherd) + #:use-module (gnu packages admin) + #:use-module (gnu packages security-token) + #:use-module (gnu system shadow) + #:use-module (guix gexp) + #:use-module (guix modules) + #:use-module (guix records) + #:use-module (ice-9 match) + #:export (pcscd-configuration + pcscd-configuration? + pcscd-service-type)) + +;;; +;;; PC/SC Smart Card Daemon +;;; + +(define-record-type* + pcscd-configuration make-pcscd-configuration pcscd-configuration? + (pcsc-lite pcscd-configuration-package + (default pcsc-lite))) + +(define pcscd-shepherd-service + (match-lambda + (($ pcsc-lite) + (with-imported-modules (source-module-closure + '((gnu build shepherd))) + (shepherd-service + (documentation "PC/SC Smart Card Daemon") + (provision '(pcscd)) + (modules '((gnu build shepherd))) + (start #~(make-forkexec-constructor + (list #$(file-append pcsc-lite "/sbin/pcscd") "-f"))) + (stop #~(make-kill-destructor))))))) + +(define pcscd-service-type + (service-type + (name 'pcscd) + (description + "Run @command{pcscd}, the PC/SC smart card daemon.") + (extensions + (list (service-extension shepherd-root-service-type + (compose list pcscd-shepherd-service)))) + (default-value (pcscd-configuration)))) --=20 2.18.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 04 00:15:50 2018 Received: (at 32358) by debbugs.gnu.org; 4 Aug 2018 04:15:50 +0000 Received: from localhost ([127.0.0.1]:40363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1flnyo-0007pY-Fe for submit@debbugs.gnu.org; Sat, 04 Aug 2018 00:15:50 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1flnyn-0007pM-9q for 32358@debbugs.gnu.org; Sat, 04 Aug 2018 00:15:49 -0400 Received: by mail-pf1-f196.google.com with SMTP id i26-v6so4218370pfo.12 for <32358@debbugs.gnu.org>; Fri, 03 Aug 2018 21:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=9zkusKfSk9NOJmByohC/s6MVASMxsllR8N+VPJ8MiFE=; b=u3/05XAh4ZLGbmkSJbSBpN5VVMeF4VBmA2W4CWBYfG/lnKem/u7r+NaBWVd5l7eZD0 RggUn76fK+g23vTFzckaB+N+m7Bd9gINGQNGje8ngVprqzcWFCyaPA8uVhzRCMi/UGWr +fIU2AvOgUVQcSJUAGQVBQ5Qe2gdNMVa2L7MzuRTax1+/CS780ULFx0IqMxbQgDpyZKw 0XTYuPZwRFwmrlRIEUBXs8quJQ4jc3pA6MKS6tYXbGEZDUaIwNz7warxMDO88Wts/XD4 Z/0Dex7eaUE+NW7unUfKLklNfTTpvbiH8dglaupXjbTkvPn9q6QwCVsKMPcaDyIjZ63b Ls8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=9zkusKfSk9NOJmByohC/s6MVASMxsllR8N+VPJ8MiFE=; b=Bg+SC3mpllp8oKUrLnDnMyZSkwz418ZCi9wMsA3hmI1r+H9eeeLQXtRpaLW2KrKtG8 BKNzlh91+3Xqzhg6nWucmJp2xWhrcNpcgvtwqb0absFdXKuGvxT/fJl8vKjvyo9NiCKa qiAmr+vbxwwO5fhdoCzf4MlAbDYhcstE8oZ+CKH2ff/nWYldKK2gBqsL6+uwjpGq45bM tKtixJRkeqaWWC3MpH4vJnER5qgIfoK1tZjuOj0gZ0jUR1fI4PQBsVtz7K/WZ3KkNeok fjm+oiysirdx4FpTvVK/rzUrYC9EnbnE5PERmWAtOx5vRyxwbcs3k+cwyGZZIGaJHU72 bVXw== X-Gm-Message-State: AOUpUlEqRZPmZyQhI7LJ4714ZwNde2P8Z4hqdHr8IgL+Fti2PhjUb+gZ 1re7s4jaKYWZoW7RoMXQ0FV2RF7c X-Google-Smtp-Source: AAOMgpchM1Btypz9D0KbJkw+QAEJHe4j+4cSG+vrD5kDu8K3Y3PMe7XPMsl0qbUBLsTDGQXjS2bzcQ== X-Received: by 2002:a62:3a9d:: with SMTP id v29-v6mr7413303pfj.215.1533356142932; Fri, 03 Aug 2018 21:15:42 -0700 (PDT) Received: from garuda.local ([2601:602:9d02:4725:6495:ba21:1ebe:620a]) by smtp.gmail.com with ESMTPSA id q10-v6sm8466922pfh.124.2018.08.03.21.15.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Aug 2018 21:15:41 -0700 (PDT) From: Chris Marusich X-Google-Original-From: Chris Marusich To: Arun Isaac Subject: Re: [bug#32358] Add pcscd service References: Date: Fri, 03 Aug 2018 21:15:37 -0700 In-Reply-To: (Arun Isaac's message of "Fri, 03 Aug 2018 15:53:02 +0530") Message-ID: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Arun, Thank you for submitting a patch! I've been wanting something like this for a long time, so I'm very happy to see it. I'll test it out and let you know if it works for me. Arun Isaac writes: > diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-toke= n.scm > index 7fdcaaf1e..424f4626e 100644 > --- a/gnu/packages/security-token.scm > +++ b/gnu/packages/security-token.scm > > [...] > > @@ -169,13 +171,16 @@ the low-level development kit for the Yubico YubiKe= y authentication device.") > "1jc9ws5ra6v3plwraqixin0w0wfxj64drahrbkyrrwzghqjjc9ss"))= )) > (build-system gnu-build-system) > (arguments > - `(#:configure-flags '("--enable-usbdropdir=3D/var/lib/pcsc/drivers" > - "--disable-libsystemd"))) > + `(#:configure-flags > + (list (string-append "--enable-usbdropdir=3D" > + (assoc-ref %build-inputs "ccid") "/pcsc/driv= ers") > + "--disable-libsystemd"))) If someone was relying on the previous behavior (in which pcsc-lite would look in /var/lib/pcsc/drivers for drivers), this would break for them if they were using anything other than the ccid drivers, right? However, I understand that previous Guix email threads have talked about adding a symlink there which points to ccid's drivers (I do that today, myself), so I can see why you would want to make this change. > @@ -186,6 +191,16 @@ from a client application and provide access to the = desired reader.") > license:isc ; src/strlcat.c src/strl= cpy.c > license:gpl3+)))) ; src/spy/* >=20=20 > +(define pcsc-lite-bootstrap > + (package > + (inherit pcsc-lite) > + (name "pcsc-lite-bootstrap") > + (inputs > + `(("libudev" ,eudev))) > + (arguments > + (substitute-keyword-arguments (package-arguments pcsc-lite) > + ((#:configure-flags _) '(list "--disable-libsystemd")))))) > + What problem does this pcsc-lite-bootstrap package solve? It looks like you added pcsc-lite-bootstrap in order to avoid a cyclic dependency between ccid and pcsc-lite. That seems fair, but is there any other reason that I'm missing? > Subject: [PATCH 2/2] gnu: services: Add pcscd service. Do you know what the intent behind the --enable-usbdropdir option is in (1) the pcsc-lite configure script and (2) the ccid configure script? I checked the README in the source for both of these packages, but I couldn't quite understand the intended use. It wasn't clear to me if the usbdropdir directory is where the ccid/pcsc-lite expect to _find_ drivers that the user makes available, or if this directory is where the packages will _install_ their own drivers (or both, perhaps). If the usbdropdir is intended to house additional drivers that the user can "drop" in and use at runtime, then users of pcsc-lite/ccid might reasonably expect to be able to easily add additional drivers to the default configuration. If that's the case, then we might want to think about how we can give a user the ability to configure additional drivers. For example, if we gave the pcsc service configuration a field like "usbdropdir-drivers" (e.g. a list of packages or file-like objects), we could arrange for the union of those drivers to be placed into the usbdropdir for pcsc/ccid to use. Of course, I might be totally misunderstanding the intended use of the =2D-enable-usbdropdir configuration option. If that's the case, please let me know. What do you think? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAltlKGkACgkQ3UCaFdgi Rp0kCBAA1/He5Jov+rQnse8+oi0vBKnmdhkYY6a3khFAzaCugsvjmrYh/n1lSJCI o//BcKaEARFGuWhYY4dIVDROg5g4o9TCdUcyex9V/6HWOGCMa8QfLw1/QA2Tja5E TKibHn9eYLIBaxPqEbVudKmc3Zyt1HmNMQ5QP4SzlAOBU4CtZe5EALvL63Cfyt1W zB8E9pcx/vEuZhzULCygaiJbdAC9apgqfP2mYOtULJfsNwVZNXujt2n1lbh6ESJn +26SdkNIYR+tQNbawHMWEFx6oNNHkBp6x5Jsj8zXar2/mkcaSDLel5Gz/9jE0JTJ ZUGaHwEB0BrxICyxCrqBS7iWPxdgRtL5e9rdQfMTrjvUQJyBq4/JURy63Te/1iFK USyQbV0mnsalp6E/qpb6lbdWyv2IkixCnMm7bcYKev+tmEB8xdnceSkU/Fxqb/P/ zAiahE9FE72PKlcmyrmkcEA3Oacu6Gi+YyEU5hSN4F95TvWVdv+ounM6IcNTJq+g RYUMbxdwTMZNkTnmbgNpYtRy6R7D2knvRDWcMUuwiQUMJ+8X2lufUn/LTBMx/8mv OmM2xCyW7HGyo+l5N/y3hdP0TxvaZXouc2ENuxBcj/v3iWfcKWXRTHr17qMWJExZ E98NXWGzRVziBLwWtmdyinIIEgM/2VwCculOgBPDaRYoXoo0Xrc= =Ebd+ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 04 08:42:38 2018 Received: (at 32358) by debbugs.gnu.org; 4 Aug 2018 12:42:38 +0000 Received: from localhost ([127.0.0.1]:40462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1flvtF-0007pt-OR for submit@debbugs.gnu.org; Sat, 04 Aug 2018 08:42:37 -0400 Received: from vultr.systemreboot.net ([45.77.148.100]:42448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1flvtE-0007pT-Fy for 32358@debbugs.gnu.org; Sat, 04 Aug 2018 08:42:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=U54dC1eSob7WzXAyzhxNJ3MNTUQNGY1YY3N/PgHkp3U=; b=hrI4L2+FlL/LVZILr/5SI3yl8 USOoc5Suq9vA+OY8ub8BmSl/eYEZLOkljRKNjrJpdDFd1Gji54ZIvUS+twB8V7fd+Cb2Ua8Oa+BsR jfhgRwjaAnpyr59CktYT0pKiC00eG7mMV0mbnewC3x8bS7d3gFyUompzWxhjVx9NG3Gpc=; Received: from [192.168.2.1] (helo=steel) by systemreboot.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1flvt5-0002zS-CW; Sat, 04 Aug 2018 18:12:28 +0530 From: Arun Isaac To: Chris Marusich Subject: Re: [bug#32358] Add pcscd service In-Reply-To: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> Date: Sat, 04 Aug 2018 18:12:19 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > What problem does this pcsc-lite-bootstrap package solve? It looks like > you added pcsc-lite-bootstrap in order to avoid a cyclic dependency > between ccid and pcsc-lite. That seems fair, but is there any other > reason that I'm missing? No, there is no other reason. I only created pcsc-lite-bootstrap to avoid a circular dependence between ccid and pcsc-lite. > Do you know what the intent behind the --enable-usbdropdir option is in > (1) the pcsc-lite configure script and (2) the ccid configure script? I > checked the README in the source for both of these packages, but I > couldn't quite understand the intended use. It wasn't clear to me if > the usbdropdir directory is where the ccid/pcsc-lite expect to _find_ > drivers that the user makes available, or if this directory is where the > packages will _install_ their own drivers (or both, perhaps). I thought about this too. As far as I understood, the usbdropdir of the ccid package is where it installs its drivers, and the usbdropdir of the pcsc-lite package is where it expects to find drivers. > If the usbdropdir is intended to house additional drivers that the user > can "drop" in and use at runtime, then users of pcsc-lite/ccid might > reasonably expect to be able to easily add additional drivers to the > default configuration. If that's the case, then we might want to think > about how we can give a user the ability to configure additional > drivers. For example, if we gave the pcsc service configuration a field > like "usbdropdir-drivers" (e.g. a list of packages or file-like > objects), we could arrange for the union of those drivers to be placed > into the usbdropdir for pcsc/ccid to use. Good idea. I'll add a usb-drivers configuration field and send an updated patchset. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 06 10:36:46 2018 Received: (at 32358) by debbugs.gnu.org; 6 Aug 2018 14:36:46 +0000 Received: from localhost ([127.0.0.1]:42800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmgcn-0007JX-OQ for submit@debbugs.gnu.org; Mon, 06 Aug 2018 10:36:45 -0400 Received: from mail-lf1-f42.google.com ([209.85.167.42]:46036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmgcm-0007JL-L5 for 32358@debbugs.gnu.org; Mon, 06 Aug 2018 10:36:44 -0400 Received: by mail-lf1-f42.google.com with SMTP id j143-v6so9223785lfj.12 for <32358@debbugs.gnu.org>; Mon, 06 Aug 2018 07:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=+wPDyg9b8SYnc6+sZ1+S1QYaCMR013k+JDY6qz/pKZ4=; b=npZUdRJ5WcLjw9yfiwK7rA7usRZ7UvfYs9RIibdDMwaat3lw4FvhkUk+aEQiLIP+5+ cb1E0LDPHid3Ah4O+6w4hArgxfP+oI9VlsSnqkwGokalR8ZAnn6D1q3HGPwWHIhh1DLU JpRJNW98AIgVibH/8ytfu2U/MN/M3qN7Z2BXcC0WM3CFz8pAD7dngSaHFOF56zg5EVD4 SJanKgP26o3KnpV0N2gT+7ehvz4cjX5+OLFK33YQfgyFHUv3ouLlZNkkCZXBBlONTLYX nxVRsGf6QUlhSMctCJo+Jt+U6IjzV39c/evrFR6hgYDakOv/SIR427dBpY+2fqFmyJc/ ajig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+wPDyg9b8SYnc6+sZ1+S1QYaCMR013k+JDY6qz/pKZ4=; b=NXY5UXS4yhasdFRSx+WgLUJ++zpM88yLDL8Od/Ul8vZUDSlSHkCItiWkq/Nh4daKar 0h7ffcj/gSHLh198m8CekcFhboJXiYlH+V6of/GM/41Od4Zeu5w73XTdVds8+NDQSYEc 8NdvHnC09sZddPJ0h4Mkp1783mCraGtYmRG/Qiz0Y+wvUmf5ZxgDmjnin7ITGNP3DfsU omccUn9FDnJGo9YiIyZHZk3By8ImQi5oxGfL44l0GxAqsUJXrHaoEdRmHVbRoMNkazcE tViJFpevw+o2nA2LSJMeUgfvPSlUF0th9PHxrBg6GKPXcEdvlEZEo2oFbk9wZKZBOHHW PehA== X-Gm-Message-State: AOUpUlH/CXzGbQPCxnOvUCscDqASoE+8qSDRtjpKIs2WzxSfaIvEyT+f jv+HAEZmwVO4v/csKCvTrxOPrNU0V7P1pSJ36g82KQ== X-Google-Smtp-Source: AAOMgpc5ekxKK2VQ3aG8ypgLoeuHQ8zX2QOAUkfAHBF2mQfx82l/dmme4BgoNbAJzygVpaJZgm/sjKQm0Ga+zXc8amg= X-Received: by 2002:a19:1dcf:: with SMTP id d198-v6mr11155166lfd.144.1533566198410; Mon, 06 Aug 2018 07:36:38 -0700 (PDT) MIME-Version: 1.0 From: Kaushal Modi Date: Mon, 6 Aug 2018 10:36:26 -0400 Message-ID: Subject: About commit "Avoid assertion violations in maybe_produce_line_number" To: 32358@debbugs.gnu.org Content-Type: multipart/alternative; boundary="0000000000007ef3e20572c534de" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32358 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000007ef3e20572c534de Content-Type: text/plain; charset="UTF-8" If you reached this debbugs thread from this commit: http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f0b8e64fb7720a9376bde80cc59fe37b0df83b9d, the commit message actually has a typo. That commit fixes debbugs#32258: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32258 -- Kaushal Modi --0000000000007ef3e20572c534de Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If you reached this debbugs thread from this commit: http://git.savannah.gnu.org/cgit/emacs.git/com= mit/?id=3Df0b8e64fb7720a9376bde80cc59fe37b0df83b9d, the commit message = actually has a typo. That commit fixes debbugs#32258: https://debbugs.gnu.org/cgi/bu= greport.cgi?bug=3D32258
--

Kaushal Modi<= /p>

--0000000000007ef3e20572c534de-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 09 10:26:18 2018 Received: (at 32358) by debbugs.gnu.org; 9 Aug 2018 14:26:18 +0000 Received: from localhost ([127.0.0.1]:46034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fnltI-0006z1-70 for submit@debbugs.gnu.org; Thu, 09 Aug 2018 10:26:18 -0400 Received: from vultr.systemreboot.net ([45.77.148.100]:51812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fnltF-0006yl-Tc for 32358@debbugs.gnu.org; Thu, 09 Aug 2018 10:26:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=u+YQzzOGfWYJ/+4o60XELxCvBO9r/A0T+PoWHwyT48g=; b=b3g4YZujAkf+B4W+it1wbhHhC jsiZfMxzARwjRr9OHSE1mWhjRy8xccWtqiBgWNYI0+EAEOY3Fb+0mFeD4s4TqcWaJAmZzKMh8C54h clLn5rjoB3qZJxz2XC/qFRork1CQu6M/+v1jpho9kN4ZAAjezbyJvAmsZ9Ccy0/+246ds=; Received: from [192.168.2.1] (helo=steel) by systemreboot.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fnlt7-0001DX-5h; Thu, 09 Aug 2018 19:56:06 +0530 From: Arun Isaac To: Chris Marusich Subject: Re: [bug#32358] Add pcscd service In-Reply-To: References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> Date: Thu, 09 Aug 2018 19:55:59 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Please find attached the updated patches. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-services-Add-pcscd-service.patch Content-Transfer-Encoding: quoted-printable >From 87133250c4d485988b2d29ec82d005befe3b5731 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 2 Aug 2018 05:32:56 +0530 Subject: [PATCH 1/2] gnu: services: Add pcscd service. * gnu/services/security-token.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Miscellaneous Services): Document the service. --- doc/guix.texi | 31 +++++++++++++ gnu/local.mk | 1 + gnu/services/security-token.scm | 80 +++++++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 gnu/services/security-token.scm diff --git a/doc/guix.texi b/doc/guix.texi index 080b091b3..595cf7bf2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20326,6 +20326,37 @@ An association list specifies kernel parameters an= d their values. @end table @end deftp =20 +@cindex pcscd +@subsubheading PC/SC Smart Card Daemon Service + +The @code{(gnu services security-token)} module provides the following ser= vice +to run @command{pcscd}, the PC/SC Smart Card Daemon. @command{pcscd} is t= he +daemon program for pcsc-lite and the MuscleCard framework. It is a resource +manager that coordinates communications with smart card readers, smart car= ds +and cryptographic tokens that are connected to the system. + +@defvr {Scheme Variable} pcscd-service-type +Service type for the @command{pcscd} service. Its value must be a +@code{pcscd-configuration} object. To run pcscd in the default +configuration, instantiate it as: + +@example +(service pcscd-service-type) +@end example +@end defvr + +@deftp {Data Type} pcscd-configuration +The data type representing the configuration of @command{pcscd}. + +@table @asis +@item @code{pcsc-lite} (default: @code{pcsc-lite}) +The pcsc-lite package that provides pcscd. +@item @code{usb-drivers} (default: @code{(list ccid)}) +List of packages that provide USB drivers to pcscd. Drivers are expected t= o be +under @file{pcsc/drivers} in the store directory of the package. +@end table +@end deftp + @cindex lirc @subsubheading Lirc Service =20 diff --git a/gnu/local.mk b/gnu/local.mk index c54a29720..8f7d56702 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -485,6 +485,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/services/monitoring.scm \ %D%/services/networking.scm \ %D%/services/nfs.scm \ + %D%/services/security-token.scm \ %D%/services/shepherd.scm \ %D%/services/sound.scm \ %D%/services/herd.scm \ diff --git a/gnu/services/security-token.scm b/gnu/services/security-token.= scm new file mode 100644 index 000000000..8cda69c83 --- /dev/null +++ b/gnu/services/security-token.scm @@ -0,0 +1,80 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2018 Arun Isaac +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services security-token) + #:use-module (gnu services) + #:use-module (gnu services shepherd) + #:use-module (gnu packages admin) + #:use-module (gnu packages security-token) + #:use-module (gnu system shadow) + #:use-module (guix gexp) + #:use-module (guix modules) + #:use-module (guix records) + #:use-module (ice-9 match) + #:use-module (srfi srfi-26) + #:export (pcscd-configuration + pcscd-configuration? + pcscd-service-type)) + +;;; +;;; PC/SC Smart Card Daemon +;;; + +(define-record-type* + pcscd-configuration make-pcscd-configuration pcscd-configuration? + (pcsc-lite pcscd-configuration-pcsc-lite + (default pcsc-lite)) + (usb-drivers pcscd-configuration-usb-drivers + (default (list ccid)))) + +(define pcscd-shepherd-service + (match-lambda + (($ pcsc-lite) + (with-imported-modules (source-module-closure + '((gnu build shepherd))) + (shepherd-service + (documentation "PC/SC Smart Card Daemon") + (provision '(pcscd)) + (modules '((gnu build shepherd))) + (start #~(make-forkexec-constructor + (list #$(file-append pcsc-lite "/sbin/pcscd") "-f"))) + (stop #~(make-kill-destructor))))))) + +(define pcscd-activation + (match-lambda + (($ pcsc-lite usb-drivers) + #~(begin + (use-modules (guix build utils)) + (mkdir-p "/var/lib") + (symlink #$(directory-union + "pcsc" + (map (cut file-append <> "/pcsc") + usb-drivers)) + "/var/lib/pcsc"))))) + +(define pcscd-service-type + (service-type + (name 'pcscd) + (description + "Run @command{pcscd}, the PC/SC smart card daemon.") + (extensions + (list (service-extension shepherd-root-service-type + (compose list pcscd-shepherd-service)) + (service-extension activation-service-type + pcscd-activation))) + (default-value (pcscd-configuration)))) --=20 2.18.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-ccid-Move-pcsc-lite-from-inputs-to-native-inputs.patch >From 9e6f8943a9da4e786436c3e568a5628c28fdda48 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 9 Aug 2018 19:19:03 +0530 Subject: [PATCH 2/2] gnu: ccid: Move pcsc-lite from inputs to native-inputs. pcsc-lite only provides the headers to build ccid. So, it is sufficient that it be a native-input. * gnu/packages/security-token.scm (ccid)[inputs]: Move pcsc-lite to ... [native-inputs]: ... here. --- gnu/packages/security-token.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm index 7fdcaaf1e..ff0383d11 100644 --- a/gnu/packages/security-token.scm +++ b/gnu/packages/security-token.scm @@ -75,11 +75,11 @@ (("/bin/echo") (which "echo"))) #t))))) (native-inputs - `(("perl" ,perl) + `(("pcsc-lite" ,pcsc-lite) ; only required for headers + ("perl" ,perl) ("pkg-config" ,pkg-config))) (inputs - `(("libusb" ,libusb) - ("pcsc-lite" ,pcsc-lite))) + `(("libusb" ,libusb))) (home-page "https://ccid.apdu.fr/") (synopsis "PC/SC driver for USB smart card devices") (description -- 2.18.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 10 02:56:46 2018 Received: (at 32358) by debbugs.gnu.org; 10 Aug 2018 06:56:46 +0000 Received: from localhost ([127.0.0.1]:46321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fo1Lq-0004w0-5A for submit@debbugs.gnu.org; Fri, 10 Aug 2018 02:56:46 -0400 Received: from mail-pl0-f41.google.com ([209.85.160.41]:44166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fo1Lo-0004vo-TU for 32358@debbugs.gnu.org; Fri, 10 Aug 2018 02:56:45 -0400 Received: by mail-pl0-f41.google.com with SMTP id ba4-v6so3640241plb.11 for <32358@debbugs.gnu.org>; Thu, 09 Aug 2018 23:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=AC5x7ZrE4HYFlS7Rn4LeG3B4brDKdkWHt0FrDwSFzRs=; b=tov5LYFVgP3l4ppQSqOGurugn5TwcgFYB6vmUG8qNo2jZplCH5mCDPr4iB7sZjk+6X QMHlrbZ8Pl/5L9WvkQOR08rbMryz5NVdFVRUINzoIIGbY6BSx/YF2pe1ydVfUiXeXNlz sY7Dcte80eFbGXHZYsIkSVrwmeyFcNm4g1Kdq86qZZ1ZYo3o6lCpWT88dBb2Cg5tHq9s FOtxZ9/x5qb4dEZnNri7P2tITLLlainVMb55BlTdtEC23Y3/pbhTysKuvTURFmH6+kZV pFxjQzNpULNiqfpbt24vJt5kM/LolSQ4QggUI+mMeLE8QJLT2KMiWldp0vkp5m7MRq7L Vj1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=AC5x7ZrE4HYFlS7Rn4LeG3B4brDKdkWHt0FrDwSFzRs=; b=NMP8/7ZdDDcPimu1JyETqAVrV+bu78p1zLQtYfiIcAQOFfdUIm/xnip+zHSJaT2q+S QE70Vj6sVhqiKYxiq3TCuyvX/KJvcOgBvdYEJvv/NPzZnwoAFVLOfQSbs2Z+WZdhiWUd mFwgTinjokh4OgqwJF57JNAPCKPWfQrhWMt2onxBhN29/7LIu7TnJlYsctft2iGCd37T SRlVdZdeqL2RMMydG0LtgOpGs8A8a1dnKMURBIPQgR+vN7caf+3F41kF1SqFo5+8pt0r 810+fDy69RKfr9Btie1PAB1gIeMg5FHTdpo8Rg6Mtf7tm2AjHqTtRsxFm1xIlmoOMo1c 4MEw== X-Gm-Message-State: AOUpUlENs3ctb2Q5x4oNeqBHcceSfOsDhWVXJ8FSeR8uEEa2IYEuGyHr Pno9LZEezQ9czRZY80MA/s2Tbg+K X-Google-Smtp-Source: AA+uWPzZ1vId7X8f7QEIeAs2Ii50rPg72+/U9ucawV6EeI+vd64Q0//cxkK3jEtW4JtmfTonDE3bSQ== X-Received: by 2002:a17:902:6b89:: with SMTP id p9-v6mr4990113plk.272.1533884198586; Thu, 09 Aug 2018 23:56:38 -0700 (PDT) Received: from garuda.local ([2601:602:9d02:4725:6495:ba21:1ebe:620a]) by smtp.gmail.com with ESMTPSA id j27-v6sm17460875pfj.91.2018.08.09.23.56.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Aug 2018 23:56:37 -0700 (PDT) From: Chris Marusich To: Arun Isaac Subject: Re: [bug#32358] Add pcscd service References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> Date: Thu, 09 Aug 2018 23:56:26 -0700 In-Reply-To: (Arun Isaac's message of "Thu, 09 Aug 2018 19:55:59 +0530") Message-ID: <87zhxu7lr9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Arun, Thank you for the update! I'm having a little trouble testing this on my system due to the following unrelated bug: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D28144 However, I'll keep trying and let you know once I've tested it out. For now, here's my feedback. Overall, this looks good to me. Mainly, I'd just like to test it before we commit it to master. If you're feeling up to it, it would be great to add a system test, but it's not necessary, and we could add it later. Arun Isaac writes: > +(define-module (gnu services security-token) > + #:use-module (gnu services) > + #:use-module (gnu services shepherd) > + #:use-module (gnu packages admin) > + #:use-module (gnu packages security-token) > + #:use-module (gnu system shadow) > + #:use-module (guix gexp) > + #:use-module (guix modules) > + #:use-module (guix records) > + #:use-module (ice-9 match) > + #:use-module (srfi srfi-26) > + #:export (pcscd-configuration > + pcscd-configuration? > + pcscd-service-type)) Shouldn't we also export pcscd-configuration-pcsc-lite and pcscd-configuration-usb-drivers? We allow users to set them when constructing the record, so it seems reasonable to allow users to get them, to. After all, if a user wants to construct a new from an existing (e.g., using "inherit"), they might need to be able to get the original values (e.g., to add more packages to the usb-drivers list). > +(define pcscd-shepherd-service > + (match-lambda > + (($ pcsc-lite) > + (with-imported-modules (source-module-closure > + '((gnu build shepherd))) > + (shepherd-service > + (documentation "PC/SC Smart Card Daemon") > + (provision '(pcscd)) > + (modules '((gnu build shepherd))) > + (start #~(make-forkexec-constructor > + (list #$(file-append pcsc-lite "/sbin/pcscd") "-f"))) > + (stop #~(make-kill-destructor))))))) Does this work as written? The make-forkexec-constructor and make-kill-destructor procedures are exported in (shepherd service), but it doesn't look like that module will be used, since it isn't in the modules list. If it does work, then I don't understand how (shepherd service) is getting used, so I'd be curious to know why it works! > +(define pcscd-activation > + (match-lambda > + (($ pcsc-lite usb-drivers) > + #~(begin > + (use-modules (guix build utils)) > + (mkdir-p "/var/lib") > + (symlink #$(directory-union > + "pcsc" > + (map (cut file-append <> "/pcsc") > + usb-drivers)) > + "/var/lib/pcsc"))))) What happens if the symlink target already exists? Will this crash the init process, or will the system come online and just report an error? Some people (such as myself) have already created this directory manually, so the directory might exist if they forget to delete it. > Subject: [PATCH 2/2] gnu: ccid: Move pcsc-lite from inputs to native-inpu= ts. Patch 2/2 looks good to me! =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlttNxoACgkQ3UCaFdgi Rp1QwxAAw+6mnoKiXFZwVZmWNeSysiPRwhdqnb9ST/V3XMPWtWVkMrkTLMubQgzk cNmzIg1ydjQdMqW7lUDQiwjSUa0UE+tx/lV4ua12rtgY8urLrASHxcIcUHjnMQTZ 2t77847gmAXaz2lyYUzrDXfcOTdqJ7Wx0Zbl64TYE0coryf4NSb3LeJlDXfiQcvt 7QUxYgZ/fakE/QxoyC53/8NwbUztWbG+IvLHc/hssI/ZTl3lvAF2LCYk+qvD3bQ5 o2uSYgZ4c01uxbhRB+OOMBxJwD/8TfKpsJG27CWEXnvhiTikDSqX7wREDff4ArpZ a/yYIfLC99fmRElRN9O6YKoG7S/u7uDB/2ALZR7gk7NPsDCKjGmLEUF760zrKOIU mCr/8E66xmR7Z2aUfJJDhr786/DZzSn3MIzF2oyk1KE+nVFh2mwxXcgWV03pNiM1 kYBcPBPJLsUoz7pTvBgZeWPHhheTKS8JyGN+hzBTCBD4Y7cCMzbLhzdMLIFX5V6s NPDfSU0DtHY/h80AlX6PGp9vr5Dt9DOpk/BHXJlAVcmD+PysHEZkS2o/nKUxaBED TWBLEZoppbpIrljkTKmoSpV6e7RCm5PkaCc//TvS0BcaLA+JwUSdOHb4RilmixoX Imgpnq3BHk7uIeWAwip0dV18/qDnRMhp47JPaYUQMPkJ97o+W2Q= =Eqhv -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 04:26:24 2018 Received: (at 32358) by debbugs.gnu.org; 12 Aug 2018 08:26:25 +0000 Received: from localhost ([127.0.0.1]:48606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1folhg-0007f7-M5 for submit@debbugs.gnu.org; Sun, 12 Aug 2018 04:26:24 -0400 Received: from vultr.systemreboot.net ([45.77.148.100]:52760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1folhf-0007et-2P for 32358@debbugs.gnu.org; Sun, 12 Aug 2018 04:26:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=m0CuELOXQr2Dy9L1QLT2mHQNgFEk8xZhRNR+oDhUUUk=; b=b4Ak2W9z+dBX7J9ZzcXwxq/Dp kjMXdLQs6Aa60Rgp1YR4c7HIFSTVuaAY/NEuTfJcJehDwZDye/b5WoAz990zx1Ym6IzVdTqzuvWw5 bWnSQVQj8WP6c2+x7L87BhdvndG6YxvPD3IhhJWDQyvdJIjaSy5Ugk5+aq2TEBinYR5MA=; Received: from [192.168.2.1] (helo=steel) by systemreboot.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1folhV-00009H-2R; Sun, 12 Aug 2018 13:56:14 +0530 From: Arun Isaac To: Chris Marusich Subject: Re: [bug#32358] Add pcscd service In-Reply-To: <87zhxu7lr9.fsf@gmail.com> References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> Date: Sun, 12 Aug 2018 13:55:52 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > I'm having a little trouble testing this on my system due to the > following unrelated bug: > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28144 > > However, I'll keep trying and let you know once I've tested it out. Sure, no problem. > If you're feeling up to it, it would be great to add a system test, > but it's not necessary, and we could add it later. I'm ok with adding a system test right now. But, what kind of test? Can you elaborate on any ideas you have? > Shouldn't we also export pcscd-configuration-pcsc-lite and > pcscd-configuration-usb-drivers? Sure, will do. >> +(define pcscd-shepherd-service >> + (match-lambda >> + (($ pcsc-lite) >> + (with-imported-modules (source-module-closure >> + '((gnu build shepherd))) >> + (shepherd-service >> + (documentation "PC/SC Smart Card Daemon") >> + (provision '(pcscd)) >> + (modules '((gnu build shepherd))) >> + (start #~(make-forkexec-constructor >> + (list #$(file-append pcsc-lite "/sbin/pcscd") "-f"))) >> + (stop #~(make-kill-destructor))))))) > > Does this work as written? The make-forkexec-constructor and > make-kill-destructor procedures are exported in (shepherd service), but > it doesn't look like that module will be used, since it isn't in the > modules list. If it does work, then I don't understand how (shepherd > service) is getting used, so I'd be curious to know why it works! Yes, the service does work. But, I don't really know why. I copied this bit of code from some other service and modified it incrementally until it did what I wanted. :-P So, I'm not super-clear what exactly is happening here. >> +(define pcscd-activation >> + (match-lambda >> + (($ pcsc-lite usb-drivers) >> + #~(begin >> + (use-modules (guix build utils)) >> + (mkdir-p "/var/lib") >> + (symlink #$(directory-union >> + "pcsc" >> + (map (cut file-append <> "/pcsc") >> + usb-drivers)) >> + "/var/lib/pcsc"))))) > > What happens if the symlink target already exists? Will this crash the > init process, or will the system come online and just report an error? > Some people (such as myself) have already created this directory > manually, so the directory might exist if they forget to delete it. When the symlink already exists, the system reconfigures properly, but reports an error. You will have to delete your existing /var/lib/pcsc symlink before reconfiguring. >> Subject: [PATCH 2/2] gnu: ccid: Move pcsc-lite from inputs to native-inputs. > > Patch 2/2 looks good to me! I pushed this patch alone to master. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 18:27:02 2018 Received: (at 32358) by debbugs.gnu.org; 12 Aug 2018 22:27:02 +0000 Received: from localhost ([127.0.0.1]:49103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1foypB-0000E7-Hr for submit@debbugs.gnu.org; Sun, 12 Aug 2018 18:27:02 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:46349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1foypA-0000Dr-2T for 32358@debbugs.gnu.org; Sun, 12 Aug 2018 18:27:00 -0400 Received: by mail-pg1-f195.google.com with SMTP id f14-v6so6644953pgv.13 for <32358@debbugs.gnu.org>; Sun, 12 Aug 2018 15:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=kvtEket167iOProNvEy8NG+UXopn4o/qXU3BxUo1mj8=; b=bo8LkGpKmvWVW4bcEc34fcw/W6Q6pxOFW9KiVKg/HHV2wDl3AnwZMcaPMPEQRtH8je osv1v5WMLYUL6PWu0TUbNTJShzvm+uTsXyMLFoYCJyfUqLeu7UwbfKZJcMt8GCyrQ8BD fZBeFjMoAuY9NDPZM7EBg67mdK81SdVOIfBHuDnB4mOMFace8QKG2LmgaOfcXdddreyt L6mfpDjcfKshAtlnpN11hGByM/1xfdYF/2tTGDCoNjY9LixQhLFWGKue3qodZQUnfcv+ fcwBAW5gwHbxeKRmK3mfIKsFJoW0AMK9xju0JtYmoYzIxSrFcigSN+ASvp7l8aglDGkx WPNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=kvtEket167iOProNvEy8NG+UXopn4o/qXU3BxUo1mj8=; b=rHFADx4UBcBqoIH4kO2peRNEKsSgmDFerwLuRW+1dx8IKKyoAd23u4M8Be1KkqwzSc O8iFUPfCqFYyvHsbsu0W85vdzfRPFwRRQvTuC7/xFfgX+0AmqmHy1+rpUfABWZ1h/PIZ dMFK2YbfSGrTqr2kObRnjg6iw+7KnqcJWypK6oMuyM79gyougoKTJdAhASoBcIocMump Gm/D0knvtbFCrf7Mci34dK4Fk3aJZZaUSKNJy5eQ9/aBMvRuti4bqnd2w4PMv3gdH6T8 MJcaoNnbiz6pMkttAZ1mnafarA9F5vel7vi2+x/5fp3xg+kVaQ/UcisVmATRnBUZ9T51 AhnQ== X-Gm-Message-State: AOUpUlFIQYwcaDlUeSqGwP2E5TaVrODB4+IYeCQYY24TbMyWd+/vpX23 ifYa5JJWadYGNpxobn9KCza/yrc1 X-Google-Smtp-Source: AA+uWPyZYDkY40IWMIX0M9vRjeGpsoeOFok0tAeUm5V8eMwra2dX4Mxo3y7L0RrAus/G85L9akpTHg== X-Received: by 2002:a62:4898:: with SMTP id q24-v6mr16165460pfi.58.1534112813733; Sun, 12 Aug 2018 15:26:53 -0700 (PDT) Received: from garuda.local ([206.125.69.6]) by smtp.gmail.com with ESMTPSA id l70-v6sm23564680pge.64.2018.08.12.15.26.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Aug 2018 15:26:52 -0700 (PDT) From: Chris Marusich To: Arun Isaac Subject: Re: [bug#32358] Add pcscd service References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> Date: Sun, 12 Aug 2018 15:26:47 -0700 In-Reply-To: (Arun Isaac's message of "Sun, 12 Aug 2018 13:55:52 +0530") Message-ID: <87sh3jkyqg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Arun, It turns out that when we run pcscd in the foreground with the -f option, it won't emit messages to syslog. Instead, it emits messages to stderr, and those messages will not be stored in logs, as explained in the following bug report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D30939 To ensure users can easily find the messages, I think we should avoid using the "-f" option. In addition, pcscd logs its PID to /var/run/pcscd/pcscd.pid. To ensure that Shepherd can still tell if the service is alive even when we do not run it in the foreground, we should invoke make-forkexec-constructor with the #:pid-file keyword argument. Could you make those last couple changes? Everything else looks great! Arun Isaac writes: >> I'm having a little trouble testing this on my system due to the >> following unrelated bug: >> >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D28144 >> >> However, I'll keep trying and let you know once I've tested it out. > > Sure, no problem. I was successful in testing it. The service works for me! > I'm ok with adding a system test right now. But, what kind of test? Can > you elaborate on any ideas you have? It would be good to have a system test that verifies that pcscd has successfully started. Even such a simple test would be useful, since it would catch a certain class of problems. There are a lot of existing examples in the gnu/tests directory. I recently added a test like this for the tor service, which you can find here (I haven't committed it to master yet): https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D32346 >>> +(define pcscd-shepherd-service >>> + (match-lambda >>> + (($ pcsc-lite) >>> + (with-imported-modules (source-module-closure >>> + '((gnu build shepherd))) >>> + (shepherd-service >>> + (documentation "PC/SC Smart Card Daemon") >>> + (provision '(pcscd)) >>> + (modules '((gnu build shepherd))) >>> + (start #~(make-forkexec-constructor >>> + (list #$(file-append pcsc-lite "/sbin/pcscd") "-f"))) >>> + (stop #~(make-kill-destructor))))))) >> >> Does this work as written? The make-forkexec-constructor and >> make-kill-destructor procedures are exported in (shepherd service), but >> it doesn't look like that module will be used, since it isn't in the >> modules list. If it does work, then I don't understand how (shepherd >> service) is getting used, so I'd be curious to know why it works! > > Yes, the service does work. But, I don't really know why. I copied this > bit of code from some other service and modified it incrementally until > it did what I wanted. :-P So, I'm not super-clear what exactly is > happening here. I've looked into this. The reason it works is because the "start" field's g-expression is expanded into the Shepherd's configuration file (see: (guix) Shepherd Services), which is evaluated in a context where bindings from the (shepherd service) module are available (see: (shepherd) Invoking shepherd). Therefore, the "start" field's g-expression can use procedures from (shepherd service), such as make-forkexec-constructor, regardless of what is listed in the "modules" field. >>> +(define pcscd-activation >>> + (match-lambda >>> + (($ pcsc-lite usb-drivers) >>> + #~(begin >>> + (use-modules (guix build utils)) >>> + (mkdir-p "/var/lib") >>> + (symlink #$(directory-union >>> + "pcsc" >>> + (map (cut file-append <> "/pcsc") >>> + usb-drivers)) >>> + "/var/lib/pcsc"))))) >> >> What happens if the symlink target already exists? Will this crash the >> init process, or will the system come online and just report an error? >> Some people (such as myself) have already created this directory >> manually, so the directory might exist if they forget to delete it. > > When the symlink already exists, the system reconfigures properly, but > reports an error. You will have to delete your existing /var/lib/pcsc > symlink before reconfiguring. OK. As long as there's a useful error message, that's good! >>> Subject: [PATCH 2/2] gnu: ccid: Move pcsc-lite from inputs to native-in= puts. >> >> Patch 2/2 looks good to me! > > I pushed this patch alone to master. Great! Thank you. I look forward to getting the service itself into master, also! =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAltwtCcACgkQ3UCaFdgi Rp1n8Q/9Fs3+4vsDSMKk5JCyEDPGzPJIMncTzR6Mnh4eQI2XXdmQSFLbqnF8HccM Ff3Gdbi7EVjfUzADrZRP3Xd4GtdTb3bapgDcm/ldaJl97eNyugLwkh1dHSwYHJ8B EHLLX9b7Pl2wOyZwze2aHJgHaUxE/JsbeZskch4+r17so2SPeVmhW0ihKo2xtml4 r+C43vz+elhhttqgBO2I10846qreTpJeGKfJrRKkZHV7wnEcYKrexf7zSDI3GmcK AlFxlc3DkEksJYppTfad57GLFc4st6Vlih9Ct0iL+Z6IIuaS3bE27TCdLIDG3F2g XtjMLSZpmUaGe5UVWnUEhK3Ui1V1wNnA5nvV1wrpI0rE8WTdH1ORfUf/0rPNPGI7 qKcd+WLa5U0cOFx4UzrO+ufTMYpXI4jNOFVfIUFVhwUZhXojEEEmbdohCVNku+J0 G027XLI5erUG6ftccfUWPg67yuemZayDuPcSdL9hmuTAEGuwbYe04hgeWiVuW7OV bQ20hx7YMdouGoZV2g1JUn/46zpFP7W+GEe/Tkl+mideeeIdec+UuXAs5Kbj2AaX dY9/OLsg6nHjsi2W8ZBeX1yyT/glZg1mOiat6/1dLsY/DrpTU6sVKWKDBqW+3ScY 1Cz3/CeTm+rmc/3WdiP5VLwNe2YtJsMe15h5Avgr5T7KoRjMhIc= =QEuC -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 19:31:48 2018 Received: (at 32358) by debbugs.gnu.org; 12 Aug 2018 23:31:49 +0000 Received: from localhost ([127.0.0.1]:49117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fozps-0001vH-Iq for submit@debbugs.gnu.org; Sun, 12 Aug 2018 19:31:48 -0400 Received: from mail.lassieur.org ([83.152.10.219]:56710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fozpr-0001v9-3b for 32358@debbugs.gnu.org; Sun, 12 Aug 2018 19:31:47 -0400 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id a53c77ab (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Sun, 12 Aug 2018 23:31:45 +0000 (UTC) References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> <87sh3jkyqg.fsf@gmail.com> User-agent: mu4e 1.0; emacs 26.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Chris Marusich Subject: Re: [bug#32358] Add pcscd service In-reply-to: <87sh3jkyqg.fsf@gmail.com> Date: Mon, 13 Aug 2018 01:31:44 +0200 Message-ID: <878t5b6u1r.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: Arun Isaac , 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi all! Chris Marusich writes: > Hi Arun, > > It turns out that when we run pcscd in the foreground with the -f > option, it won't emit messages to syslog. Instead, it emits messages to > stderr, and those messages will not be stored in logs, as explained in > the following bug report: > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D30939 > > To ensure users can easily find the messages, I think we should avoid > using the "-f" option. > > In addition, pcscd logs its PID to /var/run/pcscd/pcscd.pid. To ensure > that Shepherd can still tell if the service is alive even when we do not > run it in the foreground, we should invoke make-forkexec-constructor > with the #:pid-file keyword argument. Without the '-f' option, pcscd would return immediately, and thus calling MAKE-FORKEXEC-CONSTRUCTOR wouldn't make sense. Instead, you could just INVOKE it. See the 'prosody', 'postgres' and 'nginx' services for examples. And you could stop it by sending SIGTERM to the PID in /var/run/pcscd/pcscd.pid I guess. Also, the systemd unit files I've seen use the '--auto-exit' and '--hotplug' options. Do you know if they make sense for us? Cl=C3=A9ment From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 13 03:18:55 2018 Received: (at 32358) by debbugs.gnu.org; 13 Aug 2018 07:18:55 +0000 Received: from localhost ([127.0.0.1]:49220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fp77u-00050i-QZ for submit@debbugs.gnu.org; Mon, 13 Aug 2018 03:18:55 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:43199) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fp77t-00050T-OS for 32358@debbugs.gnu.org; Mon, 13 Aug 2018 03:18:54 -0400 Received: by mail-pf1-f193.google.com with SMTP id j26-v6so7276033pfi.10 for <32358@debbugs.gnu.org>; Mon, 13 Aug 2018 00:18:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4eQiCoOPymIhmQio4YJq8tXzADT+4kdV0HCap6l0FGc=; b=OqtZyj1TIgxwUYw76/YjHG4PMKT38ci7eAh6EiHKYDeIq419ybJdeUUGttt0eJ5n4a Hu3n7wm9gB9QRil4AMrfZ5YeHbJ8hfwpD/lQrIpoqBPBGHyVHdQ9zDh3A5HrageqAq9N jcjsuxUj/bHRd5lx8S16KLW5b5eZEDVxjF/F+O2Ba9F+1sk8QxZWFctiSYbx44b0/0Qa Kejn6DbGoMk9+Pyvc771BBgyut5dl4GG4ugE0eUTBS7aZQQuzDQ9iN4raOXt/9tBFOpD 5uFeOrCYkpxSWCWuMLkPkTcVl51SVdWqOga7ykjqDQHIX8h2QyLYyJmYRpIaiWxK/2HD moxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=4eQiCoOPymIhmQio4YJq8tXzADT+4kdV0HCap6l0FGc=; b=Y3S6tUI+IfsCyrdgAZBZf6osDL3ROqLx4/0OvvPB7bgs+bTHGXL0ZX8UlXELjlLJEl /OHeXT5PyUS+2+ulZdaaWVwBcGlMzWVslKEjH71UUMSoHdvvUyrWB3DCH9IaxrLfk48M E3JrweT67AS1nccsgp3DiWf00tDED6BZgUWj4gsp6occK1wWfvDChyNty/tBYTLA9cHe 7FN3XZzzSNSm+wjsV44Ukg4APgbKmsIcoJnUofJsLMzedYDAAKpNszJgCSHdaA1bXpro GFexS6UDnzxziEnLuwgT9qkDrAQiKNNDXVWNCOVQCZlzI1CGtCjbDsz9NJa/sdLNtsWM yfRA== X-Gm-Message-State: AOUpUlGX3WIvxDSsEOS7HuluG82eELWfWRLDHLKf5XXxwm9qckeLi7ym f8m5v87hQmrLzIjwrO+B00q/ZANy X-Google-Smtp-Source: AA+uWPy1wMb+DgldSS6kZC0ToANY0/Fk9MioCCeKVZ12JVGoSZkFChfSnNka0ss/Mo9VjanKcbMmqg== X-Received: by 2002:a62:455b:: with SMTP id s88-v6mr17871744pfa.203.1534144727398; Mon, 13 Aug 2018 00:18:47 -0700 (PDT) Received: from garuda.local ([206.125.69.6]) by smtp.gmail.com with ESMTPSA id d19-v6sm46475569pfm.48.2018.08.13.00.18.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Aug 2018 00:18:45 -0700 (PDT) From: Chris Marusich To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur Subject: Re: [bug#32358] Add pcscd service References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> <87sh3jkyqg.fsf@gmail.com> <878t5b6u1r.fsf@lassieur.org> Date: Mon, 13 Aug 2018 00:18:41 -0700 In-Reply-To: <878t5b6u1r.fsf@lassieur.org> (=?utf-8?Q?=22Cl=C3=A9ment?= Lassieur"'s message of "Mon, 13 Aug 2018 01:31:44 +0200") Message-ID: <87ftziybse.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: Arun Isaac , 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Cl=C3=A9ment! Cl=C3=A9ment Lassieur writes: > Hi all! > > Chris Marusich writes: > >> Hi Arun, >> >> It turns out that when we run pcscd in the foreground with the -f >> option, it won't emit messages to syslog. Instead, it emits messages to >> stderr, and those messages will not be stored in logs, as explained in >> the following bug report: >> >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D30939 >> >> To ensure users can easily find the messages, I think we should avoid >> using the "-f" option. >> >> In addition, pcscd logs its PID to /var/run/pcscd/pcscd.pid. To ensure >> that Shepherd can still tell if the service is alive even when we do not >> run it in the foreground, we should invoke make-forkexec-constructor >> with the #:pid-file keyword argument. > > Without the '-f' option, pcscd would return immediately, and thus > calling MAKE-FORKEXEC-CONSTRUCTOR wouldn't make sense. Instead, you > could just INVOKE it. See the 'prosody', 'postgres' and 'nginx' > services for examples. And you could stop it by sending SIGTERM to the > PID in /var/run/pcscd/pcscd.pid I guess. Thank you for mentioning this. You make a good point. I'm not yet familiar with all the different ways Shepherd manages its herd of processes. For example, I know Shepherd looks for the #:pid-file when first starting the process to determine whether it started up successfully. However, I don't know if Shepherd uses that PID file for anything else while managing the process later on. In any case, the procedure make-forkexec-constructor seems to hide a lot of the nitty gritty details (e.g., closing file descriptors), so I think it would be better to use it instead of invoking pcscd on our own if we don't have to. Perhaps we can do the following: * Run pcscd in the foreground (with -f). * Use make-forkexec-constructor. * Tell Shepherd about the PID file via the #:pid-file option to make-forkexec-constructor. * Redirect pcscd's stdout/stderr to /var/log/pcscd via the #:log-file option to make-forkexec-constructor. That way, we can still use the convenient make-forkexec-constructor procedure, Shepherd will still be able to manage the process, and people will be able to find the logs more easily. What do you think? > Also, the systemd unit files I've seen use the '--auto-exit' and > '--hotplug' options. Do you know if they make sense for us? These options are interesting, but I don't think they're useful for us at this time. Judging by the manual, it looks like the "--auto-exit" option is intended to be used when a mechanism exists for automatically starting pcscd on demand (maybe when a user plugs in a security token?), so you don't need to keep it running all the time. We don't have a mechanism like that at this time. As for the "--hotplug" option, it looks like it's intended to be used to tell a running pcscd to re-read its configuration file. However, since that configuration file is an immutable file in the store, it isn't ever going to change. Maybe in the future we can think of helpful ways to use these options, but for now I think it's OK to omit them. =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAltxMNEACgkQ3UCaFdgi Rp0k3w/+M/hRnja8Ij/hsaHFGJpENOMgS7h44k+Pz9+QbbV4vIdp769+4PQE4qwu 4eRfBHWec+UzkcgxtTUmST3lHQs/STckmr1Fm9UP1pzdIzKpaHHQGyKTbQSPK6Na q3cky0sox6IgHEpt/+WUi1fmPyZjQ2yUxj9vdVx6pnqihIjm8ZBgncLCr7La7ypw xR2CsB1zlU4gmWK5IbOD2DkF0i/ia46psDnApsfyyEqOReUXOZ0/du3FZ45WUTZ9 KRZNVNFeeWk6JyfG/XG/C4MCBDcUw/KfYp312fBv++RK4hDF1QvbOoV+VzyeZPlD clolTKFhddLD/lVL9Eiz7JWnRUFTyZpj3PGdzrOq6oG1UlOOPzhwZbTqyN/cuNJS 5468a2hGpTWRbmw3dg+IegEBRtNUw3PCpRvPfpmotz5AKXVMFZF6EdScPtYfTxKW MUuL+pvOykDMAVUvxUDxyoDM+gT9KaOaWW0BECVviQyzPikMGgCf2qw5Ao0TqsNR iTqyeafuBpZWuDsqwr2p6c09mJ+f0pxSvzZ47IslOks+NJWswvHNFzadZFbhAZXS C4aXM0PvNM/TKCqtE+mp65nxLZjrLw2mP3Zuask2jEFGMoeGqfhxLAzu3Wl7U2l5 PecRJb/6IV7CVvQ9G7hCxrgOblvFltc7bfKgDoZLw2hMctRcNho= =14RF -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 13 12:21:38 2018 Received: (at 32358) by debbugs.gnu.org; 13 Aug 2018 16:21:38 +0000 Received: from localhost ([127.0.0.1]:49895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpFb8-0007wX-EG for submit@debbugs.gnu.org; Mon, 13 Aug 2018 12:21:38 -0400 Received: from mail.lassieur.org ([83.152.10.219]:56782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpFb6-0007wO-24 for 32358@debbugs.gnu.org; Mon, 13 Aug 2018 12:21:36 -0400 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 4537a9b0 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Mon, 13 Aug 2018 16:21:34 +0000 (UTC) References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> <87sh3jkyqg.fsf@gmail.com> <878t5b6u1r.fsf@lassieur.org> <87ftziybse.fsf@gmail.com> User-agent: mu4e 1.0; emacs 26.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Chris Marusich Subject: Re: [bug#32358] Add pcscd service In-reply-to: <87ftziybse.fsf@gmail.com> Date: Mon, 13 Aug 2018 18:21:33 +0200 Message-ID: <87600e6xv6.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: Arun Isaac , 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Chris Marusich writes: > Thank you for mentioning this. You make a good point. I'm not yet > familiar with all the different ways Shepherd manages its herd of > processes. For example, I know Shepherd looks for the #:pid-file when > first starting the process to determine whether it started up > successfully. When using MAKE-FORKEXEC-CONSTRUCTOR, yes. And it makes sense only for blocking processes, because they are 'dumb', they don't return information about whether they have succesfully started or not. However, 'pcscd' is smart, it does return '1' if it failed to start, and '0' if it started successfully. So, all the logic (the pid check and everything) is done within 'pcscd' itself, no need for the Shepherd to do it. (start (pid-of smart-nonblocking-process)) =3D=3D (start (make-forkexec-con= structor dumb-blocking-process)) > However, I don't know if Shepherd uses that PID file for anything else > while managing the process later on. No, it doesn't use the #:PID-FILE argument for anything else. However, it does use the return value of the start procedure as a PID file to automatically respawn the service if it's an integer. So you just need to return (call-with-input-file pid-file read) instead of #t if you want automatic respawning, as in https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3Dfdbca05d78d091bfc07= 5e54c9fb90125262eadf0. > In any case, the procedure make-forkexec-constructor seems to hide a lot > of the nitty gritty details (e.g., closing file descriptors), so I think > it would be better to use it instead of invoking pcscd on our own if we > don't have to. All this stuff is done by 'pcscd' when run without '-f', using MAKE-FORKEXEC-CONSTRUCTOR doesn't help in any way. Moreover, we do lose the 'syslog' feature if we use it. > Perhaps we can do the following: > > * Run pcscd in the foreground (with -f). > * Use make-forkexec-constructor. > * Tell Shepherd about the PID file via the #:pid-file option to > make-forkexec-constructor. > * Redirect pcscd's stdout/stderr to /var/log/pcscd via the #:log-file > option to make-forkexec-constructor. > > That way, we can still use the convenient make-forkexec-constructor > procedure, Shepherd will still be able to manage the process, and people > will be able to find the logs more easily. > What do you think? I think it's better to use syslog ;-) By the way, 'syslogd' should be added as a requirement I think. >> Also, the systemd unit files I've seen use the '--auto-exit' and >> '--hotplug' options. Do you know if they make sense for us? [...] > Maybe in the future we can think of helpful ways to use these options, > but for now I think it's OK to omit them. Ok! Cl=C3=A9ment From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 13 12:36:49 2018 Received: (at 32358) by debbugs.gnu.org; 13 Aug 2018 16:36:49 +0000 Received: from localhost ([127.0.0.1]:49900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpFpo-0008KB-Qe for submit@debbugs.gnu.org; Mon, 13 Aug 2018 12:36:49 -0400 Received: from mail.lassieur.org ([83.152.10.219]:56790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpFpn-0008K3-1J for 32358@debbugs.gnu.org; Mon, 13 Aug 2018 12:36:47 -0400 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 7437f3ff (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Mon, 13 Aug 2018 16:36:45 +0000 (UTC) References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> <87sh3jkyqg.fsf@gmail.com> <878t5b6u1r.fsf@lassieur.org> <87ftziybse.fsf@gmail.com> <87600e6xv6.fsf@lassieur.org> User-agent: mu4e 1.0; emacs 26.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Chris Marusich Subject: Re: [bug#32358] Add pcscd service In-reply-to: <87600e6xv6.fsf@lassieur.org> Date: Mon, 13 Aug 2018 18:36:45 +0200 Message-ID: <874lfy6x5u.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Cl=C3=A9ment Lassieur writes: >> However, I don't know if Shepherd uses that PID file for anything else >> while managing the process later on. > > No, it doesn't use the #:PID-FILE argument for anything else. However, > it does use the return value of the start procedure as a PID file to > automatically respawn the service if it's an integer. So you just need > to return (call-with-input-file pid-file read) instead of #t if you want > automatic respawning, as in > https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3Dfdbca05d78d091bfc= 075e54c9fb90125262eadf0. Note that the 'running' slot would then have the PID value, and 'make-kill-destructor' would work, so no need to change the stop procedure. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 13 17:17:21 2018 Received: (at 32358) by debbugs.gnu.org; 13 Aug 2018 21:17:21 +0000 Received: from localhost ([127.0.0.1]:49982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpKDI-00075y-R3 for submit@debbugs.gnu.org; Mon, 13 Aug 2018 17:17:21 -0400 Received: from vultr.systemreboot.net ([45.77.148.100]:51412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpKDH-00075i-Bc for 32358@debbugs.gnu.org; Mon, 13 Aug 2018 17:17:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=abJlpuiywgzcUk6+O3AB3dkTbjMepbTGEym8a1gp0mc=; b=lsX0myc7wBs6kMO2E/cSyhZb9 aSH5j3lw4P3aF8J+9KXg+LaFttYhL5i2ZpGKvoML6svZkGEYIwTYLBkccib7yc74ffc4N4vH7LtUA mtC/xA6DFdetYB8Mv7gZllHjPw/YX2aNbNm2mpNfqpzvQlopek68Oo15JWhSPf/mKC81U=; Received: from [192.168.2.1] (helo=steel) by systemreboot.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fpKD7-0002qR-Rf; Tue, 14 Aug 2018 02:47:10 +0530 From: Arun Isaac To: Chris Marusich , =?utf-8?Q?Cl=C3=A9ment?= Lassieur Subject: Re: [bug#32358] Add pcscd service In-Reply-To: References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> Date: Tue, 14 Aug 2018 02:47:01 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Please find attached an updated patch. I have used invoke instead of make-forkexec-constructor. I have also used (call-with-input-file "/var/run/pcscd/pcscd.pid" read) so that shepherd knows the correct PID. I hope I have followed your discussion correctly. Let me know if this patch is satisfactory. I am working on a simple test for this service. I will hopefully be done and send you a patch for the same within 24 hours. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 13 17:25:05 2018 Received: (at 32358) by debbugs.gnu.org; 13 Aug 2018 21:25:05 +0000 Received: from localhost ([127.0.0.1]:49986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpKKn-0007I1-4s for submit@debbugs.gnu.org; Mon, 13 Aug 2018 17:25:05 -0400 Received: from vultr.systemreboot.net ([45.77.148.100]:51944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpKKk-0007HP-MG for 32358@debbugs.gnu.org; Mon, 13 Aug 2018 17:25:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=P6ITgmWDWj4PpiaI6cktDOifsyGEaw9QfjhjXRsrAn0=; b=nUdp3zfpsVb8CU+qaBYHuPBXA auGDa9+lwKVkSGdHF1RLwW91Rn2/PBxQMY7UvhlX5QwIIqGlEZElwdgMhn7JGbgA44Rl5yNBbSsQ9 q9SkmipGBbFHiZEDp7YGsNPxoUKda3JTBgClWQRkDD5YzmE5r0w1okWG43AGz2K1E6aiQ=; Received: from [192.168.2.1] (helo=steel) by systemreboot.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fpKKb-0002u0-OU; Tue, 14 Aug 2018 02:54:54 +0530 From: Arun Isaac To: Chris Marusich , =?utf-8?Q?Cl=C3=A9ment?= Lassieur Subject: Re: [bug#32358] Add pcscd service In-Reply-To: References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> Date: Tue, 14 Aug 2018 02:54:47 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Sorry, I forgot to attach the patch in my earlier mail. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-services-Add-pcscd-service.patch Content-Transfer-Encoding: quoted-printable >From 17b4763615e40d2ac821021ccbd451ad9ac0d10d Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 2 Aug 2018 05:32:56 +0530 Subject: [PATCH] gnu: services: Add pcscd service. * gnu/services/security-token.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Miscellaneous Services): Document the service. --- doc/guix.texi | 31 ++++++++++++ gnu/local.mk | 1 + gnu/services/security-token.scm | 84 +++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 gnu/services/security-token.scm diff --git a/doc/guix.texi b/doc/guix.texi index a9bb6d864..36d857082 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20331,6 +20331,37 @@ An association list specifies kernel parameters an= d their values. @end table @end deftp =20 +@cindex pcscd +@subsubheading PC/SC Smart Card Daemon Service + +The @code{(gnu services security-token)} module provides the following ser= vice +to run @command{pcscd}, the PC/SC Smart Card Daemon. @command{pcscd} is t= he +daemon program for pcsc-lite and the MuscleCard framework. It is a resource +manager that coordinates communications with smart card readers, smart car= ds +and cryptographic tokens that are connected to the system. + +@defvr {Scheme Variable} pcscd-service-type +Service type for the @command{pcscd} service. Its value must be a +@code{pcscd-configuration} object. To run pcscd in the default +configuration, instantiate it as: + +@example +(service pcscd-service-type) +@end example +@end defvr + +@deftp {Data Type} pcscd-configuration +The data type representing the configuration of @command{pcscd}. + +@table @asis +@item @code{pcsc-lite} (default: @code{pcsc-lite}) +The pcsc-lite package that provides pcscd. +@item @code{usb-drivers} (default: @code{(list ccid)}) +List of packages that provide USB drivers to pcscd. Drivers are expected t= o be +under @file{pcsc/drivers} in the store directory of the package. +@end table +@end deftp + @cindex lirc @subsubheading Lirc Service =20 diff --git a/gnu/local.mk b/gnu/local.mk index dee36f8b4..29c05dfc9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -486,6 +486,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/services/monitoring.scm \ %D%/services/networking.scm \ %D%/services/nfs.scm \ + %D%/services/security-token.scm \ %D%/services/shepherd.scm \ %D%/services/sound.scm \ %D%/services/herd.scm \ diff --git a/gnu/services/security-token.scm b/gnu/services/security-token.= scm new file mode 100644 index 000000000..7e7ea54a5 --- /dev/null +++ b/gnu/services/security-token.scm @@ -0,0 +1,84 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2018 Arun Isaac +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services security-token) + #:use-module (gnu services) + #:use-module (gnu services shepherd) + #:use-module (gnu packages admin) + #:use-module (gnu packages security-token) + #:use-module (gnu system shadow) + #:use-module (guix gexp) + #:use-module (guix modules) + #:use-module (guix records) + #:use-module (ice-9 match) + #:use-module (srfi srfi-26) + #:export (pcscd-configuration + pcscd-configuration? + pcscd-configuration-pcsc-lite + pcscd-configuration-usb-drivers + pcscd-service-type)) + +;;; +;;; PC/SC Smart Card Daemon +;;; + +(define-record-type* + pcscd-configuration make-pcscd-configuration pcscd-configuration? + (pcsc-lite pcscd-configuration-pcsc-lite + (default pcsc-lite)) + (usb-drivers pcscd-configuration-usb-drivers + (default (list ccid)))) + +(define pcscd-shepherd-service + (match-lambda + (($ pcsc-lite) + (with-imported-modules (source-module-closure + '((gnu build shepherd))) + (shepherd-service + (documentation "PC/SC Smart Card Daemon") + (provision '(pcscd)) + (requirement '(syslogd)) + (modules '((gnu build shepherd))) + (start #~(lambda _ + (invoke #$(file-append pcsc-lite "/sbin/pcscd")) + (call-with-input-file "/var/run/pcscd/pcscd.pid" read))) + (stop #~(make-kill-destructor))))))) + +(define pcscd-activation + (match-lambda + (($ pcsc-lite usb-drivers) + #~(begin + (use-modules (guix build utils)) + (mkdir-p "/var/lib") + (symlink #$(directory-union + "pcsc" + (map (cut file-append <> "/pcsc") + usb-drivers)) + "/var/lib/pcsc"))))) + +(define pcscd-service-type + (service-type + (name 'pcscd) + (description + "Run @command{pcscd}, the PC/SC smart card daemon.") + (extensions + (list (service-extension shepherd-root-service-type + (compose list pcscd-shepherd-service)) + (service-extension activation-service-type + pcscd-activation))) + (default-value (pcscd-configuration)))) --=20 2.18.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 14 05:01:07 2018 Received: (at 32358) by debbugs.gnu.org; 14 Aug 2018 09:01:07 +0000 Received: from localhost ([127.0.0.1]:50114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpVCM-00027E-P1 for submit@debbugs.gnu.org; Tue, 14 Aug 2018 05:01:07 -0400 Received: from vultr.systemreboot.net ([45.77.148.100]:38572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpVCL-00026d-66 for 32358@debbugs.gnu.org; Tue, 14 Aug 2018 05:01:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=x5mEmj1rvY6eaHk2IXkuSmmyfLFQSjKtHu2g2SeSn18=; b=fWXtGc3vi8Wq3Dixqp53ZJdjO x2a7gxTD2mrV7WlWDrkQCPUOx64GWAj0UtJI4BqY1M86FgbTFftM/MUYSGQlM3y3UzVreNJ3Sxdyn kGG0GygVNgTgXdb+zcQq9JG5DIPngh2EtYYN2UpszQi0639XCt9HJRrm07hm3Z4SrRITY=; Received: from [192.168.2.1] (helo=steel) by systemreboot.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fpVCB-0000l4-1D; Tue, 14 Aug 2018 14:30:55 +0530 From: Arun Isaac To: Chris Marusich , =?utf-8?Q?Cl=C3=A9ment?= Lassieur Subject: Re: [bug#32358] Add pcscd service In-Reply-To: References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> Date: Tue, 14 Aug 2018 14:30:39 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain I have finished work on the tests too. Please find attached the updated patch. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-services-Add-pcscd-service.patch Content-Transfer-Encoding: quoted-printable >From 58af4b276dfc34af6dc27f213e26110ca9e4ffcb Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 2 Aug 2018 05:32:56 +0530 Subject: [PATCH] gnu: services: Add pcscd service. * gnu/services/security-token.scm: New file. * gnu/tests/security-token.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Register new files. * doc/guix.texi (Miscellaneous Services): Document the service. --- doc/guix.texi | 31 ++++++++++++ gnu/local.mk | 2 + gnu/services/security-token.scm | 84 +++++++++++++++++++++++++++++++++ gnu/tests/security-token.scm | 70 +++++++++++++++++++++++++++ 4 files changed, 187 insertions(+) create mode 100644 gnu/services/security-token.scm create mode 100644 gnu/tests/security-token.scm diff --git a/doc/guix.texi b/doc/guix.texi index 1cc73eb93..560daf5e8 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20331,6 +20331,37 @@ An association list specifies kernel parameters an= d their values. @end table @end deftp =20 +@cindex pcscd +@subsubheading PC/SC Smart Card Daemon Service + +The @code{(gnu services security-token)} module provides the following ser= vice +to run @command{pcscd}, the PC/SC Smart Card Daemon. @command{pcscd} is t= he +daemon program for pcsc-lite and the MuscleCard framework. It is a resource +manager that coordinates communications with smart card readers, smart car= ds +and cryptographic tokens that are connected to the system. + +@defvr {Scheme Variable} pcscd-service-type +Service type for the @command{pcscd} service. Its value must be a +@code{pcscd-configuration} object. To run pcscd in the default +configuration, instantiate it as: + +@example +(service pcscd-service-type) +@end example +@end defvr + +@deftp {Data Type} pcscd-configuration +The data type representing the configuration of @command{pcscd}. + +@table @asis +@item @code{pcsc-lite} (default: @code{pcsc-lite}) +The pcsc-lite package that provides pcscd. +@item @code{usb-drivers} (default: @code{(list ccid)}) +List of packages that provide USB drivers to pcscd. Drivers are expected t= o be +under @file{pcsc/drivers} in the store directory of the package. +@end table +@end deftp + @cindex lirc @subsubheading Lirc Service =20 diff --git a/gnu/local.mk b/gnu/local.mk index 53120db7f..d6eb140ed 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -486,6 +486,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/services/monitoring.scm \ %D%/services/networking.scm \ %D%/services/nfs.scm \ + %D%/services/security-token.scm \ %D%/services/shepherd.scm \ %D%/services/sound.scm \ %D%/services/herd.scm \ @@ -540,6 +541,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/tests/messaging.scm \ %D%/tests/networking.scm \ %D%/tests/rsync.scm \ + %D%/tests/security-token.scm \ %D%/tests/ssh.scm \ %D%/tests/version-control.scm \ %D%/tests/virtualization.scm \ diff --git a/gnu/services/security-token.scm b/gnu/services/security-token.= scm new file mode 100644 index 000000000..7e7ea54a5 --- /dev/null +++ b/gnu/services/security-token.scm @@ -0,0 +1,84 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2018 Arun Isaac +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services security-token) + #:use-module (gnu services) + #:use-module (gnu services shepherd) + #:use-module (gnu packages admin) + #:use-module (gnu packages security-token) + #:use-module (gnu system shadow) + #:use-module (guix gexp) + #:use-module (guix modules) + #:use-module (guix records) + #:use-module (ice-9 match) + #:use-module (srfi srfi-26) + #:export (pcscd-configuration + pcscd-configuration? + pcscd-configuration-pcsc-lite + pcscd-configuration-usb-drivers + pcscd-service-type)) + +;;; +;;; PC/SC Smart Card Daemon +;;; + +(define-record-type* + pcscd-configuration make-pcscd-configuration pcscd-configuration? + (pcsc-lite pcscd-configuration-pcsc-lite + (default pcsc-lite)) + (usb-drivers pcscd-configuration-usb-drivers + (default (list ccid)))) + +(define pcscd-shepherd-service + (match-lambda + (($ pcsc-lite) + (with-imported-modules (source-module-closure + '((gnu build shepherd))) + (shepherd-service + (documentation "PC/SC Smart Card Daemon") + (provision '(pcscd)) + (requirement '(syslogd)) + (modules '((gnu build shepherd))) + (start #~(lambda _ + (invoke #$(file-append pcsc-lite "/sbin/pcscd")) + (call-with-input-file "/var/run/pcscd/pcscd.pid" read))) + (stop #~(make-kill-destructor))))))) + +(define pcscd-activation + (match-lambda + (($ pcsc-lite usb-drivers) + #~(begin + (use-modules (guix build utils)) + (mkdir-p "/var/lib") + (symlink #$(directory-union + "pcsc" + (map (cut file-append <> "/pcsc") + usb-drivers)) + "/var/lib/pcsc"))))) + +(define pcscd-service-type + (service-type + (name 'pcscd) + (description + "Run @command{pcscd}, the PC/SC smart card daemon.") + (extensions + (list (service-extension shepherd-root-service-type + (compose list pcscd-shepherd-service)) + (service-extension activation-service-type + pcscd-activation))) + (default-value (pcscd-configuration)))) diff --git a/gnu/tests/security-token.scm b/gnu/tests/security-token.scm new file mode 100644 index 000000000..fb520face --- /dev/null +++ b/gnu/tests/security-token.scm @@ -0,0 +1,70 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2018 Arun Isaac +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu tests security-token) + #:use-module (gnu tests) + #:use-module (gnu system vm) + #:use-module (gnu services) + #:use-module (gnu services security-token) + #:use-module (guix gexp) + #:export (%test-pcscd)) + +(define %pcscd-os + (simple-operating-system + (service pcscd-service-type))) + +(define* (run-pcscd-test) + "Run tests of 'pcscd-service-type'." + (define os + (marionette-operating-system + %pcscd-os + #:imported-modules '((gnu services herd)))) + + (define test + (with-imported-modules '((gnu build marionette)) + #~(begin + (use-modules (srfi srfi-64) + (gnu build marionette)) + (define marionette + (make-marionette (list #$(virtual-machine os)))) + + (mkdir #$output) + (chdir #$output) + + (test-begin "pcscd") + + (test-assert "pcscd is alive" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (live-service-running + (find (lambda (live) + (memq 'pcscd (live-service-provision live))) + (current-services)))) + marionette)) + + (test-end) + (exit (=3D (test-runner-fail-count (test-runner-current)) 0))))) + + (gexp->derivation "pcscd" test)) + +(define %test-pcscd + (system-test + (name "pcscd") + (description "Test a running pcscd daemon.") + (value (run-pcscd-test)))) --=20 2.18.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 15 01:55:43 2018 Received: (at 32358) by debbugs.gnu.org; 15 Aug 2018 05:55:43 +0000 Received: from localhost ([127.0.0.1]:51270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpomV-0005Qg-G6 for submit@debbugs.gnu.org; Wed, 15 Aug 2018 01:55:43 -0400 Received: from mail-pf1-f174.google.com ([209.85.210.174]:43240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpomU-0005QO-Fl for 32358@debbugs.gnu.org; Wed, 15 Aug 2018 01:55:42 -0400 Received: by mail-pf1-f174.google.com with SMTP id j26-v6so90102pfi.10 for <32358@debbugs.gnu.org>; Tue, 14 Aug 2018 22:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=yZfE5Ktc4nP3nt3/oZjyIb95gtG4+YscKDezmdSe/tE=; b=JlaWZOF61Jm03j3So1xUfvaKxUL8hRSfyCzc5a3cCkRI6nJRu56M1emPUXYexJDA8W ZFAUMcacjkEH3lVMFfBe+e1DsBH5MjZa9fqP+XLNXQY7CW/QdXQnKrdJZ+j4WDmF1+EA yo7Qo4yc+95cB4QtI9xkKhZleQ/g6CxutvN7d5Acc24GDaqrasLfwfgKc2A4JOnBXJKI hcl1+ItmdGvMXk7NlKbW8mru97molUexXjy9kvF8FrYc4n5VTLkQ5Hi+bwpphvkY7DhZ RxIzCjmb87r/kg67wv8rNmbqVZOfylXlsrODkA0n+2ORBBK6mGHOlEFxxEJ2OVW2JX17 JrSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=yZfE5Ktc4nP3nt3/oZjyIb95gtG4+YscKDezmdSe/tE=; b=WDIz1eSXvta5tYHyl4IMYyzqkLqxq6TNJbi+BtOXKkvnh/7LwBK3HSdcK6c3+3NGzR dLyU60RtM45CUdDLy9acEvIczrnXPBq4ZuRj9JLssQDeqaoFL13dy2TVCvphIoxSIjaz mjinsg/ac2Hpdrfiwnmgc+RMhhx1twZdD4VugmYUjdtkUuFtGCshX3lSSSKEuM1Clr7o F5ByQ4k0QjXwaNOwsn6EUV13iRL3+naRRhz/Sf8H3A+pMENTQSaV6nNoOTR46JGl2Wg8 r4lqoBGAwWjDv7rQgA6zr/M+dK3BoO1oS2F82pVG0G3keODM+qLJyKV6tJRClIKpLvcM zaww== X-Gm-Message-State: AOUpUlHCts6bENnenANjyx8gSUjKPGC36lGAytRpkc7DB/xwiISL+Xji 70U1oaDWr29tWW8bgs30xEUUs3fa X-Google-Smtp-Source: AA+uWPzqgCFLz9T0RaRNW9lyVb8Y82oFkJk4J2Hkh1s8f7Lq/RjkZMoiH2K+caLWhlzDBaVoaz/Wpg== X-Received: by 2002:a63:231a:: with SMTP id j26-v6mr23584221pgj.138.1534312536111; Tue, 14 Aug 2018 22:55:36 -0700 (PDT) Received: from garuda.local ([2601:602:9d02:4725:6495:ba21:1ebe:620a]) by smtp.gmail.com with ESMTPSA id w72-v6sm43694885pfa.26.2018.08.14.22.55.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Aug 2018 22:55:34 -0700 (PDT) From: Chris Marusich To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur Subject: Re: [bug#32358] Add pcscd service References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> <87sh3jkyqg.fsf@gmail.com> <878t5b6u1r.fsf@lassieur.org> <87ftziybse.fsf@gmail.com> <87600e6xv6.fsf@lassieur.org> Date: Tue, 14 Aug 2018 22:55:30 -0700 In-Reply-To: <87600e6xv6.fsf@lassieur.org> (=?utf-8?Q?=22Cl=C3=A9ment?= Lassieur"'s message of "Mon, 13 Aug 2018 18:21:33 +0200") Message-ID: <87pnyk6unh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: Arun Isaac , 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Cl=C3=A9ment and Arun, Cl=C3=A9ment, your explanation makes sense. With that information, I now understand why it isn't necessary to use make-forkexec-constructor in this case. Thank you for taking the time to explain it in detail! Arun Isaac writes: > I have finished work on the tests too. Please find attached the updated > patch. Awesome! > +(define* (run-pcscd-test) > + "Run tests of 'pcscd-service-type'." > + (define os > + (marionette-operating-system > + %pcscd-os > + #:imported-modules '((gnu services herd)))) If you use the #:requirements keyword argument to marionette-operating-system, you can guarantee that the marionette service will start up after the pcscd service. This would be good in order to avoid the possibility that you might marionette-eval something before the pcscd service is started. With that small change, if the system test passes, I think this is good to go to master. Thank you for taking the time to work on this and iterate through the feedback! =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAltzwFIACgkQ3UCaFdgi Rp2eQhAAoBRE4PaKOd5IC1hvP35pRePHdRcB/wrx4x0+pfSfCffJXOmcd8AVP3ZX RQ/1OBcea9PQSyZNPV1WkoQ2h+H8aR+rxqjexUXjSWzV6tSeKoc1++2YB8ADIhwm Ff7drraYEN4PknHRhuJ0PGTN09m+FkE1/nh+9IZqrMeGToEjAqFH+W2hAvpqVQW/ iWBF2uvVo+SKtszq4S/VWF8GQDTTJKkSpBBdgp51YxThTqfcwEpd7LmlmkaDD+Pc t0/C4cCKt8i5UcXjA8QKTeN1NP7uvaNDIByTMlLIsChrMskbzYk2j0G2Gs/AZ0Mz AtPsLzNYrVC3Fv2bURawfHdu0XyPW0ygphJcNiQRji/r675k91ZHVMi8ErediYh4 UFA4XYyokdK8AflIFVhawm0CMfsnHm3BimGcEmbICA9jsSizn3/F5pWtN7emnQ+F jSIz2ExsBD4jguq5g4g0DLBQc9mIRhBe9B0CHXSJOiVh/anhhHJucczHFEasFRpD qg/ew45ZqEVpeS5ypi0YsiHwDWtO8ETywWHqM3l9oeN7rIrnXCYgFmFkMZuJTVC4 EGRqej7zkqYPzHHS34f1huFovaHG9jzq0SKhYVvV5closr8rHy8d/MGW9kjJTp/w AQ61pmE2tZUM2hO2XXFOrsbt78SR56oS+9nhhoqCi1P9akMUvgE= =fFRR -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 15 15:00:17 2018 Received: (at 32358) by debbugs.gnu.org; 15 Aug 2018 19:00:17 +0000 Received: from localhost ([127.0.0.1]:52050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fq11i-0007pq-CD for submit@debbugs.gnu.org; Wed, 15 Aug 2018 15:00:17 -0400 Received: from mail.lassieur.org ([83.152.10.219]:57016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fq11g-0007pf-Qx for 32358@debbugs.gnu.org; Wed, 15 Aug 2018 15:00:13 -0400 Received: from rodion (37.170.157.254 [37.170.157.254]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 8d8d13d4 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Wed, 15 Aug 2018 19:00:11 +0000 (UTC) References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> <87sh3jkyqg.fsf@gmail.com> <878t5b6u1r.fsf@lassieur.org> <87ftziybse.fsf@gmail.com> <87600e6xv6.fsf@lassieur.org> <87pnyk6unh.fsf@gmail.com> User-agent: mu4e 1.0; emacs 26.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Chris Marusich Subject: Re: [bug#32358] Add pcscd service Message-ID: <87lg975uc7.fsf@lassieur.org> In-reply-to: <87pnyk6unh.fsf@gmail.com> Date: Wed, 15 Aug 2018 21:00:10 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32358 Cc: Arun Isaac , 32358@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Chris and Arun, Chris Marusich writes: > Hi Cl=C3=A9ment and Arun, > > Cl=C3=A9ment, your explanation makes sense. With that information, I now > understand why it isn't necessary to use make-forkexec-constructor in > this case. Thank you for taking the time to explain it in detail! Thank you all for your work! Cl=C3=A9ment From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 15 17:25:05 2018 Received: (at 32358-done) by debbugs.gnu.org; 15 Aug 2018 21:25:05 +0000 Received: from localhost ([127.0.0.1]:52109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fq3Ht-0005zU-Dp for submit@debbugs.gnu.org; Wed, 15 Aug 2018 17:25:05 -0400 Received: from vultr.systemreboot.net ([45.77.148.100]:60128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fq3Hr-0005yu-06 for 32358-done@debbugs.gnu.org; Wed, 15 Aug 2018 17:25:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=65mSOJJchzSPFA5q7Lbt/LBPuyTeJnmX1kh9tilrLoQ=; b=BSnRiX1Pf6Ou0qi7WB/hxOCgC 26s8/xjw7Fzqk1L6WVq9LfjKXWY6PGu9rdMJ3so8Jhk3NREy9O5pbAYnG72RF1Hh6VbQBaX7ZKFvf zX+Mjy+mf4UQXtV6Z9tzSgIkekuxhwkglEC6zyhZtCHvZHkcabV8f7RfYnw01eXsLOwQE=; Received: from [192.168.2.1] (helo=steel) by systemreboot.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fq3Hg-0001vf-P4; Thu, 16 Aug 2018 02:54:53 +0530 From: Arun Isaac To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur , Chris Marusich Subject: Re: [bug#32358] Add pcscd service In-Reply-To: <87lg975uc7.fsf@lassieur.org> References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> <87sh3jkyqg.fsf@gmail.com> <878t5b6u1r.fsf@lassieur.org> <87ftziybse.fsf@gmail.com> <87600e6xv6.fsf@lassieur.org> <87pnyk6unh.fsf@gmail.com> <87lg975uc7.fsf@lassieur.org> Date: Thu, 16 Aug 2018 02:54:41 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32358-done Cc: 32358-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Clement and Chris, I have pushed the pcscd service to master. Thank you both for your feedback and review! Regards, Arun. From unknown Sat Aug 16 00:29:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 13 Sep 2018 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator