Accepting request 425763 from home:scarabeus_iv:branches:security:chipcard
- Version update to 1.8.18: * SCardDisconnect(): much faster with SCARD_UNPOWER_CARD * SCardConnect(): Fix a possible duplicated hCard context * Fix compilation on FreeBSD * Fix compilation on Solaris * Some other minor improvements - Obsolete the conditionals for sle11 as it does not build there and ends unresolvable anyway - Remove the presets magic after discussion with standa as new macros actually work around this correctly OBS-URL: https://build.opensuse.org/request/show/425763 OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=123
This commit is contained in:
committed by
Git OBS Bridge
parent
2bb9bfbf94
commit
d01dc459aa
@@ -21,7 +21,7 @@
|
||||
%define USER scard
|
||||
%define GROUP scard
|
||||
Name: pcsc-lite
|
||||
Version: 1.8.17
|
||||
Version: 1.8.18
|
||||
Release: 0
|
||||
Summary: PCSC Smart Cards Library
|
||||
License: BSD-3-Clause
|
||||
@@ -30,9 +30,7 @@ Url: http://pcsclite.alioth.debian.org/
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source1: %{name}.sysconfig
|
||||
Source2: README.SUSE
|
||||
Source3: pre_checkin.sh
|
||||
Source4: baselibs.conf
|
||||
Source5: pcsc-lite-init
|
||||
Source6: pcsc-lite-reader-conf
|
||||
Source7: %{name}-%{version}.tar.bz2.asc
|
||||
Source8: %{name}.keyring
|
||||
@@ -45,21 +43,10 @@ Requires: libpcsclite1 = %{version}
|
||||
Requires(post): %fillup_prereq
|
||||
Requires(pre): pwdutils
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} >= 1320
|
||||
BuildRequires: polkit-devel
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1120
|
||||
BuildRequires: libudev-devel
|
||||
%else
|
||||
BuildRequires: libusb-1_0-devel
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1140
|
||||
BuildRequires: polkit-devel
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%{?systemd_requires}
|
||||
%else
|
||||
Requires(post): %insserv_prereq
|
||||
Requires(post): sysvinit(syslog)
|
||||
%endif
|
||||
|
||||
%description
|
||||
The purpose of PCSC Lite is to provide a Windows(R) SCard interface in
|
||||
@@ -125,23 +112,15 @@ compile plugins for the pcsc-lite package.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
cp -a %{SOURCE1} %{SOURCE2} %{SOURCE5} %{SOURCE6} .
|
||||
cp -a %{SOURCE1} %{SOURCE2} %{SOURCE6} .
|
||||
|
||||
%build
|
||||
%configure\
|
||||
%configure \
|
||||
--disable-silent-rules \
|
||||
--docdir=%{_docdir}/%{name} \
|
||||
--enable-usbdropdir=%{ifddir} \
|
||||
%if 0%{?suse_version} <= 1110
|
||||
--disable-libudev \
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1140
|
||||
--with-systemdsystemunitdir=%{_unitdir} \
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1320
|
||||
--enable-polkit \
|
||||
%else
|
||||
--disable-polkit \
|
||||
%endif
|
||||
--disable-static
|
||||
make %{?_smp_mflags}
|
||||
|
||||
@@ -150,66 +129,28 @@ make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||
mkdir -p %{buildroot}%{ifddir}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/reader.conf.d/
|
||||
sed s:@ifddir@:%{ifddir}: <pcsc-lite-reader-conf >%{buildroot}%{_sysconfdir}/reader.conf.d/reader.conf
|
||||
%if 0%{?suse_version} < 1310
|
||||
install -D -m 755 pcsc-lite-init %{buildroot}%{_initddir}/pcscd
|
||||
ln -sf %{_initddir}/pcscd %{buildroot}%{_sbindir}/rcpcscd
|
||||
%else
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcpcscd
|
||||
%endif
|
||||
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
cp %{name}.sysconfig %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.pcscd
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||
cp -a AUTHORS ChangeLog COPYING DRIVERS HELP NEWS README README.SUSE SECURITY TODO %{buildroot}%{_docdir}/%{name}
|
||||
# Use socket activated pcscd by default.
|
||||
%if 0%{?suse_version} > 1140
|
||||
mkdir -p %{buildroot}%{_libexecdir}/systemd/system-preset
|
||||
echo -e 'enable pcscd.socket\nenable pcscd.service' >%{buildroot}%{_libexecdir}/systemd/system-preset/50-pcscd.preset
|
||||
%endif
|
||||
# Remove useless la files
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
%pre
|
||||
getent group %{GROUP} >/dev/null || groupadd -r %{GROUP}
|
||||
getent passwd %{USER} >/dev/null || useradd -r -g %{GROUP} -s %{_sbindir}/nologin -c "Smart Card Reader" -d %{_localstatedir}/run/pcscd %{USER}
|
||||
%if 0%{?suse_version} > 1140
|
||||
%service_add_pre pcscd.service pcscd.socket
|
||||
# trick: service existed before, but it had no preset before 13.2 and in SLE12. Force %%service_add_post to run preset.
|
||||
if [ $1 -gt 1 ] ; then
|
||||
if ! test -f %{_libexecdir}/systemd/system-preset/50-pcscd.preset ; then
|
||||
echo -n "" >/run/rpm-%{name}-update-pcscd.socket-new-in-upgrade
|
||||
echo -n "" >/run/rpm-%{name}-update-pcscd.service-new-in-upgrade
|
||||
fi
|
||||
fi
|
||||
%endif
|
||||
|
||||
%post
|
||||
%if 0%{?suse_version} > 1140
|
||||
%service_add_post pcscd.service pcscd.socket
|
||||
%else
|
||||
%fillup_and_insserv -y -n pcscd pcscd
|
||||
%endif
|
||||
%fillup_only -n pcscd
|
||||
|
||||
%preun
|
||||
%if 0%{?suse_version} > 1140
|
||||
%service_del_preun pcscd.service pcscd.socket
|
||||
%endif
|
||||
%if 0%{?suse_version} < 1310
|
||||
%stop_on_removal pcscd
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if 0%{?suse_version} > 1140
|
||||
%service_del_postun pcscd.service pcscd.socket
|
||||
# make sure to reload systemd for possible downgrades
|
||||
if [ "$1" = "1" ]; then
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
%if 0%{?suse_version} < 1310
|
||||
%restart_on_update pcscd
|
||||
%insserv_cleanup
|
||||
%endif
|
||||
|
||||
%post -n libpcsclite1 -p /sbin/ldconfig
|
||||
|
||||
@@ -239,18 +180,11 @@ fi
|
||||
%dir %{_sysconfdir}/reader.conf.d
|
||||
%config(noreplace) %{_sysconfdir}/reader.conf.d/reader.conf
|
||||
%{ifddir}
|
||||
%if 0%{?suse_version} > 1140
|
||||
%{_unitdir}/*
|
||||
%{_libexecdir}/systemd/system-preset/
|
||||
%else
|
||||
%{_initddir}/pcscd
|
||||
%endif
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.pcscd
|
||||
# libpcsclite.so should stay in the main package (#732911). Third party packages may need it for dlopen().
|
||||
%{_libdir}/libpcsclite.so
|
||||
%if 0%{?suse_version} >= 1320
|
||||
%{_datadir}/polkit-1/actions/org.debian.pcsc-lite.policy
|
||||
%endif
|
||||
|
||||
%files -n libpcsclite1
|
||||
%defattr(-,root,root)
|
||||
|
Reference in New Issue
Block a user