diff --git a/_service b/_service
index e47f7b1..1a3562f 100644
--- a/_service
+++ b/_service
@@ -5,10 +5,10 @@
drbd-utils
- 9.18.0+git.%h
+ 9.19.0+git.%h
master
diff --git a/drbd-utils-9.18.0.tar.gz b/drbd-utils-9.18.0.tar.gz
deleted file mode 100644
index 885c574..0000000
--- a/drbd-utils-9.18.0.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e4aab0d65104aac5fdb1371dc60f0b2afe80610836d8a888aec0748a6419a453
-size 1253169
diff --git a/drbd-utils-9.19.0.tar.gz b/drbd-utils-9.19.0.tar.gz
new file mode 100644
index 0000000..a5c55f2
--- /dev/null
+++ b/drbd-utils-9.19.0.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3827bfed6630f8784ec558a8ac3de68175d544876d897c0810ad141a61487cad
+size 1261589
diff --git a/drbd-utils.changes b/drbd-utils.changes
index b2c492b..f87951b 100644
--- a/drbd-utils.changes
+++ b/drbd-utils.changes
@@ -1,3 +1,18 @@
+-------------------------------------------------------------------
+Mon Oct 11 09:43:25 UTC 2021 - nick wang
+
+- Update to 9.19.0
+ * v9,events2: show changes of peer-client
+ * v9: rr-conflict strategy auto-discard for protocol A
+ * windrbd: various fixes including setting the systemd root
+ * containers: switch to UBI8
+ * v9,wait-*: fix segfault
+- bsc#1191058, active UsrMerge to install in /usr
+ Add patch usrmerge_move_lib_to_prefix_lib.patch
+- Remove patch fix-libdir-in-Makefile.patch
+ Remove patch systemd-drbd-service-needs-network-online.patch (included)
+- Add drbd-utils.rpmlintrc for Error missing-call-to-setgroups-before-setuid
+
-------------------------------------------------------------------
Fri Sep 17 08:05:56 UTC 2021 - nick wang
diff --git a/drbd-utils.rpmlintrc b/drbd-utils.rpmlintrc
new file mode 100644
index 0000000..3ea50f7
--- /dev/null
+++ b/drbd-utils.rpmlintrc
@@ -0,0 +1 @@
+addFilter("missing-call-to-setgroups-before-setuid /usr/sbin/drbdmon")
diff --git a/drbd-utils.spec b/drbd-utils.spec
index a1f1d53..58d6524 100644
--- a/drbd-utils.spec
+++ b/drbd-utils.spec
@@ -18,31 +18,33 @@
%if !0%{?usrmerged}
%define sbindir /sbin
+%define libdir /lib
%else
%define sbindir %{_sbindir}
+%define libdir %{_prefix}/lib
%endif
-
%bcond_without drbdmon
# Man pages are included in the released tarball.
# Only need po4a to build man from git source code
%bcond_without prebuiltman
Name: drbd-utils
-Version: 9.18.0
+Version: 9.19.0
Release: 0
Summary: Distributed Replicated Block Device
License: GPL-2.0-or-later
+Group: Productivity/Clustering/HA
URL: http://www.drbd.org/
Source: http://www.linbit.com/downloads/drbd/utils/%{name}-%{version}.tar.gz
+Source100: %{name}.rpmlintrc
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: init-script-fixes.diff
-Patch2: fix-libdir-in-Makefile.patch
+Patch2: usrmerge_move_lib_to_prefix_lib.patch
Patch3: fence-after-pacemaker-down.patch
# PATCH-SUSE-FIX: Disable quorum in default configuration (bsc#1032142)
Patch4: 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch
Patch5: move_fencing_from_disk_to_net_in_example.patch
Patch6: pie-fix.patch
-# In Upstream 9.18.0~9.19
-Patch7: systemd-drbd-service-needs-network-online.patch
+Patch99: rpmlint-build-error-wip.patch
Provides: drbd-bash-completion = %{version}
Provides: drbd-pacemaker = %{version}
@@ -93,7 +95,7 @@ raid 1. It is a building block for setting up clusters.
%patch4 -p1
%patch5 -p1
%patch6 -p1
-%patch7 -p1
+%patch99 -p1
%build
export WANT_DRBD_REPRODUCIBLE_BUILD=1
@@ -114,9 +116,8 @@ PATH=/sbin:$PATH ./configure \
--prefix=%{_prefix} \
%endif
%if 0%{?is_opensuse}
- --localstatedir=/var \
+ --localstatedir=%{_localstatedir} \
%endif
- --libdir=%{_prefix}/lib \
--mandir=%{_mandir} \
--sysconfdir=%{_sysconfdir} \
--datarootdir=%{_datadir} \
@@ -126,12 +127,11 @@ PATH=/sbin:$PATH ./configure \
%{?with_prebuiltman: --with-prebuiltman} \
--with-tmpfilesdir=%{_tmpfilesdir}
-make OPTFLAGS="%{optflags}" %{?_smp_mflags}
+%make_build OPTFLAGS="%{optflags}"
%install
%make_install
-mkdir -p %{buildroot}%{_localstatedir}/lib/drbd
%ifnarch %{ix86} x86_64
rm -rf %{buildroot}%{_sysconfdir}/xen
%endif
@@ -148,6 +148,7 @@ rm -rf %{buildroot}%{_sysconfdir}/xen
%service_add_pre ocf.ra@.service
%post
+%tmpfiles_create %{_tmpfilesdir}/drbd.conf
%service_add_post drbd.service
%service_add_post drbd-lvchange@.service
%service_add_post drbd-promote@.service
@@ -194,9 +195,9 @@ ln -sf drbdmon-9.0.8.gz %{_mandir}/ja/man8/drbdmon.8.gz
%files -n drbd-utils
%config(noreplace) %{_sysconfdir}/drbd.conf
-%config %{_sysconfdir}/bash_completion.d/drbdadm.sh
%config(noreplace) %{_sysconfdir}/drbd.d/global_common.conf
%config(noreplace) %{_sysconfdir}/multipath/conf.d/drbd.conf
+%{_datadir}/bash-completion/completions/drbdadm.sh
%{_tmpfilesdir}/drbd.conf
%{_mandir}/man5/drbd.*
%{_mandir}/man8/drbd*
@@ -211,6 +212,7 @@ ln -sf drbdmon-9.0.8.gz %{_mandir}/ja/man8/drbdmon.8.gz
%dir %{_sysconfdir}/drbd.d
%dir %{_sysconfdir}/multipath
%dir %{_sysconfdir}/multipath/conf.d
+%{libdir}/drbd
%{sbindir}/drbdadm
%{sbindir}/drbdsetup
%{sbindir}/drbdmeta
@@ -235,12 +237,9 @@ ln -sf drbdmon-9.0.8.gz %{_mandir}/ja/man8/drbdmon.8.gz
%{_unitdir}/drbd@.service
%{_unitdir}/drbd@.target
%{_unitdir}/ocf.ra@.service
-%{_localstatedir}/lib/drbd
-%{_prefix}/lib/drbd
-/lib/drbd
%dir %{_prefix}/lib/ocf
%dir %{_prefix}/lib/ocf/resource.d
%dir %{_prefix}/lib/ocf/resource.d/linbit
-%ghost %{_rundir}/drbd
+%dir %{_localstatedir}/lib/drbd
%changelog
diff --git a/fix-libdir-in-Makefile.patch b/fix-libdir-in-Makefile.patch
deleted file mode 100644
index df917ac..0000000
--- a/fix-libdir-in-Makefile.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Index: drbd-utils-8.9.2rc2+git.faeb645/scripts/Makefile.in
-===================================================================
---- drbd-utils-8.9.2rc2+git.faeb645.orig/scripts/Makefile.in
-+++ drbd-utils-8.9.2rc2+git.faeb645/scripts/Makefile.in
-@@ -37,7 +37,7 @@ initscripttype = @initscripttype@
- BASH_COMPLETION_SUFFIX = @BASH_COMPLETION_SUFFIX@
- UDEV_RULE_SUFFIX = @UDEV_RULE_SUFFIX@
- INITDIR = @INITDIR@
--LIBDIR = @prefix@/lib/@PACKAGE_TARNAME@
-+LIBDIR = @libdir@/@PACKAGE_TARNAME@
- LN_S = @LN_S@
-
- # features enabled or disabled by configure
-Index: drbd-utils-8.9.2rc2+git.faeb645/user/v9/Makefile.in
-===================================================================
---- drbd-utils-8.9.2rc2+git.faeb645.orig/user/v9/Makefile.in
-+++ drbd-utils-8.9.2rc2+git.faeb645/user/v9/Makefile.in
-@@ -31,7 +31,7 @@ sysconfdir = @sysconfdir@
- BASH_COMPLETION_SUFFIX = @BASH_COMPLETION_SUFFIX@
- UDEV_RULE_SUFFIX = @UDEV_RULE_SUFFIX@
- INITDIR = @INITDIR@
--LIBDIR = @prefix@/lib/@PACKAGE_TARNAME@
-+LIBDIR = @libdir@/@PACKAGE_TARNAME@
- CC = @CC@
- CFLAGS = @CFLAGS@
- LDFLAGS = @LDFLAGS@
-Index: drbd-utils-8.9.2rc2+git.faeb645/user/v83/Makefile.in
-===================================================================
---- drbd-utils-8.9.2rc2+git.faeb645.orig/user/v83/Makefile.in
-+++ drbd-utils-8.9.2rc2+git.faeb645/user/v83/Makefile.in
-@@ -31,7 +31,7 @@ sysconfdir = @sysconfdir@
- BASH_COMPLETION_SUFFIX = @BASH_COMPLETION_SUFFIX@
- UDEV_RULE_SUFFIX = @UDEV_RULE_SUFFIX@
- INITDIR = @INITDIR@
--LIBDIR = @prefix@/lib/@PACKAGE_TARNAME@
-+LIBDIR = @libdir@/@PACKAGE_TARNAME@
- CC = @CC@
- CFLAGS = @CFLAGS@
- LDFLAGS = @LDFLAGS@
-Index: drbd-utils-8.9.2rc2+git.faeb645/user/v84/Makefile.in
-===================================================================
---- drbd-utils-8.9.2rc2+git.faeb645.orig/user/v84/Makefile.in
-+++ drbd-utils-8.9.2rc2+git.faeb645/user/v84/Makefile.in
-@@ -31,7 +31,7 @@ sysconfdir = @sysconfdir@
- BASH_COMPLETION_SUFFIX = @BASH_COMPLETION_SUFFIX@
- UDEV_RULE_SUFFIX = @UDEV_RULE_SUFFIX@
- INITDIR = @INITDIR@
--LIBDIR = @prefix@/lib/@PACKAGE_TARNAME@
-+LIBDIR = @libdir@/@PACKAGE_TARNAME@
- CC = @CC@
- CFLAGS = @CFLAGS@
- LDFLAGS = @LDFLAGS@
diff --git a/rpmlint-build-error-wip.patch b/rpmlint-build-error-wip.patch
new file mode 100644
index 0000000..3acd981
--- /dev/null
+++ b/rpmlint-build-error-wip.patch
@@ -0,0 +1,69 @@
+Fix rpmlint Errors:
+ 1. non-executable-script /usr/lib/ocf/resource.d/linbit/drbd.shellfuncs.sh 644 /bin/bash
+ 2. filelist-forbidden-bashcomp-userdirs /etc/bash_completion.d/drbdadm.sh
+ 3. dir-or-file-in-run /run/drbd
+
+diff -Naur drbd-utils-9.19.0.orig/scripts/drbdadm.bash_completion drbd-utils-9.19.0/scripts/drbdadm.bash_completion
+--- drbd-utils-9.19.0.orig/scripts/drbdadm.bash_completion 2021-10-11 18:44:02.906467704 +0800
++++ drbd-utils-9.19.0/scripts/drbdadm.bash_completion 2021-10-11 18:48:24.653422443 +0800
+@@ -1,5 +1,5 @@
+ #
+-# /etc/bash_completion.d/drbdadm
++# /usr/share/bash-completion/completions/drbdadm
+ #
+ # Bash completion for the DRBD top-level management application, drbdadm.
+ #
+diff -Naur drbd-utils-9.19.0.orig/scripts/Makefile.in drbd-utils-9.19.0/scripts/Makefile.in
+--- drbd-utils-9.19.0.orig/scripts/Makefile.in 2021-10-11 18:44:02.906467704 +0800
++++ drbd-utils-9.19.0/scripts/Makefile.in 2021-10-11 18:51:21.716712860 +0800
+@@ -147,7 +147,7 @@
+ mkdir -p $(DESTDIR)/usr/lib/ocf/resource.d/linbit
+ install -m 755 drbd.ocf $(DESTDIR)/usr/lib/ocf/resource.d/linbit/drbd
+ install -m 755 drbd-attr $(DESTDIR)/usr/lib/ocf/resource.d/linbit/drbd-attr
+- install -m 644 drbd.shellfuncs.sh $(DESTDIR)/usr/lib/ocf/resource.d/linbit/
++ install -m 755 drbd.shellfuncs.sh $(DESTDIR)/usr/lib/ocf/resource.d/linbit/
+ endif
+
+ install-rgmanager:
+@@ -173,8 +173,8 @@
+
+ install-bashcompletion:
+ ifeq ($(WITH_BASHCOMPLETION),yes)
+- mkdir -p $(DESTDIR)$(sysconfdir)/bash_completion.d
+- install -m 644 drbdadm.bash_completion $(DESTDIR)$(sysconfdir)/bash_completion.d/drbdadm$(BASH_COMPLETION_SUFFIX)
++ mkdir -p $(DESTDIR)$(datadir)/bash-completion/completions
++ install -m 644 drbdadm.bash_completion $(DESTDIR)$(datadir)/bash-completion/completions/drbdadm$(BASH_COMPLETION_SUFFIX)
+ endif
+
+ clean:
+@@ -195,7 +195,7 @@
+ rm -f $(DESTDIR)$(sysconfdir)/ha.d/resource.d/drbddisk
+ rm -f $(DESTDIR)$(sysconfdir)/ha.d/resource.d/drbdupper
+ rm -f $(DESTDIR)$(sysconfdir)/xen/scripts/block-drbd
+- rm -f $(DESTDIR)$(sysconfdir)/bash_completion.d/drbdadm$(BASH_COMPLETION_SUFFIX)
++ rm -f $(DESTDIR)$(datadir)/bash-completion/completions/drbdadm$(BASH_COMPLETION_SUFFIX)
+ ! test -L $(DESTDIR)/sbin/rcdrbd || rm $(DESTDIR)/sbin/rcdrbd
+
+ .PHONY: install uninstall clean distclean
+diff -Naur drbd-utils-9.19.0.orig/user/v84/Makefile.in drbd-utils-9.19.0/user/v84/Makefile.in
+--- drbd-utils-9.19.0.orig/user/v84/Makefile.in 2021-10-11 18:44:02.918467657 +0800
++++ drbd-utils-9.19.0/user/v84/Makefile.in 2021-10-13 11:39:05.662316197 +0800
+@@ -108,7 +108,6 @@
+ install:
+ ifeq ($(WITH_84_SUPPORT),yes)
+ install -d $(DESTDIR)$(localstatedir)/lib/drbd
+- install -d $(DESTDIR)$(localstatedir)/run/drbd
+ install -d $(DESTDIR)$(localstatedir)/lock
+ install -d $(DESTDIR)/lib/drbd/
+ if getent group haclient > /dev/null 2> /dev/null ; then \
+diff -Naur drbd-utils-9.19.0.orig/user/v9/Makefile.in drbd-utils-9.19.0/user/v9/Makefile.in
+--- drbd-utils-9.19.0.orig/user/v9/Makefile.in 2021-10-11 18:44:02.918467657 +0800
++++ drbd-utils-9.19.0/user/v9/Makefile.in 2021-10-13 11:38:48.462390954 +0800
+@@ -143,7 +143,6 @@
+ install:
+ install -d $(DESTDIR)$(sbindir)
+ install -d $(DESTDIR)$(localstatedir)/lib/drbd
+- install -d $(DESTDIR)$(localstatedir)/run/drbd
+ install -d $(DESTDIR)$(localstatedir)/lock
+ if getent group haclient > /dev/null 2> /dev/null ; then \
+ install -g haclient -m 4750 drbdsetup $(DESTDIR)$(sbindir) ; \
diff --git a/systemd-drbd-service-needs-network-online.patch b/systemd-drbd-service-needs-network-online.patch
deleted file mode 100644
index 7e53c76..0000000
--- a/systemd-drbd-service-needs-network-online.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From b360f7680429326ba30ac94a71deec1d6ff5c6e5 Mon Sep 17 00:00:00 2001
-From: Lars Ellenberg
-Date: Fri, 16 Jul 2021 15:23:55 +0200
-Subject: [PATCH 1/2] systemd: drbd@.service needs to pull in
- network-online.target
-
-Otherwise during early boot it may be asked to configure the IP before it is available.
----
- documentation/v9/drbd@.service.adoc | 6 ++++++
- scripts/drbd@.service | 13 +++++++++++++
- 2 files changed, 19 insertions(+)
-
-diff --git a/documentation/v9/drbd@.service.adoc b/documentation/v9/drbd@.service.adoc
-index 0358591b..d0d18b16 100644
---- a/documentation/v9/drbd@.service.adoc
-+++ b/documentation/v9/drbd@.service.adoc
-@@ -17,6 +17,12 @@ This service unit is part of **drbd@**__RESNAME__**.target**,
- and used to configure/reconfigure/unconfigure the DRBD __RESNAME__
- on start/reload/stop.
-
-+Since we want the network to be online before configuring DRBD,
-+you may need to enable one of these:
-+
-+`systemctl enable systemd-networkd-wait-online.service` or
-+`systemctl enable NetworkManager-wait-online.service`.
-+
- See Also
- --------
- linkgit:drbd@.target[7],
-diff --git a/scripts/drbd@.service b/scripts/drbd@.service
-index 70832e37..5f47d4cf 100644
---- a/scripts/drbd@.service
-+++ b/scripts/drbd@.service
-@@ -3,6 +3,19 @@ Description= (Re)configure DRBD resource %I
-
- PartOf=drbd@%i.target
-
-+# We really want the network to be online.
-+# You may need to do one of
-+# systemctl enable NetworkManager-wait-online.service
-+# systemctl enable systemd-networkd-wait-online.service
-+Wants=network-online.target sshd.service
-+After=network-online.target nss-lookup.target sshd.service
-+# If drbd-proxy is used, we want it to be running already.
-+After=drbdproxy.service
-+
-+# This is not intended to be combined with pacemaker,
-+# but if combined, it should be ordered before pacemaker.
-+Before=pacemaker.service
-+
- #
- # in an instantiation of this service,
- # you may want to add "BindsTo=/dev/vg/lv" and "After=" for all backing devices
---
-2.16.4
-
diff --git a/usrmerge_move_lib_to_prefix_lib.patch b/usrmerge_move_lib_to_prefix_lib.patch
new file mode 100644
index 0000000..a6dc307
--- /dev/null
+++ b/usrmerge_move_lib_to_prefix_lib.patch
@@ -0,0 +1,66 @@
+diff -Naur drbd-utils-9.19.0.orig/scripts/Makefile.in drbd-utils-9.19.0/scripts/Makefile.in
+--- drbd-utils-9.19.0.orig/scripts/Makefile.in 2021-10-11 17:59:20.189282860 +0800
++++ drbd-utils-9.19.0/scripts/Makefile.in 2021-10-11 18:01:25.988786913 +0800
+@@ -39,6 +39,7 @@
+ UDEV_RULE_SUFFIX = @UDEV_RULE_SUFFIX@
+ INITDIR = @INITDIR@
+ LIBDIR = @prefix@/lib/@PACKAGE_TARNAME@
++LIBSCRIPTDIR = @prefix@/lib/@PACKAGE_TARNAME@/scripts
+ LN_S = @LN_S@
+
+ # features enabled or disabled by configure
+@@ -87,11 +88,11 @@
+ install -d $(DESTDIR)$(systemdunitdir)
+ install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/
+ install -m 644 $(SYSTEMD_TEMPLATES) $(DESTDIR)$(systemdunitdir)/
+- install -d $(DESTDIR)/lib/drbd/scripts
+- install -m 755 drbd $(DESTDIR)/lib/drbd/scripts
+- install -m 755 drbd-service-shim.sh $(DESTDIR)/lib/drbd/scripts
+- install -m 755 drbd-wait-promotable.sh $(DESTDIR)/lib/drbd/scripts
+- install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/lib/drbd/scripts
++ install -d $(DESTDIR)$(LIBSCRIPTDIR)
++ install -m 755 drbd $(DESTDIR)$(LIBSCRIPTDIR)
++ install -m 755 drbd-service-shim.sh $(DESTDIR)$(LIBSCRIPTDIR)
++ install -m 755 drbd-wait-promotable.sh $(DESTDIR)$(LIBSCRIPTDIR)
++ install -m 755 ocf.ra.wrapper.sh $(DESTDIR)$(LIBSCRIPTDIR)
+ install -d $(DESTDIR)$(tmpfilesdir)/
+ install -m 444 drbd.tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/drbd.conf
+ endif
+diff -Naur drbd-utils-9.19.0.orig/user/v83/Makefile.in drbd-utils-9.19.0/user/v83/Makefile.in
+--- drbd-utils-9.19.0.orig/user/v83/Makefile.in 2021-10-11 17:59:20.217282750 +0800
++++ drbd-utils-9.19.0/user/v83/Makefile.in 2021-10-11 18:07:39.967312613 +0800
+@@ -98,11 +98,11 @@
+ install -d $(DESTDIR)$(localstatedir)/lock
+ install -d $(DESTDIR)/lib/drbd/
+ if getent group haclient > /dev/null 2> /dev/null ; then \
+- install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)/lib/drbd/ ; \
+- install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ; \
++ install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)$(LIBDIR) ; \
++ install -m 755 drbdadm-83 $(DESTDIR)$(LIBDIR) ; \
+ else \
+- install -m 755 drbdsetup-83 $(DESTDIR)/lib/drbd/ ; \
+- install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ; \
++ install -m 755 drbdsetup-83 $(DESTDIR)$(LIBDIR) ; \
++ install -m 755 drbdadm-83 $(DESTDIR)$(LIBDIR) ; \
+ fi
+ endif
+
+diff -Naur drbd-utils-9.19.0.orig/user/v84/Makefile.in drbd-utils-9.19.0/user/v84/Makefile.in
+--- drbd-utils-9.19.0.orig/user/v84/Makefile.in 2021-10-11 17:59:20.221282734 +0800
++++ drbd-utils-9.19.0/user/v84/Makefile.in 2021-10-11 18:07:39.967312613 +0800
+@@ -112,11 +112,11 @@
+ install -d $(DESTDIR)$(localstatedir)/lock
+ install -d $(DESTDIR)/lib/drbd/
+ if getent group haclient > /dev/null 2> /dev/null ; then \
+- install -g haclient -m 4750 drbdsetup-84 $(DESTDIR)/lib/drbd/ ; \
+- install -m 755 drbdadm-84 $(DESTDIR)/lib/drbd/ ; \
++ install -g haclient -m 4750 drbdsetup-84 $(DESTDIR)$(LIBDIR) ; \
++ install -m 755 drbdadm-84 $(DESTDIR)$(LIBDIR) ; \
+ else \
+- install -m 755 drbdsetup-84 $(DESTDIR)/lib/drbd/ ; \
+- install -m 755 drbdadm-84 $(DESTDIR)/lib/drbd/ ; \
++ install -m 755 drbdsetup-84 $(DESTDIR)$(LIBDIR) ; \
++ install -m 755 drbdadm-84 $(DESTDIR)$(LIBDIR) ; \
+ fi
+ endif
+