diff --git a/drbd.spec b/drbd.spec index c7984a2..3845fd9 100644 --- a/drbd.spec +++ b/drbd.spec @@ -100,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 diff --git a/suse-coccinelle.patch b/suse-coccinelle.patch index 6c88918..5e07dc2 100644 --- a/suse-coccinelle.patch +++ b/suse-coccinelle.patch @@ -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: ;