Commit graph

1044 commits

Author SHA1 Message Date
Sergei Golubchik
74532f2355 MCOL-5819 disable lto for ColumnStore 2025-01-09 10:00:35 +01:00
Sergei Golubchik
99178311ac don't disable lto in DEB builds 2024-10-17 21:37:37 +02:00
Oleksandr Byelkin
9af2caca33 Merge branch '10.5' into 10.6 2024-07-18 16:25:33 +02:00
Souradeep Saha
4a89f79b6a Refactor import * with only required imports
Import only the required functions instead of all the functions from the
module to reduce the unnecessary functions in the namespace and prevent
shadowing. Note: All code changes are non-functional.

All new code of the whole pull request, including one or several
files that are either new files or modified ones, are contributed
under the BSD-new license. I am contributing on behalf of my
employer Amazon Web Services, Inc.
2024-07-17 16:50:53 +01:00
Tuukka Pasanen
62dfd0c09d MDEV-33837: Workaround chown warnings
Blindly recursive chown is not way to do it.
This Workaround is not much better than just chown -R but
there is small adjustment just chown MariaDB statedir and logdir
then with find only chown those files that are not correctly
owned.

Fixes lintian warnings:
 * W: mariadb-server: recursive-privilege-change "chown -R" [postinst:*]
 * W: mariadb-server: recursive-privilege-change "chown -R" [postinst:*]
2024-07-17 09:39:49 +10:00
Tuukka Pasanen
b204817986 MDEV-34261: Detect if build is running under 32-bit container
When building on 64-bit kernel machine in 32-bit docker container
CMake falsely (but it works as expected) detects that container
runtime in also 64-bits. Use linux32 command to change runtime
enviroment to 32-bit and then CMake will correctly disable for
example ColumnStore and not try to build it

This commit only works with debian/autobake-debs.sh
2024-06-05 09:01:32 +01:00
Sergei Golubchik
7b53672c63 Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
Sergei Golubchik
30d3cfad69 new C/C 3.3 2024-05-08 19:21:06 +02:00
Daniel Black
e63ed4e004 MDEV-33631 Ubuntu/Debian MYSQL_SERVER_SUFFIX is version+suffix on MariaDB packaged versions
The debian/rules removed sufficient version information from the
downstream version, however the mariadb upstream has a +
separator from the suffix.

While we are at it, remove the Debian/Ubuntu revision -1.

Other revisions used:
* Debian unstable (inherited to both Debian and Ubuntu if package unchanged): 1:10.11.6-2
* Ubuntu stable updates example: 1:10.11.6-0ubuntu0.23.10.2
* Debian stable updates example: 1:10.11.4-1~deb12u1

The result is compulation with:
    -DMYSQL_SERVER_SUFFIX="-1:10.4.34+maria~deb10" \

Compared to Debian:
    -DMYSQL_SERVER_SUFFIX="-1~deb12u1" \

The impact comes into play with SELECT VERSION():
    10.4.34-MariaDB-1:10.4.34+maria~deb10

A more abbreviated form of the following is much more human/machine parsable:
    10.6.16-MariaDB~ubu2004

Reviewer: Otto Kekäläinen
2024-05-01 00:57:15 +10:00
Marko Mäkelä
8e663f5e90 MDEV-32791 MariaDB cannot be installed on Red Hat ubi9
The libpmem dependency that had been added in
commit 3daef523af (MDEV-17084)
did not achieve any measurable performance improvement when
comparing the same PMEM device with and without "mount -o dax"
using the Linux ext4 file system.

Because Red Hat has deprecated libpmem, let us remove the code
altogether.

Note: This is a 10.6 version of
commit 3f9f5ca48e
which will retain PMEM support in MariaDB Server 10.11.
2024-04-19 11:04:51 +03:00
Marko Mäkelä
ccb7a1e9a1 Merge 10.5 into 10.6 2024-03-27 15:00:56 +02:00
Daniel Black
ee2ed1a036 Revert "MDEV-33636: RPM caps is on mariadbd exe"
This was the orginal implementation that reverted with a bunch of
commits.

This reverts commit a13e521bc5.

Revert "cmake: append to the array correctly"
This reverts commit 51e3f1daf5.

Revert "build failure with cmake < 3.10"
This reverts commit 49cf702ee5.

