Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acsccid: init at 1.1.6 #49900

Merged
merged 1 commit into from Nov 8, 2018
Merged

acsccid: init at 1.1.6 #49900

merged 1 commit into from Nov 8, 2018

Conversation

roberth
Copy link
Member

@roberth roberth commented Nov 8, 2018

Motivation for this change

This adds support for ACS CCID smart card readers, for use with the pcscd service.

(The non-CCID version is already supported by the libacr38u driver.)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@domenkozar
Copy link
Member

@GrahamcOfBorg build acsccid

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: acsccid

Partial log (click to expand)

#include <iconv.h>
         ^~~~~~~~~
1 error generated.
make[2]: *** [Makefile:620: libacsccid_la-ifdhandler.lo] Error 1
make[2]: Leaving directory '/private/tmp/nix-build-acsccid-1.1.6.drv-0/source/src'
make[1]: *** [Makefile:443: all-recursive] Error 1
make[1]: Leaving directory '/private/tmp/nix-build-acsccid-1.1.6.drv-0/source'
make: *** [Makefile:375: all] Error 2
builder for '/nix/store/xhvjqaqq8smzs1bhdxf0d0lpiqa0l76c-acsccid-1.1.6.drv' failed with exit code 2
error: build of '/nix/store/xhvjqaqq8smzs1bhdxf0d0lpiqa0l76c-acsccid-1.1.6.drv' failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: acsccid

Partial log (click to expand)

make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/build/source'
make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/pcl08d9l9hh1zqkfy6gh3kig6i0kxf1f-acsccid-1.1.6
shrinking /nix/store/pcl08d9l9hh1zqkfy6gh3kig6i0kxf1f-acsccid-1.1.6/pcsc/drivers/ifd-acsccid.bundle/Contents/Linux/libacsccid.so
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/pcl08d9l9hh1zqkfy6gh3kig6i0kxf1f-acsccid-1.1.6
checking for references to /build in /nix/store/pcl08d9l9hh1zqkfy6gh3kig6i0kxf1f-acsccid-1.1.6...
/nix/store/pcl08d9l9hh1zqkfy6gh3kig6i0kxf1f-acsccid-1.1.6

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: acsccid

Partial log (click to expand)

make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/build/source'
make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/hvwy2bg9869qfxkg9jz6w9cjkpihqmnd-acsccid-1.1.6
shrinking /nix/store/hvwy2bg9869qfxkg9jz6w9cjkpihqmnd-acsccid-1.1.6/pcsc/drivers/ifd-acsccid.bundle/Contents/Linux/libacsccid.so
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/hvwy2bg9869qfxkg9jz6w9cjkpihqmnd-acsccid-1.1.6
checking for references to /build in /nix/store/hvwy2bg9869qfxkg9jz6w9cjkpihqmnd-acsccid-1.1.6...
/nix/store/hvwy2bg9869qfxkg9jz6w9cjkpihqmnd-acsccid-1.1.6

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: acsccid

Partial log (click to expand)

/nix/store/pcl08d9l9hh1zqkfy6gh3kig6i0kxf1f-acsccid-1.1.6

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: acsccid

Partial log (click to expand)

make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/build/source'
make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/hvwy2bg9869qfxkg9jz6w9cjkpihqmnd-acsccid-1.1.6
shrinking /nix/store/hvwy2bg9869qfxkg9jz6w9cjkpihqmnd-acsccid-1.1.6/pcsc/drivers/ifd-acsccid.bundle/Contents/Linux/libacsccid.so
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/hvwy2bg9869qfxkg9jz6w9cjkpihqmnd-acsccid-1.1.6
checking for references to /build in /nix/store/hvwy2bg9869qfxkg9jz6w9cjkpihqmnd-acsccid-1.1.6...
/nix/store/hvwy2bg9869qfxkg9jz6w9cjkpihqmnd-acsccid-1.1.6

@roberth roberth deleted the acsccid branch November 8, 2018 14:19
@xaduha
Copy link

xaduha commented May 18, 2019

