Blame SPECS/coolkey.spec

ed074c
# BEGIN COPYRIGHT BLOCK
ed074c
# Copyright (C) 2005 Red Hat, Inc.
ed074c
# All rights reserved.
ed074c
#
ed074c
# This library is free software; you can redistribute it and/or
ed074c
# modify it under the terms of the GNU Lesser General Public
ed074c
# License as published by the Free Software Foundation version
ed074c
# 2.1 of the License.
ed074c
#
ed074c
# This library is distributed in the hope that it will be useful,
ed074c
# but WITHOUT ANY WARRANTY; without even the implied warranty of
ed074c
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
ed074c
# Lesser General Public License for more details.
ed074c
#
ed074c
# You should have received a copy of the GNU Lesser General Public
ed074c
# License along with this library; if not, write to the Free Software
ed074c
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
ed074c
# END COPYRIGHT BLOCK
ed074c
ed074c
%define coolkey_module "CoolKey PKCS #11 Module"
ed074c
%define nssdb %{_sysconfdir}/pki/nssdb
ed074c
ed074c
Name: coolkey
ed074c
Version: 1.1.0
ed074c
Release: 40%{?dist}
ed074c
Summary: CoolKey PKCS #11 module
ed074c
License: LGPLv2
ed074c
URL: https://github.com/dogtagpki/coolkey/tree/redhat
ed074c
Source: coolkey-%{version}.tar.gz
ed074c
Source1: coolkey.module
ed074c
Patch1: coolkey-cache-dir-move.patch
ed074c
Patch2: coolkey-gcc43.patch
ed074c
Patch3: coolkey-latest.patch
ed074c
Patch4: coolkey-simple-bugs.patch
ed074c
Patch5: coolkey-thread-fix.patch
ed074c
Patch6: coolkey-cac.patch
ed074c
Patch7: coolkey-cac-1.patch
ed074c
Patch8: coolkey-pcsc-lite-fix.patch
ed074c
Patch9: coolkey-fix-token-removal-failure.patch
ed074c
Patch10: coolkey-piv-ecc-el7.patch
ed074c
Patch20: coolkey-1.1.0-noapplet.patch
ed074c
Patch21: coolkey-1.1.0-fix-spurious-event.patch
ed074c
Patch22: coolkey-1.1.0-p15.patch
ed074c
Patch23: coolkey-1.1.0-p15-coverity.patch
ed074c
Patch24: coolkey-1.1.0-more-keys.patch
ed074c
Patch25: coolkey-1.1.0-fail-on-bad-mechanisms.patch
ed074c
Patch26: coolkey-1.1.0-max-cpu-bug.patch
ed074c
Patch27: coolkey-1.1.0-rhel7-alt-cac.patch
ed074c
Patch28: coolkey-1.1.0-cardos-5-3.patch
ed074c
Patch29: coolkey-1.1.0-alt-tokens-2.patch
ed074c
ed074c
ed074c
Group: System Environment/Libraries
ed074c
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ed074c
BuildRequires: autoconf
ed074c
BuildRequires: pcsc-lite-devel
ed074c
BuildRequires: zlib-devel
ed074c
BuildRequires: nss-devel
ed074c
BuildRequires: gcc-c++
ed074c
Requires: nss-tools
ed074c
Requires: pcsc-lite 
ed074c
Requires: pcsc-lite-libs
ed074c
Requires: ccid
ed074c
Provides: CoolKey Openkey
ed074c
Obsoletes: CoolKey Openkey
ed074c
# 390 does not have libusb or smartCards
ed074c
ExcludeArch: s390 s390x
ed074c
ed074c
%description
ed074c
Linux Driver support for the CoolKey and CAC products. 
ed074c
ed074c
%package devel
ed074c
Summary: CoolKey Applet libraries
ed074c
Group: System Environment/Libraries
ed074c
Requires: coolkey = %{version}-%{release}
ed074c
ed074c
%description devel
ed074c
Linux Driver support to access the CoolKey applet.
ed074c
ed074c
ed074c
%prep
ed074c
%setup -q
ed074c
%patch1 -b .cache.dir.move
ed074c
%patch2 -b .coolkey-gcc43
ed074c
%patch3 -b .coolkey-latest
ed074c
%patch4 -b .coolkey-simple-bugs
ed074c
%patch5 -b .coolkey-thread-fix
ed074c
%patch6 -b .cac
ed074c
%patch7 -b .cac-1
ed074c
%patch8 -b .reader-state-fix
ed074c
%patch9 -p1 -b .fix-token-removal-failure
ed074c
%patch10 -b .piv-ecc
ed074c
%patch20 -b .noapplet
ed074c
%patch21 -b .fix-spurious
ed074c
%patch22 -b .p15
ed074c
%patch23 -b .p15-coverity
ed074c
%patch24 -b .more-keys
ed074c
%patch25 -b .fail-on-bad-mechanisms
ed074c
%patch26 -b .max-cpu-bug
ed074c
%patch27 -b .alt-cac
ed074c
%patch28 -b .cardos-5-3
ed074c
%patch29 -b .alt-tokens-2
ed074c
ed074c
%build
ed074c
autoconf
ed074c
%configure --with-debug --disable-dependency-tracking --enable-pk11install
ed074c
make %{?_smp_mflags} CFLAGS="$CFLAGS -g -O2 -fno-strict-aliasing $CFLAGS " CXXFLAGS="$CXXFLAGS -g -O2 -fno-strict-aliasing $CFLAGS"
ed074c
ed074c
%install
ed074c
rm -rf $RPM_BUILD_ROOT
ed074c
make install DESTDIR=$RPM_BUILD_ROOT
ed074c
ln -s pkcs11/libcoolkeypk11.so $RPM_BUILD_ROOT/%{_libdir}
ed074c
mkdir -p $RPM_BUILD_ROOT/var/cache/coolkey
ed074c
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/p11-kit/modules/
ed074c
cp %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/p11-kit/modules/
ed074c
ed074c
%clean
ed074c
rm -rf $RPM_BUILD_ROOT
ed074c
ed074c
%post
ed074c
/sbin/ldconfig
ed074c
if [ -x %{_bindir}/pk11install ]; then
ed074c
  isThere=`modutil -rawlist -dbdir dbm:%{nssdb} | grep %{coolkey_module} || echo NO`
