Commit graph

107 commits

Author SHA1 Message Date
Daniel Black
99f85eec88 MDEV-5536: Debian systemd socket activation
Attempt to follow the rules using dh_system_enable
to install the sockets.

Enable the sockets as opposed to the services by default.
2021-03-28 13:53:55 +11:00
Daniel Black
460d480c74 MDEV-5536: add systemd socket activation
Systemd has a socket activation feature where a mariadb.socket
definition defines the sockets to listen to, and passes those
file descriptors directly to mariadbd to use when a connection
occurs.

The new functionality is utilized when starting as follows:

  systemctl start mariadb.socket

The mariadb.socket definition only needs to contain the network
information, ListenStream= directives, the mariadb.service
definition is still used for service instigation.

When mariadbd is started in this way, the socket, port, bind-address
backlog are all assumed to be self contained in the mariadb.socket
definition and as such the mariadb settings and command line
arguments of these network settings are ignored.
See man systemd.socket for how to limit this to specific ports.

Extra ports, those specified with extra_port in socket activation
mode, are those with a FileDescriptorName=extra. These need
to be in a separate service name like mariadb-extra.socket and
these require a Service={mariadb.service} directive to map to the
original service. Extra ports need systemd v227 or greater
(not RHEL/Centos7 - v219) when FileDescriptorName= was added,
otherwise the extra ports are treated like ordinary ports.

The number of sockets isn't limited when using systemd socket activation
(except by operating system limits on file descriptors and a minimal
amount of memory used per file descriptor). The systemd sockets passed
can include any ownership or permissions, including those the
mariadbd process wouldn't normally have the permission to create.

This implementation is compatible with mariadb.service definitions.
Those services started with:

  systemctl start mariadb.service

