This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.29.9000-73-gad18dad


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  ad18dadec945329f95b53b63ed69f91878a329df (commit)
       via  ebd32784ce2029d0461a90a79bc4e37f8d051765 (commit)
       via  a198d37ade06c03e8dacc54f861fdd325e04381b (commit)
      from  e442e40de5646e93bf31ace3e0c5159085a7259b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ad18dadec945329f95b53b63ed69f91878a329df

commit ad18dadec945329f95b53b63ed69f91878a329df
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Feb 15 21:51:58 2019 +0100

    Add check for missing wrapper headers
    
    If building on a subset of architectures only, it is easy to miss
    wrapper headers which are required by other architectures because
    they lack the corresponding sysdeps header.  The check ensures
    that every installed header which is not itself a sysdeps header
    has a header under include/ (that presumably wraps the header,
    and perhaps also adding declarations and definitions for !_ISOMAC).
    
    Also check for the absence of the sysdeps/generic/bits directory
    removed in commit c72565e5f1124c2dc72573e83406fe999e56091f, to make
    accidental re-introduction more difficult.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>

diff --git a/ChangeLog b/ChangeLog
index f3368b7..2598514 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2019-02-15  Florian Weimer  <fweimer@redhat.com>
 
+	Check that non-sysdeps headers have wrapper headers.
+	* scripts/check-wrapper-headers.py: New file.
+	* Makefile (tests-special): Add check-wrapper-headers.out.
+	(check-wrapper-headers.out): New target.
+	* Rules (tests-special): Add check-wrapper-headers.out.
+	(check-wrapper-headers.out): New target.
+
+2019-02-15  Florian Weimer  <fweimer@redhat.com>
+
 	Add missing header wrappers under include/.
 	* include/ar.h: New file.
 	* include/bits/mqueue2.h: Likewise.
diff --git a/Makefile b/Makefile
index 1bfe7fe..dc5de7a 100644
--- a/Makefile
+++ b/Makefile
@@ -331,8 +331,13 @@ $(objpfx)check-installed-headers-cxx.out: \
 	  "$(CXX) $(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
 	  $(headers) > $@; \
 	$(evaluate-test)
-endif
-endif
+endif # $(CXX)
+
+tests-special += $(objpfx)check-wrapper-headers.out
+$(objpfx)check-wrapper-headers.out: scripts/check-wrapper-headers.py $(headers)
+	$(PYTHON) $< --root=. --subdir=. $(headers) \
+	  --generated $(common-generated) > $@; $(evaluate-test)
+endif # $(headers)
 
 define summarize-tests
 @egrep -v '^(PASS|XFAIL):' $(objpfx)$1 || true
diff --git a/Rules b/Rules
index 1562f2c..e08a28d 100644
--- a/Rules
+++ b/Rules
@@ -101,8 +101,15 @@ $(objpfx)check-installed-headers-cxx.out: \
 	  "$(CXX) $(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
 	  $(headers) > $@; \
 	$(evaluate-test)
-endif
-endif
+endif # $(CXX)
+
+tests-special += $(objpfx)check-wrapper-headers.out
+$(objpfx)check-wrapper-headers.out: \
+  $(..)scripts/check-wrapper-headers.py $(headers)
+	$(PYTHON) $< --root=$(..) --subdir=$(subdir) $(headers) > $@; \
+	  $(evaluate-test)
+
+endif # $(headers)
 
 # This makes all the auxiliary and test programs.
 