ed074c
  if [ "$isThere" == "NO" ]; then
ed074c
      pk11install -l -p %{nssdb} 'name=%{coolkey_module} library=libcoolkeypk11.so' ||:
ed074c
   fi
ed074c
  isThere=`modutil -rawlist -dbdir sql:%{nssdb} | grep %{coolkey_module} || echo NO`
ed074c
  if [ "$isThere" == "NO" ]; then
ed074c
      pk11install -s -p %{nssdb} 'name=%{coolkey_module} library=libcoolkeypk11.so' ||:
ed074c
   fi
ed074c
fi
ed074c
ed074c
ed074c
%postun
ed074c
/sbin/ldconfig
ed074c
if [ $1 -eq 0 ]; then
ed074c
   modutil -delete %{coolkey_module} -dbdir dbm:%{nssdb} -force || :
ed074c
   modutil -delete %{coolkey_module} -dbdir sql:%{nssdb} -force || :
ed074c
fi
ed074c
ed074c
ed074c
%files
ed074c
%defattr(-,root,root,-)
ed074c
%doc ChangeLog LICENSE 
ed074c
%{_bindir}/pk11install
ed074c
%{_libdir}/libcoolkeypk11.so
ed074c
%{_libdir}/pkcs11
ed074c
%{_libdir}/libckyapplet.so.1
ed074c
%{_libdir}/libckyapplet.so.1.0.0
ed074c
%{_datadir}/p11-kit/modules/coolkey.module
ed074c
%attr(1777,root,root) /var/cache/coolkey
ed074c
ed074c
ed074c
%files devel
ed074c
%{_libdir}/libckyapplet.so
ed074c
%{_libdir}/pkgconfig/libckyapplet.pc
ed074c
%{_includedir}/*.h
ed074c
ed074c
ed074c
%changelog
ed074c
* Mon Aug 6 2018 Robert Relyea <rrelyea@redhat.com> - 1.1.0-40
ed074c
- fix regression in token removal created by the cac alt tokens patch.
ed074c
ed074c
* Thu Jun 21 2018 Robert Relyea <rrelyea@redhat.com> - 1.1.0-39
ed074c
- add c++ compiler to the dependencies.
ed074c
- update URL to point to the github for coolkey
ed074c
ed074c
* Fri Apr 20 2018 Robert Relyea <rrelyea@redhat.com> - 1.1.0-38
ed074c
- support cac alt tokens which don't have a cert is slot 0, don't have
ed074c
  a CCC, and uses a ACA.
ed074c
ed074c
* Tue Mar 14 2017 Robert Relyea <rrelyea@redhat.com> - 1.1.0-37
ed074c
- get Cardos 5.3 cards working properly
ed074c
ed074c
* Thu Dec 1 2016 Robert Relyea <rrelyea@redhat.com> - 1.1.0-36
ed074c
- recognize up to 10 cac and PIV certs rather than 3
ed074c
ed074c
* Thu Jun 30 2016 Robert Relyea <rrelyea@redhat.com> - 1.1.0-35
ed074c
- include sleep on unknown reader errors.
ed074c
ed074c
* Mon Jun 13 2016 Robert Relyea <rrelyea@redhat.com> - 1.1.0-34
ed074c
- recognize up to 32 keys and certs in coolkeys. (can go up to 62 with just #define changes)
ed074c
- own our cache file.
ed074c
- verify we are using the correct mechanisms
ed074c
ed074c
* Mon Jul 6 2015 Robert Relyea <rrelyea@redhat.com> - 1.1.0-33
ed074c
- fix more coverity issues in p15 patch
ed074c
ed074c
* Mon Jul 6 2015 Robert Relyea <rrelyea@redhat.com> - 1.1.0-32
ed074c
- fix coverity issues in p15 patch
ed074c
ed074c
* Mon Jul 6 2015 Robert Relyea <rrelyea@redhat.com> - 1.1.0-31
ed074c
- fix requires as identified in rpmdiff
ed074c
ed074c
* Mon Jul 6 2015 Robert Relyea <rrelyea@redhat.com> - 1.1.0-30
ed074c
- Add pk11-kit modules file
ed074c
ed074c
* Mon Jul 6 2015 Robert Relyea <rrelyea@redhat.com> - 1.1.0-29
ed074c
- Add partical support for pkcs15 tokens
ed074c
ed074c
* Fri Sep 26 2014 Robert Relyea <rrelyea@redhat.com> - 1.1.0-28
ed074c
- update coolkey to handle the new error ccid/pcsc-lite returns on reader
ed074c
  removal.
ed074c
ed074c
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.1.0-27
ed074c
- Mass rebuild 2013-12-27
ed074c
ed074c
* Tue Nov 26 2013 Robert Relyea <rrelyea@redhat.com> - 1.1.0-26
ed074c
- delete coolkey from sql db as well as the old one.
ed074c
ed074c
* Wed Nov 6 2013 Robert Relyea <rrelyea@redhat.com> - 1.1.0-25
ed074c
- delete coolkey from sql db as well as the old one.
ed074c
ed074c
* Sun Sep 8 2013 Robert Relyea <rrelyea@redhat.com> - 1.1.0-24
ed074c
- Add ECC and PIV support
ed074c
ed074c
* Wed May 22 2013 Ray Strode <rstrode@redhat.com> 1.1.0-23
ed074c
- Fix token removal issue
ed074c
ed074c
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-22
ed074c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ed074c
ed074c
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-21
ed074c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ed074c
ed074c
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-20
ed074c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ed074c
ed074c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-19
ed074c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
ed074c
ed074c
* Tue Oct 19 2010 Ville Skyttä <ville.skytta@iki.fi> - 1.1.0-18
ed074c
- Own the %%{_libdir}/pkcs11 dir.
ed074c
ed074c
* Wed Sep 8 2010 Robert Relyea <rrelyea@redhat.com> - 1.1.0-17
ed074c
- pscs-lite removed SCARD_READERSTATE_A definition. revert to the prefered
ed074c
  SCARD_READERSTATE
ed074c
ed074c
* Wed Jun 23 2010 Jack Magne <jmagne@redhat.com> - 1.1.0-16
ed074c
- fix possible crash when loading cac certs.
ed074c
ed074c
* Wed Jun 16 2010 Robert Relyea <rrelyea@redhat.com> - 1.1.0-15
ed074c
- better cac support.
ed074c
ed074c
* Mon Feb 22 2010 Robert Relyea <rrelyea@redhat.com> - 1.1.0-14
ed074c
- remove dependency on ifd-egate
ed074c
ed074c
* Tue Jan 5 2010 Robert Relyea <rrelyea@redhat.com> - 1.1.0-13
ed074c
- bump the release number to rebuild
ed074c
ed074c
* Fri Dec 18 2009 Robert Relyea <rrelyea@redhat.com> - 1.1.0-12
ed074c
- Fix threading issue. Coolkey will now work with non-threaded applications 
ed074c
- that don't link with libpthread.
ed074c
ed074c
* Wed Sep 16 2009 Jack magne <jmagne@redhat.com> - 1.1.0-11
ed074c
- Misc bug fixes. Resolves: 485032, #250738, #497758.
ed074c
ed074c
* Fri Sep 11 2009 Jack Magne <jmagne@redhat.com> - 1.1.0-10
ed074c
- Include latest changes for Gemalto 64K and Safenet 330J.
ed074c
ed074c
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-9
ed074c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ed074c
ed074c
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-8
ed074c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
ed074c
ed074c
* Sun Sep 14 2008 Matt Domsch <mdomsch@fedoraproject.org> - 1.1.0-7
ed074c
- BR: nss-devel not mozilla-nss-devel (FTBFS BZ#440753)
ed074c
ed074c
* Wed Feb 13 2008 Jack magne <jmagne@redhat.com>  - 1.1.0-6
ed074c
- Clean up building with gcc 4.3.
ed074c
* Thu Sep 27 2007 Jack Magne <jmagne@redhat.com>  - 1.1.0-5
ed074c
- Include patch for moving the cache directory to a safe location. 
ed074c
- Bug #299481.
ed074c
* Mon Aug 20 2007 Bob Relyea <rrelyea@redhat.com> - 1.1.0-4
ed074c
- Update License description to the new Fedora standard
ed074c
ed074c
* Thu Jun 21 2007 Kai Engert <kengert@redhat.com> - 1.1.0-3.1
ed074c
- rebuild
ed074c
ed074c
* Tue Jun 5 2007 Bob Relyea <rrelyea@redhat.com> - 1.1.0-3
ed074c
- add build requires, bump version number for make tag.
ed074c
ed074c
* Thu May 31 2007 Bob Relyea <rrelyea@redhat.com> - 1.1.0-2
ed074c
- Back out RHEL-4 version of spec from CVS, add pcsc-lite-lib requires.
ed074c
ed074c
* Tue Feb 20 2007 Bob Relyea <rrelyea@redhat.com> - 1.1.0-1
ed074c
- Pick up lates release.
ed074c
ed074c
* Wed Nov 1 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-15
ed074c
- Don't grab the CUID on cac's. Resting the card causes it to
ed074c
- logout of other applications.
ed074c
ed074c
* Wed Nov 1 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-14
ed074c
- Shared memory directory needs to be writeable by all so
ed074c
- coolkey can create caches for any user. (lack of caches
ed074c
- show up in screen savers reactly slowly).
ed074c
ed074c
* Fri Oct 20 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-13
ed074c
- fix login hw race failures
ed074c
ed074c
* Fri Oct 20 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-12
ed074c
- add the dist flag
ed074c
ed074c
* Wed Oct 18 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-11
ed074c
- CAC cards sometimes need to reset before they can get their
ed074c
- initial transaction (problem is noticed on insertion an removal)
ed074c
ed074c
* Tue Oct 17 2006 Jesse Keating <jkeating@redhat.com> - 1.0.1-10
ed074c
- Only run pk11install if the binary is there (multilib fun)
ed074c
ed074c
* Mon Oct 09 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-9
ed074c
- use pk11install which does not require loading the module to install it.
ed074c
ed074c
* Mon Oct 09 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-8
ed074c
- pcscd must be running in order to add coolkey.
ed074c
ed074c
* Wed Oct 4 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-7
ed074c
- silence modutil warnings
ed074c
ed074c
* Fri Sep 29 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-5
ed074c
- install and uninstall coolkey in the system secmod.db
ed074c
ed074c
* Thu Sep 7 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-4
ed074c
- make the coolkey token caches persist over application calls.
ed074c
- make a separate cache for each user.
ed074c
ed074c
* Sun Jul 16 2006 Florian La Roche <laroche@redhat.com> - 1.0.1-2
ed074c
- fix excludearch line
ed074c
ed074c
* Mon Jul 10 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-1
ed074c
- Don't require pthread library in coolkey
ed074c
ed074c
* Mon Jul 10 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.0-2
ed074c
- remove s390 from the build
ed074c
ed074c
* Mon Jun 5 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.0-1
ed074c
- Initial revision for fedora