From 4f9e6b1bedd2d223bef7113d5f7e68cea48537de Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Sun, 9 Apr 2023 11:45:03 -0400 Subject: [PATCH] spec: silence krb5 pkgconf errors in %krb5_base_version Send stderr of pkgconf to /dev/null rather than printing the following error text while parsing the spec file: Package krb5 was not found in the pkg-config search path. Perhaps you should add the directory containing `krb5.pc' to the PKG_CONFIG_PATH environment variable Package 'krb5', required by 'virtual:world', not found `BuildRequires: pkgconfig(krb5)` ensures this won't happen when running a real build. It simply avoids 4 lines of needless error output when running something like `fedpkg prep`. Reviewed-By: Alexander Bokovoy --- freeipa.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freeipa.spec.in b/freeipa.spec.in index 93f436347..aa69bd246 100755 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -178,7 +178,7 @@ # RHEL 8.2+, F32+ has 3.58 %global nss_version 3.44.0-4 -%define krb5_base_version %(LC_ALL=C /usr/bin/pkgconf --modversion krb5 | grep -Eo '^[^.]+\.[^.]+' || echo %krb5_version) +%define krb5_base_version %(LC_ALL=C /usr/bin/pkgconf --modversion krb5 2>/dev/null | grep -Eo '^[^.]+\.[^.]+' || echo %krb5_version) %global kdcproxy_version 0.4-3 %if 0%{?fedora} >= 33 || 0%{?rhel} >= 9