Revert "MDEV-33301 memlock with systemd still not working"
This reverts commit 8a1904d782.
2024-03-27 13:36:31 +11:00
Sergei Golubchik
dbd36bb140 after merge fix 2024-03-14 19:51:03 +01:00
Marko Mäkelä
c3a00dfa53 Merge 10.5 into 10.6 2024-03-12 09:19:57 +02:00
Daniel Black
8a1904d782 MDEV-33301 memlock with systemd still not working
CapabilityBoundingSet included CAP_IPC_LOCK in MDEV-9095, however
it requires that the executable has the capability marked in extended
attributes also.

The alternate to this is raising the RLIMIT_MEMLOCK for the service/
process to be able to complete the mlockall system call. This needs to
be adjusted to whatever the MariaDB server was going to allocate.
Rather than leave the non-obvious mapping of settings and tuning,
add the capability so its easier for the user.

We set the capability, if possible, but may never be used depending
on user settings. As such in the Debian postinst script, don't
complain if this fails.

The CAP_IPC_LOCK also facilitates the mmaping of huge memory pages.
(see man mmap), like mariadb uses with --large-pages.
2024-02-15 12:58:13 +11:00
Marko Mäkelä
691f923906 Merge 10.5 into 10.6 2024-02-13 20:42:59 +02:00
Otto Kekäläinen
d64ade302e Properly introduce wsrep_sst_backup script in project packaging
The script wsrep_sst_backup was introduced on MariaDB 10.3 in commit
9b2fa2a. The new script was automatically included in RPM packages but not
in Debian packages (which started to fail on warning about stray file).

Include wsrep_sst_backup in the mariadb-server-10.5+ package, and also
include a stub man page so that packaging of a new script is complete.

Related:
https://galeracluster.com/documentation/html_docs_20210213-1355-master/documentation/backup-cluster.html

This commit was originally submitted in May 2022 in
https://github.com/MariaDB/server/pull/2129 but upstream indicated only
in May 2023 that it might get merged, thus this is for a later release.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2024-02-13 12:03:55 +00:00
Daniel Black
c0f6c4bd40 MDEV-28419 subsequent runs of debian/autobake-deb.sh are not idempotent
While a -f debian/mariadb-plugin-columnstore.install idempotent check
existed, the tying of the install file to the control file has some
weaknesses.

Used sed as an alternative to replace the debian/control
mariadb-plugin-columnstore package defination and replace it with the
one from the columnstore submodule.
2024-02-13 14:01:46 +11:00
Marko Mäkelä
91a2192bf2 Merge 10.5 into 10.6 2024-02-07 13:51:03 +02:00
Tuukka Pasanen
6914b7804d MDEV-32935: Remove unneeded CMAKE_SYSTEM_PROCESSOR parameter from Debian
There is no need for CMAKE_SYSTEM_PROCESSOR parameter in Debian
build as dh_auto_configure should handle things better and
more reliable
2024-01-30 12:22:57 +11:00
Daniel Black
12d05c8266 MDEV-28640: Debian typo in init script
Noted by Eric X.
2024-01-29 23:04:48 +11:00
Marko Mäkelä
3a96eba25f Merge 10.5 into 10.6 2024-01-17 13:35:05 +02:00
Tuukka Pasanen
ee30491e50 MDEV-32111: Debian Sid/Trixie will not have libncurses 5 anymore
Upstream Debian Sid which will become Debian Trixie (13)
have dropped NCurses version 5 and changed dev package name just
libncurses-dev
2024-01-14 13:27:10 +11:00
Sergei Golubchik
e95bba9c58 Merge branch '10.5' into 10.6 2023-12-17 11:20:43 +01:00
Sergei Golubchik
98a39b0c91 Merge branch '10.4' into 10.5 2023-12-02 01:02:50 +01:00
Faustin Lammler
81aba2c21f Fix typo 2023-11-28 16:30:04 +11:00
Faustin Lammler
60c01206df The MariaDB mailing list system has been moved
See: https://mariadb.org/mailing-lists/
2023-11-28 16:30:04 +11:00
Tuukka Pasanen
15bb8acf8f MDEV-32689: Remove Ubuntu Bionic from 10.5
Commit Removed Ubuntu Bionic from
debian/autobake-debs.sh as it's not used
anymore to build official MariaDB images

