[packages/drbd-utils] Up to 9.35.0
arekm
arekm at pld-linux.org
Thu Oct 29 08:31:12 CET 2026
commit fcc8289a0e334c94bc70bf608d9cd8dae523cfb2
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Oct 29 00:53:46 2026 +0100
Up to 9.35.0
drbd-utils-libexec-path.patch | 49 ++++++++++++++++++++++
drbd-utils.spec | 96 +++++++++++++++++++++----------------------
2 files changed, 96 insertions(+), 49 deletions(-)
---
diff --git a/drbd-utils.spec b/drbd-utils.spec
index 8f5bfd7..1816b5d 100644
--- a/drbd-utils.spec
+++ b/drbd-utils.spec
@@ -2,17 +2,17 @@ Summary: Setup tools and scripts for DRBD
Summary(pl.UTF-8): Narzędzie konfiguracyjne i skrypty dla DRBD
Summary(pt_BR.UTF-8): Utilitários para gerenciar dispositivos DRBD
Name: drbd-utils
-Version: 9.28.0
+Version: 9.35.0
Release: 1
License: GPL v2+
Group: Applications/System
#Source0Download: https://linbit.com/linbit-software-download-page-for-linstor-and-drbd-linux-driver/
Source0: https://pkg.linbit.com/downloads/drbd/utils/%{name}-%{version}.tar.gz
-# Source0-md5: 82a8926674de8fd6c3f8305d27a36975
+# Source0-md5: 4840ac860decc13bd73c65053b21bf38
+Patch0: %{name}-libexec-path.patch
URL: http://www.drbd.org/
-BuildRequires: autoconf >= 2.63
+BuildRequires: autoconf >= 2.69
BuildRequires: automake
-BuildRequires: bison
BuildRequires: flex
BuildRequires: gettext-tools
BuildRequires: keyutils-devel
@@ -28,6 +28,7 @@ Requires(postun): /usr/sbin/groupdel
Requires: udev-core >= 85
Provides: group(haclient)
Obsoletes: drbd-udev < 8.4.3
+Obsoletes: drbd-xen < 9.31.0
Obsoletes: drbdsetup < 9
Obsoletes: drbdsetup8 < 9
Conflicts: drbdsetup
@@ -57,7 +58,7 @@ Agenci zasobów DRBD do instalacji klastrowych.
Summary: bash-completion for drbd
Summary(pl.UTF-8): Bashowe uzupełnianie poleceń dla drbd
Group: Applications/Shells
-Requires: bash-completion
+Requires: bash-completion >= 1:2.0
BuildArch: noarch
%description -n bash-completion-drbd
@@ -66,27 +67,15 @@ This package provides bash-completion for drbd.
%description -n bash-completion-drbd -l pl.UTF-8
Ten pakiet dostarcza bashowe uzupełnianie poleceń dla drbd.
-%package -n drbd-xen
-Summary: Xen block device management script for DRBD
-Summary(pl.UTF-8): Skrypt zarządzający urządzeniem blokowym Xen dla DRBD
-Group: Applications/System
-Requires: drbd-utils = %{version}-%{release}
-Requires: xen
-
-%description -n drbd-xen
-This package contains a Xen block device helper script for DRBD,
-capable of promoting and demoting DRBD resources as necessary.
-
-%description -n drbd-xen -l pl.UTF-8
-Ten pakiet zawiera pomocniczy skrypt urządzenia blokowego Xen dla
-DRBD, potrafiący w razie potrzeby promować i degradować zasoby DRBD.
-
%prep
%setup -q
+%patch -P0 -p1
# make constistent with configure settings (DRBD_RUN_DIR)
%{__sed} -i -e 's, /run/, /var/run/,' scripts/drbd.tmpfiles.conf
+%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' scripts/tnf-drbd-fence.py
+
%build
%{__aclocal}
%{__autoconf}
@@ -95,9 +84,12 @@ DRBD, potrafiący w razie potrzeby promować i degradować zasoby DRBD.
--disable-udevchecks \
--with-bashcompletion \
--with-initscripttype=systemd \
+ --with-keyutils \
--with-pacemaker \
- --with-udev \
- --with-xen
+ --with-systemd-exec-condition \
+ --with-systemdpresetdir=/lib/systemd/system-preset \
+ --with-systemdunitdir=%{systemdunitdir} \
+ --with-udev
%{__make} tools \
KVER=dummy \
@@ -108,13 +100,21 @@ DRBD, potrafiący w razie potrzeby promować i degradować zasoby DRBD.
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man{5,8},%{_sysconfdir}} \
-$RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d \
$RPM_BUILD_ROOT/var/lib/drbd
%{__make} install \
DRBD_ENABLE_UDEV=1 \
DESTDIR=$RPM_BUILD_ROOT
+# upstream installs only versioned man pages and leaves the unversioned
+# names to package scriptlets; point them at the DRBD 9 pages
+for d in %{_mandir} %{_mandir}/ja; do
+ for f in drbd drbdadm drbdmeta drbdsetup; do
+ ln -s $f-9.0.8 $RPM_BUILD_ROOT$d/man8/$f.8
+ done
+ ln -s drbd.conf-9.0.5 $RPM_BUILD_ROOT$d/man5/drbd.conf.5
+done
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -123,10 +123,10 @@ rm -rf $RPM_BUILD_ROOT
%post
export NORESTART="yes"
-%systemd_post drbd.service
+%systemd_post drbd.service drbd-configured.target
%preun
-%systemd_preun drbd.service
+%systemd_preun drbd.service drbd-configured.target
%postun
if [ "$1" = "0" ]; then
@@ -140,26 +140,32 @@ fi
/sbin/drbdadm
/sbin/drbdmeta
/sbin/drbdsetup
+%attr(755,root,root) %{_sbindir}/drbd-events-log-supplier
%attr(755,root,root) %{_sbindir}/drbdadm
%attr(755,root,root) %{_sbindir}/drbdmon
%attr(4754,root,haclient) %{_sbindir}/drbdmeta
%attr(4754,root,haclient) %{_sbindir}/drbdsetup
-%dir /lib/drbd
-%attr(4754,root,haclient) /lib/drbd/drbdadm-*
-%attr(4754,root,haclient) /lib/drbd/drbdsetup-*
-%dir /lib/drbd/scripts
-%attr(755,root,root) /lib/drbd/scripts/drbd
-%attr(755,root,root) /lib/drbd/scripts/drbd-service-shim.sh
-%attr(755,root,root) /lib/drbd/scripts/drbd-wait-promotable.sh
/lib/udev/rules.d/65-drbd.rules
%dir %{_prefix}/lib/drbd
-%attr(755,root,root) %{_prefix}/lib/drbd/*
+%attr(4754,root,haclient) %{_prefix}/lib/drbd/drbdadm-84
+%attr(4754,root,haclient) %{_prefix}/lib/drbd/drbdsetup-84
+%attr(755,root,root) %{_prefix}/lib/drbd/*.sh
+%attr(755,root,root) %{_prefix}/lib/drbd/tnf-drbd-fence.py
+%dir %{_prefix}/lib/drbd/scripts
+%attr(755,root,root) %{_prefix}/lib/drbd/scripts/drbd
+%attr(755,root,root) %{_prefix}/lib/drbd/scripts/drbd-service-shim.sh
+%attr(755,root,root) %{_prefix}/lib/drbd/scripts/drbd-wait-promotable.sh
%dir %{_sysconfdir}/drbd.d
+%dir %{_sysconfdir}/drbd.d/fence-peer
+%dir %{_sysconfdir}/drbd.d/fence-peer/peers
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drbd.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drbd.d/global_common.conf
+/lib/systemd/system-preset/50-drbd.preset
%{systemdunitdir}/drbd.service
+%{systemdunitdir}/drbd-configured.target
%{systemdunitdir}/drbd-demote-or-escalate at .service
-%{systemdunitdir}/drbd-graceful-shutdown.service
+%{systemdunitdir}/drbd-graceful-disconnect.service
+%{systemdunitdir}/drbd-graceful-down.service
%{systemdunitdir}/drbd-lvchange at .service
%{systemdunitdir}/drbd-promote at .service
%{systemdunitdir}/drbd-reconfigure-suspend-or-error at .service
@@ -174,6 +180,9 @@ fi
%{_mandir}/man5/drbd.conf-8.4.5*
%{_mandir}/man5/drbd.conf-9.0.5*
%{_mandir}/man7/drbd.service.7*
+%{_mandir}/man7/drbd-configured.target.7*
+%{_mandir}/man7/drbd-graceful-disconnect.service.7*
+%{_mandir}/man7/drbd-graceful-down.service.7*
%{_mandir}/man7/drbd-lvchange at .service.7*
%{_mandir}/man7/drbd-promote at .service.7*
%{_mandir}/man7/drbd-reconfigure-suspend-or-error at .service.7*
@@ -187,12 +196,10 @@ fi
%{_mandir}/man8/drbdadm.8*
%{_mandir}/man8/drbdadm-8.4.8*
%{_mandir}/man8/drbdadm-9.0.8*
-%{_mandir}/man8/drbddisk-8.4.8*
%{_mandir}/man8/drbdmeta.8*
%{_mandir}/man8/drbdmeta-8.4.8*
%{_mandir}/man8/drbdmeta-9.0.8*
%{_mandir}/man8/drbdmon.8*
-%{_mandir}/man8/drbdmon-9.0.8*
%{_mandir}/man8/drbdsetup.8*
%{_mandir}/man8/drbdsetup-8.4.8*
%{_mandir}/man8/drbdsetup-9.0.8*
@@ -205,35 +212,26 @@ fi
%lang(ja) %{_mandir}/ja/man8/drbdadm.8*
%lang(ja) %{_mandir}/ja/man8/drbdadm-8.4.8*
%lang(ja) %{_mandir}/ja/man8/drbdadm-9.0.8*
-%lang(ja) %{_mandir}/ja/man8/drbddisk-8.4.8*
%lang(ja) %{_mandir}/ja/man8/drbdmeta.8*
%lang(ja) %{_mandir}/ja/man8/drbdmeta-8.4.8*
%lang(ja) %{_mandir}/ja/man8/drbdmeta-9.0.8*
%lang(ja) %{_mandir}/ja/man8/drbdmon.8*
-%lang(ja) %{_mandir}/ja/man8/drbdmon-9.0.8*
%lang(ja) %{_mandir}/ja/man8/drbdsetup.8*
%lang(ja) %{_mandir}/ja/man8/drbdsetup-8.4.8*
%lang(ja) %{_mandir}/ja/man8/drbdsetup-9.0.8*
%files -n resource-agents-drbd
%defattr(644,root,root,755)
-%attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/drbddisk
-%attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/drbdupper
-%attr(755,root,root) /lib/drbd/scripts/ocf.ra.wrapper.sh
%dir %{_prefix}/lib/ocf/resource.d/linbit
-%attr(755,root,root) %{_prefix}/lib/ocf/resource.d/linbit/*
-%{systemdunitdir}/ocf.ra at .service
-%{_mandir}/man7/ocf.ra at .service.7*
+%attr(755,root,root) %{_prefix}/lib/ocf/resource.d/linbit/drbd
+%attr(755,root,root) %{_prefix}/lib/ocf/resource.d/linbit/drbd-attr
+%{_prefix}/lib/ocf/resource.d/linbit/drbd.shellfuncs.sh
%{_mandir}/man7/ocf_linbit_drbd.7*
%{_mandir}/man7/ocf_linbit_drbd-attr.7*
%files -n bash-completion-drbd
%defattr(644,root,root,755)
-/etc/bash_completion.d/drbdadm
-
-%files -n drbd-xen
-%defattr(644,root,root,755)
-%{_sysconfdir}/xen/scripts/block-drbd
+%{bash_compdir}/drbdadm
# TODO: multipath subpackage? (R: multipath-tools)
#%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/multipath/conf.d/drbd.conf
diff --git a/drbd-utils-libexec-path.patch b/drbd-utils-libexec-path.patch
new file mode 100644
index 0000000..5ff59d0
--- /dev/null
+++ b/drbd-utils-libexec-path.patch
@@ -0,0 +1,49 @@
+# upstream installs the 8.4 helpers in $(LIBDIR) but still looks them up in /lib/drbd,
+# which only works on usr-merged systems
+diff -urN drbd-utils-9.35.0.orig/user/v84/drbdadm_usage_cnt.c drbd-utils-9.35.0/user/v84/drbdadm_usage_cnt.c
+--- drbd-utils-9.35.0.orig/user/v84/drbdadm_usage_cnt.c 2026-09-30 10:55:38.000000000 +0200
++++ drbd-utils-9.35.0/user/v84/drbdadm_usage_cnt.c 2026-10-29 00:50:47.950031881 +0100
+@@ -285,7 +285,7 @@
+ m_asprintf(&new_path, "%s%s%s",
+ old_path,
+ old_path ? ":" : "",
+- "/lib/drbd");
++ DRBD_LIBEXEC_DIR);
+ setenv("PATH", new_path, 1);
+ }
+
+diff -urN drbd-utils-9.35.0.orig/user/v84/Makefile.in drbd-utils-9.35.0/user/v84/Makefile.in
+--- drbd-utils-9.35.0.orig/user/v84/Makefile.in 2026-09-30 10:55:38.000000000 +0200
++++ drbd-utils-9.35.0/user/v84/Makefile.in 2026-10-29 00:50:47.949612250 +0100
+@@ -45,6 +45,7 @@
+ DESTDIR ?= /
+
+ CFLAGS += -Wall -I. -I../shared
++CFLAGS += -DDRBD_LIBEXEC_DIR='"$(LIBDIR)"'
+ CFLAGS += $(EXTRA_CFLAGS)
+
+ drbdadm-obj = drbdadm_scanner.o drbdadm_parser.o drbdadm_main.o \
+diff -urN drbd-utils-9.35.0.orig/user/v9/drbdtool_common.c drbd-utils-9.35.0/user/v9/drbdtool_common.c
+--- drbd-utils-9.35.0.orig/user/v9/drbdtool_common.c 2026-09-30 10:55:38.000000000 +0200
++++ drbd-utils-9.35.0/user/v9/drbdtool_common.c 2026-10-29 00:50:47.949799994 +0100
+@@ -334,8 +334,7 @@
+
+ void add_lib_drbd_to_path(void)
+ {
+- /* TODO: if exec-prefix != "/" ? */
+- add_component_to_path("/lib/drbd");
++ add_component_to_path(DRBD_LIBEXEC_DIR);
+ }
+
+ /* from linux/crypto/crc32.c */
+diff -urN drbd-utils-9.35.0.orig/user/v9/Makefile.in drbd-utils-9.35.0/user/v9/Makefile.in
+--- drbd-utils-9.35.0.orig/user/v9/Makefile.in 2026-09-30 10:55:38.000000000 +0200
++++ drbd-utils-9.35.0/user/v9/Makefile.in 2026-10-29 00:50:47.949410745 +0100
+@@ -63,6 +63,7 @@
+ endif
+
+ CFLAGS += -Wall -I../../drbd-headers -I../../drbd-headers/uapi -I.. -I. -I../shared
++CFLAGS += -DDRBD_LIBEXEC_DIR='"$(LIBDIR)"'
+
+ ifeq ($(WITH_WINDRBD),yes)
+ CFLAGS += -I../windrbd-compat-headers -DWINDRBD
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/drbd-utils.git/commitdiff/fcc8289a0e334c94bc70bf608d9cd8dae523cfb2
More information about the pld-cvs-commit
mailing list