Commit graph

930 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Marko Mäkelä
6c05edfdcd Merge 10.4 into 10.5 2023-09-19 10:20:09 +03: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
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
Julius Goryavsky
1e58b8afc0 move alloca() definition from all *.h files to one new header file 2023-03-07 11:13:20 +01:00
Tuukka Pasanen
a9eb272f91 MDEV-30534: Remove EOL Debian version 9 (stretch) from autobake-deb.sh
Debian 9 has EOL July 6th, 2020. This commit cleans it up
from debian/autobake-deb.sh which is used to build official
versions of MariaDB
2023-02-08 15:31:59 +11:00
Salman Mohammadi
2a78c3ef6f MDEV-30509: mariadb-plugin-connect: introduce curl as recommends
in order to be able to retrieve files using REST queries. Otherwise,
`ERROR 1105 (HY000): Curl not installed.` will be thrown.
2023-01-31 16:20:55 +11:00
Marko Mäkelä
fb0808c450 Merge 10.3 into 10.4 2023-01-03 16:10:02 +02:00
Daniel Black
c4938eafc5 MDEV-30275: mariadb names rather than mysql names should be used
* mariadb-service-convert to use mariadbd-safe
* galera_recovery to use mariadbd
* mtr - wsrep use mariadb executables
* debian/mariadb-server.mariadb.init use mariadbd-safe
* debian/tests/smoke uses mariadb instead of mysql as client.

Co-Author: Daniel Black <daniel@mariadb.org>
2023-01-03 11:25:10 +11:00
musvaage
8b18932ebc debian typos 2022-12-19 09:46:26 +11:00
musvaage
d0f6d46704 debian typos 2022-12-16 08:51:40 +11:00
Daniel Black
97c6cd9798 Deb: debian-start.inc - do not quote exe variables 2022-12-15 08:48:48 +11:00
Daniel Black
9ee055a27f Deb: mariadb-server.postinst to use mariadb-install-db 2022-12-14 20:52:06 +00:00
Daniel Black
952af4a179 Deb: MariaDB names as default for deb scripts
Also include the ftp.mariadb.org script rather than old name.
2022-12-14 20:52:06 +00:00
Tuukka Pasanen
851816532b MDEV-28834: Add minimal support for Lintian version 2.115 and above
Convert minimal amount of Lintian overrides to make Lintian
test pass also with Debian Sid latest Lintian 2.115 version.

Old style overrides are kept so they can be used with
older versions of Lintian.

Introduce minimal Lintian overrides which are common
from MariaDB version 10.5 up-to to 10.8.

Overrides added files:
  * debian/mariadb-test-data.lintian-overrides
    - MariaDB installs some shared objects to test-suite directory and not in
      '/usr/lib' or similar. Share objects is pam_mariadb_mtr.so. Tags are
      arch-dependent-file-in-usr-share and
      arch-independent-package-contains-binary-or-object Lintia
 * debian/mariadb-test.lintian-overrides
   - MariaDB installs some some binaries to test-sute directory and
     in mariadb-test package they are my_safe_process and
     wsrep_check_version. Tags is
     arch-dependent-file-in-usr-share
 * debian/source/lintian-overrides
   - In source there is some source files missing which should be addressed
     sql/share/charsets/languages.html and
     and storage/rocksdb/rocksdb/docs/_includes/footer.html.
     Tags is source-is-missing
   - Add Lintian override for missing:
     storage/columnstore/columnstore/utils/jemalloc/libjemalloc.so.2
   - Add Lintian override for substvar external resources:
     ${source:Version} libmariadb-dev -> libmysqlclient-dev [debian/control:66]
     ${source:Version} libmariadb-dev -> libmysqld-dev [debian/control:66]
     ${source:Version} libmariadbd-dev -> libmariadbclient-dev [debian/control:216]
