diff options
author | Otto Kekäläinen <otto@mariadb.org> | 2016-10-29 02:43:45 +0300 |
---|---|---|
committer | Otto Kekäläinen <otto@mariadb.org> | 2016-10-29 03:50:11 +0300 |
commit | c912d05fab9db5829c403432fddece257c75ece0 (patch) | |
tree | 01eb9869279006802255e32f1cf73f7aee5bebb3 /debian/rules | |
parent | 7316b14144ceeed40dc976b9b5f2aa97f07a3eb3 (diff) | |
download | mariadb-git-c912d05fab9db5829c403432fddece257c75ece0.tar.gz |
MDEV-6284: Install systemd files (almost) the Debian way
The control file contents must be correct from the start and cannot
be modified at build time by CMake. Also all static Debian package
analyzers will fail to see all manipulations by CMake later on.
It is best to do all manipulations like these in autobake-deb.sh.
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 14 |
1 files changed, 10 insertions, 4 deletions
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 |