Blame SOURCES/0039-intg-Remove-bashism-from-intgcheck-prepare.patch

bb7cd1
From c49fc8fded9ed87e37189bf877f04ef462974420 Mon Sep 17 00:00:00 2001
bb7cd1
From: Lukas Slebodnik <lslebodn@redhat.com>
bb7cd1
Date: Mon, 27 Mar 2017 14:44:29 +0200
bb7cd1
Subject: [PATCH 39/54] intg: Remove bashism from intgcheck-prepare
bb7cd1
bb7cd1
env variable UID is not defined in all shells (eg. dash)
bb7cd1
We also need to move invocation of "id -u" before nss_wraper
bb7cd1
is enabled otherwise we would get root instead of real user.
bb7cd1
bb7cd1
=================================== FAILURES ===================================
bb7cd1
________________________ test_kcm_mem_init_list_destroy ________________________
bb7cd1
Traceback (most recent call last):
bb7cd1
  File "/home/build/sssd/src/tests/intg/test_kcm.py", line 198, in test_kcm_mem_init_list_destroy
bb7cd1
    kcm_init_list_destroy(testenv)
bb7cd1
  File "/home/build/sssd/src/tests/intg/test_kcm.py", line 183, in kcm_init_list_destroy
bb7cd1
    exp_ccname = testenv.ccname()
bb7cd1
  File "/home/build/sssd/src/tests/intg/test_kcm.py", line 45, in ccname
bb7cd1
    my_uid = self.my_uid()
bb7cd1
  File "/home/build/sssd/src/tests/intg/test_kcm.py", line 41, in my_uid
bb7cd1
    return int(s_myuid)
bb7cd1
ValueError: invalid literal for int() with base 10: ''
bb7cd1
bb7cd1
And we already use different approach in top level Makefile.am
bb7cd1
3488)      $(INTGCHECK_CONFIGURE_FLAGS) \
bb7cd1
3489)      CFLAGS="$$CFLAGS $(AM_CFLAGS) -DKCM_PEER_UID=$$(id -u)"; \
bb7cd1
3490)  $(MAKE) $(AM_MAKEFLAGS) ; \
bb7cd1
bb7cd1
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
bb7cd1
---
bb7cd1
 src/tests/intg/Makefile.am | 2 +-
bb7cd1
 1 file changed, 1 insertion(+), 1 deletion(-)
bb7cd1
bb7cd1
diff --git a/src/tests/intg/Makefile.am b/src/tests/intg/Makefile.am
bb7cd1
index 8526beace09b15c99aa27ac98d5038d1980f6a71..8566106e9017a8d3c9e7a3898a3a886e2966e346 100644
bb7cd1
--- a/src/tests/intg/Makefile.am
bb7cd1
+++ b/src/tests/intg/Makefile.am
bb7cd1
@@ -76,6 +76,7 @@ intgcheck-installed: config.py passwd group
bb7cd1
 	PATH="$(abs_builddir):$(abs_srcdir):$$PATH" \
bb7cd1
 	PYTHONPATH="$(abs_builddir):$(abs_srcdir)" \
bb7cd1
 	LDB_MODULES_PATH="$(DESTDIR)$(ldblibdir)" \
bb7cd1
+	NON_WRAPPED_UID=$$(id -u) \
bb7cd1
 	LD_PRELOAD="$$nss_wrapper $$uid_wrapper" \
bb7cd1
 	NSS_WRAPPER_PASSWD="$(abs_builddir)/passwd" \
bb7cd1
 	NSS_WRAPPER_GROUP="$(abs_builddir)/group" \
bb7cd1
@@ -83,6 +84,5 @@ intgcheck-installed: config.py passwd group
bb7cd1
 	NSS_WRAPPER_MODULE_FN_PREFIX="sss" \
bb7cd1
 	UID_WRAPPER=1 \
bb7cd1
 	UID_WRAPPER_ROOT=1 \
bb7cd1
-	NON_WRAPPED_UID=$$(echo $$UID) \
bb7cd1
 	    fakeroot $(PYTHON2) $(PYTEST) -v --tb=native $(INTGCHECK_PYTEST_ARGS) .
bb7cd1
 	rm -f $(DESTDIR)$(logpath)/*
bb7cd1
-- 
bb7cd1
2.9.3
bb7cd1