diff options
Diffstat (limited to 'debian')
-rwxr-xr-x | debian/autobake-deb.sh | 14 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | debian/mariadb-server-10.2.install (renamed from debian/mariadb-server-10.2.install.in) | 5 | ||||
-rwxr-xr-x | debian/rules | 14 |
4 files changed, 30 insertions, 5 deletions
diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index f8d313204d2..1201e28009f 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -60,6 +60,20 @@ then sed '/libpcre3-dev/d' -i debian/control fi +# If libsystemd-dev is not available (before Debian Jessie or Ubuntu Wily) +# clean away the systemd stanzas so the package can build without them. +if ! apt-cache madison libsystemd-dev | grep 'libsystemd-dev' >/dev/null 2>&1 +then + sed '/dh-systemd/d' -i debian/control + sed '/libsystemd-dev/d' -i debian/control + sed 's/ --with systemd//' -i debian/rules + sed '/systemd/d' -i debian/rules + sed '/\.service/d' -i debian/rules + sed '/galera_new_cluster/d' -i debian/mariadb-server-10.2.install + sed '/galera_recovery/d' -i debian/mariadb-server-10.2.install + sed '/mariadb-service-convert/d' -i debian/mariadb-server-10.2.install +fi + # On Travis-CI, the log must stay under 4MB so make the build less verbose if [[ $TRAVIS ]] then diff --git a/debian/control b/debian/control index b9cfeff7684..cd36704ea63 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,7 @@ Build-Depends: bison, cmake (>= 2.7), debhelper (>= 9), dh-apparmor, + dh-systemd, dpatch, libaio-dev [linux-any], libboost-dev, @@ -19,6 +20,7 @@ Build-Depends: bison, libpcre3-dev (>= 2:8.35-3.2~), libreadline-gplv2-dev, libssl-dev, + libsystemd-dev, libxml2-dev, libnuma-dev, lsb-release, diff --git a/debian/mariadb-server-10.2.install.in b/debian/mariadb-server-10.2.install index fb435af3034..e8470b757c0 100644 --- a/debian/mariadb-server-10.2.install.in +++ b/debian/mariadb-server-10.2.install @@ -63,4 +63,7 @@ usr/share/mysql/mysql_system_tables.sql usr/share/mysql/mysql_system_tables_data.sql usr/share/mysql/mysql_test_data_timezone.sql usr/share/mysql/wsrep_notify -@SYSTEMD_DEB_FILES@ +usr/bin/galera_new_cluster +usr/bin/galera_recovery +usr/bin/mariadb-service-convert +lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf diff --git a/debian/rules b/debian/rules index eca59c5b1f7..b0a4ceddca9 100755 --- a/debian/rules +++ b/debian/rules @@ -129,6 +129,10 @@ override_dh_auto_install: # If Spider plugin was not built skip the package [ -f $(BUILDDIR)/storage/spider/ha_spider.so ] || sed -i -e "/Package: mariadb-plugin-spider/,+14d" debian/control + # Copy systemd files to a location available for dh_installinit + cp $(BUILDDIR)/support-files/mariadb.service debian/mariadb-server-10.2.mariadb.service + cp $(BUILDDIR)/support-files/mariadb@.service debian/mariadb-server-10.2.mariadb@.service + # make install cd $(BUILDDIR) && $(MAKE) install DESTDIR=$(TMP) @@ -158,13 +162,15 @@ override_dh_auto_install: override_dh_installlogrotate-arch: dh_installlogrotate --name mysql-server +override_dh_systemd_enable: + dh_systemd_enable --name=mariadb + dh_systemd_enable --no-enable --name=mariadb@ + # Start mysql at sequence number 19 before 20 where apache, proftpd etc gets # started which might depend on a running database server. override_dh_installinit-arch: - if [ -x /usr/bin/dh_systemd_enable -a -f debian/mariadb-server-10.2/lib/systemd/system/mariadb.service ]; then dh_systemd_enable -pmariadb-server-10.2 mariadb.service; fi - if [ -x /usr/bin/dh_systemd_enable -a -f debian/mariadb-server-10.2/lib/systemd/system/mariadb@.service ]; then dh_systemd_enable --no-enable -pmariadb-server-10.2 mariadb@.service; fi dh_installinit --name=mysql -- defaults 19 21 - if [ -x /usr/bin/dh_systemd_start -a -f debian/mariadb-server-10.2/lib/systemd/system/mariadb.service ]; then dh_systemd_start -pmariadb-server-10.2 --restart-after-upgrade mariadb.service; fi + dh_systemd_start --restart-after-upgrade override_dh_installcron-arch: dh_installcron --name mysql-server @@ -173,6 +179,6 @@ get-orig-source: uscan --force-download --verbose %: - dh $@ --parallel --with dpatch + dh $@ --parallel --with dpatch --with systemd # vim: ts=8 |