REMINDER TO MERGER: This commit should not
be merged up to 10.6 or forward
2023-11-15 20:52:22 +11:00
Tuukka Pasanen
c11610f590 MDEV-32689: Remove Ubuntu Bionic
Commit Removed Ubuntu Bionic from
debian/autobake-debs.sh as it's not used
anymore to build official MariaDB images
2023-11-14 14:02:22 +00:00
Marko Mäkelä
8096139b3a Merge 10.5 into 10.6 2023-09-19 10:47:26 +03:00
Marko Mäkelä
6c05edfdcd Merge 10.4 into 10.5 2023-09-19 10:20:09 +03:00
Oleksandr Byelkin
6bf8483cac Merge branch '10.5' into 10.6 2023-08-01 15:08:52 +02:00
Oleksandr Byelkin
f52954ef42 Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
Anel Husakovic
77a229cd2d MDEV-31358: Update description for MariaDB debian/rpm packages
Reviewer: <daniel@mariadb.org>
2023-07-03 17:45:58 +10:00
Tuukka Pasanen
8171f9da87 MDEV-31423: Make sure that datadir is available with SySV-init script
Commit fixes Debian SySV-init script fail:
  /etc/init.d/mariadb: line 90: [: : integer expression expected
which happens if datadir is not changed in configuration which
makes it invisible when printing MariaDB config defaults.

Commit makes sure that there is some value if nothing else if in hand
use default /usr/lib/mysql or fail with correct error message if
directory is not present
2023-06-09 10:22:34 +10:00
Marko Mäkelä
6882eeabb0 MDEV-30483 fixup: Declare the test plugin for Debian 2023-06-08 09:23:01 +03:00
Tuukka Pasanen
30fb72ca6e MDEV-31331: Fix cut'n'paste variable name in Debian pre-inst script
There is unwanted cut'n'paste variable name in Debian pre-inst
script which causes:

df: '': No such file or directory
/var/lib/dpkg/tmp.ci/preinst: line 215: [: : integer expression expected

Rename variable to correct one and make check that that directory
or symlink really exists. If it does not then fail with error
and message.
2023-05-31 10:26:19 +10:00
Otto Kekalainen
ea66df2f45 Deb: Fix blocksize check to use $mysql_datadir/$datadir correctly
In commit f99a8918 this line was changed to not use awk, and new version
copied both to init file and preinst file but overlooking that they use
different variable names.

Also fix minor syntax issues to make Shellcheck happy.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer
Amazon Web Services, Inc.
2023-05-30 18:55:13 +10:00
Tuukka Pasanen
f522b0f230 MDEV-30951: Fix small perlcritic and enable modern Perl
Add Modern Perl headers. Perl 5.16 is still fairly
old from 2012.

Enable UTF-8, warnings and make script 'strict'

Small fixes for perlcritic reported problems and some crashes

I/O layer ":utf8" used at line 268, column 16.  Use ":encoding(UTF-8)" to get strict validation.  (Severity: 5)
"return" statement with explicit "undef" at line 806, column 4.  See page 199 of PBP.  (Severity: 5)
"return" statement with explicit "undef" at line 6844, column 4.  See page 199 of PBP.  (Severity: 5)
"return" statement with explicit "undef" at line 7524, column 4.  See page 199 of PBP.  (Severity: 5)
"return" statement with explicit "undef" at line 7527, column 4.  See page 199 of PBP.  (Severity: 5)
"return" statement with explicit "undef" at line 7599, column 4.  See page 199 of PBP.  (Severity: 5)
"return" statement with explicit "undef" at line 7602, column 4.  See page 199 of PBP.  (Severity: 5)
Expression form of "eval" at line 7784, column 4.  See page 161 of PBP.  (Severity: 5)
Expression form of "eval" at line 7806, column 4.  See page 161 of PBP.  (Severity: 5)
Glob written as <...> at line 8016, column 25.  See page 167 of PBP.  (Severity: 5)
"return" statement followed by "sort" at line 9195, column 60.  Behavior is undefined if called in scalar context.  (Severity: 5)
Expression form of "eval" at line 9846, column 10.  See page 161 of PBP.  (Severity: 5)
2023-05-12 15:17:40 +01:00
Tuukka Pasanen
2740b657ce MDEV-31216: Make sure that lsof does not fail on install
Command lsof can fail on Debian install.
Revert logic more like old one to make sure that there is no failing
and still does don't boundce on shellcheck.
2023-05-09 08:55:05 +10:00
Tuukka Pasanen
50cdf0b5ea MDEV-30952: Reformat Debian pre- and postscripts if-clauses
Debian install scripts if-clauses are not formatted
as they should be. This commit formats Debian
Pre and Post script if-clauses.
2023-05-08 16:52:27 +10:00
Tuukka Pasanen
8febdfa342 MDEV-30952: Fix shellcheck problems on Debian scripts
Commit fixes several ShellCheck found problems in Debian
Pre- and Postscripts.

Debian script mariadb-server-10.6.postrm contains shellcheck
Fixed problems are:
  https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q...
  https://www.shellcheck.net/wiki/SC2006 -- Use $(...) notation instead of le...
  https://www.shellcheck.net/wiki/SC1091 -- Not following: /usr/share/debconf...

Debian script mariadb-server-10.6.postinst contains shellcheck
Fixed problems are:
  https://www.shellcheck.net/wiki/SC2129 -- Consider using { cmd1; cmd2; } >>...
  https://www.shellcheck.net/wiki/SC1091 -- Not following: /usr/share/debconf...
  https://www.shellcheck.net/wiki/SC1072 -- Expected test to end here (don't ...
  https://www.shellcheck.net/wiki/SC1073 -- Couldn't parse this test expressi...
  https://www.shellcheck.net/wiki/SC1009 -- The mentioned syntax error was in...

Debian script mariadb-server-10.6.preinst contains shellcheck
Fixed problems are:
  https://www.shellcheck.net/wiki/SC2231 -- Quote expansions in this for loop...
  https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q...
  https://www.shellcheck.net/wiki/SC2001 -- See if you can use ${variable//se...
  https://www.shellcheck.net/wiki/SC1091 -- Not following: /usr/share/debconf...
  https://www.shellcheck.net/wiki/SC1007 -- Remove space after = if trying to...
2023-05-08 16:52:27 +10:00
Tuukka Pasanen
7cbb45d1d4 MDEV-30952: Reformat Debian post and pre scripts
There is several misindentation inside Debian post and pre
installation scripts. False indentation with space
as indent space should be 2 and indentation with tabs.
2023-05-08 16:52:27 +10:00
Tuukka Pasanen
5f3a4beb9d MDEV-31045: Update debian/rules to be in sync to MariaDB LTS 10.6
To make sure that PMEM problem does not happen again sync
10.9 and up debian/rules to make sure that they are not making
anymore problems with autobake-debs.sh
2023-05-02 16:37:01 +10:00
Tuukka Pasanen
c5e50c48bb MDEV-30837: Remove usage of AWK in autobake-debs.sh
AWK is used in autobake-debs.sh for printing information
about created DEB packages.

This can be rewrite with bash inner commands read and echo.
2023-04-27 15:09:01 +10:00
Tuukka Pasanen
f99a891858 MDEV-30837: Remove usage of AWK from Debian init and postinst scripts
AWK in used in Debian SysV-init and postinst scripts to determine
is there enough space starting MariaDB database or create new
database to target destination.

These AWK scripts can be rewrited to use pure SH or help
using Coreutils which is mandatory for usage of MariaDB currently.

Reasoning behind this is to get rid of one very less used dependency
2023-04-27 15:09:01 +10:00
Marko Mäkelä
818d5e4814 Merge 10.5 into 10.6 2023-04-25 13:10:33 +03:00
Oleksandr Byelkin
1d74927c58 Merge branch '10.4' into 10.5 2023-04-24 12:43:47 +02:00
Oleksandr Byelkin
3d27f6d7f4 Merge branch '10.3' into 10.4 2023-04-21 09:10:58 +02:00
Daniel Black
3b85e3dcc1 MDEV-30687: Make small facelifting to autobake-debs.sh (fix)
Appending to 'eatmydata' will obviously cause an executable that
doesn't exist. Use an array to create the entire executable.

Also while we are at it, check the fakeroot actually works before
using it.
2023-04-17 19:17:58 +10:00