[Debian-ha-commits] [cluster-glue] 06/06: Add patch by Robert Millan and Gabriele Giacone to support kfreebsd and hurd. Thanks! Closes: #650820.
Christoph Berg
myon at debian.org
Fri Mar 25 18:38:10 UTC 2016
This is an automated email from the git hooks/post-receive script.
myon pushed a commit to branch master
in repository cluster-glue.
commit 3614f8bb6b6284a2f9554a657e569c0e209920e9
Author: Christoph Berg <myon at debian.org>
Date: Fri Mar 25 19:35:46 2016 +0100
Add patch by Robert Millan and Gabriele Giacone to support kfreebsd and hurd. Thanks! Closes: #650820.
---
debian/changelog | 8 +++++---
debian/control | 6 +++---
debian/patches/hurd.diff | 38 ++++++++++++++++++++++++++++++++++++++
debian/patches/kfbsd.diff | 11 +++++++++++
debian/patches/series | 2 ++
debian/rules | 8 +++++++-
6 files changed, 66 insertions(+), 7 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index f2a2968..621fc83 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,16 +1,18 @@
-cluster-glue (1.0.12-2) UNRELEASED; urgency=medium
+cluster-glue (1.0.12-2) unstable; urgency=medium
* Remove old transitional packages libcluster-glue and libcluster-glue-dev.
* Remove iproute from B-D. Closes: #753696.
- * FTBFS due to openipmi problems resolved now. Closes: #818523.
* Add bzip2 to cluster-glue dependencies. Closes: #613562.
* Add ipmitool to cluster-glue recommendations. Closes: #630718.
* Create hacluster user in cluster-glue.postinst and chown the
/var/lib/heartbeat/cores/ directories to hacluster and nobody.
Closes: #759473.
+ * Add patch by Robert Millan and Gabriele Giacone to support kfreebsd and
+ hurd. Thanks! Closes: #650820.
+ * FTBFS due to openipmi problems resolved now. Closes: #818523.
* Update list of Uploaders.
- -- Christoph Berg <myon at debian.org> Thu, 24 Mar 2016 21:42:27 +0100
+ -- Christoph Berg <myon at debian.org> Fri, 25 Mar 2016 19:35:29 +0100
cluster-glue (1.0.12-1) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index 86fa755..1e25922 100644
--- a/debian/control
+++ b/debian/control
@@ -27,10 +27,10 @@ Build-Depends: debhelper (>= 9),
libltdl3-dev,
libnet1-dev,
libncurses5-dev,
- libopenhpi-dev,
- libopenipmi-dev,
+ libopenhpi-dev [!hurd-any],
+ libopenipmi-dev [!hurd-any],
libpam0g-dev,
- libsensors4-dev | libsensors-dev,
+ libsensors4-dev [!hurd-any] | libsensors-dev [!hurd-any],
libtool,
libsnmp-dev,
libxml2-dev,
diff --git a/debian/patches/hurd.diff b/debian/patches/hurd.diff
new file mode 100644
index 0000000..c89a9cd
--- /dev/null
+++ b/debian/patches/hurd.diff
@@ -0,0 +1,38 @@
+--- a/lib/clplumbing/cl_pidfile.c
++++ b/lib/clplumbing/cl_pidfile.c
+@@ -79,7 +79,11 @@ static int IsRunning(long pid)
+ int rc = 0;
+ long mypid;
+ int running = 0;
++#ifdef __GNU__
++ char proc_path[4096], exe_path[4096], myexe_path[4096];
++#else
+ char proc_path[PATH_MAX], exe_path[PATH_MAX], myexe_path[PATH_MAX];
++#endif
+
+ /* check if pid is running */
+ if (CL_KILL(pid, 0) < 0 && errno == ESRCH) {
+@@ -93,7 +97,11 @@ static int IsRunning(long pid)
+ /* check to make sure pid hasn't been reused by another process */
+ snprintf(proc_path, sizeof(proc_path), "/proc/%lu/exe", pid);
+
++#ifdef __GNU__
++ rc = readlink(proc_path, exe_path, sizeof(exe_path)-1);
++#else
+ rc = readlink(proc_path, exe_path, PATH_MAX-1);
++#endif
+ if(rc < 0) {
+ cl_perror("Could not read from %s", proc_path);
+ goto bail;
+@@ -103,7 +111,11 @@ static int IsRunning(long pid)
+ mypid = (unsigned long) getpid();
+
+ snprintf(proc_path, sizeof(proc_path), "/proc/%lu/exe", mypid);
++#ifdef __GNU__
++ rc = readlink(proc_path, myexe_path, sizeof(myexe_path)-1);
++#else
+ rc = readlink(proc_path, myexe_path, PATH_MAX-1);
++#endif
+ if(rc < 0) {
+ cl_perror("Could not read from %s", proc_path);
+ goto bail;
diff --git a/debian/patches/kfbsd.diff b/debian/patches/kfbsd.diff
new file mode 100644
index 0000000..82fa690
--- /dev/null
+++ b/debian/patches/kfbsd.diff
@@ -0,0 +1,11 @@
+--- a/lib/clplumbing/ipcsocket.c
++++ b/lib/clplumbing/ipcsocket.c
+@@ -2406,7 +2406,7 @@ socket_verify_auth(struct IPC_CHANNEL* c
+
+ #define EXTRASPACE 0
+
+-#ifdef HAVE_STRUCT_CMSGCRED
++#if defined(HAVE_STRUCT_CMSGCRED) || defined( __FreeBSD_kernel__) || defined(__GNU__)
+ /* FreeBSD */
+ typedef struct cmsgcred Cred;
+ # define crRuid cmcred_uid
diff --git a/debian/patches/series b/debian/patches/series
index aacc9e8..4d9eb43 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,5 @@
0003-Remove-.hgtags-from-source.patch
0004-Remove-.hgignore-from-source.patch
0005-Remove-.hgsigs-from-source.patch
+kfbsd.diff
+hurd.diff
diff --git a/debian/rules b/debian/rules
index cc5e883..4e96235 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,7 +14,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# main packaging script based on dh7 syntax
%:
- dh $@ --with autoreconf,python2,systemd --fail-missing --link-doc=cluster-glue
+ dh $@ --with autoreconf,python2,systemd --link-doc=cluster-glue
override_dh_autoreconf:
dh_autoreconf ./autogen.sh
@@ -30,6 +30,12 @@ override_dh_auto_install:
sed -i "/dependency_libs/ s/'.*'/''/" $$file ; \
done
+ifeq (hurd,$(shell dpkg-architecture -qDEB_HOST_ARCH_OS))
+EXCLUDE=-Xbladehpi -Xipmilan
+endif
+override_dh_install:
+ dh_install --fail-missing $(EXCLUDE)
+
override_dh_installinit:
dh_installinit --name=logd -pcluster-glue -u 'defaults 20 32'
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/cluster-glue.git
More information about the Debian-HA-Commits
mailing list