From 5f4c72ab483c818af392ec14193e46767894128c81d8694b8c5cef3251c60819 Mon Sep 17 00:00:00 2001
From: "P. Janouch"
Date: Mon, 16 May 2016 14:30:25 +0000
Subject: [PATCH 1/3] - make the -hmac package depend on the same version of
the library, fixing bsc#979629 FIPS: system fails to reboot after
installing fips pattern
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libgcrypt?expand=0&rev=81
---
libgcrypt.changes | 7 +++++++
libgcrypt.spec | 5 ++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/libgcrypt.changes b/libgcrypt.changes
index 9de1073..05e34ed 100644
--- a/libgcrypt.changes
+++ b/libgcrypt.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Mon May 16 12:36:14 UTC 2016 - pjanouch@suse.de
+
+- make the -hmac package depend on the same version of the library,
+ fixing bsc#979629 FIPS: system fails to reboot after installing
+ fips pattern
+
-------------------------------------------------------------------
Tue Feb 9 20:51:59 UTC 2016 - astieger@suse.com
diff --git a/libgcrypt.spec b/libgcrypt.spec
index 565f8cf..07a937b 100644
--- a/libgcrypt.spec
+++ b/libgcrypt.spec
@@ -96,6 +96,7 @@ GnuPG (alpha version).
Summary: HMAC checksums for the GNU Crypto Library
License: GPL-2.0+ and LGPL-2.1+
Group: Development/Libraries/C and C++
+Requires: %{libsoname} = %{version}
%description -n %{libsoname}-hmac
Libgcrypt is a general purpose crypto library based on the code used in
@@ -131,7 +132,6 @@ Requires: %{libsoname}-hmac
CAVS testing framework for libgcrypt
%if 0%{?separate_hmac256_binary}
-
%package hmac256
Summary: The GNU Crypto Library
License: GPL-2.0+ and LGPL-2.1+
@@ -180,7 +180,7 @@ understanding of applied cryptography is required to use Libgcrypt.
echo building with build_hmac256 set to %{build_hmac256}
%{?suse_update_config}
autoreconf -fi
-date=$(date -u +%Y-%m-%dT%H:%M+0000 -r %{S:99})
+date=$(date -u +%Y-%m-%dT%H:%M+0000 -r %{SOURCE99})
sed -e "s,BUILD_TIMESTAMP=.*,BUILD_TIMESTAMP=$date," -i configure
export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)"
%configure --with-pic \
@@ -275,7 +275,6 @@ mv %{buildroot}%{_bindir}/drbg_test %{buildroot}%{cavs_dir}
%{_datadir}/aclocal/%{name}.m4
%if 0%{?separate_hmac256_binary}
-
%files hmac256
%defattr(-,root,root)
%endif # %if 0%{?separate_hmac256_binary}
From b7923a28bd45becbefdbe09fc0a2f9907c36cb14dc7f83ea850c80489685cb50 Mon Sep 17 00:00:00 2001
From: "P. Janouch"
Date: Mon, 16 May 2016 14:41:28 +0000
Subject: [PATCH 2/3] - remove conditionals for unsupported distributions
(before 13.2), it would not build anyway because of new dependencies
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libgcrypt?expand=0&rev=82
---
libgcrypt.changes | 6 ++++++
libgcrypt.spec | 20 +-------------------
2 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/libgcrypt.changes b/libgcrypt.changes
index 05e34ed..cca8e9e 100644
--- a/libgcrypt.changes
+++ b/libgcrypt.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Mon May 16 14:37:45 UTC 2016 - pjanouch@suse.de
+
+- remove conditionals for unsupported distributions (before 13.2),
+ it would not build anyway because of new dependencies
+
-------------------------------------------------------------------
Mon May 16 12:36:14 UTC 2016 - pjanouch@suse.de
diff --git a/libgcrypt.spec b/libgcrypt.spec
index 07a937b..9e2b600 100644
--- a/libgcrypt.spec
+++ b/libgcrypt.spec
@@ -70,12 +70,10 @@ Patch32: libgcrypt-fips_run_selftest_at_constructor.patch
Patch33: libgcrypt-fips_ecdsa.patch
Patch34: libgcrypt-1.6.3-aliasing.patch
BuildRequires: automake >= 1.14
+BuildRequires: fipscheck
BuildRequires: libgpg-error-devel >= 1.11
BuildRequires: libtool
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%if 0%{?suse_version} > 1310
-BuildRequires: fipscheck
-%endif
%description
Libgcrypt is a general purpose library of cryptographic building
@@ -156,7 +154,6 @@ understanding of applied cryptography is required to use Libgcrypt.
%patch4 -p1
%patch5 -p1
%patch7 -p1
-%if 0%{?suse_version} > 1310
%patch12 -p1
%patch21 -p1
%patch22 -p1
@@ -172,7 +169,6 @@ understanding of applied cryptography is required to use Libgcrypt.
%patch32 -p1
%patch33 -p1
%patch34 -p1
-%endif
%patch13 -p1
%patch14 -p1
@@ -202,26 +198,14 @@ make %{?_smp_mflags}
#
# this shows up earlier because otherwise the %expand of
# the macro is too late.
-%if 0%{?suse_version} > 1310
%{expand:%%global __os_install_post {%__os_install_post
fipshmac %{buildroot}/%{_bindir}/hmac256
fipshmac %{buildroot}/%{_libdir}/*.so.??
}}
-%else
-%{expand:%%global __os_install_post {%__os_install_post
-
-%{buildroot}/%{_bindir}/hmac256 "What am I, a doctor or a moonshuttle conductor?" \
- < %{buildroot}/%{_bindir}/hmac256 > %{buildroot}/%{_bindir}/.hmac256.hmac
-%{buildroot}/%{_bindir}/hmac256 "What am I, a doctor or a moonshuttle conductor?" \
- < %{buildroot}/%{_libdir}/libgcrypt.so.%{sosuffix} > %{buildroot}/%{_libdir}/.libgcrypt.so.20.hmac
-}}
-%endif
%endif
%check
-%if 0%{?suse_version} > 1310
fipshmac src/.libs/libgcrypt.so.??
-%endif
# Nice idea. however this uses /dev/random, which hangs
# on hardware without random feeds.
# so lets not run it inside OBS
@@ -236,11 +220,9 @@ install -m 0755 -d %{buildroot}%{cavs_dir}
install -m 0755 %{SOURCE5} %{buildroot}%{cavs_dir}
install -m 0755 %{SOURCE6} %{buildroot}%{cavs_dir}
-%if 0%{?suse_version} > 1310
mv %{buildroot}%{_bindir}/fips186_dsa %{buildroot}%{cavs_dir}
mv %{buildroot}%{_bindir}/fipsdrv %{buildroot}%{cavs_dir}
mv %{buildroot}%{_bindir}/drbg_test %{buildroot}%{cavs_dir}
-%endif
%post -n %{libsoname} -p /sbin/ldconfig
From 81354459e3588fa9e287a8ce70b49e0f3fbcb273a14725bca3a64cc72aa01957 Mon Sep 17 00:00:00 2001
From: "P. Janouch"
Date: Mon, 16 May 2016 16:03:22 +0000
Subject: [PATCH 3/3] Fixup, we need the same release as well
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libgcrypt?expand=0&rev=83
---
libgcrypt.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libgcrypt.spec b/libgcrypt.spec
index 9e2b600..925bffa 100644
--- a/libgcrypt.spec
+++ b/libgcrypt.spec
@@ -94,7 +94,7 @@ GnuPG (alpha version).
Summary: HMAC checksums for the GNU Crypto Library
License: GPL-2.0+ and LGPL-2.1+
Group: Development/Libraries/C and C++
-Requires: %{libsoname} = %{version}
+Requires: %{libsoname} = %{version}-%{release}
%description -n %{libsoname}-hmac
Libgcrypt is a general purpose crypto library based on the code used in