diff --git a/pcsc-lite-1.4.102.tar.bz2 b/pcsc-lite-1.4.102.tar.bz2 deleted file mode 100644 index 964cb03..0000000 --- a/pcsc-lite-1.4.102.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:56fc9e6324539537324b071e5b51c3388df9bfa92fb7e210b989b463122fc333 -size 460324 diff --git a/pcsc-lite-1.5.1.tar.bz2 b/pcsc-lite-1.5.1.tar.bz2 new file mode 100644 index 0000000..e958a00 --- /dev/null +++ b/pcsc-lite-1.5.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98591dacf84b78ed2d01a48234d9f00217e7e99ae0012c73232c98e8b74eafe5 +size 465677 diff --git a/pcsc-lite-init.patch b/pcsc-lite-init.patch new file mode 100644 index 0000000..3cc6cb0 --- /dev/null +++ b/pcsc-lite-init.patch @@ -0,0 +1,60 @@ +--- etc/pcscd.init.in ++++ etc/pcscd.init.in +@@ -29,7 +29,8 @@ + # Note! pcscd should be started after pcmcia, and shut down before it + # for smooth experience with PCMCIA readers. + +-. @sysconfdir_exp@/init.d/functions ++. @sysconfdir_exp@/rc.status ++rc_reset + + umask 077 + +@@ -45,19 +46,21 @@ + + start() { + echo -n $"Starting PC/SC smart card daemon ($prog): " +- @sbindir_exp@/update-reader.conf && daemon $prog $PCSCD_OPTIONS ++ @sbindir_exp@/update-reader.conf && startproc $exec $PCSCD_OPTIONS + retval=$? ++ rc_status + echo + [ $retval -eq 0 ] && touch $lockfile +- return $retval ++ rc_status -v + } + stop() { + echo -n $"Stopping PC/SC smart card daemon ($prog): " +- killproc $prog ++ killproc $exec + retval=$? ++ rc_status + echo + [ $retval -eq 0 ] && rm -f $lockfile +- return $retval ++ rc_status -v + } + restart() { + stop +@@ -73,12 +76,19 @@ + restart + ;; + status) +- status $prog ++ checkproc $exec ++ rc_status -v + ;; + condrestart|try-restart) +- [ ! -f $lockfile ] || restart ++ if test -f $lockfile ; then ++ restart ++ else ++ rc_reset ++ fi ++ rc_status + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}" + exit 2 + esac ++rc_exit diff --git a/pcsc-lite.changes b/pcsc-lite.changes index c67664f..9feb1d0 100644 --- a/pcsc-lite.changes +++ b/pcsc-lite.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Tue Feb 3 13:41:22 CET 2009 - sbrabec@suse.cz + +- Updated to version 1.5.1: + * Fixed extended APDU of more than 2048 bytes + * some other minor improvements and bug corrections + * correctly handle up to PCSCLITE_MAX_READERS_CONTEXTS + * SCardGetStatusChange() behavior change + * SCardStatus(): support of SCARD_AUTOALLOCATE + * SCardGetStatusChange() now uses asynchronous events + * more and/or better documentation + * SCardTransmit(): correctly pass the pioRecvPci parameter + * SCardConnect() and SCardReconnect(): correct a race condition + * pcscd logs the command name sent by the application + * some other minor improvements and bug corrections +- Split according to shared library packaging rules + (bnc#466430#c5). +- Removed obsolete udev rules. +- Install init script based on upstream one (bnc#467255). +- Removed upgrade protection for <= SLE9. + ------------------------------------------------------------------- Tue Jan 6 19:22:06 CET 2009 - sbrabec@suse.cz diff --git a/pcsc-lite.spec b/pcsc-lite.spec index 3b345c4..9a46013 100644 --- a/pcsc-lite.spec +++ b/pcsc-lite.spec @@ -1,5 +1,5 @@ # -# spec file for package pcsc-lite (Version 1.4.102) +# spec file for package pcsc-lite (Version 1.5.1) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -22,22 +22,20 @@ Name: pcsc-lite # FIXME: Maybe we should use /usr/lib/pcsc/drivers as others do: %define ifddir %{_libdir}/readers BuildRequires: hal-devel pkg-config readline-devel -# For directory ownership: -BuildRequires: udev -Version: 1.4.102 -Release: 4 +Version: 1.5.1 +Release: 1 PreReq: %{insserv_prereq} %{fillup_prereq} -# For upgrade from <= SLES9: -PreReq: coreutils Group: Productivity/Security License: BSD 3-Clause Url: http://pcsclite.alioth.debian.org/ Summary: PCS Smart Cards Library Source: %{name}-%{version}.tar.bz2 -Source1: pcscd.init +Source1: %{name}.sysconfig Source2: README.SUSE Source3: pre_checkin.sh Patch: pcsc-lite-musclecard.patch +Patch1: pcsc-lite-init.patch +Requires: libpcsclite1 >= %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -59,6 +57,38 @@ This functionality is exercised in the driver. +Authors: +-------- + David Corcoran + Ludovic Rousseau + Damien Sauveron + Carlos Prados + Antti Tapaninen + +%package -n libpcsclite1 +License: BSD 3-Clause +Group: System/Libraries +Summary: PCS Smart Cards Library + +%description -n libpcsclite1 +The purpose of PCSC Lite is to provide a Windows(R) SCard interface in +a very small form factor for communication with smart cards and +readers. PCSC Lite can be compiled directly for a desired reader driver +or can be used to dynamically allocate/deallocate reader drivers at +runtime (the default behavior). + +PCSC Lite uses the same winscard API as used in Windows(R). + +Security aware people should read the SECURITY file for possible +vulnerabilities of pcsclite and how to fix them. For information on how +to install drivers please read the DRIVERS file. + +Memory cards will be supported through the MCT specification, which is +an APDU like manner sent normally through the SCardTransmit() function. +This functionality is exercised in the driver. + + + Authors: -------- David Corcoran @@ -82,11 +112,16 @@ compile plugins for the pcsc-lite package. Authors: -------- David Corcoran + Ludovic Rousseau + Damien Sauveron + Carlos Prados + Antti Tapaninen %prep %setup -q -cp -a %{S:2} . +cp -a %{S:1} %{S:2} . %patch +%patch1 %build %if %suse_version > 1010 @@ -105,43 +140,33 @@ mkdir $RPM_BUILD_ROOT%{ifddir} # this program is noinst in the package install src/.libs/testpcsc $RPM_BUILD_ROOT%{_sbindir}/ mkdir $RPM_BUILD_ROOT/etc/init.d -install -m 755 %{S:1} $RPM_BUILD_ROOT/etc/init.d/pcscd +install -m 755 etc/pcscd.init $RPM_BUILD_ROOT/etc/init.d/pcscd ln -sf ../../etc/init.d/pcscd $RPM_BUILD_ROOT%{_sbindir}/rcpcscd -# For upgrade from <= SLES9: -touch $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d/old-reader.conf -mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d -sed -n '/udev rules for pcscd and CCID readers/,/^\\end{verbatim}/{/{verbatim}/d;p;}' $RPM_BUILD_ROOT/etc/udev/rules.d/99-pcsc_lite.rules +mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates +cp %{name}.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.pcscd mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name} cp -a AUTHORS ChangeLog ChangeLog.svn COPYING DRIVERS HELP NEWS README README.SUSE SECURITY TODO $RPM_BUILD_ROOT%{_docdir}/%{name} %clean rm -rf $RPM_BUILD_ROOT -%pre -# save old reader.conf in case of upgrade from <= SLES9 -if [ "$1" = "2" ]; then - if [ ! -d etc/reader.conf.d ]; then # update from old version - mkdir -p etc/reader.conf.d - cp etc/reader.conf etc/reader.conf.d/old-reader.conf - fi -fi - %preun %{stop_on_removal pcscd} %post -/sbin/ldconfig -%{fillup_and_insserv pcscd} +%{fillup_and_insserv -n pcscd pcscd} %postun -/sbin/ldconfig %{restart_on_update pcscd} %{insserv_cleanup} +%post -n libpcsclite1 -p /sbin/ldconfig + +%postun -n libpcsclite1 -p /sbin/ldconfig + %files %defattr(-,root,root) %doc %{_docdir}/%{name} -%{_libdir}/*.so.* # .so must be in the main package (#235773): %{_libdir}/*.so %doc %{_mandir}/man?/*.* @@ -149,10 +174,13 @@ fi %ghost %{_sysconfdir}/reader.conf %dir %{_sysconfdir}/reader.conf.d %config %{_sysconfdir}/reader.conf.d/reader.conf -%ghost %config %{_sysconfdir}/reader.conf.d/old-reader.conf %{ifddir} /etc/init.d/pcscd -/etc/udev/rules.d/99-pcsc_lite.rules +/var/adm/fillup-templates/sysconfig.pcscd + +%files -n libpcsclite1 +%defattr(-,root,root) +%{_libdir}/libpcsclite.so.* %files devel %defattr(-,root,root) @@ -161,6 +189,24 @@ fi %{_libdir}/pkgconfig/*.pc %changelog +* Tue Feb 03 2009 sbrabec@suse.cz +- Updated to version 1.5.1: + * Fixed extended APDU of more than 2048 bytes + * some other minor improvements and bug corrections + * correctly handle up to PCSCLITE_MAX_READERS_CONTEXTS + * SCardGetStatusChange() behavior change + * SCardStatus(): support of SCARD_AUTOALLOCATE + * SCardGetStatusChange() now uses asynchronous events + * more and/or better documentation + * SCardTransmit(): correctly pass the pioRecvPci parameter + * SCardConnect() and SCardReconnect(): correct a race condition + * pcscd logs the command name sent by the application + * some other minor improvements and bug corrections +- Split according to shared library packaging rules + (bnc#466430#c5). +- Removed obsolete udev rules. +- Install init script based on upstream one (bnc#467255). +- Removed upgrade protection for <= SLE9. * Tue Jan 06 2009 sbrabec@suse.cz - Do not call autoreconf for SLE10. * Wed Sep 10 2008 sbrabec@suse.cz diff --git a/pcsc-lite.sysconfig b/pcsc-lite.sysconfig new file mode 100644 index 0000000..3fef1fd --- /dev/null +++ b/pcsc-lite.sysconfig @@ -0,0 +1,9 @@ +## Path: Hardware/SmartCard +## Description: Hard disc health monitoring +## ServiceReload: pcscd +## Type: string +## Default: +# +# Command line options for pcscd(8) init script. +# +PCSCD_OPTIONS="" diff --git a/pcscd.init b/pcscd.init deleted file mode 100644 index ceb1a21..0000000 --- a/pcscd.init +++ /dev/null @@ -1,68 +0,0 @@ -#! /bin/sh -# Copyright (c) 1995-2001 SuSE GmbH Nuernberg, Germany -# 2002 SuSE Linux AG, Nuernberg, Germany -# 2005 SUSE LINUX Products GmbH, Nuernberg, Germany -# -# Author: Matthias Eckermann -# Wolfgang Rosenauer -# -# -### BEGIN INIT INFO -# Provides: pcscd -# Required-Start: $remote_fs $syslog -# Should-Start: setserial hotplug kbd -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 5 -# Default-Stop: 0 1 6 -# Description: PCSC daemon handling smart card readers -### END INIT INFO - - -pcscd_BIN=/usr/sbin/pcscd -test -x $pcscd_BIN || exit 5 - -. /etc/rc.status -rc_reset - -case "$1" in - start) - echo -n "Starting PC/SC smart card daemon " - mount -n -t usbfs usbfs /proc/bus/usb >/dev/null 2>&1 - rm -f /var/run/pcscd.pub - /usr/sbin/update-reader.conf && startproc $pcscd_BIN - rc_status -v - ;; - stop) - echo -n "Stopping PC/SC smart card daemon " - killproc -TERM $pcscd_BIN - rc_status -v - ;; - try-restart) - $0 status >/dev/null && $0 restart - rc_status - ;; - restart) - $0 stop - $0 start - rc_status - ;; - force-reload) - $0 stop && $0 start - rc_status - ;; - reload) - echo -n "Reload PC/SC smart card daemon " - rc_failed 3 - rc_status -v - ;; - status) - echo -n "Checking for PC/SC smart card daemon " - checkproc $pcscd_BIN - rc_status -v - ;; - *) - echo "Usage: $0 {start|stop|try-restart|restart|force-reload|reload|status}" - exit 1 - ;; -esac -rc_exit