Changeset: 2f808bb6231a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2f808bb6231a
Modified Files:
        ChangeLog.Aug2018
        MonetDB.spec
        clients/mapiclient/mhelp.c
        rpm.mk.in
        testing/Mtest.py.in
Branch: rename-sql
Log Message:

Merge with default


diffs (truncated from 376 to 300 lines):

diff --git a/ChangeLog.Aug2018 b/ChangeLog.Aug2018
--- a/ChangeLog.Aug2018
+++ b/ChangeLog.Aug2018
@@ -1,2 +1,5 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
+* Wed Oct 10 2018 Sjoerd Mullender <sjo...@acm.org>
+- Some subtle dependencies between RPMs have been fixed.
+
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -14,6 +14,10 @@
 
 %global release %{buildno}%{?dist}
 
+# This package contains monetdbd which is a (long running) daemon, so
+# we need to harden:
+%global _hardened_build 1
+
 # On RedHat Enterprise Linux and derivatives, if the Extra Packages
 # for Enterprise Linux (EPEL) repository is available, you can enable
 # its use by providing rpmbuild or mock with the "--with epel" option.
@@ -739,10 +743,6 @@ used from the MAL level.
 Summary: MonetDB5 SQL server modules
 Group: Applications/Databases
 Requires(pre): MonetDB5-server%{?_isa} = %{version}-%{release}
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
-# RHEL >= 7, and all current Fedora
-Requires(post): %{_bindir}/systemd-tmpfiles
-%endif
 %if (0%{?fedora} >= 22)
 %if %{with hugeint}
 Recommends: %{name}-SQL-server5-hugeint%{?_isa} = %{version}-%{release}
@@ -759,11 +759,6 @@ accelerators.  It also has an SQL fronte
 This package contains the SQL frontend for MonetDB.  If you want to
 use SQL with MonetDB, you will need to install this package.
 
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
-%post SQL-server5
-systemd-tmpfiles --create %{_sysconfdir}/tmpfiles.d/monetdbd.conf
-%endif
-
 %files SQL-server5
 %defattr(-,root,root)
 %{_bindir}/monetdb
@@ -771,7 +766,8 @@ systemd-tmpfiles --create %{_sysconfdir}
 %dir %attr(775,monetdb,monetdb) %{_localstatedir}/log/monetdb
 %if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 # RHEL >= 7, and all current Fedora
-%{_sysconfdir}/tmpfiles.d/monetdbd.conf
+%dir %attr(775,monetdb,monetdb) /run/monetdb
+%{_tmpfilesdir}/monetdbd.conf
 %{_unitdir}/monetdbd.service
 %else
 # RedHat Enterprise Linux < 7
@@ -908,6 +904,8 @@ do
   /usr/sbin/semodule -s ${selinuxvariant} -i \
     %{_datadir}/selinux/${selinuxvariant}/monetdb.pp &> /dev/null || :
 done
+# use %{_localstatedir}/run/monetdb here for EPEL 6; on other systems,
+# %{_localstatedir}/run is a symlink to /run
 /sbin/restorecon -R %{_localstatedir}/monetdb5 %{_localstatedir}/log/monetdb 
%{_localstatedir}/run/monetdb %{_bindir}/monetdbd %{_bindir}/mserver5 
%{_unitdir}/monetdbd.service &> /dev/null || :
 /usr/bin/systemctl try-restart monetdbd.service
 
@@ -921,6 +919,8 @@ if [ $1 -eq 0 ] ; then
   do
     /usr/sbin/semodule -s ${selinuxvariant} -r monetdb &> /dev/null || :
   done
+  # use %{_localstatedir}/run/monetdb here for EPEL 6; on other systems,
+  # %{_localstatedir}/run is a symlink to /run
   /sbin/restorecon -R %{_localstatedir}/monetdb5 %{_localstatedir}/log/monetdb 
%{_localstatedir}/run/monetdb %{_bindir}/monetdbd %{_bindir}/mserver5 
%{_unitdir}/monetdbd.service &> /dev/null || :
   if [ $active = active ]; then
     /usr/bin/systemctl start monetdbd.service
@@ -943,11 +943,18 @@ fi
 # that causes it to report an internal error when compiling
 # testing/difflib.c.  The work around is to not use -fstack-protector-strong.
 # The bug exhibits itself on CentOS 7 on AArch64.
-if [ `gcc -v 2>&1 | grep -c 'Target: aarch64\|gcc version 4\.'` -eq 2 ]; then
-       # set CFLAGS before configure, so that this value gets used
-       CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
--param=ssp-buffer-size=4 -grecord-gcc-switches  '
-       export CFLAGS
-fi
+# Everywhere else, add -Wno-format-truncation to the compiler options
+# to reduce the number of warnings during compilation.
+%ifarch aarch64
+    if gcc -v 2>&1 | grep -q 'gcc version 4\.'; then
+       CFLAGS="${CFLAGS:-$(echo %optflags | sed 
's/-fstack-protector-strong//')"
+    else
+       CFLAGS="${CFLAGS:-%optflags -Wno-format-truncation}"
+    fi
+%else
+    CFLAGS="${CFLAGS:-%optflags -Wno-format-truncation}"
+%endif
+export CFLAGS
 %{configure} \
        --enable-assert=no \
        --enable-console=yes \
@@ -1017,10 +1024,23 @@ cd -
 %install
 %make_install
 
-mkdir -p %{buildroot}%{_localstatedir}/MonetDB
-mkdir -p %{buildroot}%{_localstatedir}/monetdb5/dbfarm
-mkdir -p %{buildroot}%{_localstatedir}/log/monetdb
-mkdir -p %{buildroot}%{_localstatedir}/run/monetdb
+# move file to correct location
+%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
+mkdir -p %{buildroot}%{_tmpfilesdir}
+mv %{buildroot}%{_sysconfdir}/tmpfiles.d/monetdbd.conf 
%{buildroot}%{_tmpfilesdir}
+rmdir %{buildroot}%{_sysconfdir}/tmpfiles.d
+%endif
+
+install -d -m 0750 %{buildroot}%{_localstatedir}/MonetDB
+install -d -m 0770 %{buildroot}%{_localstatedir}/monetdb5/dbfarm
+install -d -m 0775 %{buildroot}%{_localstatedir}/log/monetdb
+%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
+# RHEL >= 7, and all current Fedora
+install -d -m 0775 %{buildroot}/run/monetdb
+%else
+# RedHat Enterprise Linux < 7
+install -d -m 0775 %{buildroot}%{_localstatedir}/run/monetdb
+%endif
 
 # remove unwanted stuff
 # .la files
diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -41,7 +41,7 @@ typedef struct {
        const char *comments;
 } SQLhelp;
 
