From e1d0c0e6263b06a3565a53a0f25b4f04024c81dc1f0d3ac2b06b6206d52ae2b9 Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Tue, 21 Dec 2010 20:10:45 +0000 Subject: [PATCH 1/8] Accepting request 55916 from home:duwe:Factory OBS-URL: https://build.opensuse.org/request/show/55916 OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=32 --- pcsc-lite-1.5.5.tar.bz2 | 3 -- pcsc-lite-1.6.5.tar.bz2 | 3 ++ pcsc-lite.changes | 8 ++++ pcsc-lite.spec | 16 +++---- rcpcscd | 95 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 113 insertions(+), 12 deletions(-) delete mode 100644 pcsc-lite-1.5.5.tar.bz2 create mode 100644 pcsc-lite-1.6.5.tar.bz2 create mode 100644 rcpcscd diff --git a/pcsc-lite-1.5.5.tar.bz2 b/pcsc-lite-1.5.5.tar.bz2 deleted file mode 100644 index e7c37e6..0000000 --- a/pcsc-lite-1.5.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:051de6f3c1deff9a9c6f72995f6b9d271a23fc8aea74737f1902cabf1a71ed26 -size 465947 diff --git a/pcsc-lite-1.6.5.tar.bz2 b/pcsc-lite-1.6.5.tar.bz2 new file mode 100644 index 0000000..9a97c1a --- /dev/null +++ b/pcsc-lite-1.6.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddbb0b6ef334103c76b49652826056c36cf7519f961fd07e5b1cd897b392a29b +size 480154 diff --git a/pcsc-lite.changes b/pcsc-lite.changes index a850454..e05f5a6 100644 --- a/pcsc-lite.changes +++ b/pcsc-lite.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Dec 9 15:52:33 CET 2010 - duwe@suse.de + +- update to 1.6.5 (many minor improvements) +- copy rc script from old version +- drop obsolete (?) config file reader.conf in + favour of reader.conf.d + ------------------------------------------------------------------- Tue Dec 15 01:39:25 CET 2009 - jengelh@medozas.de diff --git a/pcsc-lite.spec b/pcsc-lite.spec index f19ea22..2fbe9c3 100644 --- a/pcsc-lite.spec +++ b/pcsc-lite.spec @@ -22,9 +22,9 @@ 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 -Version: 1.5.5 +Version: 1.6.5 Release: 2 -PreReq: %{insserv_prereq} %{fillup_prereq} +PreReq: %{insserv_prereq} %{fillup_prereq} sysvinit(syslog) Group: Productivity/Security License: BSD3c(or similar) Url: http://pcsclite.alioth.debian.org/ @@ -34,7 +34,7 @@ Source1: %{name}.sysconfig Source2: README.SUSE Source3: pre_checkin.sh Source4: baselibs.conf -Patch1: pcsc-lite-init.patch +Source5: rcpcscd Requires: libpcsclite1 >= %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -120,7 +120,6 @@ Authors: %prep %setup -q cp -a %{S:1} %{S:2} . -%patch1 %build %if %suse_version > 1110 @@ -135,11 +134,11 @@ make %{?jobs:-j%jobs} %install %makeinstall touch $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf -mkdir $RPM_BUILD_ROOT%{ifddir} +mkdir -p $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 etc/pcscd.init $RPM_BUILD_ROOT/etc/init.d/pcscd +mkdir -p $RPM_BUILD_ROOT/etc/init.d +install -m 755 %{S:5} $RPM_BUILD_ROOT/etc/init.d/pcscd ln -sf ../../etc/init.d/pcscd $RPM_BUILD_ROOT%{_sbindir}/rcpcscd mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates cp %{name}.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.pcscd @@ -170,9 +169,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %doc %{_mandir}/man?/*.* %{_sbindir}/* -%ghost %{_sysconfdir}/reader.conf %dir %{_sysconfdir}/reader.conf.d -%config %{_sysconfdir}/reader.conf.d/reader.conf +%config %{_sysconfdir}/reader.conf %{ifddir} /etc/init.d/pcscd /var/adm/fillup-templates/sysconfig.pcscd diff --git a/rcpcscd b/rcpcscd new file mode 100644 index 0000000..876decf --- /dev/null +++ b/rcpcscd @@ -0,0 +1,95 @@ +#!/bin/sh +# +# pcscd Starts the pcscd Daemon +# +# chkconfig: 2345 25 88 +# description: The PC/SC smart card daemon is a resource manager for the \ +# PC/SC lite and Musclecard frameworks. It coordinates \ +# communications with smart card readers, smart cards, and \ +# cryptographic tokens that are connected to the system. +# +# processname: pcscd +# config: /etc/reader.conf.d +# +### BEGIN INIT INFO +# Provides: pcscd +# Required-Start: $local_fs $remote_fs $syslog +# Required-Stop: $local_fs $remote_fs $syslog +# Should-Start: udev hal openct +# Should-Stop: udev hal openct +# Default-Start: 2 3 5 +# Default-Stop: 0 1 6 +# Short-Description: Daemon to access a smart card using PC/SC +# Description: The PC/SC smart card daemon is a resource manager for the +# PC/SC lite and Musclecard frameworks. It coordinates +# communications with smart card readers, smart cards, and +# cryptographic tokens that are connected to the system. +# X-UnitedLinux-Default-Enabled: yes +### END INIT INFO +# +# Note! pcscd should be started after pcmcia, and shut down before it +# for smooth experience with PCMCIA readers. + +. /etc/rc.status +rc_reset + +umask 077 + +exec=/usr/sbin/pcscd +prog=$(basename $exec) +lockfile=/var/lock/subsys/$prog +PCSCD_OPTIONS= + +# Source config +if [ -f /etc/sysconfig/pcscd ] ; then + . /etc/sysconfig/pcscd +fi + +start() { + echo -n $"Starting PC/SC smart card daemon ($prog): " + startproc $exec $PCSCD_OPTIONS + retval=$? + rc_status + echo + [ $retval -eq 0 ] && touch $lockfile + rc_status -v +} +stop() { + echo -n $"Stopping PC/SC smart card daemon ($prog): " + killproc $exec + retval=$? + rc_status + echo + [ $retval -eq 0 ] && rm -f $lockfile + rc_status -v +} +restart() { + stop + start +} + + +case "$1" in + start|stop|restart) + $1 + ;; + reload|force-reload) + restart + ;; + status) + checkproc $exec + rc_status -v + ;; + condrestart|try-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 From 5b98dde807bdd7b3fda2871f5df1a8a1fb12df6f6b9c3165f0006a229f9aee55 Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Tue, 21 Dec 2010 20:21:22 +0000 Subject: [PATCH 2/8] fix build for older dists OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=33 --- pcsc-lite-init.patch | 66 -------------------------------------------- pcsc-lite.changes | 6 ++++ pcsc-lite.spec | 34 ++++------------------- 3 files changed, 11 insertions(+), 95 deletions(-) delete mode 100644 pcsc-lite-init.patch diff --git a/pcsc-lite-init.patch b/pcsc-lite-init.patch deleted file mode 100644 index 9a68bcd..0000000 --- a/pcsc-lite-init.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- etc/pcscd.init.in -+++ etc/pcscd.init.in -@@ -24,12 +24,14 @@ - # PC/SC lite and Musclecard frameworks. It coordinates - # communications with smart card readers, smart cards, and - # cryptographic tokens that are connected to the system. -+# X-UnitedLinux-Default-Enabled: yes - ### END INIT INFO - # - # 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 +47,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 +77,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 e05f5a6..af6e256 100644 --- a/pcsc-lite.changes +++ b/pcsc-lite.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Dec 21 20:19:48 UTC 2010 - wr@rosenauer.org + +- keep it building for older distributions as well by moving + the sysvinit requirement into a conditional + ------------------------------------------------------------------- Thu Dec 9 15:52:33 CET 2010 - duwe@suse.de diff --git a/pcsc-lite.spec b/pcsc-lite.spec index 2fbe9c3..17513f0 100644 --- a/pcsc-lite.spec +++ b/pcsc-lite.spec @@ -1,5 +1,5 @@ # -# spec file for package pcsc-lite (Version 1.5.5) +# spec file for package pcsc-lite (Version 1.6.5) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -24,7 +24,7 @@ Name: pcsc-lite BuildRequires: hal-devel pkg-config readline-devel Version: 1.6.5 Release: 2 -PreReq: %{insserv_prereq} %{fillup_prereq} sysvinit(syslog) +PreReq: %{insserv_prereq} %{fillup_prereq} Group: Productivity/Security License: BSD3c(or similar) Url: http://pcsclite.alioth.debian.org/ @@ -36,6 +36,9 @@ Source3: pre_checkin.sh Source4: baselibs.conf Source5: rcpcscd Requires: libpcsclite1 >= %{version} +%if %suse_version > 1130 +Requires: sysvinit(syslog) +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -56,15 +59,6 @@ an APDU like manner sent normally through the SCardTransmit() function. This functionality is exercised in the driver. - -Authors: --------- - David Corcoran - Ludovic Rousseau - Damien Sauveron - Carlos Prados - Antti Tapaninen - %package -n libpcsclite1 License: BSD3c(or similar) Group: System/Libraries @@ -88,15 +82,6 @@ an APDU like manner sent normally through the SCardTransmit() function. This functionality is exercised in the driver. - -Authors: --------- - David Corcoran - Ludovic Rousseau - Damien Sauveron - Carlos Prados - Antti Tapaninen - %package devel License: BSD3c(or similar) Group: Development/Libraries/C and C++ @@ -108,15 +93,6 @@ This package contains the development files for pcsc-lite. It allows to compile plugins for the pcsc-lite package. - -Authors: --------- - David Corcoran - Ludovic Rousseau - Damien Sauveron - Carlos Prados - Antti Tapaninen - %prep %setup -q cp -a %{S:1} %{S:2} . From d36c3ec764122ca395bbc0dcd9ae37095b07952cce90139224d7f961a5e40afe Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Tue, 21 Dec 2010 21:14:09 +0000 Subject: [PATCH 3/8] revert to factory version for now OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=34 --- pcsc-lite-1.5.5.tar.bz2 | 3 ++ pcsc-lite-1.6.5.tar.bz2 | 3 -- pcsc-lite-init.patch | 66 ++++++++++++++++++++++++++++ pcsc-lite.changes | 14 ------ pcsc-lite.spec | 46 +++++++++++++++----- rcpcscd | 95 ----------------------------------------- 6 files changed, 105 insertions(+), 122 deletions(-) create mode 100644 pcsc-lite-1.5.5.tar.bz2 delete mode 100644 pcsc-lite-1.6.5.tar.bz2 create mode 100644 pcsc-lite-init.patch delete mode 100644 rcpcscd diff --git a/pcsc-lite-1.5.5.tar.bz2 b/pcsc-lite-1.5.5.tar.bz2 new file mode 100644 index 0000000..e7c37e6 --- /dev/null +++ b/pcsc-lite-1.5.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:051de6f3c1deff9a9c6f72995f6b9d271a23fc8aea74737f1902cabf1a71ed26 +size 465947 diff --git a/pcsc-lite-1.6.5.tar.bz2 b/pcsc-lite-1.6.5.tar.bz2 deleted file mode 100644 index 9a97c1a..0000000 --- a/pcsc-lite-1.6.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ddbb0b6ef334103c76b49652826056c36cf7519f961fd07e5b1cd897b392a29b -size 480154 diff --git a/pcsc-lite-init.patch b/pcsc-lite-init.patch new file mode 100644 index 0000000..9a68bcd --- /dev/null +++ b/pcsc-lite-init.patch @@ -0,0 +1,66 @@ +--- etc/pcscd.init.in ++++ etc/pcscd.init.in +@@ -24,12 +24,14 @@ + # PC/SC lite and Musclecard frameworks. It coordinates + # communications with smart card readers, smart cards, and + # cryptographic tokens that are connected to the system. ++# X-UnitedLinux-Default-Enabled: yes + ### END INIT INFO + # + # 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 +47,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 +77,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 af6e256..a850454 100644 --- a/pcsc-lite.changes +++ b/pcsc-lite.changes @@ -1,17 +1,3 @@ -------------------------------------------------------------------- -Tue Dec 21 20:19:48 UTC 2010 - wr@rosenauer.org - -- keep it building for older distributions as well by moving - the sysvinit requirement into a conditional - -------------------------------------------------------------------- -Thu Dec 9 15:52:33 CET 2010 - duwe@suse.de - -- update to 1.6.5 (many minor improvements) -- copy rc script from old version -- drop obsolete (?) config file reader.conf in - favour of reader.conf.d - ------------------------------------------------------------------- Tue Dec 15 01:39:25 CET 2009 - jengelh@medozas.de diff --git a/pcsc-lite.spec b/pcsc-lite.spec index 17513f0..f19ea22 100644 --- a/pcsc-lite.spec +++ b/pcsc-lite.spec @@ -1,5 +1,5 @@ # -# spec file for package pcsc-lite (Version 1.6.5) +# spec file for package pcsc-lite (Version 1.5.5) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -22,7 +22,7 @@ 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 -Version: 1.6.5 +Version: 1.5.5 Release: 2 PreReq: %{insserv_prereq} %{fillup_prereq} Group: Productivity/Security @@ -34,11 +34,8 @@ Source1: %{name}.sysconfig Source2: README.SUSE Source3: pre_checkin.sh Source4: baselibs.conf -Source5: rcpcscd +Patch1: pcsc-lite-init.patch Requires: libpcsclite1 >= %{version} -%if %suse_version > 1130 -Requires: sysvinit(syslog) -%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -59,6 +56,15 @@ an APDU like manner sent normally through the SCardTransmit() function. This functionality is exercised in the driver. + +Authors: +-------- + David Corcoran + Ludovic Rousseau + Damien Sauveron + Carlos Prados + Antti Tapaninen + %package -n libpcsclite1 License: BSD3c(or similar) Group: System/Libraries @@ -82,6 +88,15 @@ an APDU like manner sent normally through the SCardTransmit() function. This functionality is exercised in the driver. + +Authors: +-------- + David Corcoran + Ludovic Rousseau + Damien Sauveron + Carlos Prados + Antti Tapaninen + %package devel License: BSD3c(or similar) Group: Development/Libraries/C and C++ @@ -93,9 +108,19 @@ This package contains the development files for pcsc-lite. It allows to compile plugins for the pcsc-lite package. + +Authors: +-------- + David Corcoran + Ludovic Rousseau + Damien Sauveron + Carlos Prados + Antti Tapaninen + %prep %setup -q cp -a %{S:1} %{S:2} . +%patch1 %build %if %suse_version > 1110 @@ -110,11 +135,11 @@ make %{?jobs:-j%jobs} %install %makeinstall touch $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf -mkdir -p $RPM_BUILD_ROOT%{ifddir} +mkdir $RPM_BUILD_ROOT%{ifddir} # this program is noinst in the package install src/.libs/testpcsc $RPM_BUILD_ROOT%{_sbindir}/ -mkdir -p $RPM_BUILD_ROOT/etc/init.d -install -m 755 %{S:5} $RPM_BUILD_ROOT/etc/init.d/pcscd +mkdir $RPM_BUILD_ROOT/etc/init.d +install -m 755 etc/pcscd.init $RPM_BUILD_ROOT/etc/init.d/pcscd ln -sf ../../etc/init.d/pcscd $RPM_BUILD_ROOT%{_sbindir}/rcpcscd mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates cp %{name}.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.pcscd @@ -145,8 +170,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %doc %{_mandir}/man?/*.* %{_sbindir}/* +%ghost %{_sysconfdir}/reader.conf %dir %{_sysconfdir}/reader.conf.d -%config %{_sysconfdir}/reader.conf +%config %{_sysconfdir}/reader.conf.d/reader.conf %{ifddir} /etc/init.d/pcscd /var/adm/fillup-templates/sysconfig.pcscd diff --git a/rcpcscd b/rcpcscd deleted file mode 100644 index 876decf..0000000 --- a/rcpcscd +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh -# -# pcscd Starts the pcscd Daemon -# -# chkconfig: 2345 25 88 -# description: The PC/SC smart card daemon is a resource manager for the \ -# PC/SC lite and Musclecard frameworks. It coordinates \ -# communications with smart card readers, smart cards, and \ -# cryptographic tokens that are connected to the system. -# -# processname: pcscd -# config: /etc/reader.conf.d -# -### BEGIN INIT INFO -# Provides: pcscd -# Required-Start: $local_fs $remote_fs $syslog -# Required-Stop: $local_fs $remote_fs $syslog -# Should-Start: udev hal openct -# Should-Stop: udev hal openct -# Default-Start: 2 3 5 -# Default-Stop: 0 1 6 -# Short-Description: Daemon to access a smart card using PC/SC -# Description: The PC/SC smart card daemon is a resource manager for the -# PC/SC lite and Musclecard frameworks. It coordinates -# communications with smart card readers, smart cards, and -# cryptographic tokens that are connected to the system. -# X-UnitedLinux-Default-Enabled: yes -### END INIT INFO -# -# Note! pcscd should be started after pcmcia, and shut down before it -# for smooth experience with PCMCIA readers. - -. /etc/rc.status -rc_reset - -umask 077 - -exec=/usr/sbin/pcscd -prog=$(basename $exec) -lockfile=/var/lock/subsys/$prog -PCSCD_OPTIONS= - -# Source config -if [ -f /etc/sysconfig/pcscd ] ; then - . /etc/sysconfig/pcscd -fi - -start() { - echo -n $"Starting PC/SC smart card daemon ($prog): " - startproc $exec $PCSCD_OPTIONS - retval=$? - rc_status - echo - [ $retval -eq 0 ] && touch $lockfile - rc_status -v -} -stop() { - echo -n $"Stopping PC/SC smart card daemon ($prog): " - killproc $exec - retval=$? - rc_status - echo - [ $retval -eq 0 ] && rm -f $lockfile - rc_status -v -} -restart() { - stop - start -} - - -case "$1" in - start|stop|restart) - $1 - ;; - reload|force-reload) - restart - ;; - status) - checkproc $exec - rc_status -v - ;; - condrestart|try-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 From 751d63a5753e975a82b1fb10f36b75d8c464b67825df0c2c7742ef82071e03cd Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Wed, 5 Jan 2011 12:55:56 +0000 Subject: [PATCH 4/8] Accepting request 57150 from home:sbrabec:branches:security:chipcard Accepted my own submit. OBS-URL: https://build.opensuse.org/request/show/57150 OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=35 --- pcsc-lite-1.5.5.tar.bz2 | 3 -- pcsc-lite-1.6.6.tar.bz2 | 3 ++ pcsc-lite-init | 95 +++++++++++++++++++++++++++++++++++++++++ pcsc-lite-init.patch | 66 ---------------------------- pcsc-lite-reader-conf | 13 ++++++ pcsc-lite.changes | 11 +++++ pcsc-lite.spec | 28 +++++++----- 7 files changed, 139 insertions(+), 80 deletions(-) delete mode 100644 pcsc-lite-1.5.5.tar.bz2 create mode 100644 pcsc-lite-1.6.6.tar.bz2 create mode 100644 pcsc-lite-init delete mode 100644 pcsc-lite-init.patch create mode 100644 pcsc-lite-reader-conf diff --git a/pcsc-lite-1.5.5.tar.bz2 b/pcsc-lite-1.5.5.tar.bz2 deleted file mode 100644 index e7c37e6..0000000 --- a/pcsc-lite-1.5.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:051de6f3c1deff9a9c6f72995f6b9d271a23fc8aea74737f1902cabf1a71ed26 -size 465947 diff --git a/pcsc-lite-1.6.6.tar.bz2 b/pcsc-lite-1.6.6.tar.bz2 new file mode 100644 index 0000000..6658062 --- /dev/null +++ b/pcsc-lite-1.6.6.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a94c27ae687619435b29ad63e0561aca20413333187b4301c75d1a1547ceea8 +size 480232 diff --git a/pcsc-lite-init b/pcsc-lite-init new file mode 100644 index 0000000..cc6d5d3 --- /dev/null +++ b/pcsc-lite-init @@ -0,0 +1,95 @@ +#!/bin/sh +# +# pcscd Starts the pcscd Daemon +# +# chkconfig: 2345 25 88 +# description: The PC/SC smart card daemon is a resource manager for the \ +# PC/SC lite and Musclecard frameworks. It coordinates \ +# communications with smart card readers, smart cards, and \ +# cryptographic tokens that are connected to the system. +# +# processname: pcscd +# config: /etc/reader.conf +# +### BEGIN INIT INFO +# Provides: pcscd +# Required-Start: $local_fs $remote_fs $syslog +# Required-Stop: $local_fs $remote_fs $syslog +# Should-Start: udev hal openct +# Should-Stop: udev hal openct +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Daemon to access a smart card using PC/SC +# Description: The PC/SC smart card daemon is a resource manager for the +# PC/SC lite and Musclecard frameworks. It coordinates +# communications with smart card readers, smart cards, and +# cryptographic tokens that are connected to the system. +# X-UnitedLinux-Default-Enabled: yes +### END INIT INFO +# +# Note! pcscd should be started after pcmcia, and shut down before it +# for smooth experience with PCMCIA readers. + +. /etc/rc.status +rc_reset + +umask 077 + +exec=/usr/sbin/pcscd +prog=$(basename $exec) +lockfile=/var/lock/subsys/$prog +PCSCD_OPTIONS= + +# Source config +if [ -f /etc/sysconfig/pcscd ] ; then + . /etc/sysconfig/pcscd +fi + +start() { + echo -n $"Starting PC/SC smart card daemon ($prog): " + startproc $exec $PCSCD_OPTIONS + retval=$? + rc_status + echo + [ $retval -eq 0 ] && touch $lockfile + rc_status -v +} +stop() { + echo -n $"Stopping PC/SC smart card daemon ($prog): " + killproc $exec + retval=$? + rc_status + echo + [ $retval -eq 0 ] && rm -f $lockfile + rc_status -v +} +restart() { + stop + start +} + + +case "$1" in + start|stop|restart) + $1 + ;; + reload|force-reload) + restart + ;; + status) + checkproc $exec + rc_status -v + ;; + condrestart|try-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-init.patch b/pcsc-lite-init.patch deleted file mode 100644 index 9a68bcd..0000000 --- a/pcsc-lite-init.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- etc/pcscd.init.in -+++ etc/pcscd.init.in -@@ -24,12 +24,14 @@ - # PC/SC lite and Musclecard frameworks. It coordinates - # communications with smart card readers, smart cards, and - # cryptographic tokens that are connected to the system. -+# X-UnitedLinux-Default-Enabled: yes - ### END INIT INFO - # - # 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 +47,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 +77,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-reader-conf b/pcsc-lite-reader-conf new file mode 100644 index 0000000..d1078bc --- /dev/null +++ b/pcsc-lite-reader-conf @@ -0,0 +1,13 @@ +# Configuration file for pcsc-lite +# +# This file has to be configured for serial and PCMCIA readers only. +# normal USB readers shall _not_ be configured here! +# +# David Corcoran + +#FRIENDLYNAME "Generic Reader" +#DEVICENAME /dev/ttySx_not_configured +#LIBPATH @ifddir@/libgen_ifd.so +#CHANNELID 0x0103F8 + +# End of file diff --git a/pcsc-lite.changes b/pcsc-lite.changes index a850454..0b7e00e 100644 --- a/pcsc-lite.changes +++ b/pcsc-lite.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Jan 4 19:03:13 CET 2011 - sbrabec@suse.cz + +- Updated to version 1.6.6: + * code and behavior improvements + * many fixes + * uses libusb-1.0 + * fixes several security issues + * for more see ChangeLog +- Disabled HAL support. + ------------------------------------------------------------------- Tue Dec 15 01:39:25 CET 2009 - jengelh@medozas.de diff --git a/pcsc-lite.spec b/pcsc-lite.spec index f19ea22..1972c4e 100644 --- a/pcsc-lite.spec +++ b/pcsc-lite.spec @@ -21,9 +21,14 @@ 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 -Version: 1.5.5 -Release: 2 +BuildRequires: pkg-config readline-devel +%if %suse_version >= 1110 +BuildRequires: libusb-1_0-devel +%else +BuildRequires: hal-devel +%endif +Version: 1.6.6 +Release: 0 PreReq: %{insserv_prereq} %{fillup_prereq} Group: Productivity/Security License: BSD3c(or similar) @@ -34,7 +39,8 @@ Source1: %{name}.sysconfig Source2: README.SUSE Source3: pre_checkin.sh Source4: baselibs.conf -Patch1: pcsc-lite-init.patch +Source5: pcsc-lite-init +Source6: pcsc-lite-reader-conf Requires: libpcsclite1 >= %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -119,8 +125,7 @@ Authors: %prep %setup -q -cp -a %{S:1} %{S:2} . -%patch1 +cp -a %{S:1} %{S:2} %{S:5} %{S:6} . %build %if %suse_version > 1110 @@ -129,17 +134,19 @@ ACLOCAL="aclocal -I m4" autoreconf -f -i %configure\ --docdir=%{_docdir}/%{name}\ --enable-usbdropdir=%{ifddir}\ +%if %suse_version >= 1110 + --disable-libhal\ +%endif --disable-static make %{?jobs:-j%jobs} %install %makeinstall -touch $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf -mkdir $RPM_BUILD_ROOT%{ifddir} +sed s:@ifddir@:%{ifddir}: $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d/reader.conf # 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 etc/pcscd.init $RPM_BUILD_ROOT/etc/init.d/pcscd +install -m 755 pcsc-lite-init $RPM_BUILD_ROOT/etc/init.d/pcscd ln -sf ../../etc/init.d/pcscd $RPM_BUILD_ROOT%{_sbindir}/rcpcscd mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates cp %{name}.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.pcscd @@ -170,9 +177,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %doc %{_mandir}/man?/*.* %{_sbindir}/* -%ghost %{_sysconfdir}/reader.conf %dir %{_sysconfdir}/reader.conf.d -%config %{_sysconfdir}/reader.conf.d/reader.conf +%config(noreplace) %{_sysconfdir}/reader.conf.d/reader.conf %{ifddir} /etc/init.d/pcscd /var/adm/fillup-templates/sysconfig.pcscd From 469b9f25ab8fe760f3dd02108c45154221d9904a51aeb6e734d8641f193a974a Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Wed, 5 Jan 2011 14:11:59 +0000 Subject: [PATCH 5/8] Revert to previous version. Several packages need to be ported. OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=36 --- pcsc-lite-1.5.5.tar.bz2 | 3 ++ pcsc-lite-1.6.6.tar.bz2 | 3 -- pcsc-lite-init | 95 ----------------------------------------- pcsc-lite-init.patch | 66 ++++++++++++++++++++++++++++ pcsc-lite-reader-conf | 13 ------ pcsc-lite.changes | 11 ----- pcsc-lite.spec | 28 +++++------- 7 files changed, 80 insertions(+), 139 deletions(-) create mode 100644 pcsc-lite-1.5.5.tar.bz2 delete mode 100644 pcsc-lite-1.6.6.tar.bz2 delete mode 100644 pcsc-lite-init create mode 100644 pcsc-lite-init.patch delete mode 100644 pcsc-lite-reader-conf diff --git a/pcsc-lite-1.5.5.tar.bz2 b/pcsc-lite-1.5.5.tar.bz2 new file mode 100644 index 0000000..e7c37e6 --- /dev/null +++ b/pcsc-lite-1.5.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:051de6f3c1deff9a9c6f72995f6b9d271a23fc8aea74737f1902cabf1a71ed26 +size 465947 diff --git a/pcsc-lite-1.6.6.tar.bz2 b/pcsc-lite-1.6.6.tar.bz2 deleted file mode 100644 index 6658062..0000000 --- a/pcsc-lite-1.6.6.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a94c27ae687619435b29ad63e0561aca20413333187b4301c75d1a1547ceea8 -size 480232 diff --git a/pcsc-lite-init b/pcsc-lite-init deleted file mode 100644 index cc6d5d3..0000000 --- a/pcsc-lite-init +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh -# -# pcscd Starts the pcscd Daemon -# -# chkconfig: 2345 25 88 -# description: The PC/SC smart card daemon is a resource manager for the \ -# PC/SC lite and Musclecard frameworks. It coordinates \ -# communications with smart card readers, smart cards, and \ -# cryptographic tokens that are connected to the system. -# -# processname: pcscd -# config: /etc/reader.conf -# -### BEGIN INIT INFO -# Provides: pcscd -# Required-Start: $local_fs $remote_fs $syslog -# Required-Stop: $local_fs $remote_fs $syslog -# Should-Start: udev hal openct -# Should-Stop: udev hal openct -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Daemon to access a smart card using PC/SC -# Description: The PC/SC smart card daemon is a resource manager for the -# PC/SC lite and Musclecard frameworks. It coordinates -# communications with smart card readers, smart cards, and -# cryptographic tokens that are connected to the system. -# X-UnitedLinux-Default-Enabled: yes -### END INIT INFO -# -# Note! pcscd should be started after pcmcia, and shut down before it -# for smooth experience with PCMCIA readers. - -. /etc/rc.status -rc_reset - -umask 077 - -exec=/usr/sbin/pcscd -prog=$(basename $exec) -lockfile=/var/lock/subsys/$prog -PCSCD_OPTIONS= - -# Source config -if [ -f /etc/sysconfig/pcscd ] ; then - . /etc/sysconfig/pcscd -fi - -start() { - echo -n $"Starting PC/SC smart card daemon ($prog): " - startproc $exec $PCSCD_OPTIONS - retval=$? - rc_status - echo - [ $retval -eq 0 ] && touch $lockfile - rc_status -v -} -stop() { - echo -n $"Stopping PC/SC smart card daemon ($prog): " - killproc $exec - retval=$? - rc_status - echo - [ $retval -eq 0 ] && rm -f $lockfile - rc_status -v -} -restart() { - stop - start -} - - -case "$1" in - start|stop|restart) - $1 - ;; - reload|force-reload) - restart - ;; - status) - checkproc $exec - rc_status -v - ;; - condrestart|try-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-init.patch b/pcsc-lite-init.patch new file mode 100644 index 0000000..9a68bcd --- /dev/null +++ b/pcsc-lite-init.patch @@ -0,0 +1,66 @@ +--- etc/pcscd.init.in ++++ etc/pcscd.init.in +@@ -24,12 +24,14 @@ + # PC/SC lite and Musclecard frameworks. It coordinates + # communications with smart card readers, smart cards, and + # cryptographic tokens that are connected to the system. ++# X-UnitedLinux-Default-Enabled: yes + ### END INIT INFO + # + # 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 +47,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 +77,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-reader-conf b/pcsc-lite-reader-conf deleted file mode 100644 index d1078bc..0000000 --- a/pcsc-lite-reader-conf +++ /dev/null @@ -1,13 +0,0 @@ -# Configuration file for pcsc-lite -# -# This file has to be configured for serial and PCMCIA readers only. -# normal USB readers shall _not_ be configured here! -# -# David Corcoran - -#FRIENDLYNAME "Generic Reader" -#DEVICENAME /dev/ttySx_not_configured -#LIBPATH @ifddir@/libgen_ifd.so -#CHANNELID 0x0103F8 - -# End of file diff --git a/pcsc-lite.changes b/pcsc-lite.changes index 0b7e00e..a850454 100644 --- a/pcsc-lite.changes +++ b/pcsc-lite.changes @@ -1,14 +1,3 @@ -------------------------------------------------------------------- -Tue Jan 4 19:03:13 CET 2011 - sbrabec@suse.cz - -- Updated to version 1.6.6: - * code and behavior improvements - * many fixes - * uses libusb-1.0 - * fixes several security issues - * for more see ChangeLog -- Disabled HAL support. - ------------------------------------------------------------------- Tue Dec 15 01:39:25 CET 2009 - jengelh@medozas.de diff --git a/pcsc-lite.spec b/pcsc-lite.spec index 1972c4e..f19ea22 100644 --- a/pcsc-lite.spec +++ b/pcsc-lite.spec @@ -21,14 +21,9 @@ Name: pcsc-lite # FIXME: Maybe we should use /usr/lib/pcsc/drivers as others do: %define ifddir %{_libdir}/readers -BuildRequires: pkg-config readline-devel -%if %suse_version >= 1110 -BuildRequires: libusb-1_0-devel -%else -BuildRequires: hal-devel -%endif -Version: 1.6.6 -Release: 0 +BuildRequires: hal-devel pkg-config readline-devel +Version: 1.5.5 +Release: 2 PreReq: %{insserv_prereq} %{fillup_prereq} Group: Productivity/Security License: BSD3c(or similar) @@ -39,8 +34,7 @@ Source1: %{name}.sysconfig Source2: README.SUSE Source3: pre_checkin.sh Source4: baselibs.conf -Source5: pcsc-lite-init -Source6: pcsc-lite-reader-conf +Patch1: pcsc-lite-init.patch Requires: libpcsclite1 >= %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -125,7 +119,8 @@ Authors: %prep %setup -q -cp -a %{S:1} %{S:2} %{S:5} %{S:6} . +cp -a %{S:1} %{S:2} . +%patch1 %build %if %suse_version > 1110 @@ -134,19 +129,17 @@ ACLOCAL="aclocal -I m4" autoreconf -f -i %configure\ --docdir=%{_docdir}/%{name}\ --enable-usbdropdir=%{ifddir}\ -%if %suse_version >= 1110 - --disable-libhal\ -%endif --disable-static make %{?jobs:-j%jobs} %install %makeinstall -sed s:@ifddir@:%{ifddir}: $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d/reader.conf +touch $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf +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 pcsc-lite-init $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 mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates cp %{name}.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.pcscd @@ -177,8 +170,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %doc %{_mandir}/man?/*.* %{_sbindir}/* +%ghost %{_sysconfdir}/reader.conf %dir %{_sysconfdir}/reader.conf.d -%config(noreplace) %{_sysconfdir}/reader.conf.d/reader.conf +%config %{_sysconfdir}/reader.conf.d/reader.conf %{ifddir} /etc/init.d/pcscd /var/adm/fillup-templates/sysconfig.pcscd From 8d3eea75f1d5ee9bf9a9d91c7186764dc229c1ed06f984bafc253992fa2f91c2 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Wed, 5 Jan 2011 14:13:15 +0000 Subject: [PATCH 6/8] - Updated to version 1.6.6: * code and behavior improvements * many fixes * uses libusb-1.0 * fixes several security issues * for more see ChangeLog - Disabled HAL support. OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=37 --- pcsc-lite-1.5.5.tar.bz2 | 3 -- pcsc-lite-1.6.6.tar.bz2 | 3 ++ pcsc-lite-init | 95 +++++++++++++++++++++++++++++++++++++++++ pcsc-lite-init.patch | 66 ---------------------------- pcsc-lite-reader-conf | 13 ++++++ pcsc-lite.changes | 11 +++++ pcsc-lite.spec | 28 +++++++----- 7 files changed, 139 insertions(+), 80 deletions(-) delete mode 100644 pcsc-lite-1.5.5.tar.bz2 create mode 100644 pcsc-lite-1.6.6.tar.bz2 create mode 100644 pcsc-lite-init delete mode 100644 pcsc-lite-init.patch create mode 100644 pcsc-lite-reader-conf diff --git a/pcsc-lite-1.5.5.tar.bz2 b/pcsc-lite-1.5.5.tar.bz2 deleted file mode 100644 index e7c37e6..0000000 --- a/pcsc-lite-1.5.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:051de6f3c1deff9a9c6f72995f6b9d271a23fc8aea74737f1902cabf1a71ed26 -size 465947 diff --git a/pcsc-lite-1.6.6.tar.bz2 b/pcsc-lite-1.6.6.tar.bz2 new file mode 100644 index 0000000..6658062 --- /dev/null +++ b/pcsc-lite-1.6.6.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a94c27ae687619435b29ad63e0561aca20413333187b4301c75d1a1547ceea8 +size 480232 diff --git a/pcsc-lite-init b/pcsc-lite-init new file mode 100644 index 0000000..cc6d5d3 --- /dev/null +++ b/pcsc-lite-init @@ -0,0 +1,95 @@ +#!/bin/sh +# +# pcscd Starts the pcscd Daemon +# +# chkconfig: 2345 25 88 +# description: The PC/SC smart card daemon is a resource manager for the \ +# PC/SC lite and Musclecard frameworks. It coordinates \ +# communications with smart card readers, smart cards, and \ +# cryptographic tokens that are connected to the system. +# +# processname: pcscd +# config: /etc/reader.conf +# +### BEGIN INIT INFO +# Provides: pcscd +# Required-Start: $local_fs $remote_fs $syslog +# Required-Stop: $local_fs $remote_fs $syslog +# Should-Start: udev hal openct +# Should-Stop: udev hal openct +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Daemon to access a smart card using PC/SC +# Description: The PC/SC smart card daemon is a resource manager for the +# PC/SC lite and Musclecard frameworks. It coordinates +# communications with smart card readers, smart cards, and +# cryptographic tokens that are connected to the system. +# X-UnitedLinux-Default-Enabled: yes +### END INIT INFO +# +# Note! pcscd should be started after pcmcia, and shut down before it +# for smooth experience with PCMCIA readers. + +. /etc/rc.status +rc_reset + +umask 077 + +exec=/usr/sbin/pcscd +prog=$(basename $exec) +lockfile=/var/lock/subsys/$prog +PCSCD_OPTIONS= + +# Source config +if [ -f /etc/sysconfig/pcscd ] ; then + . /etc/sysconfig/pcscd +fi + +start() { + echo -n $"Starting PC/SC smart card daemon ($prog): " + startproc $exec $PCSCD_OPTIONS + retval=$? + rc_status + echo + [ $retval -eq 0 ] && touch $lockfile + rc_status -v +} +stop() { + echo -n $"Stopping PC/SC smart card daemon ($prog): " + killproc $exec + retval=$? + rc_status + echo + [ $retval -eq 0 ] && rm -f $lockfile + rc_status -v +} +restart() { + stop + start +} + + +case "$1" in + start|stop|restart) + $1 + ;; + reload|force-reload) + restart + ;; + status) + checkproc $exec + rc_status -v + ;; + condrestart|try-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-init.patch b/pcsc-lite-init.patch deleted file mode 100644 index 9a68bcd..0000000 --- a/pcsc-lite-init.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- etc/pcscd.init.in -+++ etc/pcscd.init.in -@@ -24,12 +24,14 @@ - # PC/SC lite and Musclecard frameworks. It coordinates - # communications with smart card readers, smart cards, and - # cryptographic tokens that are connected to the system. -+# X-UnitedLinux-Default-Enabled: yes - ### END INIT INFO - # - # 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 +47,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 +77,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-reader-conf b/pcsc-lite-reader-conf new file mode 100644 index 0000000..d1078bc --- /dev/null +++ b/pcsc-lite-reader-conf @@ -0,0 +1,13 @@ +# Configuration file for pcsc-lite +# +# This file has to be configured for serial and PCMCIA readers only. +# normal USB readers shall _not_ be configured here! +# +# David Corcoran + +#FRIENDLYNAME "Generic Reader" +#DEVICENAME /dev/ttySx_not_configured +#LIBPATH @ifddir@/libgen_ifd.so +#CHANNELID 0x0103F8 + +# End of file diff --git a/pcsc-lite.changes b/pcsc-lite.changes index a850454..0b7e00e 100644 --- a/pcsc-lite.changes +++ b/pcsc-lite.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Jan 4 19:03:13 CET 2011 - sbrabec@suse.cz + +- Updated to version 1.6.6: + * code and behavior improvements + * many fixes + * uses libusb-1.0 + * fixes several security issues + * for more see ChangeLog +- Disabled HAL support. + ------------------------------------------------------------------- Tue Dec 15 01:39:25 CET 2009 - jengelh@medozas.de diff --git a/pcsc-lite.spec b/pcsc-lite.spec index f19ea22..1972c4e 100644 --- a/pcsc-lite.spec +++ b/pcsc-lite.spec @@ -21,9 +21,14 @@ 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 -Version: 1.5.5 -Release: 2 +BuildRequires: pkg-config readline-devel +%if %suse_version >= 1110 +BuildRequires: libusb-1_0-devel +%else +BuildRequires: hal-devel +%endif +Version: 1.6.6 +Release: 0 PreReq: %{insserv_prereq} %{fillup_prereq} Group: Productivity/Security License: BSD3c(or similar) @@ -34,7 +39,8 @@ Source1: %{name}.sysconfig Source2: README.SUSE Source3: pre_checkin.sh Source4: baselibs.conf -Patch1: pcsc-lite-init.patch +Source5: pcsc-lite-init +Source6: pcsc-lite-reader-conf Requires: libpcsclite1 >= %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -119,8 +125,7 @@ Authors: %prep %setup -q -cp -a %{S:1} %{S:2} . -%patch1 +cp -a %{S:1} %{S:2} %{S:5} %{S:6} . %build %if %suse_version > 1110 @@ -129,17 +134,19 @@ ACLOCAL="aclocal -I m4" autoreconf -f -i %configure\ --docdir=%{_docdir}/%{name}\ --enable-usbdropdir=%{ifddir}\ +%if %suse_version >= 1110 + --disable-libhal\ +%endif --disable-static make %{?jobs:-j%jobs} %install %makeinstall -touch $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf -mkdir $RPM_BUILD_ROOT%{ifddir} +sed s:@ifddir@:%{ifddir}: $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d/reader.conf # 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 etc/pcscd.init $RPM_BUILD_ROOT/etc/init.d/pcscd +install -m 755 pcsc-lite-init $RPM_BUILD_ROOT/etc/init.d/pcscd ln -sf ../../etc/init.d/pcscd $RPM_BUILD_ROOT%{_sbindir}/rcpcscd mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates cp %{name}.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.pcscd @@ -170,9 +177,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %doc %{_mandir}/man?/*.* %{_sbindir}/* -%ghost %{_sysconfdir}/reader.conf %dir %{_sysconfdir}/reader.conf.d -%config %{_sysconfdir}/reader.conf.d/reader.conf +%config(noreplace) %{_sysconfdir}/reader.conf.d/reader.conf %{ifddir} /etc/init.d/pcscd /var/adm/fillup-templates/sysconfig.pcscd From 1161befb0ff0208b787005333a40f91996a89237f520ae6953318f7bb4d9d8a9 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Wed, 5 Jan 2011 15:07:40 +0000 Subject: [PATCH 7/8] Something went wrong. Reverting again. OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=38 --- pcsc-lite-1.5.5.tar.bz2 | 3 ++ pcsc-lite-1.6.6.tar.bz2 | 3 -- pcsc-lite-init | 95 ----------------------------------------- pcsc-lite-init.patch | 66 ++++++++++++++++++++++++++++ pcsc-lite-reader-conf | 13 ------ pcsc-lite.changes | 11 ----- pcsc-lite.spec | 28 +++++------- 7 files changed, 80 insertions(+), 139 deletions(-) create mode 100644 pcsc-lite-1.5.5.tar.bz2 delete mode 100644 pcsc-lite-1.6.6.tar.bz2 delete mode 100644 pcsc-lite-init create mode 100644 pcsc-lite-init.patch delete mode 100644 pcsc-lite-reader-conf diff --git a/pcsc-lite-1.5.5.tar.bz2 b/pcsc-lite-1.5.5.tar.bz2 new file mode 100644 index 0000000..e7c37e6 --- /dev/null +++ b/pcsc-lite-1.5.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:051de6f3c1deff9a9c6f72995f6b9d271a23fc8aea74737f1902cabf1a71ed26 +size 465947 diff --git a/pcsc-lite-1.6.6.tar.bz2 b/pcsc-lite-1.6.6.tar.bz2 deleted file mode 100644 index 6658062..0000000 --- a/pcsc-lite-1.6.6.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a94c27ae687619435b29ad63e0561aca20413333187b4301c75d1a1547ceea8 -size 480232 diff --git a/pcsc-lite-init b/pcsc-lite-init deleted file mode 100644 index cc6d5d3..0000000 --- a/pcsc-lite-init +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh -# -# pcscd Starts the pcscd Daemon -# -# chkconfig: 2345 25 88 -# description: The PC/SC smart card daemon is a resource manager for the \ -# PC/SC lite and Musclecard frameworks. It coordinates \ -# communications with smart card readers, smart cards, and \ -# cryptographic tokens that are connected to the system. -# -# processname: pcscd -# config: /etc/reader.conf -# -### BEGIN INIT INFO -# Provides: pcscd -# Required-Start: $local_fs $remote_fs $syslog -# Required-Stop: $local_fs $remote_fs $syslog -# Should-Start: udev hal openct -# Should-Stop: udev hal openct -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Daemon to access a smart card using PC/SC -# Description: The PC/SC smart card daemon is a resource manager for the -# PC/SC lite and Musclecard frameworks. It coordinates -# communications with smart card readers, smart cards, and -# cryptographic tokens that are connected to the system. -# X-UnitedLinux-Default-Enabled: yes -### END INIT INFO -# -# Note! pcscd should be started after pcmcia, and shut down before it -# for smooth experience with PCMCIA readers. - -. /etc/rc.status -rc_reset - -umask 077 - -exec=/usr/sbin/pcscd -prog=$(basename $exec) -lockfile=/var/lock/subsys/$prog -PCSCD_OPTIONS= - -# Source config -if [ -f /etc/sysconfig/pcscd ] ; then - . /etc/sysconfig/pcscd -fi - -start() { - echo -n $"Starting PC/SC smart card daemon ($prog): " - startproc $exec $PCSCD_OPTIONS - retval=$? - rc_status - echo - [ $retval -eq 0 ] && touch $lockfile - rc_status -v -} -stop() { - echo -n $"Stopping PC/SC smart card daemon ($prog): " - killproc $exec - retval=$? - rc_status - echo - [ $retval -eq 0 ] && rm -f $lockfile - rc_status -v -} -restart() { - stop - start -} - - -case "$1" in - start|stop|restart) - $1 - ;; - reload|force-reload) - restart - ;; - status) - checkproc $exec - rc_status -v - ;; - condrestart|try-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-init.patch b/pcsc-lite-init.patch new file mode 100644 index 0000000..9a68bcd --- /dev/null +++ b/pcsc-lite-init.patch @@ -0,0 +1,66 @@ +--- etc/pcscd.init.in ++++ etc/pcscd.init.in +@@ -24,12 +24,14 @@ + # PC/SC lite and Musclecard frameworks. It coordinates + # communications with smart card readers, smart cards, and + # cryptographic tokens that are connected to the system. ++# X-UnitedLinux-Default-Enabled: yes + ### END INIT INFO + # + # 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 +47,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 +77,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-reader-conf b/pcsc-lite-reader-conf deleted file mode 100644 index d1078bc..0000000 --- a/pcsc-lite-reader-conf +++ /dev/null @@ -1,13 +0,0 @@ -# Configuration file for pcsc-lite -# -# This file has to be configured for serial and PCMCIA readers only. -# normal USB readers shall _not_ be configured here! -# -# David Corcoran - -#FRIENDLYNAME "Generic Reader" -#DEVICENAME /dev/ttySx_not_configured -#LIBPATH @ifddir@/libgen_ifd.so -#CHANNELID 0x0103F8 - -# End of file diff --git a/pcsc-lite.changes b/pcsc-lite.changes index 0b7e00e..a850454 100644 --- a/pcsc-lite.changes +++ b/pcsc-lite.changes @@ -1,14 +1,3 @@ -------------------------------------------------------------------- -Tue Jan 4 19:03:13 CET 2011 - sbrabec@suse.cz - -- Updated to version 1.6.6: - * code and behavior improvements - * many fixes - * uses libusb-1.0 - * fixes several security issues - * for more see ChangeLog -- Disabled HAL support. - ------------------------------------------------------------------- Tue Dec 15 01:39:25 CET 2009 - jengelh@medozas.de diff --git a/pcsc-lite.spec b/pcsc-lite.spec index 1972c4e..f19ea22 100644 --- a/pcsc-lite.spec +++ b/pcsc-lite.spec @@ -21,14 +21,9 @@ Name: pcsc-lite # FIXME: Maybe we should use /usr/lib/pcsc/drivers as others do: %define ifddir %{_libdir}/readers -BuildRequires: pkg-config readline-devel -%if %suse_version >= 1110 -BuildRequires: libusb-1_0-devel -%else -BuildRequires: hal-devel -%endif -Version: 1.6.6 -Release: 0 +BuildRequires: hal-devel pkg-config readline-devel +Version: 1.5.5 +Release: 2 PreReq: %{insserv_prereq} %{fillup_prereq} Group: Productivity/Security License: BSD3c(or similar) @@ -39,8 +34,7 @@ Source1: %{name}.sysconfig Source2: README.SUSE Source3: pre_checkin.sh Source4: baselibs.conf -Source5: pcsc-lite-init -Source6: pcsc-lite-reader-conf +Patch1: pcsc-lite-init.patch Requires: libpcsclite1 >= %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -125,7 +119,8 @@ Authors: %prep %setup -q -cp -a %{S:1} %{S:2} %{S:5} %{S:6} . +cp -a %{S:1} %{S:2} . +%patch1 %build %if %suse_version > 1110 @@ -134,19 +129,17 @@ ACLOCAL="aclocal -I m4" autoreconf -f -i %configure\ --docdir=%{_docdir}/%{name}\ --enable-usbdropdir=%{ifddir}\ -%if %suse_version >= 1110 - --disable-libhal\ -%endif --disable-static make %{?jobs:-j%jobs} %install %makeinstall -sed s:@ifddir@:%{ifddir}: $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d/reader.conf +touch $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf +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 pcsc-lite-init $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 mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates cp %{name}.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.pcscd @@ -177,8 +170,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %doc %{_mandir}/man?/*.* %{_sbindir}/* +%ghost %{_sysconfdir}/reader.conf %dir %{_sysconfdir}/reader.conf.d -%config(noreplace) %{_sysconfdir}/reader.conf.d/reader.conf +%config %{_sysconfdir}/reader.conf.d/reader.conf %{ifddir} /etc/init.d/pcscd /var/adm/fillup-templates/sysconfig.pcscd From adac3d0b764921bd1b72665d4e86dba7497b8cd03664ad50d0eb0ca0db119322 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Tue, 11 Jan 2011 13:33:42 +0000 Subject: [PATCH 8/8] Accepting request 57872 from home:sbrabec:branches:security:chipcard Accepted my own submit. OBS-URL: https://build.opensuse.org/request/show/57872 OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=39 --- pcsc-lite-1.5.5.tar.bz2 | 3 -- pcsc-lite-1.6.6.tar.bz2 | 3 ++ pcsc-lite-init | 95 +++++++++++++++++++++++++++++++++++++++++ pcsc-lite-init.patch | 66 ---------------------------- pcsc-lite-reader-conf | 13 ++++++ pcsc-lite.changes | 13 ++++++ pcsc-lite.spec | 34 ++++++++++----- 7 files changed, 147 insertions(+), 80 deletions(-) delete mode 100644 pcsc-lite-1.5.5.tar.bz2 create mode 100644 pcsc-lite-1.6.6.tar.bz2 create mode 100644 pcsc-lite-init delete mode 100644 pcsc-lite-init.patch create mode 100644 pcsc-lite-reader-conf diff --git a/pcsc-lite-1.5.5.tar.bz2 b/pcsc-lite-1.5.5.tar.bz2 deleted file mode 100644 index e7c37e6..0000000 --- a/pcsc-lite-1.5.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:051de6f3c1deff9a9c6f72995f6b9d271a23fc8aea74737f1902cabf1a71ed26 -size 465947 diff --git a/pcsc-lite-1.6.6.tar.bz2 b/pcsc-lite-1.6.6.tar.bz2 new file mode 100644 index 0000000..6658062 --- /dev/null +++ b/pcsc-lite-1.6.6.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a94c27ae687619435b29ad63e0561aca20413333187b4301c75d1a1547ceea8 +size 480232 diff --git a/pcsc-lite-init b/pcsc-lite-init new file mode 100644 index 0000000..cc6d5d3 --- /dev/null +++ b/pcsc-lite-init @@ -0,0 +1,95 @@ +#!/bin/sh +# +# pcscd Starts the pcscd Daemon +# +# chkconfig: 2345 25 88 +# description: The PC/SC smart card daemon is a resource manager for the \ +# PC/SC lite and Musclecard frameworks. It coordinates \ +# communications with smart card readers, smart cards, and \ +# cryptographic tokens that are connected to the system. +# +# processname: pcscd +# config: /etc/reader.conf +# +### BEGIN INIT INFO +# Provides: pcscd +# Required-Start: $local_fs $remote_fs $syslog +# Required-Stop: $local_fs $remote_fs $syslog +# Should-Start: udev hal openct +# Should-Stop: udev hal openct +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Daemon to access a smart card using PC/SC +# Description: The PC/SC smart card daemon is a resource manager for the +# PC/SC lite and Musclecard frameworks. It coordinates +# communications with smart card readers, smart cards, and +# cryptographic tokens that are connected to the system. +# X-UnitedLinux-Default-Enabled: yes +### END INIT INFO +# +# Note! pcscd should be started after pcmcia, and shut down before it +# for smooth experience with PCMCIA readers. + +. /etc/rc.status +rc_reset + +umask 077 + +exec=/usr/sbin/pcscd +prog=$(basename $exec) +lockfile=/var/lock/subsys/$prog +PCSCD_OPTIONS= + +# Source config +if [ -f /etc/sysconfig/pcscd ] ; then + . /etc/sysconfig/pcscd +fi + +start() { + echo -n $"Starting PC/SC smart card daemon ($prog): " + startproc $exec $PCSCD_OPTIONS + retval=$? + rc_status + echo + [ $retval -eq 0 ] && touch $lockfile + rc_status -v +} +stop() { + echo -n $"Stopping PC/SC smart card daemon ($prog): " + killproc $exec + retval=$? + rc_status + echo + [ $retval -eq 0 ] && rm -f $lockfile + rc_status -v +} +restart() { + stop + start +} + + +case "$1" in + start|stop|restart) + $1 + ;; + reload|force-reload) + restart + ;; + status) + checkproc $exec + rc_status -v + ;; + condrestart|try-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-init.patch b/pcsc-lite-init.patch deleted file mode 100644 index 9a68bcd..0000000 --- a/pcsc-lite-init.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- etc/pcscd.init.in -+++ etc/pcscd.init.in -@@ -24,12 +24,14 @@ - # PC/SC lite and Musclecard frameworks. It coordinates - # communications with smart card readers, smart cards, and - # cryptographic tokens that are connected to the system. -+# X-UnitedLinux-Default-Enabled: yes - ### END INIT INFO - # - # 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 +47,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 +77,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-reader-conf b/pcsc-lite-reader-conf new file mode 100644 index 0000000..d1078bc --- /dev/null +++ b/pcsc-lite-reader-conf @@ -0,0 +1,13 @@ +# Configuration file for pcsc-lite +# +# This file has to be configured for serial and PCMCIA readers only. +# normal USB readers shall _not_ be configured here! +# +# David Corcoran + +#FRIENDLYNAME "Generic Reader" +#DEVICENAME /dev/ttySx_not_configured +#LIBPATH @ifddir@/libgen_ifd.so +#CHANNELID 0x0103F8 + +# End of file diff --git a/pcsc-lite.changes b/pcsc-lite.changes index a850454..30cb2d5 100644 --- a/pcsc-lite.changes +++ b/pcsc-lite.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Jan 10 19:36:08 CET 2011 - sbrabec@suse.cz + +- Updated to version 1.6.6: + * code and behavior improvements + * many fixes + * uses libusb-1.0 + * two security fixes (bnc#609317, CVE-2010-0407, + bnc#661000, CVE-2010-4531) + * for more see ChangeLog +- Disabled HAL support. +- Create dedicated UID and GID "scard". + ------------------------------------------------------------------- Tue Dec 15 01:39:25 CET 2009 - jengelh@medozas.de diff --git a/pcsc-lite.spec b/pcsc-lite.spec index f19ea22..64b7de5 100644 --- a/pcsc-lite.spec +++ b/pcsc-lite.spec @@ -21,9 +21,14 @@ 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 -Version: 1.5.5 -Release: 2 +BuildRequires: pkg-config readline-devel +%if %suse_version >= 1110 +BuildRequires: libusb-1_0-devel +%else +BuildRequires: hal-devel +%endif +Version: 1.6.6 +Release: 0 PreReq: %{insserv_prereq} %{fillup_prereq} Group: Productivity/Security License: BSD3c(or similar) @@ -34,9 +39,12 @@ Source1: %{name}.sysconfig Source2: README.SUSE Source3: pre_checkin.sh Source4: baselibs.conf -Patch1: pcsc-lite-init.patch +Source5: pcsc-lite-init +Source6: pcsc-lite-reader-conf Requires: libpcsclite1 >= %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build +%define USER scard +%define GROUP scard %description The purpose of PCSC Lite is to provide a Windows(R) SCard interface in @@ -119,8 +127,7 @@ Authors: %prep %setup -q -cp -a %{S:1} %{S:2} . -%patch1 +cp -a %{S:1} %{S:2} %{S:5} %{S:6} . %build %if %suse_version > 1110 @@ -129,17 +136,19 @@ ACLOCAL="aclocal -I m4" autoreconf -f -i %configure\ --docdir=%{_docdir}/%{name}\ --enable-usbdropdir=%{ifddir}\ +%if %suse_version >= 1110 + --disable-libhal\ +%endif --disable-static make %{?jobs:-j%jobs} %install %makeinstall -touch $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf -mkdir $RPM_BUILD_ROOT%{ifddir} +sed s:@ifddir@:%{ifddir}: $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d/reader.conf # 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 etc/pcscd.init $RPM_BUILD_ROOT/etc/init.d/pcscd +install -m 755 pcsc-lite-init $RPM_BUILD_ROOT/etc/init.d/pcscd ln -sf ../../etc/init.d/pcscd $RPM_BUILD_ROOT%{_sbindir}/rcpcscd mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates cp %{name}.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.pcscd @@ -149,6 +158,10 @@ cp -a AUTHORS ChangeLog ChangeLog.svn COPYING DRIVERS HELP NEWS README README.SU %clean rm -rf $RPM_BUILD_ROOT +%pre +usr/sbin/groupadd -r -o %{GROUP} 2>/dev/null || : +usr/sbin/useradd -r -o -g %{GROUP} -s /bin/false -c "Smart Card Reader" -d /sbin %{USER} 2>/dev/null || : + %preun %{stop_on_removal pcscd} @@ -170,9 +183,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %doc %{_mandir}/man?/*.* %{_sbindir}/* -%ghost %{_sysconfdir}/reader.conf %dir %{_sysconfdir}/reader.conf.d -%config %{_sysconfdir}/reader.conf.d/reader.conf +%config(noreplace) %{_sysconfdir}/reader.conf.d/reader.conf %{ifddir} /etc/init.d/pcscd /var/adm/fillup-templates/sysconfig.pcscd