[boinc] 01/02: Add new service file

Gianfranco Costamagna locutusofborg at moszumanska.debian.org
Tue Dec 12 13:02:00 UTC 2017


This is an automated email from the git hooks/post-receive script.

locutusofborg pushed a commit to branch master
in repository boinc.

commit b8308a1a732d883545593fb2def91963377d6de8
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date:   Wed Dec 6 19:14:46 2017 +0100

    Add new service file
---
 debian/boinc-client.install |   1 +
 debian/boinc-client.service |  18 --------
 debian/changelog            |   7 ++++
 debian/patches/2260.patch   | 100 ++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series       |   1 +
 debian/rules                |   3 ++
 6 files changed, 112 insertions(+), 18 deletions(-)

diff --git a/debian/boinc-client.install b/debian/boinc-client.install
index f8fcd57..a42d495 100644
--- a/debian/boinc-client.install
+++ b/debian/boinc-client.install
@@ -8,3 +8,4 @@ usr/bin/boinc
 usr/bin/boinccmd
 usr/bin/switcher                    usr/lib/boinc-client
 usr/share/locale/*/LC_MESSAGES/BOINC-Client.mo
+lib/systemd/system
diff --git a/debian/boinc-client.service b/debian/boinc-client.service
deleted file mode 100644
index aa0f140..0000000
--- a/debian/boinc-client.service
+++ /dev/null
@@ -1,18 +0,0 @@
-[Unit]
-Description=Berkeley Open Infrastructure Network Computing Client
-After=network.target
-
-[Service]
-Nice=10
-User=boinc
-PermissionsStartOnly=yes
-ExecStartPre=/usr/bin/touch /var/log/boinc.log /var/log/boincerr.log
-ExecStartPre=/bin/chown boinc:boinc /var/log/boinc.log /var/log/boincerr.log
-#ExecStart=/usr/bin/boinc --dir /var/lib/boinc-client
-ExecStart=/bin/sh -c '/usr/bin/boinc --dir /var/lib/boinc-client >/var/log/boinc.log 2>/var/log/boincerr.log'
-ExecReload=/usr/bin/boinccmd --read_cc_config
-ExecStopPost=/bin/rm -f /var/lib/boinc-client/lockfile
-IOSchedulingClass=idle
-
-[Install]
-WantedBy=multi-user.target
diff --git a/debian/changelog b/debian/changelog
index 716e531..ab08e8e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+boinc (7.8.4+dfsg-2) unstable; urgency=medium
+
+  * debian/patches/2260.patch:
+    - new service file
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org>  Wed, 06 Dec 2017 16:43:33 +0100
+
 boinc (7.8.4+dfsg-1exp1) experimental; urgency=medium
 
   * Upload to experimental again, with the boinc-server-* packages.
diff --git a/debian/patches/2260.patch b/debian/patches/2260.patch
new file mode 100644
index 0000000..e85b901
--- /dev/null
+++ b/debian/patches/2260.patch
@@ -0,0 +1,100 @@
+From 5ac7347f79176f59643d313fdee71ea0bb7a60ed Mon Sep 17 00:00:00 2001
+From: Bryan Quigley <bryan.quigley at canonical.com>
+Date: Mon, 27 Nov 2017 00:08:14 -0500
+Subject: [PATCH] Add generated systemd unit
+
+Both Fedora and Debian have their own systemd units for boinc;
+this is based on elements of both so we stop duplicating effort.
+
+Also added clean to init.d script and made it only install if a
+init.d directory already exists.
+
+Closes: #2255
+---
+ .gitignore                             |  1 +
+ client/scripts/Makefile.am             | 14 ++++++++++++--
+ client/scripts/boinc-client.service.in | 21 +++++++++++++++++++++
+ configure.ac                           |  1 +
+ 4 files changed, 35 insertions(+), 2 deletions(-)
+ create mode 100644 client/scripts/boinc-client.service.in
+
+diff --git a/.gitignore b/.gitignore
+index a7745b5cf7..f32845e326 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -81,6 +81,7 @@ boinc_path_config.py
+ pkginfo
+ prototype
+ client/scripts/boinc-client
++client/scripts/boinc-client.service
+ config.h
+ config.log
+ config.status
+diff --git a/client/scripts/Makefile.am b/client/scripts/Makefile.am
+index 67d3820156..92153e6835 100644
+--- a/client/scripts/Makefile.am
++++ b/client/scripts/Makefile.am
+@@ -2,8 +2,15 @@
+ 
+ install-exec-hook:
+ 	chmod +x boinc-client
+-	$(INSTALL) -d $(DESTDIR)$(sysconfdir)/init.d
+-	$(INSTALL) -b boinc-client $(DESTDIR)$(sysconfdir)/init.d/boinc-client
++	if [ -d /etc/init.d ] ; then \
++		$(INSTALL) -d $(DESTDIR)$(sysconfdir)/init.d ; \
++		$(INSTALL) -b boinc-client $(DESTDIR)$(sysconfdir)/init.d/boinc-client ; \
++	fi
++	if [ -d /usr/lib/systemd/system ] ; then \
++		$(INSTALL) -b boinc-client.service $(DESTDIR)/usr/lib/systemd/system/boinc-client.service ; \
++	elif [ -d /lib/systemd/system ] ; then \
++		$(INSTALL) -b boinc-client.service $(DESTDIR)/lib/systemd/system/boinc-client.service ; \
++	fi
+ 	if [ -d /etc/sysconfig ] ; then \
+ 	  $(INSTALL) -d $(DESTDIR)$(sysconfdir)/sysconfig ; \
+ 	  $(INSTALL) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/sysconfig/boinc-client ; \
+@@ -15,3 +22,6 @@ install-exec-hook:
+ 	  $(INSTALL) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/boinc-client.conf ; \
+ 	fi
+ 
++clean:
++	rm boinc-client.service
++	rm boinc-client
+diff --git a/client/scripts/boinc-client.service.in b/client/scripts/boinc-client.service.in
+new file mode 100644
+index 0000000000..2c424ffb5d
+--- /dev/null
++++ b/client/scripts/boinc-client.service.in
+@@ -0,0 +1,21 @@
++[Unit]
++Description=Berkeley Open Infrastructure Network Computing Client
++Documentation=man:boinc(1)
++After=network-online.target
++
++[Service]
++Type=simple
++Nice=19
++User=boinc
++WorkingDirectory=/var/lib/boinc-client
++EnvironmentFile=-/etc/sysconfig/boinc-client
++EnvironmentFile=-/etc/default/boinc-client
++EnvironmentFile=-/etc/boinc-client.conf
++ExecStart=@exec_prefix@/bin/boinc
++ExecStop=@exec_prefix@/bin/boinccmd --quit
++ExecReload=@exec_prefix@/bin/boinccmd --read_cc_config
++ExecStopPost=/bin/rm -f /var/lib/boinc-client/lockfile
++IOSchedulingClass=idle
++
++[Install]
++WantedBy=multi-user.target
+diff --git a/configure.ac b/configure.ac
+index 8e2115385c..d1a0654e61 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1302,6 +1302,7 @@ AC_CONFIG_FILES([
+                  client/win/boinc_path_config.py:py/boinc_path_config.py.in
+                  client/scripts/Makefile
+                  client/scripts/boinc-client
++                 client/scripts/boinc-client.service
+                  db/Makefile
+                  doc/Makefile
+                  doc/manpages/Makefile
diff --git a/debian/patches/series b/debian/patches/series
index fead15c..6549ca8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -32,3 +32,4 @@ static_scientific_apps.patch
 0001-Fix-build-with-new-glibc-2.26.patch
 hurd-fixes.patch
 use-wxhtmlwindow-instead-of-wxwebview.patch
+2260.patch
diff --git a/debian/rules b/debian/rules
index 0690903..3e0457a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -183,6 +183,8 @@ $(shell sed 's/^@//' -i debian/control)
 CFGFLAGS_boinc-client = \
   $(TYPE_FLAGS) \
   --prefix=/usr \
+  --bindir=/usr/bin \
+  --localstatedir=/var/lib \
   $(ENABLE_CLIENT) \
   $(ENABLE_SERVER) \
   --disable-fcgi \
@@ -379,6 +381,7 @@ SAMPLES=samples/sleeper/sleeper samples/worker/worker samples/example_app/uc2 sa
 override_dh_auto_install-indep:
 
 override_dh_auto_install-arch: update-boinc-applinks.1
+	mkdir -p $(CURDIR)/debian/tmp/lib/systemd/system
 	dh_auto_install
 ifeq (,$(ENABLE_SERVER_TEST))
 	echo "I: Installing example scientific applications"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-boinc/boinc.git



More information about the pkg-boinc-commits mailing list