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