Commit graph

655 commits

Author SHA1 Message Date
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
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
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
a950086036 Merge 10.2 (part) into 10.3
commit '6de482a6fefac0c21daf33ed465644151cdf879f'

10.3 no longer errors in truncate_notembedded.test
but per comments, a non-crash is all that we are after.
2022-03-15 16:44:52 +11:00
Daniel Black
6de482a6fe MDEV-28011: debian autobake cleanup
Travis is dead to us so we don't need all the conditions around it.

Remove depends for no longer supported versions

Debian Jessies, and Ubuntu Trusty, Xenial, Wily are all eol
as far as we are concerned.

The dependancy on an apt cache when running autobake broke the
10.2 aarch64 packages (MDEV-28014). Lets reduce the risk here.
2022-03-10 13:29:16 +11:00
Daniel Black
8ea08505a1 MDEV-28022: Debian stretch has zstd too old
zstd-1.1.3 is needed however stretch has only 1.1.2.

Move to distro version based checks as checks against the
apt-cache are unreliable if there is no cache.
2022-03-10 12:37:20 +11:00
Monty
5acc79d030 Remove --upgrade-info option from mysql_upgrade
Removed the option as it safe to always create the file when we have
created the MariaDB data directories. This fixes this issue not only
for debian but for all MariaDB users.
2022-01-27 14:52:08 +02:00
Daniel Black
2e81eab29f MDEV-27607: mysql_install_db to install mysql_upgrade_info
For compatibility this is under an extra option --upgrade-info