does actually start the mariadb.service and used all the my.cnf
settings of sockets and ports like it previously did.
2021-03-28 13:53:55 +11:00
Otto Kekäläinen
418381bf99 MDEV-25090: Deb: Use libpmem-dev when available
Updating the debian/control file will automatically update the dependencies
in all CI environments that directly read the debian/control file, such
as Salsa-CI and buildbot.mariadb.org to some degree.
(https://github.com/MariaDB/mariadb.org-tools/issues/43)

On Debian/Ubuntu releases that don't have libpmem-dev available,
automatically omit it.

Debian/Ubuntu availability visible at:
- https://packages.debian.org/search?searchon=names&keywords=libpmem-dev
- https://packages.ubuntu.com/search?searchon=names&keywords=libpmem-dev

Also modify debian/rules to activate the use of PMEM, as it does not seem
to activate automatically.

The scope of this change is also Debian/Ubuntu only. No RPM or Windows or
Mac changes are included in this commit.

This commit does not update the external libmariadb or ColumnStore
CI pipelines, as those are maintained in different repositories.
2021-03-17 13:23:18 +02:00
Otto Kekäläinen
211e9b3e0a MDEV-24927: Deb: Use liburing-dev instead of libaio-dev
Updating the debian/control file will automatically update the dependencies
in all CI environments that directly read the debian/control file, such
as Salsa-CI and buildbot.mariadb.org to some degree.
(https://github.com/MariaDB/mariadb.org-tools/issues/43)

On Debian/Ubuntu releases that don't have liburing-dev available,
automatically downgrade to libaio-dev (just like libcurl4->3 is done).
This ensures the debian/control file is always up-to-date and works for
latest Debian and Ubuntu releases, while the backwards compatibility mods
are maintained in autobake-deb.sh separately, and can be dropped from there
once support for certain platforms end.

Debian/Ubuntu availability visible at:
- https://packages.debian.org/search?searchon=names&keywords=liburing-dev
- https://packages.ubuntu.com/search?searchon=names&keywords=liburing-dev

Also modify debian/rules to force a build without libaio. Use YES instead
of ON to make the flag more logical (=turning libaio check "off").

Stop running Salsa-CI for Debian Stretch-backports, as it does not have
liburing-dev available nor is the old-old Debian stable a relevant platform
for MariaDB 10.6 to test against anymore. Since the Stretch-backports build
can no longer be made, neither can the MySQL 5.7 on Bionic upgrade test be
run, as it depended on the Stretch binary.

This commit does not modify the .travis.yml file, as Travis-CI does not
have new enough Ubuntu releases available yet. Also Travis-CI.org is
practically dead now as build times have been shrunk to near zero.

The scope of this change is also Debian/Ubuntu only. No RPM or Windows or
Mac changes are included in this commit.

This commit does not update the external libmariadb or ColumnStore
CI pipelines, as those are maintained in different repositories.
2021-03-15 11:34:02 +02:00
Marko Mäkelä
6d05a95c65 Merge 10.5 into 10.6 2021-01-14 16:13:31 +02:00
Sergei Golubchik
5c53576c7b deb: use ${server:Version} for the version of the server package
and not ${binary:Version}, which is the version of the current
package, whatever it is.
2021-01-12 16:47:23 +01:00
Marko Mäkelä
92abdcca5a Merge 10.5 into 10.6 2021-01-07 09:08:09 +02:00
Marko Mäkelä
6268bdadf7 Merge 10.5 into 10.6 2021-01-04 10:52:32 +02:00
Otto Kekäläinen
af8fa245a1 Deb: Sync misc changes from downstream Debian
- Add cracklib-runtime and libarchive-dev as build dependencies
- Update Debian policy standards version to 4.5.0
- Add libssl-dev to libmariadb-dev run-time dependency
- Add "Multi-Arch: same" to packages that have it in Debian
- Sync README.Debian
- Sync debian/rules formatting
- Sync autopkgtests
2021-01-03 21:14:32 +02:00
Otto Kekäläinen
ea56841997 Deb: Make dependencies and debian/rules cross-compile compatible
Also clean away impossible/unnecessary "Multi-Arch: same" stanzas.
Mostly upstreamed from f0ba31e156

Omitted 'libzstd-dev (>= 1.3.3)' as the version requirement would need
stretch-backports to be available on buildbot.askmonty.org builders and
they are not yet.
2021-01-03 21:14:32 +02:00
Otto Kekäläinen
7a60bc22fc Deb: Remove PLUGIN_COLUMNSTORE=YES, it will build by default anyway
If PLUGIN_COLUMNSTORE is not defined, ColumnStore will build automatically
by default on supported architectures as defined in its CMakeFile.txt.

Thus there should not be any need to inject this build flag at any point
and it can be removed to keep thing lean and clean.
2020-12-23 15:17:49 +02:00
Otto Kekäläinen
deecc75a02 Fix commit 113f18686d and d180909796: PLUGIN_COLUMNSTORE=NO by default
ColumnStore seems to build by default, so it must be explicitly disabled
with a build flag, so that it does not build at all and thus build machine
disk space and CPU will be spared.

This reverts commit 113f18686d.
2020-12-23 15:17:49 +02:00
Otto Kekäläinen
113f18686d Fix previous commit: PLUGIN_COLUMNSTORE=YES can only be active on amd64
Refactor previous commit to fix mistake revealed by Buildbot. We can't
have a structure where PLUGIN_COLUMNSTORE would ever be 'YES' on an arch
that does not support it, as the flag overrides any potential platform
detection code and builds on non-amd64 would all fail.
2020-12-21 23:20:56 +02:00
Otto Kekäläinen
d180909796 Deb: Don't build ColumnStore in native builds, only in autobake-deb.sh
ColumnStore files and debian/control stanza was removed in 1edd2243, and
thus will not be included in a native build. Also adapt the debian/rules
to follow this same policy and only build ColumnStore in builds triggered
from autobake-deb.sh. Avoiding building ColumnStore in vain saves a lot of
build time and disk space.
2020-12-21 19:03:29 +02:00
Marko Mäkelä
a62a675fd2 Merge 10.5 into 10.6 2020-11-23 17:57:58 +02:00
Roman Nozdrin
a16e3c326d Update MCS to resolve libmarias3 compulation for centos74-amd64-debug
pipeline in community BB

Fix for rebuild from source step

Disable MCS on i386|i686 platforms

This patch puts MCS debian packaging files and part of debian/control
into the engine directory
2020-11-19 13:52:33 +00:00
Marko Mäkelä
09a1f0075a Merge 10.5 into 10.6 2020-11-02 12:49:19 +02:00
Alexey Botchkov
5ca14dafbe MDEV-19275 Provide SQL service to plugins.
Debian scripts fixed.
2020-10-19 16:51:52 +04:00
Marko Mäkelä
0e34bb3e97 Merge 10.5 into 10.6 2020-08-12 14:39:53 +03:00
Daniel Black
cca55a9ca9 debian: disable rocksdb on 32bit with valid cmake directive 2020-08-08 14:04:13 +10:00
Marko Mäkelä
9a7948e3f6 Merge 10.5 into 10.6 2020-08-04 07:55:16 +03:00
Otto Kekäläinen
a10f72aa5e Deb: Proper DH_ and DEB_ flag use in debian/rules
- DEB_BUILD_HARDENING is only used with hardening-wrapper which is
  deprecated in Debian, so remove it
- The word 'terse' should be checked in DEB_BUILD_OPTIONS and verbosity
  controlled by it
2020-07-30 10:36:39 +10:00
Marko Mäkelä
d61c800308 MDEV-23024 Remove Cassandra Storage Engine
Cassandra has long been non-functional, doesn't compile, etc.,
and development on it has halted. Since MariaDB Server 10.5,
the build is disabled by default.

It makes sense to remove it as it's just taking up space.
2020-07-14 16:24:50 +03:00
Otto Kekäläinen
439377927b Deb: Misc ColumnStore Debian packaging improvements
- Add 'libboost-all-dev' and 'libreadline-gplv2-dev' as they were was found
  to be a compulsory build dependency for columnstore plugin.
- Add 'expect' as run-time dependencey for columnstore plugin as scripts
  use it:
    usr/bin/mcs_module_installer.sh: #!/usr/bin/expect
    usr/bin/remote_command.sh: #!/usr/bin/expect
    usr/bin/remote_command_verify.sh: #!/usr/bin/expect
    usr/bin/remote_scp_get.sh: #!/usr/bin/expect
    usr/bin/remote_scp_put.sh: #!/usr/bin/expect
    usr/bin/rsync.sh: #!/usr/bin/expect
- Properly define depends on Python. No Python 2 support needs to be
  considered, Python 3 has been around long enough. Fixes Lintian errors
    E: mariadb-plugin-columnstore: python-script-but-no-python-dep
    usr/bin/mcs-loadbrm.py #!python
    E: mariadb-plugin-columnstore: python-script-but-no-python-dep
    usr/bin/mcs-start-storagemanager.py #!python
- Partially revert undocumented and thus unjustified changes in commits
  d69a79da63287089efdc5f90a11ecd66ce55b471 and
  c0565666cfe6528b76bc53ce50d3690d13c92cf6.
- Trigger ldconfig, otherwise Lintian complains:
    E: mariadb-plugin-columnstore: package-must-activate-ldconfig-trigger
    usr/lib/x86_64-linux-gnu/libwriteengineredistribute.so
- Update postinst to be compatible with new server binary mariadbd name.
- Properly detect systemd or fallback to sysv init in postrm script.
- Only attempt to build ColumnStore on amd64 and i386. Test builds on
  Launchpad.net showed the CMake plugin configure step will prevent even
  attempts to build on other platforms.
- Clean up and unify cmake build command in debian/rules.
- Explicitly list files not installed.
- Run 'wrap-and-sort -a -v'.
- Truncate build logs on Salsa-CI to keep under 4 MB. This is now needed
  as the ColumnStore build is so verbose.
  See https://jira.mariadb.org/browse/MCOL-4111.
- Update Travis-CI dependencies to match new debian/control.
2020-07-10 21:56:14 +03:00
Vladislav Vaintroub
272828a171 Merge branch '10.5' into 10.6 2020-07-04 11:53:26 +02:00
Sergei Golubchik
c2b12c554e build deb packages for columnstore 2020-06-19 21:04:17 +02:00
Otto Kekäläinen
7803601dcb MDEV-22569: Run bin/mariadbd instead of bin/mysqld
Replace all references to /usr/sbin/mysqld (and bin and libexec) with
mariadbd, so that the binary server will always be 'mariadbd'.

Also update all places that reference the server binary in other ways,
such as AppArmor profiles and scripts that previously expected to find
a 'mysqld' in process lists.
2020-06-16 12:59:30 +03:00
Otto Kekäläinen
764dd39ca7 Deb: Add support for legacy init systems again
Partially reverts commit a4cc6fb91f.

While all current versions of Linux have systemd, support for traditional
init.d is still needed e.g. on Linux subsystem on Windows, kFreeBSD and
special variants of Debian/Ubuntu that for other reasons don't have
systemd.

Thus, re-introduce the init file that was remove, but this time with
then name 'mariadb'.

Supporting traditional sysv init in paraller with systemd is easy, since
Debian has facilities for it.

Also simplify and update salsa-ci.yml install/upgrade testing works
for all previous MariaDB and MySQL releases without any excess quirks.

Note that in fresh installs the salsa-ci.yml needs to run command
'service mariadb status' to control the service, while on upgrades
it is enough to run 'service mysql status', since the init.d/mysql
file is left behind from previous install, along with some other
config files such as /etc/default/mysql and /etc/mysql/* stuff.
2020-05-16 10:42:35 +03:00
Otto Kekäläinen
4501c7e875 Deb: Rename relevant occurrences of 10.5 to 10.6 now in 10.6 series 2020-05-14 19:43:26 +03:00
Marko Mäkelä
7924158496 MDEV-19780 Remove the TokuDB storage engine
The TokuDB storage engine has been deprecated by upstream
Percona Server 8.0 in favor of MyRocks and will not be available
in subsequent major upstream releases.

Let us remove it from MariaDB Server as well.
MyRocks is actively maintained, and it can be used instead.
2020-05-14 10:11:47 +03:00
Otto Kekäläinen
7cbde2d0a2 Deb: Misc small fixes and cleanups
- Include binary wsrep_sst_rsync_wan previously omitted.
- Don't build the embedded server. This saves a lot of time and
  around 500 MB of disk space.
- Clean away unused override_dh_installcron. The package does not
  have any *.cron files, so this section is not needed.
- Make mariadb-server run time depend on procps so pgrep works.
  The command pgrep is used in the maintainer scripts of mariadb-server,
  thus we should ensure it is found on the system.
- Include build plugin func_test.so in test package. Don't include yet
  type_test.so since it fails (MDEV-22243).
- Clean away obsolete Lintian overrides.
2020-04-23 10:07:07 +03:00
Otto Kekäläinen
da64ec1ede MDEV-19110: Remove Cassandra from Debian packaging
Cassandra has deprecated their Thrift interface years ago (a few months
after Cassandra SE was released). The new way to access Cassandra is to
use the CQL Connector, which does not use Thrift.

There have been talks to make a CassandraSE V2 but no usable code have
been produced. The motivation to keep CassandraSE in the MariaDB source
code is to have it as an example for such future attempts.

It can stay in the source code but it should be removed from packaging
to avoid Debian packaging maintenance work around trying to compile it
and have tests pass on new platform.

If somebody wants Cassandra, they can use the 10.4 branch.
2020-04-23 10:07:07 +03:00
Otto Kekäläinen
9cc1c74ca3 MDEV-21944: Remove TokuDB from Debian packaging
It was already disabled in 1589cf1cb3 but
turns out that as long as the packaging is there, is requires maintenance,
ensuring it still builds, debugging failing tests etc and that takes its
toll and is not worth all the extra work. Having it "only disabled" does
not help, since either we have it and keep it tested and working, or we
don't have it and don't spend time on keeping it working and tested.

In MDEV-19780 there was already a decision to drop TokuDB from MariaDB.

If somebody wants TokuDB, they can use the 10.4 branch.
2020-04-23 10:07:07 +03:00
Otto Kekäläinen
a4c5480525 MDEV-6284: Sync correct Debian handling of auth_pam_tool
Manages the security risk in way that also fixes Lintian warning:
  W: mariadb-server-10.5: setuid-binary
  usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool 4755 root/root

Applied downstream in
9605a48a99
2020-04-19 17:15:40 +03:00
Otto Kekäläinen
7a0eeaaf66 MDEV-6284: Sync deb build rules etc with downstream
- Ensure cmake builds also apply CPPFLAGS flags for hardening to fully work
  fc4f33cf40
- Install Ubuntu Apport files in the same way with same filename.
- MDEV-21705: Build flags to keep WolfSSL from crashing
- Clean away sql-bench from packaging immediately after build step.
- Delete private files from libraries so they don't get shipped in the -dev
  packages.
2020-04-19 17:15:40 +03:00
Otto Kekäläinen
bc11f392f8 MDEV-6284: Correctly place files in libmariadb-dev, libmariadbd-dev etc packages
- Make full contents, also header files, explicit in -dev packages
  fb77df0c75
- Don't ship private header files at all.
- Ship both libmariadb.pc and maridb.pc.
- Ship mysql_config only as a symlink.
- Keep 'mariadbcheck' as symlink as somebody could have used it already
  d0466f74d5
- The mariadb.pc is the server pkg-config, ship in libmariadbd-dev.
- The client pkg-config is called libmariadb.pc. Ship only it in the client
  library packages.

Use versioned breaks/replaces for mysql* packages we also provide and fix:

  [ERROR] libmariadb-dev conflicts with libmysqlclient-dev files:
    {'/usr/share/man/man1/mysql_config.1.gz', '/usr/share/aclocal/mysql.m4'}
  [ERROR] libmariadb-dev conflicts with libmysqld-dev files:
    {'/usr/lib/x86_64-linux-gnu/libmysqlservices.a'}
2020-04-19 17:15:40 +03:00
Otto Kekäläinen
87a7968c23 MDEV-22150: Symlink and move test client plugins to client plugin path
Without this, the mtr will fail to load client plugins and the following
tests would fail:

- main.plugin_auth_qa_2
- main.plugin_auth_qa_3
- main.plugin_auth
- plugins.multiauth
- plugins.auth_ed25519
2020-04-14 12:08:30 +03:00
Otto Kekäläinen
4bc31a904f MDEV-22053: Pass INSTALL_LAYOUT "DEB" correctly to CONC (libmariadb)
As this was missing, the libmariadb/install.cmake section for Debian
builds was not triggered at all, and existing fixes to make the
Debian paths correct did not apply.

Update libmariadb3 paths in Debian packaging after MariaDB Connector C
3.1.8 upgrade

Also now include caching_sha2_password.so which was previously omitted.

Keep old libmariadbclient.a as symbolic link for backwards compatibility.

Closes: CONC-304
Related: CONC-456, MDEV-22150
2020-04-13 14:33:50 +03:00
Otto Kekäläinen
1589cf1cb3 Deb: Remove TokuDB from Debian packages while keeping it easy to revert
Related:
- https://jira.mariadb.org/browse/MDEV-19780
- https://jira.mariadb.org/browse/MDEV-21944
2020-04-04 20:42:00 +03:00
Otto Kekäläinen
41952c85f1 Travis-CI: Shorten deb build log to keep it under 4 MB
There is a 4 MB hard limit on Travis-CI and build output needs to be less
than that. Silencing the 'make install' step gets rid of a lot of
"Installing.." and "Missing.." and removing all mysql-test files will
make the dh_missing warnings much shorter.
2020-03-18 22:49:55 +02:00
Oleksandr Byelkin
fad47df995 Merge branch '10.4' into 10.5 2020-03-11 17:52:49 +01:00
Oleksandr Byelkin
b7362d5fbc Merge branch '10.3' into 10.4 2020-03-11 14:28:24 +01:00
Vicențiu Ciorbaru
1d99e4d674 Merge branch '10.2' into 10.3 2020-03-08 11:02:55 +02:00
Daniel Black
6610532170 Update install layout to account for multi-arch setup
Cleanup install_layout to account for multi-arch setup and remove
redundant defines in debian rules.

Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
2020-03-08 09:25:22 +02:00
Marko Mäkelä
acc4da9c18 After-merge fix
The merge commit ded128aa9b failed to adjust
commit 9d18b62467 in debian/rules.
We must adjust the build path, which is derived from the package name,
which contains the major version number.
2020-01-21 08:34:19 +02:00
Marko Mäkelä
ded128aa9b Merge 10.4 into 10.5 2020-01-20 16:48:56 +02:00
Sergei Golubchik
9d18b62467 rpm/deb and auth_pam_tool_dir/auth_pam_tool
don't let mysql_install_db set SUID bit for auth_pam_tool in rpm/deb
packages - instead package files with correct permissions and
only fix the ownership of auth_pam_tool_dir (which can only be done
after mysql user is created, so in post-install).

keep old mysql_install_db behavior for bintars
2020-01-17 18:14:43 +01:00
Marko Mäkelä
1333da90b5 Merge 10.4 into 10.5 2019-09-24 10:07:56 +03:00
Otto Kekäläinen
97cd583df7 Deb: Sync non-functional changes from official Debian 10.4 packaging
- Update comment strings
- Extend package description to satisfy Lintian complaint
- Remove uscan stanza from rules as it is never used anyway
2019-09-18 16:11:49 +03:00
Marko Mäkelä
4081b7b27a Merge 10.4 into 10.5 2019-09-06 17:16:40 +03:00