GithubHelp home page GithubHelp logo

opensuse / mysql-packaging Goto Github PK

View Code? Open in Web Editor NEW
1.0 29.0 15.0 574 KB

Mysql packaging scripts/patches and specfile used in openSUSE and SLES

License: GNU General Public License v3.0

Makefile 1.40% Shell 97.03% Perl 1.56%

mysql-packaging's Introduction

Set of tools to work with mysql/mariadb updates in openSUSE Leap

Important: Please note that openSUSE:Factory/mariadb package uses a classic OBS process and not this repository anymore. This repository is old, for the current state of mariadb package please check OBS.

This repository contains tools which allows one to maintain and develop various MariaDB/MySQL versions that are used in openSUSE Leap and supported by MariaDB or MySQL respectively.

Developement

There are multiple folders with the git repository:

  • common: contains common content shared among all versions/types
  • patches: directory containing various patches for all supported platforms
  • {mysql,mariadb}-<version>: specific overrides for the common settings defined in the above dir

In short you just create changes you desire to do and run make. The packages will be checked out from OBS, refreshed and in the end also build. If all this pass you should commit to git and to all desired OBS projects.

Maintenance updates

openSUSE released versions are to be kept updated to latest minor branch of the series. In example when doing update for mariadb-10.0.31 you should check what distros have 10.0.something in repository and resubmit to all of those.

mysql-packaging's People

Contributors

andreas-schwab avatar archon810 avatar bjoernv avatar github-devel avatar ilyaindigo avatar jengelh avatar kstreitova avatar miska avatar olafhering avatar plusky avatar rhafer avatar scarabeusiv avatar silentx1981 avatar vogtinator avatar wbtmagnum avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mysql-packaging's Issues

MySQL 5.7 does not compile with libwrap support on Tumbleweed

Currently MySQL 5.7.7-rc and 5.7.14 does not compile on openSUSE Tumbleweed (see build service logs).

I tried to update to 5.7.17 and made some small modifications on the patches. But the support for the optional libwrap support is still broken. After fixing a compile error in libwrap usage, there is still a linker error.

The updated code for 5.7.17 can be found here:
https://github.com/bjoernv/mysql-packaging

