Renamed the postrm script to prerm since it is executed before
uninstallation.
Silenced the output of the systemctl disable commands and added a
conditional restart of MaxScale if a MaxScale instance is running.
Use getent instead of grep to detect if the maxscale user needs to be
created.
All RPATH setting have to be set before generation of any binary.
Defining of CMAKE_INSTALL_RPATH is moved to separate file which is called from main CMakeLists.txt in the beginning, just after install_layout.cmake
The script adds config and log files into a zip archive. Passwords in
config files are censored. Also attempts to read current status by calling
maxctrl. If core-file exists, runs gdb on it to gather call stack.
The script is installed to the binary file directory.
The VERSION.cmake file defines which VERSION.cmake file is included. By
changing the file that it points to, the version can be changed without it
affecting other parts of the code that use it.
The paths were wrong in the scripts used to run tests. The same problem
was in the CMake files that used CMAKE_SOURCE_DIR instead of
CMAKE_CURRENT_SOURCE_DIR.
Added missing check for BUILD_SYSTEM_TESTS in avrorouter for the
workaround to building without all dependencies present.
This is the appropriate command for ON/OFF options controlled by the
user. Also removed the useless C99 option which must always be on (using
C11 would be another option).
The only way to cleanly separate the maxutils library from the MaxScale
CMake project is to make it a standalone CMake project. With the help of
ExternalProject, it should be relatively easy to use.
The purpose of this library is to create a utility library that is not
dependent on maxscale for use in both maxscale and system test, and
possibly other apps. As time permits general purpose utilities from
maxscale-common can be moved to the new library.
Here are answers to questions you may have:
- A top level directory "maxutils" contains the libraries. The current
structure is simply maxutils/maxbase. Each library has an 'include' and
a 'scr' directory where public headers exist in 'include'
- Code is in a namespace with the same name as the directory.
- Headers are included like this: `#include <maxbase/stopwatch.hh>`
- In case the library is published on its own, the include directives stay
the same (headers would be in /usr/include/maxutil, for example).
- I am not advocating many small libraries. But if some larger library
is written, say a general purpose statemachine, it would not pollute
util/maxutil but go to util/maxsm.
Another example: Worker. It is a larger concept, but used so widely in
code that it could very well live in maxutil.
NOTE: this was previously Review Request #6245.
dependent on maxscale for use in both maxscale and system test, and
possibly other apps. As time permits general purpose utilities from
maxscale-common can be moved to the new library.
Here are answers to questions you may have:
- Headers and sources are separated to allow public/private headers.
- A top level directory "util" contains the libraries. The current
structure is simply util/maxbase. The name of the top level
directory is not important.
- Code is in a namespace with the same name as the directory.
- Headers are included like this: \`#include <maxbase/stopwatch.hh>\`
- In case the library is published on its own, the include directives stay
the same (headers would be in /usr/include/maxbase, for example).
- I am not advocating many small libraries. But if some larger library
is written, say a general purpose statemachine, it would not pollute
util/maxutil but go to util/maxsm.
Another example: Worker. It is a larger concept, but used so widely in
code that it could very well live in maxutil.
NOTE: this was previously Review Request #6245.
The package descriptions, summaries and licenses now use a generic
mechanism. This makes it easier to add new components that only include
small parts or use a different license.
Also updated the descriptions, the license versions and package summaries
for the main packages.
The MariaDB Connector-C headers that are built by MaxScale must be
included before any system headers.
Fixed code that explicitly included the <mysql.h> header to use the
<maxscale/protocol/mysql.h> wrapper instead.
The stack traces weren't logged as the LOG_ALERT priority wasn't enabled
by default. As an alert is intended to be something that must leave a
trace somewhere, and as such, it must not be possible to disable it. For
this reason, it is acceptable to always log the message if the priority is
LOG_ALERT.
Added the -rdynamic linker flag so that all symbols are exported when
linking MaxScale.
As the stack trace is printed in a signal handler, the first attempt
should be to print the stack trace to the standard output. This way the
output is printed before an attempt to use malloc is made when it is
logged to the logfile.
AdressSanitizer is a lightweight memory error detector that instruments at
compile time instead of at execution time. This allows serious memory
errors to be detected without the cost of slowing down the whole program
that often happens when Valgrind is used. It is also easier to enable for
test runs as it is a simple compiler flag.