Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/303736/?format=api
{ "id": 303736, "url": "http://patchwork.ozlabs.org/api/patches/303736/?format=api", "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/1387485489-4186-12-git-send-email-clshotwe@rockwellcollins.com/", "project": { "id": 27, "url": "http://patchwork.ozlabs.org/api/projects/27/?format=api", "name": "Buildroot development", "link_name": "buildroot", "list_id": "buildroot.buildroot.org", "list_email": "buildroot@buildroot.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1387485489-4186-12-git-send-email-clshotwe@rockwellcollins.com>", "list_archive_url": null, "date": "2013-12-19T20:38:00", "name": "[v5,11/20] audit: new package", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "7115d093d499bdc81b79dd771b3c8fc70da748a7", "submitter": { "id": 38285, "url": "http://patchwork.ozlabs.org/api/people/38285/?format=api", "name": "Clayton Shotwell", "email": "clshotwe@rockwellcollins.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/1387485489-4186-12-git-send-email-clshotwe@rockwellcollins.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/303736/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/303736/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<buildroot-bounces@busybox.net>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "buildroot@lists.busybox.net" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "buildroot@osuosl.org" ], "Received": [ "from whitealder.osuosl.org (whitealder.osuosl.org\n\t[140.211.166.138])\n\tby ozlabs.org (Postfix) with ESMTP id 1A2FC2C0323\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 20 Dec 2013 07:41:36 +1100 (EST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 5FF5D8C991;\n\tThu, 19 Dec 2013 20:41:35 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id YABDyVXTfvga; Thu, 19 Dec 2013 20:41:10 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 74EA68CA01;\n\tThu, 19 Dec 2013 20:39:22 +0000 (UTC)", "from whitealder.osuosl.org (whitealder.osuosl.org\n\t[140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 078F41BF99B\n\tfor <buildroot@lists.busybox.net>;\n\tThu, 19 Dec 2013 20:39:20 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 06B388C7E7\n\tfor <buildroot@lists.busybox.net>;\n\tThu, 19 Dec 2013 20:39:20 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id HbKiTYIwRxvs for <buildroot@lists.busybox.net>;\n\tThu, 19 Dec 2013 20:38:50 +0000 (UTC)", "from secvs01.rockwellcollins.com (secvs01.rockwellcollins.com\n\t[205.175.225.240])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 8E5E98C5F7\n\tfor <buildroot@busybox.net>; Thu, 19 Dec 2013 20:38:40 +0000 (UTC)", "from nosuchhost.198.131.in-addr.arpa (HELO\n\tcollinscrsmtp01.rockwellcollins.com) ([131.198.63.132])\n\tby mail-virt.rockwellcollins.com with ESMTP;\n\t19 Dec 2013 14:38:24 -0600", "from nyx ([131.198.63.11])\n\tby collinscrsmtp01.rockwellcollins.com (Lotus Domino Release 8.5.2FP2\n\tHF162) with ESMTP id 2013121914382377-2990149 ;\n\tThu, 19 Dec 2013 14:38:23 -0600 " ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "From": "Clayton Shotwell <clshotwe@rockwellcollins.com>", "To": "buildroot@busybox.net", "Date": "Thu, 19 Dec 2013 14:38:00 -0600", "Message-Id": "<1387485489-4186-12-git-send-email-clshotwe@rockwellcollins.com>", "X-Mailer": "git-send-email 1.7.1", "In-Reply-To": "<1387485489-4186-1-git-send-email-clshotwe@rockwellcollins.com>", "References": "<1387485489-4186-1-git-send-email-clshotwe@rockwellcollins.com>", "X-MIMETrack": "Itemize by SMTP Server on\n\tCollinsCRSMTP01/CedarRapids/Collins/Rockwell(Release\n\t8.5.2FP2 HF162|May 16, 2011) at 12/19/2013 02:38:23 PM,\n\tSerialize by Router on\n\tCollinsCRSMTP01/CedarRapids/Collins/Rockwell(Release\n\t8.5.2FP2 HF162|May 16, 2011) at 12/19/2013 02:38:24 PM,\n\tSerialize complete at 12/19/2013 02:38:24 PM", "Cc": "Clayton Shotwell <clshotwe@rockwellcollins.com>", "Subject": "[Buildroot] [PATCH v5 11/20] audit: new package", "X-BeenThere": "buildroot@busybox.net", "X-Mailman-Version": "2.1.14", "Precedence": "list", "List-Id": "Discussion and development of buildroot <buildroot.busybox.net>", "List-Unsubscribe": "<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>", "List-Archive": "<http://lists.busybox.net/pipermail/buildroot>", "List-Post": "<mailto:buildroot@busybox.net>", "List-Help": "<mailto:buildroot-request@busybox.net?subject=help>", "List-Subscribe": "<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "buildroot-bounces@busybox.net", "Sender": "buildroot-bounces@busybox.net" }, "content": "Signed-off-by: Clayton Shotwell <clshotwe@rockwellcollins.com>\n---\nChanges v4 -> v5:\n - No changes.\nChanges v3 -> v4:\n - Added back in the Python bindings configure option instead of\n relying on a check to see if Python is enabled (suggested by\n Thomas).\n - Cleaned up the startup script installation step (suggested by\n Thomas).\n - Change the startup script order to launch the auditd first thing\n and also change the required shell to sh instead of bash.\n - Adding a dependency on comment BR2_TOOLCHAIN_USES_GLIBC\nChanges v2 -> v3:\n - Changed order of patch to correct dependency issue (suggested by Thomas).\n - Changes patch naming convention (suggested by Thomas).\n - Added upstream submission link for patch (suggested by Thomas).\nChanges v1 -> v2:\n - General cleanup to the mk file to conform to the standard format.\n - Fixed the patch naming to avoid using the version number.\n - Cleaned up the patch to include a signed-off-by line.\n - Changed the original Python select in the Config.in to be a check\n in the mk file.\n---\n package/Config.in | 1 +\n package/audit/Config.in | 24 +\n package/audit/S01auditd | 172 +++\n ...it-0001-cross-compile-header-creation-fix.patch | 1424 ++++++++++++++++++++\n package/audit/audit-0002-remove-zos-plugin.patch | 35 +\n package/audit/audit.mk | 61 +\n 6 files changed, 1717 insertions(+), 0 deletions(-)\n create mode 100644 package/audit/Config.in\n create mode 100755 package/audit/S01auditd\n create mode 100644 package/audit/audit-0001-cross-compile-header-creation-fix.patch\n create mode 100644 package/audit/audit-0002-remove-zos-plugin.patch\n create mode 100644 package/audit/audit.mk", "diff": "diff --git a/package/Config.in b/package/Config.in\nindex c4dc341..071048f 100644\n--- a/package/Config.in\n+++ b/package/Config.in\n@@ -982,6 +982,7 @@ endmenu\n menu \"System tools\"\n source \"package/acl/Config.in\"\n source \"package/attr/Config.in\"\n+source \"package/audit/Config.in\"\n if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS\n source \"package/bootutils/Config.in\"\n source \"package/coreutils/Config.in\"\ndiff --git a/package/audit/Config.in b/package/audit/Config.in\nnew file mode 100644\nindex 0000000..91b985d\n--- /dev/null\n+++ b/package/audit/Config.in\n@@ -0,0 +1,24 @@\n+config BR2_PACKAGE_AUDIT\n+\tbool \"audit\"\n+\tdepends on BR2_TOOLCHAIN_USES_GLIBC\n+\thelp\n+\t The audit package contains the user space utilities for\n+\t storing and searching the audit records generate by\n+\t the audit subsystem in the Linux 2.6 kernel\n+\t \n+\t Note: The z/OS remote plugin is disabled in this package\n+\t \n+\t http://people.redhat.com/sgrubb/audit/\n+\n+comment \"audit needs an (e)glibc toolchain\"\n+ depends on !BR2_TOOLCHAIN_USES_GLIBC\n+\n+if BR2_PACKAGE_AUDIT\n+\n+config BR2_PACKAGE_AUDIT_PYTHON_BINDINGS\n+\tselect BR2_PACKAGE_PYTHON\n+\tbool \"python bindings\"\n+\thelp\n+\t enable building python bindings\n+\n+endif\ndiff --git a/package/audit/S01auditd b/package/audit/S01auditd\nnew file mode 100755\nindex 0000000..23a7761\n--- /dev/null\n+++ b/package/audit/S01auditd\n@@ -0,0 +1,172 @@\n+#!/bin/sh\n+#\n+# auditd This starts and stops auditd\n+#\n+# description: This starts the Linux Auditing System Daemon, \\\n+# which collects security related events in a dedicated \\\n+# audit log. If this daemon is turned off, audit events \\\n+# will be sent to syslog.\n+#\n+# processname: /sbin/auditd\n+# config: /etc/sysconfig/auditd\n+# config: /etc/audit/auditd.conf\n+# pidfile: /var/run/auditd.pid\n+#\n+# Return values according to LSB for all commands but status:\n+# 0 - success\n+# 1 - generic or unspecified error\n+# 3 - unimplemented feature (e.g. \"reload\")\n+# 4 - insufficient privilege\n+# 5 - program is not installed\n+# 6 - program is not configured\n+# 7 - program is not running\n+#\n+prog=\"auditd\"\n+\n+# Check that we are root ... so non-root users stop here\n+test $EUID=0 || exit 4\n+\n+# Check config\n+test -f /etc/sysconfig/auditd && . /etc/sysconfig/auditd\n+\n+RETVAL=0\n+LOCK=/var/lock/subsys/auditd\n+\n+start(){\n+ echo -n \"Initializing $prog: \"\n+\n+ if [ ! -e $LOCK ]; then\n+ test -x /sbin/auditd || exit 5\n+ test -f /etc/audit/auditd.conf || exit 6\n+ \n+ # Create dir to store log files in if one doesn't exist\n+ test -d /var/log/audit || mkdir -p /var/log/audit && /sbin/restorecon /var/log/audit\n+ \n+ # Run audit daemon executable\n+ $prog\n+ RETVAL=$?\n+ if test $RETVAL = 0 ; then\n+ test -d /var/lock/subsys || mkdir -p /var/lock/subsys\n+ touch $LOCK\n+ # Load the default rules\n+ test -f /etc/audit/audit.rules && /sbin/auditctl -R /etc/audit/audit.rules >/dev/null\n+ echo \"OK\"\n+ else\n+ echo \"FAILED: auditd failed to start\"\n+ fi\n+ else\n+ echo \"FAILED: auditd already started, stop first\"\n+ RETVAL=1\n+ fi\n+ return $RETVAL\n+}\n+\n+stop(){\n+ echo -n \"Uninitializing $prog: \"\n+ if [ -e $LOCK ]; then\n+ killall -TERM $prog\n+ RETVAL=$?\n+ if [ $RETVAL ]; then\n+ rm -f $LOCK\n+ # Remove watches so shutdown works cleanly\n+ if test x\"$AUDITD_CLEAN_STOP\" != \"x\" ; then\n+ if test \"`echo $AUDITD_CLEAN_STOP | tr 'NO' 'no'`\" != \"no\"\n+ then\n+ /sbin/auditctl -D >/dev/null\n+ fi\n+ fi\n+ if test x\"$AUDITD_STOP_DISABLE\" != \"x\" ; then\n+ if test \"`echo $AUDITD_STOP_DISABLE | tr 'NO' 'no'`\" != \"no\"\n+ then\n+ /sbin/auditctl -e 0 >/dev/null\n+ fi\n+ fi\n+ echo \"OK\"\n+ else\n+ echo \"FAILED: auditd not stopped\"\n+ fi\n+ else\n+ echo \"FAILED: auditd not started\"\n+ RETVAL=1\n+ fi\n+ return $RETVAL\n+}\n+\n+reload(){\n+ echo -n \"Reloading auditd configuration: \"\n+ if [ -e $LOCK ]; then\n+ test -f /etc/audit/auditd.conf || exit 6\n+ echo -n \"Reloading configuration: \" \n+ killall -HUP $prog\n+ RETVAL=$?\n+ if [ $RETVAL ]; then\n+ echo \"OK\"\n+ else\n+ echo \"FAILED\"\n+ fi\n+ else\n+ echo \"FAILED: auditd not started\"\n+ RETVAL=1\n+ fi\n+ return $RETVAL\n+}\n+\n+rotate(){\n+ echo -n \"Rotating auditd logs: \" \n+ if [ -e $LOCK ]; then\n+ killall -USR1 $prog\n+ RETVAL=$?\n+ if [ $RETVAL ]; then\n+ echo \"OK\"\n+ else\n+ echo \"FAILED\"\n+ fi\n+ else\n+ echo \"FAILED: auditd not started\"\n+ RETVAL=1\n+ fi\n+ return $RETVAL\n+}\n+\n+restart(){\n+ test -f /etc/audit/auditd.conf || exit 6\n+ stop\n+ start\n+ return $RETVAL\n+}\n+\n+condrestart(){\n+ [ -e $LOCK ] && restart\n+ return 0\n+}\n+\n+# See how we were called.\n+case \"$1\" in\n+ start)\n+ start\n+ ;;\n+ stop)\n+ stop\n+ ;;\n+ restart)\n+ restart\n+ ;;\n+ reload)\n+ reload\n+ ;;\n+ rotate)\n+ rotate\n+ ;;\n+ resume)\n+ resume\n+ ;;\n+ condrestart)\n+ condrestart\n+ ;;\n+ *)\n+ echo \"Usage: $0 {start|stop|restart|condrestart|reload|rotate}\"\n+ RETVAL=3\n+ ;;\n+esac\n+\n+exit $RETVAL\ndiff --git a/package/audit/audit-0001-cross-compile-header-creation-fix.patch b/package/audit/audit-0001-cross-compile-header-creation-fix.patch\nnew file mode 100644\nindex 0000000..78df6ee\n--- /dev/null\n+++ b/package/audit/audit-0001-cross-compile-header-creation-fix.patch\n@@ -0,0 +1,1424 @@\n+Rework the build system to generate the required header files using a \n+Python script rather than compiling executables. This change has\n+to be made because the executables that are generated are built for\n+the target architecture and are generally not compilable on the host\n+build machine. \n+\n+The code has been submitted to the audit maintainers for review.\n+The first of three patches can be seen at the following link.\n+https://www.redhat.com/archives/linux-audit/2013-August/msg00043.html\n+\n+Signed-off-by Clayton Shotwell <clshotwe@rockwellcollins.com>\n+\n+diff -urN a/configure.ac b/configure.ac\n+--- a/configure.ac\t2013-07-29 16:37:01.000000000 -0500\n++++ b/configure.ac\t2013-08-21 13:29:55.760585744 -0500\n+@@ -51,11 +51,14 @@\n+ AC_PROG_CC\n+ AC_PROG_INSTALL\n+ AC_PROG_AWK\n++AM_PATH_PYTHON\n++AC_PYTHON_MODULE(pyparsing, 1)\n+ \n+ echo .\n+ echo Checking for header files\n+ AC_HEADER_STDC\n+ AC_HEADER_TIME\n++AC_CHECK_HEADER([Python.h])\n+ \n+ AC_C_CONST\n+ AC_C_INLINE\n+@@ -89,14 +92,13 @@\n+ \tAC_MSG_RESULT(no)\n+ else\n+ AC_MSG_RESULT(testing)\n+-AM_PATH_PYTHON\n+-if test -f /usr/include/python${am_cv_python_version}/Python.h ; then\n++if test x$ac_cv_header_Python_h != x ; then\n+ \tpython_found=\"yes\"\n+ \tAC_MSG_NOTICE(Python bindings will be built)\n+ else\n+ \tpython_found=\"no\"\n+ \tif test x$use_python = xyes ; then\n+-\t\tAC_MSG_ERROR([Python explicitly required and python headers found])\n++\t\tAC_MSG_ERROR([Python explicitly required and python headers not found])\n+ \telse\n+ \t\tAC_MSG_WARN(\"Python headers not found - python bindings will not be made\")\n+ \tfi\n+diff -urN a/bindings/python/Makefile.am b/bindings/python/Makefile.am\n+--- a/bindings/python/Makefile.am\t2013-07-29 16:37:00.000000000 -0500\n++++ b/bindings/python/Makefile.am\t2013-09-11 08:18:41.437704969 -0500\n+@@ -26,6 +26,6 @@\n+ pyexec_LTLIBRARIES = auparse.la\n+ \n+ auparse_la_SOURCES = auparse_python.c\n+-auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I/usr/include/python$(PYTHON_VERSION) -fno-strict-aliasing\n++auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -fno-strict-aliasing\n+ auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro\n+ auparse_la_LIBADD = ../../auparse/libauparse.la ../../lib/libaudit.la\n+diff -urN /dev/null b/m4/ax_python_module.m4\n+--- /dev/null\t2013-06-19 11:25:31.230442052 -0500\n++++ b/m4/ax_python_module.m4\t2013-08-21 12:43:56.829882655 -0500\n+@@ -0,0 +1,49 @@\n++# ===========================================================================\n++# http://www.gnu.org/software/autoconf-archive/ax_python_module.html\n++# ===========================================================================\n++#\n++# SYNOPSIS\n++#\n++# AX_PYTHON_MODULE(modname[, fatal])\n++#\n++# DESCRIPTION\n++#\n++# Checks for Python module.\n++#\n++# If fatal is non-empty then absence of a module will trigger an error.\n++#\n++# LICENSE\n++#\n++# Copyright (c) 2008 Andrew Collier\n++#\n++# Copying and distribution of this file, with or without modification, are\n++# permitted in any medium without royalty provided the copyright notice\n++# and this notice are preserved. This file is offered as-is, without any\n++# warranty.\n++\n++#serial 6\n++\n++AU_ALIAS([AC_PYTHON_MODULE], [AX_PYTHON_MODULE])\n++AC_DEFUN([AX_PYTHON_MODULE],[\n++ if test -z $PYTHON;\n++ then\n++ PYTHON=\"python\"\n++ fi\n++ PYTHON_NAME=`basename $PYTHON`\n++ AC_MSG_CHECKING($PYTHON_NAME module: $1)\n++\t$PYTHON -c \"import $1\" 2>/dev/null\n++\tif test $? -eq 0;\n++\tthen\n++\t\tAC_MSG_RESULT(yes)\n++\t\teval AS_TR_CPP(HAVE_PYMOD_$1)=yes\n++\telse\n++\t\tAC_MSG_RESULT(no)\n++\t\teval AS_TR_CPP(HAVE_PYMOD_$1)=no\n++\t\t#\n++\t\tif test -n \"$2\"\n++\t\tthen\n++\t\t\tAC_MSG_ERROR(failed to find required module $1)\n++\t\t\texit 1\n++\t\tfi\n++\tfi\n++])\n+diff -urN a/auparse/Makefile.am b/auparse/Makefile.am\n+--- a/auparse/Makefile.am\t2013-07-29 16:37:01.000000000 -0500\n++++ b/auparse/Makefile.am\t2013-08-19 14:37:31.230510790 -0500\n+@@ -52,8 +52,8 @@\n+ \trlimittabs.h recvtabs.h schedtabs.h seccomptabs.h \\\n+ \tseektabs.h shm_modetabs.h signaltabs.h sockoptnametabs.h \\\n+ \tsocktabs.h sockleveltabs.h socktypetabs.h \\\n+-\ttcpoptnametabs.h typetabs.h umounttabs.h\n+-noinst_PROGRAMS = gen_accesstabs_h gen_captabs_h gen_clock_h \\\n++\ttcpoptnametabs.h typetabs.h umounttabs.h \\\n++\tgen_accesstabs_h gen_captabs_h gen_clock_h \\\n+ \tgen_clone-flagtabs_h \\\n+ \tgen_epoll_ctls_h gen_famtabs_h \\\n+ \tgen_fcntl-cmdtabs_h gen_flagtabs_h \\\n+@@ -69,187 +69,184 @@\n+ \tgen_socktypetabs_h gen_tcpoptnametabs_h gen_typetabs_h \\\n+ \tgen_umounttabs_h\n+ \n+-gen_accesstabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h accesstab.h\n+-gen_accesstabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"accesstab.h\"'\n++gen_accesstabs_h: ../lib/gen_tables.c ../lib/gen_tables.h accesstab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"accesstab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ accesstabs.h: gen_accesstabs_h Makefile\n+-\t./gen_accesstabs_h --i2s-transtab access > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s-transtab access gen_accesstabs_h $@\n+ \n+-gen_captabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h captab.h\n+-gen_captabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"captab.h\"'\n++gen_captabs_h: ../lib/gen_tables.c ../lib/gen_tables.h captab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"captab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ captabs.h: gen_captabs_h Makefile\n+-\t./gen_captabs_h --i2s cap > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s cap gen_captabs_h $@\n+ \n+-gen_clock_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h clocktab.h\n+-gen_clock_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"clocktab.h\"'\n++gen_clock_h: ../lib/gen_tables.c ../lib/gen_tables.h clocktab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"clocktab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ clocktabs.h: gen_clock_h Makefile\n+-\t./gen_clock_h --i2s clock > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s clock gen_clock_h $@\n+ \n+-gen_clone_flagtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h \\\n+-\tclone-flagtab.h\n+-gen_clone_flagtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"clone-flagtab.h\"'\n++gen_clone-flagtabs_h: ../lib/gen_tables.c ../lib/gen_tables.h clone-flagtab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"clone-flagtab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ clone-flagtabs.h: gen_clone-flagtabs_h Makefile\n+-\t./gen_clone-flagtabs_h --i2s-transtab clone_flag > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s-transtab clone_flag gen_clone-flagtabs_h $@\n+ \n+-gen_epoll_ctls_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h epoll_ctl.h\n+-gen_epoll_ctls_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"epoll_ctl.h\"'\n++gen_epoll_ctls_h: ../lib/gen_tables.c ../lib/gen_tables.h epoll_ctl.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"epoll_ctl.h\\\" -E -o $@ ../lib/gen_tables.c\n+ epoll_ctls.h: gen_epoll_ctls_h Makefile\n+-\t./gen_epoll_ctls_h --i2s epoll_ctl > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s epoll_ctl gen_epoll_ctls_h $@\n+ \n+-gen_famtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h famtab.h\n+-gen_famtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"famtab.h\"'\n++gen_famtabs_h: ../lib/gen_tables.c ../lib/gen_tables.h famtab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"famtab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ famtabs.h: gen_famtabs_h Makefile\n+-\t./gen_famtabs_h --i2s fam > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s fam gen_famtabs_h $@\n+ \n+-gen_flagtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h flagtab.h\n+ # ../auparse/ is used to avoid using ../lib/flagtab.h\n+-gen_flagtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"../auparse/flagtab.h\"'\n++gen_flagtabs_h: ../lib/gen_tables.c ../lib/gen_tables.h ../auparse/flagtab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"../auparse/flagtab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ flagtabs.h: gen_flagtabs_h Makefile\n+-\t./gen_flagtabs_h --i2s-transtab flag > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s-transtab flag gen_flagtabs_h $@\n+ \n+-gen_fcntl_cmdtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h \\\n+-\tfcntl-cmdtab.h\n+-gen_fcntl_cmdtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"fcntl-cmdtab.h\"'\n++gen_fcntl-cmdtabs_h: ../lib/gen_tables.c ../lib/gen_tables.h fcntl-cmdtab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"fcntl-cmdtab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ fcntl-cmdtabs.h: gen_fcntl-cmdtabs_h Makefile\n+-\t./gen_fcntl-cmdtabs_h --i2s fcntl > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s fcntl gen_fcntl-cmdtabs_h $@\n+ \n+-gen_icmptypetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h icmptypetab.h\n+-gen_icmptypetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"icmptypetab.h\"'\n++gen_icmptypetabs_h: ../lib/gen_tables.c ../lib/gen_tables.h icmptypetab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"icmptypetab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ icmptypetabs.h: gen_icmptypetabs_h Makefile\n+-\t./gen_icmptypetabs_h --i2s icmptype > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s icmptype gen_icmptypetabs_h $@\n+ \n+-gen_ipctabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ipctab.h\n+-gen_ipctabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"ipctab.h\"'\n++gen_ipctabs_h: ../lib/gen_tables.c ../lib/gen_tables.h ipctab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"ipctab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ ipctabs.h: gen_ipctabs_h Makefile\n+-\t./gen_ipctabs_h --i2s ipc > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s ipc gen_ipctabs_h $@\n+ \n+-gen_ipccmdtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ipccmdtab.h\n+-gen_ipccmdtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"ipccmdtab.h\"'\n++gen_ipccmdtabs_h: ../lib/gen_tables.c ../lib/gen_tables.h ipccmdtab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"ipccmdtab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ ipccmdtabs.h: gen_ipccmdtabs_h Makefile\n+-\t./gen_ipccmdtabs_h --i2s-transtab ipccmd > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s-transtab ipccmd gen_ipccmdtabs_h $@\n+ \n+-gen_ipoptnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ipoptnametab.h\n+-gen_ipoptnametabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"ipoptnametab.h\"'\n++gen_ipoptnametabs_h: ../lib/gen_tables.c ../lib/gen_tables.h ipoptnametab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"ipoptnametab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ ipoptnametabs.h: gen_ipoptnametabs_h Makefile\n+-\t./gen_ipoptnametabs_h --i2s ipoptname > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s ipoptname gen_ipoptnametabs_h $@\n+ \n+-gen_ip6optnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ip6optnametab.h\n+-gen_ip6optnametabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"ip6optnametab.h\"'\n++gen_ip6optnametabs_h: ../lib/gen_tables.c ../lib/gen_tables.h ip6optnametab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"ip6optnametab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ ip6optnametabs.h: gen_ip6optnametabs_h Makefile\n+-\t./gen_ip6optnametabs_h --i2s ip6optname > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s ip6optname gen_ip6optnametabs_h $@\n+ \n+-gen_mmaptabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h mmaptab.h\n+-gen_mmaptabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"mmaptab.h\"'\n++gen_mmaptabs_h: ../lib/gen_tables.c ../lib/gen_tables.h mmaptab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"mmaptab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ mmaptabs.h: gen_mmaptabs_h Makefile\n+-\t./gen_mmaptabs_h --i2s-transtab mmap > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s-transtab mmap gen_mmaptabs_h $@\n+ \n+-gen_mounttabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h mounttab.h\n+-gen_mounttabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"mounttab.h\"'\n++gen_mounttabs_h: ../lib/gen_tables.c ../lib/gen_tables.h mounttab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"mounttab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ mounttabs.h: gen_mounttabs_h Makefile\n+-\t./gen_mounttabs_h --i2s-transtab mount > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s-transtab mount gen_mounttabs_h $@\n+ \n+-gen_nfprototabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h nfprototab.h\n+-gen_nfprototabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"nfprototab.h\"'\n++gen_nfprototabs_h: ../lib/gen_tables.c ../lib/gen_tables.h nfprototab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"nfprototab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ nfprototabs.h: gen_nfprototabs_h Makefile\n+-\t./gen_nfprototabs_h --i2s nfproto > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s nfproto gen_nfprototabs_h $@\n+ \n+-gen_open_flagtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h \\\n+-\topen-flagtab.h\n+-gen_open_flagtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"open-flagtab.h\"'\n++gen_open-flagtabs_h: ../lib/gen_tables.c ../lib/gen_tables.h open-flagtab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"open-flagtab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ open-flagtabs.h: gen_open-flagtabs_h Makefile\n+-\t./gen_open-flagtabs_h --i2s-transtab open_flag > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s-transtab open_flag gen_open-flagtabs_h $@\n+ \n+-gen_persontabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h persontab.h\n+-gen_persontabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"persontab.h\"'\n++gen_persontabs_h: ../lib/gen_tables.c ../lib/gen_tables.h persontab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"persontab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ persontabs.h: gen_persontabs_h Makefile\n+-\t./gen_persontabs_h --i2s person > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s person gen_persontabs_h $@\n+ \n+-gen_ptracetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ptracetab.h\n+-gen_ptracetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"ptracetab.h\"'\n++gen_ptracetabs_h: ../lib/gen_tables.c ../lib/gen_tables.h ptracetab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"ptracetab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ ptracetabs.h: gen_ptracetabs_h Makefile\n+-\t./gen_ptracetabs_h --i2s ptrace > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s ptrace gen_ptracetabs_h $@\n+ \n+-gen_prctl_opttabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h prctl-opt-tab.h\n+-gen_prctl_opttabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"prctl-opt-tab.h\"'\n++gen_prctl_opttabs_h: ../lib/gen_tables.c ../lib/gen_tables.h prctl-opt-tab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"prctl-opt-tab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ prctl_opttabs.h: gen_prctl_opttabs_h Makefile\n+-\t./gen_prctl_opttabs_h --i2s prctl_opt > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s prctl_opt gen_prctl_opttabs_h $@\n+ \n+-gen_pktoptnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h pktoptnametab.h\n+-gen_pktoptnametabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"pktoptnametab.h\"'\n++gen_pktoptnametabs_h: ../lib/gen_tables.c ../lib/gen_tables.h pktoptnametab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"pktoptnametab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ pktoptnametabs.h: gen_pktoptnametabs_h Makefile\n+-\t./gen_pktoptnametabs_h --i2s pktoptname > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s pktoptname gen_pktoptnametabs_h $@\n+ \n+-gen_prottabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h prottab.h\n+-gen_prottabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"prottab.h\"'\n++gen_prottabs_h: ../lib/gen_tables.c ../lib/gen_tables.h prottab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"prottab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ prottabs.h: gen_prottabs_h Makefile\n+-\t./gen_prottabs_h --i2s-transtab prot > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s-transtab prot gen_prottabs_h $@\n+ \n+-gen_recvtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h recvtab.h\n+-gen_recvtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"recvtab.h\"'\n++gen_recvtabs_h: ../lib/gen_tables.c ../lib/gen_tables.h recvtab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"recvtab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ recvtabs.h: gen_recvtabs_h Makefile\n+-\t./gen_recvtabs_h --i2s-transtab recv > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s-transtab recv gen_recvtabs_h $@\n+ \n+-gen_rlimit_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h rlimittab.h\n+-gen_rlimit_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"rlimittab.h\"'\n++gen_rlimit_h: ../lib/gen_tables.c ../lib/gen_tables.h rlimittab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"rlimittab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ rlimittabs.h: gen_rlimit_h Makefile\n+-\t./gen_rlimit_h --i2s rlimit > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s rlimit gen_rlimit_h $@\n+ \n+-gen_schedtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h schedtab.h\n+-gen_schedtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"schedtab.h\"'\n++gen_schedtabs_h: ../lib/gen_tables.c ../lib/gen_tables.h schedtab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"schedtab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ schedtabs.h: gen_schedtabs_h Makefile\n+-\t./gen_schedtabs_h --i2s sched > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s sched gen_schedtabs_h $@\n+ \n+-gen_seccomptabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h seccomptab.h\n+-gen_seccomptabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"seccomptab.h\"'\n++gen_seccomptabs_h: ../lib/gen_tables.c ../lib/gen_tables.h seccomptab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"seccomptab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ seccomptabs.h: gen_seccomptabs_h Makefile\n+-\t./gen_seccomptabs_h --i2s seccomp > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s seccomp gen_seccomptabs_h $@\n+ \n+-gen_seektabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h seektab.h\n+-gen_seektabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"seektab.h\"'\n++gen_seektabs_h: ../lib/gen_tables.c ../lib/gen_tables.h seektab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"seektab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ seektabs.h: gen_seektabs_h Makefile\n+-\t./gen_seektabs_h --i2s seek > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s seek gen_seektabs_h $@\n+ \n+-gen_shm_modetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h shm_modetab.h\n+-gen_shm_modetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"shm_modetab.h\"'\n++gen_shm_modetabs_h: ../lib/gen_tables.c ../lib/gen_tables.h shm_modetab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"shm_modetab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ shm_modetabs.h: gen_shm_modetabs_h Makefile\n+-\t./gen_shm_modetabs_h --i2s-transtab shm_mode > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s-transtab shm_mode gen_shm_modetabs_h $@\n+ \n+-gen_signals_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h signaltab.h\n+-gen_signals_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"signaltab.h\"'\n++gen_signals_h: ../lib/gen_tables.c ../lib/gen_tables.h signaltab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"signaltab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ signaltabs.h: gen_signals_h Makefile\n+-\t./gen_signals_h --i2s signal > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s signal gen_signals_h $@\n+ \n+-gen_sockleveltabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h sockleveltab.h\n+-gen_sockleveltabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"sockleveltab.h\"'\n++gen_sockleveltabs_h: ../lib/gen_tables.c ../lib/gen_tables.h sockleveltab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"sockleveltab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ sockleveltabs.h: gen_sockleveltabs_h Makefile\n+-\t./gen_sockleveltabs_h --i2s socklevel > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s socklevel gen_sockleveltabs_h $@\n+ \n+-gen_sockoptnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h sockoptnametab.h\n+-gen_sockoptnametabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"sockoptnametab.h\"'\n++gen_sockoptnametabs_h: ../lib/gen_tables.c ../lib/gen_tables.h sockoptnametab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"sockoptnametab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ sockoptnametabs.h: gen_sockoptnametabs_h Makefile\n+-\t./gen_sockoptnametabs_h --i2s sockoptname > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s sockoptname gen_sockoptnametabs_h $@\n+ \n+-gen_socktabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h socktab.h\n+-gen_socktabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"socktab.h\"'\n++gen_socktabs_h: ../lib/gen_tables.c ../lib/gen_tables.h socktab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"socktab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ socktabs.h: gen_socktabs_h Makefile\n+-\t./gen_socktabs_h --i2s sock > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s sock gen_socktabs_h $@\n+ \n+-gen_socktypetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h socktypetab.h\n+-gen_socktypetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"socktypetab.h\"'\n++gen_socktypetabs_h: ../lib/gen_tables.c ../lib/gen_tables.h socktypetab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"socktypetab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ socktypetabs.h: gen_socktypetabs_h Makefile\n+-\t./gen_socktypetabs_h --i2s sock_type > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s sock_type gen_socktypetabs_h $@\n+ \n+-gen_tcpoptnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h tcpoptnametab.h\n+-gen_tcpoptnametabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"tcpoptnametab.h\"'\n++gen_tcpoptnametabs_h: ../lib/gen_tables.c ../lib/gen_tables.h tcpoptnametab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"tcpoptnametab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ tcpoptnametabs.h: gen_tcpoptnametabs_h Makefile\n+-\t./gen_tcpoptnametabs_h --i2s tcpoptname > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s tcpoptname gen_tcpoptnametabs_h $@\n+ \n+-gen_typetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h typetab.h\n+-gen_typetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"typetab.h\"'\n++gen_typetabs_h: ../lib/gen_tables.c ../lib/gen_tables.h typetab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"typetab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ typetabs.h: gen_typetabs_h Makefile\n+-\t./gen_typetabs_h --s2i type > $@\n++\t$(PYTHON) ../lib/gen_tables.py --s2i type gen_typetabs_h $@\n+ \n+-gen_umounttabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h umounttab.h\n+-gen_umounttabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"umounttab.h\"'\n++gen_umounttabs_h: ../lib/gen_tables.c ../lib/gen_tables.h umounttab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"umounttab.h\\\" -E -o $@ ../lib/gen_tables.c\n+ umounttabs.h: gen_umounttabs_h Makefile\n+-\t./gen_umounttabs_h --i2s-transtab umount > $@\n++\t$(PYTHON) ../lib/gen_tables.py --i2s-transtab umount gen_umounttabs_h $@\n+ \n+diff -urN a/lib/gen_tables.c b/lib/gen_tables.c\n+--- a/lib/gen_tables.c\t2013-07-29 16:37:01.000000000 -0500\n++++ b/lib/gen_tables.c\t2013-08-19 10:09:03.060041420 -0500\n+@@ -54,19 +54,6 @@\n+ #define SHMGET 23\n+ #define SHMCTL 24\n+ \n+-\n+-/* The ratio of table size to number of non-empty elements allowed for a\n+- \"direct\" s2i table; if the ratio would be bigger, bsearch tables are used\n+- instead.\n+-\n+- 2 looks like a lot at a first glance, but the bsearch tables need twice as\n+- much space per element, so with the ratio equal to 2 the direct table uses\n+- no more memory and is faster. */\n+-#define DIRECT_THRESHOLD 2\n+-\n+-/* Allow more than one string defined for a single integer value */\n+-static bool allow_duplicate_ints; /* = false; */\n+-\n+ struct value {\n+ \tint val;\n+ \tconst char *s;\n+@@ -83,335 +70,11 @@\n+ \n+ #define NUM_VALUES (sizeof(values) / sizeof(*values))\n+ \n+-/* Compare two \"struct value\" members by name. */\n+-static int\n+-cmp_value_strings(const void *xa, const void *xb)\n+-{\n+-\tconst struct value *a, *b;\n+-\n+-\ta = xa;\n+-\tb = xb;\n+-\treturn strcmp(a->s, b->s);\n+-}\n+-\n+-/* Compare two \"struct value\" members by value. */\n+-static int\n+-cmp_value_vals(const void *xa, const void *xb)\n+-{\n+-\tconst struct value *a, *b;\n+-\n+-\ta = xa;\n+-\tb = xb;\n+-\tif (a->val > b->val)\n+-\t\treturn 1;\n+-\tif (a->val < b->val)\n+-\t\treturn -1;\n+-\t/* Preserve the original order if there is an ambiguity, to always use\n+-\t the first specified value. */\n+-\tif (a->orig_index > b->orig_index)\n+-\t\treturn 1;\n+-\tif (a->orig_index < b->orig_index)\n+-\t\treturn -1;\n+-\treturn 0;\n+-}\n+-\n+-/* Compare two \"struct value\" members by orig_index. */\n+-static int\n+-cmp_value_orig_index(const void *xa, const void *xb)\n+-{\n+-\tconst struct value *a, *b;\n+-\n+-\ta = xa;\n+-\tb = xb;\n+-\tif (a->orig_index > b->orig_index)\n+-\t\treturn 1;\n+-\tif (a->orig_index < b->orig_index)\n+-\t\treturn -1;\n+-\treturn 0;\n+-}\n+-\n+-/* Output the string table, initialize values[*]->s_offset. */\n+-static void\n+-output_strings(const char *prefix)\n+-{\n+-\tsize_t i, offset;\n+-\n+-\toffset = 0;\n+-\tfor (i = 0; i < NUM_VALUES; i++) {\n+-\t\tvalues[i].s_offset = offset;\n+-\t\toffset += strlen(values[i].s) + 1;\n+-\t}\n+-\tprintf(\"static const char %s_strings[] = \\\"\", prefix);\n+-\tassert(NUM_VALUES > 0);\n+-\tfor (i = 0; i < NUM_VALUES; i++) {\n+-\t\tconst char *c;\n+-\n+-\t\tif (i != 0 && i % 10 == 0)\n+-\t\t\tfputs(\"\\\"\\n\"\n+-\t\t\t \"\\t\\\"\", stdout);\n+-\t\tfor (c = values[i].s; *c != '\\0'; c++) {\n+-\t\t\tassert(*c != '\"' && *c != '\\\\'\n+-\t\t\t && isprint((unsigned char)*c));\n+-\t\t\tputc(*c, stdout);\n+-\t\t}\n+-\t\tif (i != NUM_VALUES - 1)\n+-\t\t\tfputs(\"\\\\0\", stdout);\n+-\t}\n+-\tfputs(\"\\\";\\n\", stdout);\n+-}\n+-\n+-/* Output the string to integer mapping code.\n+- Assume strings are all uppsercase or all lowercase if specified by\n+- parameters; in that case, make the search case-insensitive.\n+- values must be sorted by strings. */\n+-static void\n+-output_s2i(const char *prefix, bool uppercase, bool lowercase)\n+-{\n+-\tsize_t i;\n+-\n+-\tfor (i = 0; i < NUM_VALUES - 1; i++) {\n+-\t\tassert(strcmp(values[i].s, values[i + 1].s) <= 0);\n+-\t\tif (strcmp(values[i].s, values[i + 1].s) == 0) {\n+-\t\t\tfprintf(stderr, \"Duplicate value `%s': %d, %d\\n\",\n+-\t\t\t\tvalues[i].s, values[i].val, values[i + 1].val);\n+-\t\t\tabort();\n+-\t\t}\n+-\t}\n+-\tprintf(\"static const unsigned %s_s2i_s[] = {\", prefix);\n+-\tfor (i = 0; i < NUM_VALUES; i++) {\n+-\t\tif (i % 10 == 0)\n+-\t\t\tfputs(\"\\n\\t\", stdout);\n+-\t\tassert(values[i].s_offset <= UINT_MAX);\n+-\t\tprintf(\"%zu,\", values[i].s_offset);\n+-\t}\n+-\tprintf(\"\\n\"\n+-\t \"};\\n\"\n+-\t \"static const int %s_s2i_i[] = {\", prefix);\n+-\tfor (i = 0; i < NUM_VALUES; i++) {\n+-\t\tif (i % 10 == 0)\n+-\t\t\tfputs(\"\\n\\t\", stdout);\n+-\t\tprintf(\"%d,\", values[i].val);\n+-\t}\n+-\tfputs(\"\\n\"\n+-\t \"};\\n\", stdout);\n+-\tassert(!(uppercase && lowercase));\n+-\tif (uppercase) {\n+-\t\tfor (i = 0; i < NUM_VALUES; i++) {\n+-\t\t\tconst char *c;\n+-\n+-\t\t\tfor (c = values[i].s; *c != '\\0'; c++)\n+-\t\t\t\tassert(isascii((unsigned char)*c)\n+-\t\t\t\t && !GT_ISLOWER(*c));\n+-\t\t}\n+-\t} else if (lowercase) {\n+-\t\tfor (i = 0; i < NUM_VALUES; i++) {\n+-\t\t\tconst char *c;\n+-\n+-\t\t\tfor (c = values[i].s; *c != '\\0'; c++)\n+-\t\t\t\tassert(isascii((unsigned char)*c)\n+-\t\t\t\t && !GT_ISUPPER(*c));\n+-\t\t}\n+-\t}\n+-\tif (uppercase || lowercase) {\n+-\t\tprintf(\"static int %s_s2i(const char *s, int *value) {\\n\"\n+-\t\t \"\\tsize_t len, i;\\n\"\n+-\t\t \"\\tlen = strlen(s);\\n\"\n+-\t\t \"\\t{ char copy[len + 1];\\n\"\n+-\t\t \"\\tfor (i = 0; i < len; i++) {\\n\"\n+-\t\t \"\\t\\tchar c = s[i];\\n\", prefix);\n+-\t\tif (uppercase)\n+-\t\t\tfputs(\"\\t\\tcopy[i] = GT_ISLOWER(c) ? c - 'a' + 'A' \"\n+-\t\t\t\t\t\t\t \": c;\\n\", stdout);\n+-\t\telse\n+-\t\t\tfputs(\"\\t\\tcopy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' \"\n+-\t\t\t\t\t\t\t \": c;\\n\", stdout);\n+-\t\tprintf(\"\\t}\\n\"\n+-\t\t \"\\tcopy[i] = 0;\\n\"\n+-\t\t \"\\treturn s2i__(%s_strings, %s_s2i_s, %s_s2i_i, %zu, \"\n+-\t\t\t\t \"copy, value);\\n\"\n+-\t\t \"\\t}\\n\"\n+-\t\t \"}\\n\", prefix, prefix, prefix, NUM_VALUES);\n+-\t} else\n+-\t\tprintf(\"static int %s_s2i(const char *s, int *value) {\\n\"\n+-\t\t \"\\treturn s2i__(%s_strings, %s_s2i_s, %s_s2i_i, %zu, s, \"\n+-\t\t\t\t \"value);\\n\"\n+-\t\t \"}\\n\", prefix, prefix, prefix, prefix, NUM_VALUES);\n+-}\n+-\n+-/* Output the string to integer mapping table.\n+- values must be sorted by strings. */\n+-static void\n+-output_i2s(const char *prefix)\n+-{\n+-\tstruct value *unique_values;\n+-\tint min_val, max_val;\n+-\tsize_t i, n;\n+-\n+-\tassert(NUM_VALUES > 0);\n+-\tfor (i = 0; i < NUM_VALUES - 1; i++) {\n+-\t\tassert(values[i].val <= values[i + 1].val);\n+-\t\tif (!allow_duplicate_ints\n+-\t\t && values[i].val == values[i + 1].val) {\n+-\t\t\tfprintf(stderr, \"Duplicate value %d: `%s', `%s'\\n\",\n+-\t\t\t\tvalues[i].val, values[i].s, values[i + 1].s);\n+-\t\t\tabort();\n+-\t\t}\n+-\t}\n+-\n+-\tunique_values = malloc(NUM_VALUES * sizeof(*unique_values));\n+-\tassert(unique_values != NULL);\n+-\tn = 0;\n+-\tfor (i = 0; i < NUM_VALUES; i++) {\n+-\t\tif (n == 0 || unique_values[n - 1].val != values[i].val) {\n+-\t\t\tunique_values[n] = values[i];\n+-\t\t\tn++;\n+-\t\t}\n+-\t}\n+-\n+-\tmin_val = unique_values[0].val;\n+-\tmax_val = unique_values[n - 1].val;\n+-\tif (((double)max_val - (double)min_val) / n <= DIRECT_THRESHOLD) {\n+-\t\tint next_index;\n+-\n+-\t\tprintf(\"static const unsigned %s_i2s_direct[] = {\", prefix);\n+-\t\tnext_index = min_val;\n+-\t\ti = 0;\n+-\t\tfor (;;) {\n+-\t\t\tif ((next_index - min_val) % 10 == 0)\n+-\t\t\t\tfputs(\"\\n\\t\", stdout);\n+-\t\t\twhile (unique_values[i].val < next_index)\n+-\t\t\t\t/* This can happen if (allow_duplicate_ints) */\n+-\t\t\t\ti++;\n+-\t\t\tif (unique_values[i].val == next_index) {\n+-\t\t\t\tassert(unique_values[i].s_offset <= UINT_MAX);\n+-\t\t\t\tprintf(\"%zu,\", unique_values[i].s_offset);\n+-\t\t\t} else\n+-\t\t\t\tfputs(\"-1u,\", stdout);\n+-\t\t\tif (next_index == max_val)\n+-\t\t\t\t/* Done like this to avoid integer overflow */\n+-\t\t\t\tbreak;\n+-\t\t\tnext_index++;\n+-\t\t}\n+-\t\tprintf(\"\\n\"\n+-\t\t \"};\\n\"\n+-\t\t \"static const char *%s_i2s(int v) {\\n\"\n+-\t\t \"\\treturn i2s_direct__(%s_strings, %s_i2s_direct, %d, \"\n+-\t\t\t\t\t \"%d, v);\\n\"\n+-\t\t \"}\\n\", prefix, prefix, prefix, min_val, max_val);\n+-\t} else {\n+-\t\tprintf(\"static const int %s_i2s_i[] = {\", prefix);\n+-\t\tfor (i = 0; i < n; i++) {\n+-\t\t\tif (i % 10 == 0)\n+-\t\t\t\tfputs(\"\\n\\t\", stdout);\n+-\t\t\tprintf(\"%d,\", unique_values[i].val);\n+-\t\t}\n+-\t\tprintf(\"\\n\"\n+-\t\t \"};\\n\"\n+-\t\t \"static const unsigned %s_i2s_s[] = {\", prefix);\n+-\t\tfor (i = 0; i < n; i++) {\n+-\t\t\tif (i % 10 == 0)\n+-\t\t\t\tfputs(\"\\n\\t\", stdout);\n+-\t\t\tassert(unique_values[i].s_offset <= UINT_MAX);\n+-\t\t\tprintf(\"%zu,\", unique_values[i].s_offset);\n+-\t\t}\n+-\t\tprintf(\"\\n\"\n+-\t\t \"};\\n\"\n+-\t\t \"static const char *%s_i2s(int v) {\\n\"\n+-\t\t \"\\treturn i2s_bsearch__(%s_strings, %s_i2s_i, %s_i2s_s, \"\n+-\t\t\t \"%zu, v);\\n\"\n+-\t\t \"}\\n\", prefix, prefix, prefix, prefix, n);\n+-\t}\n+-\tfree(unique_values);\n+-}\n+-\n+-/* Output the string to integer mapping table as a transtab[].\n+- values must be sorted in the desired order. */\n+-static void\n+-output_i2s_transtab(const char *prefix)\n+-{\n+-\tsize_t i;\n+-\tchar *uc_prefix;\n+-\n+-\tprintf(\"static const struct transtab %s_table[] = {\", prefix);\n+-\tfor (i = 0; i < NUM_VALUES; i++) {\n+-\t\tif (i % 10 == 0)\n+-\t\t\tfputs(\"\\n\\t\", stdout);\n+-\t\tprintf(\"{%d,%zu},\", values[i].val, values[i].s_offset);\n+-\t}\n+-\tuc_prefix = strdup(prefix);\n+-\tassert(uc_prefix != NULL);\n+-\tfor (i = 0; uc_prefix[i] != '\\0'; i++)\n+-\t\tuc_prefix[i] = toupper((unsigned char)uc_prefix[i]);\n+-\tprintf(\"\\n\"\n+-\t \"};\\n\"\n+-\t \"#define %s_NUM_ENTRIES \"\n+-\t \"(sizeof(%s_table) / sizeof(*%s_table))\\n\", uc_prefix, prefix,\n+-\t prefix);\n+-\tfree(uc_prefix);\n+-}\n+-\n+ int\n+ main(int argc, char **argv)\n+ {\n+-\tbool gen_i2s, gen_i2s_transtab, gen_s2i, uppercase, lowercase;\n+-\tchar *prefix;\n+-\tsize_t i;\n+-\n+ \t/* This is required by gen_tables.h */\n+ \tassert(NUM_VALUES <= (SSIZE_MAX / 2 + 1));\n+ \n+-\t/* To make sure GT_ISUPPER and GT_ISLOWER work. */\n+-\tassert('Z' == 'A' + 25 && 'z' == 'a' + 25);\n+-\tgen_i2s = false;\n+-\tgen_i2s_transtab = false;\n+-\tgen_s2i = false;\n+-\tuppercase = false;\n+-\tlowercase = false;\n+-\tprefix = NULL;\n+-\tassert (argc > 1);\n+-\tfor (i = 1; i < (size_t)argc; i++) {\n+-\t\tif (strcmp(argv[i], \"--i2s\") == 0)\n+-\t\t\tgen_i2s = true;\n+-\t\telse if (strcmp(argv[i], \"--i2s-transtab\") == 0)\n+-\t\t\tgen_i2s_transtab = true;\n+-\t\telse if (strcmp(argv[i], \"--s2i\") == 0)\n+-\t\t\tgen_s2i = true;\n+-\t\telse if (strcmp(argv[i], \"--uppercase\") == 0)\n+-\t\t\tuppercase = true;\n+-\t\telse if (strcmp(argv[i], \"--lowercase\") == 0)\n+-\t\t\tlowercase = true;\n+-\t\telse if (strcmp(argv[i], \"--duplicate-ints\") == 0)\n+-\t\t\tallow_duplicate_ints = true;\n+-\t\telse {\n+-\t\t\tassert(*argv[i] != '-');\n+-\t\t\tassert(prefix == NULL);\n+-\t\t\tprefix = argv[i];\n+-\t\t}\n+-\t}\n+-\tassert(prefix != NULL);\n+-\tassert(!(uppercase && lowercase));\n+-\n+-\tprintf(\"/* This is a generated file, see Makefile.am for its \"\n+-\t \"inputs. */\\n\");\n+-\tfor (i = 0; i < NUM_VALUES; i++)\n+-\t\tvalues[i].orig_index = i;\n+-\tqsort(values, NUM_VALUES, sizeof(*values), cmp_value_strings);\n+-\t/* FIXME? if (gen_s2i), sort the strings in some other order\n+-\t (e.g. \"first 4 nodes in BFS of the bsearch tree first\") to use the\n+-\t cache better. */\n+-\t/* FIXME? If the only thing generated is a transtab, keep the strings\n+-\t in the original order to use the cache better. */\n+-\toutput_strings(prefix);\n+-\tif (gen_s2i)\n+-\t\toutput_s2i(prefix, uppercase, lowercase);\n+-\tif (gen_i2s) {\n+-\t\tqsort(values, NUM_VALUES, sizeof(*values), cmp_value_vals);\n+-\t\toutput_i2s(prefix);\n+-\t}\n+-\tif (gen_i2s_transtab) {\n+-\t\tqsort(values, NUM_VALUES, sizeof(*values),\n+-\t\t cmp_value_orig_index);\n+-\t\toutput_i2s_transtab(prefix);\n+-\t}\n+ \treturn EXIT_SUCCESS;\n+ }\n+diff -urN /dev/null b/lib/gen_tables.py\n+--- /dev/null\t2013-06-19 11:25:31.230442052 -0500\n++++ b/lib/gen_tables.py\t2013-08-19 14:27:55.639872141 -0500\n+@@ -0,0 +1,458 @@\n++#!/usr/bin/python\n++################################################################################\n++# Copyright 2013, Rockwell Collins. All rights reserved.\n++# \n++# This library is free software; you can redistribute it and/or\n++# modify it under the terms of the GNU Lesser General Public\n++# License as published by the Free Software Foundation; either\n++# version 2.1 of the License, or (at your option) any later version.\n++# \n++# This library is distributed in the hope that it will be useful,\n++# but WITHOUT ANY WARRANTY; without even the implied warranty of\n++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n++# Lesser General Public License for more details.\n++# \n++# You should have received a copy of the GNU Lesser General Public\n++# License along with this library; if not, write to the Free Software\n++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n++# \n++# Authors:\n++# Clayton Shotwell <clshotwe@rockwellcollins.com>\n++#\n++# Description:\n++# Generator of lookup tables to replace the gen_tables.c method developed\n++# Miloslav Trmac <mitr@redhat.com> to make audit package cross compilable.\n++# The logic in this script mimics the logic in gen_tables.c before the last\n++# modification.\n++#\n++# Usage: gen_tables.py [-h] [--i2s] [--i2s-transtab] [--s2i]\n++# [--uppercase | --lowercase] [--duplicate-ints]\n++# prefix header source output\n++#\n++# Generate tables header files.\n++#\n++# positional arguments:\n++# prefix The prefix of the output file to use\n++# header The header file to parse table values from\n++# source The source of the preprocessor from the compiler\n++# output The output header file\n++#\n++# optional arguments:\n++# -h, --help show this help message and exit\n++# --i2s Generate i2s tables\n++# --i2s-transtab Generate transtab tables\n++# --s2i Generate s2i tables\n++# --uppercase All characters are uppercase\n++# --lowercase All characters are lowercase\n++# --duplicate-ints Allow duplicate integers\n++\n++import argparse\n++import ctypes\n++import os\n++import re\n++import sys\n++from operator import attrgetter\n++from pyparsing import Group, Word, Suppress, alphas, alphanums, nums, cppStyleComment, \\\n++\t\tOptional, ZeroOrMore\n++\n++# Number of entries to print per line\n++NUM_ENTIRES_IN_LINE = 10\n++\n++# Global table entries variable that is used everywhere\n++ENTRIES = []\n++\n++# The ratio of table size to number of non-empty elements allowed for a\n++# \"direct\" s2i table; if the ratio would be bigger, bsearch tables are used\n++# instead.\n++# \n++# 2 looks like a lot at a first glance, but the bsearch tables need twice as\n++# much space per element, so with the ratio equal to 2 the direct table uses\n++# no more memory and is faster.\n++DIRECT_THRESHOLD = 2\n++\n++# Set to True to enable some debug output\n++DEBUG = False\n++\n++class Entry:\n++\tdef __init__(self, new_s, val):\n++\t\tself.st = new_s\n++\t\tself.val = val\n++\t\tself.offset = 0\n++\t\tself.orig_index = 0\n++\t\n++\tdef set_position(self, offset):\n++\t\tself.offset = offset\n++\t\n++\tdef set_orig_index(self, orig_index):\n++\t\tself.orig_index = orig_index\n++\t\n++\tdef get_str(self):\n++\t\treturn self.st\n++\t\n++\tdef __repr__(self):\n++\t\treturn \"<Entry st=%s val=%s>\" % (self.st, self.val)\n++\t\n++\tdef __str__(self):\n++\t\treturn \"Entry of st=%s, val=%s, offset=%d, orig_index=%d\" % \\\n++\t\t\t\t(self.st, self.val, self.offset, self.orig_index)\n++\n++def output_strings(prefix, outfile):\n++\ttry:\n++\t\t# Calculate the position each entry will be in the string\n++\t\tindex = 0\n++\t\tfor i in range(len(ENTRIES)):\n++\t\t\tENTRIES[i].set_position(index)\n++\t\t\t# Increment the index by the length of the name plus 1 for the null\n++\t\t\t# character at the end.\n++\t\t\tindex += len(ENTRIES[i].get_str()) + 1\n++\t\t# Write out the strings\n++\t\toutfile.write(\"static const char %s_strings[] = \\\"\" % prefix)\n++\t\tfor i in range(len(ENTRIES)):\n++\t\t\tif (i != 0) and (i % NUM_ENTIRES_IN_LINE == 0):\n++\t\t\t\toutfile.write('\"\\n\\t\"')\n++\t\t\toutfile.write(ENTRIES[i].get_str())\n++\t\t\tif (i != (len(ENTRIES) - 1)):\n++\t\t\t\toutfile.write('\\\\0')\n++\t\toutfile.write('\";\\n')\n++\texcept:\n++\t\t# If an error is found, raise the exception so the main function can close\n++\t\t# and delete the outfile\n++\t\texc_type, exc_obj, exc_tb = sys.exc_info()\n++\t\tfname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]\n++\t\tprint(\"Unexpected error in output_strings:\", exc_type, fname, exc_tb.tb_lineno)\n++\t\traise\n++\n++def output_s2i(prefix, outfile, uppercase, lowercase):\n++\ttry:\n++\t\t# Check for duplicate values\n++\t\tfor i in range(len(ENTRIES) - 1):\n++\t\t\tassert (ENTRIES[i].get_str() <= ENTRIES[i + 1].get_str()), \"Entries not in the correct order\"\n++\t\t\tif (ENTRIES[i].get_str() == ENTRIES[i + 1].get_str()):\n++\t\t\t\tprint(\"Duplicate value %s: %d, %d\" % \\\n++\t\t\t\t\t\t(ENTRIES[i].get_str(), ENTRIES[i].val, ENTRIES[i + 1].val))\n++\t\t\t\traise\n++\t\t\n++\t\t# Write out the index to value index values\n++\t\toutfile.write(\"static const unsigned %s_s2i_s[] = {\" % prefix)\n++\t\tfor i in range(len(ENTRIES)):\n++\t\t\tif (i % NUM_ENTIRES_IN_LINE == 0):\n++\t\t\t\toutfile.write('\\n\\t')\n++\t\t\toutfile.write(\"%i,\" % ENTRIES[i].offset)\n++\t\toutfile.write('\\n};\\n')\n++\t\t\n++\t\t# Write out the string to value actual values\n++\t\toutfile.write(\"static const int %s_s2i_i[] = {\" % prefix)\n++\t\tfor i in range(len(ENTRIES)):\n++\t\t\tif (i % NUM_ENTIRES_IN_LINE == 0):\n++\t\t\t\toutfile.write('\\n\\t')\n++\t\t\toutfile.write(\"%i,\" % ENTRIES[i].val)\n++\t\toutfile.write('\\n};\\n')\n++\t\t\n++\t\t# Verify the strings are all uppercase or lowercase depending on the arguments\n++\t\t# passed in\n++\t\tif uppercase:\n++\t\t\tfor i in range(len(ENTRIES)):\n++\t\t\t\tassert (all(ord(c) < 128 for c in ENTRIES[i].get_str()) and \\\n++\t\t\t\t\t\tENTRIES[i].get_str().isupper()), \"String %s is not uppercase\" % ENTRIES[i].get_str()\n++\t\tif lowercase:\n++\t\t\tfor i in range(len(ENTRIES)):\n++\t\t\t\tassert (all(ord(c) < 128 for c in ENTRIES[i].get_str()) and \\\n++\t\t\t\t\t\tENTRIES[i].get_str().islower()), \"String %s is not lowercase\" % ENTRIES[i].get_str()\n++\t\tif uppercase or lowercase:\n++\t\t\toutfile.write(\"static int %s_s2i(const char *s, int *value) {\\n\" \\\n++\t\t\t\t\t\"\\tsize_t len, i;\\n\" \\\n++\t\t\t\t\t\"\\tlen = strlen(s);\\n\" \\\n++\t\t\t\t\t\"\\t{ char copy[len + 1];\\n\" \\\n++\t\t\t\t\t\"\\tfor (i = 0; i < len; i++) {\\n\" \\\n++\t\t\t\t\t\"\\t\\tchar c = s[i];\\n\" % prefix)\n++\t\t\tif uppercase:\n++\t\t\t\toutfile.write(\"\\t\\tcopy[i] = GT_ISLOWER(c) ? c - 'a' + 'A' : c;\\n\")\n++\t\t\telse:\n++\t\t\t\toutfile.write(\"\\t\\tcopy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c;\\n\")\n++\t\t\toutfile.write(\"\\t}\\n\" \\\n++\t\t\t\t\t\"\\tcopy[i] = 0;\\n\" \\\n++\t\t\t\t\t\"\\treturn s2i__(%s_strings, %s_s2i_s, %s_s2i_i, %d, copy, value);\\n\" \\\n++\t\t\t\t\t\"\\t}\\n\" \\\n++\t\t\t\t\t\"}\\n\" % (prefix, prefix, prefix, len(ENTRIES)))\n++\t\telse:\n++\t\t\toutfile.write(\"static int %s_s2i(const char *s, int *value) {\\n\" \\\n++\t\t\t\t\t\"\\treturn s2i__(%s_strings, %s_s2i_s, %s_s2i_i, %d, s, value);\\n\" \\\n++\t\t\t\t\t\"}\\n\" % (prefix, prefix, prefix, prefix, len(ENTRIES)))\n++\texcept:\n++\t\t# If an error is found, raise the exception so the main function can close\n++\t\t# and delete the outfile\n++\t\texc_type, exc_obj, exc_tb = sys.exc_info()\n++\t\tfname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]\n++\t\tprint(\"Unexpected error in output_s2i:\", exc_type, fname, exc_tb.tb_lineno)\n++\t\traise\n++\n++def output_i2s(prefix, outfile, allow_duplicate_ints):\n++\ttry:\n++\t\t# Check for duplicate values\n++\t\tfor i in range(len(ENTRIES) - 1):\n++\t\t\tassert (ENTRIES[i].val <= ENTRIES[i + 1].val), \"Entries not in the correct order\"\n++\t\t\tif (not allow_duplicate_ints) and (ENTRIES[i].val == ENTRIES[i + 1].val):\n++\t\t\t\tprint(\"Duplicate value %d: %s, %s\" % (ENTRIES[i].val, ENTRIES[i].get_str(), \\\n++\t\t\t\t\t\tENTRIES[i + 1].get_str()))\n++\t\t\t\traise\n++\t\t\n++\t\t# Find all of the unique values\n++\t\tunique_entries = []\n++\t\tfor i in range(len(ENTRIES)):\n++\t\t\t# If the unique_entries is empty or the last unique_entries entry is different from the \n++\t\t\t# entry being compared, append the entry\n++\t\t\tif (len(unique_entries) == 0) or (unique_entries[-1].val != ENTRIES[i].val):\n++\t\t\t\tunique_entries.append(ENTRIES[i])\n++\t\t\n++\t\t# Determine which mapping to use based on the treshold\n++\t\tmax_val = unique_entries[-1].val\n++\t\tmin_val = unique_entries[0].val\n++\t\tif ((float(max_val - min_val)/len(unique_entries)) <= DIRECT_THRESHOLD):\n++\t\t\toutfile.write(\"static const unsigned %s_i2s_direct[] = {\" % prefix)\n++\t\t\tnext_index = min_val\n++\t\t\ti = 0\n++\t\t\twhile True:\n++\t\t\t\tif (((next_index - min_val) % 10) == 0):\n++\t\t\t\t\toutfile.write(\"\\n\\t\")\n++\t\t\t\twhile (unique_entries[i].val < next_index):\n++\t\t\t\t\t# This can happen if (allow_duplicate_ints)\n++\t\t\t\t\ti += 1\n++\t\t\t\tif (unique_entries[i].val == next_index):\n++\t\t\t\t\tassert(unique_entries[i].offset <= sys.maxint)\n++\t\t\t\t\toutfile.write(\"%i,\" % unique_entries[i].offset)\n++\t\t\t\telse:\n++\t\t\t\t\toutfile.write(\"-1u,\")\n++\t\t\t\tif (next_index == max_val):\n++\t\t\t\t\tbreak\n++\t\t\t\tnext_index += 1\n++\t\t\toutfile.write(\"\\n};\\nstatic const char *%s_i2s(int v) {\\n\" \\\n++\t\t\t\t\t\"\\treturn i2s_direct__(%s_strings, %s_i2s_direct, %d, %d, v);\\n\" \\\n++\t\t\t\t\t\"}\\n\" % (prefix, prefix, prefix, min_val, max_val))\n++\t\telse:\n++\t\t\toutfile.write(\"static const int %s_i2s_i[] = {\" % prefix)\n++\t\t\tfor i in range(len(unique_entries)):\n++\t\t\t\tif (i % 10 == 0):\n++\t\t\t\t\toutfile.write(\"\\n\\t\")\n++\t\t\t\toutfile.write(\"%i,\" % unique_entries[i].val)\n++\t\t\toutfile.write(\"\\n};\\nstatic const unsigned %s_i2s_s[] = {\" % prefix)\n++\t\t\tfor i in range(len(unique_entries)):\n++\t\t\t\tif (i % 10 == 0):\n++\t\t\t\t\toutfile.write(\"\\n\\t\")\n++\t\t\t\tassert(unique_entries[i].offset <= sys.maxint)\n++\t\t\t\toutfile.write(\"%i,\" % unique_entries[i].offset)\n++\t\t\toutfile.write(\"\\n };\\n static const char *%s_i2s(int v) {\\n\" \\\n++\t\t\t\t\t\"\\treturn i2s_bsearch__(%s_strings, %s_i2s_i, %s_i2s_s, %u, v);\\n\" \\\n++\t\t\t\t\t\"}\\n\" % (prefix, prefix, prefix, prefix, len(unique_entries)))\n++\texcept:\n++\t\t# If an error is found, raise the exception so the main function can close\n++\t\t# and delete the outfile\n++\t\texc_type, exc_obj, exc_tb = sys.exc_info()\n++\t\tfname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]\n++\t\tprint(\"Unexpected error in output_i2s:\", exc_type, fname, exc_tb.tb_lineno)\n++\t\traise\n++\n++def output_i2s_transtab(prefix, outfile):\n++\t\"\"\"\n++\t\tOutput the string to integer mapping table as a transtab[].\n++\t\tvalues must be sorted in the desired order. \n++\t\"\"\"\n++\ttry:\n++\t\toutfile.write(\"static const struct transtab %s_table[] = {\" % prefix)\n++\t\tfor i in range(len(ENTRIES)):\n++\t\t\tif (i % NUM_ENTIRES_IN_LINE == 0):\n++\t\t\t\toutfile.write('\\n\\t')\n++\t\t\toutfile.write(\"{%i,%u},\" % (ENTRIES[i].val, ENTRIES[i].offset))\n++\t\toutfile.write(\"\\n};\\n#define %s_NUM_ENTRIES (sizeof(%s_table) / sizeof(*%s_table))\\n\" % \\\n++\t\t\t\t(prefix.upper(), prefix, prefix))\n++\texcept:\n++\t\t# If an error is found, raise the exception so the main function can close\n++\t\t# and delete the outfile\n++\t\texc_type, exc_obj, exc_tb = sys.exc_info()\n++\t\tfname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]\n++\t\tprint(\"Unexpected error in output_i2s_transtab:\", exc_type, fname, exc_tb.tb_lineno)\n++\t\traise\n++\n++def lookup_enum(look_str, buf):\n++\ttry:\n++\t\t# Pull all of the enums out of the preprocessor output out only once\n++\t\t# to help speed up all of the lookups\n++\t\tif not hasattr(lookup_enum, \"enums\"):\n++\t\t\tif DEBUG:\n++\t\t\t\tprint(\"Pulling out the enums from the preprocessor output\")\n++\t\t\t# Regex pattern to parse out the enums from the preprocessor output\n++\t\t\tenum_regex = \"enum.*?{(?P<s>.*?)}\"\n++\t\t\tlookup_enum.enums = re.findall(enum_regex, buf, flags=(re.M | re.S))\n++\t\t\n++\t\t# find which enum contains the string we are looking for\n++\t\tfor i in range(len(lookup_enum.enums)):\n++\t\t\tif look_str in lookup_enum.enums[i]:\n++\t\t\t\t# Determine the value of the variable in the enum\n++\t\t\t\tenum_string = \"enum preproc { \" + lookup_enum.enums[i] + \" }\"\n++\t\t\t\tenum_string = \"\".join([line.strip() for line in enum_string])\n++\t\t\t\tif DEBUG:\n++\t\t\t\t\tprint(\"Found %s in %s\" % (look_str, enum_string))\n++\t\t\t\t\n++\t\t\t\tidentifier = Word(alphas, alphanums+'_')\n++\t\t\t\topt_value = Word(nums, nums+'x+<>/*')\n++\t\t\t\t\n++\t\t\t\tenum_value = Group(identifier('name') + Optional(Suppress('=') + opt_value('value')))\n++\t\t\t\tenum_list = Group(enum_value + ZeroOrMore(Suppress(',') + enum_value))\n++\t\t\t\tenum = Suppress('enum') + identifier('enum') + Suppress('{') + enum_list('list') + \\\n++\t\t\t\t\t\tSuppress('}')\n++\t\t\t\tenum.ignore(cppStyleComment)\n++\t\t\t\t\n++\t\t\t\tfor item, start, stop in enum.scanString(enum_string):\n++\t\t\t\t\ttemp = 0\n++\t\t\t\t\tfor entry in item.list:\n++\t\t\t\t\t\tif DEBUG:\n++\t\t\t\t\t\t\tprint(\"Checking %s against %s\" % (look_str, entry.name))\n++\t\t\t\t\t\tif entry.name == look_str:\n++\t\t\t\t\t\t\tif entry.value != '':\n++\t\t\t\t\t\t\t\t# Need to call eval becuase some enums have math in them\n++\t\t\t\t\t\t\t\ttry:\n++\t\t\t\t\t\t\t\t\tvalue = eval(entry.value)\n++\t\t\t\t\t\t\t\texcept:\n++\t\t\t\t\t\t\t\t\tprint(\"Found invalid value %s\" % entry.value)\n++\t\t\t\t\t\t\telse:\n++\t\t\t\t\t\t\t\tvalue = temp\n++\t\t\t\t\t\t\tif DEBUG:\n++\t\t\t\t\t\t\t\tprint(\"Matched the enum name to value %d\" % value)\n++\t\t\t\t\t\t\treturn value\n++\t\t\t\t\t\ttemp += 1\n++\texcept:\n++\t\texc_type, exc_obj, exc_tb = sys.exc_info()\n++\t\tfname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]\n++\t\tprint(\"Unexpected error in output_i2s_transtab:\", exc_type, fname, exc_tb.tb_lineno)\n++\tprint(\"Unable to find enum value\")\n++\treturn None\n++\n++def evaluate_string(eval_str, buf):\n++\tif DEBUG:\n++\t\tprint(\"Evaluating string %s\" % eval_str)\n++\t\n++\t# Regex expression for pulling apart the values in the preprocessor output\n++\teval_regex = \"(?P<val>\\w+)\"\n++\t# Since the string can be anything, it must be parsed into individual parts\n++\t# and evaluated separately to find any enum values\n++\tmatches = re.findall(eval_regex, eval_str)\n++\tif len(matches) <= 0:\n++\t\tprint(\"Could not find any matches\")\n++\t\n++\tlocal_s = eval_str\n++\tvalue = None\n++\ti = 0\n++\tfor i in range(len(matches)):\n++\t\ttry:\n++\t\t\t# If the current item is abled to evaled, there is nothing to do\n++\t\t\tval = eval(matches[i])\n++\t\texcept:\n++\t\t\ttry:\n++\t\t\t\t# Need to check to see if the last character is a \"U\" and remove it\n++\t\t\t\t# if this does not except, a valid number was found\n++\t\t\t\tif matches[i][-1] == 'U':\n++\t\t\t\t\tval = eval(matches[i][:-1])\n++\t\t\t\t\tlocal_s = local_s.replace(matches[i], \"%d\" % val)\n++\t\t\t\telse:\n++\t\t\t\t\t# Need to do a enum look up for anything that doesnt translate into a number\n++\t\t\t\t\tval = lookup_enum(matches[i], buf)\n++\t\t\t\t\tif val is not None:\n++\t\t\t\t\t\tlocal_s = local_s.replace(matches[i], \"%d\" % val)\n++\t\t\texcept:\n++\t\t\t\t# This case will be hit if the \"U\" removal fails\n++\t\t\t\tval = lookup_enum(matches[i], buf)\n++\t\t\t\tif val is not None:\n++\t\t\t\t\tlocal_s = local_s.replace(matches[i], \"%d\" % val)\n++\ttry:\n++\t\t# This will fail if all of the enums were not found rather\n++\t\t# than handling the failues in the above steps\n++\t\t# Also, need to convert to a signed 32 bit int for the output value\n++\t\tvalue = ctypes.c_int32(eval(local_s)).value\n++\t\tif DEBUG:\n++\t\t\tprint(\"Found value %d for %s\" % (value, matches[i]))\n++\texcept:\n++\t\tprint(\"Could not parse string %s\" % local_s)\n++\t\n++\t# Verify the mess above resulted in a number being found\n++\tif value is None:\n++\t\tprint(\"Failed to find value for %s\" % eval_str)\n++\t\traise\n++\treturn value\n++\t\n++def remove_output(outfile):\n++\tpath = outfile.name\n++\toutfile.close()\n++\tos.remove(path)\n++\tsys.exit(1)\n++\n++def main():\n++\t\n++\t# Setup the argument parser and parse the arguments given\n++\tparser = argparse.ArgumentParser(description='Generate tables header files.')\n++\tparser.add_argument('--i2s', dest='gen_i2s', action='store_true', \n++\t\t\thelp='Generate i2s tables')\n++\tparser.add_argument('--i2s-transtab', dest='gen_i2s_transtab', action='store_true', \n++\t\t\thelp='Generate transtab tables')\n++\tparser.add_argument('--s2i', dest='gen_s2i', action='store_true', \n++\t\t\thelp='Generate s2i tables')\n++\t# Make sure uppercase and lowercase are mutually exclusive\n++\tgroup = parser.add_mutually_exclusive_group()\n++\tgroup.add_argument('--uppercase', dest='uppercase', action='store_true', \n++\t\t\thelp='All characters are uppercase')\n++\tgroup.add_argument('--lowercase', dest='lowercase', action='store_true', \n++\t\t\thelp='All characters are lowercase')\n++\tparser.add_argument('--duplicate-ints', dest='allow_duplicate_ints', action='store_true', \n++\t\t\thelp='Allow duplicate integers')\n++\tparser.add_argument('prefix', help='The prefix of the output file to use')\n++\tparser.add_argument('source', type=argparse.FileType('r'), \n++\t\t\thelp='The source of the preprocessor from the compiler')\n++\tparser.add_argument('output', type=argparse.FileType('w'), \n++\t\t\thelp='The output header file')\n++\targs = parser.parse_args()\n++\t\n++\t# Regex pattern to parse out the macro and string from the _S calls\n++\tsource_regex = \"{ \\((?P<val>.*?)\\), \\(\\\"(?P<s>\\S+)\\\"\\), 0, 0 }\"\n++\t\n++\t# First parse the header file for all of the preprocessor source that need to\n++\t# be looked up\n++\tbuf = args.source.read()\n++\tmatches = re.findall(source_regex, buf, flags=re.MULTILINE)\n++\t\n++\t# Check to make sure we have matches\n++\tif (len(matches) <= 0):\n++\t\tprint(\"Failed to find valid source\")\n++\t\tremove_output(args.output)\n++\t\tsys.exit(1)\n++\t\n++\ttry:\n++\t\t# Create all of the entry structures\n++\t\tglobal ENTRIES\n++\t\tfor i in range(len(matches)):\n++\t\t\tENTRIES.append(Entry(matches[i][1], evaluate_string(matches[i][0], buf)))\n++\t\t\tENTRIES[i].set_orig_index(i)\n++\t\t\tif DEBUG:\n++\t\t\t\tprint(ENTRIES[i])\n++\t\t\n++\t\t# Sort the entries alphabetically\n++\t\tENTRIES = sorted(ENTRIES, key=attrgetter('st'))\n++\t\t# Print out the output header\n++\t\targs.output.write(\"/* This is a generated file, see Makefile.am for its inputs. */\\n\")\n++\t\toutput_strings(args.prefix, args.output)\n++\t\tif args.gen_s2i:\n++\t\t\toutput_s2i(args.prefix, args.output, args.uppercase, args.lowercase)\n++\t\tif args.gen_i2s:\n++\t\t\tENTRIES = sorted(ENTRIES, key=attrgetter('val'))\n++\t\t\toutput_i2s(args.prefix, args.output, args.allow_duplicate_ints)\n++\t\tif args.gen_i2s_transtab:\n++\t\t\tENTRIES = sorted(ENTRIES, key=attrgetter('orig_index'))\n++\t\t\toutput_i2s_transtab(args.prefix, args.output)\n++\texcept:\n++\t\t# On an error, close and remove the file before returning an error\n++\t\tprint(\"Failed to write the output file correctly\")\n++\t\texc_type, exc_obj, exc_tb = sys.exc_info()\n++\t\tfname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]\n++\t\tprint(\"Unexpected error:\", exc_type, fname, exc_tb.tb_lineno)\n++\t\tremove_output(args.output)\n++\t\tsys.exit(1)\n++\n++if __name__ == '__main__':\n++\tmain()\n+diff -urN a/lib/Makefile.am b/lib/Makefile.am\n+--- a/lib/Makefile.am\t2013-07-29 16:37:01.000000000 -0500\n++++ b/lib/Makefile.am\t2013-08-19 14:39:58.280509378 -0500\n+@@ -40,119 +40,109 @@\n+ BUILT_SOURCES = actiontabs.h errtabs.h fieldtabs.h flagtabs.h \\\n+ \tftypetabs.h i386_tables.h ia64_tables.h machinetabs.h \\\n+ \tmsg_typetabs.h optabs.h ppc_tables.h s390_tables.h \\\n+-\ts390x_tables.h x86_64_tables.h\n+-if USE_ALPHA\n+-BUILT_SOURCES += alpha_tables.h\n+-endif\n+-if USE_ARMEB\n+-BUILT_SOURCES += armeb_tables.h\n+-endif\n+-if USE_AARCH64\n+-BUILT_SOURCES += aarch64_tables.h\n+-endif\n+-noinst_PROGRAMS = gen_actiontabs_h gen_errtabs_h gen_fieldtabs_h \\\n++\ts390x_tables.h x86_64_tables.h \\\n++\tgen_actiontabs_h gen_errtabs_h gen_fieldtabs_h \\\n+ \tgen_flagtabs_h gen_ftypetabs_h gen_i386_tables_h \\\n+ \tgen_ia64_tables_h gen_machinetabs_h gen_msg_typetabs_h \\\n+ \tgen_optabs_h gen_ppc_tables_h gen_s390_tables_h \\\n+-\tgen_s390x_tables_h gen_x86_64_tables_h\n++\tgen_s390x_tables_h gen_x86_64_tables_h \n+ if USE_ALPHA\n+-noinst_PROGRAMS += gen_alpha_tables_h\n++BUILT_SOURCES += alpha_tables.h gen_alpha_tables_h\n+ endif\n+ if USE_ARMEB\n+-noinst_PROGRAMS += gen_armeb_tables_h\n++BUILT_SOURCES += armeb_tables.h gen_armeb_tables_h\n+ endif\n+ if USE_AARCH64\n+-noinst_PROGRAMS += gen_aarch64_tables_h\n++BUILT_SOURCES += aarch64_tables.h gen_aarch64_tables_h\n+ endif\n+-gen_actiontabs_h_SOURCES = gen_tables.c gen_tables.h actiontab.h\n+-gen_actiontabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"actiontab.h\"'\n++\n++gen_actiontabs_h: gen_tables.c gen_tables.h actiontab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"actiontab.h\\\" -E -o $@ gen_tables.c\n+ actiontabs.h: gen_actiontabs_h Makefile\n+-\t./gen_actiontabs_h --lowercase --i2s --s2i action > $@\n++\t$(PYTHON) gen_tables.py --lowercase --i2s --s2i action gen_actiontabs_h $@\n+ \n+ if USE_ALPHA\n+-gen_alpha_tables_h_SOURCES = gen_tables.c gen_tables.h alpha_table.h\n+-gen_alpha_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"alpha_table.h\"'\n++gen_alpha_tables_h: gen_tables.c gen_tables.h alpha_table.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"alpha_table.h\\\" -E -o $@ gen_tables.c\n+ alpha_tables.h: gen_alpha_tables_h Makefile\n+-\t./gen_alpha_tables_h --lowercase --i2s --s2i alpha_syscall > $@\n++\t$(PYTHON) gen_tables.py --lowercase --i2s --s2i alpha_syscall gen_alpha_tables_h $@\n+ endif\n+ \n+ if USE_ARMEB\n+-gen_armeb_tables_h_SOURCES = gen_tables.c gen_tables.h armeb_table.h\n+-gen_armeb_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"armeb_table.h\"'\n+-armeb_tables.h: gen_armeb_tables_h Makefile\n+-\t./gen_armeb_tables_h --lowercase --i2s --s2i armeb_syscall > $@\n++gen_armeb_tables_h: gen_tables.c gen_tables.h armeb_table.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"armeb_table.h\\\" -E -o $@ gen_tables.c\n++armeb_tables.h: gen_armeb_tables_h Makefile\n++\t$(PYTHON) gen_tables.py --lowercase --i2s --s2i armeb_syscall gen_armeb_tables_h $@\n+ endif\n+ \n+ if USE_AARCH64\n+-gen_aarch64_tables_h_SOURCES = gen_tables.c gen_tables.h aarch64_table.h\n+-gen_aarch64_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"aarch64_table.h\"'\n++gen_aarch64_tables_h: gen_tables.c gen_tables.h aarch64_table.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"aarch64_table.h\\\" -E -o $@ gen_tables.c\n+ aarch64_tables.h: gen_aarch64_tables_h Makefile\n+-\t./gen_aarch64_tables_h --lowercase --i2s --s2i aarch64_syscall > $@\n++\t$(PYTHON) gen_tables.py --lowercase --i2s --s2i aarch64_syscall gen_aarch64_tables_h $@\n+ endif\n+ \n+-gen_errtabs_h_SOURCES = gen_tables.c gen_tables.h errtab.h\n+-gen_errtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"errtab.h\"'\n++gen_errtabs_h: gen_tables.c gen_tables.h errtab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"errtab.h\\\" -E -o $@ gen_tables.c\n+ errtabs.h: gen_errtabs_h Makefile\n+-\t./gen_errtabs_h --duplicate-ints --uppercase --i2s --s2i err > $@\n++\t$(PYTHON) gen_tables.py --duplicate-ints --uppercase --i2s --s2i err gen_errtabs_h $@\n+ \n+-gen_fieldtabs_h_SOURCES = gen_tables.c gen_tables.h fieldtab.h\n+-gen_fieldtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"fieldtab.h\"'\n++gen_fieldtabs_h: gen_tables.c gen_tables.h fieldtab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"fieldtab.h\\\" -E -o $@ gen_tables.c\n+ fieldtabs.h: gen_fieldtabs_h Makefile\n+-\t./gen_fieldtabs_h --duplicate-ints --lowercase --i2s --s2i field > $@\n++\t$(PYTHON) gen_tables.py --duplicate-ints --lowercase --i2s --s2i field gen_fieldtabs_h $@\n+ \n+-gen_flagtabs_h_SOURCES = gen_tables.c gen_tables.h flagtab.h\n+-gen_flagtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"flagtab.h\"'\n++gen_flagtabs_h: gen_tables.c gen_tables.h flagtab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"flagtab.h\\\" -E -o $@ gen_tables.c\n+ flagtabs.h: gen_flagtabs_h Makefile\n+-\t./gen_flagtabs_h --lowercase --i2s --s2i flag > $@\n++\t$(PYTHON) gen_tables.py --lowercase --i2s --s2i flag gen_flagtabs_h $@\n+ \n+-gen_ftypetabs_h_SOURCES = gen_tables.c gen_tables.h ftypetab.h\n+-gen_ftypetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"ftypetab.h\"'\n++gen_ftypetabs_h: gen_tables.c gen_tables.h ftypetab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"ftypetab.h\\\" -E -o $@ gen_tables.c\n+ ftypetabs.h: gen_ftypetabs_h Makefile\n+-\t./gen_ftypetabs_h --lowercase --i2s --s2i ftype > $@\n++\t$(PYTHON) gen_tables.py --lowercase --i2s --s2i ftype gen_ftypetabs_h $@\n+ \n+-gen_i386_tables_h_SOURCES = gen_tables.c gen_tables.h i386_table.h\n+-gen_i386_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"i386_table.h\"'\n++gen_i386_tables_h: gen_tables.c gen_tables.h i386_table.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"i386_table.h\\\" -E -o $@ gen_tables.c\n+ i386_tables.h: gen_i386_tables_h Makefile\n+-\t./gen_i386_tables_h --duplicate-ints --lowercase --i2s --s2i \\\n+-\t\ti386_syscall > $@\n++\t$(PYTHON) gen_tables.py --duplicate-ints --lowercase --i2s --s2i i386_syscall gen_i386_tables_h $@\n+ \n+-gen_ia64_tables_h_SOURCES = gen_tables.c gen_tables.h ia64_table.h\n+-gen_ia64_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"ia64_table.h\"'\n++gen_ia64_tables_h: gen_tables.c gen_tables.h ia64_table.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"ia64_table.h\\\" -E -o $@ gen_tables.c\n+ ia64_tables.h: gen_ia64_tables_h Makefile\n+-\t./gen_ia64_tables_h --lowercase --i2s --s2i ia64_syscall > $@\n++\t$(PYTHON) gen_tables.py --lowercase --i2s --s2i ia64_syscall gen_ia64_tables_h $@\n+ \n+-gen_machinetabs_h_SOURCES = gen_tables.c gen_tables.h machinetab.h\n+-gen_machinetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"machinetab.h\"'\n++gen_machinetabs_h: gen_tables.c gen_tables.h machinetab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"machinetab.h\\\" -E -o $@ gen_tables.c\n+ machinetabs.h: gen_machinetabs_h Makefile\n+-\t./gen_machinetabs_h --duplicate-ints --lowercase --i2s --s2i machine \\\n+-\t\t> $@\n++\t$(PYTHON) gen_tables.py --duplicate-ints --lowercase --i2s --s2i machine gen_machinetabs_h $@\n+ \n+-gen_msg_typetabs_h_SOURCES = gen_tables.c gen_tables.h msg_typetab.h\n+-gen_msg_typetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"msg_typetab.h\"'\n++gen_msg_typetabs_h: gen_tables.c gen_tables.h msg_typetab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"msg_typetab.h\\\" -E -o $@ gen_tables.c\n+ msg_typetabs.h: gen_msg_typetabs_h Makefile\n+-\t./gen_msg_typetabs_h --uppercase --i2s --s2i msg_type > $@\n++\t$(PYTHON) gen_tables.py --uppercase --i2s --s2i msg_type gen_msg_typetabs_h $@\n+ \n+-gen_optabs_h_SOURCES = gen_tables.c gen_tables.h optab.h\n+-gen_optabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"optab.h\"'\n++gen_optabs_h: gen_tables.c gen_tables.h optab.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"optab.h\\\" -E -o $@ gen_tables.c\n+ optabs.h: gen_optabs_h Makefile\n+-\t./gen_optabs_h --i2s op > $@\n++\t$(PYTHON) gen_tables.py --i2s op gen_optabs_h $@\n+ \n+-gen_ppc_tables_h_SOURCES = gen_tables.c gen_tables.h ppc_table.h\n+-gen_ppc_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"ppc_table.h\"'\n++gen_ppc_tables_h: gen_tables.c gen_tables.h ppc_table.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"ppc_table.h\\\" -E -o $@ gen_tables.c\n+ ppc_tables.h: gen_ppc_tables_h Makefile\n+-\t./gen_ppc_tables_h --lowercase --i2s --s2i ppc_syscall > $@\n++\t$(PYTHON) gen_tables.py --lowercase --i2s --s2i ppc_syscall gen_ppc_tables_h $@\n+ \n+-gen_s390_tables_h_SOURCES = gen_tables.c gen_tables.h s390_table.h\n+-gen_s390_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"s390_table.h\"'\n++gen_s390_tables_h: gen_tables.c gen_tables.h s390_table.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"s390_table.h\\\" -E -o $@ gen_tables.c\n+ s390_tables.h: gen_s390_tables_h Makefile\n+-\t./gen_s390_tables_h --lowercase --i2s --s2i s390_syscall > $@\n++\t$(PYTHON) gen_tables.py --lowercase --i2s --s2i s390_syscall gen_s390_tables_h $@\n+ \n+-gen_s390x_tables_h_SOURCES = gen_tables.c gen_tables.h s390x_table.h\n+-gen_s390x_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"s390x_table.h\"'\n++gen_s390x_tables_h: gen_tables.c gen_tables.h s390x_table.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"s390x_table.h\\\" -E -o $@ gen_tables.c\n+ s390x_tables.h: gen_s390x_tables_h Makefile\n+-\t./gen_s390x_tables_h --lowercase --i2s --s2i s390x_syscall > $@\n++\t$(PYTHON) gen_tables.py --lowercase --i2s --s2i s390x_syscall gen_s390x_tables_h $@\n+ \n+-gen_x86_64_tables_h_SOURCES = gen_tables.c gen_tables.h x86_64_table.h\n+-gen_x86_64_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H=\"x86_64_table.h\"'\n++gen_x86_64_tables_h: gen_tables.c gen_tables.h x86_64_table.h\n++\t$(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\\\"x86_64_table.h\\\" -E -o $@ gen_tables.c\n+ x86_64_tables.h: gen_x86_64_tables_h Makefile\n+-\t./gen_x86_64_tables_h --lowercase --i2s --s2i x86_64_syscall > $@\n++\t$(PYTHON) gen_tables.py --lowercase --i2s --s2i x86_64_syscall gen_x86_64_tables_h $@\ndiff --git a/package/audit/audit-0002-remove-zos-plugin.patch b/package/audit/audit-0002-remove-zos-plugin.patch\nnew file mode 100644\nindex 0000000..576d8fa\n--- /dev/null\n+++ b/package/audit/audit-0002-remove-zos-plugin.patch\n@@ -0,0 +1,35 @@\n+Removed the step to build the zos-remote.\n+\n+Signed-off-by Clayton Shotwell <clshotwe@rockwellcollins.com>\n+---\n+--- a/audisp/plugins/Makefile.am\t2012-08-28 10:33:03.582396601 -0500\n++++ b/audisp/plugins/Makefile.am\t2012-08-28 10:33:14.162399662 -0500\n+@@ -22,7 +22,7 @@\n+ \n+ CONFIG_CLEAN_FILES = *.loT *.rej *.orig\n+ \n+-SUBDIRS = builtins zos-remote remote\n++SUBDIRS = builtins remote\n+ #SUBDIRS = builtins zos-remote\n+ if HAVE_PRELUDE\n+ SUBDIRS += prelude\n+--- a/audisp/plugins/Makefile.in\t2012-08-28 10:33:03.592380390 -0500\n++++ b/audisp/plugins/Makefile.in\t2012-08-28 10:35:38.482397668 -0500\n+@@ -84,7 +84,7 @@\n+ \tdistdir\n+ ETAGS = etags\n+ CTAGS = ctags\n+-DIST_SUBDIRS = builtins zos-remote remote prelude\n++DIST_SUBDIRS = builtins remote prelude\n+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)\n+ am__relativize = \\\n+ dir0=`pwd`; \\\n+@@ -242,7 +242,7 @@\n+ top_builddir = @top_builddir@\n+ top_srcdir = @top_srcdir@\n+ CONFIG_CLEAN_FILES = *.loT *.rej *.orig\n+-SUBDIRS = builtins zos-remote remote $(am__append_1)\n++SUBDIRS = builtins remote $(am__append_1)\n+ all: all-recursive\n+ \n+ .SUFFIXES:\ndiff --git a/package/audit/audit.mk b/package/audit/audit.mk\nnew file mode 100644\nindex 0000000..4a87887\n--- /dev/null\n+++ b/package/audit/audit.mk\n@@ -0,0 +1,61 @@\n+################################################################################\n+#\n+# audit\n+#\n+################################################################################\n+\n+AUDIT_VERSION:=2.3.2\n+AUDIT_SITE:=http://people.redhat.com/sgrubb/audit/\n+AUDIT_DEPENDENCIES = host-python-pyparsing\n+AUDIT_LICENSE = GPLv2\n+AUDIT_LICENSE_FILES = COPYING\n+\n+AUDIT_INSTALL_STAGING = YES\n+\n+AUDIT_AUTORECONF = YES\n+AUDIT_AUTORECONF_OPT = -i -s -I m4\n+\n+# Audit will be looking for applications to be in the root\n+# /sbin folder rather than in /usr/sbin folder\n+AUDIT_CONF_OPT = --sbindir=/sbin\n+\n+ifeq ($(BR2_PACKAGE_AUDIT_PYTHON_BINDINGS),y)\n+\tAUDIT_DEPENDENCIES += python host-python host-swig\n+\tAUDIT_CONF_OPT += --with-python=yes\n+\tAUDIT_CONF_ENV += CFLAGS=\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)\"\n+else\n+\tAUDIT_CONF_OPT += --with-python=no\n+endif\n+\n+ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)\n+\tAUDIT_DEPENDENCIES += libcap-ng\n+\tAUDIT_CONF_OPT += --with-libcap-ng=yes\n+else\n+\tAUDIT_CONF_OPT += --with-libcap-ng=no\n+endif\n+\n+ifeq ($(BR2_armeb),y)\n+\tAUDIT_CONF_OPT += --with-armeb\n+endif\n+ifeq ($(BR2_arm),y)\n+\tAUDIT_CONF_OPT += --with-armeb\n+endif\n+ifeq ($(BR2_aarch64),y)\n+\tAUDIT_CONF_OPT += --with-aarch64\n+endif\n+\n+ifeq ($(BR2_PREFER_STATIC_LIB),y)\n+\tAUDIT_CONF_OPT += --enable-shared=no\n+endif\n+\n+define AUDIT_INSTALL_INIT_SYSV\n+\t$(INSTALL) -m 755 package/audit/S01auditd $(TARGET_DIR)/etc/init.d/\n+endef\n+\n+define AUDIT_REMOVE_STARTUP_SCRIPT_DIR\n+\t$(RM) -rf $(TARGET_DIR)/etc/rc.d\n+endef\n+\n+AUDIT_POST_INSTALL_TARGET_HOOKS += AUDIT_REMOVE_STARTUP_SCRIPT_DIR\n+\n+$(eval $(autotools-package))\n", "prefixes": [ "v5", "11/20" ] }