2022-12-08 17:01:39 +00:00
Marko Mäkelä
9a0b9e3360 Merge 10.4 into 10.5 2022-10-25 11:26:37 +03:00
Marko Mäkelä
667d3fbbb5 Merge 10.3 into 10.4 2022-10-25 10:04:37 +03:00
Sergei Golubchik
0609b34555 disable LTO in debian builds 2022-10-22 10:24:14 +02:00
Otto Kekäläinen
dca4fc24a2
Deb: Use archive.mariadb.org for upgrade testing in Salsa-CI (#2294)
The official deb.mariadb.org mirrors are intended for distribution of the
current MariaDB releases. When a version goes end-of-life, they are
removed from those mirrors.

The upgrade tests should however work even after EOL. While we do want
users to stop using EOL versions, we still expect the newer versions to
support upgrades from old versions to the current versions. Therefore we
should continue testing upgrades from EOL versions, and for that to work,
switch the CI to use the archive.mariadb.org repositories instead.

MERGE NOTE: This commit was made on the oldest branch with the salsa-ci.yml
file. When merging 10.5->10.6->...->10.12 please include this commit in
the merge and ensure all files end up with the change:

    deb.mariadb.org/10.([0-9]+)/ -> archive.mariadb.org/mariadb-10.$1/repo/
2022-10-21 10:17:25 +01:00
Marko Mäkelä
18795f5512 Merge 10.3 into 10.4 2022-09-13 16:36:38 +03:00
Tuukka Pasanen
04899d6d91
MDEV-28605: Change wrong plugin config installation location (#2160)
Preset include directory for configuration files below MariaDB 10.5 is
/etc/mysql/conf.d

Change installation location wrong plugin installation location from
/etc/mysql/mariadb.d to default include directory /etc/mysql/conf.d.
Change makes gssapi-server, oqgraph, rocksdb and tokudb plugins
loading work after installation

NOTE TO MERGERS: This commit should be upstream to MariaDB 10.4 only!
Merging to MariaDB 10.5 and above leads to major problems.
2022-09-07 14:05:09 +01:00
Daniel Black
dd092bc6eb
Deb: add kinetic to autobake (#2250) 2022-09-07 10:58:55 +01:00
Marko Mäkelä
ea847cbeaf Merge 10.4 into 10.5 2022-06-27 10:51:20 +03:00
Marko Mäkelä
01d757036f Merge 10.3 into 10.4 2022-06-27 10:14:37 +03:00
Tuukka Pasanen
c168e16782 MDEV-28628: Change current Debian package revision scheme
Current Debian package revision scheme when using
debian/autobake-deb.sh script is:
  '1:VERSION+maria~LSBNAME'

For example if VERSION can be like 10.6.8 and LSBNAME is
buster then version and revision is:
  '1:10.6.8+maria~buster'
Which can lead to problem as distro code names can be lexical unordered.

For example Debian LSBNAME's can be:
  Codename Buster is Debian version 10
  Codename Bookworm is Debian version 11

This happens because in ASCII table
Buster first two digits are 'Bu' and they are in hex 0x42 and 0x75
and Bookworm first digits 'Bo' are they are in hex 0x42 and 0x6F
When apt is upgrading it  means that:
  1:10.6.8+maria~buster is bigger than 1:10.6.8+maria~bookworm
and that leads to problems in dist-upgrade process

To solve problem revision format is changed to:
  '1:VERSION+maria~(deb|ubu)LSBVERSION'

Example for Debian 11 is now:
  1:10.6.8+maria~deb11

and for Ubuntu 22.04 is now:
  1:10.6.8+maria~ubu2204

There are new Variables
 * VERSION which contains whole version string
 * LSBVERSION which contains LSB version of distro
 * LSBID which contains LSB ID (Debian or Ubuntu)
added to debian/autobake-deb.sh.

Also CODENAME is change to LSBNAME as it's more declaritive
2022-06-14 10:44:15 +10:00
Tuukka Pasanen
d4760d8c01 MDEV-28642: Suspend obvious false-positive Lintian warnings
MariaDB codebase is huge and Lintian has lots of test than
can fire false-positive warnings which leads to situation
where real problems can't be spotted.

Suspend obvious false-positive Lintian warnings and
let Lintian problems that needs some love shine
out.

Suspends in package mariadb-test-data

Supporting BSD family needs to use '/usr/bin/env perl' and not '/usr/bin/perl'
Perl script are for testing and not for production in mariadb-test-data
package:
 * incorrect-path-for-interpreter

There is several files with national-encoding which are test file so they
can't be in unicode charset
 * national-encoding

Serveral test paths are intentionally repeated:
 * repeated-path-segment

Suspends in package mariadb-test

Supporting BSD family needs to use '/usr/bin/env perl' and not '/usr/bin/perl'
Perl script are for testing and not for production in mariadb-test-data
package:
 * incorrect-path-for-interpreter

Suspends in package source package

Remade some 'version-substvar-for-external-package' to use
regex.

MGroonga is missing source file 'jquery-ui-1.8.18.custom.js' correct
lintian suspend with regex:
 * source-is-missing

There is several files with very long line lenghts. Add suspends
for those that can't be corrected in several places. Most
of them are test result files, SQL test files or intentional
long lines that can't be splitted.
  * very-long-line-length-in-source-file

There is several autogenerated C++ files which probably should not
be there but they should not do any harm:
 * source-contains-autogenerated-visual-c++-file
2022-06-13 17:14:50 +10:00
Tuukka Pasanen
ace2e0301e MDEV-28666: Add correct 'Breaks' to make sure upgrade from 10.2 succeeds
File '/usr/bin/mariadb_config' has been moved from Debian package
libmariadbd-dev to libmariadb-dev since MariaDB version 10.2
this leads to situation where upgrade will no succeed but fail
with this kind of error message

 * trying to overwrite '/usr/bin/mariadb_config', which is also in package libmariadbd-dev 1:10.2.44+maria~bionic

Add libmariadbd-dev to libmariadb-dev Debian control files
'Breaks' solve situation and upgrading won't error anymore
2022-06-10 10:00:57 +10:00
Tuukka Pasanen
d3d50570de MDEV-28376: Make sure available Perl MariaDB DBI driver is chosen
Commit introduces automatic detection which supported
Perl MariaDB DBI driver is available:

 * DBD::mysql
 * DBD::MariaDB

If nothing is then bail out and die

Current Detection prefers Perl DBD:MariaDB driver.

This is mainly for older Linux distros or Windows which does not
have Perl DBD:MariaDB packaged or does not want to use Perl cpan command.
2022-05-24 10:57:13 +10:00
Sergei Golubchik
ef781162ff Merge branch '10.4' into 10.5 2022-05-09 22:04:06 +02:00
Sergei Golubchik
a70a1cf3f4 Merge branch '10.3' into 10.4 2022-05-08 23:03:08 +02:00
Sergei Golubchik
6f741eb6e4 Merge branch '10.2' into 10.3 2022-05-07 11:48:15 +02:00
Tuukka Pasanen
db47855eb7 MDEV-12275: Add switch '--silent' to SySV init upgrade
Debian script debian-start upgrades database (which can be huge)
and prints lots of unnecessary information (not errors). Add
'--silent' to only sport possible errors
2022-05-05 10:20:05 +10:00
anel
794bebf9ee Use proper pid namespace
Problem:
    ==============
    By testing `pgrep` with `--ns` option,
    introduced with MDEV-21331, commit fb7c1b9415,
    I noted that:
    a) `--ns`  cannot use more than single PID.
    b) `--ns` is returning the processes of the namespace to which supplied PID belongs to.
    So by that sense command `pgrep -x --ns $$ mysqld` will always return an error and skip
    checking of the existing PID of the server.

    Solution:
    ==============
    Suggested solution is to add `--nslist pid`, since `--ns` needs to know in which namespace type it should look for.
    See `pgrep --help` for different namespace types.
    Note also that this works *only* if script is run as a `root` (we have that case here).

    Current PR is a part of:
    1. MDEV-21331: sync preinst and postrm script
    2. MDEV-15718: check for exact mysqld process

    This commit:
    a) fixes fb7c1b9415
    b) Closes PR #2068 (obsolete)
    c) Closes PR #2069 (obsolete)

    Thanks Faustin Lammler <faustin@mariadb.org> for testing and verifying
    Reviewed by <>
