diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-04 07:55:16 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-04 07:55:16 +0300 |
commit | 9a7948e3f6d3fd7528e49f43eb4d41f8f55c8a35 (patch) | |
tree | 68f8e54f6c2484dc7791bee8c594d3d07c611d29 /debian | |
parent | 56990b18d914b8150c9f777d134724d2b3390360 (diff) | |
parent | bbd70fcc43cc889e4593594ee5ca436fe1433aac (diff) | |
download | mariadb-git-9a7948e3f6d3fd7528e49f43eb4d41f8f55c8a35.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'debian')
28 files changed, 229 insertions, 287 deletions
diff --git a/debian/additions/Docs__Images__Makefile.in b/debian/additions/Docs__Images__Makefile.in deleted file mode 100644 index f7316d4e345..00000000000 --- a/debian/additions/Docs__Images__Makefile.in +++ /dev/null @@ -1,6 +0,0 @@ -all: - -distclean: - -rm -f Makefile - -.PHONY: all distclean clean install check diff --git a/debian/additions/Docs__Makefile.in b/debian/additions/Docs__Makefile.in deleted file mode 100644 index f7316d4e345..00000000000 --- a/debian/additions/Docs__Makefile.in +++ /dev/null @@ -1,6 +0,0 @@ -all: - -distclean: - -rm -f Makefile - -.PHONY: all distclean clean install check diff --git a/debian/additions/debian-start.inc.sh b/debian/additions/debian-start.inc.sh index fa5b1299bdc..005aa290866 100755 --- a/debian/additions/debian-start.inc.sh +++ b/debian/additions/debian-start.inc.sh @@ -5,7 +5,7 @@ ## Check MyISAM and Aria unclosed tables. # - Requires the server to be up. -# - Is supposed to run silently in background. +# - Is supposed to run silently in background. function check_for_crashed_tables() { set -e set -u @@ -15,7 +15,7 @@ function check_for_crashed_tables() { # Checking for $? is unreliable so the size of the output is checked. # Some table handlers like HEAP do not support CHECK TABLE. - tempfile=`tempfile` + tempfile=$(mktemp) # We have to use xargs in this case, because a for loop barfs on the # spaces in the thing to be looped over. @@ -25,7 +25,7 @@ function check_for_crashed_tables() { LC_ALL=C $MYSQL --skip-column-names --batch -e ' select concat('\''select count(*) into @discard from `'\'', - TABLE_SCHEMA, '\''`.`'\'', TABLE_NAME, '\''`'\'') + TABLE_SCHEMA, '\''`.`'\'', TABLE_NAME, '\''`'\'') from information_schema.TABLES where TABLE_SCHEMA<>'\''INFORMATION_SCHEMA'\'' and TABLE_SCHEMA<>'\''PERFORMANCE_SCHEMA'\'' and ( ENGINE='\''MyISAM'\'' or ENGINE='\''Aria'\'' )' | \ xargs -i $MYSQL --skip-column-names --silent --batch \ --force -e "{}" &>$tempfile @@ -39,8 +39,8 @@ function check_for_crashed_tables() { $MYADMIN processlist status ) >> $tempfile # Check for presence as a dependency on mailx would require an MTA. - if [ -x /usr/bin/mailx ]; then - mailx -e -s"$MYCHECK_SUBJECT" $MYCHECK_RCPT < $tempfile + if [ -x /usr/bin/mailx ]; then + mailx -e -s"$MYCHECK_SUBJECT" $MYCHECK_RCPT < $tempfile fi (echo "$MYCHECK_SUBJECT"; cat $tempfile) | logger -p daemon.warn -i -t$0 fi @@ -49,7 +49,7 @@ function check_for_crashed_tables() { ## Check for tables needing an upgrade. # - Requires the server to be up. -# - Is supposed to run silently in background. +# - Is supposed to run silently in background. function upgrade_system_tables_if_necessary() { set -e set -u @@ -69,7 +69,7 @@ function upgrade_system_tables_if_necessary() { function check_root_accounts() { set -e set -u - + logger -p daemon.info -i -t$0 "Checking for insecure root accounts." ret=$( echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and plugin in ('', 'mysql_native_password', 'mysql_old_password');" | $MYSQL --skip-column-names ) diff --git a/debian/additions/enable_encryption.preset b/debian/additions/enable_encryption.preset deleted file mode 100644 index 287bc03413a..00000000000 --- a/debian/additions/enable_encryption.preset +++ /dev/null @@ -1,20 +0,0 @@ -# -# !include this file into your my.cnf (or any of *.cnf files in /etc/mysql/conf.d) -# and it will enable data at rest encryption. This is a simple way to -# ensure that everything that can be encrypted will be and your -# data will not leak unencrypted. -# -# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a -# newer version and your edits will be lost. Instead, add your edits -# to the .cnf file after the !include directive. -# -# NOTE that you also need to install an encryption plugin for the encryption -# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management -# -[mariadb] -aria-encrypt-tables -encrypt-binlog -encrypt-tmp-disk-tables -encrypt-tmp-files -loose-innodb-encrypt-log -loose-innodb-encrypt-tables diff --git a/debian/additions/innotop/innotop b/debian/additions/innotop/innotop index 941d3c901cb..19229a57a82 100644 --- a/debian/additions/innotop/innotop +++ b/debian/additions/innotop/innotop @@ -3,7 +3,7 @@ # vim: tw=160:nowrap:expandtab:tabstop=3:shiftwidth=3:softtabstop=3 # This program is copyright (c) 2006 Baron Schwartz, baron at xaprb dot com. -# Maintainers since 2013 : Kenny Gryp - Frédéric Descamps +# Maintainers since 2013 : Kenny Gryp - Frédéric Descamps # Feedback and improvements are gratefully received. # # THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED @@ -640,7 +640,7 @@ sub parse_fk_section { } else { ( $ts, $type ) = $fulltext =~ m/^$s\s+(\w+)/m; $section->{'ts'} = [ parse_innodb_timestamp( $ts ) ]; - } + } $section->{'timestring'} = ts_to_string($section->{'ts'}); $section->{'type'} = $type; @@ -715,7 +715,7 @@ sub parse_fk_bad_constraint_error { @{$section}{ qw(reason) } = $fulltext =~ m/:\s*([^:]+)(?= Constraint:|$)/ms; $section->{'reason'} =~ s/\s+/ /g if $section->{'reason'}; - + # Certain data may not be present. Make them '' if not present. map { $section->{$_} ||= "" } qw(child_index fk_name col_name parent_table parent_col); @@ -1042,7 +1042,7 @@ sub parse_tx_text { if ( $txn =~ m/^TABLE LOCK|RECORD LOCKS/ ) { $locks = [parse_innodb_record_locks($txn, $complete, $debug, $full)]; } - + my ( $tables_in_use, $tables_locked ) = $txn =~ m/^mysql tables in use $d, locked $d$/m; @@ -1544,7 +1544,7 @@ innotop is a MySQL and InnoDB transaction/status monitor, like 'top' for MySQL. It displays queries, InnoDB transactions, lock waits, deadlocks, foreign key errors, open tables, replication status, buffer information, row operations, logs, I/O operations, load graph, and more. You can -monitor many servers at once with innotop. +monitor many servers at once with innotop. USAGE exit(1); @@ -4695,23 +4695,23 @@ sub main { if ( !$windows ) { delete $config{max_height}; } - + # Try to lower my priority. eval { setpriority(0, 0, getpriority(0, 0) + 10); }; - + # Print stuff to the screen immediately, don't wait for a newline. $OUTPUT_AUTOFLUSH = 1; - + # Clear the screen and load the configuration. $clear_screen_sub->(); load_config(); - + # Override config variables with command-line options my %cmdline = map { $_->{c} => $opts{$_->{k}} } grep { exists $_->{c} && exists $opts{$_->{k}} } @opt_spec; - + foreach my $name (keys %cmdline) { next if not defined $cmdline{$name}; my $val = $cmdline{$name}; @@ -4719,23 +4719,23 @@ sub main { $config{$name}->{val} = $val; } } - + post_process_tbl_meta(); - + # Make sure no changes are written to config file in non-interactive mode. if ( $opts{n} ) { $config{readonly}->{val} = 1; } - + eval { - + # Open the file for InnoDB status if ( @ARGV ) { my $filename = shift @ARGV; open $file, "<", $filename or die "Cannot open '$filename': $OS_ERROR"; } - + # In certain modes we might have to collect data for two cycles # before printing anything out, so we need to bump up the count one. if ( $opts{n} && $opts{count} && $config{status_inc}->{val} @@ -4743,16 +4743,16 @@ sub main { { $opts{count}++; } - + while (++$clock) { - + my $mode = $config{mode}->{val} || 'Q'; if ( !$modes{$mode} ) { die "Mode '$mode' doesn't exist; try one of these:\n" . join("\n", map { " $_ $modes{$_}->{hdr}" } sort keys %modes) . "\n"; } - + if ( !$opts{n} ) { @last_term_size = @this_term_size; @this_term_size = Term::ReadKey::GetTerminalSize(\*STDOUT); @@ -4763,13 +4763,13 @@ sub main { } die("Can't read terminal size") unless @this_term_size; } - + # If there's no connection to a database server, we need to fix that... if ( !%connections ) { print "You have not defined any database connections.\n\n"; add_new_dsn(); } - + # See whether there are any connections defined for this mode. If there's only one # connection total, assume the user wants to just use innotop for a single server # and don't ask which server to connect to. Also, if we're monitoring from a file, @@ -4782,20 +4782,20 @@ sub main { choose_connections(); } } - + # Term::ReadLine might have re-set $OUTPUT_AUTOFLUSH. $OUTPUT_AUTOFLUSH = 1; - + # Prune old data my $sets = $config{num_status_sets}->{val}; foreach my $store ( values %vars ) { delete @{$store}{ grep { $_ < $clock - $sets } keys %$store }; } %info_gotten = (); - + # Call the subroutine to display this mode. $modes{$mode}->{display_sub}->(); - + # It may be time to quit now. if ( $opts{count} && $clock >= $opts{count} ) { finish(); @@ -4805,7 +4805,7 @@ sub main { foreach my $cxn ( grep { $dbhs{$_}->{failed} } keys %dbhs ) { eval { connect_to_db($cxn); }; # Ignore errors entirely here. } - + # Wait for a bit. if ( $opts{n} ) { sleep($config{interval}->{val}); @@ -4815,10 +4815,10 @@ sub main { $char = ReadKey($config{interval}->{val}); ReadMode('normal'); } - + # Handle whatever action the key indicates. do_key_action(); - + } }; if ( $EVAL_ERROR ) { @@ -5620,7 +5620,7 @@ sub display_M { push @slave_io_status, extract_values($set, $set, $pre, 'slave_io_status'); } } - if ( $linecount < 1 ) { + if ( $linecount < 1 ) { $channel = 'no_channels'; my $chcxn = $channel . '=' . $cxn; get_slave_status($cxn,$channel); @@ -6546,7 +6546,7 @@ sub set_to_tbl { map { push @group_by, $_ if $_ !~ /^cxn$/ } @{$meta->{group_by}}; $meta->{group_by} = \@group_by; } - # if cxn is not visible and there is now more than one connection, + # if cxn is not visible and there is now more than one connection, # make cxn visible again. assume it's not in group_by if it's not # visible else { @@ -7187,7 +7187,7 @@ sub distill { } $query .= " " . $t; } - } + } # die $orig_query if $query eq 'LOCK lock'; return $query; @@ -7524,7 +7524,7 @@ sub do_stmt { # Test if the cxn should not even be tried return undef if $dbhs{$cxn} - && $dbhs{$cxn}->{failed} + && $dbhs{$cxn}->{failed} && ( !$dbhs{$cxn}->{dbh} || !$dbhs{$cxn}->{dbh}->{Active} || $dbhs{$cxn}->{mode} eq $config{mode}->{val} ); my $sth; @@ -7599,7 +7599,7 @@ sub do_query { # Test if the cxn should not even be tried return undef if $dbhs{$cxn} - && $dbhs{$cxn}->{failed} + && $dbhs{$cxn}->{failed} && ( !$dbhs{$cxn}->{dbh} || !$dbhs{$cxn}->{dbh}->{Active} || $dbhs{$cxn}->{mode} eq $config{mode}->{val} ); my $sth; @@ -7627,7 +7627,7 @@ sub do_query { } } } - + return $sth; } @@ -7892,17 +7892,17 @@ sub migrate_config { # load_config {{{3 sub load_config { - + my ($old_filename, $answer); if ( $opts{u} or $opts{p} or $opts{h} or $opts{P} or $opts{S} ) { my @params = $dsn_parser->get_cxn_params(\%opts); # dsn=$params[0] - add_new_dsn($opts{h} || 'localhost', $params[0], 'test.innotop_dl', + add_new_dsn($opts{h} || 'localhost', $params[0], 'test.innotop_dl', $opts{u} ? 1 : 0, $opts{u}, $opts{p} ? 1 : 0, $opts{p}); } if ($opts{c}) { $conf_file = $opts{c}; - } + } # If we don't have a new config file but we do have an old one, # innotop got upgraded and this is an old config file. Convert it, but # don't overwrite something existing. @@ -7930,14 +7930,14 @@ sub load_config { $conf_file = $default_central_conf; } else { - # If no config file was loaded, set readonly to 0 if the user wants to + # If no config file was loaded, set readonly to 0 if the user wants to # write a config $config{readonly}->{val} = 0 if $opts{w}; - # If no connections have been defined, connect to a MySQL database + # If no connections have been defined, connect to a MySQL database # on localhost using mariadb_read_default_group=client if (!%connections) { - add_new_dsn('localhost', - 'DBI:MariaDB:;host=localhost;mariadb_read_default_group=client', + add_new_dsn('localhost', + 'DBI:MariaDB:;host=localhost;mariadb_read_default_group=client', 'test.innotop_dl'); } } @@ -8476,7 +8476,7 @@ sub save_config { elsif ($conf_file and $opts{w}) { print "Loaded config file on start-up, so ignoring -w (see --help)\n" } - + my $dirname = dirname($conf_file); # if directories don't exist, create them. This could cause errors @@ -9819,7 +9819,7 @@ sub get_slave_status { } } else { my $dbh = connect_to_db($cxn); - my $sql = 'SHOW SLAVE STATUS FOR CHANNEL \'' . $channel . '\''; + my $sql = 'SHOW SLAVE STATUS FOR CHANNEL \'' . $channel . '\''; my $stmt = $dbh->prepare($sql ) ; $stmt->execute(); my $res = $stmt->fetchall_arrayref({}); @@ -9835,8 +9835,8 @@ sub get_slave_status { } } } - - + + sub is_func { @@ -9902,8 +9902,8 @@ host, use the -h option. After you've connected, innotop should show you something like the following: [RO] Query List (? for help) localhost, 01:11:19, 449.44 QPS, 14/7/163 con/run - - CXN When Load QPS Slow QCacheHit KCacheHit BpsIn BpsOut + + CXN When Load QPS Slow QCacheHit KCacheHit BpsIn BpsOut localhost Total 0.00 1.07k 697 0.00% 98.17% 476.83k 242.83k CXN Cmd ID User Host DB Time Query @@ -10070,7 +10070,7 @@ L<"cmd_summary"> table, which looks something like the following: Command Summary (? for help) localhost, 25+07:16:43, 2.45 QPS, 3 thd, 5.0.40 _____________________ Command Summary _____________________ - Name Value Pct Last Incr Pct + Name Value Pct Last Incr Pct Select_scan 3244858 69.89% 2 100.00% Select_range 1354177 29.17% 0 0.00% Select_full_join 39479 0.85% 0 0.00% @@ -11189,7 +11189,7 @@ L<"STATUS_VARIABLES">. =item slave_io_status -Displays data about the slave I/O thread. Data source: +Displays data about the slave I/O thread. Data source: L<"STATUS_VARIABLES">. =item slave_sql_status @@ -11438,8 +11438,8 @@ L<"processlist"> table when prompted). Your display might now look like the following: Query List (? for help) localhost, 32:33, 0.11 QPS, 1 thd, 5.0.38-log - - CXN Cmd Cnt ID User Host Time Query + + CXN Cmd Cnt ID User Host Time Query localhost Query 49 12933 webusr localhost 19:38 SELECT * FROM localhost Sending Da 23 2383 webusr localhost 12:43 SELECT col1, localhost Sleep 120 140 webusr localhost 5:18:12 @@ -11488,14 +11488,14 @@ matches the row; if it does, the row gets the specified color, and no further rules are evaluated. The rules look like the following: state eq Locked black on_red - cmd eq Sleep white - user eq system user white - cmd eq Connect white - cmd eq Binlog Dump white - time > 600 red - time > 120 yellow - time > 60 green - time > 30 cyan + cmd eq Sleep white + user eq system user white + cmd eq Connect white + cmd eq Binlog Dump white + time > 600 red + time > 120 yellow + time > 60 green + time > 30 cyan This is the default rule set for the L<"processlist"> table. In order of priority, these rules make locked queries black on a red background, "gray out" @@ -11639,9 +11639,9 @@ screen, it will prompt you to choose one of them. Once you do, innotop will show you something like this: Editing table definition for Buffer Pool. Press ? for help, q to quit. - - name hdr label src - cxn CXN Connection from which cxn + + name hdr label src + cxn CXN Connection from which cxn buf_pool_size Size Buffer pool size IB_bp_buf_poo buf_free Free Bufs Buffers free in the b IB_bp_buf_fre pages_total Pages Pages total IB_bp_pages_t @@ -11931,15 +11931,15 @@ whitespace). use strict; use warnings FATAL => 'all'; - + package Innotop::Plugin::Example; # description: Adds an 'example' column to every table - + sub new { my ( $class, %vars ) = @_; # Store reference to innotop's variables in $self my $self = bless { %vars }, $class; - + # Design the example column my $col = { hdr => 'Example', @@ -11951,7 +11951,7 @@ whitespace). tbl => '', trans => [], }; - + # Add the column to every table. my $tbl_meta = $vars{tbl_meta}; foreach my $tbl ( values %$tbl_meta ) { @@ -11960,17 +11960,17 @@ whitespace). # Add the column to the list of visible columns unshift @{$tbl->{visible}}, 'example'; } - + # Be sure to return a reference to the object. return $self; } - + # I'd like to be called when a data set is being rendered into a table, please. sub register_for_events { my ( $self ) = @_; return qw(set_to_tbl_pre_filter); } - + # This method will be called when the event fires. sub set_to_tbl_pre_filter { my ( $self, $rows, $tbl ) = @_; @@ -11979,7 +11979,7 @@ whitespace). $row->{example} = 1; } } - + 1; =head2 Plugin Editor @@ -12181,7 +12181,7 @@ Allen K. Smith, Aurimas Mikalauskas, Bartosz Fenski, Brian Miezejewski, -Christian Hammers, +Christian Hammers, Cyril Scetbon, Dane Miller, David Multer, diff --git a/debian/additions/innotop/innotop.1 b/debian/additions/innotop/innotop.1 index fefea717cd6..65da5dc0dfb 100644 --- a/debian/additions/innotop/innotop.1 +++ b/debian/additions/innotop/innotop.1 @@ -193,8 +193,8 @@ After you've connected, innotop should show you something like the following: .PP .Vb 1 \& [RO] Query List (? for help) localhost, 01:11:19, 449.44 QPS, 14/7/163 con/run -\& -\& CXN When Load QPS Slow QCacheHit KCacheHit BpsIn BpsOut +\& +\& CXN When Load QPS Slow QCacheHit KCacheHit BpsIn BpsOut \& localhost Total 0.00 1.07k 697 0.00% 98.17% 476.83k 242.83k \& \& CXN Cmd ID User Host DB Time Query @@ -324,7 +324,7 @@ This mode is similar to mytop's Command Summary mode. It shows the .Vb 8 \& Command Summary (? for help) localhost, 25+07:16:43, 2.45 QPS, 3 thd, 5.0.40 \& _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ Command Summary _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ -\& Name Value Pct Last Incr Pct +\& Name Value Pct Last Incr Pct \& Select_scan 3244858 69.89% 2 100.00% \& Select_range 1354177 29.17% 0 0.00% \& Select_full_join 39479 0.85% 0 0.00% @@ -1261,7 +1261,7 @@ Displays data about InnoDB's semaphores and mutexes. Data source: \&\*(L"\s-1STATUS_VARIABLES\*(R"\s0. .IP "slave_io_status" 4 .IX Item "slave_io_status" -Displays data about the slave I/O thread. Data source: +Displays data about the slave I/O thread. Data source: \&\*(L"\s-1STATUS_VARIABLES\*(R"\s0. .IP "slave_sql_status" 4 .IX Item "slave_sql_status" @@ -1472,8 +1472,8 @@ Your display might now look like the following: .PP .Vb 1 \& Query List (? for help) localhost, 32:33, 0.11 QPS, 1 thd, 5.0.38\-log -\& -\& CXN Cmd Cnt ID User Host Time Query +\& +\& CXN Cmd Cnt ID User Host Time Query \& localhost Query 49 12933 webusr localhost 19:38 SELECT * FROM \& localhost Sending Da 23 2383 webusr localhost 12:43 SELECT col1, \& localhost Sleep 120 140 webusr localhost 5:18:12 @@ -1526,13 +1526,13 @@ rules are evaluated. The rules look like the following: .PP .Vb 9 \& state eq Locked black on_red -\& cmd eq Sleep white -\& user eq system user white -\& cmd eq Connect white -\& cmd eq Binlog Dump white -\& time > 600 red -\& time > 120 yellow -\& time > 60 green +\& cmd eq Sleep white +\& user eq system user white +\& cmd eq Connect white +\& cmd eq Binlog Dump white +\& time > 600 red +\& time > 120 yellow +\& time > 60 green \& time > 30 cyan .Ve .PP @@ -1669,9 +1669,9 @@ show you something like this: .PP .Vb 1 \& Editing table definition for Buffer Pool. Press ? for help, q to quit. -\& -\& name hdr label src -\& cxn CXN Connection from which cxn +\& +\& name hdr label src +\& cxn CXN Connection from which cxn \& buf_pool_size Size Buffer pool size IB_bp_buf_poo \& buf_free Free Bufs Buffers free in the b IB_bp_buf_fre \& pages_total Pages Pages total IB_bp_pages_t @@ -1924,15 +1924,15 @@ whitespace). .Vb 2 \& use strict; \& use warnings FATAL => \*(Aqall\*(Aq; -\& +\& \& package Innotop::Plugin::Example; \& # description: Adds an \*(Aqexample\*(Aq column to every table -\& +\& \& sub new { \& my ( $class, %vars ) = @_; \& # Store reference to innotop\*(Aqs variables in $self \& my $self = bless { %vars }, $class; -\& +\& \& # Design the example column \& my $col = { \& hdr => \*(AqExample\*(Aq, @@ -1944,7 +1944,7 @@ whitespace). \& tbl => \*(Aq\*(Aq, \& trans => [], \& }; -\& +\& \& # Add the column to every table. \& my $tbl_meta = $vars{tbl_meta}; \& foreach my $tbl ( values %$tbl_meta ) { @@ -1953,17 +1953,17 @@ whitespace). \& # Add the column to the list of visible columns \& unshift @{$tbl\->{visible}}, \*(Aqexample\*(Aq; \& } -\& +\& \& # Be sure to return a reference to the object. \& return $self; \& } -\& +\& \& # I\*(Aqd like to be called when a data set is being rendered into a table, please. \& sub register_for_events { \& my ( $self ) = @_; \& return qw(set_to_tbl_pre_filter); \& } -\& +\& \& # This method will be called when the event fires. \& sub set_to_tbl_pre_filter { \& my ( $self, $rows, $tbl ) = @_; @@ -1972,7 +1972,7 @@ whitespace). \& $row\->{example} = 1; \& } \& } -\& +\& \& 1; .Ve .SS "Plugin Editor" @@ -2137,7 +2137,7 @@ Allen K. Smith, Aurimas Mikalauskas, Bartosz Fenski, Brian Miezejewski, -Christian Hammers, +Christian Hammers, Cyril Scetbon, Dane Miller, David Multer, diff --git a/debian/additions/mariadb.cnf b/debian/additions/mariadb.cnf index 8b283e21d3f..62b4ea8f11e 100644 --- a/debian/additions/mariadb.cnf +++ b/debian/additions/mariadb.cnf @@ -1,6 +1,7 @@ # The MariaDB configuration file # # The MariaDB/MySQL tools read configuration files in the following order: +# 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read. # 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults, # 2. "/etc/mysql/conf.d/*.cnf" to set global options. # 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options. @@ -11,15 +12,17 @@ # One can use all long options that the program supports. # Run program with --help to get a list of available options and with # --print-defaults to see which it would actually understand and use. +# +# If you are new to MariaDB, check out https://mariadb.com/kb/en/basic-mariadb-articles/ # # This group is read both by the client and the server # use it for options that affect everything # [client-server] - -socket = /run/mysqld/mysqld.sock -#port = 3306 +# Port or socket location where to connect +# port = 3306 +socket = /run/mysqld/mysqld.sock # Import all .cnf files from configuration directory !includedir /etc/mysql/conf.d/ diff --git a/debian/additions/mariadb.conf.d/50-client.cnf b/debian/additions/mariadb.conf.d/50-client.cnf index 4b9bcf78089..54cfb44ac2d 100644 --- a/debian/additions/mariadb.conf.d/50-client.cnf +++ b/debian/additions/mariadb.conf.d/50-client.cnf @@ -4,15 +4,12 @@ # [client] -# Default is Latin1, if you need UTF-8 set this (also in server section) -# default-character-set = utf8mb4 - # Example of client certificate usage -# ssl-cert=/etc/mysql/client-cert.pem -# ssl-key=/etc/mysql/client-key.pem +# ssl-cert = /etc/mysql/client-cert.pem +# ssl-key = /etc/mysql/client-key.pem # # Allow only TLS encrypted connections -# ssl-verify-server-cert=on +# ssl-verify-server-cert = on # This group is *never* read by mysql client library, though this # /etc/mysql/mariadb.cnf.d/client.cnf file is not read by Oracle MySQL diff --git a/debian/additions/mariadb.conf.d/50-mysqld_safe.cnf b/debian/additions/mariadb.conf.d/50-mysqld_safe.cnf index df8e82f5b3c..e24f96a9e65 100644 --- a/debian/additions/mariadb.conf.d/50-mysqld_safe.cnf +++ b/debian/additions/mariadb.conf.d/50-mysqld_safe.cnf @@ -9,12 +9,12 @@ # with the following contents: # # [Service] -# User=mysql -# StandardOutput=syslog -# StandardError=syslog -# SyslogFacility=daemon -# SyslogLevel=err -# SyslogIdentifier=mysqld +# User = mysql +# StandardOutput = syslog +# StandardError = syslog +# SyslogFacility = daemon +# SyslogLevel = err +# SyslogIdentifier = mysqld # # For more information, please read https://mariadb.com/kb/en/mariadb/systemd/ @@ -23,6 +23,6 @@ # It has been reported that passwords should be enclosed with ticks/quotes # especially if they contain "#" chars... -nice = 0 +nice = 0 skip_log_error syslog diff --git a/debian/additions/mariadb.conf.d/60-galera.cnf b/debian/additions/mariadb.conf.d/60-galera.cnf index 945c05281c9..55d7c0b0322 100644 --- a/debian/additions/mariadb.conf.d/60-galera.cnf +++ b/debian/additions/mariadb.conf.d/60-galera.cnf @@ -2,19 +2,20 @@ # * Galera-related settings # # See the examples of server wsrep.cnf files in /usr/share/mysql +# and read more at https://mariadb.com/kb/en/galera-cluster/ [galera] # Mandatory settings -#wsrep_on=ON -#wsrep_provider= -#wsrep_cluster_address= -#binlog_format=row -#default_storage_engine=InnoDB -#innodb_autoinc_lock_mode=2 +#wsrep_on = ON +#wsrep_provider = +#wsrep_cluster_address = +#binlog_format = row +#default_storage_engine = InnoDB +#innodb_autoinc_lock_mode = 2 # Allow server to accept connections on all interfaces. -#bind-address=0.0.0.0 +#bind-address = 0.0.0.0 # Optional settings -#wsrep_slave_threads=1 -#innodb_flush_log_at_trx_commit=0 +#wsrep_slave_threads = 1 +#innodb_flush_log_at_trx_commit = 0 diff --git a/debian/additions/mariadb.conf.d/99-enable-encryption.cnf.preset b/debian/additions/mariadb.conf.d/99-enable-encryption.cnf.preset new file mode 120000 index 00000000000..53e8f5c645c --- /dev/null +++ b/debian/additions/mariadb.conf.d/99-enable-encryption.cnf.preset @@ -0,0 +1 @@ +../../../support-files/rpm/enable_encryption.preset
\ No newline at end of file diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index 3375bbf0fcd..4417f18ded0 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -2,6 +2,11 @@ # # Build MariaDB .deb packages for test and release at mariadb.org # +# Purpose of this script: +# Always keep the actual packaging as up-to-date as possible following the latest +# Debian policy and targeting Debian Sid. Then case-by-case run in autobake-deb.sh +# tests for backwards compatibility and strip away parts on older builders or +# specfic build environments. # Exit immediately on any error set -e @@ -17,21 +22,32 @@ if [[ $TRAVIS ]] || [[ $GITLAB_CI ]] then # On both Travis and Gitlab the output log must stay under 4MB so make the # build less verbose - sed -i -e '/Add support for verbose builds/,/^$/d' debian/rules + sed '/Add support for verbose builds/,/^$/d' -i debian/rules + + # MCOL-4149: ColumnStore builds are so slow and big that they must be skipped on + # both Travis-CI and Gitlab-CI + sed 's|-DPLUGIN_COLUMNSTORE=YES|-DPLUGIN_COLUMNSTORE=NO|' -i debian/rules + sed "/Package: mariadb-plugin-columnstore/,/^$/d" -i debian/control fi -# Travis-CI optimizations to keep build small (in both duration and disk space) +# Don't build or try to put files in a package for selected plugins and compontents on Travis-CI +# in order to keep build small (in both duration and disk space) if [[ $TRAVIS ]] then - # Don't include test suite package on Travis-CI to make the build time shorter + # Test suite package not relevant on Travis-CI + sed 's|DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test|DINSTALL_MYSQLTESTDIR=false|' -i debian/rules sed '/Package: mariadb-test-data/,/^$/d' -i debian/control sed '/Package: mariadb-test$/,/^$/d' -i debian/control - # Don't build the test package at all to save time and disk space - sed 's|DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test|DINSTALL_MYSQLTESTDIR=false|' -i debian/rules - - # Also skip building RocksDB, Mroonga etc to save even more time and disk space - sed 's|-DDEB|-DPLUGIN_MROONGA=NO -DPLUGIN_SPIDER=NO -DPLUGIN_OQGRAPH=NO -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_SPHINX=NO -DDEB|' -i debian/rules + # Extra plugins such as Mroonga, Spider, OQgraph, Sphinx and the embedded build can safely be skipped + sed 's|-DDEB|-DPLUGIN_MROONGA=NO -DPLUGIN_ROCKSDB=NO -DPLUGIN_SPIDER=NO -DPLUGIN_OQGRAPH=NO -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_SPHINX=NO -DWITH_EMBEDDED_SERVER=OFF -DDEB|' -i debian/rules + sed "/Package: mariadb-plugin-mroonga/,/^$/d" -i debian/control + sed "/Package: mariadb-plugin-rocksdb/,/^$/d" -i debian/control + sed "/Package: mariadb-plugin-spider/,/^$/d" -i debian/control + sed "/Package: mariadb-plugin-oqgraph/,/^$/d" -i debian/control + sed "/ha_sphinx.so/d" -i debian/mariadb-server-10.6.install + sed "/Package: libmariadbd19/,/^$/d" -i debian/control + sed "/Package: libmariadbd-dev/,/^$/d" -i debian/control fi # Convert gcc version to numberical value. Format is Mmmpp where M is Major @@ -41,19 +57,6 @@ GCCVERSION=$(gcc -dumpfullversion -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g -e 's/\.\([0-9]\)/0\1/g' \ -e 's/^[0-9]\{3,4\}$/&00/') -# Look up distro-version specific stuff -# -# Always keep the actual packaging as up-to-date as possible following the latest -# Debian policy and targeting Debian Sid. Then case-by-case run in autobake-deb.sh -# tests for backwards compatibility and strip away parts on older builders. - -# If libzstd-dev is not available (before Debian Stretch and Ubuntu Xenial) -# remove the dependency from server and RocksDB so it can build properly -if ! apt-cache madison libzstd-dev | grep 'libzstd-dev' >/dev/null 2>&1 -then - sed '/libzstd-dev/d' -i debian/control -fi - # If rocksdb-tools is not available (before Debian Buster and Ubuntu Disco) # remove the dependency from the RocksDB plugin so it can install properly # and instead ship the one built from MariaDB sources @@ -70,38 +73,6 @@ then sed 's/libcurl4/libcurl3/g' -i debian/control fi -# Don't build rocksdb package if gcc version is less than 4.8 or we are running on -# x86 32 bit. -if [[ $GCCVERSION -lt 40800 ]] || [[ $(arch) =~ i[346]86 ]] || [[ $TRAVIS ]] -then - sed '/Package: mariadb-plugin-rocksdb/,/^$/d' -i debian/control - sed -i 's|-DPLUGIN_ROCKSDB=YES|-DPLUGIN_ROCKSDB=NO|' debian/rules -fi - -# If libpcre2-dev is not available (before Debian Stretch and Ubuntu Xenial) -# attempt to build using older libpcre3-dev (SIC!) -if ! apt-cache madison libpcre2-dev | grep --quiet 'libpcre2-dev' -then - sed 's/libcurl4-openssl-dev | libcurl4-dev/libpcre3-dev/' -i debian/control -fi - -# Mroonga, Spider etc never built on Travis CI anyway, see build flags above -if [[ $TRAVIS ]] -then - sed -i -e "/Package: mariadb-plugin-mroonga/,/^$/d" debian/control - sed -i -e "/Package: mariadb-plugin-spider/,/^$/d" debian/control - sed -i -e "/Package: mariadb-plugin-oqgraph/,/^$/d" debian/control - sed -i -e "/usr\/lib\/mysql\/plugin\/ha_sphinx.so/d" debian/mariadb-server-10.6.install - sed -i -e "/Package: libmariadbd-dev/,/^$/d" debian/control -fi - -if [[ $TRAVIS ]] || ! [[ $(arch) =~ 86 ]] -then - sed -i -e "/Package: mariadb-plugin-columnstore/,/^$/d" debian/control - sed -i '/flex/d' debian/control - sed -i 's|-DPLUGIN_COLUMNSTORE=YES|-DPLUGIN_COLUMNSTORE=NO|' debian/rules -fi - # Adjust changelog, add new version echo "Incrementing changelog and starting build scripts" diff --git a/debian/control b/debian/control index 79cfb9ef0e0..68f0c88da3b 100644 --- a/debian/control +++ b/debian/control @@ -9,10 +9,17 @@ Build-Depends: bison, dh-apparmor, dh-exec, dh-systemd, - flex, + flex [i386 amd64], gdb, libaio-dev [linux-any], + libboost-atomic-dev [i386 amd64], + libboost-chrono-dev [i386 amd64], + libboost-date-time-dev [i386 amd64], libboost-dev, + libboost-filesystem-dev [i386 amd64], + libboost-regex-dev [i386 amd64], + libboost-system-dev [i386 amd64], + libboost-thread-dev [i386 amd64], libcrack2-dev (>= 2.9.0), libcurl4-openssl-dev | libcurl4-dev, libedit-dev, @@ -490,8 +497,7 @@ Package: mariadb-server-10.6 Architecture: any Suggests: mailx, mariadb-test, - netcat-openbsd, - tinyca + netcat-openbsd Recommends: libhtml-template-perl Pre-Depends: adduser (>= 3.40), debconf, @@ -642,12 +648,15 @@ Depends: libcurl4, mariadb-server-10.6 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} -Description: S3 storage engine for MariaDB - Read only table stored in S3. +Description: Amazon S3 archival storage engine for MariaDB + The S3 storage engine allows one to archive MariaDB tables in Amazon S3 (or any + third-party public or private cloud that implements S3 API), but still have + them accessible in MariaDB in read-only mode. Package: mariadb-plugin-rocksdb Architecture: amd64 arm64 mips64el ppc64el Depends: mariadb-server-10.6 (= ${binary:Version}), + python3, rocksdb-tools, ${misc:Depends}, ${shlibs:Depends} @@ -665,11 +674,11 @@ Description: RocksDB storage engine for MariaDB Package: mariadb-plugin-columnstore Architecture: amd64 i386 -Depends: mariadb-server-10.6 (= ${binary:Version}), - net-tools, - binutils, - libsnappy1 | libsnappy1v5, +Depends: binutils, libjemalloc1 | libjemalloc2, + libsnappy1 | libsnappy1v5, + mariadb-server-10.6 (= ${binary:Version}), + net-tools, python3, ${misc:Depends}, ${shlibs:Depends} diff --git a/debian/mariadb-plugin-columnstore.install b/debian/mariadb-plugin-columnstore.install index cd4461fe308..3b4c9619dc6 100644 --- a/debian/mariadb-plugin-columnstore.install +++ b/debian/mariadb-plugin-columnstore.install @@ -18,7 +18,6 @@ usr/bin/ProcMon usr/bin/ServerMonitor usr/bin/StorageManager usr/bin/WriteEngineServer -usr/bin/dbmsReport.sh usr/bin/autoConfigure usr/bin/bulklogReport.sh usr/bin/clearShm @@ -42,6 +41,7 @@ usr/bin/cpimport usr/bin/cpimport.bin usr/bin/cplogger usr/bin/dbbuilder +usr/bin/dbmsReport.sh usr/bin/dbrmctl usr/bin/ddlcleanup usr/bin/disable-rep-columnstore.sh @@ -51,8 +51,11 @@ usr/bin/hardwareReport.sh usr/bin/idbmeminfo usr/bin/load_brm usr/bin/logReport.sh +usr/bin/mariadb-columnstore-start.sh +usr/bin/mariadb-columnstore-stop.sh usr/bin/mariadb-command-line.sh usr/bin/master-rep-columnstore.sh +usr/bin/mcs-loadbrm.py usr/bin/mcs-stop-controllernode.sh usr/bin/mcsGetConfig usr/bin/mcsSetConfig @@ -82,10 +85,6 @@ usr/bin/smrm usr/bin/startupTests.sh usr/bin/viewtablelock usr/bin/workernode -usr/bin/mcs-start-storagemanager.py -usr/bin/mcs-loadbrm.py -usr/bin/mariadb-columnstore-start.sh -usr/bin/mariadb-columnstore-stop.sh usr/lib/*/libalarmmanager.so usr/lib/*/libbatchloader.so usr/lib/*/libbrm.so @@ -146,9 +145,9 @@ usr/share/columnstore/mcs-dmlproc.service usr/share/columnstore/mcs-exemgr.service usr/share/columnstore/mcs-loadbrm.service usr/share/columnstore/mcs-primproc.service +usr/share/columnstore/mcs-storagemanager.service usr/share/columnstore/mcs-workernode.service usr/share/columnstore/mcs-writeengineserver.service -usr/share/columnstore/mcs-storagemanager.service usr/share/columnstore/mcstest-001.sh usr/share/columnstore/mcstest-002.sh usr/share/columnstore/mcstest-003.sh diff --git a/debian/mariadb-plugin-columnstore.postinst b/debian/mariadb-plugin-columnstore.postinst index b482002c9dc..97a1bba22c8 100644 --- a/debian/mariadb-plugin-columnstore.postinst +++ b/debian/mariadb-plugin-columnstore.postinst @@ -3,8 +3,6 @@ set -e # Install ColumnStore -columnstore-post-install --rpmmode=install - -echo "MariaDB ColumnStore install completed" +columnstore-post-install install #DEBHELPER# diff --git a/debian/mariadb-plugin-columnstore.postrm b/debian/mariadb-plugin-columnstore.postrm index cd8decbfe76..b2e19774ec1 100644 --- a/debian/mariadb-plugin-columnstore.postrm +++ b/debian/mariadb-plugin-columnstore.postrm @@ -8,22 +8,17 @@ if [ "$1" = "purge" ]; then rm -f /etc/mysql/mariadb.conf.d/columnstore.cnf.rpmsave fi -running_systemd() { - if [ "$(ps --no-headers -o comm 1)" = "systemd" ]; then - echo 0 - else - echo 1 - fi -} - -if [ ! -z "$(pgrep -x mysqld)" ];then - systemctl cat mariadb.service > /dev/null 2>&1 - if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then - systemctl restart mariadb.service > /dev/null 2>&1 - else - pkill mysqld > /dev/null 2>&1 - /usr/bin/mysqld_safe & +# Automatically restart MariaDB after ColumnStore plugin has been removed +case "$1" in + purge|remove|disappear) + if [ -d /run/systemd/system ]; then + # If systemd + deb-systemd-invoke restart mariadb.service >/dev/null + elif [ -x "/etc/init.d/mariadb" ]; then + # Fall-back to SysV init + invoke-rc.d mariadb restart || exit $? fi -fi + ;; +esac #DEBHELPER# diff --git a/debian/mariadb-plugin-columnstore.prerm b/debian/mariadb-plugin-columnstore.prerm index 10e585a887b..f6a27f14499 100644 --- a/debian/mariadb-plugin-columnstore.prerm +++ b/debian/mariadb-plugin-columnstore.prerm @@ -4,6 +4,5 @@ set -e columnstore-pre-uninstall -exit 0 #DEBHELPER# diff --git a/debian/mariadb-plugin-columnstore.triggers b/debian/mariadb-plugin-columnstore.triggers new file mode 100644 index 00000000000..dd866036784 --- /dev/null +++ b/debian/mariadb-plugin-columnstore.triggers @@ -0,0 +1 @@ +activate-noawait ldconfig diff --git a/debian/mariadb-plugin-cracklib-password-check.install b/debian/mariadb-plugin-cracklib-password-check.install index 5419f05ed3d..6592c7f461b 100644 --- a/debian/mariadb-plugin-cracklib-password-check.install +++ b/debian/mariadb-plugin-cracklib-password-check.install @@ -1,2 +1,2 @@ -etc/mysql/mariadb.conf.d/cracklib_password_check.cnf +etc/mysql/mariadb.conf.d/cracklib_password_check.cnf usr/lib/mysql/plugin/cracklib_password_check.so diff --git a/debian/mariadb-plugin-gssapi-server.install b/debian/mariadb-plugin-gssapi-server.install index 70916b49052..8261db789f7 100644 --- a/debian/mariadb-plugin-gssapi-server.install +++ b/debian/mariadb-plugin-gssapi-server.install @@ -1,2 +1,2 @@ -etc/mysql/mariadb.conf.d/auth_gssapi.cnf +etc/mysql/mariadb.conf.d/auth_gssapi.cnf usr/lib/mysql/plugin/auth_gssapi.so diff --git a/debian/mariadb-plugin-rocksdb.lintian-overrides b/debian/mariadb-plugin-rocksdb.lintian-overrides deleted file mode 100644 index bc2ec13dbf9..00000000000 --- a/debian/mariadb-plugin-rocksdb.lintian-overrides +++ /dev/null @@ -1,2 +0,0 @@ -# Overridden temporarily to get Salsa-CI pass and not stall other dev work with broken pipeline -python-script-but-no-python-dep usr/bin/myrocks_hotbackup #!python diff --git a/debian/mariadb-plugin-s3.install b/debian/mariadb-plugin-s3.install index a6f90b76f82..b951e49dd0b 100644 --- a/debian/mariadb-plugin-s3.install +++ b/debian/mariadb-plugin-s3.install @@ -1,3 +1,4 @@ etc/mysql/mariadb.conf.d/s3.cnf usr/bin/aria_s3_copy usr/lib/mysql/plugin/ha_s3.so +usr/share/man/man1/aria_s3_copy.1 diff --git a/debian/mariadb-server-10.6.postrm b/debian/mariadb-server-10.6.postrm index 00ff90dbb20..97789a038df 100644 --- a/debian/mariadb-server-10.6.postrm +++ b/debian/mariadb-server-10.6.postrm @@ -18,9 +18,12 @@ stop_server() { # Return immediately if there are no mysql processes running # as there is no point in trying to shutdown in that case. if ! pgrep -x mariadbd > /dev/null; then return; fi + # Compatibility with versions that ran 'mysqld' + if ! pgrep -x mysqld > /dev/null; then return; fi set +e invoke-rc.d mariadb stop + invoke-rc.d mysql stop # Backwards compatibility errno=$? set -e diff --git a/debian/mariadb-server-10.6.preinst b/debian/mariadb-server-10.6.preinst index ce4ca3fee9d..919031066c9 100644 --- a/debian/mariadb-server-10.6.preinst +++ b/debian/mariadb-server-10.6.preinst @@ -31,9 +31,12 @@ stop_server() { # Return immediately if there are no mysql processes running # as there is no point in trying to shutdown in that case. if ! pgrep -x --ns $$ mariadbd > /dev/null; then return; fi + # Compatibility with versions that ran 'mysqld' + if ! pgrep -x --ns $$ mysqld > /dev/null; then return; fi set +e invoke-rc.d mariadb stop + invoke-rc.d mysql stop # Backwards compatibility errno=$? set -e diff --git a/debian/not-installed b/debian/not-installed index e928b821bcf..4bce7f084c2 100644 --- a/debian/not-installed +++ b/debian/not-installed @@ -1,12 +1,17 @@ +etc/columnstore/storagemanager.cnf.example # Copy of etc/columnstore/storagemanager.cnf that is installed lib/systemd/system/mariadb.service # Installed by rules file lib/systemd/system/mariadb@.service # Installed by rules file usr/bin/mysql_config # We already have the MariaDB variant usr/bin/mytop # Mytop is distributed from a separate source package usr/bin/sst_dump # Use the one from rocksdb-tools package -usr/lib/sysusers.d/sysusers.conf -usr/lib/tmpfiles.d/tmpfiles.conf usr/lib/mysql/plugin/JavaWrappers.jar # These are only built if JNI/libjawt.so is installed from e.g. openjdk-8-jre-headless usr/lib/mysql/plugin/JdbcInterface.jar # These are only built if JNI/libjawt.so is installed from e.g. openjdk-8-jre-headless +usr/lib/sysusers.d/sysusers.conf +usr/lib/tmpfiles.d/tmpfiles.conf +usr/lib/*/libdbbc.a # ColumnStore header file +usr/lib/*/libidbboot.a # ColumnStore header file +usr/lib/*/libprocessor.a # ColumnStore header file +usr/lib/*/libwe_xml.a # ColumnStore header file usr/share/doc/mariadb-server-10.6/COPYING usr/share/doc/mariadb-server-10.6/COPYING.AGPLv3 usr/share/doc/mariadb-server-10.6/COPYING.GPLv2 diff --git a/debian/rules b/debian/rules index 92a1fd5a136..0684cbfd05a 100755 --- a/debian/rules +++ b/debian/rules @@ -1,12 +1,10 @@ #!/usr/bin/make -f -export DH_VERBOSE=1 -export DEB_BUILD_HARDENING=1 - -# enable Debian Hardening -# see: https://wiki.debian.org/Hardening +# Enable Debian Hardening +# https://wiki.debian.org/Hardening export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 +# Include all defaults, including buildflags.mk include /usr/share/dpkg/default.mk # CPPFLAGS are nor read by CMake, so copy them to CXXFLAGS # See why at https://cmake.org/Bug/view.php?id=12928 @@ -22,6 +20,12 @@ TMP:=$(CURDIR)/debian/tmp CC := $(DEB_HOST_GNU_TYPE)-gcc CXX := $(DEB_HOST_GNU_TYPE)-g++ +# According to Debian Policy version 4.2.0 builds should be as verbose as +# possible unless 'terse' is specifically passed. +ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) + export DH_VERBOSE=1 +endif + # Parallel build support as advised # at https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) @@ -39,6 +43,17 @@ else TESTSUITE_FAIL_CMD:=exit 1 endif +# RocksDB cannot build on 32-bit platforms +ifeq (32,$(DEB_HOST_ARCH_BITS)) + CMAKEFLAGS += -DWITHOUT_ROCKSDB=true +endif + +# ColumnStore only attempts to build on a few platforms as dictated by CMake checks +# Also note in debian/control the CS-only build deps marked '[i386 amd64]' +ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),amd64 i386)) + CMAKEFLAGS += -DPLUGIN_COLUMNSTORE=YES +endif + # Add extra flag to avoid WolfSSL code crashing the entire mariadbd on s390x. This # can be removed once upstream has made the code s390x compatible, see # https://jira.mariadb.org/browse/MDEV-21705 and @@ -81,11 +96,7 @@ endif -DSYSTEM_TYPE="debian-$(DEB_HOST_GNU_SYSTEM)" \ -DCMAKE_SYSTEM_PROCESSOR=$(DEB_HOST_ARCH) \ -DBUILD_CONFIG=mysql_release \ - -DPLUGIN_TOKUDB=NO \ - -DPLUGIN_COLUMNSTORE=YES \ - -DPLUGIN_ROCKSDB=YES \ -DPLUGIN_AWS_KEY_MANAGEMENT=NO \ - -WITH_EMBEDDED_SERVER=OFF \ -DDEB=$(DEB_VENDOR) ..' # This is needed, otherwise 'make test' will run before binaries have been built diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index 1a62bb2b52b..f62358a1e48 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -33,7 +33,8 @@ build: - export CCACHE_DIR="${CCACHE_TMP_DIR}" - update-ccache-symlinks; ccache -z # Zero out ccache counters - mk-build-deps debian/control -t "apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends" -r -i - - debian/autobake-deb.sh + - while true; do sleep 600; echo "10 minutes passed" >&2; done & # Progress keeper since build is long and silent + - debian/autobake-deb.sh |& tail -n 10000 # Keep Gitlab-CI output under 4 MB - cd ..; rm -rfv *.tmp # Clean away build files not to store as artifacts - cp -v *.* ${WORKING_DIR}/ - du -shc ${WORKING_DIR}/* # Show total file size of artifacts. Must stay are under 100 MB. @@ -72,7 +73,6 @@ autopkgtest: piuparts: extends: .test-piuparts stage: test extras - allow_failure: true blhc: extends: .test-blhc @@ -83,11 +83,9 @@ blhc: lintian: extends: .test-lintian - allow_failure: true missing-breaks: extends: .test-missing-breaks - allow_failure: true # In addition to Salsa-CI, also run these fully MariaDB specific build jobs @@ -123,7 +121,6 @@ fresh install: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true mariadb-10.3.x to mariadb-10.6.y upgrade: stage: upgrade in Sid @@ -164,7 +161,6 @@ mariadb-10.3.x to mariadb-10.6.y upgrade: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true mariadb-10.3.x buster to mariadb-10.6 upgrade: stage: upgrade from Buster/Stretch/Jessie @@ -209,7 +205,6 @@ mariadb-10.3.x buster to mariadb-10.6 upgrade: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true mariadb-10.1 to mariadb-10.6 upgrade: stage: upgrade from Buster/Stretch/Jessie @@ -254,7 +249,6 @@ mariadb-10.1 to mariadb-10.6 upgrade: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true test basic features: stage: test @@ -310,7 +304,6 @@ test basic features: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true # Build a piece of software that was designed for libmysqlclient-dev but using the # libmariadb-dev-compat layer. Should always end up using libmariadb.so.3 run-time. @@ -334,7 +327,6 @@ build mariadbclient consumer Python-MySQLdb: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true libmysql* to libmariadb* upgrade: stage: test extras @@ -374,7 +366,6 @@ libmysql* to libmariadb* upgrade: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true default-libmysqlclient-dev upgrade: stage: upgrade in Sid @@ -401,7 +392,6 @@ default-libmysqlclient-dev upgrade: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true default-libmysqlclient-dev on buster upgrade: stage: upgrade from Buster/Stretch/Jessie @@ -430,7 +420,6 @@ default-libmysqlclient-dev on buster upgrade: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true default-libmysqlclient-dev on stretch upgrade: stage: upgrade from Buster/Stretch/Jessie @@ -459,7 +448,6 @@ default-libmysqlclient-dev on stretch upgrade: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true mariadb-connector-c on stretch upgrade: stage: upgrade from Buster/Stretch/Jessie @@ -488,7 +476,6 @@ mariadb-connector-c on stretch upgrade: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true mysql-5.5 to mariadb-10.6 upgrade: stage: upgrade from Buster/Stretch/Jessie @@ -533,7 +520,6 @@ mysql-5.5 to mariadb-10.6 upgrade: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true # Upgrading from MySQL 5.7 involves automatic renaming of auth_socket plugin # to unix_socket and automaticly re-adding Password column in user table. @@ -580,7 +566,6 @@ mysql-5.7 to mariadb-10.6 upgrade: except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true # Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump. # The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh. @@ -647,17 +632,14 @@ mariadb.org-10.5.x to mariadb-10.6 upgrade: - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - apt-get update - - apt install -y curl systemctl # systemctl shim needed on platforms that don't have systemd + - apt install -y curl - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - echo 'deb [arch=amd64,i386] http://mirror.one.com/mariadb/repo/10.5/debian sid main' > /etc/apt/sources.list.d/mariadb.list - apt-get update - apt-get install -y mariadb-server-10.5 # Verify installation of MySQL from Sid - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - # MariaDB.org version of 10.4 and early 10.5 do not install an init file, so - # it must be installed here manually - - cp /usr/share/mysql/mysql.init /etc/init.d/mysql; chmod +x /etc/init.d/mysql; service mysql start; sleep 5 - - service mysql status + - service mariadb status - mysql --skip-column-names -e "SELECT @@version, @@version_comment" - mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql - mysql -e "SELECT * FROM plugin;" mysql @@ -667,7 +649,6 @@ mariadb.org-10.5.x to mariadb-10.6 upgrade: # Verify installation of MariaDB built in this commit - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - mariadb --version # Client version - - service mysql status - service mariadb status - mkdir -p debug # Ensure dir exists before using it - find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory" diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides index c8adb576864..aff88487254 100644 --- a/debian/source/lintian-overrides +++ b/debian/source/lintian-overrides @@ -1,5 +1,3 @@ -# Upstream fix pending: https://github.com/wolfSSL/wolfssl/pull/2785 -source-is-missing extra/wolfssl/wolfssl/doc/formats/html/html_changes/menu.js line length is 679 characters (>512) # Necessary for drop-in-place-replacement upgrades on mysql-server/-client # since package breaks/replaces these but at the same time also provides them version-substvar-for-external-package mariadb-client-core-10.6 -> mysql-client-5.5 |