[  910s] cd /home/abuild/rpmbuild/BUILD/mysql-5.7.17/build/rapid/plugin/x && /usr/bin/c++   -DBOOST_ALL_NO_LIB -DBOOST_NO_AUTO_PTR -DHAVE_CONFIG_H -DHAVE_LIBEVENT2 -DHAVE_OPENSSL -DNGS_DISABLE_LOGGING -DUSE_MYSQLX_FULL_PROTO -DXPLUGIN_LOG_PROTOBUF -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/build/include -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/extra/rapidjson/include -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/build/libbinlogevents/include -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/libbinlogevents/export -isystem /home/abuild/rpmbuild/BUILD/mysql-5.7.17/extra/protobuf/protobuf-2.6.1/src -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/build/rapid/plugin/x -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/rapid/plugin/x/protocol/errors -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/rapid/plugin/x/src -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/rapid/plugin/x -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/rapid/plugin/x/ngs/include -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/include -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/rapid/plugin/x/include/mysql -isystem /home/abuild/rpmbuild/BUILD/mysql-5.7.17/boost/boost_1_59_0 -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/sql -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/libbinlogevents/include -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/sql/auth -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/regex -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/rapid/plugin/x/mysqlxtest_src/common  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -DPIC -fPIC -DFORCE_INIT_OF_VARS -Wno-unused-but-set-variable -fno-strict-aliasing -Wno-unused-parameter -Wno-error -felide-constructors -fPIC -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -std=gnu++03 -DDBUG_OFF    -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/build/rapid/plugin/x/generated/protobuf -I/home/abuild/rpmbuild/BUILD/mysql-5.7.17/build/rapid/plugin/x/generated/ -Wno-ignored-qualifiers -Wno-sign-compare -Wno-unused-variable -Wno-unused-but-set-parameter -Wno-unused-parameter -o CMakeFiles/mysqlxtest.dir/generated/protobuf/mysqlx_notice.pb.cc.o -c /home/abuild/rpmbuild/BUILD/mysql-5.7.17/build/rapid/plugin/x/generated/protobuf/mysqlx_notice.pb.cc
[  910s] libsql.a(socket_connection.cc.o): In function `Mysqld_socket_listener::listen_for_connection_event()':
[  910s] /home/abuild/rpmbuild/BUILD/mysql-5.7.17/sql/conn_handler/socket_connection.cc:938: undefined reference to `request_init(request_info*, ...)'
[  910s] /home/abuild/rpmbuild/BUILD/mysql-5.7.17/sql/conn_handler/socket_connection.cc:939: undefined reference to `sock_host(request_info*)'
[  910s] /home/abuild/rpmbuild/BUILD/mysql-5.7.17/sql/conn_handler/socket_connection.cc:941: undefined reference to `hosts_access(request_info*)'
[  910s] /home/abuild/rpmbuild/BUILD/mysql-5.7.17/sql/conn_handler/socket_connection.cc:948: undefined reference to `eval_client(request_info*)'
[  910s] collect2: error: ld returned 1 exit status
[  910s] make[2]: *** [sql/CMakeFiles/mysqld.dir/build.make:129: sql/mysqld] Error 1
[  910s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/mysql-5.7.17/build'
[  910s] make[1]: *** [CMakeFiles/Makefile2:7655: sql/CMakeFiles/mysqld.dir/all] Error 2
[  910s] make[1]: *** Waiting for unfinished jobs....

Split %cmake options for mariadb and mysql

As mariadb and mysql options start to diverge too much it might be good idea to actually allow for passing just the correct list to %cmake call detecting if we are either mariadb or mysql.

mysql-systemd-helper: Can't secure tmp dir '/var/tmp/mysql-protected....'

Please fix /usr/lib/mysql/mysql-systemd-helper:

--- mysql-systemd-helper.orig   2015-06-25 22:38:08.000000000 +0300
+++ mysql-systemd-helper    2015-07-28 21:26:57.591046041 +0300
@@ -84,7 +84,7 @@
        # Create a secure tmp dir
        chown --no-dereference "$mysql_daemon_user:$mysql_daemon_group" "$protected"
        chmod 0700  "$protected"
-       [[ $(ls -ld "$protected" | grep -q "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*") ]] || \
+       ls -ld "$protected" | grep -q "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*" || \
            die "Can't secure tmp dir '$protected'"

        # Run protected MySQL accessible only though socket in our directory

mysql-systemd-helper should not use --group parameter for mysqld

Problem description

The mysql-systemd-helper adds the non-existing --group parameter when starting mysqld. This results in the following problem:

group is automagically resolved to group_concat_max_len, which is therefore set to '4' (see http://bugs.mysql.com/bug.php?id=45379 for more details). Since this parameter even takes prevalence to explicit settings in my.cnf, this can lead to a broken setup and major problems when using group_concat().

Proposed solution

Please remove the offending --group parameter from the script.

GID for the mysql group is not fixed

While using MariaDB (in particular mariadb-10.0.30-28.1.x86_64) in CaaSP we have found a problem with the mysql group created at the spec file.

We are running MariaDB in a container that mounts persistent storage from the host. We need to use fixed UID and GID for the mysql user in the container, so that files created by mysql:mysql in the container appear with the same UID/GID in the host.

While the UID is hardcoded to be 60 it doesn't happen the same for the GID. We would like to know if it could be possible to create the mysql group with, for example, groupadd -r mysql -g 60 (or any other GID, as long as we could have a fixed GID).

Wait longer during startup, if mysqld is still running

I pushed a commit for old the old init scripts (openSUSE <= 13.2). It might help someone, or it might be used to create a new support update: adrium/mysql-packaging@12ccf8a

The wait time for the DB server to start is 30 seconds. In case of data corruption, recovery needs to kick in. However, when the scripts exits after 30 seconds, the server is killed prematurely during recovery.

Looking at common/mysql-systemd-helper, the wait time seems to be 60 seconds. But is this enough?

Fix building on sle12

Index: mariadb-101.spec
===================================================================
--- mariadb-101.spec    (revision 42)
+++ mariadb-101.spec    (working copy)
@@ -128,7 +128,7 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %{?systemd_requires}
 # On mariadb we want readline5 and on mysql we use libedit from system
-%if "%{name}" == "mariadb"
+%if "%{name}" == "mariadb" && (0%{?suse_version} != 1315)
 BuildRequires:  readline5-devel
 %else
 BuildRequires:  libedit-devel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.