From 4906d9dae90ea47c7b565fa3d60725fda688638c Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Fri, 16 Aug 2019 12:24:27 -0400 Subject: [PATCH] Support building in COPR now that %{copr_username} is gone --- krb5.spec | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/krb5.spec b/krb5.spec index ff8c2e1..c9a28c9 100644 --- a/krb5.spec +++ b/krb5.spec @@ -398,22 +398,19 @@ export SOCKET_WRAPPER_DIR="$PWD/sockets" ; mkdir -p $SOCKET_WRAPPER_DIR export LD_PRELOAD="$PWD/noport.so:libnss_wrapper.so:libsocket_wrapper.so" # ugh. COPR doesn't expose the keyring, so try to cope. -%if 0%{?copr_username:1} -%global keyctl : -%else -%global keyctl keyctl -%endif +KEYCTL=keyctl +keyctl list @u &>/dev/null || KEYCTL=: # Run the test suite. We can't actually run the whole thing in the build # system, but we can at least run more than we used to. The build system may # give us a revoked session keyring, so run affected tests with a new one. make -C src runenv.py : make -C src check TMPDIR=%{_tmppath} -%{keyctl} session - make -C src/lib check TMPDIR=%{_tmppath} OFFLINE=yes +$KEYCTL session - make -C src/lib check TMPDIR=%{_tmppath} OFFLINE=yes make -C src/kdc check TMPDIR=%{_tmppath} -%{keyctl} session - make -C src/appl check TMPDIR=%{_tmppath} +$KEYCTL session - make -C src/appl check TMPDIR=%{_tmppath} make -C src/clients check TMPDIR=%{_tmppath} -%{keyctl} session - make -C src/util check TMPDIR=%{_tmppath} +$KEYCTL session - make -C src/util check TMPDIR=%{_tmppath} %install [ "$RPM_BUILD_ROOT" != '/' ] && rm -rf -- "$RPM_BUILD_ROOT"