076f82
commit b53f0c11de409b04560a70570178d1a9d03d5860
076f82
Author: Florian Weimer <fweimer@redhat.com>
076f82
Date:   Fri Mar 11 08:23:56 2022 +0100
076f82
076f82
    nss: Do not mention NSS test modules in <gnu/lib-names.h>
076f82
    
076f82
    They are not actually installed.  Use the nss_files version instead
076f82
    in nss/Makefile, similar to how __nss_shlib_revision is derived
076f82
    from LIBNSS_FILES_SO.
076f82
    
076f82
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
076f82
    (cherry picked from commit aefc79ab5ad4bb9feea2876720cec70dca7cd8ed)
076f82
076f82
diff --git a/nss/Makefile b/nss/Makefile
076f82
index bccf9f2806c15651..e223243d9d62041c 100644
076f82
--- a/nss/Makefile
076f82
+++ b/nss/Makefile
076f82
@@ -171,17 +171,14 @@ $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps)
076f82
 $(objpfx)/libnss_test2.so: $(objpfx)nss_test2.os $(link-libc-deps)
076f82
 	$(build-module)
076f82
 $(objpfx)nss_test2.os : nss_test1.c
076f82
-ifdef libnss_test1.so-version
076f82
-$(objpfx)/libnss_test1.so$(libnss_test1.so-version): $(objpfx)/libnss_test1.so
076f82
+# Use the nss_files suffix for these objects as well.
076f82
+$(objpfx)/libnss_test1.so$(libnss_files.so-version): $(objpfx)/libnss_test1.so
076f82
 	$(make-link)
076f82
-endif
076f82
-ifdef libnss_test2.so-version
076f82
-$(objpfx)/libnss_test2.so$(libnss_test2.so-version): $(objpfx)/libnss_test2.so
076f82
+$(objpfx)/libnss_test2.so$(libnss_files.so-version): $(objpfx)/libnss_test2.so
076f82
 	$(make-link)
076f82
-endif
076f82
 $(patsubst %,$(objpfx)%.out,$(tests) $(tests-container)) : \
076f82
-	$(objpfx)/libnss_test1.so$(libnss_test1.so-version) \
076f82
-	$(objpfx)/libnss_test2.so$(libnss_test2.so-version)
076f82
+	$(objpfx)/libnss_test1.so$(libnss_files.so-version) \
076f82
+	$(objpfx)/libnss_test2.so$(libnss_files.so-version)
076f82
 
076f82
 ifeq (yes,$(have-thread-library))
076f82
 $(objpfx)tst-cancel-getpwuid_r: $(shared-thread-library)
076f82
diff --git a/shlib-versions b/shlib-versions
076f82
index df6603e6992b8382..b87ab50c59af1bfd 100644
076f82
--- a/shlib-versions
076f82
+++ b/shlib-versions
076f82
@@ -47,11 +47,6 @@ libnss_ldap=2
076f82
 libnss_hesiod=2
076f82
 libnss_db=2
076f82
 
076f82
-# Tests for NSS.  They must have the same NSS_SHLIB_REVISION number as
076f82
-# the rest.
076f82
-libnss_test1=2
076f82
-libnss_test2=2
076f82
-
076f82
 # Version for libnsl with YP and NIS+ functions.
076f82
 libnsl=1
076f82