diff --git a/.gitignore b/.gitignore index 7735291..3486d68 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /swtpm-390f5bd.tar.gz /swtpm-96f5a04.tar.gz /swtpm-e59c0c1.tar.gz +/swtpm-ea627b3.tar.gz diff --git a/0001-build-sys-leave-CFLAGS-LDFLAGS-for-user-to-be-define.patch b/0001-build-sys-leave-CFLAGS-LDFLAGS-for-user-to-be-define.patch deleted file mode 100644 index 1f3e264..0000000 --- a/0001-build-sys-leave-CFLAGS-LDFLAGS-for-user-to-be-define.patch +++ /dev/null @@ -1,110 +0,0 @@ -From c52b0c85d80c912817a45c49262fb919835ab3b3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= -Date: Tue, 18 May 2021 17:18:55 +0400 -Subject: [PATCH] build-sys: leave CFLAGS/LDFLAGS for user to be defined -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This allows user to set specific flags during compilation, without -overriding configure-time cflags necessary for compilation. - -See also: -https://www.gnu.org/software/automake/manual/html_node/User-Variables.html -https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html - -Signed-off-by: Marc-André Lureau ---- - configure.ac | 9 +++++++-- - src/swtpm/Makefile.am | 9 +++++++++ - 2 files changed, 16 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 45f4324..e550e74 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -535,6 +535,11 @@ if test "$with_seccomp" != "no"; then - [whether to build in seccomp profile (Linux only)]) - fi - -+AM_CFLAGS="$CFLAGS" -+AM_LDFLAGS="$LDFLAGS" -+AC_SUBST([AM_CFLAGS]) -+AC_SUBST([AM_LDFLAGS]) -+ - AC_CONFIG_FILES([Makefile \ - debian/swtpm-tools.postinst \ - dist/swtpm.spec \ -@@ -586,10 +591,10 @@ echo - echo "Version to build : $PACKAGE_VERSION" - echo "Crypto library : $cryptolib" - echo --echo "CFLAGS=$CFLAGS" -+echo "AM_CFLAGS=$AM_CFLAGS" - echo "HARDENING_CFLAGS=$HARDENING_CFLAGS" - echo "HARDENING_LDFLAGS=$HARDENING_LDFLAGS" --echo "LDFLAGS=$LDFLAGS" -+echo "AM_LDFLAGS=$AM_LDFLAGS" - echo "LIBSECCOMP_LIBS=$LIBSECCOMP_LIBS" - echo - echo "TSS_USER=$TSS_USER" -diff --git a/src/swtpm/Makefile.am b/src/swtpm/Makefile.am -index a9f3f25..bc0a3d1 100644 ---- a/src/swtpm/Makefile.am -+++ b/src/swtpm/Makefile.am -@@ -4,6 +4,9 @@ - # For the license, see the COPYING file in the root directory. - # - -+AM_CFLAGS = @AM_CFLAGS@ -+AM_LDFLAGS = @AM_LDFLAGS@ -+ - noinst_HEADERS = \ - capabilities.h \ - common.h \ -@@ -61,11 +64,13 @@ libswtpm_libtpms_la_CFLAGS = \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/include/swtpm \ -+ $(AM_CFLAGS) \ - $(HARDENING_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(LIBSECCOMP_CFLAGS) - - libswtpm_libtpms_la_LDFLAGS = \ -+ $(AM_LDFLAGS) \ - $(HARDENING_LDFLAGS) - - libswtpm_libtpms_la_LIBADD = \ -@@ -95,12 +100,14 @@ swtpm_CFLAGS = \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/include/swtpm \ -+ $(AM_CFLAGS) \ - $(HARDENING_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(LIBFUSE_CFLAGS) \ - -DHAVE_SWTPM_CUSE_MAIN - - swtpm_LDFLAGS = \ -+ $(AM_LDFLAGS) \ - $(HARDENING_LDFLAGS) - - swtpm_LDADD = \ -@@ -118,11 +125,13 @@ swtpm_cuse_SOURCES = \ - swtpm_cuse_CFLAGS = \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include/swtpm \ -+ $(AM_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(LIBFUSE_CFLAGS) \ - $(HARDENING_CFLAGS) - - swtpm_cuse_LDFLAGS = \ -+ $(AM_LDFLAGS) \ - $(HARDENING_LDFLAGS) - - swtpm_cuse_LDADD = \ --- -2.29.0 - diff --git a/sources b/sources index 1bcd186..bfefe18 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (swtpm-e59c0c1.tar.gz) = ba89301c266c6727ff3ca67c1761b67dce052f79d45d9120077812bef42147ad12ad6ac5632bc84404fc21bc53b26b295dd48ce81acaf075ac8a9a094a07483a +SHA512 (swtpm-ea627b3.tar.gz) = 7396eaa295c59cb05e8c0525b34ae2c39dfa49b9f1c1a8086c9d71a907892d9cc083dd5061635e33a56e9c6e3aa93a9c6378f91c788aec56d46e586ef67aaa4a diff --git a/swtpm.spec b/swtpm.spec index aa291e9..0476dc7 100644 --- a/swtpm.spec +++ b/swtpm.spec @@ -1,7 +1,7 @@ %bcond_without gnutls -%global gitdate 20201226 -%global gitcommit e59c0c1a7b4c8d652dbb280fd6126895a7057464 +%global gitdate 20210607 +%global gitcommit ea627b3b5e847f9141fcf25de0c03004d35fb375 %global gitshortcommit %(c=%{gitcommit}; echo ${c:0:7}) # Macros needed by SELinux @@ -11,12 +11,11 @@ Summary: TPM Emulator Name: swtpm -Version: 0.5.2 -Release: 7.%{gitdate}git%{gitshortcommit}%{?dist} +Version: 0.6.0 +Release: 1.%{gitdate}git%{gitshortcommit}%{?dist} License: BSD Url: http://github.com/stefanberger/swtpm Source0: %{url}/archive/%{gitcommit}/%{name}-%{gitshortcommit}.tar.gz -Patch0001: 0001-build-sys-leave-CFLAGS-LDFLAGS-for-user-to-be-define.patch BuildRequires: make BuildRequires: git-core @@ -28,14 +27,10 @@ BuildRequires: expect BuildRequires: net-tools BuildRequires: openssl-devel BuildRequires: socat -BuildRequires: python3 -BuildRequires: python3-devel -BuildRequires: python3-cryptography -BuildRequires: python3-pip -BuildRequires: python3-setuptools BuildRequires: softhsm +BuildRequires: json-glib-devel %if %{with gnutls} -BuildRequires: gnutls >= 3.1.0 +BuildRequires: gnutls >= 3.4.0 BuildRequires: gnutls-devel BuildRequires: gnutls-utils BuildRequires: libtasn1-devel @@ -72,8 +67,7 @@ Include files for the TPM emulator's CUSE interface. Summary: Tools for the TPM emulator License: BSD Requires: swtpm = %{version}-%{release} -Requires: bash gnutls-utils python3 python3-cryptography - +Requires: bash gnutls-utils %description tools Tools for the TPM emulator from the swtpm package @@ -83,7 +77,7 @@ Summary: Tools for creating a local CA based on a TPM pkcs11 device License: BSD Requires: swtpm-tools = %{version}-%{release} Requires: tpm2-pkcs11 tpm2-pkcs11-tools tpm2-tools tpm2-abrmd -Requires: expect gnutls-utils +Requires: expect gnutls-utils %description tools-pkcs11 Tools for creating a local CA based on a pkcs11 device @@ -100,10 +94,10 @@ NOCONFIGURE=1 ./autogen.sh %endif --without-cuse -%make_build CFLAGS="-Wno-error=deprecated-declarations -fPIC" +%make_build CFLAGS="-Wno-error=deprecated-declarations -fPIE" %check -make %{?_smp_mflags} check VERBOSE=1 CFLAGS="-Wno-error=deprecated-declarations -fPIC" +make %{?_smp_mflags} check VERBOSE=1 CFLAGS="-Wno-error=deprecated-declarations -fPIE" %install @@ -174,10 +168,6 @@ fi %dir %{_datadir}/swtpm %{_datadir}/swtpm/swtpm-localca %{_datadir}/swtpm/swtpm-create-user-config-files -%{python3_sitelib}/py_swtpm_setup/* -%{python3_sitelib}/swtpm_setup-*/* -%{python3_sitelib}/py_swtpm_localca/* -%{python3_sitelib}/swtpm_localca-*/* %attr( 750, tss, root) %{_localstatedir}/lib/swtpm-localca %files tools-pkcs11 @@ -185,6 +175,10 @@ fi %{_datadir}/swtpm/swtpm-create-tpmca %changelog +* Wed Jun 16 2021 Marc-André Lureau - 0.6.0-1 +- new version +- Fixes: rhbz#1972785 + * Wed Jun 16 2021 Marc-André Lureau - 0.5.2-7.20201226gite59c0c1 - Removed trouser dependency (used for vTPM 1.2, unsupported) - Fixes: rhbz#1967919