|
|
796acd |
%bcond_without gnutls
|
|
|
796acd |
|
|
|
796acd |
%global gitdate 20210607
|
|
|
796acd |
%global gitcommit ea627b3b5e847f9141fcf25de0c03004d35fb375
|
|
|
796acd |
%global gitshortcommit %(c=%{gitcommit}; echo ${c:0:7})
|
|
|
796acd |
|
|
|
796acd |
# Macros needed by SELinux
|
|
|
796acd |
%global selinuxtype targeted
|
|
|
796acd |
%global moduletype contrib
|
|
|
796acd |
%global modulename swtpm
|
|
|
796acd |
|
|
|
796acd |
Summary: TPM Emulator
|
|
|
796acd |
Name: swtpm
|
|
|
796acd |
Version: 0.6.0
|
|
|
796acd |
Release: 3.%{gitdate}git%{gitshortcommit}%{?dist}
|
|
|
796acd |
License: BSD
|
|
|
796acd |
Url: http://github.com/stefanberger/swtpm
|
|
|
796acd |
Source0: %{url}/archive/%{gitcommit}/%{name}-%{gitshortcommit}.tar.gz
|
|
|
796acd |
Patch0001: 0001-build-sys-carry-configure-time-CFLAGS.patch
|
|
|
796acd |
|
|
|
796acd |
BuildRequires: make
|
|
|
796acd |
BuildRequires: git-core
|
|
|
796acd |
BuildRequires: automake
|
|
|
796acd |
BuildRequires: autoconf
|
|
|
796acd |
BuildRequires: libtool
|
|
|
796acd |
BuildRequires: libtpms-devel >= 0.6.0
|
|
|
796acd |
BuildRequires: expect
|
|
|
796acd |
BuildRequires: net-tools
|
|
|
796acd |
BuildRequires: openssl-devel
|
|
|
796acd |
BuildRequires: socat
|
|
|
796acd |
BuildRequires: softhsm
|
|
|
796acd |
BuildRequires: json-glib-devel
|
|
|
796acd |
%if %{with gnutls}
|
|
|
796acd |
BuildRequires: gnutls >= 3.4.0
|
|
|
796acd |
BuildRequires: gnutls-devel
|
|
|
796acd |
BuildRequires: gnutls-utils
|
|
|
796acd |
BuildRequires: libtasn1-devel
|
|
|
796acd |
BuildRequires: libtasn1
|
|
|
796acd |
%endif
|
|
|
796acd |
BuildRequires: selinux-policy-devel
|
|
|
796acd |
BuildRequires: gcc
|
|
|
796acd |
BuildRequires: libseccomp-devel
|
|
|
796acd |
BuildRequires: tpm2-pkcs11 tpm2-pkcs11-tools tpm2-tools tpm2-abrmd
|
|
|
796acd |
|
|
|
796acd |
Requires: %{name}-libs = %{version}-%{release}
|
|
|
796acd |
Requires: libtpms >= 0.6.0
|
|
|
796acd |
%{?selinux_requires}
|
|
|
796acd |
|
|
|
796acd |
%description
|
|
|
796acd |
TPM emulator built on libtpms providing TPM functionality for QEMU VMs
|
|
|
796acd |
|
|
|
796acd |
%package libs
|
|
|
796acd |
Summary: Private libraries for swtpm TPM emulators
|
|
|
796acd |
License: BSD
|
|
|
796acd |
|
|
|
796acd |
%description libs
|
|
|
796acd |
A private library with callback functions for libtpms based swtpm TPM emulator
|
|
|
796acd |
|
|
|
796acd |
%package devel
|
|
|
796acd |
Summary: Include files for the TPM emulator's CUSE interface for usage by clients
|
|
|
796acd |
License: BSD
|
|
|
796acd |
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|
|
796acd |
|
|
|
796acd |
%description devel
|
|
|
796acd |
Include files for the TPM emulator's CUSE interface.
|
|
|
796acd |
|
|
|
796acd |
%package tools
|
|
|
796acd |
Summary: Tools for the TPM emulator
|
|
|
796acd |
License: BSD
|
|
|
796acd |
Requires: swtpm = %{version}-%{release}
|
|
|
796acd |
Requires: bash gnutls-utils
|
|
|
796acd |
|
|
|
796acd |
%description tools
|
|
|
796acd |
Tools for the TPM emulator from the swtpm package
|
|
|
796acd |
|
|
|
796acd |
%package tools-pkcs11
|
|
|
796acd |
Summary: Tools for creating a local CA based on a TPM pkcs11 device
|
|
|
796acd |
License: BSD
|
|
|
796acd |
Requires: swtpm-tools = %{version}-%{release}
|
|
|
796acd |
Requires: tpm2-pkcs11 tpm2-pkcs11-tools tpm2-tools tpm2-abrmd
|
|
|
796acd |
Requires: expect gnutls-utils
|
|
|
796acd |
|
|
|
796acd |
%description tools-pkcs11
|
|
|
796acd |
Tools for creating a local CA based on a pkcs11 device
|
|
|
796acd |
|
|
|
796acd |
%prep
|
|
|
796acd |
%autosetup -S git -n %{name}-%{gitcommit} -p1
|
|
|
796acd |
|
|
|
796acd |
%build
|
|
|
796acd |
|
|
|
796acd |
NOCONFIGURE=1 ./autogen.sh
|
|
|
796acd |
%configure \
|
|
|
796acd |
%if %{with gnutls}
|
|
|
796acd |
--with-gnutls \
|
|
|
796acd |
%endif
|
|
|
796acd |
--without-cuse
|
|
|
796acd |
|
|
|
796acd |
%make_build CFLAGS="-Wno-error=deprecated-declarations -fPIE"
|
|
|
796acd |
|
|
|
796acd |
%check
|
|
|
796acd |
make %{?_smp_mflags} check VERBOSE=1 CFLAGS="-Wno-error=deprecated-declarations -fPIE"
|
|
|
796acd |
|
|
|
796acd |
%install
|
|
|
796acd |
|
|
|
796acd |
%make_install
|
|
|
796acd |
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.{a,la,so}
|
|
|
796acd |
|
|
|
796acd |
%post
|
|
|
796acd |
for pp in /usr/share/selinux/packages/swtpm.pp \
|
|
|
796acd |
/usr/share/selinux/packages/swtpm_svirt.pp; do
|
|
|
796acd |
%selinux_modules_install -s %{selinuxtype} ${pp}
|
|
|
796acd |
done
|
|
|
796acd |
restorecon %{_bindir}/swtpm
|
|
|
796acd |
|
|
|
796acd |
%postun
|
|
|
796acd |
if [ $1 -eq 0 ]; then
|
|
|
796acd |
for p in swtpm swtpm_svirt; do
|
|
|
796acd |
%selinux_modules_uninstall -s %{selinuxtype} $p
|
|
|
796acd |
done
|
|
|
796acd |
fi
|
|
|
796acd |
|
|
|
796acd |
%posttrans
|
|
|
796acd |
%selinux_relabel_post -s %{selinuxtype}
|
|
|
796acd |
|
|
|
796acd |
%ldconfig_post libs
|
|
|
796acd |
%ldconfig_postun libs
|
|
|
796acd |
|
|
|
796acd |
%files
|
|
|
796acd |
%license LICENSE
|
|
|
796acd |
%doc README
|
|
|
796acd |
%{_bindir}/swtpm
|
|
|
796acd |
%{_mandir}/man8/swtpm.8*
|
|
|
796acd |
%{_datadir}/selinux/packages/swtpm.pp
|
|
|
796acd |
%{_datadir}/selinux/packages/swtpm_svirt.pp
|
|
|
796acd |
|
|
|
796acd |
%files libs
|
|
|
796acd |
%license LICENSE
|
|
|
796acd |
%doc README
|
|
|
796acd |
|
|
|
796acd |
%dir %{_libdir}/%{name}
|
|
|
796acd |
%{_libdir}/%{name}/libswtpm_libtpms.so.0
|
|
|
796acd |
%{_libdir}/%{name}/libswtpm_libtpms.so.0.0.0
|
|
|
796acd |
|
|
|
796acd |
%files devel
|
|
|
796acd |
%dir %{_includedir}/%{name}
|
|
|
796acd |
%{_includedir}/%{name}/*.h
|
|
|
796acd |
%{_mandir}/man3/swtpm_ioctls.3*
|
|
|
796acd |
|
|
|
796acd |
%files tools
|
|
|
796acd |
%doc README
|
|
|
796acd |
%{_bindir}/swtpm_bios
|
|
|
796acd |
%if %{with gnutls}
|
|
|
796acd |
%{_bindir}/swtpm_cert
|
|
|
796acd |
%endif
|
|
|
796acd |
%{_bindir}/swtpm_setup
|
|
|
796acd |
%{_bindir}/swtpm_ioctl
|
|
|
796acd |
%{_mandir}/man8/swtpm_bios.8*
|
|
|
796acd |
%{_mandir}/man8/swtpm_cert.8*
|
|
|
796acd |
%{_mandir}/man8/swtpm_ioctl.8*
|
|
|
796acd |
%{_mandir}/man8/swtpm-localca.conf.8*
|
|
|
796acd |
%{_mandir}/man8/swtpm-localca.options.8*
|
|
|
796acd |
%{_mandir}/man8/swtpm-localca.8*
|
|
|
796acd |
%{_mandir}/man8/swtpm_setup.8*
|
|
|
796acd |
%{_mandir}/man8/swtpm_setup.conf.8*
|
|
|
796acd |
%{_mandir}/man8/swtpm_setup.sh.8*
|
|
|
796acd |
%config(noreplace) %{_sysconfdir}/swtpm_setup.conf
|
|
|
796acd |
%config(noreplace) %{_sysconfdir}/swtpm-localca.options
|
|
|
796acd |
%config(noreplace) %{_sysconfdir}/swtpm-localca.conf
|
|
|
796acd |
%dir %{_datadir}/swtpm
|
|
|
796acd |
%{_datadir}/swtpm/swtpm-localca
|
|
|
796acd |
%{_datadir}/swtpm/swtpm-create-user-config-files
|
|
|
796acd |
%attr( 750, tss, root) %{_localstatedir}/lib/swtpm-localca
|
|
|
796acd |
|
|
|
796acd |
%files tools-pkcs11
|
|
|
796acd |
%{_mandir}/man8/swtpm-create-tpmca.8*
|
|
|
796acd |
%{_datadir}/swtpm/swtpm-create-tpmca
|
|
|
796acd |
|
|
|
796acd |
%changelog
|
|
|
796acd |
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 0.6.0-3.20210607gitea627b3
|
|
|
796acd |
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
796acd |
Related: rhbz#1991688
|
|
|
796acd |
|
|
|
796acd |
* Mon Jul 12 2021 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.6.0-2.20210607gitea627b3
|
|
|
796acd |
- rebuilt with AM_* flags patch
|
|
|
796acd |
|
|
|
796acd |
* Wed Jun 16 2021 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.6.0-1.20210607gitea627b3
|
|
|
796acd |
- new version
|
|
|
796acd |
- Fixes: rhbz#1972785
|
|
|
796acd |
|
|
|
796acd |
* Wed Jun 16 2021 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.5.2-7.20201226gite59c0c1
|
|
|
796acd |
- Removed trouser dependency (used for vTPM 1.2, unsupported)
|
|
|
796acd |
- Fixes: rhbz#1967919
|
|
|
796acd |
|
|
|
796acd |
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.5.2-6.20201226gite59c0c1
|
|
|
796acd |
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
|
|
796acd |
Related: rhbz#1971065
|
|
|
796acd |
|
|
|
796acd |
* Tue May 18 2021 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.5.2-5.20201226gite59c0c1
|
|
|
796acd |
- Add -Wno-error=deprecated-declarations to fix build with OpenSSL 3.0.
|
|
|
796acd |
- Fixes: rhbz#1958033
|
|
|
796acd |
|
|
|
796acd |
* Tue Apr 20 2021 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.5.2-4.20201226gite59c0c1
|
|
|
796acd |
- Remove unnecessary twisted dependency.
|
|
|
796acd |
- Fixes: rhbz#1935825
|
|
|
796acd |
|
|
|
796acd |
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.5.2-3.20201226gite59c0c1
|
|
|
796acd |
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
796acd |
|
|
|
796acd |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-2.20201226gite59c0c1
|
|
|
796acd |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
796acd |
|
|
|
796acd |
* Sat Dec 26 2020 Stefan Berger <stefanb@linux.ibm.com> - 0.5.2-1.20201226gite59c0c1a
|
|
|
796acd |
- Bugfixes for stable release
|
|
|
796acd |
|
|
|
796acd |
* Mon Dec 07 2020 Jeff Law <law@redhat.com> - 0.5.1-3.20201117git96f5a04c
|
|
|
796acd |
- Avoid diagnostic from gcc-11
|
|
|
796acd |
|
|
|
796acd |
* Fri Nov 13 2020 Stefan Berger <stefanb@linux.ibm.com> - 0.5.1-2.20201117git96f5a04c
|
|
|
796acd |
- Another build of v0.5.1 after more fixes
|
|
|
796acd |
|
|
|
796acd |
* Fri Nov 13 2020 Stefan Berger <stefanb@linux.ibm.com> - 0.5.1-1.20201007git390f5bd4
|
|
|
796acd |
- Update to v0.5.1 addressing potential symlink attack issue (CVE-2020-28407)
|
|
|
796acd |
|
|
|
796acd |
* Wed Oct 7 2020 Stefan Berger <stefanb@linux.ibm.com> - 0.5.0-1.20201007gitb931e109
|
|
|
796acd |
- Update to v0.5.0 release
|
|
|
796acd |
|
|
|
796acd |
* Fri Aug 28 2020 Stefan Berger <stefanb@linux.ibm.com> - 0.4.0-1.20200828git0c238a2
|
|
|
796acd |
- Update to v0.4.0 release
|
|
|
796acd |
|
|
|
796acd |
* Thu Aug 27 2020 Stefan Berger <stefanb@linux.ibm.com> - 0.3.4-2.20200711git80f0418
|
|
|
796acd |
- Disable pkcs11 related test case running into GnuTLS locking bug
|
|
|
796acd |
|
|
|
796acd |
* Tue Aug 11 2020 Stefan Berger <stefanb@linux.ibm.com> - 0.3.4-1.20200711git80f0418
|
|
|
796acd |
- Update to v0.3.4 release
|
|
|
796acd |
|
|
|
796acd |
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-3.20200218git74ae43b
|
|
|
796acd |
- Second attempt - Rebuilt for
|
|
|
796acd |
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
796acd |
|
|
|
796acd |
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-2.20200218git74ae43b
|
|
|
796acd |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
796acd |
|
|
|
796acd |
* Mon Feb 24 2020 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.3.0-1.20200218git74ae43b
|
|
|
796acd |
- Update to v0.3.0 release
|
|
|
796acd |
|
|
|
796acd |
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-7.20191115git8dae4b3
|
|
|
796acd |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
796acd |
|
|
|
796acd |
* Fri Nov 15 2019 Stefan Berger <stefanb@linux.ibm.com> - 0.2.0-6.20191018git8dae4b3
|
|
|
796acd |
- follow stable-0.2.0 branch with fix of GnuTLS API call to get subject key ID
|
|
|
796acd |
|
|
|
796acd |
* Fri Oct 18 2019 Stefan Berger <stefanb@linux.ibm.com> - 0.2.0-5.20191018git9227cf4
|
|
|
796acd |
- follow stable-0.2.0 branch with swtpm_cert OID bugfix for TPM 2
|
|
|
796acd |
|
|
|
796acd |
* Tue Aug 13 2019 Stefan Berger <stefanb@linux.ibm.com> - 0.2.0-4.20190801git13536aa
|
|
|
796acd |
- run 'restorecon' on swtpm in post to get SELinux label on first install
|
|
|
796acd |
|
|
|
796acd |
* Thu Aug 01 2019 Stefan Berger <stefanb@linux.ibm.com> - 0.2.0-3.20190801git13536aa
|
|
|
796acd |
- follow stable-0.2.0 branch with some bug fixes
|
|
|
796acd |
|
|
|
796acd |
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-2.20190723gitf0b4137
|
|
|
796acd |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
796acd |
|
|
|
796acd |
* Tue Jul 23 2019 Stefan Berger <stefanb@linux.ibm.com> - 0.2.0-1.20190723gitf0b4137
|
|
|
796acd |
- follow stable-0.2.0 branch with some bug fixes
|
|
|
796acd |
|
|
|
796acd |
* Tue Jul 16 2019 Stefan Berger <stefanb@linux.ibm.com> - 0.2.0-0.20190716git374b669
|
|
|
796acd |
- (tentative) v0.2.0 release of swtpm
|
|
|
796acd |
|
|
|
796acd |
* Thu Apr 25 2019 Stefan Berger <stefanb@linux.ibm.com> - 0.1.0-0.20190425gitca85606
|
|
|
796acd |
- pick up bug fixes
|
|
|
796acd |
|
|
|
796acd |
* Mon Feb 04 2019 Stefan Berger <stefanb@linux.ibm.com> - 0.1.0-0.20190204git2c25d13.1
|
|
|
796acd |
- v0.1.0 release of swtpm
|
|
|
796acd |
|
|
|
796acd |
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-0.20181212git8b9484a.1
|
|
|
796acd |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
796acd |
|
|
|
796acd |
* Wed Dec 12 2018 Stefan Berger <stefanb@linux.ibm.com> - 0.1.0-0.20181212git8b9484a
|
|
|
796acd |
- Follow improvements in swtpm repo primarily related to fixes for 'ubsan'
|
|
|
796acd |
|
|
|
796acd |
* Tue Nov 06 2018 Stefan Berger <stefanb@linux.ibm.com> - 0.1.0-0.20181106git05d8160
|
|
|
796acd |
- Follow improvements in swtpm repo
|
|
|
796acd |
- Remove ownership change of swtpm_setup.sh; have root own the file as required
|
|
|
796acd |
|
|
|
796acd |
* Wed Oct 31 2018 Stefan Berger <stefanb@linux.ibm.com> - 0.1.0-0.20181031gitc782a85
|
|
|
796acd |
- Follow improvements and fixes in swtpm
|
|
|
796acd |
|
|
|
796acd |
* Tue Oct 02 2018 Stefan Berger <stefanb@linux.vnet.ibm.com> - 0.1.0-0.20181002git0143c41
|
|
|
796acd |
- Fixes to SELinux policy
|
|
|
796acd |
- Improvements on various other parts
|
|
|
796acd |
* Tue Sep 25 2018 Stefan Berger <stefanb@linux.vnet.ibm.com> - 0.1.0-0.20180924gitce13edf
|
|
|
796acd |
- Initial Fedora build
|
|
|
796acd |
* Mon Sep 17 2018 Stefan Berger <stefanb@linux.vnet.ibm.com> - 0.1.0-0.20180918git67d7ea3
|
|
|
796acd |
- Created initial version of rpm spec files
|
|
|
796acd |
- Version is now 0.1.0
|
|
|
796acd |
- Bugzilla for this spec: https://bugzilla.redhat.com/show_bug.cgi?id=1611829
|