Arjun Shankar b96753c
Short description: Adjust CS_PATH and the test container layout.
Carlos O'Donell 0e17ea2
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Carlos O'Donell 0e17ea2
Origin: PATCH
Carlos O'Donell 0e17ea2
Upstream status: not-needed
Carlos O'Donell 0e17ea2
Arjun Shankar b96753c
In Fedora we should return only /usr/bin as CS_PATH because /bin is just
Arjun Shankar b96753c
a symlink to /usr/bin after MoveToUsr transition (which glibc has not
Arjun Shankar b96753c
really completed).
Carlos O'Donell 0e17ea2
Arjun Shankar b96753c
We also create /{bin,lib,lib64,sbin} in the test container as symbolic
Arjun Shankar b96753c
links.  This brings the test container in line with Fedora's filesystem
Arjun Shankar b96753c
layout and avoids some test failures.  For example, because Fedora's
Arjun Shankar b96753c
CS_PATH is /usr/bin, tst-vfork3 will try to execute /usr/bin/echo in the
Arjun Shankar b96753c
container.  Without this change the container installs `echo' in /bin
Arjun Shankar b96753c
not /usr/bin, causing the test to fail.
Arjun Shankar b96753c
Arjun Shankar b96753c
diff --git a/Makefile b/Makefile
Arjun Shankar b96753c
index a49870d3d1e636a9..feb2599203b10098 100644
Arjun Shankar b96753c
--- a/Makefile
Arjun Shankar b96753c
+++ b/Makefile
Arjun Shankar b96753c
@@ -598,9 +598,13 @@ $(tests-container) $(addsuffix /tests,$(subdirs)) : \
Arjun Shankar b96753c
 $(objpfx)testroot.pristine/install.stamp :
Arjun Shankar b96753c
 	test -d $(objpfx)testroot.pristine || \
Arjun Shankar b96753c
 	  mkdir $(objpfx)testroot.pristine
Arjun Shankar b96753c
-	# We need a working /bin/sh for some of the tests.
Arjun Shankar b96753c
-	test -d $(objpfx)testroot.pristine/bin || \
Arjun Shankar b96753c
-	  mkdir $(objpfx)testroot.pristine/bin
Arjun Shankar b96753c
+	# Set up symlinks to directories whose contents got moved to /usr
Arjun Shankar b96753c
+	for moved in bin lib lib64 sbin; do \
Arjun Shankar b96753c
+		test -d $(objpfx)testroot.pristine/usr/$$moved || \
Arjun Shankar b96753c
+		  mkdir -p $(objpfx)testroot.pristine/usr/$$moved ;\
Arjun Shankar b96753c
+		test -e $(objpfx)testroot.pristine/$$moved || \
Arjun Shankar b96753c
+		  ln -s usr/$$moved $(objpfx)testroot.pristine/$$moved ;\
Arjun Shankar b96753c
+	done
Arjun Shankar b96753c
 	# We need the compiled locale dir for localedef tests.
Arjun Shankar b96753c
 	test -d $(objpfx)testroot.pristine/$(complocaledir) || \
Arjun Shankar b96753c
 	  mkdir -p $(objpfx)testroot.pristine/$(complocaledir)
Arjun Shankar b96753c
diff --git a/sysdeps/unix/confstr.h b/sysdeps/unix/confstr.h
Arjun Shankar b96753c
index 15859c3b2759878e..9b63b7f8069866fd 100644
Arjun Shankar b96753c
--- a/sysdeps/unix/confstr.h
Arjun Shankar b96753c
+++ b/sysdeps/unix/confstr.h
Siddhesh Poyarekar b80bba4
@@ -1 +1 @@
Siddhesh Poyarekar b80bba4
-#define	CS_PATH	"/bin:/usr/bin"
Siddhesh Poyarekar b80bba4
+#define	CS_PATH	"/usr/bin"