moved into main repo for pisi 2.0

This commit is contained in:
ayhanyalcinsoy
2015-06-19 13:39:29 +03:00
parent 2450ac02c1
commit fae70ecd20
25 changed files with 1273 additions and 0 deletions
+80
View File
@@ -0,0 +1,80 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import get
from pisi.actionsapi import pisitools
from pisi.actionsapi import cmaketools
#pisitools.flags.add("-fno-strict-aliasing -DBIG_JOINS=1")
#pisitools.cflags.add("-fomit-frame-pointer")
#pisitools.cxxflags.add("-felide-constructors -fno-rtti -fno-delete-null-pointer-checks")
def setup():
#pisitools.dosed("storage/tokudb/ft-index/ft/ft-ops.cc", "LEAFENTRY leaf_entry;", "LEAFENTRY leaf_entry = 0;")
cmaketools.configure("-DBUILD_CONFIG=mysql_release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSYSCONFDIR=/etc/mysql \
-DMYSQL_DATADIR=/var/lib/mysql \
-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DENABLED_LOCAL_INFILE=ON \
-DINSTALL_INFODIR=share/mysql/docs \
-DINSTALL_MANDIR=share/man \
-DINSTALL_PLUGINDIR=lib/mysql/plugin \
-DINSTALL_SCRIPTDIR=bin \
-DINSTALL_INCLUDEDIR=include/mysql \
-DINSTALL_DOCREADMEDIR=share/mysql \
-DINSTALL_SUPPORTFILESDIR=share/mysql \
-DINSTALL_MYSQLSHAREDIR=share/mysql \
-DINSTALL_DOCDIR=share/mysql/docs \
-DINSTALL_SHAREDIR=share/mysql \
-DWITH_READLINE=ON \
-DWITH_ZLIB=system \
-DWITH_SSL=system \
-DWITH_PCRE=system \
-DWITH_LIBWRAP=OFF \
-DWITH_JEMALLOC=ON \
-DWITH_EXTRA_CHARSETS=complex \
-DWITH_EMBEDDED_SERVER=ON \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITHOUT_TOKUDB_STORAGE_ENGINE=1 \
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
-DWITHOUT_FEDERATED_STORAGE_ENGINE=1 \
-DWITHOUT_PBXT_STORAGE_ENGINE=1 \
-DCMAKE_C_FLAGS='-fPIC %s -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer -fno-delete-null-pointer-checks' \
-DCMAKE_CXX_FLAGS='-fPIC %s -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti -fno-delete-null-pointer-checks' \
-DWITH_MYSQLD_LDFLAGS='-pie %s,-z,now'" % (get.CFLAGS(), get.CXXFLAGS(), get.LDFLAGS()))
#-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc' \
def build():
cmaketools.make()
def install():
cmaketools.install("DESTDIR=%s benchdir_root=\"/usr/share/mysql\"" % get.installDIR())
# Config
pisitools.insinto("/etc/mysql", "%s/usr/share/mysql/my-medium.cnf" % get.installDIR(), "my.cnf")
pisitools.insinto("/etc/mysql", "%s/%s/scripts/mysqlaccess.conf" % (get.workDIR(), get.srcDIR()))
pisitools.insinto("/usr/bin", "%s/%s/scripts/mysql_config" % (get.workDIR(), get.srcDIR()))
# Data dir
pisitools.dodir("/var/lib/mysql")
# Documents
pisitools.dodoc("%s/%s/support-files/my-*.cnf" % (get.workDIR(), get.srcDIR()))
pisitools.dodoc("COPYING", "INSTALL-SOURCE", "README", "VERSION")
# Remove not needed files
pisitools.removeDir("/usr/data")
pisitools.removeDir("/usr/mysql-test")
pisitools.removeDir("/usr/sql-bench")
pisitools.remove("/usr/share/man/man1/mysql-test-run.pl.1")
# Remove -lprobes_mysql
#pisitools.dosed("%s/usr/bin/mysql_config" % get.installDIR(), "-lprobes_mysql")
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/python
import os, re
import shutil
OUR_ID = 794
OUR_NAME = "mysql"
OUR_DESC = "mysql"
DATADIR = "/var/lib/mysql"
DATADIRMODE = 0755
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
try:
os.system ("groupadd -g %d %s" % (OUR_ID, OUR_NAME))
os.system ("useradd -m -d /var/lib/mysql -r -s /bin/false -u %d -g %d %s -c %s" % (OUR_ID, OUR_ID, OUR_NAME, OUR_DESC))
except:
pass
os.system("/sbin/mudur_tmpfiles.py /usr/lib/tmpfiles.d/mariadb.conf")
# Create the database
os.system("/bin/chown -R mysql:mysql %s" % DATADIR)
os.system("/bin/chown -R mysql:mysql /var/log/mysqld.log")
os.system("/usr/bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql --basedir=/usr --force")
os.system("/usr/bin/mysql_upgrade --force")
# On first install...
if not os.path.exists(DATADIR):
os.makedirs(DATADIR, DATADIRMODE)
def postRemove():
try:
os.system ("userdel %s" % OUR_NAME)
os.system ("groupdel %s" % OUR_NAME)
except:
pass
+32
View File
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
from comar.service import *
import os
serviceType="server"
serviceDesc=_({"en": "MariaDB Database Server",
"tr": "MariaDB Veritabanı Sunucusu"})
PIDFILE="/run/mysqld/mysqld.pid"
DAEMON="/usr/bin/mysqld"
@synchronized
def start():
startService(command=DAEMON,
pidfile=PIDFILE,
detach=True,
donotify=True)
#os.system("pidof mariadb_server + /usr/bin/mysqld > /run/mysqld/mysqld.pid")
@synchronized
def stop():
stopService(pidfile=PIDFILE,
donotify=True)
try:
os.unlink(PIDFILE)
except OSError:
pass
def status():
return isServiceRunning(PIDFILE)
+150
View File
@@ -0,0 +1,150 @@
# The following options will be passed to all MySQL clients
[client]
#password= your_password
port= 3306
socket= /run/mysqld/mysqld.sock
[mysql]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8
[mysqladmin]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8
[mysqlcheck]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8
[mysqldump]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8
[mysqlimport]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8
[mysqlshow]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8
[myisamchk]
character-sets-dir=/usr/share/mysql/charsets
[myisampack]
character-sets-dir=/usr/share/mysql/charsets
# use [safe_mysqld] with mysql-3
[mysqld_safe]
err-log= /var/log/mysql/mysql.err
# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
[mysqld]
character-set-server= utf8
user = mysql
port = 3306
socket = /run/mysqld/mysqld.sock
pid-file = /run/mysqld/mysqld.pid
log-error = /var/log/mysql/mysqld.err
basedir = /usr
datadir = /var/lib/mysql
skip-external-locking
key_buffer = 16M
max_allowed_packet = 4M
table_open_cache = 400
sort_buffer_size = 512K
net_buffer_length = 16K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
lc_messages_dir = /usr/share/mysql
#Set this to your desired error message language
lc_messages = en_US
# security:
# using "localhost" in connects uses sockets by default
# skip-networking
bind-address = 127.0.0.1
log-bin
#log-bin = mysqld-bin
server-id = 1
# point the following paths to different dedicated disks
tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname
# you need the debug USE flag enabled to use the following directives,
# if needed, uncomment them, start the server and issue
# #tail -f /tmp/mysqld.sql /tmp/mysqld.trace
# this will show you *exactly* what's happening in your server ;)
#log = /tmp/mysqld.sql
#gdb
#debug = d:t:i:o,/tmp/mysqld.trace
#one-thread
# uncomment the following directives if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000
# the following is the InnoDB configuration
# if you wish to disable innodb instead
# uncomment just the next line
#skip-innodb
#
# the rest of the innodb config follows:
# don't eat too much memory, we're trying to be safe on 64Mb boxes
# you might want to bump this up a bit on boxes with more RAM
innodb_buffer_pool_size = 128M
#
# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-(
# and upstream wants things to be under /var/lib/mysql/, so that's the route
# we have to take for the moment
#innodb_data_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
#innodb_log_group_home_dir = /var/lib/mysql/
# you may wish to change this size to be more suitable for your system
# the max is there to avoid run-away growth on your machine
innodb_data_file_path = ibdata1:10M:autoextend:max:128M
# we keep this at around 25% of of innodb_buffer_pool_size
# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
innodb_log_file_size = 48M
# this is the default, increase it if you have very large transactions going on
innodb_log_buffer_size = 8M
# this is the default and won't hurt you
# you shouldn't need to tweak it
innodb_log_files_in_group=2
# see the innodb config docs, the other options are not always safe
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
innodb_file_per_table
# Uncomment this to get FEDERATED engine support
#plugin-load=federated=ha_federated.so
loose-federated
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
# uncomment the next directive if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
[mariadb]
@@ -0,0 +1 @@
d /run/mysqld 0755 mysql mysql -
+216
View File
@@ -0,0 +1,216 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>mariadb</Name>
<Homepage>https://mariadb.org</Homepage>
<Packager>
<Name>Pisi Linux Admins</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>GPLv2</License>
<IsA>app:console</IsA>
<Summary>MariaDB is a drop-in replacement for MySQL</Summary>
<Description>MariaDB strives to be the logical choice for database professionals looking for a robust, scalable, and reliable SQL server.</Description>
<Archive sha1sum="240253b3ee21dea5e2f501778e8ee72b32a5d052" type="targz">ftp://ftp.ulak.net.tr/pub/MariaDB/mariadb-10.0.17/source/mariadb-10.0.17.tar.gz</Archive>
<BuildDependencies>
<Dependency>libaio-devel</Dependency>
<Dependency>unixODBC-devel</Dependency>
</BuildDependencies>
<Patches>
</Patches>
</Source>
<Package>
<Name>mariadb-lib</Name>
<IsA>app:console</IsA>
<IsA>library</IsA>
<Summary>The shared libraries required for MariaDB clients</Summary>
<RuntimeDependencies>
<Dependency>libaio</Dependency>
<Dependency>unixODBC</Dependency>
</RuntimeDependencies>
<Replaces>
<Package>mysql-lib</Package>
</Replaces>
<Files>
<Path fileType="executable">/usr/bin/mysql_config</Path>
<Path fileType="header">/usr/include</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="data">/usr/share/mysql/charsets</Path>
<Path fileType="data">/usr/share/mysql/czech</Path>
<Path fileType="data">/usr/share/mysql/danish</Path>
<Path fileType="data">/usr/share/mysql/dutch</Path>
<Path fileType="data">/usr/share/mysql/english</Path>
<Path fileType="data">/usr/share/mysql/estonian</Path>
<Path fileType="data">/usr/share/mysql/french</Path>
<Path fileType="data">/usr/share/mysql/german</Path>
<Path fileType="data">/usr/share/mysql/greek</Path>
<Path fileType="data">/usr/share/mysql/hungarian</Path>
<Path fileType="data">/usr/share/mysql/italian</Path>
<Path fileType="data">/usr/share/mysql/japanese</Path>
<Path fileType="data">/usr/share/mysql/korean</Path>
<Path fileType="data">/usr/share/mysql/norwegian</Path>
<Path fileType="data">/usr/share/mysql/norwegian-ny</Path>
<Path fileType="data">/usr/share/mysql/polish</Path>
<Path fileType="data">/usr/share/mysql/portuguese</Path>
<Path fileType="data">/usr/share/mysql/romanian</Path>
<Path fileType="data">/usr/share/mysql/russian</Path>
<Path fileType="data">/usr/share/mysql/serbian</Path>
<Path fileType="data">/usr/share/mysql/slovak</Path>
<Path fileType="data">/usr/share/mysql/spanish</Path>
<Path fileType="data">/usr/share/mysql/swedish</Path>
<Path fileType="data">/usr/share/mysql/ukrainian</Path>
<Path fileType="data">/usr/share/mysql/errmsg.txt</Path>
<Path fileType="data">/usr/share/mysql</Path>
</Files>
</Package>
<Package>
<Name>mariadb-client</Name>
<IsA>app:console</IsA>
<Summary>MariaDB client programs</Summary>
<RuntimeDependencies>
<Dependency version="current">mariadb-lib</Dependency>
<Dependency>libaio</Dependency>
</RuntimeDependencies>
<Replaces>
<Package>mysql-client</Package>
</Replaces>
<Files>
<Path fileType="executable">/usr/bin</Path>
</Files>
</Package>
<Package>
<Name>mariadb-server</Name>
<IsA>service</IsA>
<Summary>The MariaDB server and related files</Summary>
<RuntimeDependencies>
<Dependency version="current">mariadb-lib</Dependency>
<Dependency version="current">mariadb-client</Dependency>
<Dependency>libaio</Dependency>
</RuntimeDependencies>
<Replaces>
<Package>mysql-server</Package>
</Replaces>
<Files>
<Path fileType="config">/etc</Path>
<Path fileType="executable">/usr/sbin</Path>
<Path fileType="executable">/usr/bin/mysql_install_db</Path>
<Path fileType="executable">/usr/bin/mysqlmanagerc</Path>
<Path fileType="executable">/usr/bin/mysqlmanager-pwgen</Path>
<Path fileType="executable">/usr/bin/mysqlmanager</Path>
<Path fileType="executable">/usr/bin/mysql_secure_installation</Path>
<Path fileType="executable">/usr/bin/mysql_fix_privilege_tables</Path>
<Path fileType="executable">/usr/bin/mysqld_safe</Path>
<Path fileType="executable">/usr/bin/myisamchk</Path>
<Path fileType="executable">/usr/bin/myisamlog</Path>
<Path fileType="executable">/usr/bin/myisampack</Path>
<Path fileType="executable">/usr/bin/myisam_ftdump</Path>
<Path fileType="executable">/usr/bin/isamchk</Path>
<Path fileType="executable">/usr/bin/isamlog</Path>
<Path fileType="executable">/usr/bin/mysql_waitpid</Path>
<Path fileType="executable">/usr/bin/mysqlbinlog</Path>
<Path fileType="executable">/usr/bin/pack_isam</Path>
<Path fileType="data">/usr/share/mysql/binary-configure</Path>
<Path fileType="data">/usr/share/mysql/fill_help_tables.sql</Path>
<Path fileType="data">/usr/share/mysql/mysqld_multi.server</Path>
<Path fileType="data">/usr/share/mysql/mysql_fix_privilege_tables.sql</Path>
<Path fileType="data">/usr/share/mysql/mysql_system_tables_data.sql</Path>
<Path fileType="data">/usr/share/mysql/mysql_system_tables.sql</Path>
<Path fileType="data">/usr/share/mysql/mysql_test_data_timezone.sql</Path>
<Path fileType="data">/usr/share/mysql/ndb-config-2-node.ini</Path>
<Path fileType="info">/usr/share/info</Path>
<Path fileType="data">/var</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="config">/usr/lib/tmpfiles.d/mariadb.conf</Path>
<Path fileType="data">/run/mysqld</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/etc/mysql/my.cnf">my.cnf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/mariadb.conf">tmpfiles.conf</AdditionalFile>
</AdditionalFiles>
<Provides>
<COMAR script="service.py">System.Service</COMAR>
<COMAR script="package.py">System.Package</COMAR>
</Provides>
</Package>
<Package>
<Name>mariadb-man-pages</Name>
<IsA>data</IsA>
<Summary>Man pages for MariaDB server and client</Summary>
<Replaces>
<Package>mysql-man-pages</Package>
</Replaces>
<Files>
<Path fileType="man">/usr/share/man</Path>
</Files>
</Package>
<History>
<Update release="8">
<Date>2015-01-25</Date>
<Version>10.0.17</Version>
<Comment>Version bump.</Comment>
<Name>Vedat Demir</Name>
<Email>vedat@pisilinux.org</Email>
</Update>
<Update release="7">
<Date>2014-09-25</Date>
<Version>10.0.13</Version>
<Comment>Version bump.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="6">
<Date>2014-09-03</Date>
<Version>5.5.37</Version>
<Comment>Fix package.py, first create initial db then chown.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="5">
<Date>2014-05-25</Date>
<Version>5.5.37</Version>
<Comment>Rebuild.</Comment>
<Name>Aydın Demirel</Name>
<Email>aydin.demirel@pisilinux.org</Email>
</Update>
<Update release="4">
<Date>2014-05-19</Date>
<Version>5.5.37</Version>
<Comment>Version bump.</Comment>
<Name>Alihan Öztürk</Name>
<Email>alihan@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2014-02-21</Date>
<Version>5.5.35</Version>
<Comment>Fix -lprobes_mysql issue</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2014-02-18</Date>
<Version>5.5.35</Version>
<Comment>
Fix package.py
Add tmpfiles.conf
Fix replacing mysql
Remove not needed files
Fix and clean actions.py
</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2014-02-11</Date>
<Version>5.5.35</Version>
<Comment>First release</Comment>
<Name>Aydın Demirel</Name>
<Email>aydin.demirel@pisilinux.org</Email>
</Update>
</History>
</PISI>
+30
View File
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>mariadb</Name>
<Summary xml:lang="tr">Hızlı, çok kullanıcılı ve çok görevli SQL veritabanı sunucusu</Summary>
<Description xml:lang="tr">MySQL, çoklu iş parçacıklı (multi-threaded), çok kullanıcılı (multi-user), hızlı ve sağlam (robust) bir Veritabanı yönetim sistemidir. Özelllikle basit web uygulamaları için LAMP sistemi içinde sıkça tercih edilmektedir.</Description>
</Source>
<Package>
<Name>mariadb-lib</Name>
<Summary xml:lang="en">MariaDB client tools</Summary>
<Summary xml:lang="tr">MySQL istemcileri tarafından gereken paylaşımlı kitaplıklar</Summary>
</Package>
<Package>
<Name>mariadb-client</Name>
<Summary xml:lang="en">MariaDB client libraries</Summary>
<Summary xml:lang="tr">MariaDB istemci uygulamaları</Summary>
</Package>
<Package>
<Name>mariadb-server</Name>
<Summary xml:lang="en">MariaDB server and releated files</Summary>
<Summary xml:lang="tr">MariaDB sunucusu ve ilgili dosyalar</Summary>
</Package>
<Package>
<Name>mariadb-man-pages</Name>
<Summary xml:lang="en">MariaDB server and client man pages</Summary>
<Summary xml:lang="tr">MariaDB sunucu ve istemci uygulamarına ait kılavuz sayfaları</Summary>
</Package>
</PISI>