[DRBD-user] Port "RPM building bug" fix to drbd 0.8

Maxim Doucet maxim at alamaison.fr
Wed Jun 20 18:19:41 CEST 2007

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

According to this past discussion : "rpm building bug?"
the rpm bug still exists in 0.8.x version.

The problem is basically that the script scripts/get_uts_release.sh
doesn't work if the KDIR variable is not exported.

This has been fixed in the 0.7 branche (according to
where the variable is exported into the Makefile. See

Though the fix is not present in the 0.8 branche's Makefile :
Could this fix be port to the 0.8 branche ?

The - little - patch is :

--- /root/drbd-8.0.3/Makefile   2007-05-07 17:18:50.000000000 +0200
+++ /usr/src/drbd-8.0.3/Makefile        2007-06-20 17:25:54.000000000 +0200
@@ -172,6 +172,7 @@

 all tools doc .filelist: drbd/drbd_buildtag.c

+export KDIR KVER 0
 KDIR := $(shell echo /lib/modules/`uname -r`/build)
 KVER := $(shell KDIR=$(KDIR) O=$(O) scripts/get_uts_release.sh)


It did fix my problem while attempting to build a rpm for drbd 0.8.3 on
Fedora Core 7 (with "make rpm")

Maxim Doucet
sys admin @ la maison

More information about the drbd-user mailing list