[Debian-ha-commits] [pcs] 02/05: Update patch 0001 with a proper check for systemd and an override
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 471e8cd11e5d975f37a1108e189a77116e645403
Author: Richard B Winters <rik at mmogp.com>
Date: Fri May 8 06:11:30 2015 -0400
Update patch 0001 with a proper check for systemd and an override
- When systemd is not running, the command used to check for
it will not work, I also used the wrong method of testing
for systemd. This is resolved
- There is a variable added to allow overriding of the
IS_SYSTEMCTL variable if systemd is not found on Debian
- Rules updated to take advantage of the new
SYSTEMCTL_OVERRIDE variable
Change-Id: I0501dd948af1effb657ca27cb73432b769c8da1d
Signed-off-by: Richard B Winters <rik at mmogp.com>
---
...amline-upstream-for-compatibility-with-Debian.patch | 18 ++++++++++--------
debian/rules | 3 ++-
2 files changed, 12 insertions(+), 9 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 83b6f3f..b0dd164 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 | 98 +++++++++++++++++++---
+ Makefile | 100 +++++++++++++++++++---
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, 281 insertions(+), 10 deletions(-)
+ 6 files changed, 283 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..576336b 100644
+index c37373b..6d2a295 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,21 @@
@@ -65,7 +65,7 @@ index c37373b..576336b 100644
ifndef PYTHON_SITELIB
PYTHON_SITELIB=$(shell python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
endif
-@@ -8,25 +26,58 @@ ifeq ($(PYTHON_SITELIB), /usr/lib/python2.7/dist-packages)
+@@ -8,25 +26,60 @@ ifeq ($(PYTHON_SITELIB), /usr/lib/python2.7/dist-packages)
EXTRA_SETUP_OPTS="--install-layout=deb"
endif
@@ -75,10 +75,12 @@ index c37373b..576336b 100644
- IS_SYSTEMCTL=true
+
+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)
++ IS_SYSTEMCTL = $(shell if [ -d /var/run/systemd/system ] ; then echo true ; else echo false; fi)
+ ifeq ($(IS_SYSTEMCTL),false)
-+ IS_SYSTEMCTL = $(shell if apt-cache policy systemd | grep -q -i "(none)" ; then echo false; else echo true; fi)
++ ifeq ($(SYSTEMCTL_OVERRIDE),true)
++ echo "Warning: systemd is not detected... installing service file anyway..."
++ IS_SYSTEMCTL=true
++ endif
+ endif
else
- ifeq ("$(wildcard /bin/systemctl)","/usr/bin/systemctl")
@@ -127,7 +129,7 @@ index c37373b..576336b 100644
install: bash_completion
python setup.py install --prefix ${DESTDIR}${PREFIX} ${EXTRA_SETUP_OPTS}
mkdir -p ${DESTDIR}${PREFIX}/sbin/
-@@ -34,30 +85,57 @@ install: bash_completion
+@@ -34,30 +87,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
diff --git a/debian/rules b/debian/rules
index 1ec14da..931d18c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -33,7 +33,8 @@ override_dh_auto_install:
DESTDIR=$(CURDIR)/debian/tmp \
PYTHON_SITELIB=/usr/lib/python2.7/dist-packages \
BUILD_GEMS=false \
- systemddir=/lib/systemd
+ systemddir=/lib/systemd \
+ SYSTEMCTL_OVERRIDE=true
override_dh_python2:
dh_python2 -p pcs --skip-private
--
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