Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package drbd for openSUSE:Factory checked in 
at 2025-02-10 17:27:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/drbd (Old)
 and      /work/SRC/openSUSE:Factory/.drbd.new.21275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "drbd"

Mon Feb 10 17:27:59 2025 rev:116 rq:1244633 version:9.1.23

Changes:
--------
--- /work/SRC/openSUSE:Factory/drbd/drbd.changes        2025-01-09 
15:08:01.381762496 +0100
+++ /work/SRC/openSUSE:Factory/.drbd.new.21275/drbd.changes     2025-02-10 
17:55:56.426478390 +0100
@@ -1,0 +2,7 @@
+Sun Feb  9 04:00:30 UTC 2025 - Glass Su <[email protected]>
+
+- drbd: fix build error against kernel v6.13 (boo#1236927)
+  * add patch
+      + boo1236927-fix-build_error_against_v6.13.patch
+
+-------------------------------------------------------------------

New:
----
  boo1236927-fix-build_error_against_v6.13.patch

BETA DEBUG BEGIN:
  New:  * add patch
      + boo1236927-fix-build_error_against_v6.13.patch
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ drbd.spec ++++++
--- /var/tmp/diff_new_pack.GZX2lc/_old  2025-02-10 17:55:57.006502274 +0100
+++ /var/tmp/diff_new_pack.GZX2lc/_new  2025-02-10 17:55:57.010502440 +0100
@@ -42,6 +42,7 @@
 Patch1001:  bsc-1025089_fix-resync-finished-with-syncs-have-bits-set.patch
 Patch1002:  suse-coccinelle.patch
 Patch1003:  boo1235399-fix_the_warning_of_blk_validate_limits.patch
+Patch1004:  boo1236927-fix-build_error_against_v6.13.patch
 ########################
 
 #https://github.com/openSUSE/rpmlint-checks/blob/master/KMPPolicyCheck.py
@@ -101,7 +102,7 @@
     #make coccicheck
 
     # call make prep to generate drbd build dir
-    make %{?_smp_mflags} -C $flavor KDIR=%{kernel_source $flavor} prep 
SPAAS=${SPAAS}
+    make %{?_smp_mflags} -C $flavor KDIR=%{kernel_source $flavor} prep 
SPAAS=${SPAAS} KBUILD_ABS_SRCTREE=1
 
     cp -a %{_sourcedir}/Module.supported ${flavor}/build-current
 

++++++ boo1236927-fix-build_error_against_v6.13.patch ++++++
>From 7d77b1b5768253deb4e4fcc645dfe0ab4ff1a292 Mon Sep 17 00:00:00 2001
From: Su Yue <[email protected]>
Date: Sun, 9 Feb 2025 11:36:28 +0800
Subject: [PATCH] fix build error against v6.13

The DRBD build failed on the latest kernel v6.13:

```
   CHK     build-6.13.1-1-default/compat.patch
   LN      build-6.13.1-1-default/compat.patch -> 
../drbd-kernel-compat/cocci_cache/47e34234767463327c545d4b02432945/compat.patch
 set -- ./build-6.13.1-1-default/compat.patch 
./build-6.13.1-1-default/compat.h;        \
 test $1 -nt $2 || touch -r $1 $2
   SPLIT   build-6.13.1-1-default/compat.patch
 /bin/bash: line 1: build-6.13.1-1-default/compat.patch: No such file or 
directory
 make[3]: *** [Kbuild:222: build-6.13.1-1-default/.ts.compat.patch] Error 1
 make[2]: *** [/usr/src/linux-6.13.1-1/Makefile:2012: .] Error 2
```
which is caused by upstream commit:

commit 13b25489b6f8bd73ed65f07928f7c27a481f1820
Author: Masahiro Yamada <[email protected]>
Date:   Sun Nov 10 10:34:33 2024 +0900

    kbuild: change working directory to external module directory with M=

The commit changes working directory to 
/usr/src/packages/BUILD/drbd-9.1.23-build/drbd-9.1.23/64kb.

drbd/Kbuild uses relative path for compat.patch:
obj.build := $(obj)/$(build-dir)
...
compat.patch     := $(obj.build)/compat.patch

When SPLIT is calling, it's in $(build-dir)/.patches directory, thus 
compat.patch is not found.

Fix it by adding prefix $(srcroot) to obj.build.
This patch incorporates with make option KBUILD_ABS_SRCTREE=1.
So the make prep should be:

make -j4 -C default KDIR=/usr/src/linux-obj/x86_64/default prep SPAAS=false 
KBUILD_ABS_SRCTREE=1

As Linux/Documentation/kbuild/makefiles.rst says:

$(srcroot)
  $(srcroot) refers to the root of the source you are building, which can be
  either the kernel source or the external modules source, depending on whether
  KBUILD_EXTMOD is set. This can be either a relative or an absolute path, but
  if KBUILD_ABS_SRCTREE=1 is set, it is always an absolute path.

Signed-off-by: Su Yue <[email protected]>
---
 drbd/Kbuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drbd/Kbuild b/drbd/Kbuild
index 3e1e5681bcea..31535d2a7074 100644
--- a/drbd/Kbuild
+++ b/drbd/Kbuild
@@ -18,7 +18,7 @@ else
 
 SHELL := /bin/bash
 
-obj.build := $(obj)/$(build-dir)
+obj.build := $(srcroot)/$(obj)/$(build-dir)
 PHONY += $(obj.build)
 
 # we don't have an official Kbuild entry point.  This is only used to generate
-- 
2.39.5 (Apple Git-154)

Reply via email to