Accepting request 762058 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/762058 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=84
This commit is contained in:
commit
d8f747e343
@ -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>
|
||||
|
||||
|
11
drbd.spec
11
drbd.spec
@ -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/. || :
|
||||
@ -97,9 +100,11 @@ for flavor in %{flavors_to_build}; do
|
||||
cp -r source $flavor
|
||||
cp %{_sourcedir}/Module.supported $flavor
|
||||
export DRBDSRC="$PWD/obj/$flavor"
|
||||
# bsc#1160194, check the coccicheck work.
|
||||
#make coccicheck
|
||||
make %{?_smp_mflags} -C %{kernel_source $flavor} modules M=$PWD/$flavor SPAAS=${SPAAS}
|
||||
|
||||
#Check the compat result
|
||||
# Check the compat result
|
||||
cat $PWD/$flavor/compat.h
|
||||
done
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -Naur drbd-9.0.20~0rc3+git.9c642cce.orig/drbd/drbd-kernel-compat/gen_compat_patch.sh drbd-9.0.20~0rc3+git.9c642cce/drbd/drbd-kernel-compat/gen_compat_patch.sh
|
||||
--- drbd-9.0.20~0rc3+git.9c642cce.orig/drbd/drbd-kernel-compat/gen_compat_patch.sh 2019-10-09 15:10:24.932509799 +0800
|
||||
+++ drbd-9.0.20~0rc3+git.9c642cce/drbd/drbd-kernel-compat/gen_compat_patch.sh 2019-10-10 17:51:46.280918975 +0800
|
||||
diff -Naur drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/gen_compat_patch.sh drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/gen_compat_patch.sh
|
||||
--- drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/gen_compat_patch.sh 2020-01-09 13:38:00.998984586 +0800
|
||||
+++ drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/gen_compat_patch.sh 2020-01-09 13:38:10.407036976 +0800
|
||||
@@ -41,6 +41,15 @@
|
||||
< drbd-kernel-compat/cocci/debugfs_compat_template.cocci.in \
|
||||
>> $incdir/.compat.cocci;
|
||||
@ -42,3 +42,19 @@ diff -Naur drbd-9.0.20~0rc3+git.9c642cce.orig/drbd/drbd-kernel-compat/gen_compat
|
||||
if [ -e $incdir/.compat.patch ]; then
|
||||
cat $incdir/.compat.patch >> $compat_patch.tmp;
|
||||
fi;
|
||||
diff -Naur drbd-9.0.20~1+git.7dce3c8b.orig/Makefile drbd-9.0.20~1+git.7dce3c8b/Makefile
|
||||
--- drbd-9.0.20~1+git.7dce3c8b.orig/Makefile 2020-01-09 13:38:00.994984563 +0800
|
||||
+++ drbd-9.0.20~1+git.7dce3c8b/Makefile 2020-01-09 13:41:50.512262670 +0800
|
||||
@@ -310,9 +310,11 @@
|
||||
endif
|
||||
|
||||
coccicheck: coccinelle/*.cocci
|
||||
+ $(eval coccilibpath := $(shell rpm -ql coccinelle|grep standard.h|xargs dirname))
|
||||
@for file in $^ ; do \
|
||||
echo " COCCICHECK $$(basename $${file} .cocci)"; \
|
||||
- spatch --very-quiet drbd/drbd_*.c -D $(MODE) --sp-file $${file}; \
|
||||
+ spatch drbd/drbd_*.c --macro-file-builtins $(coccilibpath)/standard.h \
|
||||
+ --iso-file $(coccilibpath)/standard.iso -D $(MODE) --sp-file $${file}; \
|
||||
done
|
||||
|
||||
Makefile: ;
|
||||
|
40
without_pr_warning.patch
Normal file
40
without_pr_warning.patch
Normal file
@ -0,0 +1,40 @@
|
||||
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-06 14:52:30.740564872 +0800
|
||||
@@ -0,0 +1,11 @@
|
||||
+@outdate_pr_waring@
|
||||
+identifier func;
|
||||
+expression list EL;
|
||||
+@@
|
||||
+func(...) {
|
||||
+<...
|
||||
+- pr_warning(EL);
|
||||
++ pr_warn(EL);
|
||||
+...>
|
||||
+}
|
||||
+
|
||||
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 2020-01-06 14:50:00.827751099 +0800
|
||||
+++ drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/gen_patch_names.c 2020-01-06 14:50:41.135969904 +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 2020-01-06 14:50:41.135969904 +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!");
|
||||
+}
|
Loading…
Reference in New Issue
Block a user