diff --git a/scripts/check-wrapper-headers.py b/scripts/check-wrapper-headers.py
new file mode 100644
index 0000000..094faa3
--- /dev/null
+++ b/scripts/check-wrapper-headers.py
@@ -0,0 +1,113 @@
+#!/usr/bin/python3
+# Check that a wrapper header exist for each non-sysdeps header.
+# Copyright (C) 2019 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+# Non-sysdeps subdirectories are not on the C include path, so
+# installed headers need to have a sysdep wrapper header.
+#
+# usage: scripts/checl-wrapper-headers.py \
+#     --root=$(..) --subdir=$(subdir) $(headers) \
+#     [--generated $(common-generated)]
+#
+# If invoked with --root=., the script is invoked from the root of the
+# source tree, so paths starting with "include/" are skipped (because
+# those do not require wrappers).
+
+import argparse
+import os
+import sys
+
+# Some subdirectories are only compiled for essentially one target.
+# In this case, we do not need to check for consistent wrapper
+# headers.  Hurd uses a custom way to Hurd-specific inject wrapper
+# headers; see sysdeps/mach/Makefiles under "ifdef in-Makerules".
+SINGLE_TARGET_SUBDIRS = frozenset(("hurd", "mach"))
+
+# Name of the special subdirectory with the wrapper headers.
+INCLUDE = "include"
+
+def check_sysdeps_bits(args):
+    """Check that the directory sysdeps/generic/bits does not exist."""
+    bits = os.path.join(args.root, 'sysdeps', 'generic', 'bits')
+    if os.path.exists(bits):
+        # See commit c72565e5f1124c2dc72573e83406fe999e56091f and
+        # <https://sourceware.org/ml/libc-alpha/2016-05/msg00189.html>.
+        print('error: directory {} has been added, use bits/ instead'.format(
+            os.path.relpath(os.path.realpath(bits), args.root)))
+        return False
+    return True
+
+def check_headers_root(args):
+    """Check headers located at the top level of the source tree."""
+    good = True
+    generated = frozenset(args.generated)
+    for header in args.headers:
+        if not (header.startswith('bits/')
+                or os.path.exists(os.path.join(args.root, INCLUDE, header))
+                or header in generated):
+            print('error: top-level header {} must be in bits/ or {}/'
+                  .format(header, INCLUDE))
+            good = False
+    return good
+
+def check_headers(args):
+    """Check headers located in a subdirectory."""
+    good = True
+    for header in args.headers:
+        # Whitelist .x files, which never have include wrappers.
+        if header.endswith(".x"):
+            continue
+
+        is_nonsysdep_header = os.access(header, os.R_OK)
+        if is_nonsysdep_header:
+            include_path = os.path.join(args.root, INCLUDE, header)
+            if not os.access(include_path, os.R_OK):
+                print('error: missing wrapper header {} for {}'.format(
+                    os.path.join(INCLUDE, header),
+                    os.path.relpath(os.path.realpath(header), args.root)))
+                good = False
+    return good
+
+def main():
+    """The main entry point."""
+    parser = argparse.ArgumentParser(
+        description='Check for missing wrapper headers in include/.')
+    parser.add_argument('--root', metavar='DIRECTORY', required=True,
+                        help='Path to the top-level of the source tree')
+    parser.add_argument('--subdir', metavar='DIRECTORY', required=True,
+                        help='Name of the subdirectory being processed')
+    parser.add_argument('--generated', metavar='FILE', default="", nargs="*",
+                        help="Generated files (which are ignored)")
+    parser.add_argument('headers', help='Header files to process', nargs='+')
+    args = parser.parse_args()
+
+    good = (args.root == '.') == (args.subdir == '.')
+    if not good:
+        print('error: --root/--subdir disagree about top-of-tree location')
+
+    if args.subdir == '.':
+        good &= check_sysdeps_bits(args)
+        good &= check_headers_root(args)
+    elif args.subdir not in SINGLE_TARGET_SUBDIRS:
+        good &= check_headers(args)
+
+    if not good:
+        sys.exit(1)
+
+if __name__ == '__main__':
+    main()

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ebd32784ce2029d0461a90a79bc4e37f8d051765

commit ebd32784ce2029d0461a90a79bc4e37f8d051765
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Feb 15 21:51:35 2019 +0100

    Add missing header wrappers under include/
    
    With a complete set of wrapper headers, it will be possible to check
    for automatically for new installed headers which lack such wrappers.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>

diff --git a/ChangeLog b/ChangeLog
index 9c23b7b..f3368b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,28 @@
 2019-02-15  Florian Weimer  <fweimer@redhat.com>
 
+	Add missing header wrappers under include/.
+	* include/ar.h: New file.
+	* include/bits/mqueue2.h: Likewise.
+	* include/bits/stdio.h: Likewise.
+	* include/bits/stdio2.h: Likewise.
+	* include/fstab.h: Likewise.
+	* include/fts.h: Likewise.
+	* include/lastlog.h: Likewise.
+	* include/netinet/icmp6.h: Likewise.
+	* include/netinet/igmp.h: Likewise.
+	* include/netinet/ip6.h: Likewise.
+	* include/re_comp.h: Likewise.
+	* include/regexp.h: Likewise.
+	* include/rpcsvc/bootparam.h: Likewise.
+	* include/rpcsvc/yp_prot.h: Likewise.
+	* include/sys/random.h: Likewise.
+	* include/sys/stropts.h: Likewise.
+	* include/sys/ttychars.h: Likewise.
+	* include/sys/vfs.h: Likewise.
+	* include/wait.h: Likewise.
+
+2019-02-15  Florian Weimer  <fweimer@redhat.com>
+
 	* nptl_db/proc_service.h: Move to ...
 	* sysdeps/nptl/proc_service.h: ... here.
 	* nptl_db/thread_db.h: Move to ...
