Description of problem: Version-Release number of selected component (if applicable): pcsc-cyberjack-3.99.5final.SP03-15.fc21 (64bit) How reproducible: When using the smartcard reader cyberjack e_com and entering the smartcards's pin via its pin pad it does not work correctly. Described in https://github.com/larskanis/ctapi-cyberjack/issues/2, too. Actual results: Cannot use the cyberjack e_com reader. Have to use a cheap ccid reader which uses the computer's keypoard for entering the pin code. Expected results: Pin pad of cyberjack e_com reader is working correctly as was in fedora 20. Additional info: When using the driver from http://support.reiner-sct.de/downloads/LINUX/V3.99.5_SP05/pcsc-cyberjack-3.99.5final.SP05.tar.bz2 and compiling & installing it the pin pad of the reader is working correctly. Please, it is possible to provide an updated pcsc-cyberjack packages? Thanks.
Created attachment 1005061 [details] fixes #1195002 I can confirm that it works with the patch decribed in the first link. I add a patch for this issue. Combined with the existing unistd-patch it works flawlessly. Tested with jameica/hibiscus on FC21 x86_64.
I just saw that the comments of the original sources are not corrected in my patch.
JFYI: saw that the vendor has a newer version (pcsc-cyberjack-3.99.5final.SP07-1) of the driver at http://www.reiner-sct.com/support/download/treiber-und-software/cyberjack/ and they now offer RPMs as well.
I have just built pcsc-cyberjack-3.99.5final.SP07-1.fc21 for Fedora 21. https://admin.fedoraproject.org/updates/pcsc-cyberjack-3.99.5final.SP07-1.fc21 If you could test that this version still needs the patch, then I can build a newer 3.99.5final.SP07 which includes this patch.
Created attachment 1051870 [details] Patch needed for new upstream sources to fix #1195002 The old patch is not needed any more, but another one. I build the patched sources for FC22 on my copr-test-repo (see: https://copr-be.cloud.fedoraproject.org/results/jenslody/Tests/fedora-22-x86_64/pcsc-cyberjack-3.99.5final.SP07-1.fc22/ for the build-info and the files). I attach the patch I use (it's included in the src.rpm on copr). Maybe compiling the soures with C99-standard enabled might work also, but I don't know how to do it properly from inside the spec-file to test it.
(In reply to Jens Lody from comment #5) > Maybe compiling the soures with C99-standard enabled might work also, but I > don't know how to do it properly from inside the spec-file to test it. If I am not mistaken, that would be export CFLAGS="%{optflags} -std=gnu99" as first thing in the %build section I've made you a scratch build at http://koji.fedoraproject.org/koji/taskinfo?taskID=10354518 (that will be accessible for a couple days) Can you please test and report back?
Unfortuanetly it does not work. I know the cause now, too simple to see it at first glance. "CCIDReader.cpp" is (obviously) a c++-file and so "__STDC__VERSION__" might be defined or not, depending on the compiler-implementation (I don't know if any c++-compiler defines it, but recent gcc does not). That means my last patch (or something similar) is needed or the first part of the "#if"-clause will always be compiled, what leads to the bug.
I even don't know if the #ifdef is really needed, because a similar length-calculation is done without #ifdef's in the two other files that needed the first version of the patch.
(In reply to Jens Lody from comment #7) > Unfortuanetly it does not work. > I know the cause now, too simple to see it at first glance. > > "CCIDReader.cpp" is (obviously) a c++-file and so "__STDC__VERSION__" might > be defined or not, depending on the compiler-implementation (I don't know if > any c++-compiler defines it, but recent gcc does not). Ah yes, gcc calls in the build log were with -std=gnu99, g++ calls not. What I do not grok is $ g++ -dM -E - < /dev/null|grep STDC_VERSION #define __STDC_VERSION__ 201112L Guess I'll have to go through the build logs again because ideally I'd like to use the if clause as intended by upstream. > That means my last patch (or something similar) is needed or the first part > of the "#if"-clause will always be compiled, what leads to the bug. Meanwhile, I've made a scratch build http://koji.fedoraproject.org/koji/taskinfo?taskID=10355598 with your patch as from comment 5
Quote from https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html: "__STDC_VERSION__ This macro expands to the C Standard's version number, a long integer constant of the form yyyymmL where yyyy and mm are the year and month of the Standard version. This signifies which version of the C Standard the compiler conforms to. Like __STDC__, this is not necessarily accurate for the entire implementation, unless GNU CPP is being used with GCC. The value 199409L signifies the 1989 C standard as amended in 1994, which is the current default; the value 199901L signifies the 1999 revision of the C standard. Support for the 1999 revision is not yet complete. This macro is not defined if the -traditional-cpp option is used, nor when compiling C++ or Objective-C. " Preprocessing a real (even empty) cpp-file does not show __STDC_VERSION__, that means it can not be used the way it is done by the "REINER SCT" devs, at least not for gcc. This also means the code can not be used unchanged at the moment.
Thanks Jens, I'll push a version with your patch.
pcsc-cyberjack-3.99.5final.SP07-2.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/pcsc-cyberjack-3.99.5final.SP07-2.fc22
pcsc-cyberjack-3.99.5final.SP07-2.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/pcsc-cyberjack-3.99.5final.SP07-2.fc21
pcsc-cyberjack-3.99.5final.SP07-2.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/pcsc-cyberjack-3.99.5final.SP07-2.el7
Thanks Patrick, I will download it this evening, if I'm back from work, and give feedback. Jens
I installed the latest revision and it works. I think this bug can be closed.
I'd love to, but it does not work cleanly for EPEL6 (in mock, scratch and proper build), will need to debug why I get a compile failure. This will be a few days at the least, other things sadly pre-empt this (I'm not a developer, I maintain this package in my spare time)
What exactly does not work ? I might find time to test and probably fix it. By the way I think the whole #ifdef-stuff is incorrect, because according to the first link in the first post (https://github.com/larskanis/ctapi-cyberjack/issues/2), it does not depend on the OS or the version of libc, whether to use the "old" or the "new" way to calculate the length and in the other two files it's done unconditional, too. Do you have an email-address of one of the ReinerSct-developers, so I can contact them directly ? If not I try it via the public available addresses.
Hei Jens, a build log is better than me paraphrasing; http://koji.fedoraproject.org/koji/buildinfo?buildID=668931 Sadly I have no direct contact to ReinerSCT's devs :-(
Created attachment 1052862 [details] Final patch needed for new upstream sources to fix #1195002, also working on el6. I uploaded a src.rpm with working patch to my server: https://rpm.jenslody.de/copr/pcsc-cyberjack-3.99.5final.SP07-3.fc22.src.rpm , and attached the patch here. I found a thread about the issue, that leads to the error when compiling for epel6: https://gcc.gnu.org/ml/gcc-help/2006-12/msg00055.html . In the patch I left the original code, just commented it out and added a short comment. I will try to contact the ReinerSCT devs, so it can also be fixed upstream.
Package pcsc-cyberjack-3.99.5final.SP07-2.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing pcsc-cyberjack-3.99.5final.SP07-2.fc21' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-11788/pcsc-cyberjack-3.99.5final.SP07-2.fc21 then log in and leave karma (feedback).
pcsc-cyberjack-3.99.5final.SP07-3.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/pcsc-cyberjack-3.99.5final.SP07-3.fc22
pcsc-cyberjack-3.99.5final.SP07-3.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/pcsc-cyberjack-3.99.5final.SP07-3.fc21
pcsc-cyberjack-3.99.5final.SP07-3.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/pcsc-cyberjack-3.99.5final.SP07-3.el7
pcsc-cyberjack-3.99.5final.SP07-3.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/pcsc-cyberjack-3.99.5final.SP07-3.el6
(In reply to Jens Lody from comment #20) [...] > Final patch needed for new upstream sources to fix #1195002, also working on > el6. Thanks Jens, much appreciated. this is now pushed to all current Fedora branches, EPEL7 and EPEL6. [...] > I will try to contact the ReinerSCT devs, so it can also be fixed upstream. Cheers, much appreciated. If you want, you can become a (co)maintainer of this package. PCFE
(In reply to Patrick C. F. Ernzer from comment #26) > (In reply to Jens Lody from comment #20) > [...] > > Final patch needed for new upstream sources to fix #1195002, also working on > > el6. > > Thanks Jens, much appreciated. this is now pushed to all current Fedora > branches, EPEL7 and EPEL6. > > [...] > > I will try to contact the ReinerSCT devs, so it can also be fixed upstream. > > Cheers, much appreciated. > I tried to contact them via the contact-formular on their website. Let's see what happens. > If you want, you can become a (co)maintainer of this package. > > PCFE Thank you, yes I'm interested. You can contact me any time via mail. Jens
pcsc-cyberjack-3.99.5final.SP07-3.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
pcsc-cyberjack-3.99.5final.SP07-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
pcsc-cyberjack-3.99.5final.SP07-3.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
pcsc-cyberjack-3.99.5final.SP07-3.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.