From df1c7ae3efcba5336b084417da1fcd05ff6a9dee Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sat, 3 Jul 2010 23:10:37 +0000 Subject: [PATCH] Update to 1.6.1 --- .cvsignore | 2 +- import.log | 2 - pcsc-lite-close_on_exec.patch | 17 ------- pcsc-lite-lsb_header.patch | 27 ----------- pcsc-lite.spec | 40 ++++++++--------- pcscd.init | 84 +++++++++++++++++++++++++++++++++++ sources | 2 +- 7 files changed, 105 insertions(+), 69 deletions(-) delete mode 100644 import.log delete mode 100644 pcsc-lite-close_on_exec.patch delete mode 100644 pcsc-lite-lsb_header.patch create mode 100755 pcscd.init diff --git a/.cvsignore b/.cvsignore index feea6c1..d054383 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pcsc-lite-1.5.5.tar.bz2 +pcsc-lite-1.6.1.tar.bz2 diff --git a/import.log b/import.log deleted file mode 100644 index f12631e..0000000 --- a/import.log +++ /dev/null @@ -1,2 +0,0 @@ -pcsc-lite-1_4_102-1_rhel5_bob:HEAD:pcsc-lite-1.4.102-1.rhel5_bob.src.rpm:1219883684 -pcsc-lite-1_5_2-1_fc10_bob:HEAD:pcsc-lite-1.5.2-1.fc10_bob.src.rpm:1236299703 diff --git a/pcsc-lite-close_on_exec.patch b/pcsc-lite-close_on_exec.patch deleted file mode 100644 index d1ff7e7..0000000 --- a/pcsc-lite-close_on_exec.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up ./src/sys_unix.c.close_on_exec ./src/sys_unix.c ---- ./src/sys_unix.c.close_on_exec 2009-02-24 16:02:47.641288000 -0800 -+++ ./src/sys_unix.c 2009-02-24 16:10:25.774746000 -0800 -@@ -123,9 +123,12 @@ INTERNAL int SYS_USleep(int iTimeVal) - * @retval >0 The file descriptor. - * @retval -1 An error ocurred. - */ -+ - INTERNAL int SYS_OpenFile(const char *pcFile, int flags, int mode) - { -- return open(pcFile, flags, mode); -+ int fd = open(pcFile, flags, mode); -+ fcntl(fd, F_SETFD, FD_CLOEXEC); -+ return fd; - } - - /** diff --git a/pcsc-lite-lsb_header.patch b/pcsc-lite-lsb_header.patch deleted file mode 100644 index 3ebbe3b..0000000 --- a/pcsc-lite-lsb_header.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -up pcsc-lite-1.5.5/etc/pcscd.init.in.lsb_header pcsc-lite-1.5.5/etc/pcscd.init.in ---- pcsc-lite-1.5.5/etc/pcscd.init.in.lsb_header 2008-05-09 17:59:08.000000000 +0300 -+++ pcsc-lite-1.5.5/etc/pcscd.init.in 2010-04-13 12:56:33.000000000 +0300 -@@ -2,7 +2,7 @@ - # - # pcscd Starts the pcscd Daemon - # --# chkconfig: 2345 25 88 -+# chkconfig: 2345 27 73 - # 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 \ -@@ -13,10 +13,10 @@ - # - ### 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 -+# Required-Start: $local_fs $remote_fs $syslog haldaemon -+# Required-Stop: $local_fs $remote_fs $syslog haldaemon -+# Should-Start: openct -+# Should-Stop: openct - # Default-Start: 2 3 4 5 - # Default-Stop: 0 1 6 - # Short-Description: Daemon to access a smart card using PC/SC diff --git a/pcsc-lite.spec b/pcsc-lite.spec index b0ce73a..014d2ef 100644 --- a/pcsc-lite.spec +++ b/pcsc-lite.spec @@ -1,19 +1,17 @@ -%global upstream_build 3082 +%global upstream_build 3298 Name: pcsc-lite -Version: 1.5.5 -Release: 4%{?dist} +Version: 1.6.1 +Release: 1%{?dist} Summary: PC/SC Lite smart card framework and applications Group: System Environment/Daemons License: BSD URL: http://pcsclite.alioth.debian.org/ Source0: http://alioth.debian.org/download.php/%{upstream_build}/%{name}-%{version}.tar.bz2 +Source1: pcscd.init Patch0: %{name}-1.4-docinst.patch Patch1: %{name}-1.5.5-rpath64.patch -Patch2: %{name}-close_on_exec.patch -# Fedora specific changes to init script LSB header and start/stop priorities -Patch3: %{name}-lsb_header.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -64,14 +62,19 @@ BuildArch: noarch %setup -q %patch0 -p0 -b .docinst %patch1 -p1 -b .rpath64 -%patch2 -p1 -b .close_on_exec -%patch3 -p1 -b .lsb_header + +# Convert to utf-8 +for file in ChangeLog; do + iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \ + touch -r $file $file.new && \ + mv $file.new $file +done + %build %configure \ --disable-dependency-tracking \ --disable-static \ - --enable-confdir=%{_sysconfdir} \ --enable-ipcdir=%{_localstatedir}/run \ --enable-usbdropdir=%{_libdir}/pcsc/drivers make %{?_smp_mflags} @@ -83,19 +86,15 @@ rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT install -dm 755 $RPM_BUILD_ROOT%{_libdir}/pcsc/drivers +install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d -install -Dpm 755 etc/pcscd.init $RPM_BUILD_ROOT%{_initrddir}/pcscd +install -Dpm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/pcscd -cat < $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d/README -All *.conf files in this directory are merged into %{_sysconfdir}/reader.conf -by %{_sbindir}/update-reader.conf. -EOF +# remove setuid bit +chmod 0755 $RPM_BUILD_ROOT%{_sbindir}/pcscd rm $RPM_BUILD_ROOT%{_libdir}/*.la -rm $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d/reader.conf -touch $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf - %clean rm -rf $RPM_BUILD_ROOT @@ -124,15 +123,11 @@ fi %defattr(-,root,root,-) %doc AUTHORS ChangeLog* COPYING DRIVERS HELP README SECURITY TODO %dir %{_sysconfdir}/reader.conf.d/ -%doc %{_sysconfdir}/reader.conf.d/README -%ghost %config(noreplace) %{_sysconfdir}/reader.conf %{_initrddir}/pcscd %{_sbindir}/pcscd -%{_sbindir}/update-reader.conf %{_libdir}/pcsc/ %{_mandir}/man5/reader.conf.5* %{_mandir}/man8/pcscd.8* -%{_mandir}/man8/update-reader.conf.8* %files libs %defattr(-,root,root,-) @@ -150,6 +145,9 @@ fi %changelog +* Fri Jun 18 2010 Kalev Lember - 1.6.1-1 +- Update to 1.6.1 + * Tue Apr 13 2010 Kalev Lember - 1.5.5-4 - Fix init script start / stop priorities (#580322) - Don't require pkgconfig as the dep is now automatically generated by rpm diff --git a/pcscd.init b/pcscd.init new file mode 100755 index 0000000..b8805db --- /dev/null +++ b/pcscd.init @@ -0,0 +1,84 @@ +#!/bin/sh +# +# pcscd Starts the pcscd Daemon +# +# chkconfig: 2345 27 73 +# 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 haldaemon +# Required-Stop: $local_fs $remote_fs $syslog haldaemon +# Should-Start: openct +# Should-Stop: 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. +### END INIT INFO +# +# Note! pcscd should be started after pcmcia, and shut down before it +# for smooth experience with PCMCIA readers. + +. /etc/init.d/functions + +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): " + /usr/sbin/update-reader.conf && daemon $prog $PCSCD_OPTIONS + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} +stop() { + echo -n $"Stopping PC/SC smart card daemon ($prog): " + killproc $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} +restart() { + stop + start +} + + +case "$1" in + start|stop|restart) + $1 + ;; + reload|force-reload) + restart + ;; + status) + status $prog + ;; + condrestart|try-restart) + [ ! -f $lockfile ] || restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}" + exit 2 +esac diff --git a/sources b/sources index 5441b93..69aee66 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6707e967fc8bb398a5d1b1089d4dff63 pcsc-lite-1.5.5.tar.bz2 +ed023be61feebfafce12e86075912695 pcsc-lite-1.6.1.tar.bz2