diff --git a/include/ar.h b/include/ar.h
new file mode 100644
index 0000000..400167a
--- /dev/null
+++ b/include/ar.h
@@ -0,0 +1 @@
+#include <misc/ar.h>
diff --git a/include/bits/mqueue2.h b/include/bits/mqueue2.h
new file mode 100644
index 0000000..2d5c231
--- /dev/null
+++ b/include/bits/mqueue2.h
@@ -0,0 +1 @@
+#include <rt/bits/mqueue2.h>
diff --git a/include/bits/stdio.h b/include/bits/stdio.h
new file mode 100644
index 0000000..55c51ea
--- /dev/null
+++ b/include/bits/stdio.h
@@ -0,0 +1 @@
+#include <libio/bits/stdio.h>
diff --git a/include/bits/stdio2.h b/include/bits/stdio2.h
new file mode 100644
index 0000000..6d7cf43
--- /dev/null
+++ b/include/bits/stdio2.h
@@ -0,0 +1 @@
+#include <libio/bits/stdio2.h>
diff --git a/include/fstab.h b/include/fstab.h
new file mode 100644
index 0000000..314aa3e
--- /dev/null
+++ b/include/fstab.h
@@ -0,0 +1 @@
+#include <misc/fstab.h>
diff --git a/include/fts.h b/include/fts.h
new file mode 100644
index 0000000..145dce6
--- /dev/null
+++ b/include/fts.h
@@ -0,0 +1 @@
+#include <io/fts.h>
diff --git a/include/lastlog.h b/include/lastlog.h
new file mode 100644
index 0000000..5c0ea03
--- /dev/null
+++ b/include/lastlog.h
@@ -0,0 +1 @@
+#include <login/lastlog.h>
diff --git a/include/netinet/icmp6.h b/include/netinet/icmp6.h
new file mode 100644
index 0000000..fee15fc
--- /dev/null
+++ b/include/netinet/icmp6.h
@@ -0,0 +1 @@
+#include <inet/netinet/icmp6.h>
diff --git a/include/netinet/igmp.h b/include/netinet/igmp.h
new file mode 100644
index 0000000..63a9355
--- /dev/null
+++ b/include/netinet/igmp.h
@@ -0,0 +1 @@
+#include <inet/netinet/igmp.h>
diff --git a/include/netinet/ip6.h b/include/netinet/ip6.h
new file mode 100644
index 0000000..262c7c2
--- /dev/null
+++ b/include/netinet/ip6.h
@@ -0,0 +1 @@
+#include <inet/netinet/ip6.h>
diff --git a/include/re_comp.h b/include/re_comp.h
new file mode 100644
index 0000000..130df7d
--- /dev/null
+++ b/include/re_comp.h
@@ -0,0 +1 @@
+#include <posix/re_comp.h>
diff --git a/include/regexp.h b/include/regexp.h
new file mode 100644
index 0000000..3155371
--- /dev/null
+++ b/include/regexp.h
@@ -0,0 +1 @@
+#include <misc/regexp.h>
diff --git a/include/rpcsvc/bootparam.h b/include/rpcsvc/bootparam.h
new file mode 100644
index 0000000..87e4eef
--- /dev/null
+++ b/include/rpcsvc/bootparam.h
@@ -0,0 +1 @@
+#include <sunrpc/rpcsvc/bootparam.h>
diff --git a/include/rpcsvc/yp_prot.h b/include/rpcsvc/yp_prot.h
new file mode 100644
index 0000000..ab1ca10
--- /dev/null
+++ b/include/rpcsvc/yp_prot.h
@@ -0,0 +1 @@
+#include <nis/rpcsvc/yp_prot.h>
diff --git a/include/sys/random.h b/include/sys/random.h
new file mode 100644
index 0000000..b33d114
--- /dev/null
+++ b/include/sys/random.h
@@ -0,0 +1 @@
+#include <stdlib/sys/random.h>
diff --git a/include/sys/stropts.h b/include/sys/stropts.h
new file mode 100644
index 0000000..711f150
--- /dev/null
+++ b/include/sys/stropts.h
@@ -0,0 +1 @@
+#include <streams/sys/stropts.h>
diff --git a/include/sys/ttychars.h b/include/sys/ttychars.h
new file mode 100644
index 0000000..86cb77d
--- /dev/null
+++ b/include/sys/ttychars.h
@@ -0,0 +1 @@
+#include <termios/sys/ttychars.h>
diff --git a/include/sys/vfs.h b/include/sys/vfs.h
new file mode 100644
index 0000000..95f311d
--- /dev/null
+++ b/include/sys/vfs.h
@@ -0,0 +1 @@
+#include <io/sys/vfs.h>
diff --git a/include/wait.h b/include/wait.h
new file mode 100644
index 0000000..ed3d086
--- /dev/null
+++ b/include/wait.h
@@ -0,0 +1 @@
+#include <posix/wait.h>

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a198d37ade06c03e8dacc54f861fdd325e04381b

