Accepting request 812470 from home:wanghaisu:branches:network:ha-clustering:Factory

bsc#1172641, fix the link error of setup_option.

OBS-URL: https://build.opensuse.org/request/show/812470
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd-utils?expand=0&rev=94
This commit is contained in:
nick wang 2020-06-08 09:31:43 +00:00 committed by Git OBS Bridge
parent 6206fb92ef
commit 0f4ae8c907
3 changed files with 27 additions and 10 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jun 8 08:11:04 UTC 2020 - nick wang <nwang@suse.com>
- bsc#1172641, fix the link error of setup_option.
Add patch link-error-setup_option.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Sat May 9 01:17:31 UTC 2020 - nick wang <nwang@suse.com> Sat May 9 01:17:31 UTC 2020 - nick wang <nwang@suse.com>

View File

@ -20,7 +20,6 @@
# Man pages are included in the released tarball. # Man pages are included in the released tarball.
# Only need po4a to build man from git source code # Only need po4a to build man from git source code
%bcond_without prebuiltman %bcond_without prebuiltman
Name: drbd-utils Name: drbd-utils
Version: 9.13.0 Version: 9.13.0
Release: 0 Release: 0
@ -28,7 +27,6 @@ Summary: Distributed Replicated Block Device
License: GPL-2.0-or-later License: GPL-2.0-or-later
URL: http://www.drbd.org/ URL: http://www.drbd.org/
Source: http://www.linbit.com/downloads/drbd/utils/%{name}-%{version}.tar.gz Source: http://www.linbit.com/downloads/drbd/utils/%{name}-%{version}.tar.gz
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: init-script-fixes.diff Patch1: init-script-fixes.diff
Patch2: fix-libdir-in-Makefile.patch Patch2: fix-libdir-in-Makefile.patch
@ -36,6 +34,7 @@ Patch3: fence-after-pacemaker-down.patch
# PATCH-SUSE-FIX: Disable quorum in default configuration (bsc#1032142) # PATCH-SUSE-FIX: Disable quorum in default configuration (bsc#1032142)
Patch4: 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch Patch4: 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch
Patch5: move_fencing_from_disk_to_net_in_example.patch Patch5: move_fencing_from_disk_to_net_in_example.patch
Patch6: link-error-setup_option.patch
Provides: drbd-bash-completion = %{version} Provides: drbd-bash-completion = %{version}
Provides: drbd-pacemaker = %{version} Provides: drbd-pacemaker = %{version}
@ -47,8 +46,7 @@ Obsoletes: drbd-udev < %{version}
# and suse let drbd driver goes in-kernel # and suse let drbd driver goes in-kernel
# Provides: drbd = 8.4.5 # Provides: drbd = 8.4.5
# Obsoletes: drbd < 8.4.5 # Obsoletes: drbd < 8.4.5
%ifarch %{ix86} x86_64
%ifarch %ix86 x86_64
Provides: drbd-xen = %{version} Provides: drbd-xen = %{version}
Obsoletes: drbd-xen < %{version} Obsoletes: drbd-xen < %{version}
%endif %endif
@ -80,12 +78,13 @@ device over the network to another machine. Think of it as networked
raid 1. It is a building block for setting up clusters. raid 1. It is a building block for setting up clusters.
%prep %prep
%setup -q -n %{name}-%{version} %setup -q
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p1
%build %build
export WANT_DRBD_REPRODUCIBLE_BUILD=1 export WANT_DRBD_REPRODUCIBLE_BUILD=1
@ -118,13 +117,13 @@ make OPTFLAGS="%{optflags}" %{?_smp_mflags}
%make_install %make_install
mkdir -p %{buildroot}%{_localstatedir}/lib/drbd mkdir -p %{buildroot}%{_localstatedir}/lib/drbd
%ifnarch %ix86 x86_64 %ifnarch %{ix86} x86_64
rm -rf %{buildroot}%{_sysconfdir}/xen rm -rf %{buildroot}%{_sysconfdir}/xen
%else %else
d=%{_libexecdir}/xen/scripts d=%{_libexecdir}/xen/scripts
mkdir -p %{buildroot}$d mkdir -p %{buildroot}$d
mv %{buildroot}%{_sysconfdir}/xen/scripts/block-drbd %{buildroot}$d mv %{buildroot}%{_sysconfdir}/xen/scripts/block-drbd %{buildroot}$d
%if %{suse_version} > 1500 %if 0%{?suse_version} > 1500
rm -rf %{buildroot}%{_sysconfdir}/xen rm -rf %{buildroot}%{_sysconfdir}/xen
%else %else
tee %{buildroot}%{_sysconfdir}/xen/scripts/block-drbd <<_EOS_ tee %{buildroot}%{_sysconfdir}/xen/scripts/block-drbd <<_EOS_
@ -171,7 +170,7 @@ ln -sf drbdmon-9.0.8.gz %{_mandir}/ja/man8/drbdmon.8.gz
%doc %{_mandir}/man7/ocf_linbit_drbd.* %doc %{_mandir}/man7/ocf_linbit_drbd.*
%doc %{_mandir}/ja/man5/drbd.* %doc %{_mandir}/ja/man5/drbd.*
%doc %{_mandir}/ja/man8/drbd* %doc %{_mandir}/ja/man8/drbd*
%doc COPYING %license COPYING
%doc README.md %doc README.md
%doc ChangeLog %doc ChangeLog
%doc scripts/drbd.conf.example %doc scripts/drbd.conf.example
@ -182,8 +181,8 @@ ln -sf drbdmon-9.0.8.gz %{_mandir}/ja/man8/drbdmon.8.gz
%if %{with drbdmon} %if %{with drbdmon}
/sbin/drbdmon /sbin/drbdmon
%endif %endif
%ifarch %ix86 x86_64 %ifarch %{ix86} x86_64
%if %{suse_version} <= 1500 %if 0%{?suse_version} <= 1500
%dir %attr(700,root,root) %{_sysconfdir}/xen %dir %attr(700,root,root) %{_sysconfdir}/xen
%dir %{_sysconfdir}/xen/scripts %dir %{_sysconfdir}/xen/scripts
%attr(755,root,root) %{_sysconfdir}/xen/scripts/block-drbd %attr(755,root,root) %{_sysconfdir}/xen/scripts/block-drbd

View File

@ -0,0 +1,12 @@
diff -Naur drbd-utils-9.13.0.orig/user/v84/drbdadm.h drbd-utils-9.13.0/user/v84/drbdadm.h
--- drbd-utils-9.13.0.orig/user/v84/drbdadm.h 2020-06-08 16:00:20.166480137 +0800
+++ drbd-utils-9.13.0/user/v84/drbdadm.h 2020-06-08 16:00:42.930652069 +0800
@@ -251,7 +251,7 @@
bool explicit;
char *option;
};
-struct setup_option *setup_options;
+extern struct setup_option *setup_options;
extern void add_setup_option(bool explicit, char *option);