diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/01_docbook_patch.patch | 16 | ||||
-rw-r--r-- | debian/patches/exportfs-fsid-optional.patch | 46 | ||||
-rw-r--r-- | debian/patches/findif-loopback.patch | 48 | ||||
-rw-r--r-- | debian/patches/gitignore.patch | 27 | ||||
-rw-r--r-- | debian/patches/ipv6-linux-only | 19 | ||||
-rw-r--r-- | debian/patches/mysql-path.patch | 28 | ||||
-rw-r--r-- | debian/patches/no-dirty-version | 27 | ||||
-rw-r--r-- | debian/patches/ocft-configs.patch | 122 | ||||
-rw-r--r-- | debian/patches/reproducible.patch | 19 | ||||
-rw-r--r-- | debian/patches/series | 10 | ||||
-rw-r--r-- | debian/patches/var-run.patch | 16 |
11 files changed, 378 insertions, 0 deletions
diff --git a/debian/patches/01_docbook_patch.patch b/debian/patches/01_docbook_patch.patch new file mode 100644 index 0000000..b7a44e1 --- /dev/null +++ b/debian/patches/01_docbook_patch.patch @@ -0,0 +1,16 @@ +Description: Use local stylesheet prefix +Author: Martin Loschwitz <madkiss@debian.org> +Last-Update: 2011-10-20 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/doc/man/Makefile.am ++++ b/doc/man/Makefile.am +@@ -26,7 +26,7 @@ + + CLEANFILES = $(man_MANS) $(xmlfiles) metadata-*.xml + +-STYLESHEET_PREFIX ?= http://docbook.sourceforge.net/release/xsl/current ++STYLESHEET_PREFIX ?= /usr/share/xml/docbook/stylesheet/docbook-xsl + MANPAGES_STYLESHEET ?= $(STYLESHEET_PREFIX)/manpages/docbook.xsl + HTML_STYLESHEET ?= $(STYLESHEET_PREFIX)/xhtml/docbook.xsl + FO_STYLESHEET ?= $(STYLESHEET_PREFIX)/fo/docbook.xsl diff --git a/debian/patches/exportfs-fsid-optional.patch b/debian/patches/exportfs-fsid-optional.patch new file mode 100644 index 0000000..9889981 --- /dev/null +++ b/debian/patches/exportfs-fsid-optional.patch @@ -0,0 +1,46 @@ +From 1d1481aa6d848efab4d398ad6e74d80b5b32549f Mon Sep 17 00:00:00 2001 +From: Valentin Vidic <vvidic@debian.org> +Date: Wed, 1 Nov 2023 18:25:45 +0100 +Subject: [PATCH] exportfs: remove test for "fsid=" parameter + +fsid parameter is now considered optional. +--- + tools/ocft/exportfs | 5 ----- + tools/ocft/exportfs-multidir | 5 ----- + 2 files changed, 10 deletions(-) + +diff --git a/tools/ocft/exportfs b/tools/ocft/exportfs +index 285a4b8e..1ec3d4c3 100644 +--- a/tools/ocft/exportfs ++++ b/tools/ocft/exportfs +@@ -28,11 +28,6 @@ CASE "check base env" + Include prepare + AgentRun start OCF_SUCCESS + +-CASE "check base env: no 'OCF_RESKEY_fsid'" +- Include prepare +- Env OCF_RESKEY_fsid= +- AgentRun start OCF_ERR_CONFIGURED +- + CASE "check base env: invalid 'OCF_RESKEY_directory'" + Include prepare + Env OCF_RESKEY_directory=/no_such +diff --git a/tools/ocft/exportfs-multidir b/tools/ocft/exportfs-multidir +index 00e41f08..ac6d5c7f 100644 +--- a/tools/ocft/exportfs-multidir ++++ b/tools/ocft/exportfs-multidir +@@ -28,11 +28,6 @@ CASE "check base env" + Include prepare + AgentRun start OCF_SUCCESS + +-CASE "check base env: no 'OCF_RESKEY_fsid'" +- Include prepare +- Env OCF_RESKEY_fsid= +- AgentRun start OCF_ERR_CONFIGURED +- + CASE "check base env: invalid 'OCF_RESKEY_directory'" + Include prepare + Env OCF_RESKEY_directory=/no_such +-- +2.39.2 + diff --git a/debian/patches/findif-loopback.patch b/debian/patches/findif-loopback.patch new file mode 100644 index 0000000..4fe1280 --- /dev/null +++ b/debian/patches/findif-loopback.patch @@ -0,0 +1,48 @@ +From e4f84ae185b6943d1ff461d53c7f1b5295783086 Mon Sep 17 00:00:00 2001 +From: Valentin Vidic <vvidic@valentin-vidic.from.hr> +Date: Wed, 1 Nov 2023 19:35:21 +0100 +Subject: [PATCH] findif.sh: fix loopback handling + +tools/ocft/IPaddr2 fails the loopback test because of the missing +table local parameter: + +$ ip -o -f inet route list match 127.0.0.3 scope host + +$ ip -o -f inet route list match 127.0.0.3 table local scope host +local 127.0.0.0/8 dev lo proto kernel src 127.0.0.1 + +Also rename the function because it is called only in for the special +loopback address case. +--- + heartbeat/findif.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/heartbeat/findif.sh b/heartbeat/findif.sh +index 5f1c19ec..7c766e6e 100644 +--- a/heartbeat/findif.sh ++++ b/heartbeat/findif.sh +@@ -29,10 +29,10 @@ prefixcheck() { + fi + return 0 + } +-getnetworkinfo() ++getloopbackinfo() + { + local line netinfo +- ip -o -f inet route list match $OCF_RESKEY_ip scope host | (while read line; ++ ip -o -f inet route list match $OCF_RESKEY_ip table local scope host | (while read line; + do + netinfo=`echo $line | awk '{print $2}'` + case $netinfo in +@@ -222,7 +222,7 @@ findif() + if [ $# = 0 ] ; then + case $OCF_RESKEY_ip in + 127.*) +- set -- `getnetworkinfo` ++ set -- `getloopbackinfo` + shift;; + esac + fi +-- +2.39.2 + diff --git a/debian/patches/gitignore.patch b/debian/patches/gitignore.patch new file mode 100644 index 0000000..93123dc --- /dev/null +++ b/debian/patches/gitignore.patch @@ -0,0 +1,27 @@ +Description: Fix .gitignore to work with debian package + Remove entries that interfere with maintaining debian/patches + in the Debian HA git repository. +Author: Valentin Vidic <Valentin.Vidic@CARNet.hr> +Forwarded: not-needed +Last-Update: 2017-08-03 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/.gitignore ++++ b/.gitignore +@@ -123,7 +123,6 @@ + MISC_ERRORS + cscope.files + cscope.out +-patches + updates + logs + +@@ -135,8 +134,6 @@ + *.gz + *.xz + *.sed +-*.diff +-*.patch + *.gres + *~ + diff --git a/debian/patches/ipv6-linux-only b/debian/patches/ipv6-linux-only new file mode 100644 index 0000000..69f1e9e --- /dev/null +++ b/debian/patches/ipv6-linux-only @@ -0,0 +1,19 @@ +Description: Disable IPv6addr and send_ua on non-Linux + They need SIOCSIFADDR and SIOGIFINDEX. +Author: Christoph Berg <myon@debian.org> +Last-Update: 2016-04-08 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/configure.ac ++++ b/configure.ac +@@ -808,8 +808,8 @@ + dnl ************************************************************************ + dnl * Check for netinet/icmp6.h to enable the IPv6addr resource agent + AC_CHECK_HEADERS(netinet/icmp6.h,[],[],[#include <sys/types.h>]) +-AM_CONDITIONAL(USE_IPV6ADDR_AGENT, test "$ac_cv_header_netinet_icmp6_h" = yes && test "$ac_cv_header_heartbeat_glue_config_h" = yes) +-AM_CONDITIONAL(IPV6ADDR_COMPATIBLE, test "$ac_cv_header_netinet_icmp6_h" = yes) ++AM_CONDITIONAL(USE_IPV6ADDR_AGENT, test "$ac_cv_header_netinet_icmp6_h" = yes && test "$ac_cv_header_heartbeat_glue_config_h" = yes && test $(uname) = Linux) ++AM_CONDITIONAL(IPV6ADDR_COMPATIBLE, test "$ac_cv_header_netinet_icmp6_h" = yes && test $(uname) = Linux) + + dnl ======================================================================== + dnl Compiler flags diff --git a/debian/patches/mysql-path.patch b/debian/patches/mysql-path.patch new file mode 100644 index 0000000..0a04b5a --- /dev/null +++ b/debian/patches/mysql-path.patch @@ -0,0 +1,28 @@ +Description: fix mysql log and sock paths for Debian +Author: Valentin Vidic <Valentin.Vidic@CARNet.hr> +Last-Update: 2017-12-03 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/heartbeat/mysql-common.sh ++++ b/heartbeat/mysql-common.sh +@@ -30,15 +30,15 @@ + OCF_RESKEY_socket_default="/var/run/mysql/mysql.sock" + else + if [ "$OCF_RESKEY_binary_default" = "" ]; then +- OCF_RESKEY_binary_default="/usr/bin/safe_mysqld" ++ OCF_RESKEY_binary_default="/usr/bin/mysqld_safe" + fi +- OCF_RESKEY_config_default="/etc/my.cnf" ++ OCF_RESKEY_config_default="/etc/mysql/my.cnf" + OCF_RESKEY_datadir_default="/var/lib/mysql" + OCF_RESKEY_user_default="mysql" + OCF_RESKEY_group_default="mysql" +- OCF_RESKEY_log_default="/var/log/mysqld.log" +- OCF_RESKEY_pid_default="/var/run/mysql/mysqld.pid" +- OCF_RESKEY_socket_default="/var/lib/mysql/mysql.sock" ++ OCF_RESKEY_log_default="/var/log/mysql/error.log" ++ OCF_RESKEY_pid_default="/var/run/mysqld/mysqld.pid" ++ OCF_RESKEY_socket_default="/var/run/mysqld/mysqld.sock" + fi + OCF_RESKEY_client_binary_default="mysql" + OCF_RESKEY_test_user_default="root" diff --git a/debian/patches/no-dirty-version b/debian/patches/no-dirty-version new file mode 100644 index 0000000..b03f2a3 --- /dev/null +++ b/debian/patches/no-dirty-version @@ -0,0 +1,27 @@ +Description: Never use a -dirty version in git builds +Author: Christoph Berg <christoph.berg@credativ.de> +Last-Update: 2016-02-02 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/make/git-version-gen ++++ b/make/git-version-gen +@@ -136,19 +136,6 @@ + + v=`echo "$v" |sed 's/^v//'` + +-# Don't declare a version "dirty" merely because a time stamp has changed. +-git update-index --refresh > /dev/null 2>&1 +- +-dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty= +-case "$dirty" in +- '') ;; +- *) # Append the suffix only if there isn't one already. +- case $v in +- *-dirty) ;; +- *) v="$v-dirty" ;; +- esac ;; +-esac +- + # Omit the trailing newline, so that m4_esyscmd can use the result directly. + echo "$v" | tr -d "$nl" + diff --git a/debian/patches/ocft-configs.patch b/debian/patches/ocft-configs.patch new file mode 100644 index 0000000..80817fa --- /dev/null +++ b/debian/patches/ocft-configs.patch @@ -0,0 +1,122 @@ +Description: Make agent tests work on Debian + Patch package names and other details in ocft test + configs to be usable by debian/tests. +Author: Valentin Vidic <Valentin.Vidic@CARNet.hr> +Forwarded: not-needed +Last-Update: 2017-01-12 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/tools/ocft/mysql ++++ b/tools/ocft/mysql +@@ -3,7 +3,7 @@ + CONFIG + Agent mysql + AgentRoot /usr/lib/ocf/resource.d/heartbeat +- InstallPackage mysql ++ InstallPackage default-mysql-server + HangTimeout 20 + + SETUP-AGENT +--- a/tools/ocft/named ++++ b/tools/ocft/named +@@ -6,8 +6,8 @@ + CONFIG + Agent named + AgentRoot /usr/lib/ocf/resource.d/heartbeat +- InstallPackage bind +- InstallPackage bind-utils ++ InstallPackage bind9 ++ InstallPackage bind9-utils + + SETUP-AGENT + /etc/init.d/named start +@@ -15,6 +15,7 @@ + + CASE-BLOCK crm_setting + Env OCF_RESKEY_CRM_meta_timeout=15000 ++ Env OCF_RESKEY_named_user=bind + + CASE-BLOCK default_status + AgentRun stop +--- a/tools/ocft/iscsi ++++ b/tools/ocft/iscsi +@@ -3,7 +3,7 @@ + CONFIG + Agent iscsi + AgentRoot /usr/lib/ocf/resource.d/heartbeat +- InstallPackage open-iscsi targetcli ++ InstallPackage open-iscsi targetcli-fb + HangTimeout 20 + + VARIABLE +@@ -24,11 +24,6 @@ + else + /etc/init.d/open-iscsi start + fi +- if systemctl list-unit-files 2>/dev/null | fgrep -q target.service; then +- systemctl start target.service +- else +- /etc/init.d/target start +- fi + export OCF_RESKEY_iqn=$OCFT_target + export OCF_RESKEY_portals=$OCFT_portal + export OCF_RESKEY_target_iqn=$OCFT_target +@@ -45,9 +40,6 @@ + export OCF_RESKEY_lun=1 + /usr/lib/ocf/resource.d/heartbeat/iSCSILogicalUnit stop + /usr/lib/ocf/resource.d/heartbeat/iSCSITarget stop +- if systemctl list-unit-files 2>/dev/null | fgrep -q target.service; then +- systemctl stop target.service +- fi + loopbackeddev unmake $OCFT_disk + + CASE-BLOCK required_args +--- a/tools/ocft/MailTo ++++ b/tools/ocft/MailTo +@@ -3,7 +3,7 @@ + CONFIG + Agent MailTo + AgentRoot /usr/lib/ocf/resource.d/heartbeat +- InstallPackage mailx ++ InstallPackage bsd-mailx + HangTimeout 20 + + CASE-BLOCK required_args +--- a/tools/ocft/nfsserver ++++ b/tools/ocft/nfsserver +@@ -11,6 +11,7 @@ + if test -f /etc/init.d/nfsserver; then + INITSCRIPT="/etc/init.d/nfsserver" + fi ++ service nfs-kernel-server stop + true + + CASE-BLOCK required_args +--- a/tools/ocft/pgsql ++++ b/tools/ocft/pgsql +@@ -3,15 +3,22 @@ + CONFIG + Agent pgsql + AgentRoot /usr/lib/ocf/resource.d/heartbeat +- InstallPackage postgresql-server ++ InstallPackage postgresql + HangTimeout 20 + + SETUP-AGENT +- /etc/init.d/postgresql start +- /etc/init.d/postgresql stop ++ # nothing ++ ++VARIABLE ++ cluster_name="$(pg_conftool -s show cluster_name)" ++ cluster_version="$(pg_conftool -s show cluster_name | cut -d/ -f1)" + + CASE-BLOCK crm_setting + Env OCF_RESKEY_CRM_meta_timeout=15000 ++ Env OCF_RESKEY_pgctl=/usr/lib/postgresql/$cluster_version/bin/pg_ctl ++ Env OCF_RESKEY_pgdata=/var/lib/postgresql/$cluster_name ++ Env OCF_RESKEY_config=/etc/postgresql/$cluster_name/postgresql.conf ++ Env OCF_RESKEY_socketdir=/var/run/postgresql + + CASE-BLOCK default_status + AgentRun stop diff --git a/debian/patches/reproducible.patch b/debian/patches/reproducible.patch new file mode 100644 index 0000000..dd1b482 --- /dev/null +++ b/debian/patches/reproducible.patch @@ -0,0 +1,19 @@ +Description: Try to make the package build reproducible + Some compile options cause the build to be unreproducible: + -ggdb3: debug info and Build ID in the binaries change +Author: Valentin Vidic <Valentin.Vidic@CARNet.hr> +Forwarded: not-needed +Last-Update: 2017-08-22 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/configure.ac ++++ b/configure.ac +@@ -835,7 +835,7 @@ + CFLAGS="$CFLAGS -g" + enable_fatal_warnings=no + else +- CFLAGS="$CFLAGS -ggdb3" ++ CFLAGS="$CFLAGS -ggdb2" + + # We had to eliminate -Wnested-externs because of libtool changes + # Also remove -Waggregate-return because we use one libnet diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..7b5c47c --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,10 @@ +01_docbook_patch.patch +mysql-path.patch +no-dirty-version +ipv6-linux-only +ocft-configs.patch +gitignore.patch +reproducible.patch +var-run.patch +exportfs-fsid-optional.patch +findif-loopback.patch diff --git a/debian/patches/var-run.patch b/debian/patches/var-run.patch new file mode 100644 index 0000000..d66cd57 --- /dev/null +++ b/debian/patches/var-run.patch @@ -0,0 +1,16 @@ +Description: Use /run instead of /var/run +Author: Valentin Vidic <vvidic@debian.org> +Last-Update: 2018-12-09 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/ldirectord/systemd/ldirectord.service.in ++++ b/ldirectord/systemd/ldirectord.service.in +@@ -8,7 +8,7 @@ + ExecStop=@sbindir@/ldirectord stop + ExecStopPost=@RM@ -f /var/lock/subsys/ldirectord + ExecReload=@sbindir@/ldirectord reload +-PIDFile=/var/run/ldirectord.ldirectord.pid ++PIDFile=/run/ldirectord.ldirectord.pid + Type=forking + KillMode=none + |