commit a198d37ade06c03e8dacc54f861fdd325e04381b
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Feb 15 21:51:20 2019 +0100

    Move remaining nptl_db headers to sysdeps/nptl
    
    sys/procfs.h was already using this sysdeps directory.
    
    This avoids the need for  nptl-specific wrapper headers under
    include/, a generic location in the source tree.

diff --git a/ChangeLog b/ChangeLog
index c38971a..9c23b7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-02-15  Florian Weimer  <fweimer@redhat.com>
+
+	* nptl_db/proc_service.h: Move to ...
+	* sysdeps/nptl/proc_service.h: ... here.
+	* nptl_db/thread_db.h: Move to ...
+	* sysdeps/nptl/thread_db.h: ... here.
+	* nptl/descr.h: Include <thread_db.h>.
+
 2019-02-15  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
 	* io/Makefile (tests): Add tst-lockf.
diff --git a/nptl/descr.h b/nptl/descr.h
index 9c54cbc..4ef33ae 100644
--- a/nptl/descr.h
+++ b/nptl/descr.h
@@ -29,7 +29,7 @@
 #include <lowlevellock.h>
 #include <pthreaddef.h>
 #include <dl-sysdep.h>
-#include "../nptl_db/thread_db.h"
+#include <thread_db.h>
 #include <tls.h>
 #include <unwind.h>
 #include <bits/types/res_state.h>
diff --git a/nptl_db/proc_service.h b/sysdeps/nptl/proc_service.h
similarity index 100%
rename from nptl_db/proc_service.h
rename to sysdeps/nptl/proc_service.h
diff --git a/nptl_db/thread_db.h b/sysdeps/nptl/thread_db.h
similarity index 100%
rename from nptl_db/thread_db.h
rename to sysdeps/nptl/thread_db.h

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                |   40 +++++++++++
 Makefile                                 |    9 ++-
 Rules                                    |   11 +++-
 include/ar.h                             |    1 +
 include/bits/mqueue2.h                   |    1 +
 include/bits/stdio.h                     |    1 +
 include/bits/stdio2.h                    |    1 +
 include/fstab.h                          |    1 +
 include/fts.h                            |    1 +
 include/lastlog.h                        |    1 +
 include/netinet/icmp6.h                  |    1 +
 include/netinet/igmp.h                   |    1 +
 include/netinet/ip6.h                    |    1 +
 include/re_comp.h                        |    1 +
 include/regexp.h                         |    1 +
 include/rpcsvc/bootparam.h               |    1 +
 include/rpcsvc/yp_prot.h                 |    1 +
 include/sys/random.h                     |    1 +
 include/sys/stropts.h                    |    1 +
 include/sys/ttychars.h                   |    1 +
 include/sys/vfs.h                        |    1 +
 include/wait.h                           |    1 +
 nptl/descr.h                             |    2 +-
 scripts/check-wrapper-headers.py         |  113 ++++++++++++++++++++++++++++++
 {nptl_db => sysdeps/nptl}/proc_service.h |    0
 {nptl_db => sysdeps/nptl}/thread_db.h    |    0
 26 files changed, 189 insertions(+), 5 deletions(-)
 create mode 100644 include/ar.h
 create mode 100644 include/bits/mqueue2.h
 create mode 100644 include/bits/stdio.h
 create mode 100644 include/bits/stdio2.h
 create mode 100644 include/fstab.h
 create mode 100644 include/fts.h
 create mode 100644 include/lastlog.h
 create mode 100644 include/netinet/icmp6.h
 create mode 100644 include/netinet/igmp.h
 create mode 100644 include/netinet/ip6.h
 create mode 100644 include/re_comp.h
 create mode 100644 include/regexp.h
 create mode 100644 include/rpcsvc/bootparam.h
 create mode 100644 include/rpcsvc/yp_prot.h
 create mode 100644 include/sys/random.h
 create mode 100644 include/sys/stropts.h
 create mode 100644 include/sys/ttychars.h
 create mode 100644 include/sys/vfs.h
 create mode 100644 include/wait.h
 create mode 100644 scripts/check-wrapper-headers.py
 rename {nptl_db => sysdeps/nptl}/proc_service.h (100%)
 rename {nptl_db => sysdeps/nptl}/thread_db.h (100%)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]