public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jakub Jelen <jjelen@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/pcsc-cyberjack] f44: Use pcscd group and document cjflash usage (#2464674)
Date: Tue, 27 Oct 2026 07:39:08 GMT	[thread overview]
Message-ID: <179308674877.1.16864358772716349236.rpms-pcsc-cyberjack-53a8d82073ff@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/pcsc-cyberjack
            Branch : f44
            Commit : 53a8d82073ff1e60e58dd2545d436797499ad02a
            Author : Jakub Jelen <jjelen@redhat.com>
            Date   : 2026-10-23T11:42:21+02:00
            Stats  : +41/-12 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/pcsc-cyberjack/c/53a8d82073ff1e60e58dd2545d436797499ad02a?branch=f44

            Log:
            Use pcscd group and document cjflash usage (#2464674)

Remove the custom cyberjack system group and sysusers
configuration to rely on the standard pcscd group from
pcsc-lite for device node access. Add a pre-dependency
on pcsc-lite to ensure the group exists.

Additionally, document how to flash reader firmware
using cjflash, noting that pcscd must be stopped and
appropriate user privileges are required.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>

---
diff --git a/pcsc-cyberjack-3.99.5final.SP09-README-FEDORA b/pcsc-cyberjack-3.99.5final.SP09-README-FEDORA
index 1dbb2f7..dc387e0 100644
--- a/pcsc-cyberjack-3.99.5final.SP09-README-FEDORA
+++ b/pcsc-cyberjack-3.99.5final.SP09-README-FEDORA
@@ -19,3 +19,40 @@ If you use the package with hibiscus (http://www.willuhn.de/products/hibiscus/),
 the libpcsc-lite-devel package also, or symlink /usr/lib{64}/libpcsclite.so to the versioned
 /usr/lib{64}/libpcsclite.so.x.x.x. This might also be valid for other programs, that depend on the
 unversioned *.so .
+
+Flashing cyberJack Reader Firmware with cjflash
+===============================================
+
+`cjflash` is an administrative utility used to flash firmware updates, module
+updates, and cryptographic keys to REINER SCT cyberJack readers.
+
+Prerequisites
+-------------
+1. Firmware files: Download the appropriate firmware image file, signature
+   file, and key file for your reader model from REINER SCT:
+   https://support.reiner-sct.de/
+
+2. Administrative privileges: Because device permissions belong to the `pcscd`
+   system user/group, `cjflash` must be executed under pcscd user (e.g.
+   via `sudo -u pcscd`).
+
+3. Stop pcscd: `pcscd` claims exclusive access to the USB device. You MUST
+   stop `pcscd` before flashing, or `cjflash` will fail to connect.
+
+Step-by-step Flashing Instructions
+----------------------------------
+1. Stop pcscd and its socket:
+   $ sudo systemctl stop pcscd.service pcscd.socket
+
+2. Verify the reader number (usually reader index 1 if only one is connected)
+   and invoke cjflash with your downloaded update files as a pcscd user:
+   $ sudo -u pcscd cjflash <readernr> <imagefile> <signaturefile> <keyfile>
+
+3. Follow any on-screen prompts:
+   During firmware or kernel module flashing, the reader may display a
+   confirmation prompt. Press "OK" on the reader's keypad when prompted.
+
+4. Unplug and re-plug the reader when flashing completes.
+
+5. Restart the pcscd service/socket:
+   $ sudo systemctl start pcscd.socket

diff --git a/pcsc-cyberjack.spec b/pcsc-cyberjack.spec
index d1c10b4..02bbef6 100644
--- a/pcsc-cyberjack.spec
+++ b/pcsc-cyberjack.spec
@@ -11,7 +11,6 @@ URL:		https://www.reiner-sct.com/
 Source0:	https://support.reiner-sct.de/downloads/LINUX/V%{version_prefix}_%{version_suffix}/%{name}-%{version}.tar.bz2
 Source1:	%{name}-3.99.5final.SP09-README-FEDORA
 Source2:	libifd-cyberjack6.udev
-Source3:	%{name}.sysusersd
 # this patch replaces the obsoleted AC_PROG_LIBTOOLT macro with LT_INIT
 # the patch is sent to upstream per email (20160528)
 Patch0:		%{name}-3.99.5final.SP09-configure.patch
@@ -59,6 +58,10 @@ https://www.reiner-sct.com/
 %description cjflash
 Tool to flash Reiner SCT cyberJack card readers.
 
+Note: cjflash requires administrative privileges (root/sudo) to access the
+raw USB device node. Additionally, pcscd must be stopped before flashing,
+as the daemon holds an exclusive lock on the reader's USB interface.
+
 %description examples
 Sample code to use/test SCardControl() API by Ludovic Rousseau.
 
@@ -102,21 +105,13 @@ rm %{buildroot}%{readers_dir}/libifd-cyberjack.bundle/Contents/Linux/libifd-cybe
 mv %{buildroot}/etc/cyberjack.conf.default %{buildroot}/etc/cyberjack.conf
 
 # udev rule from Debian, historically part of the debian sub-folder
-# we need the devices to be in group cyberjack, not in group pcscd
 install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_udevrulesdir}/93-cyberjack.rules
-sed -e 's/GROUP="pcscd"/GROUP="cyberjack"/' -i %{buildroot}%{_udevrulesdir}/93-cyberjack.rules
-touch -c -r %{SOURCE2} %{buildroot}%{_udevrulesdir}/93-cyberjack.rules
 
 # cjflash does not get installed automatically
 pushd tools/cjflash
 %make_install
 popd
 
-install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}.conf
-
-%pre
-%sysusers_create_compat %{SOURCE3}
-
 %post
 %udev_rules_update
 systemctl try-restart pcscd.socket
@@ -140,7 +135,6 @@ exit 0
 %{readers_dir}/libifd-cyberjack.bundle/
 
 %config(noreplace) %{_sysconfdir}/cyberjack.conf
-%{_sysusersdir}/%{name}.conf
 
 
 %files cjflash

diff --git a/pcsc-cyberjack.sysusersd b/pcsc-cyberjack.sysusersd
deleted file mode 100644
index 0cd57bf..0000000
--- a/pcsc-cyberjack.sysusersd
+++ /dev/null
@@ -1,2 +0,0 @@
-#Type  Name        ID  GECOS                     Home directory        Shell
-g      cyberjack   -

                 reply	other threads:[~2026-10-27  7:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179308674877.1.16864358772716349236.rpms-pcsc-cyberjack-53a8d82073ff@fedoraproject.org \
    --to=jjelen@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox