Re: [RFC PATCH v4 1/2] configure: Remove --enable-obsolete-nsl

2020-06-30 Thread Petr Vorel
Hi Florian,

> * Petr Vorel:

> >> nss_compat no longer depends on libnsl in current glibc.  It can be used
> >> without NIS, and some users do that.  I don't think your patch changes
> >> this.

> > Interesting. I guess adding this would be worth then:
> > libnss_compat no longer depends on libnsl and can be used without NIS.

> We made this change a while back, in glibc 2.27, when the sources were
> moved to nss/nss_compat (from nis/nss_compat).  So this isn't something
> new.
Thanks for info. BTW sent v5, not sure, if this can be a final version.

> Thanks,
> Florian

Kind regards,
Petr



Re: [RFC PATCH v4 1/2] configure: Remove --enable-obsolete-nsl

2020-06-30 Thread Petr Vorel
Hi Florian,

> * Petr Vorel:

> > thank you for your review. I'll have time to send next version in second
> > half of July.

> If we merge new ports for glibc 2.32, it would be nice not include
> sunrpc in them.  We'll figure something out.
+1. I'll try to send v5 tonight or tomorrow.

> >> > diff --git a/grp/initgroups.c b/grp/initgroups.c
> >> > index f4c4e986e9..0c17141117 100644
> >> > --- a/grp/initgroups.c
> >> > +++ b/grp/initgroups.c
> >> > @@ -31,12 +31,6 @@
> >> >  #include "../nscd/nscd-client.h"
> >> >  #include "../nscd/nscd_proto.h"

> >> > -#ifdef LINK_OBSOLETE_NSL
> >> > -# define DEFAULT_CONFIG "compat [NOTFOUND=return] files"
> >> > -#else
> >> > -# define DEFAULT_CONFIG "files"
> >> > -#endif
> >> > -

> >> That looks a bit like a pre-existing bug—we do have nss_compat even
> >> without libnsl.  But the change itself looks okay.

> > Hm, I'll have look into it after this patchset is finished, but not sure
> > if I'm able to fix this.

> Sorry, no change to the patch is required.  Removing this is fine.  We
> shouldn't have had a default that depends on LINK_OBSOLETE_NSL.

> > Hm, libnss_compat is not built (now libnsl is only built as shared
> > library, for platforms where it was supported), so what exactly would
> > you put here?

> nss_compat no longer depends on libnsl in current glibc.  It can be used
> without NIS, and some users do that.  I don't think your patch changes
> this.
Interesting. I guess adding this would be worth then:
libnss_compat no longer depends on libnsl and can be used without NIS.

> Thanks,
> Florian

Kind regards,
Petr



Re: [RFC PATCH v4 1/2] configure: Remove --enable-obsolete-nsl

2020-06-30 Thread Florian Weimer
* Petr Vorel:

>> nss_compat no longer depends on libnsl in current glibc.  It can be used
>> without NIS, and some users do that.  I don't think your patch changes
>> this.

> Interesting. I guess adding this would be worth then:
> libnss_compat no longer depends on libnsl and can be used without NIS.

We made this change a while back, in glibc 2.27, when the sources were
moved to nss/nss_compat (from nis/nss_compat).  So this isn't something
new.

Thanks,
Florian



Re: [RFC PATCH v4 1/2] configure: Remove --enable-obsolete-nsl

2020-06-30 Thread Petr Vorel
Hi Florian,

thank you for your review. I'll have time to send next version in second
half of July.

> * Petr Vorel:

> > diff --git a/NEWS b/NEWS
> > index a660fc59a8..cfaf50c816 100644
> > --- a/NEWS
> > +++ b/NEWS
> > @@ -33,6 +33,14 @@ Major new features:

> >  Deprecated and removed features, and other changes affecting compatibility:

