From 4adf5f27591ec1de4ccad1743b304df9b469149776753617b9e14c240c3cabad Mon Sep 17 00:00:00 2001 From: heming zhao Date: Fri, 16 Sep 2022 10:33:56 +0000 Subject: [PATCH] Accepting request 1004080 from home:zzhou:branches:network:ha-clustering:Factory bsc#1203220 restore drbd scripts back to /usr/lib and fix drbd-bash-completion OBS-URL: https://build.opensuse.org/request/show/1004080 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd-utils?expand=0&rev=114 --- drbd-utils.changes | 8 ++++++++ drbd-utils.spec | 15 +++++++++++---- rpmlint-build-error.patch | 4 ++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/drbd-utils.changes b/drbd-utils.changes index 20cccc8..4a67f22 100644 --- a/drbd-utils.changes +++ b/drbd-utils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Sep 16 07:30:59 UTC 2022 - Roger Zhou + +- restore drbd scripts back to /usr/lib/drbd from /lib/drbd (bsc#1203220) + Update drbd-utils.spec +- fix drbd-bash-completion + Update rpmlint-build-error.patch + ------------------------------------------------------------------- Mon Oct 11 09:43:25 UTC 2021 - nick wang diff --git a/drbd-utils.spec b/drbd-utils.spec index db35766..b9e85c4 100644 --- a/drbd-utils.spec +++ b/drbd-utils.spec @@ -1,7 +1,7 @@ # # spec file for package drbd-utils # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,8 @@ %define services drbd.service drbd-lvchange@.service drbd-promote@.service drbd-reconfigure-suspend-or-error@.service drbd-services@.target drbd-wait-promotable@.service drbd@.service drbd@.target ocf.ra@.service %if !0%{?usrmerged} %define sbindir /sbin -%define libdir /lib +# see bsc#1203220 & usrmerge_move_lib_to_prefix_lib.patch for %{libdir} +%define libdir /usr/lib %else %define sbindir %{_sbindir} %define libdir %{_prefix}/lib @@ -111,10 +112,11 @@ PATH=/sbin:$PATH ./configure \ --with-initscripttype=systemd \ --with-systemdunitdir=%{_prefix}/lib/systemd/system \ %if !0%{?usrmerged} - --prefix=/ \ + --prefix=/usr \ --sbindir=/sbin \ %else --prefix=%{_prefix} \ + --sbindir=%{_sbindir} \ %endif %if 0%{?is_opensuse} --localstatedir=%{_localstatedir} \ @@ -123,6 +125,7 @@ PATH=/sbin:$PATH ./configure \ --sysconfdir=%{_sysconfdir} \ --datarootdir=%{_datadir} \ --datadir=%{_datadir} \ + --libdir=%{_prefix}/lib \ --exec_prefix=%{_prefix}/lib \ %{?with_drbdmon: --with-drbdmon} \ %{?with_prebuiltman: --with-prebuiltman} \ @@ -133,6 +136,10 @@ PATH=/sbin:$PATH ./configure \ %install %make_install +%if !0%{?usrmerged} +mkdir -p %{buildroot}%{_localstatedir}/lib/drbd +%endif + %ifnarch %{ix86} x86_64 rm -rf %{buildroot}%{_sysconfdir}/xen %endif @@ -166,7 +173,7 @@ ln -sf drbdmon-9.0.8.gz %{_mandir}/ja/man8/drbdmon.8.gz %config(noreplace) %{_sysconfdir}/drbd.conf %config(noreplace) %{_sysconfdir}/drbd.d/global_common.conf %config(noreplace) %{_sysconfdir}/multipath/conf.d/drbd.conf -%{_datadir}/bash-completion/completions/drbdadm.sh +%{_datadir}/bash-completion/completions/drbdadm %{_tmpfilesdir}/drbd.conf %{_mandir}/man5/drbd.* %{_mandir}/man8/drbd* diff --git a/rpmlint-build-error.patch b/rpmlint-build-error.patch index 3acd981..c23b8db 100644 --- a/rpmlint-build-error.patch +++ b/rpmlint-build-error.patch @@ -32,7 +32,7 @@ diff -Naur drbd-utils-9.19.0.orig/scripts/Makefile.in drbd-utils-9.19.0/scripts/ - 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) ++ install -m 644 drbdadm.bash_completion $(DESTDIR)$(datadir)/bash-completion/completions/drbdadm endif clean: @@ -41,7 +41,7 @@ diff -Naur drbd-utils-9.19.0.orig/scripts/Makefile.in drbd-utils-9.19.0/scripts/ 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) ++ rm -f $(DESTDIR)$(datadir)/bash-completion/completions/drbdadm ! test -L $(DESTDIR)/sbin/rcdrbd || rm $(DESTDIR)/sbin/rcdrbd .PHONY: install uninstall clean distclean