From 15da5482f955a6b33b4130c6f362bf85af2f1937 Mon Sep 17 00:00:00 2001 From: Robert Relyea Date: Fri, 6 Mar 2009 00:37:05 +0000 Subject: [PATCH] upgrade to 1.5.2 fix close on exec issue --- .cvsignore | 2 +- import.log | 1 + pcsc-lite-close_on_exec.patch | 17 +++++++++++++++++ pcsc-lite.spec | 16 ++++++++++++---- sources | 2 +- 5 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 pcsc-lite-close_on_exec.patch diff --git a/.cvsignore b/.cvsignore index 5474698..377be5c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pcsc-lite-1.4.102.tar.bz2 +pcsc-lite-1.5.2.tar.bz2 diff --git a/import.log b/import.log index e055ee0..f12631e 100644 --- a/import.log +++ b/import.log @@ -1 +1,2 @@ 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 new file mode 100644 index 0000000..d1ff7e7 --- /dev/null +++ b/pcsc-lite-close_on_exec.patch @@ -0,0 +1,17 @@ +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.spec b/pcsc-lite.spec index 1192318..3dcc159 100644 --- a/pcsc-lite.spec +++ b/pcsc-lite.spec @@ -1,14 +1,16 @@ Name: pcsc-lite -Version: 1.4.102 -Release: 5%{?dist} +Version: 1.5.2 +Release: 1%{?dist} Summary: PC/SC Lite smart card framework and applications +%define upstream_build 2795 Group: System Environment/Daemons License: BSD URL: http://pcsclite.alioth.debian.org/ -Source0: http://alioth.debian.org/download.php/2106/%{name}-%{version}.tar.bz2 +Source0: http://alioth.debian.org/download.php/%{upstream_build}/%{name}-%{version}.tar.bz2 Patch0: %{name}-1.4-docinst.patch Patch1: %{name}-1.4.100-rpath64.patch +Patch2: %{name}-close_on_exec.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -61,6 +63,7 @@ Group: Documentation %setup -q %patch0 -p0 -b .docinst %patch1 -p1 -b .rpath64 +%patch2 -p1 -b .close_on_exec %build %configure \ @@ -122,7 +125,7 @@ fi %doc AUTHORS ChangeLog* COPYING DRIVERS HELP README SECURITY TODO %dir %{_sysconfdir}/reader.conf.d/ %doc %{_sysconfdir}/reader.conf.d/README -%ghost %config %{_sysconfdir}/reader.conf +%ghost %config(noreplace) %{_sysconfdir}/reader.conf %{_initrddir}/pcscd %{_sbindir}/pcscd %{_sbindir}/update-reader.conf @@ -147,6 +150,11 @@ fi %changelog +* Fri Feb 27 2009 Bob Relyea - 1.5.2-1 +- Pick up 1.5.2 +- Add FD_CLOEXEC flag +- make reader.conf a noreplace config file + * Thu Feb 26 2009 Fedora Release Engineering - 1.4.102-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild diff --git a/sources b/sources index 882073b..9dde3a9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b97d3a725ab93662adf09acfbc49efeb pcsc-lite-1.4.102.tar.bz2 +d7d466621bec39354351f09349f6374c pcsc-lite-1.5.2.tar.bz2