[Debian-ha-commits] [pcs] 01/05: Update patch 0001 with a fail-safe for when systemd is not running
Richard Winters
devrik-guest at moszumanska.debian.org
Fri May 8 10:41:46 UTC 2015
This is an automated email from the git hooks/post-receive script.
devrik-guest pushed a commit to branch master
in repository pcs.
commit 60c9282b843291c2cfdff04e133e193d051156cb
Author: Richard B Winters <rik at mmogp.com>
Date: Fri May 8 05:38:43 2015 -0400
Update patch 0001 with a fail-safe for when systemd is not running
- When systemd is not running, the command used to check for
it will not work, we'll check to see if systemd is
installed by executing grep on apt-cache policy
Change-Id: Ibb97e2d0e88a5b07c0ccd58ded7a7d55e74adf4d
Signed-off-by: Richard B Winters <rik at mmogp.com>
---
...Streamline-upstream-for-compatibility-with-Debian.patch | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/debian/patches/0001-Streamline-upstream-for-compatibility-with-Debian.patch b/debian/patches/0001-Streamline-upstream-for-compatibility-with-Debian.patch
index bbf1f6e..83b6f3f 100644
--- a/debian/patches/0001-Streamline-upstream-for-compatibility-with-Debian.patch
+++ b/debian/patches/0001-Streamline-upstream-for-compatibility-with-Debian.patch
@@ -26,13 +26,13 @@ Summary of Changes for Debian:
Change-Id: Ie06f5ed5232fbf00881f7c4a45c00a7822645d4c
Signed-off-by: Richard B Winters <rik at mmogp.com>
---
- Makefile | 94 ++++++++++++++++++---
+ Makefile | 98 +++++++++++++++++++---
pcs/settings.py.i386-linux-gnu.debian | 19 +++++
pcs/settings.py.x86_64-linux-gnu.debian | 19 +++++
pcsd/pcsd.debian | 141 ++++++++++++++++++++++++++++++++
pcsd/pcsd.pam.debian | 5 ++
pcsd/pcsd.service.debian | 9 ++
- 6 files changed, 277 insertions(+), 10 deletions(-)
+ 6 files changed, 281 insertions(+), 10 deletions(-)
create mode 100644 pcs/settings.py.i386-linux-gnu.debian
create mode 100644 pcs/settings.py.x86_64-linux-gnu.debian
create mode 100755 pcsd/pcsd.debian
@@ -40,7 +40,7 @@ Signed-off-by: Richard B Winters <rik at mmogp.com>
create mode 100644 pcsd/pcsd.service.debian
diff --git a/Makefile b/Makefile
-index c37373b..83b2432 100644
+index c37373b..576336b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,21 @@
@@ -65,7 +65,7 @@ index c37373b..83b2432 100644
ifndef PYTHON_SITELIB
PYTHON_SITELIB=$(shell python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
endif
-@@ -8,25 +26,54 @@ ifeq ($(PYTHON_SITELIB), /usr/lib/python2.7/dist-packages)
+@@ -8,25 +26,58 @@ ifeq ($(PYTHON_SITELIB), /usr/lib/python2.7/dist-packages)
EXTRA_SETUP_OPTS="--install-layout=deb"
endif
@@ -76,6 +76,10 @@ index c37373b..83b2432 100644
+
+ifeq ($(IS_DEBIAN),true)
+ IS_SYSTEMCTL = $(shell if ps -p 1 -o comm= | grep -q -i "systemd" ; then echo true; else echo false; fi)
++ # Fail-safe, just in case systemd is not running (relevent mostly for building in docker container)
++ ifeq ($(IS_SYSTEMCTL),false)
++ IS_SYSTEMCTL = $(shell if apt-cache policy systemd | grep -q -i "(none)" ; then echo false; else echo true; fi)
++ endif
else
- ifeq ("$(wildcard /bin/systemctl)","/usr/bin/systemctl")
+ ifeq ("$(wildcard /usr/bin/systemctl)","/usr/bin/systemctl")
@@ -123,7 +127,7 @@ index c37373b..83b2432 100644
install: bash_completion
python setup.py install --prefix ${DESTDIR}${PREFIX} ${EXTRA_SETUP_OPTS}
mkdir -p ${DESTDIR}${PREFIX}/sbin/
-@@ -34,30 +81,57 @@ install: bash_completion
+@@ -34,30 +85,57 @@ install: bash_completion
ln -fs ${PYTHON_SITELIB}/pcs/pcs.py ${DESTDIR}${PREFIX}/sbin/pcs
install -D pcs/bash_completion.d.pcs ${DESTDIR}/etc/bash_completion.d/pcs
install -m644 -D pcs/pcs.8 ${DESTDIR}/${MANDIR}/man8/pcs.8
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/pcs.git
More information about the Debian-HA-Commits
mailing list