@roberth

[one@nixos:/etc/nixos]$ sudo systemctl status pcscd
● pcscd.service - PCSC-Lite daemon
   Loaded: loaded (/nix/store/ckrsr2h7ndvpkn2kqbfwjr8prcfgimca-unit-pcscd.service/pcscd.service; linked; vendor preset: enabled)
   Active: active (running) since Sat 2019-05-18 08:24:11 MSK; 4min 55s ago
 Main PID: 2401 (pcscd)
    Tasks: 3 (limit: 4915)
   Memory: 1.5M
   CGroup: /system.slice/pcscd.service
           └─2401 /nix/store/v8xvfzn5y89dv15v2ckp6gzj0fdjma8c-pcsclite-1.8.24-bin/sbin/pcscd -f -x -c /nix/store/m473zkmvjwmdg7np23hg9m96fqzz7dag-reader.conf

May 18 08:24:11 nixos pcscd[2401]: 00000000 ccid_usb.c:751:OpenUSBByName() Can't claim interface 1/4: LIBUSB_ERROR_BUSY
May 18 08:24:11 nixos pcscd[2401]: 00000217 ifdhandler.c:204:CreateChannelByNameOrChannel() failed
May 18 08:24:11 nixos pcscd[2401]: 00000022 readerfactory.c:1106:RFInitializeReader() Open Port 0x200000 Failed (usb:072f/2200:libudev:0:/dev/bus/usb/001/004)
May 18 08:24:11 nixos pcscd[2401]: 00000006 readerfactory.c:376:RFAddReader() ACS ACR122U init failed.
May 18 08:24:11 nixos pcscd[2401]: 00000084 hotplug_libudev.c:524:HPAddDevice() Failed adding USB device: ACS ACR122U
May 18 08:24:11 nixos pcscd[2401]: 00031364 ccid_usb.c:653:OpenUSBByName() Can't claim interface 1/4: LIBUSB_ERROR_BUSY
May 18 08:24:11 nixos pcscd[2401]: 00000248 ifdhandler.c:150:CreateChannelByNameOrChannel() failed
May 18 08:24:11 nixos pcscd[2401]: 00000008 readerfactory.c:1106:RFInitializeReader() Open Port 0x200000 Failed (usb:072f/2200:libudev:0:/dev/bus/usb/001/004)
May 18 08:24:11 nixos pcscd[2401]: 00000003 readerfactory.c:376:RFAddReader() ACS ACR122U init failed.
May 18 08:24:11 nixos pcscd[2401]: 00000048 hotplug_libudev.c:534:HPAddDevice() Failed adding USB device: ACS ACR122U

pkgs.acsccid doesn't work for me on latest NixOS. Can make it work in Docker easily though, so I don't think it's a problem with my setup, something is up with the plugin.

I have

services.pcscd.enable = true;
services.pcscd.plugins = [ pkgs.ccid pkgs.acsccid ];

in my config.

@xaduha
Copy link

xaduha commented May 18, 2019

[one@nixos:/etc/nixos]$ /nix/store/v8xvfzn5y89dv15v2ckp6gzj0fdjma8c-pcsclite-1.8.24-bin/sbin/pcscd -v
pcsc-lite version 1.8.24.
Copyright (C) 1999-2002 by David Corcoran <corcoran@musclecard.com>.
Copyright (C) 2001-2015 by Ludovic Rousseau <ludovic.rousseau@free.fr>.
Copyright (C) 2003-2004 by Damien Sauveron <sauveron@labri.fr>.
Report bugs to <pcsclite-muscle@lists.alioth.debian.org>.
Enabled features: Linux x86_64-pc-linux-gnu libsystemd serial usb libudev usbdropdir=/var/lib/pcsc/drivers ipcdir=/run/pcscd configdir=/etc

I noticed that /var/lib/pcsc/drivers doesn't exist.

@xaduha
Copy link

xaduha commented May 18, 2019

Nevermind, I found a workaround by blacklisting pn533_usb kernel module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants