Changeset: e1205210dcfb for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e1205210dcfb
Modified Files:
        clients/Tests/exports.stable.out
        testing/Mtest.py.in
Branch: monetdburl
Log Message:

Merge 'monetdburl' into 'default'


diffs (truncated from 9291 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -123,6 +123,10 @@ BuildRequires: geos-devel >= 3.10.0
 BuildRequires: pkgconfig(libcurl)
 BuildRequires: pkgconfig(liblzma)
 BuildRequires: pkgconfig(libxml-2.0)
+%if 0%{?rhel} != 7
+BuildRequires: pkgconfig(openssl) >= 1.1.1
+%global with_openssl 1
+%endif
 %if %{with pcre}
 BuildRequires: pkgconfig(libpcre) >= 4.5
 %endif
@@ -369,6 +373,7 @@ developer.
 %{_bindir}/ODBCtester
 %{_bindir}/arraytest
 %{_bindir}/bincopydata
+%{_bindir}/murltest
 %{_bindir}/odbcsample1
 %{_bindir}/sample0
 %{_bindir}/sample1
@@ -805,6 +810,7 @@ fi
         -DWITH_CURL=ON \
         -DWITH_LZ4=ON \
         -DWITH_LZMA=ON \
+        -DWITH_OPENSSL=%{?with_openssl:ON}%{!?with_openssl:OFF} \
         -DWITH_PCRE=ON \
         -DWITH_PROJ=OFF \
         -DWITH_READLINE=ON \
diff --git a/NT/mkodbcwxs.py b/NT/mkodbcwxs.py
--- a/NT/mkodbcwxs.py
+++ b/NT/mkodbcwxs.py
@@ -36,10 +36,12 @@ def main():
     if sys.argv[2] == '64':
         folder = r'ProgramFiles64Folder'
         arch = 'x64'
+        libcrypto = '-x64'
         vcpkg = r'C:\vcpkg\installed\x64-windows\{}'
     else:
         folder = r'ProgramFilesFolder'
         arch = 'x86'
+        libcrypto = ''
         vcpkg = r'C:\vcpkg\installed\x86-windows\{}'
     vcdir = os.getenv('VCINSTALLDIR')
     if vcdir is None:
@@ -91,6 +93,8 @@ def main():
                vcpkg.format(r'bin\iconv-2.dll'),
                vcpkg.format(r'bin\bz2.dll'),
                vcpkg.format(r'bin\charset-1.dll'), # for iconv-2.dll
+               vcpkg.format(r'bin\libcrypto-3{}.dll'.format(libcrypto)),
+               vcpkg.format(r'bin\libssl-3{}.dll'.format(libcrypto)),
                vcpkg.format(r'bin\lz4.dll'),
                vcpkg.format(r'bin\liblzma.dll'),
                vcpkg.format(r'bin\zlib1.dll')])
diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py
--- a/NT/mksqlwxs.py
+++ b/NT/mksqlwxs.py
@@ -43,10 +43,12 @@ def main():
     if sys.argv[2] == '64':
         folder = r'ProgramFiles64Folder'
         arch = 'x64'
+        libcrypto = '-x64'
         vcpkg = r'C:\vcpkg\installed\x64-windows\{}'
     else:
         folder = r'ProgramFilesFolder'
         arch = 'x86'
+        libcrypto = ''
         vcpkg = r'C:\vcpkg\installed\x86-windows\{}'
     vcdir = os.getenv('VCINSTALLDIR')
     if vcdir is None:
@@ -158,6 +160,8 @@ def main():
                vcpkg.format(r'bin\bz2.dll'),
                vcpkg.format(r'bin\charset-1.dll'), # for iconv-2.dll
                vcpkg.format(r'bin\getopt.dll'),
+               vcpkg.format(r'bin\libcrypto-3{}.dll'.format(libcrypto)),
+               vcpkg.format(r'bin\libssl-3{}.dll'.format(libcrypto)),
                vcpkg.format(r'bin\libxml2.dll'),
                vcpkg.format(r'bin\lz4.dll'),
                vcpkg.format(r'bin\liblzma.dll'),
diff --git a/clients/CMakeLists.txt b/clients/CMakeLists.txt
--- a/clients/CMakeLists.txt
+++ b/clients/CMakeLists.txt
@@ -8,8 +8,8 @@
 # Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V.
 #]]
 
+add_subdirectory(mapilib)
 add_subdirectory(mapiclient)