The goal here is to install a data directory with the required
info to let mysql_upgrade know that an upgrade isn't required.
2022-01-27 10:35:32 +11:00
Marko Mäkelä
cfbdb5d210 Merge 10.2 into 10.3 2021-08-23 10:14:01 +03:00
Faustin Lammler
557bb344e4 Unused flag creates cleaning issue (piuparts)
The "$mysql_statedir/debian-$MAJOR_VER.flag" is not used by any
maintainer script ("$mysql_datadir/debian-$MAJOR_VER.flag" is used,
https://github.com/MariaDB/server/blob/10.6/debian/mariadb-server-10.6.postinst#L164).

See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=985870

Fix also some minor typo.
2021-08-20 12:44:05 +03:00
Sergei Golubchik
6190a02f35 Merge branch '10.2' into 10.3 2021-07-21 20:11:07 +02:00
Anel Husakovic
85063aebda Update description of mariadb-common package
- Commit https://github.com/mariadb/server/commit/438ed0408c69
introduced `mariadb-common` package and added description. Example in
description is confusing since files referred to are not installed and
not related/owned by the `mariadb-common` package.
- Patch is updating real file/directory description section pointing to
the real examples owned by the package.
- Example:
```
mariadb-client-10.3				install
mariadb-client-core-10.3			install
mariadb-common					install
mariadb-server					install
mariadb-server-10.3				install
mariadb-server-core-10.3			install

/.
/etc
/etc/mysql
/etc/mysql/mariadb.cnf
/etc/mysql/mariadb.conf.d
/usr
/usr/share
/usr/share/doc
/usr/share/doc/mariadb-common
/usr/share/doc/mariadb-common/changelog.Debian.gz
/usr/share/doc/mariadb-common/copyright

```

Closes PR #1690
Reviewed by: otto@kekalainen.net
2021-07-09 10:04:30 +02:00
Marko Mäkelä
6e9642beb2 Merge 10.2 into 10.3 2021-06-08 14:33:07 +03:00
Otto Kekäläinen
3c922d6def Revert "CONNECT: move jar files to /usr/share and include them in DEBs"
This partially reverts commit d7321893d8.

The *.jar files are not being built and all Debian builds are failing
as dh_install stops on missing files. To build them we would need to also
add new Java build dependencies.

In a stable release (10.2->10.5) we shouldn't add new files and certainly
not any new build dependencies, so reverting commit.

Also, the files are located in a different path, and already included
in the mariadb-test-data package:

  /usr/share/mysql/mysql-test/plugin/connect/connect/std_data/JavaWrappers.jar
  /usr/share/mysql/mysql-test/plugin/connect/connect/std_data/JdbcMariaDB.jar
  /usr/share/mysql/mysql-test/plugin/connect/connect/std_data/Mongo2.jar
  /usr/share/mysql/mysql-test/plugin/connect/connect/std_data/Mongo3.jar

This change needs to be redesigned and applies only on 10.6 or newer.
2021-06-06 11:49:36 +02:00
Marko Mäkelä
1864a8ea93 Merge 10.2 into 10.3 2021-05-24 09:38:49 +03:00
Sergei Golubchik
d7321893d8 CONNECT: move jar files to /usr/share and include them in DEBs 2021-05-22 21:56:51 +02:00
Marko Mäkelä
6e6318b29b Merge 10.2 into 10.3 2021-04-13 10:26:01 +03:00
Otto Kekäläinen
058d93d47a Deb: Stop depending on empty transitional package dh-systemd
MariaDB Server still supports Ubuntu 16.04 "Xenial" until it goes EOL
in April 30, 2021. Thus we need to include a customization for backwards
compatibility.

This change is intended to be applied for all MariaDB versions still
supported, i.e. 10.2 to 10.6.
2021-04-12 17:19:54 +10:00
Marko Mäkelä
450c017c2d Merge 10.2 into 10.3 2021-04-09 14:32:06 +03:00
Arnaud Rebillout
82a2ea64b4 Fix postinst trigger when systemd is not running (Closes: #983563)
Checking for the existence of the systemctl command only tells us that
systemd is installed, however it does not tell us if systemd is running.
What we really want to do here is reload systemd if it's installed AND
if it's running. The usual way to check if systemd is running is to
check for the existence of '/run/systemd/system'.

Why would systemd be installed but not running? This is something that
happens when one sets up or upgrade a system in a chroot or container.

For more details refer to the bug report:
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983563>

Closes PR #1787
2021-04-06 17:20:43 +02:00
Daniel Black
3e2afcb3f4 Merge remote-tracking branch 'origin/10.2' into 10.3 2021-02-25 12:16:13 +11:00
Daniel Black
577c970c52 MDEV-24728: Debian include client caching_sha2_password plugin
Backport of 4bc31a904f

Include client libraries for auth caching_sha2_password and
sha256_password in the libmariadb3 client library package.
2021-02-25 12:12:04 +11:00
Sergei Golubchik
60ea09eae6 Merge branch '10.2' into 10.3 2021-02-01 13:49:33 +01:00
Vicențiu Ciorbaru
0921656734 Skip TokuDB within autobake-deb.sh
Skipping the package within debian/rules won't work because starting
with Debian 10, the helper scripts read the control file before the
recipe.
2021-01-29 21:11:16 +02:00
Vicențiu Ciorbaru
4a41712866 Skip TokuDB within autobake-deb.sh
Skipping the package within debian/rules won't work because starting
with Debian 10, the helper scripts read the control file before the
recipe.
2021-01-29 21:06:08 +02:00
Daniel Black
b3a9fbdbab travis: 10.2 only - make faster
Remove from debian build:
* tokudb
* mroonga
* spider
* ograph
* embedded server

Add ccache to debian build.

Backport 10.3 changes to autobake-deb
that make travis faster.

Merge instructions:
Drop this commit on merge to 10.3
2020-10-06 22:22:03 +11:00
Sujatha
6cbbd6bd96 Merge branch '10.2' into 10.3 2020-09-28 17:27:42 +05:30
Sujatha
3a5e719e00 Merge branch '10.1' into 10.2 2020-09-28 14:03:46 +05:30
Daniel Black
3d28d1f3aa MDEV-23697: /usr/bin/perl for debian scripts 2020-09-24 08:16:30 +10:00
Daniel Black
4ddaa571fa MDEV-23697: perl -w -> perl
Leave debian/additions/mysqlreport as #!/usr/bin/perl

Acknowledge that `env perl` is a hack, a complete fix
needs to consider which path perl is at and insert into
these scripts.

The usefulness of these scripts is questionable.
2020-09-24 08:09:56 +10:00
Marko Mäkelä
1df1a63924 Merge 10.2 into 10.3 2020-07-02 06:17:51 +03:00
Marko Mäkelä
ea2bc974dc Merge 10.1 into 10.2 2020-07-01 12:03:55 +03:00
Daniel Black
37c88445e3 mtr: use env for perl
On FreeBSD, perl isn't in /usr/bin, its in /usr/local/bin or
elsewhere in the path.

Like storage/{maria/unittest/,}ma_test_* , we use /usr/bin/env to
find perl and run it.
2020-06-23 03:24:46 +02:00
Otto Kekäläinen
8d056affd8 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.

Cherry-picked from 41952c85f1.
2020-05-17 15:46:34 +03:00
Marko Mäkelä
1fbdcada73 Merge 10.2 into 10.3 2020-04-28 22:29:13 +03:00
Sergei Golubchik
fb7c1b9415 MDEV-21331 installation fails on a server with containers
when detecting running mysqld processes to stop,
ignore processes in different namespaces.
2020-04-28 17:51:38 +02:00
Otto Kekäläinen
811e4409ce 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-04-05 23:55:45 +03:00
Vicențiu Ciorbaru
dd68db0c17 Change exec bit to allow dh-exec to work 2020-03-18 22:14:38 +02:00
Vicențiu Ciorbaru
fd2dc9c3fd Correctly link mysqlclient.pc to mariadb.pc under multi-arch support 2020-03-08 16:19:43 +02: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
Oleksandr Byelkin
440452628d Merge branch '10.2' into 10.3 2020-03-06 23:28:26 +01:00
Vicențiu Ciorbaru
c5c1027c6e MDEV-19208 mariadb.pc: install into libdir
The .pc file installed by mariadb mentions archful directories and
therefore must be archful itself.

This fixes MDEV-14340.
2020-03-05 10:53:16 +02:00
Otto Kekäläinen
85d4a45d15 Deb: Run 'wrap-and-sort -a' so comparison across releases is easier
No functional changes.

Apply this in 10.3 so eventually it is merged to 10.4 and 10.5, which
in turn will have separate wrap-and-sort runs but only for new lines,
and not affecting badly next merges from 10.3 to 10.4 to 10.5.

Also remove a duplicate line that was found thanks to wrap-and-sort.
2020-02-13 20:47:23 +02:00
Otto Kekäläinen
1f0e72f874 Deb: Remove unnecessary manual libzstd1 dependency from RocksDB plugin
The Debian build tools add all run-time dependencies automatically. For the
mariadb-rocksdb-plugin the "${misc:Depends}, ${shlibs:Depends}" will become
(based on the build dependencies at build time):

  Depends: mariadb-server-10.4 (= 1:10.4.12-1), rocksdb-tools,
  libc6 (>= 2.29), liblz4-1 (>= 0.0~r130), libsnappy1v5 (>= 1.1.8),
  libstdc++6 (>= 7), libzstd1 (>= 1.3.3), zlib1g (>= 1:1.1.4)

There is no need to manually add run-time build dependencies. Only external
dependencies need to be defined, for example rocksdb-tools could come in
question for mariadb-plugin-rocksdb, and it will be eventually added when
downstream official Debian packaging is merged upstream in a later commit.
2020-02-13 20:47:23 +02:00
Oleksandr Byelkin
ceda5f724f Merge branch '10.2' into 10.3 2020-01-24 14:16:20 +01:00
Sergei Golubchik
8870f18e1d MDEV-17292 Package the pam_user_map module 2020-01-21 10:56:47 +01:00
Faustin Lammler
2df2238cb8 Lintian complains on spelling error
The lintian check complains on spelling error:
https://salsa.debian.org/mariadb-team/mariadb-10.3/-/jobs/95739
2019-12-02 12:41:13 +02:00