diff --git a/debian/additions/garb-systemd.8 b/debian/additions/garb-systemd.8 new file mode 100644 index 0000000000000000000000000000000000000000..add754c99646d7b5aa12ea99169bd81d06a32d79 --- /dev/null +++ b/debian/additions/garb-systemd.8 @@ -0,0 +1,16 @@ +.TH GARB-SYSTEMD "8" "January 2020" "garb-systemd" "System Administration Utilities" +.SH NAME +garb-systemd \- systemd start helper for arbitrator daemon +.SH SYNOPSIS +.B garb-systemd +{\fI\,start\/\fR} +.SH "DESCRIPTION" +This is a simple wrapper for garbd written in shell script, which facilitates starting garbd via systemd. While starting garbd, settings are applied from /etc/sysconfig/garb or from environment variables GALERA_NODES, GALERA_GROUP, GALERA_PORT, GALERA_OPTIONS and LOG_FILE. + +For more information, view the source code and read more at https://galeracluster.com/library/documentation/arbitrator.html + +.SH BUGS +See Galera bug tracker at https://github.com/codership/galera + +.SH AUTHOR +Codership Oy diff --git a/debian/galera-arbitrator-4.garb.service b/debian/galera-arbitrator-4.garb.service new file mode 120000 index 0000000000000000000000000000000000000000..05cd3337679e30129b4fa44274f36389ca8ec24a --- /dev/null +++ b/debian/galera-arbitrator-4.garb.service @@ -0,0 +1 @@ +../garb/files/garb.service \ No newline at end of file diff --git a/debian/galera-arbitrator-4.install b/debian/galera-arbitrator-4.install index 436ef14ebfb2480334852b4076f20b797dd102c9..39f0ffcc4eec78464fe0d2d954842297d097e5d4 100644 --- a/debian/galera-arbitrator-4.install +++ b/debian/galera-arbitrator-4.install @@ -1 +1,2 @@ garb/garbd usr/bin +garb/files/garb-systemd usr/bin diff --git a/debian/galera-arbitrator-4.manpages b/debian/galera-arbitrator-4.manpages index c881ff7d034c0afadb4723d1bf609f101fe666c2..db629fd7c0899181fa256dabe23abccb40440a0e 100644 --- a/debian/galera-arbitrator-4.manpages +++ b/debian/galera-arbitrator-4.manpages @@ -1 +1,2 @@ +debian/additions/garb-systemd.8 man/garbd.8 diff --git a/debian/patches/series b/debian/patches/series index d7987b41e932273c3c57cf459571fa40ff6de1a0..1430728a47db06b0cf027241d8e1fedb3d77ab3c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,5 @@ 526.patch 527.patch disable-sporadic-failing-tests.patch +systemd-obsolete-target.patch +systemd-documentation.patch diff --git a/debian/patches/systemd-documentation.patch b/debian/patches/systemd-documentation.patch new file mode 100644 index 0000000000000000000000000000000000000000..3277b27df3ca76a7177a85bddf98e3611a9f134e --- /dev/null +++ b/debian/patches/systemd-documentation.patch @@ -0,0 +1,33 @@ +From 968b03ea08c9c50a3946c0c3926e450ecedcdcfa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= +Date: Sat, 4 Jan 2020 23:48:24 +0200 +Subject: [PATCH] Add Documentation keys to systemd service definition + +Documentation for systemd service files can be automatically viewed using +'systemctl help servicename' if this field is present. + +See also: +https://lintian.debian.org/tags/systemd-service-file-missing-documentation-key.html +--- + garb/files/garb.service | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/garb/files/garb.service b/garb/files/garb.service +index 198755c0c..45cb7db05 100644 +--- a/garb/files/garb.service ++++ b/garb/files/garb.service +@@ -2,6 +2,8 @@ + + [Unit] + Description=Galera Arbitrator Daemon ++Documentation=man:garbd(8) ++Documentation=https://galeracluster.com/library/documentation/arbitrator.html + After=network.target + + [Install] +@@ -19,5 +21,3 @@ KillSignal=SIGINT + + TimeoutSec=2m + PrivateTmp=false +- +- diff --git a/debian/patches/systemd-obsolete-target.patch b/debian/patches/systemd-obsolete-target.patch new file mode 100644 index 0000000000000000000000000000000000000000..d0d4588739d29c5afd7025e1ba4ab1a30c2609eb --- /dev/null +++ b/debian/patches/systemd-obsolete-target.patch @@ -0,0 +1,34 @@ +From 416222e6e76484323002d316d261a6c3b0056044 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= +Date: Sat, 4 Jan 2020 23:47:00 +0200 +Subject: [PATCH] Remove obsolete target 'syslog' from systemd service + definition + +Declaring After=syslog.target is unnecessary by now because syslog is +socket-activated and will therefore be started when needed. + +Having network.target is enough, and that is e.g. how the MariaDB systemd +service defines it. + +This change is safe on the Galera 4.x branch since it most likely will not +target very old Linux distros anymore. + +See also: +https://lintian.debian.org/tags/systemd-service-file-refers-to-obsolete-target.html +--- + garb/files/garb.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/garb/files/garb.service b/garb/files/garb.service +index 9bd9ddaa7..198755c0c 100644 +--- a/garb/files/garb.service ++++ b/garb/files/garb.service +@@ -2,7 +2,7 @@ + + [Unit] + Description=Galera Arbitrator Daemon +-After=network.target syslog.target ++After=network.target + + [Install] + WantedBy=multi-user.target diff --git a/debian/rules b/debian/rules index b0e892cfdc0f8afa09e46f36f3d24d726a5441f8..bccfec87f64b17d38c4c533365bbb683bd2be53d 100755 --- a/debian/rules +++ b/debian/rules @@ -64,5 +64,8 @@ override_dh_auto_build: override_dh_installinit-arch: dh_installinit -n --name=garb -- defaults 18 22 +override_dh_installsystemd: + dh_installsystemd --name=garb + %: dh $@