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

bsc#1159786, fix build issue of v5.5

OBS-URL: https://build.opensuse.org/request/show/760597
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=103
This commit is contained in:
nick wang 2020-01-03 09:09:09 +00:00 committed by Git OBS Bridge
parent d3e71354f1
commit 285a9425d5
3 changed files with 50 additions and 2 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jan 3 08:52:14 UTC 2020 - nick wang <nwang@suse.com>
- bsc#1159786, fix build issue against v5.5
add patch without_pr_warning.patch
-------------------------------------------------------------------
Thu Dec 26 07:55:03 UTC 2019 - nick wang <nwang@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package drbd
#
# Copyright (c) 2019 SUSE LLC
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -37,7 +37,9 @@ Patch1: fix-resync-finished-with-syncs-have-bits-set.patch
Patch2: rely-on-sb-handlers.patch
Patch3: drbd-fix-zero-metadata-limit-by-page-size-misaligned.patch
Patch4: drbd-update-resync-target-s-dagtag.patch
Patch5: suse-coccinelle.patch
#In 61ff72f401680(v5.5-rc2), pr_warning is removed
Patch5: without_pr_warning.patch
Patch6: suse-coccinelle.patch
#https://github.com/openSUSE/rpmlint-checks/blob/master/KMPPolicyCheck.py
BuildRequires: coccinelle
BuildRequires: kernel-source
@ -75,6 +77,7 @@ installed kernel.
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
mkdir source
cp -a drbd/. source/. || :

39
without_pr_warning.patch Normal file
View File

@ -0,0 +1,39 @@
diff -Naur drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/cocci/suse_pr_warning__no_present.cocci drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/cocci/suse_pr_warning__no_present.cocci
--- drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/cocci/suse_pr_warning__no_present.cocci 1970-01-01 08:00:00.000000000 +0800
+++ drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/cocci/suse_pr_warning__no_present.cocci 2020-01-03 16:27:11.508386084 +0800
@@ -0,0 +1,10 @@
+@outdate_pr_waring@
+identifier func;
+@@
+func(...) {
+<...
+- pr_warning
++ pr_warn
+...>
+}
+
diff -Naur drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/gen_patch_names.c drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/gen_patch_names.c
--- drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/gen_patch_names.c 2019-12-26 17:01:19.647961356 +0800
+++ drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/gen_patch_names.c 2020-01-03 16:31:30.077789676 +0800
@@ -291,6 +291,9 @@
patch(1, "allow_kernel_signal", true, false,
COMPAT_HAVE_ALLOW_KERNEL_SIGNAL, "present");
+ patch(1, "suse_pr_warning", true, false,
+ COMPAT_WITH_PR_WARNING, "present");
+
/* #define BLKDEV_ISSUE_ZEROOUT_EXPORTED */
/* #define BLKDEV_ZERO_NOUNMAP */
diff -Naur drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/tests/with_pr_warning.c drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/tests/with_pr_warning.c
--- drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/tests/with_pr_warning.c 1970-01-01 08:00:00.000000000 +0800
+++ drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/tests/with_pr_warning.c 2019-12-26 17:52:57.761698224 +0800
@@ -0,0 +1,8 @@
+#include <linux/printk.h>
+
+/* pr_waring is dropped since 61ff72f401680 */
+
+void foo(void)
+{
+ pr_warning("pr_warning replaced by pr_warn since 61ff72f401680!");
+}