-add_subdirectory(mapilib)
 add_subdirectory(odbc)
 if(TESTING)
   add_subdirectory(examples)
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -714,6 +714,24 @@ char *mo_find_option(opt *set, int setle
 void mo_free_options(opt *set, int setlen);
 void mo_print_options(opt *set, int setlen);
 int mo_system_config(opt **Set, int setlen);
+mparm mparm_parse(const char *name);
+bool msetting_bool(const msettings *mp, mparm parm);
+long msetting_long(const msettings *mp, mparm parm);
+int msetting_parse_bool(const char *text);
+msettings_error msetting_set_named(msettings *mp, bool allow_core, const char 
*key, const char *value);
+const char *msetting_string(const msettings *mp, mparm parm);
+long msettings_connect_binary(const msettings *mp);
+const char *msettings_connect_certhash_digits(const msettings *mp);
+long msettings_connect_port(const msettings *mp);
+bool msettings_connect_scan(const msettings *mp);
+const char *msettings_connect_sockdir(const msettings *mp);
+const char *msettings_connect_tcp(const msettings *mp);
+enum msetting_tls_verify msettings_connect_tls_verify(const msettings *mp);
+const char *msettings_connect_unix(const msettings *mp);
+msettings *msettings_create(void);
+msettings *msettings_destroy(msettings *mp);
+bool msettings_parse_url(msettings *mp, const char *url, char **error_buffer);
+bool msettings_validate(msettings *mp, char **errmsg);
 const char *wsaerror(int);
 
 # monetdb5
@@ -1707,6 +1725,8 @@ stream *open_rstream(const char *filenam
 stream *open_urlstream(const char *url);
 stream *open_wastream(const char *filename);
 stream *open_wstream(const char *filename);
+stream *openssl_rstream(const char *hostname, BIO *bio);
+stream *openssl_wstream(const char *hostname, BIO *bio);
 stream *socket_rstream(SOCKET socket, const char *name);
 stream *socket_wstream(SOCKET socket, const char *name);
 stream *stderr_wastream(void);
diff --git a/clients/examples/C/CMakeLists.txt 
b/clients/examples/C/CMakeLists.txt
--- a/clients/examples/C/CMakeLists.txt
+++ b/clients/examples/C/CMakeLists.txt
@@ -80,6 +80,19 @@ target_link_libraries(bincopyloops
   copybinary
   )
 
+add_executable(murltest
+  murltest.c
+  testsfile.c
+  murltest.h
+)
+
+target_link_libraries(murltest
+  PRIVATE
+  monetdb_config_header
+  mapi
+  stream
+)
+
 install(TARGETS
   sample0
   sample1
@@ -89,6 +102,7 @@ install(TARGETS
   streamcat
   testcondvar
   bincopydata
+  murltest
   RUNTIME
   DESTINATION
   ${CMAKE_INSTALL_BINDIR}
@@ -105,6 +119,7 @@ if(WIN32)
     $<TARGET_PDB_FILE:testcondvar>
     $<TARGET_PDB_FILE:bincopydata>
     $<TARGET_PDB_FILE:bincopyloops>
+    $<TARGET_PDB_FILE:murltest>
     DESTINATION ${CMAKE_INSTALL_BINDIR}
     OPTIONAL)
 endif()
diff --git a/clients/examples/C/murltest.c b/clients/examples/C/murltest.c
new file mode 100644
--- /dev/null
+++ b/clients/examples/C/murltest.c
@@ -0,0 +1,94 @@
+/*
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0.  If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V.
+ */
+
+#define _POSIX_C_SOURCE 200809L
+
+#include "murltest.h"
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+
+char *USAGE = "Usage: murltest TESTFILES..";
+
+static bool
+run_file(const char *filename, int verbose)
+{
+       stream *s;
+       if (strcmp(filename, "-") == 0) {
+               s = stdin_rastream();
+       } else {
+               s = open_rastream(filename);
+               if (!s || mnstr_errnr(s) != MNSTR_NO__ERROR) {
+                       fprintf(stderr, "Could not open %s: %s\n", filename, 
mnstr_peek_error(s));
+                       return false;
+               }
+       }
+
+       bool ok = run_tests(s, verbose);
+
+       close_stream(s);
+       return ok;
+}
+
+static bool run_files(char **files, int verbose)
+{
+       while (*files) {
+               if (!run_file(*files, verbose))
+                       return false;
+               files++;
+       }
+       return true;
+}
+
+int
+main(int argc, char **argv)
+{
+       int verbose = 0;
+
+       if (mnstr_init() != 0) {
+               fprintf(stderr, "could not initialize libstream\n");
+               return 1;
+       }
+
+       char **files = calloc(argc + 1, sizeof(char*));
+       if (!files)
+               return 3;
+       char **next_slot = &files[0];
+       for (int i = 1; i < argc; i++) {
+               char *arg = argv[i];
+               if (arg[0] != '-') {
+                       *next_slot++ = arg;
+                       continue;
+               }
+               if (arg[1] == 'v') {
+                       char *p = &arg[1];
+                       while (*p == 'v') {
+                               p++;
+                               verbose++;
+                       }
+                       if (*p == '\0')
+                               continue;
+                       fprintf(stderr, "invalid letter %c in flag %s\n", *p, 
arg);
+                       free(files);
+                       return 1;
+               } else {
+                       fprintf(stderr, "invalid flag %s\n", arg);
+                       free(files);
+                       return 1;
+               }
+       }
+
+       bool ok = run_files(files, verbose);
+
+       free(files);
+       return ok ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/clients/examples/C/murltest.h b/clients/examples/C/murltest.h
new file mode 100644
--- /dev/null
+++ b/clients/examples/C/murltest.h
@@ -0,0 +1,15 @@
+/*
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0.  If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V.
+ */
+
+#include "monetdb_config.h"
+
+#include "stream.h"
+
+bool run_tests(stream *s, int verbose);
diff --git a/clients/examples/C/testsfile.c b/clients/examples/C/testsfile.c
new file mode 100644
--- /dev/null
+++ b/clients/examples/C/testsfile.c
@@ -0,0 +1,438 @@
+/*
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0.  If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to