From fae70ecd20ef8f57a7dd5791bc1ec329595af2c4 Mon Sep 17 00:00:00 2001 From: ayhanyalcinsoy Date: Fri, 19 Jun 2015 13:39:29 +0300 Subject: [PATCH] moved into main repo for pisi 2.0 --- server/component.xml | 3 + server/database/component.xml | 3 + server/database/firebird/actions.py | 85 +++++++ server/database/firebird/comar/package.py | 43 ++++ server/database/firebird/comar/service.py | 26 +++ server/database/firebird/files/50firebird | 1 + .../firebird/files/editline-dumb-tr.patch | 12 + .../firebird-2.5.1.26351.0-deps-flags.patch | 59 +++++ .../firebird/files/fix-lib64-dir.diff | 13 ++ server/database/firebird/files/hosts.equiv | 3 + server/database/firebird/pspec.xml | 130 +++++++++++ server/database/firebird/translations.xml | 26 +++ server/database/mariadb/actions.py | 80 +++++++ server/database/mariadb/comar/package.py | 39 ++++ server/database/mariadb/comar/service.py | 32 +++ server/database/mariadb/files/my.cnf | 150 ++++++++++++ server/database/mariadb/files/tmpfiles.conf | 1 + server/database/mariadb/pspec.xml | 216 ++++++++++++++++++ server/database/mariadb/translations.xml | 30 +++ server/database/postgresql/actions.py | 83 +++++++ server/database/postgresql/comar/package.py | 15 ++ server/database/postgresql/comar/service.py | 45 ++++ .../postgresql/files/postgresql.conf-8 | 13 ++ server/database/postgresql/pspec.xml | 151 ++++++++++++ server/database/postgresql/translations.xml | 14 ++ 25 files changed, 1273 insertions(+) create mode 100644 server/component.xml create mode 100644 server/database/component.xml create mode 100644 server/database/firebird/actions.py create mode 100644 server/database/firebird/comar/package.py create mode 100644 server/database/firebird/comar/service.py create mode 100644 server/database/firebird/files/50firebird create mode 100644 server/database/firebird/files/editline-dumb-tr.patch create mode 100644 server/database/firebird/files/firebird-2.5.1.26351.0-deps-flags.patch create mode 100644 server/database/firebird/files/fix-lib64-dir.diff create mode 100644 server/database/firebird/files/hosts.equiv create mode 100644 server/database/firebird/pspec.xml create mode 100644 server/database/firebird/translations.xml create mode 100644 server/database/mariadb/actions.py create mode 100644 server/database/mariadb/comar/package.py create mode 100644 server/database/mariadb/comar/service.py create mode 100644 server/database/mariadb/files/my.cnf create mode 100644 server/database/mariadb/files/tmpfiles.conf create mode 100644 server/database/mariadb/pspec.xml create mode 100644 server/database/mariadb/translations.xml create mode 100644 server/database/postgresql/actions.py create mode 100644 server/database/postgresql/comar/package.py create mode 100644 server/database/postgresql/comar/service.py create mode 100644 server/database/postgresql/files/postgresql.conf-8 create mode 100644 server/database/postgresql/pspec.xml create mode 100644 server/database/postgresql/translations.xml diff --git a/server/component.xml b/server/component.xml new file mode 100644 index 0000000000..cee83d0e74 --- /dev/null +++ b/server/component.xml @@ -0,0 +1,3 @@ + + server + diff --git a/server/database/component.xml b/server/database/component.xml new file mode 100644 index 0000000000..800ed1d6cf --- /dev/null +++ b/server/database/component.xml @@ -0,0 +1,3 @@ + + server.database + diff --git a/server/database/firebird/actions.py b/server/database/firebird/actions.py new file mode 100644 index 0000000000..675877ee6c --- /dev/null +++ b/server/database/firebird/actions.py @@ -0,0 +1,85 @@ +#!/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 + +import os +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import get + +WorkDir="Firebird-%s-0" % get.srcVERSION() + +def setup(): + pisitools.dosed("src/isql/isql.epp", '"isql\s', '"fbsql ') + pisitools.dosed("src/msgs/history2.sql", 'isql\s', 'fbsql ') + pisitools.dosed("src/msgs/messages2.sql", 'isql\s', 'fbsql ') + pisitools.dosed("src/msgs/messages2.sql", 'ISQL\s', 'FBSQL ') + shelltools.system("find ./ -name \*.sh -print0 | xargs -0 chmod +x") + for d in ("btyacc", "editline", "icu"): + shelltools.unlinkDir("extern/%s" % d) + autotools.autoreconf("-fi") + autotools.configure("--prefix=/opt/firebird \ + --disable-static \ + --enable-superserver \ + --with-editline \ + --with-gnu-ld \ + --with-system-editline \ + --with-system-icu \ + ") + +def build(): + #Parallel build is broken + autotools.make("-j1") + shelltools.cd("gen") + pisitools.dosed("install/makeInstallImage.sh", "exit 1", "# exit 1") + pisitools.dosed("install/makeInstallImage.sh", "chown", 'echo ""# chown') + pisitools.dosed("install/makeInstallImage.sh", "chmod", 'echo ""# chmod') + autotools.make("-f Makefile.install buildRoot") + +def install(): + # Copy to install directory + shelltools.copytree("gen/buildroot/", get.installDIR()) + + # Move headers + pisitools.remove("/usr/include/*") + pisitools.domove("/opt/firebird/include", "/usr/include", "firebird") + + # Fix client libraries symlinks + pisitools.removeDir("/usr/lib*") + for libs in os.listdir("%s/opt/firebird/lib" % get.installDIR()): + pisitools.dosym("/opt/firebird/lib/%s" % libs, "/usr/lib/%s" % libs) + pisitools.dosym("/opt/firebird/plugins/libfbtrace.so", "/usr/lib/libfbtrace.so") + + # Add support for old client's + pisitools.dosym("libfbclient.so", "/usr/lib/libgds.so") + pisitools.dosym("libfbclient.so", "/usr/lib/libgds.so.0") + pisitools.dosym("libfbclient.so", "/opt/firebird/lib/libgds.so") + pisitools.dosym("libfbclient.so", "/opt/firebird/lib/libgds.so.0") + + # Move configuration files and security DB to /etc/firebird for painless upgrade + pisitools.domove("/opt/firebird/aliases.conf", "/etc/firebird") + pisitools.domove("/opt/firebird/firebird.conf", "/etc/firebird") + pisitools.domove("/opt/firebird/security2.fdb", "/etc/firebird") + pisitools.dosym("/etc/firebird/aliases.conf", "/opt/firebird/aliases.conf") + pisitools.dosym("/etc/firebird/firebird.conf", "/opt/firebird/firebird.conf") + pisitools.dosym("/etc/firebird/security2.fdb", "/opt/firebird/security2.fdb") + + # Set PID directory + shelltools.makedirs("%s/run/firebird" % get.installDIR()) + #pisitools.dodir("/opt/firebird/run") + + # Set permissions + shelltools.chmod("%s/etc/firebird/security2.fdb" % get.installDIR(), 0600) + shelltools.chmod("%s/run/firebird" % get.installDIR(), 0755) + #shelltools.chmod("%s/opt/firebird/run" % get.installDIR(), 0755) + + pisitools.dosym("/var/log/firebird.log", "/opt/firebird/firebird.log") + + # Useless init.d stuff + pisitools.removeDir("/opt/firebird/misc/") + + # Prevent to conflict isql with UnixODBC's + pisitools.domove("/opt/firebird/bin/isql", "/opt/firebird/bin", "fb_isql") diff --git a/server/database/firebird/comar/package.py b/server/database/firebird/comar/package.py new file mode 100644 index 0000000000..e0bafd53e7 --- /dev/null +++ b/server/database/firebird/comar/package.py @@ -0,0 +1,43 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import os, pwd, socket + +pid_dir = "/run/firebird" +log_file = "/var/log/firebird.log" + +uid = pwd.getpwnam("firebird")[2] +hostname = socket.gethostname() + +def touch(filename): + try: + f = open(filename, "w") + f.close() + except IOError: + fail("Failed to create %s file" % filename) + +def postInstall(fromVersion, fromRelease, toVersion, toRelease): +# # Configure PID directory + os.chown(pid_dir, uid, -1) + + # Create log file + touch(log_file) + os.chown(log_file, uid, -1) + os.chmod(log_file, 0644) + + # Configure security2.fdb file + os.chown("/opt/firebird/security2.fdb", uid, -1) + + # Create lock files + for lock_filename in ("isc_guard1", "isc_init1", "isc_lock1"): + lock_filename = "/opt/firebird/%s.%s" % (lock_filename, hostname) + touch(lock_filename) + os.chown(lock_filename, uid, -1) + os.chmod(lock_filename, 0644) + +def preRemove(): + # Remove lock files + for lock_filename in ("isc_guard1", "isc_init1", "isc_lock1"): + lock_filename = "/opt/firebird/%s.%s" % (lock_filename, hostname) + if os.path.exists(lock_filename): + os.remove(lock_filename) diff --git a/server/database/firebird/comar/service.py b/server/database/firebird/comar/service.py new file mode 100644 index 0000000000..123ccf4dcf --- /dev/null +++ b/server/database/firebird/comar/service.py @@ -0,0 +1,26 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +serviceType="server" +serviceDesc = _({"en": "Firebird Database Server", + "tr": "Firebird Veritabanı Sunucusu"}) + +from comar.service import * + +pid_file = "/run/firebird/firebird.pid" + +@synchronized +def start(): + startService(command="/opt/firebird/bin/fbguard", + args="-pidfile %s -start -forever -daemon" % pid_file, + pidfile="/run/firebird/firebird.pid", + donotify=True) +# chuid="firebird", + +@synchronized +def stop(): + stopService(pidfile=pid_file, + donotify=True) + +def status(): + return isServiceRunning(pid_file) diff --git a/server/database/firebird/files/50firebird b/server/database/firebird/files/50firebird new file mode 100644 index 0000000000..35cf8d0e1b --- /dev/null +++ b/server/database/firebird/files/50firebird @@ -0,0 +1 @@ +ROOTPATH="/opt/firebird/bin" diff --git a/server/database/firebird/files/editline-dumb-tr.patch b/server/database/firebird/files/editline-dumb-tr.patch new file mode 100644 index 0000000000..935feb76cc --- /dev/null +++ b/server/database/firebird/files/editline-dumb-tr.patch @@ -0,0 +1,12 @@ +diff -Nuar Firebird-2.1.0.17798-0.orig/extern/editline/src/makelist Firebird-2.1.0.17798-0/extern/editline/src/makelist +--- Firebird-2.1.0.17798-0.orig/extern/editline/src/makelist 2007-04-09 15:57:41.000000000 +0300 ++++ Firebird-2.1.0.17798-0/extern/editline/src/makelist 2008-07-12 14:02:29.000000000 +0300 +@@ -140,7 +140,7 @@ + # + -fh) + cat $FILES | $AWK '/el_action_t/ { print $3 }' | \ +- sort | tr '[:lower:]' '[:upper:]' | $AWK ' ++ sort | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | $AWK ' + BEGIN { + printf("/* Automatically generated file, do not edit */\n"); + printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n"); diff --git a/server/database/firebird/files/firebird-2.5.1.26351.0-deps-flags.patch b/server/database/firebird/files/firebird-2.5.1.26351.0-deps-flags.patch new file mode 100644 index 0000000000..8be521cc0f --- /dev/null +++ b/server/database/firebird/files/firebird-2.5.1.26351.0-deps-flags.patch @@ -0,0 +1,59 @@ +diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/Makefile.in.firebird Firebird-2.5.0.26074-0_deps-flags/builds/posix/Makefile.in.firebird +--- Firebird-2.5.0.26074-0_orig/builds/posix/Makefile.in.firebird 2010-11-09 12:42:45.000000000 -0500 ++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/Makefile.in.firebird 2011-03-28 15:10:09.814370706 -0400 +@@ -158,7 +158,7 @@ + # some complications particularly for super in needing to start the server + # that you are currently building. MOD 28-July-2002 + +-firebird_basic: btyacc_binary external_libraries firebird_boot basic_targets ++firebird_basic: firebird_boot basic_targets + + firebird_boot: updateBuildNum boot_phase1 boot_phase2 + +diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/make.defaults Firebird-2.5.0.26074-0_deps-flags/builds/posix/make.defaults +--- Firebird-2.5.0.26074-0_orig/builds/posix/make.defaults 2010-11-09 12:42:45.000000000 -0500 ++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/make.defaults 2011-03-28 15:21:26.904370708 -0400 +@@ -138,7 +138,7 @@ + AR= ar @AR_OPTIONS@ crsu + LN= @LN_S@ + RANLIB= @RANLIB@ +-BTYACC=$(ROOT)/extern/btyacc/btyacc ++BTYACC=/usr/bin/btyacc + + CC = @CC@ + CXX = @CXX@ +diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux +--- Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux 2010-11-09 12:42:45.000000000 -0500 ++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux 2011-03-25 21:38:29.031037374 -0400 +@@ -18,11 +18,10 @@ + # + # 2 Oct 2002, Nickolay Samofatov - Major cleanup + +-COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -pipe -MMD -fPIC -fmessage-length=0 +-OPTIMIZE_FLAGS=-O3 -march=i586 -mtune=i686 -fno-omit-frame-pointer ++COMMON_FLAGS=-DLINUX -MMD -fPIC -fmessage-length=0 + WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable + +-PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS) ++PROD_FLAGS=$(COMMON_FLAGS) + #DEV_FLAGS=-DUSE_VALGRIND -p $(COMMON_FLAGS) $(WARN_FLAGS) + DEV_FLAGS=-p $(COMMON_FLAGS) $(WARN_FLAGS) + +diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux_amd64 Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux_amd64 +--- Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux_amd64 2010-11-09 12:42:45.000000000 -0500 ++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux_amd64 2011-03-25 21:39:15.134370707 -0400 +@@ -18,12 +18,11 @@ + # + # 2 Oct 2002, Nickolay Samofatov - Major cleanup + +-COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0 +-OPTIMIZE_FLAGS=-O3 -fno-omit-frame-pointer ++COMMON_FLAGS=-DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -MMD -fPIC -fmessage-length=0 + WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable + CXXFLAGS:= $(CXXFLAGS) -fno-rtti + +-PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS) ++PROD_FLAGS=$(COMMON_FLAGS) + #DEV_FLAGS=-DUSE_VALGRIND $(COMMON_FLAGS) $(WARN_FLAGS) + DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS) + diff --git a/server/database/firebird/files/fix-lib64-dir.diff b/server/database/firebird/files/fix-lib64-dir.diff new file mode 100644 index 0000000000..1f9281936d --- /dev/null +++ b/server/database/firebird/files/fix-lib64-dir.diff @@ -0,0 +1,13 @@ +Index: Firebird-2.1.3.18185-0/configure.in +=================================================================== +--- Firebird-2.1.3.18185-0.orig/configure.in ++++ Firebird-2.1.3.18185-0/configure.in +@@ -142,7 +142,7 @@ dnl CPU_TYPE=ppc64 + LOCK_MANAGER_FLG=Y + EDITLINE_FLG=Y + SHRLIB_EXT=so +- libdir=/usr/lib64 ++ libdir=/usr/lib + CPU_TYPE=amd64 + RPM64='()(64bit)' + ;; diff --git a/server/database/firebird/files/hosts.equiv b/server/database/firebird/files/hosts.equiv new file mode 100644 index 0000000000..49f48a8506 --- /dev/null +++ b/server/database/firebird/files/hosts.equiv @@ -0,0 +1,3 @@ +# Insert host names here to allow connect to Firebird +localhost.localdomain +localhost diff --git a/server/database/firebird/pspec.xml b/server/database/firebird/pspec.xml new file mode 100644 index 0000000000..705b0c7ec9 --- /dev/null +++ b/server/database/firebird/pspec.xml @@ -0,0 +1,130 @@ + + + + + firebird + http://www.firebirdsql.org/ + + PisiLinux Community + admins@pisilinux.org + + IPL-1 + IDPL-1 + LGPLv2.1 + service + library + A relational database offering many ANSI SQL-99 features + Firebird is an open source relational database management system offering many ANSI SQL-99 features. + http://sourceforge.net/projects/firebird/files/firebird/2.5.2-Release/Firebird-2.5.2.26540-0.tar.bz2/download + + icu4c-devel + btyacc + libedit-devel + + + + editline-dumb-tr.patch + firebird-2.5.1.26351.0-deps-flags.patch + + + + + firebird-client + Firebird database client library + Firebird relational database client library. + + /usr/lib/libfbclient.* + /usr/lib/libgds.* + /usr/lib/libib_util.* + /usr/lib/libfbtrace.so + /opt/firebird/lib/libfbclient.* + /opt/firebird/lib/libgds.* + /opt/firebird/lib/libib_util.* + /opt/firebird/plugins/libfbtrace.so + + + + + firebird-superserver + Firebird super server + + firebird-client + icu4c + libedit + + + /etc/firebird + /etc/env.d/50firebird + /opt/firebird/*.conf + /opt/firebird/*.msg + /opt/firebird/security2.fdb + /opt/firebird/README + /opt/firebird/WhatsNew + /opt/firebird/UDF + /opt/firebird/bin + /opt/firebird/doc + /opt/firebird/examples + /opt/firebird/help + /opt/firebird/intl + /opt/firebird/lib/libicu* + /opt/firebird/upgrade + /opt/firebird/firebird.log + /opt/firebird + /run/firebird + + + hosts.equiv + 50firebird + + + System.Service + System.Package + + + + + firebird-devel + Development files for firebird + + firebird-client + + + /usr/include/firebird + + + + + + 2014-05-19 + 2.5.2.26540 + Version bump. + Alihan Öztürk + alihan@pisilinux.org + + + 2013-10-14 + 2.5.2.26539 + Rebuild for icu4c + Ertan Güven + ertan@pisilinux.org + + + 2013-03-20 + 2.5.2.26539 + Version bump + Ertan Güven + ertan@pisilinux.org + + + 2012-10-15 + 2.5.1.26351 + First release + Marcin Bojara + marcin@pisilinux.org + + + \ No newline at end of file diff --git a/server/database/firebird/translations.xml b/server/database/firebird/translations.xml new file mode 100644 index 0000000000..56d5835ee8 --- /dev/null +++ b/server/database/firebird/translations.xml @@ -0,0 +1,26 @@ + + + + firebird + Birçok ANSI SQL-99 özelliği sunan ilişkisel bir veritabanı + Birçok ANSI SQL-99 özelliği sunan, küçük, hızlı ve çok kararlı bir veritabanı sunucu. + + + + firebird-client + Firebird veritabanı istemci kütüphanesi + Firebird sunucuya bağlantı için kullanılan istemci kütüphanesi + + + + firebird-superserver + Firebird veritabanı sunucusu + Firebird veritabanı için super sunucu. Klasik sunucu mimarisine göre, SMP performansı daha fazladır. + + + + firebird-devel + Firebird için geliştirme dosyaları + + + diff --git a/server/database/mariadb/actions.py b/server/database/mariadb/actions.py new file mode 100644 index 0000000000..f10f171246 --- /dev/null +++ b/server/database/mariadb/actions.py @@ -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") diff --git a/server/database/mariadb/comar/package.py b/server/database/mariadb/comar/package.py new file mode 100644 index 0000000000..43f51fade3 --- /dev/null +++ b/server/database/mariadb/comar/package.py @@ -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 diff --git a/server/database/mariadb/comar/service.py b/server/database/mariadb/comar/service.py new file mode 100644 index 0000000000..9552b147c9 --- /dev/null +++ b/server/database/mariadb/comar/service.py @@ -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) diff --git a/server/database/mariadb/files/my.cnf b/server/database/mariadb/files/my.cnf new file mode 100644 index 0000000000..84667c1214 --- /dev/null +++ b/server/database/mariadb/files/my.cnf @@ -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] + \ No newline at end of file diff --git a/server/database/mariadb/files/tmpfiles.conf b/server/database/mariadb/files/tmpfiles.conf new file mode 100644 index 0000000000..6883dc7988 --- /dev/null +++ b/server/database/mariadb/files/tmpfiles.conf @@ -0,0 +1 @@ +d /run/mysqld 0755 mysql mysql - diff --git a/server/database/mariadb/pspec.xml b/server/database/mariadb/pspec.xml new file mode 100644 index 0000000000..fd048025ec --- /dev/null +++ b/server/database/mariadb/pspec.xml @@ -0,0 +1,216 @@ + + + + + mariadb + https://mariadb.org + + Pisi Linux Admins + admins@pisilinux.org + + GPLv2 + app:console + MariaDB is a drop-in replacement for MySQL + MariaDB strives to be the logical choice for database professionals looking for a robust, scalable, and reliable SQL server. + ftp://ftp.ulak.net.tr/pub/MariaDB/mariadb-10.0.17/source/mariadb-10.0.17.tar.gz + + libaio-devel + unixODBC-devel + + + + + + + mariadb-lib + app:console + library + The shared libraries required for MariaDB clients + + libaio + unixODBC + + + mysql-lib + + + /usr/bin/mysql_config + /usr/include + /usr/lib + /usr/share/mysql/charsets + /usr/share/mysql/czech + /usr/share/mysql/danish + /usr/share/mysql/dutch + /usr/share/mysql/english + /usr/share/mysql/estonian + /usr/share/mysql/french + /usr/share/mysql/german + /usr/share/mysql/greek + /usr/share/mysql/hungarian + /usr/share/mysql/italian + /usr/share/mysql/japanese + /usr/share/mysql/korean + /usr/share/mysql/norwegian + /usr/share/mysql/norwegian-ny + /usr/share/mysql/polish + /usr/share/mysql/portuguese + /usr/share/mysql/romanian + /usr/share/mysql/russian + /usr/share/mysql/serbian + /usr/share/mysql/slovak + /usr/share/mysql/spanish + /usr/share/mysql/swedish + /usr/share/mysql/ukrainian + /usr/share/mysql/errmsg.txt + /usr/share/mysql + + + + + mariadb-client + app:console + MariaDB client programs + + mariadb-lib + libaio + + + mysql-client + + + /usr/bin + + + + + mariadb-server + service + The MariaDB server and related files + + mariadb-lib + mariadb-client + libaio + + + mysql-server + + + /etc + /usr/sbin + /usr/bin/mysql_install_db + /usr/bin/mysqlmanagerc + /usr/bin/mysqlmanager-pwgen + /usr/bin/mysqlmanager + /usr/bin/mysql_secure_installation + /usr/bin/mysql_fix_privilege_tables + /usr/bin/mysqld_safe + /usr/bin/myisamchk + /usr/bin/myisamlog + /usr/bin/myisampack + /usr/bin/myisam_ftdump + /usr/bin/isamchk + /usr/bin/isamlog + /usr/bin/mysql_waitpid + /usr/bin/mysqlbinlog + /usr/bin/pack_isam + /usr/share/mysql/binary-configure + /usr/share/mysql/fill_help_tables.sql + /usr/share/mysql/mysqld_multi.server + /usr/share/mysql/mysql_fix_privilege_tables.sql + /usr/share/mysql/mysql_system_tables_data.sql + /usr/share/mysql/mysql_system_tables.sql + /usr/share/mysql/mysql_test_data_timezone.sql + /usr/share/mysql/ndb-config-2-node.ini + /usr/share/info + /var + /usr/share/doc + /usr/lib/tmpfiles.d/mariadb.conf + /run/mysqld + + + my.cnf + tmpfiles.conf + + + System.Service + System.Package + + + + + mariadb-man-pages + data + Man pages for MariaDB server and client + + mysql-man-pages + + + /usr/share/man + + + + + + 2015-01-25 + 10.0.17 + Version bump. + Vedat Demir + vedat@pisilinux.org + + + 2014-09-25 + 10.0.13 + Version bump. + Serdar Soytetir + kaptan@pisilinux.org + + + 2014-09-03 + 5.5.37 + Fix package.py, first create initial db then chown. + Serdar Soytetir + kaptan@pisilinux.org + + + 2014-05-25 + 5.5.37 + Rebuild. + Aydın Demirel + aydin.demirel@pisilinux.org + + + 2014-05-19 + 5.5.37 + Version bump. + Alihan Öztürk + alihan@pisilinux.org + + + 2014-02-21 + 5.5.35 + Fix -lprobes_mysql issue + Marcin Bojara + marcin@pisilinux.org + + + 2014-02-18 + 5.5.35 + + Fix package.py + Add tmpfiles.conf + Fix replacing mysql + Remove not needed files + Fix and clean actions.py + + Marcin Bojara + marcin@pisilinux.org + + + 2014-02-11 + 5.5.35 + First release + Aydın Demirel + aydin.demirel@pisilinux.org + + + diff --git a/server/database/mariadb/translations.xml b/server/database/mariadb/translations.xml new file mode 100644 index 0000000000..8c33770f59 --- /dev/null +++ b/server/database/mariadb/translations.xml @@ -0,0 +1,30 @@ + + + + mariadb + Hızlı, çok kullanıcılı ve çok görevli SQL veritabanı sunucusu + 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. + + + + mariadb-lib + MariaDB client tools + MySQL istemcileri tarafından gereken paylaşımlı kitaplıklar + + + + mariadb-client + MariaDB client libraries + MariaDB istemci uygulamaları + + + mariadb-server + MariaDB server and releated files + MariaDB sunucusu ve ilgili dosyalar + + + mariadb-man-pages + MariaDB server and client man pages + MariaDB sunucu ve istemci uygulamarına ait kılavuz sayfaları + + diff --git a/server/database/postgresql/actions.py b/server/database/postgresql/actions.py new file mode 100644 index 0000000000..437615bb7b --- /dev/null +++ b/server/database/postgresql/actions.py @@ -0,0 +1,83 @@ +#!/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 autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import get + +def setup(): + autotools.configure("--with-python \ + --with-perl \ + --include=/usr/include/postgresql \ + --with-includes=/usr/include/libxml2/ \ + --with-tcl \ + --with-krb5 \ + --with-openssl \ + --enable-nls \ + --with-pam \ + --with-libxml \ + --with-libxslt \ + --with-ldap \ + --enable-integer-datetimes \ + --enable-thread-safety \ + --enable-depend \ + --host=%s \ + --libdir=/usr/lib \ + --disable-rpath \ + --with-docdir=/usr/share/doc/postgresql" % get.CHOST()) + +def build(): + if get.LDFLAGS(): + ld = "-j1 LD=%s %s" % (get.LD(), get.LDFLAGS()) + else: + ld = "-j1 LD=%s" % get.LD() + + autotools.make(ld) + + shelltools.cd("contrib") + autotools.make(ld) + shelltools.cd("..") + + shelltools.cd("contrib/xml2") + autotools.make(ld) + shelltools.cd("../..") + + shelltools.cd("src/interfaces/libpq") + autotools.make(ld) + shelltools.cd("../../..") + + shelltools.cd("doc") + autotools.make(ld) + shelltools.cd("..") + +def install(): + autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR())) + + shelltools.cd("contrib") + autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR())) + shelltools.cd("..") + + shelltools.cd("contrib/xml2") + autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR())) + shelltools.cd("../..") + + shelltools.cd("src/interfaces/libpq") + autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR())) + shelltools.cd("../../..") + + shelltools.cd("doc") + autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR())) + shelltools.cd("..") + + # No static libs + pisitools.remove("/usr/lib/*.a") + + pisitools.dodoc("README", "HISTORY", "COPYRIGHT") + pisitools.dodoc("doc/MISSING_FEATURES", "doc/KNOWN_BUGS", "doc/TODO", "doc/bug.template") + pisitools.dodir("/var/lib/postgresql") + pisitools.dodir("/var/lib/postgresql/data") + pisitools.dodir("/var/lib/postgresql/backups") diff --git a/server/database/postgresql/comar/package.py b/server/database/postgresql/comar/package.py new file mode 100644 index 0000000000..289666e299 --- /dev/null +++ b/server/database/postgresql/comar/package.py @@ -0,0 +1,15 @@ +#!/usr/bin/python + +import os + +def postInstall(fromVersion, fromRelease, toVersion, toRelease): + os.system("/bin/chown -R postgres:postgres /var/lib/postgresql") + os.system("/bin/chmod -R 0700 /var/lib/postgresql/data") + os.system("/bin/chmod -R 0700 /var/lib/postgresql/backups") + + # On first install... + if not os.path.exists("/var/lib/postgresql/data/base"): + for i in ["LANG", "LANGUAGE", "LC_ALL"]: + os.environ[i] = "en_US.UTF-8" + + os.system('/bin/su postgres -s /bin/sh -p -c "/usr/bin/initdb --pgdata /var/lib/postgresql/data"') \ No newline at end of file diff --git a/server/database/postgresql/comar/service.py b/server/database/postgresql/comar/service.py new file mode 100644 index 0000000000..3126257eec --- /dev/null +++ b/server/database/postgresql/comar/service.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- + +from comar.service import * + +serviceType="server" + +serviceDesc = _({"en": "PostgreSQL Database Server", + "tr": "PostgreSQL Veritabanı Sunucusu"}) + +serviceConf = "postgresql" + +MSG_ERR_PGSQLNOTINST = _({"en": "PostgreSQL is not configured properly, please re-install the package.", + "tr": "PostgreSQL düzgün yapılandırılmamış, lütfen paketi tekrar yükleyin.", + }) + +def check_postgresql(): + import os + if not os.path.exists(config.get("PGDATA", "/var/lib/postgresql/data")): + fail(MSG_ERR_PGSQLNOTINST) + +PIDFILE = "%s/postmaster.pid" % config.get("PGDATA", "/var/lib/postgresql/data") + +@synchronized +def start(): + check_postgresql() + startService(command="/usr/bin/pg_ctl", + args=["start", "-D", config.get("PGDATA", "/var/lib/postgresql/data"), "-l", config.get("PGLOG", "/var/lib/postgresql/data/postgresql.log"), "-o", config.get("PGOPTS", "")], + pidfile=PIDFILE, + chuid=config.get("PGUSER", "postgres"), + donotify=True) + +@synchronized +def stop(): + stopService(command="/usr/bin/pg_ctl", + args=["stop", "-D", config.get("PGDATA", "/var/lib/postgresql/data"), "-s", "-m", "fast"], + chuid=config.get("PGUSER", "postgres"), + donotify=True) + +def reload(): + stopService(command="/usr/bin/pg_ctl", + args=["reload", "-D", config.get("PGDATA", "/var/lib/postgresql/data"), "-s"], + donotify=True) + +def status(): + return isServiceRunning(PIDFILE) \ No newline at end of file diff --git a/server/database/postgresql/files/postgresql.conf-8 b/server/database/postgresql/files/postgresql.conf-8 new file mode 100644 index 0000000000..0f7cf5d495 --- /dev/null +++ b/server/database/postgresql/files/postgresql.conf-8 @@ -0,0 +1,13 @@ +# PostgreSQL's Database Directory +PGDATA=/var/lib/postgresql/data + +# Logfile path: (NOTE: This must be uid/gid owned by the value of $PGUSER!) +PGLOG=/var/lib/postgresql/data/postgresql.log + +# Run the PostgreSQL user as: +PGUSER=postgres + +# Extra options to run postmaster with. +# If you want to enable TCP/IP for PostgreSQL, add -i to the following: +# PGOPTS="-N 1024 -B 2048 -i" +PGOPTS="" \ No newline at end of file diff --git a/server/database/postgresql/pspec.xml b/server/database/postgresql/pspec.xml new file mode 100644 index 0000000000..260fb7cb12 --- /dev/null +++ b/server/database/postgresql/pspec.xml @@ -0,0 +1,151 @@ + + + + + postgresql + http://www.postgresql.org/ + + PisiLinux Community + admins@pisilinux.org + + GPLv2 + service + A powerful, open source relational database system + PostgreSQL is a powerful, open source relational database system. + http://ftp.postgresql.org/pub/source/v9.3.4/postgresql-9.3.4.tar.bz2 + + mit-kerberos + tcl-devel + libxslt-devel + libxml2-devel + + + + + + + + postgresql-lib + library + Essential shared libraries for any PostgreSQL client program or interface + + mit-kerberos + tcl + libxslt + openldap-client + + + /usr/lib + /usr/include + /usr/share/postgresql + /usr/bin/pg_config + + + + + postgresql-doc + data:doc + Postgresql documents + Additional documentation for PostgreSQL. + + postgresql-lib + + + /usr/share/doc + + + + + postgresql-server + service + + postgresql-lib + mit-kerberos + openldap-client + + + /etc + /usr/bin + /usr/share/locale + /usr/share/postgresql/contrib + /usr/share/man + /var/lib + + + postgresql.conf-8 + + + System.Package + System.Service + + + + + postgresql-pl + + postgresql-lib + tcl + + + /usr/bin/pltcl_listmod + /usr/bin/pltcl_loadmod + /usr/bin/pltcl_delmod + /usr/lib/postgresql/plperl.so + /usr/lib/postgresql/plpython.so + /usr/lib/postgresql/pltcl.so + /usr/share/postgresql/unknown.pltcl + + + + + + 2014-05-19 + 9.3.4 + Version bump. + Alihan Öztürk + alihan@pisilinux.org + + + 2014-04-23 + 9.3.3 + Rebuild for webp. + Kamil Atlı + suvarice@gmail.com + + + 2014-02-21 + 9.3.3 + Version bump. + Yusuf Aydemir + yusuf.aydemir@pisilinux.org + + + 2013-11-17 + 9.3.1 + Fix demp + Richard de Bruin + richdb@pisilinux.org + + + 2013-11-15 + 9.3.1 + Version bump + Aydın Demirel + aydin.demirel@pisilinux.org + + + 2013-02-25 + 9.2.3 + Version bump + Ertan Güven + ertan@pisilinux.org + + + 2012-10-04 + 9.2.0 + First release + Yusuf Aydemir + yusuf.aydemir@pisilinux.org + + + diff --git a/server/database/postgresql/translations.xml b/server/database/postgresql/translations.xml new file mode 100644 index 0000000000..c34825a9e8 --- /dev/null +++ b/server/database/postgresql/translations.xml @@ -0,0 +1,14 @@ + + + + postgresql + Güçlü bir açık kaynaklı ilişkisel veritabanı sistemi + PostgreSQL, açık kaynak kodlu, güçlü bir ilişkisel veritabanıdır + + + + postgresql-doc + Postegresql belgeleri + PostegreSQL için ek belgelendirme + +