summaryrefslogtreecommitdiff
path: root/package/corosync
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-06-12 16:03:38 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-06-12 16:03:38 +0200
commit47223981bccbf79d81a0b17657539432dacf36e2 (patch)
tree16d8bfea48e7299041b0af03e6a0f5414604e6c7 /package/corosync
parent36f4b43cf5ecb25a02830eed9548acc22a5697a8 (diff)
add pacemaker and update drbd
Diffstat (limited to 'package/corosync')
-rw-r--r--package/corosync/Makefile37
-rw-r--r--package/corosync/files/corosync.conf32
-rw-r--r--package/corosync/files/corosync.conffiles1
-rw-r--r--package/corosync/patches/patch-tools_corosync-keygen_c26
4 files changed, 96 insertions, 0 deletions
diff --git a/package/corosync/Makefile b/package/corosync/Makefile
new file mode 100644
index 000000000..378fd618a
--- /dev/null
+++ b/package/corosync/Makefile
@@ -0,0 +1,37 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= corosync
+PKG_VERSION:= 1.3.1
+PKG_RELEASE:= 1
+PKG_MD5SUM:= c58459a009a3a9d0b9c00e276a190d90
+PKG_DESCR:= Cluster Engine
+PKG_SECTION:= ha
+PKG_URL:= http://www.corosync.org/
+PKG_SITES:= http://openadk.org/distfiles/
+
+PKG_CFLINE_COROSYNC:= select ADK_KERNEL_IP_MULTICAST
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,COROSYNC,corosync,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_ARGS+= --disable-nss
+CONFIGURE_ENV+= ac_cv_func_fnmatch_works=yes
+
+corosync-install:
+ $(INSTALL_DIR) $(IDIR_COROSYNC)/etc/corosync
+ $(CP) ./files/corosync.conf $(IDIR_COROSYNC)/etc/corosync
+ $(INSTALL_DIR) $(IDIR_COROSYNC)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/lib*.so* \
+ $(IDIR_COROSYNC)/usr/lib
+ $(INSTALL_DIR) $(IDIR_COROSYNC)/usr/sbin
+ $(CP) $(WRKINST)/usr/sbin/* \
+ $(IDIR_COROSYNC)/usr/sbin
+ $(INSTALL_DIR) $(IDIR_COROSYNC)/usr/libexec
+ $(CP) $(WRKINST)/usr/libexec/* \
+ $(IDIR_COROSYNC)/usr/libexec
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/corosync/files/corosync.conf b/package/corosync/files/corosync.conf
new file mode 100644
index 000000000..11fd9cf2d
--- /dev/null
+++ b/package/corosync/files/corosync.conf
@@ -0,0 +1,32 @@
+aisexec {
+ user: root
+ group: root
+}
+service {
+ name: pacemaker
+ ver: 0
+}
+totem {
+ version: 2
+ secauth: on
+ threads: 0
+ interface {
+ ringnumber: 0
+ bindnetaddr: 192.168.1.0
+ mcastaddr: 226.94.1.1
+ mcastport: 5405
+ }
+ netmtu: 8800
+}
+logging {
+ debug: off
+ fileline: off
+ to_syslog: yes
+ to_stderr: no
+ syslog_facility: daemon
+ timestamp: on
+}
+amf {
+ mode: disabled
+}
+
diff --git a/package/corosync/files/corosync.conffiles b/package/corosync/files/corosync.conffiles
new file mode 100644
index 000000000..e24947d6b
--- /dev/null
+++ b/package/corosync/files/corosync.conffiles
@@ -0,0 +1 @@
+/etc/corosync/corosync.conf
diff --git a/package/corosync/patches/patch-tools_corosync-keygen_c b/package/corosync/patches/patch-tools_corosync-keygen_c
new file mode 100644
index 000000000..6e147930c
--- /dev/null
+++ b/package/corosync/patches/patch-tools_corosync-keygen_c
@@ -0,0 +1,26 @@
+--- corosync-1.3.1.orig/tools/corosync-keygen.c 2011-04-25 04:37:50.000000000 +0200
++++ corosync-1.3.1/tools/corosync-keygen.c 2011-05-26 07:27:22.000000000 +0200
+@@ -65,11 +65,11 @@ int main (void) {
+ }
+ }
+
+- printf ("Gathering %lu bits for key from /dev/random.\n", (unsigned long)(sizeof (key) * 8));
++ printf ("Gathering %lu bits for key from /dev/urandom.\n", (unsigned long)(sizeof (key) * 8));
+ printf ("Press keys on your keyboard to generate entropy.\n");
+- random_fd = open ("/dev/random", O_RDONLY);
++ random_fd = open ("/dev/urandom", O_RDONLY);
+ if (random_fd == -1) {
+- perror ("Is /dev/random present? Opening /dev/random");
++ perror ("Is /dev/urandom present? Opening /dev/urandom");
+ exit (errno);
+ }
+
+@@ -81,7 +81,7 @@ int main (void) {
+ retry_read:
+ res = read (random_fd, &key[bytes_read], sizeof (key) - bytes_read);
+ if (res == -1) {
+- perror ("Could not read /dev/random");
++ perror ("Could not read /dev/urandom");
+ exit (errno);
+ }
+ bytes_read += res;