Blame SPECS/openssl-pkcs11.spec

4daba6
Version: 0.4.10
61e0f4
Release: 2%{?dist}
61e0f4
61e0f4
# Define the directory where the OpenSSL engines are installed
61e0f4
%global enginesdir %{_libdir}/engines-1.1
61e0f4
61e0f4
Name:           openssl-pkcs11
61e0f4
Summary:        A PKCS#11 engine for use with OpenSSL
61e0f4
# The source code is LGPLv2+ except eng_back.c and eng_parse.c which are BSD
61e0f4
License:        LGPLv2+ and BSD
61e0f4
URL:            https://github.com/OpenSC/libp11
61e0f4
Source0:        https://github.com/OpenSC/libp11/releases/download/libp11-%{version}/libp11-%{version}.tar.gz
61e0f4
4daba6
Patch0:         openssl-pkcs11-0.4.10-small-bug-fixes.patch
4daba6
Patch1:         openssl-pkcs11-0.4.10-search-objects-in-all-matching-tokens.patch
4daba6
Patch2:         openssl-pkcs11-0.4.10-set-rsa-fips-method-flag.patch
61e0f4
61e0f4
BuildRequires:  autoconf automake libtool
61e0f4
BuildRequires:  openssl-devel
4daba6
BuildRequires:  openssl >= 1.0.2
61e0f4
BuildRequires:  pkgconfig
61e0f4
BuildRequires:  pkgconfig(p11-kit-1)
61e0f4
# Needed for testsuite
61e0f4
BuildRequires:  softhsm opensc procps-ng
61e0f4
61e0f4
%if 0%{?fedora}
61e0f4
BuildRequires:  doxygen
61e0f4
%endif
61e0f4
61e0f4
Requires:       p11-kit-trust
61e0f4
Requires:       openssl >= 1.0.2
61e0f4
61e0f4
# Package renamed from libp11 to openssl-pkcs11 in release 0.4.7-4
61e0f4
Provides:       libp11%{?_isa} = %{version}-%{release}
61e0f4
Obsoletes:      libp11 < 0.4.7-4
61e0f4
# The engine_pkcs11 subpackage is also provided 
61e0f4
Provides:       engine_pkcs11%{?_isa} = %{version}-%{release}
61e0f4
Obsoletes:      engine_pkcs11 < 0.4.7-4
61e0f4
61e0f4
%if 0%{?fedora}
61e0f4
# The libp11-devel subpackage was removed in libp11-0.4.7-1, but not obsoleted
61e0f4
# This Obsoletes prevents the conflict in updates by removing old libp11-devel
61e0f4
Obsoletes:      libp11-devel < 0.4.7-4
61e0f4
%endif
61e0f4
61e0f4
%description -n openssl-pkcs11
61e0f4
openssl-pkcs11 enables hardware security module (HSM), and smart card support in
61e0f4
OpenSSL applications. More precisely, it is an OpenSSL engine which makes
61e0f4
registered PKCS#11 modules available for OpenSSL applications. The engine is
61e0f4
optional and can be loaded by configuration file, command line or through the
61e0f4
OpenSSL ENGINE API.
61e0f4
61e0f4
# The libp11-devel subpackage was reintroduced in libp11-0.4.7-7 for Fedora
61e0f4
%if 0%{?fedora}
61e0f4
%package -n libp11-devel
61e0f4
Summary:        Files for developing with libp11
61e0f4
Requires:       %{name} = %{version}-%{release}
61e0f4
61e0f4
%description -n libp11-devel
61e0f4
The libp11-devel package contains libraries and header files for
61e0f4
developing applications that use libp11.
61e0f4
61e0f4
%endif
61e0f4
61e0f4
%prep
61e0f4
%autosetup -p 1 -n libp11-%{version}
61e0f4
61e0f4
%build
61e0f4
autoreconf -fvi
61e0f4
export CFLAGS="%{optflags}"
61e0f4
%if 0%{?fedora}
61e0f4
%configure --disable-static --enable-api-doc --with-enginesdir=%{enginesdir}
61e0f4
%else
61e0f4
%configure --disable-static --with-enginesdir=%{enginesdir}
61e0f4
%endif
61e0f4
make V=1 %{?_smp_mflags}
61e0f4
61e0f4
%install
61e0f4
mkdir -p %{buildroot}%{enginesdir}
61e0f4
make install DESTDIR=%{buildroot}
61e0f4
61e0f4
# Remove libtool .la files
61e0f4
rm -f %{buildroot}%{_libdir}/*.la
61e0f4
rm -f %{buildroot}%{enginesdir}/*.la
61e0f4
61e0f4
%if ! 0%{?fedora}
61e0f4
## Remove development files
61e0f4
rm -f %{buildroot}%{_libdir}/libp11.so
61e0f4
rm -f %{buildroot}%{_libdir}/pkgconfig/libp11.pc
61e0f4
rm -f %{buildroot}%{_includedir}/*.h
61e0f4
%endif
61e0f4
61e0f4
# Remove documentation automatically installed by make install
61e0f4
rm -rf %{buildroot}%{_docdir}/libp11/
61e0f4
61e0f4
%check
4daba6
make check %{?_smp_mflags} || if [ $? -ne 0 ]; then cat tests/*.log; exit 1; fi;
61e0f4
4daba6
%ldconfig_scriptlets
61e0f4
61e0f4
%files
61e0f4
%license COPYING
61e0f4
%doc NEWS
61e0f4
%{_libdir}/libp11.so.*
61e0f4
%{enginesdir}/*.so
61e0f4
61e0f4
%if 0%{?fedora}
61e0f4
%files -n libp11-devel
61e0f4
%doc examples/ doc/api.out/html/
61e0f4
%{_libdir}/libp11.so
61e0f4
%{_libdir}/pkgconfig/libp11.pc
61e0f4
%{_includedir}/*.h
61e0f4
%endif
61e0f4
61e0f4
%changelog
4daba6
* Thu Nov 28 2019 Anderson Sasaki <ansasaki@redhat.com> - 0.4.10-2
4daba6
- Set RSA_FLAG_FIPS_METHOD for RSA methods (#1777892)
4daba6
4daba6
* Thu Nov 21 2019 Anderson Sasaki <ansasaki@redhat.com> - 0.4.10-1
4daba6
- Update to 0.4.10 (#1745082)
4daba6
- Add BuildRequires for OpenSSL >= 1.0.2, required for testing
4daba6
- Print tests logs if failed during build
4daba6
- Small bug fixes such as removal of unused variable
4daba6
- Search objects in all matching tokens (#1705505)
4daba6
61e0f4
* Tue Sep 18 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.4.8-2
61e0f4
- Require OpenSSL >= 1.0.2
61e0f4
- Fixed missing declaration of ERR_get_CKR_code()
61e0f4
- Add support to use EC keys and tests (#1625338)
61e0f4
- Exposed check_fork() API
61e0f4
- Fixed memory leak of RSA objects in pkcs11_store_key()
61e0f4
- Updated OpenSSL license in eng_front.c
61e0f4
- Fixed build for old C dialects
61e0f4
- Allow engine to use private key without PIN
61e0f4
- Require DEBUG to be defined to print debug messages
61e0f4
- Changed package description
61e0f4
61e0f4
* Mon Aug 06 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.4.8-1
61e0f4
- Update to 0.4.8-1
61e0f4
- RSA key generation on the token
61e0f4
- RSA-OAEP and RSA-PKCS encryption support
61e0f4
- RSA-PSS signature support
61e0f4
- Support for OpenSSL 1.1.1 beta
61e0f4
- Removed support for OpenSSL 0.9.8
61e0f4
- Various bug fixes and enhancements
61e0f4
61e0f4
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-8
61e0f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
61e0f4
61e0f4
* Wed Jun 06 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.4.7-7
61e0f4
- Reintroduce libp11-devel subpackage to Fedora (#1583719)
61e0f4
61e0f4
* Tue Mar 13 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.4.7-6
61e0f4
- Obsolete libp11-devel to fix update
61e0f4
61e0f4
* Tue Mar 06 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.4.7-5
61e0f4
- Fixed broken Obsoletes
61e0f4
61e0f4
* Thu Mar 01 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.4.7-4
61e0f4
- Package renamed from libp11 to openssl-pkcs11