Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions libs/libqb/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (C) 2025-2026 S Shaikh <sshaikh@hotmail.com>
# Copyright (C) 2026 Sven Kirmess <sven.kirmess@kzone.ch>

include $(TOPDIR)/rules.mk

PKG_NAME:=libqb
PKG_VERSION:=2.0.9
PKG_RELEASE:=1

PKG_SOURCE:=libqb-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/ClusterLabs/libqb/releases/download/v$(PKG_VERSION)/
PKG_HASH:=61a83753199c86a47a69f615778e81b56ac0a58d07751230444e76500b6b210b
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1

PKG_MAINTAINER:=S Shaikh <sshaikh@hotmail.com>, Sven Kirmess <sven.kirmess@kzone.ch>
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING

include $(INCLUDE_DIR)/package.mk

define Package/libqb
SECTION:=libs
CATEGORY:=Libraries
TITLE:=High performance client server reusable library
URL:=https://github.com/ClusterLabs/libqb
endef

define Package/libqb/description
libqb provides high-performance, reusable features for client/server
architecture, including IPC, logging, and ringbuffer. Used by Corosync
and other cluster software.
endef

define Build/InstallDev
Comment thread
skirmess marked this conversation as resolved.
$(INSTALL_DIR) $(1)/usr/include/qb
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/qb/* $(1)/usr/include/qb
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
endef

define Package/libqb/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/qb-blackbox $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,libqb))
39 changes: 39 additions & 0 deletions libs/libqb/patches/0001-configure-remove-libxml2-dependency.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
--- a/configure.ac
+++ b/configure.ac
@@ -177,23 +177,12 @@ if test x"$have_glib" = xyes; then
AC_DEFINE_UNQUOTED([HAVE_GLIB], [1], [We have glib])
fi

-# For building doxygen2man and man pages
-PKG_CHECK_MODULES([libxml], [libxml-2.0])
-
-# if we are not cross-compiling, we can use the locally built
-# version of doxygen2man, otherwise we can look for
-# a locally installed version. If neither are usable, then
-# don´t build the man pages
-if test "x$cross_compiling" = "xno"; then
- AM_CONDITIONAL([BUILD_MAN], [true])
- DOXYGEN2MAN="\$(abs_builddir)/../doxygen2man/doxygen2man"
+# Build man pages using local doxygen2man (avoids need for libxml2 at runtime)
+AC_CHECK_PROGS([DOXYGEN2MAN], [doxygen2man])
+if test "x$DOXYGEN2MAN" = "x"; then
+ AM_CONDITIONAL([BUILD_MAN], [false])
else
- AC_CHECK_PROGS([DOXYGEN2MAN], [doxygen2man])
- if test "x$DOXYGEN2MAN" = "x"; then
- AM_CONDITIONAL([BUILD_MAN], [false])
- else
- AM_CONDITIONAL([BUILD_MAN], [true])
- fi
+ AM_CONDITIONAL([BUILD_MAN], [true])
fi
AC_SUBST(DOXYGEN2MAN)

@@ -861,7 +850,6 @@ AC_CONFIG_FILES([Makefile
tests/Makefile
tests/test.conf
examples/Makefile
- doxygen2man/Makefile
docs/Makefile
docs/man.dox
lib/qblog_script.la:lib/qblog_script.la.in])
11 changes: 11 additions & 0 deletions libs/libqb/patches/0002-makefile-remove-doxygen2man.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,7 +39,7 @@ ACLOCAL_AMFLAGS = -I m4

dist_doc_DATA = COPYING INSTALL README.markdown

-SUBDIRS = include lib doxygen2man docs tools examples
+SUBDIRS = include lib docs tools examples

if ENABLE_TESTS
SUBDIRS += tests
66 changes: 66 additions & 0 deletions net/corosync-qdevice/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright (C) 2025-2026 S Shaikh <sshaikh@hotmail.com>
# Copyright (C) 2026 Sven Kirmess <sven.kirmess@kzone.ch>

include $(TOPDIR)/rules.mk

PKG_NAME:=corosync-qdevice
PKG_VERSION:=3.0.4
PKG_RELEASE:=1

PKG_SOURCE:=corosync-qdevice-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/corosync/corosync-qdevice/releases/download/v$(PKG_VERSION)/
PKG_HASH:=c2821329ed1efd6bf8f82e2878f75ca66889439d27c788785fd0ccc972ac307c
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1

PKG_BUILD_DEPENDS:=nss corosync

PKG_MAINTAINER:=S Shaikh <sshaikh@hotmail.com>, Sven Kirmess <sven.kirmess@kzone.ch>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE

include $(INCLUDE_DIR)/package.mk

define Package/corosync-qdevice
SECTION:=net
CATEGORY:=Network
TITLE:=Corosync QNetd - quorum device daemon
URL:=https://github.com/corosync/corosync-qdevice
DEPENDS:=+libcorosync +libnss +nss-utils +bash
endef

define Package/corosync-qdevice/description
corosync-qnetd daemon providing an additional vote to Corosync/Proxmox
clusters, allowing a 2-node cluster to maintain quorum when one node fails.

NOTE: Proxmox VE users need openssh-sftp-server installed on this
OpenWrt device before running 'pvecm qdevice setup' on the Proxmox node.
It can be removed afterwards.
endef

define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/share/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/corosync-qdevice.pc $(1)/usr/share/pkgconfig
Comment thread
skirmess marked this conversation as resolved.
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
endef

define Package/corosync-qdevice/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/corosync-qdevice.init $(1)/etc/init.d/corosync-qdevice
endef

define Package/corosync-qdevice/postinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ] && ! [ -f "/etc/corosync/qnetd/nssdb/cert9.db" ]; then
/usr/bin/corosync-qnetd-certutil -i
Comment thread
skirmess marked this conversation as resolved.
fi
endef

$(eval $(call BuildPackage,corosync-qdevice))
15 changes: 15 additions & 0 deletions net/corosync-qdevice/files/corosync-qdevice.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh /etc/rc.common

START=99
STOP=99
USE_PROCD=1

SERVICE_DAEMONIZE=1
SERVICE_WRITE_PID=1

start_service() {
procd_open_instance
procd_set_param command /usr/bin/corosync-qnetd -f
Comment thread
skirmess marked this conversation as resolved.
procd_set_param respawn
procd_close_instance
}
16 changes: 16 additions & 0 deletions net/corosync-qdevice/patches/0001-bash-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--- a/qdevices/corosync-qdevice-net-certutil.sh
+++ b/qdevices/corosync-qdevice-net-certutil.sh
@@ -1,4 +1,4 @@
-#!@BASHPATH@
+#!/bin/bash

#
# Copyright (c) 2015-2018 Red Hat, Inc.
--- a/qdevices/corosync-qnetd-certutil.sh
+++ b/qdevices/corosync-qnetd-certutil.sh
@@ -1,4 +1,4 @@
-#!@BASHPATH@
+#!/bin/bash

#
# Copyright (c) 2015-2018 Red Hat, Inc.
20 changes: 20 additions & 0 deletions net/corosync-qdevice/patches/0002-initialize-ca.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/qdevices/corosync-qnetd-certutil.sh
+++ b/qdevices/corosync-qnetd-certutil.sh
@@ -62,6 +62,8 @@ usage() {
}

chown_ref_cfgdir() {
+ # All files owned by root on OpenWRT
+ return
if [ "$UID" == "0" ];then
chown --reference="$CONFIG_DIR" "$@" 2>/dev/null || chown "$(stat -f "%u:%g" "$CONFIG_DIR")" "$@" 2>/dev/null || return $?
fi
@@ -83,7 +85,7 @@ create_new_noise_file() {
if [ ! -e "$noise_file" ];then
echo "Creating new noise file $noise_file"

- (ps -elf; date; w) | sha1sum | (read sha_sum rest; echo $sha_sum) > "$noise_file"
+ (ps w; date) | sha256sum | (read sha_sum rest; echo $sha_sum) > "$noise_file"

chown_ref_cfgdir "$noise_file"
chmod "$(get_perm)" "$noise_file"
76 changes: 76 additions & 0 deletions net/corosync/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Copyright (C) 2025-2026 S Shaikh <sshaikh@hotmail.com>
# Copyright (C) 2026 Sven Kirmess <sven.kirmess@kzone.ch>

include $(TOPDIR)/rules.mk

PKG_NAME:=corosync
PKG_VERSION:=3.1.10
PKG_RELEASE:=1

PKG_SOURCE:=corosync-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/corosync/corosync/releases/download/v$(PKG_VERSION)/
PKG_HASH:=be361c827f99b215b3bd3fa2fb071c03dac6831c2a351963d938caef62604bc8
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1

PKG_BUILD_DEPENDS:=libqb kronosnet

PKG_MAINTAINER:=S Shaikh <sshaikh@hotmail.com>, Sven Kirmess <sven.kirmess@kzone.ch>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE

include $(INCLUDE_DIR)/package.mk

define Package/libcorosync
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Corosync cluster libraries
URL:=https://corosync.github.io/corosync/
DEPENDS:=+kronosnet +libqb
endef

define Package/libcorosync/description
Shared libraries for Corosync cluster engine, including libcorosync_common,
libcfg, libcmap, libcpg, libquorum, libsam, and libvotequorum.
endef

define Package/corosync
SECTION:=net
CATEGORY:=Network
TITLE:=Corosync cluster engine
URL:=https://corosync.github.io/corosync/
DEPENDS:=+libcorosync
endef

define Package/corosync/description
Corosync cluster engine daemon and management tools, providing reliable
messaging, membership, and quorum for high-availability clusters.
endef

define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/corosync
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/corosync/* $(1)/usr/include/corosync/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
endef

define Package/libcorosync/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
endef

define Package/corosync/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
endef

$(eval $(call BuildPackage,libcorosync))
$(eval $(call BuildPackage,corosync))
Loading
Loading