-#define NUMBER_MAJOR_COMMANDS 73 // The number of major commands to show in 
case of no query
+#define NUMBER_MAJOR_COMMANDS 74 // The number of major commands to show in 
case of no query
 
 SQLhelp sqlhelp[] = {
        // major commands
@@ -62,7 +62,7 @@ SQLhelp sqlhelp[] = {
         "ALTER TABLE qname ADD TABLE qname [ AS PARTITION opt_partition_spec 
]\n"
         "ALTER TABLE qname DROP TABLE qname [ RESTRICT | CASCADE ]\n"
         "ALTER TABLE qname SET TABLE qname AS PARTITION opt_partition_spec",
-        "",
+        "opt_partition_spec",
         "See also 
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/DataPartitioning"},
        {"ALTER SEQUENCE",
         "",
@@ -81,7 +81,7 @@ SQLhelp sqlhelp[] = {
         "See also https://www.monetdb.org/Documentation/SQLreference/Users"},
        {"ANALYZE",
         "Collect column data statistics for optimizations",
-        "ANALYZE schemaname [ . tablename [ column_list ] ] [SAMPLE size] 
[MINMAX]",
+        "ANALYZE ident [ . ident [ column_list ] ] [SAMPLE size] [MINMAX]",
         "column_list",
         "See also 
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/statistics"},
        {"CALL",
@@ -179,7 +179,7 @@ SQLhelp sqlhelp[] = {
        {"CREATE MERGE TABLE",
         "",
         "CREATE MERGE TABLE [ IF NOT EXISTS ] qname table_source [ 
opt_partition_by ];",
-        NULL,
+        "table_source,opt_partition_by",
         "See also 
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/DataPartitioning"},
        {"CREATE REMOTE TABLE",
         "",
@@ -205,7 +205,7 @@ SQLhelp sqlhelp[] = {
        {"CREATE STREAM TABLE",
         "Temporary table, locked during updates/ continues query processing",
         "CREATE STREAM TABLE [ IF NOT EXISTS ] qname table_source\n",
-        NULL,
+        "table_source",
         NULL},
        {"CREATE TABLE",
         "",
@@ -216,9 +216,9 @@ SQLhelp sqlhelp[] = {
         NULL},
        {"CREATE TRIGGER",
         "",
-        "CREATE [ OR REPLACE ] TRIGGER wname { BEFORE | AFTER } { INSERT | 
DELETE | TRUNCATE ...\n"
+        "CREATE [ OR REPLACE ] TRIGGER qname { BEFORE | AFTER } { INSERT | 
DELETE | TRUNCATE ...\n"
         " | UPDATE [ OF ident [',' ident]] } ON qname REFERENCING 
trigger_reference... triggered_action",
-        "trigger_reference",
+        "trigger_reference,triggered_action",
         NULL},
        {"CREATE TYPE",
         "Add user defined type to the type system ",
@@ -275,13 +275,13 @@ SQLhelp sqlhelp[] = {
         "",
         "DROP ALL AGGREGATE qname [ RESTRICT | CASCADE ]\n"
         "DROP AGGREGATE [ IF EXISTS ] qname [ '(' [ param [',' ...]] ')' ] [ 
RESTRICT | CASCADE ]",
-        NULL,
+        "param",
         NULL},
        {"DROP FUNCTION",
         "",
         "DROP ALL [FILTER] FUNCTION qname [ RESTRICT | CASCADE ]\n"
         "DROP [FILTER] FUNCTION [ IF EXISTS ] qname [ '(' [ param [',' ...]] 
')' ] [ RESTRICT | CASCADE ]",
-        NULL,
+        "param",
         NULL},
        {"DROP INDEX",
         "",
@@ -292,13 +292,13 @@ SQLhelp sqlhelp[] = {
         "",
         "DROP ALL LOADER qname [ RESTRICT | CASCADE ]\n"
         "DROP LOADER [ IF EXISTS ] qname [ '(' [ param [',' ...]] ')' ] [ 
RESTRICT | CASCADE ]",
-        NULL,
+        "param",
         NULL},
        {"DROP PROCEDURE",
         "",
         "DROP ALL PROCEDURE qname [ RESTRICT | CASCADE ]\n"
         "DROP PROCEDURE [ IF EXISTS ] qname [ '(' [ param [',' ...]] ')' ] [ 
RESTRICT | CASCADE ]",
-        NULL,
+        "param",
         NULL},
        {"DROP ROLE",
         "",
@@ -356,7 +356,7 @@ SQLhelp sqlhelp[] = {
         "Define access privileges",
         "GRANT privileges TO grantee [',' ...] [ WITH GRANT OPTION ]\n"
         "GRANT role [',' ...] TO grantee [',' ...] [ WITH ADMIN OPTION]",
-        "privileges,role",
+        "privileges,role,grantee",
         "See also 
https://www.monetdb.org/Documentation/SQLreference/Permissions"},
        {"RELEASE SAVEPOINT",
         "",
@@ -366,7 +366,7 @@ SQLhelp sqlhelp[] = {
        {"RETURN",
         "",
         "RETURN { query_expression | search_condition | TABLE '(' 
query_expression ')'",
-        NULL,
+        "query_expression,search_condition",
         NULL},
        {"REVOKE",
         "Remove some privileges",
@@ -457,7 +457,7 @@ SQLhelp sqlhelp[] = {
         "table_ref NATURAL [ INNER | LEFT | RIGHT | FULL ] JOIN table_ref |\n"
         "table_ref UNION JOIN table_ref { ON search_condition | USING 
column_list } |\n"
         "table_ref [ INNER | LEFT | RIGHT | FULL ] JOIN table_ref { ON 
search_condition | USING column_list }",
-        NULL,
+        "table_ref,search_condition,column_list",
         "See also 
https://www.monetdb.org/Documentation/SQLreference/TableExpressions"},
        {"TRACE",
         "Give execution trace",
@@ -477,7 +477,7 @@ SQLhelp sqlhelp[] = {
        {"WHILE",
         "",
         "[ident ':'] WHILE search_condition DO procedure_statement ... END 
WHILE [ident]",
-        NULL,
+        "search_condition,procedure_statement",
         "See also 
https://www.monetdb.org/Documentation/SQLreference/Flowofcontrol"},
        {"WINDOW",
         "",
@@ -527,7 +527,7 @@ SQLhelp sqlhelp[] = {
         NULL,
         "NULL | NOT NULL | UNIQUE | PRIMARY KEY | CHECK '(' search_condition 
')' |\n"
         " REFERENCES qname [ column_list ] [ MATCH {FULL|PARTIAL|SIMPLE} ] 
reference_action ...\n",
-        "search_condition,reference_action",
+        "column_list,search_condition,reference_action",
         "See also 
https://www.monetdb.org/Documentation/SQLreference/TableIdentityColumn"},
        {"control_statement",
         NULL,
@@ -545,7 +545,7 @@ SQLhelp sqlhelp[] = {
         "BOOLEAN | BOOL | TINYINT | SMALLINT | INT | INTEGER | BIGINT | 
HUGEINT |\n"
         " { DECIMAL | DEC | NUMERIC | FLOAT } [ '(' nonzero [',' nonzero ] ')' 
] |\n"
         " REAL | DOUBLE [ PRECISION ] |\n"
-        " { VARCHAR | CHARARCTER VARYING } '(' nonzero ')' |\n"
+        " { VARCHAR | CHARACTER VARYING } '(' nonzero ')' |\n"
         " { CHAR | CHARACTER [ LARGE OBJECT ] | CLOB | TEXT | STRING | JSON | 
URL } [ '(' nonzero ')' ] |\n"
         " { BINARY LARGE OBJECT | BLOB } [ '(' nonzero ')' ] |\n"
         " UUID | INET | datetime_type | interval_type | geometry_type",
@@ -634,15 +634,15 @@ SQLhelp sqlhelp[] = {
         NULL},
        {"opt_partition_by",
         NULL,
-        "PARTITION BY { RANGE | VALUES } { ON '(' ident ')' | USING '(' 
expression ')' }",
-        NULL,
+        "PARTITION BY { RANGE | VALUES } { ON '(' ident ')' | USING '(' 
query_expression ')' }",
+        "query_expression",
         NULL},
        {"opt_partition_spec",
         NULL,
         "IN '(' partition_list ')' [ WITH NULL ]\n"
         "BETWEEN partition_range_from AND partition_range_to [ WITH NULL ]\n"
         "WITH NULL",
-        NULL,
+        "partition_list,partition_range_from,partition_range_to",
         NULL},
        {"param",
         NULL,
@@ -651,18 +651,18 @@ SQLhelp sqlhelp[] = {
         NULL},
        {"partition_list",
         NULL,
-        "expression [ ',' ... ]",
-        NULL,
+        "query_expression [ ',' ... ]",
+        "query_expression",
         NULL},
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to