2022-05-04 10:33:38 +02:00
Daniel Black
551e7814ed MDEV-28227 Chinese translation postfix
Add chinese language to missing sql/share/CMakeLists.txt that
results in installed files.

Also add bulgarian=bgn which has existing for a long time.

Sort both lists properly.

Append both to debian/mariadb-server-core-10.4 too.
2022-04-26 13:31:41 +10:00
Daniel Black
dea4e178fe deb: make --output-sync=target
Rather than Debian logs containing a barely decipherable mix
of build command and the output of some other command, we
use the make option --output-sync=target. This make the compile
line and the output stay together in the output stream.

This option exists even in the make version in debian;stretch
so should work everywhere.

Test on debian:stretch, ubuntu:18.04, the two lowest version that
use the debian/rules.
2022-04-07 16:05:02 +10:00
Daniel Black
8990ffe62a MDEV-28153: Debian autobake to generate control
Without doing the full build.

Autobake now includes a dependency on lsb-release.

As the BB CI images
(https://github.com/MariaDB/mariadb.org-tools/blob/master/buildbot.mariadb.org/ci_build_images/debian.Dockerfile)
have explicit dependencies, there's no point maintaining them in
two places. We don't want do the full autobake-deb.sh there, just enough
to have the control file containing the correct dependencies.

Helps: https://github.com/MariaDB/mariadb.org-tools/pull/130
2022-04-07 16:05:02 +10:00
Faustin Lammler
aed87f1e0a Change MDBF mirror URL
As as discussed with @dbart we decided to move
https://deb.mariadb.org/repo to https://deb.mariadb.org so that a
request on https://deb.mariadb.org will end up directly in
https://mirror.mariadb.org/repo.

The same behavior was configured for rpms (https://rpm.mariadb.org -->
https://mirror.mariadb.org/yum) this also makes the old yum.mariadb.org
service transparently compatible with this new service (after DNS change
to point to rpm.mariadb.org).

See also: https://jira.mariadb.org/browse/MDBF-297
2022-04-06 15:09:53 +10:00