Blame SPECS/swtpm.spec

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