> > +* Remove configure option --enable-obsolete-nsl. libnsl is only built as 
> > shared
> > +  library for backward compatibility and the NSS modules libnss_compat,
> > +  libnss_nis and libnss_nisplus are not built at all, libnsl's headers 
> > aren't
> > +  installed. This compatibility is kept only for architectures and ABIs 
> > that
> > +  have been added in or before version 2.28. Replacement implementations 
> > based
> > +  on TI-RPC, which additionally support IPv6, are available from
> > +  .
> > +

> Please add two spaces after sentence-ending periods.  And wrap the lines
> a bit earlier (column 72 or so).
Sure, sorry (my setup is 80, but I'll set it 72 for glibc).

> > diff --git a/grp/initgroups.c b/grp/initgroups.c
> > index f4c4e986e9..0c17141117 100644
> > --- a/grp/initgroups.c
> > +++ b/grp/initgroups.c
> > @@ -31,12 +31,6 @@
> >  #include "../nscd/nscd-client.h"
> >  #include "../nscd/nscd_proto.h"

> > -#ifdef LINK_OBSOLETE_NSL
> > -# define DEFAULT_CONFIG "compat [NOTFOUND=return] files"
> > -#else
> > -# define DEFAULT_CONFIG "files"
> > -#endif
> > -

> That looks a bit like a pre-existing bug—we do have nss_compat even
> without libnsl.  But the change itself looks okay.
Hm, I'll have look into it after this patchset is finished, but not sure
if I'm able to fix this.

> > diff --git a/manual/nss.texi b/manual/nss.texi
> > index 821469a78a..7cb307246a 100644
> > --- a/manual/nss.texi
> > +++ b/manual/nss.texi
> > @@ -328,17 +328,11 @@ For the @code{hosts} and @code{networks} databases 
> > the default value is
> >  the DNS service not to be available but if it is available the answer it
> >  returns is definitive.

> > -The @code{passwd}, @code{group}, and @code{shadow} databases are
> > +The @code{passwd}, @code{group}, and @code{shadow} databases was
> >  traditionally handled in a special way.  The appropriate files in the
> > -@file{/etc} directory are read but if an entry with a name starting
> > -with a @code{+} character is found NIS is used.  This kind of lookup
> > -remains possible if @theglibc{} was configured with the
> > -@code{--enable-obsolete-nsl} option and the special lookup service
> > -@code{compat} is used.  If @theglibc{} was configured with the
> > -@code{--enable-obsolete-nsl} option the default value for the three
> > -databases above is @code{compat [NOTFOUND=return] files}.  If the
> > -@code{--enable-obsolete-nsl} option was not used the default value
> > -for the services is @code{files}.
> > +@file{/etc} directory were read but if an entry with a name starting
> > +with a @code{+} character was found NIS was used.  This kind of lookup
> > +was removed and now the default value for the services is @code{files}.

> I wonder if it makes sense to reference nss_compat here?
Hm, libnss_compat is not built (now libnsl is only built as shared library, for
platforms where it was supported), so what exactly would you put here?

> Thanks,
> Florian


Kind regards,
Petr



Re: [RFC PATCH v4 1/2] configure: Remove --enable-obsolete-nsl

2020-06-30 Thread Florian Weimer
* Petr Vorel:

> Hi Florian,
>
> thank you for your review. I'll have time to send next version in second
> half of July.

If we merge new ports for glibc 2.32, it would be nice not include
sunrpc in them.  We'll figure something out.

>> > diff --git a/grp/initgroups.c b/grp/initgroups.c
>> > index f4c4e986e9..0c17141117 100644
>> > --- a/grp/initgroups.c
>> > +++ b/grp/initgroups.c
>> > @@ -31,12 +31,6 @@
>> >  #include "../nscd/nscd-client.h"
>> >  #include "../nscd/nscd_proto.h"
>
>> > -#ifdef LINK_OBSOLETE_NSL
>> > -# define DEFAULT_CONFIG "compat [NOTFOUND=return] files"
>> > -#else
>> > -# define DEFAULT_CONFIG "files"
>> > -#endif
>> > -
>
>> That looks a bit like a pre-existing bug—we do have nss_compat even
>> without libnsl.  But the change itself looks okay.

> Hm, I'll have look into it after this patchset is finished, but not sure
> if I'm able to fix this.

Sorry, no change to the patch is required.  Removing this is fine.  We
shouldn't have had a default that depends on LINK_OBSOLETE_NSL.

> Hm, libnss_compat is not built (now libnsl is only built as shared
> library, for platforms where it was supported), so what exactly would
> you put here?

nss_compat no longer depends on libnsl in current glibc.  It can be used
without NIS, and some users do that.  I don't think your patch changes
this.

Thanks,
Florian



Re: [RFC PATCH v4 1/2] configure: Remove --enable-obsolete-nsl

2020-06-24 Thread Florian Weimer
* Petr Vorel:

> diff --git a/NEWS b/NEWS
> index a660fc59a8..cfaf50c816 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -33,6 +33,14 @@ Major new features:
>  
>  Deprecated and removed features, and other changes affecting compatibility:
>  
> +* Remove configure option --enable-obsolete-nsl. libnsl is only built as 
> shared
> +  library for backward compatibility and the NSS modules libnss_compat,
> +  libnss_nis and libnss_nisplus are not built at all, libnsl's headers aren't
> +  installed. This compatibility is kept only for architectures and ABIs that
> +  have been added in or before version 2.28. Replacement implementations 
> based
> +  on TI-RPC, which additionally support IPv6, are available from
> +  .
> +

Please add two spaces after sentence-ending periods.  And wrap the lines
a bit earlier (column 72 or so).

> diff --git a/grp/initgroups.c b/grp/initgroups.c
> index f4c4e986e9..0c17141117 100644
> --- a/grp/initgroups.c
> +++ b/grp/initgroups.c
> @@ -31,12 +31,6 @@
>  #include "../nscd/nscd-client.h"
>  #include "../nscd/nscd_proto.h"
>  
> -#ifdef LINK_OBSOLETE_NSL
> -# define DEFAULT_CONFIG "compat [NOTFOUND=return] files"
> -#else
> -# define DEFAULT_CONFIG "files"
> -#endif
> -

That looks a bit like a pre-existing bug—we do have nss_compat even
without libnsl.  But the change itself looks okay.
 
> diff --git a/manual/nss.texi b/manual/nss.texi
> index 821469a78a..7cb307246a 100644
> --- a/manual/nss.texi
> +++ b/manual/nss.texi
> @@ -328,17 +328,11 @@ For the @code{hosts} and @code{networks} databases the 
> default value is
>  the DNS service not to be available but if it is available the answer it
>  returns is definitive.
>  
> -The @code{passwd}, @code{group}, and @code{shadow} databases are
> +The @code{passwd}, @code{group}, and @code{shadow} databases was
>  traditionally handled in a special way.  The appropriate files in the
> -@file{/etc} directory are read but if an entry with a name starting
> -with a @code{+} character is found NIS is used.  This kind of lookup
> -remains possible if @theglibc{} was configured with the
> -@code{--enable-obsolete-nsl} option and the special lookup service
> -@code{compat} is used.  If @theglibc{} was configured with the
> -@code{--enable-obsolete-nsl} option the default value for the three
> -databases above is @code{compat [NOTFOUND=return] files}.  If the
> -@code{--enable-obsolete-nsl} option was not used the default value
> -for the services is @code{files}.
> +@file{/etc} directory were read but if an entry with a name starting
> +with a @code{+} character was found NIS was used.  This kind of lookup
> +was removed and now the default value for the services is @code{files}.

I wonder if it makes sense to reference nss_compat here?

Thanks,
Florian



Re: [RFC PATCH v4 1/2] configure: Remove --enable-obsolete-nsl

2020-06-09 Thread Petr Vorel
Hi Szabolcs,

...
> > +* Remove configure option --enable-obsolete-nsl. libnsl is only built as 
> > shared
> > +  library for backward compatibility and the NSS modules libnss_compat,
> > +  libnss_nis and libnss_nisplus are not built at all, libnsl's headers 
> > aren't
> > +  installed. This compatibility is kept only for architectures and ABIs 
> > that
> > +  have been added in or before version 2.28. Replacement implementations 
> > based
> > +  on TI-RPC, which additionally support IPv6, are available from
> > +  .

> can it cause libc update problems on systems that
> have nsswitch.conf referencing those old nss libs?

> maybe mention that configs may need to be updated?
Good point, thanks! I only mentioned it in news, but at least these files needs
to be updated:
manual/install.texi
manual/nsswitch.texi
manual/nss.texi
nss/nsswitch.conf
shlib-versions

And, if it gets merged and released,
man5/nsswitch.conf.5.html from man-pages project needs to be updated as well.

Not sure what should be done with shlib-versions. Should be NIS related setup
(libnsl=1, libnss_nis=2, libnss_nisplus=2) simply deleted?  There is also NIS
mentioned in arch specific sysdeps/unix/sysv/linux/mips/shlib-versions.

Kind regards,
Petr



Re: [RFC PATCH v4 1/2] configure: Remove --enable-obsolete-nsl

2020-06-08 Thread Szabolcs Nagy
The 06/06/2020 22:09, Petr Vorel wrote:
> this means that *always* libnsl is only built as shared library for
> backward compatibility and the NSS modules libnss_compat, libnss_nis and
> libnss_nisplus are not built at all, libnsl's headers aren't installed.
> 
> This compatibility is kept only for architectures and ABIs that
> have been added in or before version 2.28.
> 
> Replacement implementations based on TIRPC, which additionally support
> IPv6, are available from .
> 
> NOTE: libnsl code depends on Sun RPC, e.g. on --enable-obsolete-rpc
> (installed libnsl headers use installed Sun RPC headers), which will be
> removed in following commit.
> 
> Signed-off-by: Petr Vorel 
...
> +* Remove configure option --enable-obsolete-nsl. libnsl is only built as 
> shared
> +  library for backward compatibility and the NSS modules libnss_compat,
> +  libnss_nis and libnss_nisplus are not built at all, libnsl's headers aren't
> +  installed. This compatibility is kept only for architectures and ABIs that
> +  have been added in or before version 2.28. Replacement implementations 
> based
> +  on TI-RPC, which additionally support IPv6, are available from
> +  .

can it cause libc update problems on systems that
have nsswitch.conf referencing those old nss libs?

maybe mention that configs may need to be updated?



[RFC PATCH v4 1/2] configure: Remove --enable-obsolete-nsl

2020-06-06 Thread Petr Vorel
this means that *always* libnsl is only built as shared library for
backward compatibility and the NSS modules libnss_compat, libnss_nis and
libnss_nisplus are not built at all, libnsl's headers aren't installed.

This compatibility is kept only for architectures and ABIs that
have been added in or before version 2.28.

Replacement implementations based on TIRPC, which additionally support
IPv6, are available from .

NOTE: libnsl code depends on Sun RPC, e.g. on --enable-obsolete-rpc
(installed libnsl headers use installed Sun RPC headers), which will be
removed in following commit.

Signed-off-by: Petr Vorel 
---
 INSTALL  |  9 ---
 NEWS |  8 ++
 config.h.in  |  4 ---
 config.make.in   |  1 -
 configure| 20 +-
 configure.ac | 11 
 grp/initgroups.c |  8 +-
 include/libc-symbols.h   |  9 +--
 manual/install.texi  | 10 ---
 manual/nss.texi  | 14 +++---
 nis/Makefile | 52 +---
 nscd/initgrcache.c   |  8 +-
 nss/grp-lookup.c |  6 +
 nss/nsswitch.c   | 14 +++---
 nss/pwd-lookup.c |  6 +
 nss/spwd-lookup.c|  6 +
 scripts/build-many-glibcs.py |  6 ++---
 17 files changed, 25 insertions(+), 167 deletions(-)

diff --git a/INSTALL b/INSTALL
index 62e78725f5..3f5575e23e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -227,15 +227,6 @@ if 'CFLAGS' is specified it must enable optimization.  For 
example:
   colon-separated list in a single environment variable
   'GLIBC_TUNABLES'.
 
-'--enable-obsolete-nsl'
- By default, libnsl is only built as shared library for backward
- compatibility and the NSS modules libnss_compat, libnss_nis and
- libnss_nisplus are not built at all.  Use this option to enable
- libnsl with all depending NSS modules and header files.  For
- architectures and ABIs that have been added after version 2.28 of
- the GNU C Library this option is not available, and the libnsl
- compatibility library is not built.
-
 '--disable-crypt'
  Do not install the passphrase-hashing library 'libcrypt' or the
  header file 'crypt.h'.  'unistd.h' will still declare the function
diff --git a/NEWS b/NEWS
index a660fc59a8..cfaf50c816 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,14 @@ Major new features:
 
 Deprecated and removed features, and other changes affecting compatibility:
 
+* Remove configure option --enable-obsolete-nsl. libnsl is only built as shared
+  library for backward compatibility and the NSS modules libnss_compat,
+  libnss_nis and libnss_nisplus are not built at all, libnsl's headers aren't
+  installed. This compatibility is kept only for architectures and ABIs that
+  have been added in or before version 2.28. Replacement implementations based
+  on TI-RPC, which additionally support IPv6, are available from
+  .
+
 * The deprecated  header and the sysctl function have been
   removed.  To support old binaries, the sysctl function continues to
   exist as a compatibility symbol (on those architectures which had it),
diff --git a/config.h.in b/config.h.in
index 831eca2fe1..9eb71a81b7 100644
--- a/config.h.in
+++ b/config.h.in
@@ -161,10 +161,6 @@
to link against.  */
 #undef LINK_OBSOLETE_RPC
 
-/* Define if obsolete libnsl code should be made available for user-level
-   code to link against.  */
-#undef LINK_OBSOLETE_NSL
-
 /* Define if Systemtap  probes should be defined.  */
 #undef USE_STAP_PROBE
 
diff --git a/config.make.in b/config.make.in
index 2fed3da773..cefb6d4a90 100644
--- a/config.make.in
+++ b/config.make.in
@@ -97,7 +97,6 @@ build-static-nss = @static_nss@
 cross-compiling = @cross_compiling@
 force-install = @force_install@
 link-obsolete-rpc = @link_obsolete_rpc@
-build-obsolete-nsl = @build_obsolete_nsl@
 build-crypt = @build_crypt@
 build-nscd = @build_nscd@
 use-nscd = @use_nscd@
diff --git a/configure b/configure
index b8ef8c7a51..793c0068cc 100755
--- a/configure
+++ b/configure
@@ -673,7 +673,6 @@ base_machine
 have_tunables
 build_pt_chown
 build_nscd
-build_obsolete_nsl
 link_obsolete_rpc
 libc_cv_static_nss_crypt
 libc_cv_nss_crypt
@@ -786,7 +785,6 @@ enable_experimental_malloc
 enable_crypt
 enable_nss_crypt
 enable_obsolete_rpc
-enable_obsolete_nsl
 enable_systemtap
 enable_build_nscd
 enable_nscd
@@ -1459,8 +1457,6 @@ Optional Features:
   --enable-nss-crypt  enable libcrypt to use nss
   --enable-obsolete-rpc   build and install the obsolete RPC code for
   link-time usage
-  --enable-obsolete-nsl   build and install the obsolete libnsl library and
-  depending NSS modules
   --enable-systemtap  enable systemtap static probe points [default=no]
   --disable-build-nscddisable building and installing