diff --git a/debian/.gitlab-ci.yml b/debian/.gitlab-ci.yml deleted file mode 100644 index 9150f20cba..0000000000 --- a/debian/.gitlab-ci.yml +++ /dev/null @@ -1,84 +0,0 @@ -variables: - DEBFULLNAME: "Salsa Pipeline" - DEBEMAIL: "" - DEBIAN_FRONTEND: noninteractive - WORKING_DIR: ./debian/output - DEB_BUILD_OPTIONS: "nocheck noautodbgsym" - RELEASE: unstable - -stages: - - build - - test - -build package: - stage: build - image: registry.salsa.debian.org/salsa-ci-team/images/gbp - services: - - docker:dind - artifacts: - expire_in: 180 day - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/ - script: - - gbp pull --ignore-branch --pristine-tar --track-missing - - while true; do sleep 600; echo "10 minutes passed" >&2; done & # Progress keeper since build is long and silent - - gbp buildpackage --git-ignore-branch --git-export-dir=${WORKING_DIR} -us -uc --git-builder="docker-build.sh registry.salsa.debian.org/salsa-ci-team/images/base:${RELEASE}" | tail -n 10000 # Keep log under 4 MB - - du -shc ${WORKING_DIR}/* # Show total file size of artifacts. Must stay are under 100 MB. - -# Autopkgtest must be disabled, because the test 'upstream' will be skipped and -# thus the command returns exit code 2 and is considered failed by Gitlab CI. -# Removing 'breaks-testbed' stanza from tests/control will result in that the -# test is run on Gitlab CI, but then it will fail in multiple tests as it cannot -# bind to network interfaces and other needes stuff inside Gitlab CI containers. -# -#run autopkgtest: -# stage: test -# script: -# - apt-get update && apt-get install autopkgtest eatmydata -y --no-install-recommends -# - eatmydata autopkgtest ${WORKING_DIR}/*.deb -- null - -run lintian: - stage: test - image: registry.salsa.debian.org/salsa-ci-team/images/lintian - script: - - apt-get update - - apt-get install -y dpkg-dev - - lintian -iI ${WORKING_DIR}/*.changes - -# Reprotest exceeds the 2 hour timeout limit on Github CI, so results in failure -# and must be disabled until a quicker (times two) build is possible. -#run reprotest: -# stage: test -# image: genericpipeline/reprotest-docker -# artifacts: -# name: "$CI_BUILD_NAME" -# expire_in: 180 day -# paths: -# - ./reprotest.log -# when: always -# script: -# - apt-get update && apt-get install eatmydata -y -# - eatmydata apt-get build-dep -y . -# - export DEB_BUILD_OPTIONS=nocheck -# - eatmydata reprotest . -- null &> reprotest.log -# tags: -# - privileged - -# Piuparts is passing on official piuparts.debian.org, but fail on Gitlab CI -# with 'FAIL: Package purging left files on system'. Disabling for now. -#run piuparts: -# stage: test -# image: genericpipeline/piuparts-docker -# services: -# - docker:dind -# script: -# - CHROOT_PATH=/tmp/debian-unstable -# - CONTAINER_ID=$(docker run --rm -d debian:unstable sleep infinity) -# - docker exec ${CONTAINER_ID} bash -c "apt-get update && apt-get install eatmydata -y" -# - mkdir -p ${CHROOT_PATH} -# - docker export ${CONTAINER_ID} | tar -C ${CHROOT_PATH} -xf - -# - mknod -m 666 ${CHROOT_PATH}/dev/urandom c 1 9 -# - piuparts --hard-link -e ${CHROOT_PATH} ${WORKING_DIR}/*.deb -# tags: -# - privileged diff --git a/debian/changelog b/debian/changelog index 3e5547cb0f..009c7997bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,26 @@ +mariadb-10.1 (10.1.38-0+deb9u1) stretch; urgency=medium + + * SECURITY UPDATE: New upstream release 10.1.38. Includes fixes for + the following security vulnerabilities (Closes: #920933): + - CVE-2019-2537 + - CVE-2019-2529 + * Update correct branch name in gbp.conf + * Disable test unit.pcre_test on s390x that was failing in stretch-security + * Fix mips compilation failure (__bss_start symbol missing) (Closes: #920855) + * Extend the server README to clarify common misunderstandings + (Closes: #878215) + * Heavily refactor and unify gitlab-ci.yml MariaDB install/upgrade steps. + This ensures uploads to Stretch are much more safer to do now than in the + past. + * Enable ccache in CMake path so it can be used automatically where available + * Limit build test suite to 'main' like in mariadb-10.3 (Closes: #920854) + + -- Otto Kekäläinen Tue, 16 Apr 2019 14:56:50 +0300 + mariadb-10.1 (10.1.37-0+deb9u1) stretch-security; urgency=high * SECURITY UPDATE: New upstream release 10.1.37. Includes fixes for - the following security vulnerabilities (Closes: #912848); + the following security vulnerabilities (Closes: #912848): - CVE-2018-3282 - CVE-2018-3251 - CVE-2018-3174 @@ -14,6 +33,9 @@ mariadb-10.1 (10.1.37-0+deb9u1) stretch-security; urgency=high * Physically remove patches no longer in series and not applied anyway * Fix wrong-path-for-interpreter in innotop script to make package Lintian error free as pass CI systems fully + * Previous upstream version 10.1.36 included fixes for the following + security vulnerabilities: + - CVE-2019-2503 * Previous upstream version 10.1.35 included fixes for the following security vulnerabilities: - CVE-2018-3066 diff --git a/debian/gbp.conf b/debian/gbp.conf index 5f9e975011..1f011e214b 100644 --- a/debian/gbp.conf +++ b/debian/gbp.conf @@ -3,7 +3,7 @@ # for contributors to work with feature and bugfix branches ignore-branch = True -debian-branch = master-stretch +debian-branch = stretch # Always use pristine tar pristine-tar = True diff --git a/debian/gitlab-ci.yml b/debian/gitlab-ci.yml new file mode 100644 index 0000000000..f86d36d9fc --- /dev/null +++ b/debian/gitlab-ci.yml @@ -0,0 +1,285 @@ +variables: + DEBFULLNAME: "Salsa Pipeline" + DEBEMAIL: "" + DEBIAN_FRONTEND: noninteractive + WORKING_DIR: $CI_PROJECT_DIR/debian/output + DEB_BUILD_OPTIONS: "nocheck noautodbgsym" + RELEASE: stretch + +stages: + - build + - test quality + - upgrade in Stretch + - upgrade from Jessie + +build package: + stage: build + image: registry.salsa.debian.org/salsa-ci-team/images/gbp + cache: + paths: + - ${CCACHE_WORK_DIR} + variables: + CCACHE_TMP_DIR: ${CI_PROJECT_DIR}/../.ccache + CCACHE_WORK_DIR: ${WORKING_DIR}/.ccache + services: + - docker:dind + artifacts: + expire_in: 90 day + name: "$CI_JOB_NAME:$CI_COMMIT_REF_NAME" + paths: + - ${WORKING_DIR}/ + script: + - | + curl https://prittiau.debian.net/post -X POST --data "{\"project_id\":$CI_PROJECT_ID, \"pipeline_id\":$CI_PIPELINE_ID}" --header "Content-Type: application/json" + - mkdir -p ${CCACHE_WORK_DIR} + - mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR} + - gbp pull --ignore-branch --pristine-tar --track-missing + - while true; do sleep 600; echo "10 minutes passed" >&2; done & # Progress keeper since build is long and silent + - gbp buildpackage --git-ignore-branch --git-export-dir=${WORKING_DIR} --git-builder="docker-build.sh registry.salsa.debian.org/salsa-ci-team/images/dockerbuilder:${RELEASE}" | tail -n 10000 # Keep log under 4 MB + - du -shc ${WORKING_DIR}/* # Show total file size of artifacts. Must stay are under 100 MB. + - mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} + +run lintian: + stage: test quality + dependencies: + - build package + image: registry.salsa.debian.org/salsa-ci-team/images/lintian:${RELEASE} + script: + - lintian ${WORKING_DIR}/*.changes | tee lintian.output + - cat lintian.output | /root/go/bin/lintian2junit > ${WORKING_DIR}/lintian.xml + variables: + GIT_STRATEGY: none + artifacts: + reports: + junit: ${WORKING_DIR}/lintian.xml + +fresh install: + stage: test quality + image: debian:${RELEASE} + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - 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 + # Install MariaDB built in this commit + - apt-get install -y ./*.deb + # 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 + - mkdir -p debug # Ensure dir exists before using it + - find /var/lib/mysql -ls > debug/var-lib-mysql.list + - cp -ra /etc/mysql debug/etc-mysql + - cp -ra /var/log/mysql debug/var-log-mysql + - mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version + - echo 'SHOW DATABASES;' | mariadb # List databases + - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works + variables: + GIT_STRATEGY: none + +test basic features: + stage: test quality + dependencies: + - build package + image: debian:${RELEASE} + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - 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 + # Install MariaDB built in this commit + - apt-get install -y ./*.deb + # 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 + - mkdir -p debug # Ensure dir exists before using it + - find /var/lib/mysql -ls > debug/var-lib-mysql.list + - cp -ra /etc/mysql debug/etc-mysql + - cp -ra /var/log/mysql debug/var-log-mysql + - echo 'SHOW DATABASES;' | mariadb # List databases + # Print info about server + - mariadb --skip-column-names -e "select @@version, @@version_comment" + - mariadb --skip-column-names -e "select engine, support, transactions, savepoints from information_schema.engines order by engine" | sort + - mariadb --skip-column-names -e "select plugin_name, plugin_status, plugin_type, plugin_library, plugin_license from information_schema.all_plugins order by plugin_name, plugin_library" + # Test various features + - mariadb -e "CREATE DATABASE db" + - mariadb -e "CREATE TABLE db.t_innodb(a1 SERIAL, c1 CHAR(8)) ENGINE=InnoDB; INSERT INTO db.t_innodb VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" + - mariadb -e "CREATE TABLE db.t_myisam(a2 SERIAL, c2 CHAR(8)) ENGINE=MyISAM; INSERT INTO db.t_myisam VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" + - mariadb -e "CREATE TABLE db.t_aria(a3 SERIAL, c3 CHAR(8)) ENGINE=Aria; INSERT INTO db.t_aria VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" + - mariadb -e "CREATE TABLE db.t_memory(a4 SERIAL, c4 CHAR(8)) ENGINE=MEMORY; INSERT INTO db.t_memory VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" + - mariadb -e "CREATE ALGORITHM=MERGE VIEW db.v_merge AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria" + - mariadb -e "CREATE ALGORITHM=TEMPTABLE VIEW db.v_temptable AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria" + - mariadb -e "CREATE PROCEDURE db.p() SELECT * FROM db.v_merge" + - mariadb -e "CREATE FUNCTION db.f() RETURNS INT DETERMINISTIC RETURN 1" + # Test that the features still work (this step can be done e.g. after an upgrade) + - mariadb -e "SHOW TABLES IN db" + - mariadb -e "SELECT * FROM db.t_innodb; INSERT INTO db.t_innodb VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" + - mariadb -e "SELECT * FROM db.t_myisam; INSERT INTO db.t_myisam VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" + - mariadb -e "SELECT * FROM db.t_aria; INSERT INTO db.t_aria VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" + - mariadb -e "SELECT * FROM db.t_memory; INSERT INTO db.t_memory VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" + - mariadb -e "SELECT COUNT(*) FROM db.v_merge" + - mariadb -e "SELECT COUNT(*) FROM db.v_temptable" + - mariadb -e "CALL db.p()" + - mariadb -e "SELECT db.f()" + variables: + GIT_STRATEGY: none + +# Stanza 'breaks-testbed' must be removed because the test 'upstream' will otherwise be skipped and +# thus the command would return exit code 2, and be considered failed by Gitlab CI. +run autopkgtest: + stage: test quality + dependencies: + - build package + image: registry.salsa.debian.org/salsa-ci-team/images/autopkgtest:${RELEASE} + script: + - sed s/breaks-testbed//g -i debian/tests/control + - cat debian/tests/control + - eatmydata autopkgtest -U --override-control=debian/tests/control ${WORKING_DIR}/*.changes -- null || [ $? -eq 8 ] + # Repo needs to be checked out so the debian/tests/control fiel can be modified on-the-fly. + #variables: + # GIT_STRATEGY: none + +# 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. +build mariadbclient consumer Python-MySQLdb: + stage: test quality + dependencies: + - build package + image: debian:${RELEASE} + script: + - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output + - mkdir -p debug # Ensure dir exists before using it + - apt-get update + - apt-get install -y pkg-config ./libmariadbclient-dev*.deb ./libmariadbclient18_*.deb ./mariadb-common*.deb + - pkg-config --list-all # See what MySQLdb builds with + - ldconfig -p | grep -e mariadb -e mysql + - mysql_config # Must be present for mysqlclient Python module to build + - apt-get install -y python3-pip + - pip3 install mysqlclient # Compiles module against libmysqlclient + - apt-get purge -y libmariadb-dev # Not needed for run-time + - python3 -c "import MySQLdb; print(MySQLdb.get_client_info())" + variables: + GIT_STRATEGY: none + +mariadb-10.1.x to mariadb-10.1.y upgrade: + stage: upgrade in Stretch + dependencies: + - build package + image: debian:stretch + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - 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 + # Install almost everything currently in Debian Stretch + - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*' + # Verify installation of MariaDB currently in Debian Stretch + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - service mysql status + - mariadb --skip-column-names -e "select @@version, @@version_comment" + - echo 'SHOW DATABASES;' | mysql + # Install MariaDB built in this commit + - apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected + # 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 + - mkdir -p debug # Ensure dir exists before using it + - find /var/lib/mysql -ls > debug/var-lib-mysql.list + - cp -ra /etc/mysql debug/etc-mysql + - cp -ra /var/log/mysql debug/var-log-mysql + - mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version + - echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there + - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works + variables: + GIT_STRATEGY: none + +mariadb-10.0 to mariadb-10.1 upgrade: + stage: upgrade from Jessie + dependencies: + - build package + image: debian:jessie + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - 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 + # Install almost everything currently in Debian Jessie + - apt-get install -y 'mariadb-*' 'libmariadb*' + # Verify installation of MariaDB from Jessie + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - service mysql status + - mysql --skip-column-names -e "select @@version, @@version_comment" + - echo 'SHOW DATABASES;' | mysql + # Install MariaDB built in this commit + - sed 's/jessie/stretch/g' -i /etc/apt/sources.list # Enable next Debian release + - apt-get update; apt-get install -y apt # Install apt 1.4.9 so the wildcard command below works + - apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected + # 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 + - mkdir -p debug # Ensure dir exists before using it + - find /var/lib/mysql -ls > debug/var-lib-mysql.list + - cp -ra /etc/mysql debug/etc-mysql + - cp -ra /var/log/mysql debug/var-log-mysql + - mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version + - echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there + - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works + variables: + GIT_STRATEGY: none + +mysql-5.5 to mariadb-10.1 upgrade: + stage: upgrade from Jessie + dependencies: + - build package + image: debian:jessie + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - 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-get install -y mysql-server + # Verify installation of MySQL from Jessie + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - service mysql status + - mysql --skip-column-names -e "select @@version, @@version_comment" + - echo 'SHOW DATABASES;' | mysql + # Install MariaDB built in this commit + - sed 's/jessie/stretch/g' -i /etc/apt/sources.list # Enable next Debian release + - apt-get update; apt-get install -y apt # Install apt 1.4.9 so the wildcard command below works + - apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected + # 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 + - mkdir -p debug # Ensure dir exists before using it + - find /var/lib/mysql -ls > debug/var-lib-mysql.list + - cp -ra /etc/mysql debug/etc-mysql + - cp -ra /var/log/mysql debug/var-log-mysql + - mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version + - echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there + - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works + variables: + GIT_STRATEGY: none diff --git a/debian/libmariadbclient18.lintian-overrides b/debian/libmariadbclient18.lintian-overrides new file mode 100644 index 0000000000..ebb95c2c00 --- /dev/null +++ b/debian/libmariadbclient18.lintian-overrides @@ -0,0 +1,2 @@ +# OK for legacy reasons +libmariadbclient18: symbols-file-contains-current-version-with-debian-revision on symbol THR_KEY_mysys@libmysqlclient_16 and 396 others diff --git a/debian/mariadb-server-10.1.README.Debian b/debian/mariadb-server-10.1.README.Debian index 80ca1d308c..3d3ad65e88 100644 --- a/debian/mariadb-server-10.1.README.Debian +++ b/debian/mariadb-server-10.1.README.Debian @@ -1,11 +1,19 @@ * MYSQL WON'T START OR STOP?: ============================= +The most common reasons the server does not start are: +- AppArmor is enforced and something is wrong with the confinement profile. +- Process supervisor scripts (init, systemd etc) fail to execute normally. +- The configuration in /etc/mysql/... is wrong and prevents server from running. + First check the contents of syslog (or systemd journal) and then check the logs at /var/log/mysql/ for any hints of what might be wrong. +Examples: + grep mysql /var/log/syslog + journalctl -u mariadb + * NATIVE SYSTEMD SERVICE INTRODUCED IN MARIADB 10.1 =================================================== - From MariaDB 10.1 onwards the upstream mariadb.service and mariadb@.service are used to provide the full systemd experience. Some features available in traditional /etc/init.d/mysql have been changed. For details see @@ -13,7 +21,6 @@ https://mariadb.com/kb/en/mariadb/systemd/ * MIXING PACKAGES FROM MARIAD.ORG AND OFFICIAL DEBIAN REPOSITORIES ================================================================== - Please note that the MariaDB packaging in official Debian repositories are of a completely new generation compared to the legacy packaging used in MariaDB.org repositories. You cannot mix and match MariaDB 10.1 packages from official @@ -27,7 +34,6 @@ revision string. * ROOT USER AUTHENTICATION VIA UNIX SOCKET ========================================== - On new installs no root password is set and no debian-sys-maint user is created anymore. Instead the MariaDB root account is set to be authenticated using the unix socket, e.g. any mysqld invocation by root or via sudo will @@ -41,7 +47,29 @@ The credentials in /etc/mysql/debian.cnf specify the user which is used by the init scripts to stop the server and perform logrotation. This used to be the debian-sys-maint user which is no longer used as root can run directly. -If you have start/stop problems make sure that the /etc/mysql/debian.cnf file specifies the root user and no password. +If you have start/stop problems make sure that the /etc/mysql/debian.cnf file +specifies the root user and no password. + +* MARIADB IS SECURE BY DEFAULT +============================== + +MariaDB in Debian is secure by default, because: + +- It only listens to the localhost socket and cannot be accessed remotely unless + the sysadmin changes the configurationin /etc/mysql to allow so. +- There is no debian-sys-maint with password in /etc/mysql/debian.cnf anymore. +- There is no root account with password anymore. The system admin needs to + create one themselves if they need it. With no password, all issues related + to password management and password leaking are gone. Sysadmins can access + the database without a password simply by running 'sudo mysql' thanks to + socket based authentication, which detects the system root user and allows + them to use the mysqld console as the mysql root user. For details see + https://www.slideshare.net/ottokekalainen/less-passwords-more-security-unix-socket-authentication-and-other-mariadb-hardening-tips +- There is no test database nor test accounts in the out-of-the-box Debian + installation. + +Therefore there is also no need to run the 'mysql_secure_installation'. In fact +that script will try to do things that are already prevented, and might fail. * WHAT TO DO AFTER UPGRADES: ============================ @@ -49,12 +77,18 @@ The privilege tables are automatically updated so all there is left is read the release notes on https://mariadb.com/kb/en/release-notes/ to see if any changes affect custom apps. +There should not be any need to run 'mysql_upgrade' manually, as the upgrade +scripts do that automatically. + * WHAT TO DO AFTER INSTALLATION: ================================ The MySQL manual describes certain steps to do at this stage in a separate -chapter. They are not necessary as the Debian packages does them +chapter. They are not necessary as the Debian packages does them automatically. +There should not be any need to run 'mysql_install_db' manually, as the install +scripts do that automatically. + The only thing that is left over for the admin is - creating new users and databases - read the rest of this text @@ -73,7 +107,7 @@ https://mariadb.com/kb * PASSWORDS: ============ It is recommended you create additional admin users for your database -adminstration needs in addition to the default root user. +administration needs in addition to the default root user. If your local unix account is the one you want to have local super user access on your database with you can create the following account that will @@ -107,7 +141,7 @@ scripts, that use /etc/mysql/debian.cnf, will use the username that every change you make in the /root/.my.cnf will affect the mysql cron script, too. - # an example of $HOME/.my.cnf + # an example of $HOME/.my.cnf [client] user = your-mysql-username password = enter-your-good-new-password-here @@ -130,7 +164,7 @@ You might get lucky downgrading a few minor versions without issued. Take a backup first. If you break it you get to keep both pieces. Do a restore from backup or upgrade to the previous version. -If doing a major version downgrade, take a mysqldump/mydumpber consistent +If doing a major version downgrade, take a mysqldump/mariabackup consistent backup using the current version and reload after downgrading and purging existing databases. diff --git a/debian/patches/libmariadbclient-rename.patch b/debian/patches/libmariadbclient-rename.patch index 6c852581ee..a2528d558a 100644 --- a/debian/patches/libmariadbclient-rename.patch +++ b/debian/patches/libmariadbclient-rename.patch @@ -28,8 +28,8 @@ Subject: libmariadbclient-rename MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test) SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS") --TARGET_LINK_LIBRARIES(mysqltest mysqlclient pcre pcreposix) -+TARGET_LINK_LIBRARIES(mysqltest mariadbclient pcre pcreposix) +-TARGET_LINK_LIBRARIES(mysqltest mysqlclient pcreposix pcre) ++TARGET_LINK_LIBRARIES(mysqltest mariadbclient pcreposix pcre) SET_TARGET_PROPERTIES(mysqltest PROPERTIES ENABLE_EXPORTS TRUE) diff --git a/debian/patches/mips-compilation-failure-__bss_start-symbol-miss.patch b/debian/patches/mips-compilation-failure-__bss_start-symbol-miss.patch new file mode 100644 index 0000000000..1f44e3b396 --- /dev/null +++ b/debian/patches/mips-compilation-failure-__bss_start-symbol-miss.patch @@ -0,0 +1,72 @@ +From 8c1608a68c57c98cdd695996d44663faca01ddd3 Mon Sep 17 00:00:00 2001 +From: Vicentiu Ciorbaru +Date: Wed, 28 Nov 2018 18:01:04 +0200 +Subject: [PATCH] Fix mips compilation failure (__bss_start symbol missing) + +__bss_start symbol fails to link if -lsystemd is used. There is no +obvious reason why this happens but the code using it is only relevant +when doing a crash report and it is covered through a separate print +statement anyway (used to print THD->query()). + +To fix the compilation problem, just check if we will link with systemd +before checking __bss_start symbol, and add -lsystemd as a required library. +This will reproduce the compilation environment used for the final binary +and will correctly detect if __bss_start will be available or not. +--- + CMakeLists.txt | 4 ++-- + cmake/systemd.cmake | 2 ++ + configure.cmake | 3 +++ + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 53d67813b5c..b6300d28b2d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -318,6 +318,8 @@ ELSE() + SET(DEFAULT_TMPDIR "\"${TMPDIR}\"") + ENDIF() + ++CHECK_SYSTEMD() ++ + # Run platform tests + INCLUDE(configure.cmake) + +@@ -350,8 +352,6 @@ CHECK_JEMALLOC() + + CHECK_PCRE() + +-CHECK_SYSTEMD() +- + IF(CMAKE_CROSSCOMPILING) + SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build") + INCLUDE(${IMPORT_EXECUTABLES}) +diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake +index 692d4df9f26..61ff6e8812b 100644 +--- a/cmake/systemd.cmake ++++ b/cmake/systemd.cmake +@@ -15,6 +15,8 @@ + + INCLUDE(FindPkgConfig) + # http://www.cmake.org/cmake/help/v3.0/module/FindPkgConfig.html ++INCLUDE(CheckFunctionExists) ++INCLUDE(CheckIncludeFiles) + + MACRO(CHECK_SYSTEMD) + IF(UNIX) +diff --git a/configure.cmake b/configure.cmake +index b036d457294..b2d8fbcdb9e 100644 +--- a/configure.cmake ++++ b/configure.cmake +@@ -130,6 +130,9 @@ IF(UNIX) + + LIST(APPEND CMAKE_REQUIRED_LIBRARIES + ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO}) ++ IF (HAVE_SYSTEMD) ++ LIST(APPEND CMAKE_REQUIRED_LIBRARIES -lsystemd) ++ ENDIF() + # Need explicit pthread for gcc -fsanitize=address + IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=") + SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} pthread) +-- +2.19.2 + diff --git a/debian/patches/mytop-merge_src:mytop_improvements.patch b/debian/patches/mytop-merge_src:mytop_improvements.patch index c28d90f786..581fef7116 100644 --- a/debian/patches/mytop-merge_src:mytop_improvements.patch +++ b/debian/patches/mytop-merge_src:mytop_improvements.patch @@ -6,8 +6,6 @@ Subject: mytop-merge_src:mytop_improvements scripts/mytop.sh | 184 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 132 insertions(+), 52 deletions(-) -diff --git a/scripts/mytop.sh b/scripts/mytop.sh -index 17a87e9..e8cc902 100644 --- a/scripts/mytop.sh +++ b/scripts/mytop.sh @@ -15,6 +15,7 @@ mytop - display MariaDB server performan @@ -172,7 +170,7 @@ index 17a87e9..e8cc902 100644 - printf(" Sorts: %5.0f qps now: %4.0f Slow qps: %3.1f Threads: %4.0f (%4.0f/%4.0f) %02.0f/%02.0f/%02.0f/%02.0f\n", + printf(" Sorts: %6.0f qps now: %4.0f Slow qps: %3.1f Threads: %4.0f (%4.0f/%4.0f) %02.0f/%02.0f/%02.0f/%02.0f\n", - ( $STATUS{Sort_rows} - $OLD_STATUS{Sort_rows} ) / $t_delta, + ( $STATUS{Sort_rows} - $OLD_STATUS{Sort_rows} ) / $t_delta, ( $STATUS{Questions} - $OLD_STATUS{Questions} ) / $t_delta, ( # slow now (qps) @@ -1020,7 +1062,7 @@ sub GetData() @@ -213,7 +211,7 @@ index 17a87e9..e8cc902 100644 if (defined($data->{Master_Host})) { if (defined($data->{Seconds_Behind_Master})) -@@ -1210,6 +1252,11 @@ sub GetData() +@@ -1211,6 +1253,11 @@ sub GetData() # my $host = $thread->{Host}; my $host = gethostbyaddr(inet_aton($thread->{Host}), AF_INET); # $host =~ s/^([^.]+).*/$1/; @@ -225,7 +223,7 @@ index 17a87e9..e8cc902 100644 $thread->{Host} = $host; } -@@ -1233,18 +1280,19 @@ sub GetData() +@@ -1234,18 +1281,19 @@ sub GetData() ## break EXPLAIN if you try to explain a mangled query. It ## may be re-enabled later as an option. @@ -252,7 +250,7 @@ index 17a87e9..e8cc902 100644 ## stow it in the cache $qcache{$thread->{Id}} = $thread->{Info}; -@@ -1371,7 +1419,7 @@ sub GetInnoDBStatus() +@@ -1372,7 +1420,7 @@ sub GetInnoDBStatus() } } @@ -261,7 +259,7 @@ index 17a87e9..e8cc902 100644 open P, "|$config{pager}" or die "$!"; print keys %{$data[0]}; -@@ -1722,7 +1770,7 @@ Help for mytop version $main::VERSION by +@@ -1723,7 +1771,7 @@ Help for mytop version $main::VERSION by e - explain the query that a thread is running E - display current replication error f - show full query info for a given thread @@ -270,7 +268,7 @@ index 17a87e9..e8cc902 100644 h - show only a specifc host's connections H - toggle the mytop header i - toggle the display of idle (sleeping) threads -@@ -1737,7 +1785,7 @@ Help for mytop version $main::VERSION by +@@ -1738,7 +1786,7 @@ Help for mytop version $main::VERSION by r - reset the status counters (via FLUSH STATUS on your server) R - change reverse IP lookup s - change the delay between screen updates @@ -279,7 +277,7 @@ index 17a87e9..e8cc902 100644 t - switch to thread view (default) u - show only a specific user V - show variables -@@ -1745,7 +1793,7 @@ Help for mytop version $main::VERSION by +@@ -1746,7 +1794,7 @@ Help for mytop version $main::VERSION by ! - Skip an error that has stopped replications (at your own risk) L - show full queries (do not strip to terminal width) @@ -288,7 +286,7 @@ index 17a87e9..e8cc902 100644 This version comes as part of the ${GREEN}MariaDB${RESET} distribution. ]; -@@ -1805,6 +1853,9 @@ sub Hashes($) +@@ -1806,6 +1854,9 @@ sub Hashes($) sub Execute($) { my $sql = shift; @@ -298,7 +296,7 @@ index 17a87e9..e8cc902 100644 my $sth = $dbh->prepare($sql); if (not $sth) { ReadMode($RM_RESET); die $DBI::errstr; } -@@ -1861,7 +1912,7 @@ B [options] +@@ -1862,7 +1913,7 @@ B [options] =head1 AVAILABILITY @@ -307,7 +305,7 @@ index 17a87e9..e8cc902 100644 This version comes as part of the B distribution. See B. -@@ -1875,6 +1926,7 @@ In order for B to function proper +@@ -1876,6 +1927,7 @@ In order for B to function proper following: * Perl 5.005 or newer @@ -315,7 +313,7 @@ index 17a87e9..e8cc902 100644 * Getopt::Long * DBI and DBD::mysql * Term::ReadKey from CPAN -@@ -2016,46 +2068,49 @@ have two dashes `--'. Short arguments on +@@ -2017,46 +2069,49 @@ have two dashes `--'. Short arguments on =over @@ -377,7 +375,7 @@ index 17a87e9..e8cc902 100644 If you're running B on the same host as MariaDB, you may wish to have it use the MariaDB socket directly rather than a standard TCP/IP -@@ -2070,7 +2125,7 @@ Default: none. +@@ -2071,7 +2126,7 @@ Default: none. =item B<--header> or B<--noheader> @@ -386,7 +384,7 @@ index 17a87e9..e8cc902 100644 with the B key while B is running. Default: header. -@@ -2096,7 +2151,7 @@ Default: idle. +@@ -2097,7 +2152,7 @@ Default: idle. Specify if you want to be prompted to type in your database password. This provides a little bit more security since it not only prevents the password from viewable in a process list, but also doesn't require @@ -395,7 +393,7 @@ index 17a87e9..e8cc902 100644 You will B be prompted if a password has not been specified in your config file or through another command line option. -@@ -2110,6 +2165,27 @@ with hostnames but toggling this option. +@@ -2111,6 +2166,27 @@ with hostnames but toggling this option. Default: noresolve @@ -423,7 +421,7 @@ index 17a87e9..e8cc902 100644 =back Command-line arguments will always take precedence over config file -@@ -2153,6 +2229,13 @@ you want them to, of course). +@@ -2154,6 +2230,13 @@ you want them to, of course). You may have white space on either side of the C<=> in lines of the config file. @@ -437,7 +435,7 @@ index 17a87e9..e8cc902 100644 =head2 Shortcut Keys The following keys perform various actions while B is -@@ -2204,8 +2287,8 @@ running queries appear at the top of the +@@ -2205,8 +2288,8 @@ running queries appear at the top of the =item B @@ -448,7 +446,7 @@ index 17a87e9..e8cc902 100644 summarize that data rather than producing raw output. =item B -@@ -2258,8 +2341,8 @@ Show only threads owned by a giver user. +@@ -2259,8 +2342,8 @@ Show only threads owned by a giver user. The B key has a command-line counterpart: B<-s>. @@ -459,7 +457,7 @@ index 17a87e9..e8cc902 100644 =head1 BUGS -@@ -2292,9 +2375,6 @@ width. If you have fairly long database/ +@@ -2293,9 +2376,6 @@ width. If you have fairly long database/ may appear odd. I have no good idea as to how best to deal with that yet. Suggestions are welcome. @@ -469,7 +467,7 @@ index 17a87e9..e8cc902 100644 You should be able to specify the columns you'd like to see in the display and the order in which they appear. If you only have one username that connects to your database, it's probably not worth -@@ -2411,12 +2491,12 @@ terminals don't freak out. +@@ -2412,12 +2492,12 @@ terminals don't freak out. =item jon r. luini diff --git a/debian/patches/remove_rename_mariadb-server_files_in.patch b/debian/patches/remove_rename_mariadb-server_files_in.patch index 2169c7200d..1256c8dbbe 100644 --- a/debian/patches/remove_rename_mariadb-server_files_in.patch +++ b/debian/patches/remove_rename_mariadb-server_files_in.patch @@ -8,7 +8,7 @@ Subject: remove_rename_mariadb-server_files_in --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -450,12 +450,6 @@ CONFIGURE_FILE( +@@ -456,12 +456,6 @@ CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/cmake/info_macros.cmake.in ${CMAKE_BINARY_DIR}/info_macros.cmake @ONLY) diff --git a/debian/patches/scripts__mysql_install_db.sh__no_test.patch b/debian/patches/scripts__mysql_install_db.sh__no_test.patch index 7bc74efcb5..68d30932d1 100644 --- a/debian/patches/scripts__mysql_install_db.sh__no_test.patch +++ b/debian/patches/scripts__mysql_install_db.sh__no_test.patch @@ -13,7 +13,7 @@ Subject: scripts__mysql_install_db.sh__no_test --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh -@@ -419,7 +419,7 @@ then +@@ -429,7 +429,7 @@ then fi # Create database directories diff --git a/debian/patches/series b/debian/patches/series index 5961c896e9..ebd33058a1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -21,3 +21,4 @@ kFreeBSD-gettid.patch mips-innobase-atomic.patch mytop-merge_src:mytop_improvements.patch Add_default_ExecStartPre_to_mariadb@.service.patch +mips-compilation-failure-__bss_start-symbol-miss.patch diff --git a/debian/rules b/debian/rules index 86c1ab4d87..1a424297a6 100755 --- a/debian/rules +++ b/debian/rules @@ -69,7 +69,7 @@ override_dh_auto_configure: dh_testdir mkdir -p $(BUILDDIR) && cd $(BUILDDIR) && \ - sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/usr/local/bin:/usr/bin:/bin"} \ + sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin"} \ CC=${CC} \ CXX=${CXX} \ cmake -DCMAKE_INSTALL_PREFIX=/usr \ @@ -101,7 +101,7 @@ override_dh_auto_test: [ ! -f debian/unstable-tests.$(DEB_HOST_ARCH) ] || cat debian/unstable-tests.$(DEB_HOST_ARCH) >> mysql-test/unstable-tests # Run testsuite ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) - cd $(BUILDDIR)/mysql-test && ./mtr --force --testcase-timeout=30 --suite-timeout=540 --retry=3 --parallel=$(NUMJOBS) --skip-test-list=unstable-tests || $(TESTSUITE_FAIL_CMD) ; + cd $(BUILDDIR)/mysql-test && ./mtr --force --testcase-timeout=30 --suite-timeout=540 --retry=3 --parallel=$(NUMJOBS) --skip-rpl --suite=main --skip-test-list=unstable-tests || $(TESTSUITE_FAIL_CMD) ; endif override_dh_auto_install: diff --git a/debian/tests/upstream b/debian/tests/upstream index 3c9da1d9ae..2ac0d20b86 100644 --- a/debian/tests/upstream +++ b/debian/tests/upstream @@ -27,6 +27,14 @@ main.ctype_uca : Requires writable /usr rpl.rpl_gtid_mode : Requires starting server as root ref http://bugs.mysql.com/bug.php?id=70517 EOF +# Skip tests that cannot run properly on Gitlab-CI +if [ ! -z "$GITLAB_CI" ] +then + cat >> $SKIP_TEST_LST << EOF +main.mysqld--help : For unknown reason table-cache is 4000 instead of default 421 +EOF +fi + ARCH=$(dpkg --print-architecture) if [ "$ARCH" = "s390x" ]; then echo "main.func_regexp_pcre : recursion fails on s390x https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1723947" >> $SKIP_TEST_LST diff --git a/debian/unstable-tests.s390x b/debian/unstable-tests.s390x index 97d90f7747..34ee8513a1 100644 --- a/debian/unstable-tests.s390x +++ b/debian/unstable-tests.s390x @@ -15,3 +15,4 @@ rpl.rpl_row_sp001 : MDEV-9329 rpl.rpl_insert : MDEV-9329 rpl.rpl_insert_delayed : MDEV-9329 main.delayed : https://jira.mariadb.org/browse/MDEV-9679 +unit.pcre_test : MDEV-17865