[RFC PATCH v2 0/2] Remove --enable-obsolete-nsl --enable-obsolete-rpc

2020-06-05 Thread Petr Vorel
Hi,

I'm still having issues with elf/tst-ldconfig-ld_so_conf-update when
running with both commits (it's ok when running only first commit).

$ ../glibc/configure --prefix=/usr
$ make -j`nproc`
$ make -j`nproc` check
  1 FAIL
   4165 PASS
 24 UNSUPPORTED
 12 XFAIL
  6 XPASS
FAIL: elf/tst-ldconfig-ld_so_conf-update

$ strace -o logfile -f -s 222 -tt make test t=elf/tst-ldconfig-ld_so_conf-update
original exit status 1
error: xfopen.c:29: could not open /etc/ld.so.conf (mode "a+"): No such file or 
directory
error: 1 test failures
running post-clean rsync

running under root (uh, that's ugly):
error: xmkdirp.c:63: mkdir_p 
("/home/foo/build/glibc/remove-rpc.v2.second-commit/testroot.root/dev", 0755): 
Permission denied

And indeed chroot
"/home/foo/build/glibc/remove-rpc.v2.second-commit/testroot.root/"
doesn't have etc directory. Simple creating etc directory and copying
ld.so.conf does not help (I'm not surprised).

Und yes, I have cross-compiling = no as Szabolcs noted.
What can be wrong? Do I run testing in a wrong way?
Or did I really introduced bug in second commit?

Kind regards,
Petr

Petr Vorel (2):
  configure: Remove --enable-obsolete-nsl
  Remove --enable-obsolete-rpc flag

 INSTALL   |9 -
 NEWS  |   15 +
 .../strcoll-inputs/filelist#en_US.UTF-8   |   29 -
 config.h.in   |8 -
 config.make.in|2 -
 configure |   38 +-
 configure.ac  |   22 -
 grp/initgroups.c  |8 +-
 include/libc-symbols.h|   16 +-
 include/shlib-compat.h|8 +-
 manual/install.texi   |   10 -
 manual/nss.texi   |   20 +-
 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  |8 -
 sunrpc/Makefile   |  135 +-
 sunrpc/auth_des.c |4 +-
 sunrpc/auth_none.c|2 +-
 sunrpc/auth_unix.c|4 +-
 sunrpc/authdes_prot.c |4 +-
 sunrpc/authuxprot.c   |2 +-
 sunrpc/bug20790.x |1 -
 sunrpc/clnt_gen.c |2 +-
 sunrpc/clnt_perr.c|   10 +-
 sunrpc/clnt_raw.c |2 +-
 sunrpc/clnt_simp.c|2 +-
 sunrpc/clnt_tcp.c |2 +-
 sunrpc/clnt_udp.c |6 +-
 sunrpc/clnt_unix.c|2 +-
 sunrpc/get_myaddr.c   |2 +-
 sunrpc/key_call.c |   18 +-
 sunrpc/key_prot.c |   20 +-
 sunrpc/netname.c  |   10 +-
 sunrpc/pm_getmaps.c   |2 +-
 sunrpc/pm_getport.c   |4 +-
 sunrpc/pmap_clnt.c|4 +-
 sunrpc/pmap_prot.c|2 +-
 sunrpc/pmap_prot2.c   |2 +-
 sunrpc/pmap_rmt.c |8 +-
 sunrpc/proto.h|   65 -
 sunrpc/publickey.c|4 +-
 sunrpc/rpc_clntout.c  |  333 
 sunrpc/rpc_cmsg.c |2 +-
 sunrpc/rpc_common.c   |   10 +-
 sunrpc/rpc_cout.c |  811 -
 sunrpc/rpc_dtable.c   |2 +-
 sunrpc/rpc_hout.c |  607 ---
 sunrpc/rpc_main.c | 1451 -
 sunrpc/rpc_parse.c|  687 
 sunrpc/rpc_parse.h|  165 --
 sunrpc/rpc_prot.c |   14 +-
 sunrpc/rpc_sample.c   |  336 
 sunrpc/rpc_scan.c |  544 --
 sunrpc/rpc_scan.h |  104 --
 sunrpc/rpc_svcout.c   | 1093 -
 sunrpc/rpc_tblout.c   |  178 --
 sunrpc/rpc_thread.c   |8 +-
 sunrpc/rpc_util.c |  525 --
 sunrpc/rpc_util.h |  154 --
 sunrpc/rpcgen.c   |2 -
 sunrpc/rpcsvc/bootparam.h |   23 -
 sunrpc/rpcsvc/bootparam_prot.

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

2020-06-05 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 .

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 the nscd daemon
   --disable-nscd  library functions will not contact the nscd daemon
@@ -3654,20 +3650,6 @@ if test "$link_obsolete_rpc" = yes; then
 
 fi
 
-# C

Re: [RFC PATCH v2 0/2] Remove --enable-obsolete-nsl --enable-obsolete-rpc

2020-06-05 Thread Petr Vorel
> Hi,

> I'm still having issues with elf/tst-ldconfig-ld_so_conf-update when
> running with both commits (it's ok when running only first commit).

OK, I noticed core dump (can be reproduced):
systemd-coredump[26018]: Process 26016 (ld-linux-x86-64) of user 1000 dumped 
core.

   PID: 26016 (ld-linux-x86-64)
   UID: 1000 (foo)
   GID: 100 (users)
Signal: 6 (ABRT)
 Timestamp: Fri 2020-06-05 18:41:54 CEST (16min ago)
  Command Line: 
/home/foo/build/glibc/remove-rpc.v2.second-commit.2/elf/ld-linux-x86-64.so.2 
--library-path 
/home/foo/build/glibc/remove-rpc.v2.second-commit.2:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/math:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/elf:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/dlfcn:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/nss:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/nis:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/rt:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/resolv:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/mathvec:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/support:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/crypt:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/nptl
 /home/foo/build/glibc/remove-rpc.v2.second-commit.2/debug/tst-ssp-1
Executable: /home/foo/build/glibc/remove-rpc.v2.second-commit.2/elf/ld.so
 Control Group: /user.slice/user-1000.slice/session-1.scope
  Unit: session-1.scope
 Slice: user-1000.slice
   Session: 1
 Owner UID: 1000 (foo)
   Boot ID: bfef12e3ca2046009a97d35fb89674bc
Machine ID: 66e50c6d8dd0edc674b23b51586326ca
  Hostname: dell5510
   Storage: none
   Message: Process 26016 (ld-linux-x86-64) of user 1000 dumped core.
Coredump entry has no core attached (neither internally in the journal nor 
externally on disk).

Kind regards,
Petr



Re: [RFC PATCH v2 0/2] Remove --enable-obsolete-nsl --enable-obsolete-rpc

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

>> I'm still having issues with elf/tst-ldconfig-ld_so_conf-update when
>> running with both commits (it's ok when running only first commit).
>
> OK, I noticed core dump (can be reproduced):
> systemd-coredump[26018]: Process 26016 (ld-linux-x86-64) of user 1000 dumped 
> core.
>
>PID: 26016 (ld-linux-x86-64)
>UID: 1000 (foo)
>GID: 100 (users)
> Signal: 6 (ABRT)
>  Timestamp: Fri 2020-06-05 18:41:54 CEST (16min ago)
>   Command Line: 
> /home/foo/build/glibc/remove-rpc.v2.second-commit.2/elf/ld-linux-x86-64.so.2 
> --library-path 
> /home/foo/build/glibc/remove-rpc.v2.second-commit.2:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/math:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/elf:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/dlfcn:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/nss:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/nis:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/rt:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/resolv:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/mathvec:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/support:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/crypt:/home/foo/build/glibc/remove-rpc.v2.second-commit.2/nptl
>  /home/foo/build/glibc/remove-rpc.v2.second-commit.2/debug/tst-ssp-1
> Executable: /home/foo/build/glibc/remove-rpc.v2.second-commit.2/elf/ld.so
>  Control Group: /user.slice/user-1000.slice/session-1.scope
>   Unit: session-1.scope
>  Slice: user-1000.slice
>Session: 1
>  Owner UID: 1000 (foo)
>Boot ID: bfef12e3ca2046009a97d35fb89674bc
> Machine ID: 66e50c6d8dd0edc674b23b51586326ca
>   Hostname: dell5510
>Storage: none
>Message: Process 26016 (ld-linux-x86-64) of user 1000 dumped core.
> Coredump entry has no core attached (neither internally in the journal nor 
> externally on disk).

This seems unrelated.  I think systemd-coredump ignores ulimit -c 0
(which we perform programatically in the test skeleton), to cover cases
like this where the process is expected to abort.  So you get a few
spurious reports like this one.

Thanks,
Florian



Re: [RFC PATCH v2 0/2] Remove --enable-obsolete-nsl --enable-obsolete-rpc

2020-06-05 Thread Szabolcs Nagy
* Petr Vorel  [2020-06-05 18:53:53 +0200]:
> $ strace -o logfile -f -s 222 -tt make test 
> t=elf/tst-ldconfig-ld_so_conf-update
> original exit status 1
> error: xfopen.c:29: could not open /etc/ld.so.conf (mode "a+"): No such file 
> or directory
> error: 1 test failures
> running post-clean rsync
> 
> running under root (uh, that's ugly):
> error: xmkdirp.c:63: mkdir_p 
> ("/home/foo/build/glibc/remove-rpc.v2.second-commit/testroot.root/dev", 
> 0755): Permission denied
> 
> And indeed chroot
> "/home/foo/build/glibc/remove-rpc.v2.second-commit/testroot.root/"
> doesn't have etc directory. Simple creating etc directory and copying
> ld.so.conf does not help (I'm not surprised).

i would try to see why /etc is not created in the testroot.

unfortunately i dont know the details of how that is
supposed to work (i think there is a pristine testroot
that's created first and gets copied into testroot, see
if there is /etc there)



Re: [RFC PATCH v2 0/2] Remove --enable-obsolete-nsl --enable-obsolete-rpc

2020-06-05 Thread Joseph Myers
On Fri, 5 Jun 2020, Szabolcs Nagy wrote:

> i would try to see why /etc is not created in the testroot.

Maybe it was only previously created as part of installing /etc/rpc there 
and the patch is causing that file no longer to be installed?

-- 
Joseph S. Myers
jos...@codesourcery.com