#---------------------------------------------------------------------------- # build_mysql.txt - how to build the mysql binaries and create folder and packages # # Creation : 2011-07-17 holbru # Last update: $Id$ # # !!! this is not a script but an step-by-step howto !!! #---------------------------------------------------------------------------- exit 1 ### download the source code from the internet, e.g. # ftp://mirror.switch.ch/mirror/mysql/Downloads/ # https://downloads.mariadb.com/archive/index/p/mysql/v/ # https://downloads.mariadb.org/ # https://mariadb.org/mariadb/all-releases # mysql-5.1.58.tar.bz2 ### extract file in a temporary location tar -xjvf mysql-5.1.58.tar.bz2 cd mysql-5.1.58 # 2012-02-09 mysql-5.1.61 erforderlich ist der patch signal_handler.diff # 2012-04-06 -> mysql-5.1.62 mit patch wie vor # 2012-06-06 -> mysql-5.1.63 der halbe patch wird noch benoetigt, dass Komma ',' # 2012-09-02 -> mysql-5.1.65 der halbe patch wird noch benoetigt, dass Komma ',' # 2012-10-04 -> mysql-5.1.66 der halbe patch wird noch benoetigt, dass Komma ',' # 2013-01-12 -> mysql-5.1.67 LibC-2.8 ohne Patch ;-) # 2013-02-06 -> mysql-5.1.68 # 2013-05-13 -> mysql-5.1.69 -> ohne Release # 2013-06-07 -> mysql-5.1.70 # 2013-06-08 tool (list-mysql.cui) neu uebersetzt # 2013-06-11 tools (libmysql-addon.so.2.0.0, mysqllib-2) neu von Daniel # 2013-06-12 tools (rotation, udate2str, lastfile) neu uebersetzt # 2013-08-10 -> mysql-5.1.71 # 2013-10-21 -> mysql-5.1.72 # 2013-12-04 -> mysql-5.1.73 # rebuild old version # 2016-02-07 -> mysql-5.1.73 # build with rpm # mysql-5.1.73-2.1.src.rpm # 2016-02-07 -> mysql-5.1.51 # build with rpm # mysql-5.1.51-2.1.src.rpm # 2016-02-07 -> mysql-4.1.22 # build with rpm # MySQL-4.1.22-0.glibc23.src.rpm # rebuild old version # 2017-05-15 -> mysql-5.1.73 # build with rpm # mysql-5.1.73-2.1.src.rpm # activate ssl support # 2017-05-28 -> mysql-5.1.73 # rebuild with default to /usr/lib/mysql/5173 # 2017-05-28 -> mysql-5.1.73 # rebuild with correct share path # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # http://www.koscheblog.de/mysql-auf-mariadb-migrieren/ # https://kb.askmonty.org/en/compiling-mariadb-from-source/ # hbfl # 2017-05-07 -> mriadb-5.5.56 # build with rpm # mariadb-5.5.56-2.2.src.rpm # mysql_secure_installation muss angepasst werden # hbfl # 2017-06-07 -> mysql-4.1.22 # build with rpm # MySQL-4.1.22-1.ssl.src.rpm # rebuild with default to /usr/lib/mysql/4122 # rebuild with SSL and new path # hbfl # 2017-06-08 -> mysql-5.1.73 # rebuild with correct static-build # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2017-06-08 -> mysql-4.1.22 # build with rpm # MySQL-4.1.22-1.ssl.src.rpm # rebuild with ssl and new path # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2017-06-10 -> mysql-5.1.51 # build with rpm # mysql-5.1.51-2.1.src.rpm # rebuild with ssl and new path # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2017-06-11 -> mariadb-10.0.30 # build with rpm Suse # mariadb-10.0.30-20.4.1.src.rpm # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2017-08-29 -> maraidb-5.5.57 # build with rpm # mariadb-5.5.57-2.2.src.rpm # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2017-09-01 -> maraidb-10.0.32 # build with rpm # mariadb-10.0.32-23.1.src.rpm # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2018-04-20 -> mariadb-10.2.13 # build with rpm Suse # mariadb-10.2.13-2.1.src.rpm # patch for lz4 and atomic # https://mariadb.com/kb/en/library/lz4_libs-not-found-centos7-mariadb-10129-solved # wget https://github.com/lz4/lz4/archive/v1.7.5.tar.gz # tar -zxvf v1.7.5.tar.gz # mv lz4-1.7.5 /path-to-mariadb-source/storage/mroonga/vendor/groonga/vendor/ # # Then add the following option to your cmake command line: # # -DGRN_WITH_BUNDLED_LZ4=ON # hbfl # 2018-06-01 -> mariadb-10.2.15 # build with rpm Suse # mariadb-10.2.15-1.1.src.rpm # patches wie vor # hbfl # 2018-08-11 -> mariadb-10.2.16 # build with rpm Suse # mariadb-10.2.16-2.1.src.rpm # patches wie vor # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2018-09-08 -> mariadb-10.2.17 # build with rpm Suse # mariadb-10.2.17-1.1.src.rpm # patches wie vor # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2018-10-22 -> mariadb-10.2.18 # build with rpm Suse # mariadb-10.2.18-1.2.src.rpm # patches wie vor # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2018-12-21 -> mariadb-10.2.19 # build with rpm Suse # mariadb-10.2.19-2.1.src.rpm # patches wie vor # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2019-02-17 -> mariadb-10.2.21 # build with rpm Suse # mariadb-10.2.21-1.2.src.rpm # patches wie vor # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2019-03-08 -> mariadb-10.2.22 # build with rpm Suse # mariadb-10.2.22-1.1.src.rpm # patches wie vor # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2019-04-08 -> mariadb-10.2.23 # build with rpm Suse # mariadb-10.2.23-1.1.src.rpm # patches wie vor # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2019-06-03 -> mariadb-10.2.24 # build with rpm Suse # mariadb-10.2.24-1.2.src.rpm # patches wie vor # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2019-10-23 -> mariadb-10.3.18 # build with rpm Suse # mariadb-10.3.18-1.2.src.rpm # patches wie vor # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2019-11-24 -> mariadb-10.3.20 # build with rpm Suse # mariadb-10.3.20-1.1.src.rpm # patches wie vor # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2020-05-30 -> mariadb-10.4.12 # build with rpm Suse -> gcc9 -> glibc-2.31 # mariadb-10.4.12-7.1.src.rpm # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2020-06-01 -> mariadb-10.4.13 # build with rpm based on suse # mariadb-10.4.13-1.1.src.rpm # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # !!!!!!!mysql_install_db -- bearbeiten!!!!!!!! # mysqldump bug 10.4. # https://jira.mariadb.org/browse/MDEV-22127 # hbfl # 2020-06-08 -> mariadb-10.3.23 # build with rpm based on mariadb-10.3.20 # mariadb-10.3.23-1.1.src.rpm # patches wie vor # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # 2021-05-12 -> mariadb-10.3.29 # build with rpm based on mariadb-10.3.20 # mariadb-10.3.29-1.1.src.rpm # patches wie vor, leicht bearbeitet # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # hbfl # https://downloads.mariadb.com/MariaDB/mariadb-10.3.34/source/mariadb-10.3.34.tar.gz # 2022-04-03 -> mariadb-10.3.34 # build with rpm based on mariadb-10.3.20 -> gcc-10 -> glibc-2.33 # mariadb-10.3.34-1.1.src.rpm # patches wie vor, leicht bearbeitet # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # splitt out pam_user_map # hbfl # https://downloads.mariadb.com/MariaDB/mariadb-10.3.39/source/mariadb-10.3.39.tar.gz # 2023-08-27 -> mariadb-10.3.39 -> EOL # build with rpm based on mariadb-10.3.20 -> gcc-12 -> glibc-2.37 # mariadb-10.3.39-1.1.src.rpm # patches wie vor, leicht bearbeitet # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # splitt out pam_user_map # worked only with libssl1_1, installed dev source by hand from rpm tarball # hbfl # https://downloads.mariadb.com/MariaDB/mariadb-10.2.44/source/mariadb-10.2.44.tar.gz # 2023-10-08 -> mariadb-10.2.44 -> EOL # build with rpm based on mariadb-10.2.24-> gcc-12 -> glibc-2.37 # mariadb-10.2.44-1.2.src.rpm # patches wie vor, leicht bearbeitet # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # worked only with libssl1_1, installed # hbfl # https://downloads.mariadb.com/MariaDB/mariadb-5.5.68/source/mariadb-5.5.68.tar.gz # 2023-10-10 -> maraidb-5.5.68 -> EOL # build with rpm based on mariadb 5.5.46 -> gcc-12 -> glibc-2.37 # mariadb-5.5.68-2.2.src.rpm # patches included # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # worked only with libssl1_0_0, installed # hbfl # https://downloads.mariadb.com/MariaDB/mariadb-10.0.38/source/mariadb-10.0.38.tar.gz # 2023-10-10 -> maraidb-10.0.38 -> EOL # build with rpm based on mariadb 10.0.31 -> gcc-12 -> glibc-2.37 # mariadb-10.0.32-23.1.src.rpm # patches included # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # worked only with libssl1_0_0, installed # hbfl # https://downloads.mariadb.com/MariaDB/mariadb-11.0.2/source/mariadb-11.0.2.tar.gz # 2023-10-16 -> mariadb-11.0.2 # build with rpm suse -> gcc-12 -> glibc-2.37 # mariadb-11.0.2-1.1.src.rpm # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # rebuild old version, patches by dv # 2023-10-18 -> mysql-5.1.73 -> EOL # build with rpm -> gcc-12 -> glibc-2.37 # mysql-5.1.73-2.2.src.rpm # activate ssl support # rebuild with default to /usr/lib/mysql/5173 # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # worked only with libssl1_0_0, installed # rebuild old version, patches by dv # 2023-10-29 -> mysql-4.1.22 -> EOL # build with rpm -> gcc-12 -> glibc-2.37 # mysql-4.1.22-2.ssl.src.rpm # activate ssl support # rebuild with default to /usr/lib/mysql/4122 # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! # worked only with libssl1_0_0, installed # hbfl # https://downloads.mariadb.com/MariaDB/mariadb-11.0.6/source/mariadb-11.0.6.tar.gz # 2024-07-25 -> mariadb-11.0.6 # build with rpm based on mariadb-11.0.2 # mariadb-11.0.6-1.1.src.rpm # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!!! - hbfl # 2024-11-08 -> mariadb-11.4.4 # build with rpm based on mariadb-11.4.2 # mariadb-11.4.4-1.1.src.rpm # !!!!!!!mysql_secure_installation -- bearbeiten!!!!!!! # change %{_libdir} # %files client -f mariadb-client.files # %dir /usr/lib/mysql # https://mariadb.com/kb/en/getting-the-mariadb-source-code/ # https://github.com/MariaDB/server/tags # brp-check-rpm deinstallieren # cracklib-dev " # libcurl-dev " # libzstd-dev " # libnuma-dev deinstallieren ### build export CFLAGS='-O2 -march=i486' export CXXFLAGS="${CFLAGS}" mkdir build && cd build ../configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --with-mysqld-ldflags='-shared' \ --with-client-ldflags='-shared' \ --enable-assembler \ --enable-local-infile \ --with-fast-mutexes \ --with-mysqld-user=mysql \ --with-unix-socket-path=/var/lib/mysql/mysql.sock \ --with-pic \ --with-extra-charsets=all \ --exec-prefix=/usr/local/mysql \ --libexecdir=/usr/local/mysql/bin \ --libdir=/usr/lib \ --sysconfdir=/etc \ --datadir=/usr/share \ --localstatedir=/var/lib/mysql \ --infodir=/usr/share/info \ --includedir=/usr/include \ --mandir=/usr/share/man \ --enable-thread-safe-client \ --without-readline \ --with-big-tables \ --with-plugins=max-no-ndb \ --with-comment="eisfair-1 build" \ --enable-shared make make check make DESTDIR=/public/database/mysql/5.1.73 install # strip files/binarys for filename in `find /public/database/mysql/5.1.71/usr/{lib/mysql/{*.so.*,plugin/*.so.*},local/mysql/bin/} -type f` do echo $filename strip -R .note -R .comment "$filename" done -+++++-+-+-+-+--+-+-+-+--+- # 2016-01-26 -> mysql-5.1.51 # build for schuetz statisch export CFLAGS='-O2 -march=i486' export CXXFLAGS="${CFLAGS}" mkdir build && cd build # build static ../configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --enable-assembler \ --enable-local-infile \ --with-fast-mutexes \ --with-mysqld-user=mysql \ --with-unix-socket-path=/var/lib/mysql/mysql.sock \ --with-pic \ --with-extra-charsets=all \ --exec-prefix=/usr/local/mysql \ --libexecdir=/usr/local/mysql/bin \ --libdir=/usr/lib \ --sysconfdir=/etc \ --datadir=/usr/share \ --localstatedir=/var/lib/mysql \ --infodir=/usr/share/info \ --includedir=/usr/include \ --mandir=/usr/share/man \ --enable-thread-safe-client \ --without-readline \ --with-big-tables \ --with-plugins=max-no-ndb \ --with-comment="eisfair-1 build\ --disable-shared" make make check make DESTDIR=/build/public/database/mysql/5.1.51 install # strip files/binarys for filename in `find /public/database/mysql/5.1.51/usr/{lib/mysql/{*.so.*,plugin/*. do echo $filename strip -R .note -R .comment "$filename" done # copy files cp *** <svn-root>/lib/mysql/bin_**_mysql_5_1_58/*** #---------------------------------------------------------------------------- create folder Um die Folder im Hauptverszeichnis zu erstellen gibt es das Script 'mysql-folder.sh' unter mysql/_ADMIN/ mit mysql-folder.sh -v 5.1.58 -w create wird die folder Struktur fuer die lib Version 5.1.58 erstellt nun koennen die files aus dem compilat eingefuegt werden. mit mysql-folder.sh -v 5.1.58 -w add wird ein svn add auf die erzeugten Folder durchgefuehrt. mit mysql-folder.sh -v 5.1.58 -w list wird fuer jeden Folder die files-list.txt erzeugt, add muss zwingend vorher ausgefuehrt worden sein mit mysql-folder.sh -v 5.1.58 -w ci erfolgt der commit der erzeugten Folder In den eis und eis_dev Foldern muessen keine Anpassungen vorgenommen werden. Diese Anpassungen erfolgen beim packen der packages durch mktarball.sh mit den _do_ Scripten unter _ADMIN automatisch. In den Pack-Scripten unter _ADMIN muss dann noch die Pfadangabe geaendert werden, auf den soeben erzeugten Pfad und ein commit ausgefuehrt werden. Nach dem checkout auf eisler koennen nun die packages erzeugt werden. die wichtigsten Parameter fuer mktarball.sh sind dann -setdate now -setversion ${version} mktarball.sh - home -setdate now -setversion [version angeben] mysql mysql-dev duch die Angabe von -home werden die packages in die Folder Struktur /home/user/public_html/packages/ kopiert und koennen von da direkt auf Pack-Eis geladen werden. wichtig ist noch, dass unbedingt die 'lib' Version zuerst gebaut werden muss, da fuer die 'dev' Version Informationen aus der 'lib' Info Datei gelesen werden.