Specify --with-fips140-module-name and --with-fips140-module-version
Related: #2033220 Signed-off-by: Daiki Ueno <dueno@redhat.com>
This commit is contained in:
parent
8b49674631
commit
1454d59d19
21
gnutls.spec
21
gnutls.spec
@ -1,3 +1,17 @@
|
|||||||
|
%define srpmhash() %{lua:
|
||||||
|
local files = rpm.expand("%_specdir/gnutls.spec")
|
||||||
|
for i, p in ipairs(patches) do
|
||||||
|
files = files.." "..p
|
||||||
|
end
|
||||||
|
for i, p in ipairs(sources) do
|
||||||
|
files = files.." "..p
|
||||||
|
end
|
||||||
|
local sha256sum = assert(io.popen("cat "..files.."| sha256sum"))
|
||||||
|
local hash = sha256sum:read("*a")
|
||||||
|
sha256sum:close()
|
||||||
|
print(string.sub(hash, 0, 16))
|
||||||
|
}
|
||||||
|
|
||||||
Version: 3.7.3
|
Version: 3.7.3
|
||||||
Release: 3%{?dist}
|
Release: 3%{?dist}
|
||||||
Patch1: gnutls-3.6.7-no-now-guile.patch
|
Patch1: gnutls-3.6.7-no-now-guile.patch
|
||||||
@ -185,9 +199,16 @@ GUILD=%{_bindir}/guild2.2
|
|||||||
export GUILD
|
export GUILD
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with fips}
|
||||||
|
eval $(sed -n 's/^\(\(NAME\|VERSION_ID\)=.*\)/OS_\1/p' /etc/os-release)
|
||||||
|
export FIPS_MODULE_NAME="$OS_NAME $OS_VERSION_ID %name"
|
||||||
|
%endif
|
||||||
|
|
||||||
%configure \
|
%configure \
|
||||||
%if %{with fips}
|
%if %{with fips}
|
||||||
--enable-fips140-mode \
|
--enable-fips140-mode \
|
||||||
|
--with-fips140-module-name="$FIPS_MODULE_NAME" \
|
||||||
|
--with-fips140-module-version=%{version}-%{srpmhash} \
|
||||||
%endif
|
%endif
|
||||||
%if %{with gost}
|
%if %{with gost}
|
||||||
--enable-gost \
|
--enable-gost \
|
||||||
|
Loading…
Reference in New Issue
Block a user