[v3,1/2] nss: Do not mention NSS test modules in <gnu/lib-names.h>

Message ID 7ce5ab8833fc46897b05be07f243e10893571c2d.1646928950.git.fweimer@redhat.com
State Committed
Commit aefc79ab5ad4bb9feea2876720cec70dca7cd8ed
Headers
Series [v3,1/2] nss: Do not mention NSS test modules in <gnu/lib-names.h> |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Florian Weimer March 10, 2022, 4:17 p.m. UTC
  They are not actually installed.  Use the nss_files version instead
in nss/Makefile, similar to how __nss_shlib_revision is derived
from LIBNSS_FILES_SO.
---
v3: Unchanged from v2.
 nss/Makefile   | 13 +++++--------
 shlib-versions |  5 -----
 2 files changed, 5 insertions(+), 13 deletions(-)


base-commit: d653fd2d9ebe23c2b16b76edf717c5dbd5ce9b77
  

Comments

Carlos O'Donell March 10, 2022, 10:22 p.m. UTC | #1
On 3/10/22 11:17, Florian Weimer via Libc-alpha wrote:
> They are not actually installed.  Use the nss_files version instead
> in nss/Makefile, similar to how __nss_shlib_revision is derived
> from LIBNSS_FILES_SO.

Agreed. This removes the test files from shlib_versions.

LGTM.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
> v3: Unchanged from v2.
>  nss/Makefile   | 13 +++++--------
>  shlib-versions |  5 -----
>  2 files changed, 5 insertions(+), 13 deletions(-)
> 
> diff --git a/nss/Makefile b/nss/Makefile
> index 552e5d03e1..74e2c2426c 100644
> --- a/nss/Makefile
> +++ b/nss/Makefile
> @@ -171,17 +171,14 @@ $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps)
>  $(objpfx)/libnss_test2.so: $(objpfx)nss_test2.os $(link-libc-deps)
>  	$(build-module)
>  $(objpfx)nss_test2.os : nss_test1.c
> -ifdef libnss_test1.so-version
> -$(objpfx)/libnss_test1.so$(libnss_test1.so-version): $(objpfx)/libnss_test1.so
> +# Use the nss_files suffix for these objects as well.

OK.

> +$(objpfx)/libnss_test1.so$(libnss_files.so-version): $(objpfx)/libnss_test1.so
>  	$(make-link)
> -endif
> -ifdef libnss_test2.so-version
> -$(objpfx)/libnss_test2.so$(libnss_test2.so-version): $(objpfx)/libnss_test2.so
> +$(objpfx)/libnss_test2.so$(libnss_files.so-version): $(objpfx)/libnss_test2.so
>  	$(make-link)
> -endif
>  $(patsubst %,$(objpfx)%.out,$(tests) $(tests-container)) : \
> -	$(objpfx)/libnss_test1.so$(libnss_test1.so-version) \
> -	$(objpfx)/libnss_test2.so$(libnss_test2.so-version)
> +	$(objpfx)/libnss_test1.so$(libnss_files.so-version) \
> +	$(objpfx)/libnss_test2.so$(libnss_files.so-version)

OK.

>  
>  ifeq (yes,$(have-thread-library))
>  $(objpfx)tst-cancel-getpwuid_r: $(shared-thread-library)
> diff --git a/shlib-versions b/shlib-versions
> index df6603e699..b87ab50c59 100644
> --- a/shlib-versions
> +++ b/shlib-versions
> @@ -47,11 +47,6 @@ libnss_ldap=2
>  libnss_hesiod=2
>  libnss_db=2
>  
> -# Tests for NSS.  They must have the same NSS_SHLIB_REVISION number as
> -# the rest.
> -libnss_test1=2
> -libnss_test2=2
> -

OK.

>  # Version for libnsl with YP and NIS+ functions.
>  libnsl=1
>  
> 
> base-commit: d653fd2d9ebe23c2b16b76edf717c5dbd5ce9b77
  

Patch

diff --git a/nss/Makefile b/nss/Makefile
index 552e5d03e1..74e2c2426c 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -171,17 +171,14 @@  $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps)
 $(objpfx)/libnss_test2.so: $(objpfx)nss_test2.os $(link-libc-deps)
 	$(build-module)
 $(objpfx)nss_test2.os : nss_test1.c
-ifdef libnss_test1.so-version
-$(objpfx)/libnss_test1.so$(libnss_test1.so-version): $(objpfx)/libnss_test1.so
+# Use the nss_files suffix for these objects as well.
+$(objpfx)/libnss_test1.so$(libnss_files.so-version): $(objpfx)/libnss_test1.so
 	$(make-link)
-endif
-ifdef libnss_test2.so-version
-$(objpfx)/libnss_test2.so$(libnss_test2.so-version): $(objpfx)/libnss_test2.so
+$(objpfx)/libnss_test2.so$(libnss_files.so-version): $(objpfx)/libnss_test2.so
 	$(make-link)
-endif
 $(patsubst %,$(objpfx)%.out,$(tests) $(tests-container)) : \
-	$(objpfx)/libnss_test1.so$(libnss_test1.so-version) \
-	$(objpfx)/libnss_test2.so$(libnss_test2.so-version)
+	$(objpfx)/libnss_test1.so$(libnss_files.so-version) \
+	$(objpfx)/libnss_test2.so$(libnss_files.so-version)
 
 ifeq (yes,$(have-thread-library))
 $(objpfx)tst-cancel-getpwuid_r: $(shared-thread-library)
diff --git a/shlib-versions b/shlib-versions
index df6603e699..b87ab50c59 100644
--- a/shlib-versions
+++ b/shlib-versions
@@ -47,11 +47,6 @@  libnss_ldap=2
 libnss_hesiod=2
 libnss_db=2
 
-# Tests for NSS.  They must have the same NSS_SHLIB_REVISION number as
-# the rest.
-libnss_test1=2
-libnss_test2=2
-
 # Version for libnsl with YP and NIS+ functions.
 libnsl=1