[DRBD-cvs] svn commit by lars - r2551 - in branches/drbd-0.7: .
drbd drbd/linux scripts - fix some odities in the paranoia
checks of our build sy
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Thu Oct 19 16:56:00 CEST 2006
Author: lars
Date: 2006-10-19 16:55:58 +0200 (Thu, 19 Oct 2006)
New Revision: 2551
Added:
branches/drbd-0.7/scripts/get_uts_release.sh
Modified:
branches/drbd-0.7/Makefile
branches/drbd-0.7/drbd.spec.in
branches/drbd-0.7/drbd/Makefile
branches/drbd-0.7/drbd/drbd_worker.c
branches/drbd-0.7/drbd/linux/drbd_config.h
branches/drbd-0.7/scripts/adjust_drbd_config_h.sh
Log:
fix some odities in the paranoia checks of our build system,
should build agains 2.6.18 now out of the box.
Modified: branches/drbd-0.7/Makefile
===================================================================
--- branches/drbd-0.7/Makefile 2006-10-19 14:42:18 UTC (rev 2550)
+++ branches/drbd-0.7/Makefile 2006-10-19 14:55:58 UTC (rev 2551)
@@ -159,10 +159,10 @@
all tools doc .filelist: drbd/drbd_buildtag.c
KDIR := $(shell echo /lib/modules/`uname -r`/build)
-KVER := $(shell \
- echo -e "\#include <linux/version.h>\ndrbd_kernel_release UTS_RELEASE" | \
- gcc -nostdinc -E -P -I$(KDIR)/include - 2>&1 | \
- sed -ne 's/^drbd_kernel_release "\(.*\)".*/\1/p')
+KVER := $(shell KDIR=$(KDIR) O=$(O) scripts/get_uts_release.sh)
+ifeq ($(KVER),)
+$(error "could not determine uts_release")
+endif
kernel-patch: drbd/drbd_buildtag.c
set -o errexit; \
Modified: branches/drbd-0.7/drbd/Makefile
===================================================================
--- branches/drbd-0.7/drbd/Makefile 2006-10-19 14:42:18 UTC (rev 2550)
+++ branches/drbd-0.7/drbd/Makefile 2006-10-19 14:55:58 UTC (rev 2551)
@@ -121,16 +121,19 @@
endif
-mv .drbd_kernelrelease.new .drbd_kernelrelease
@echo -n "Memorizing module configuration ... "
- @{ echo -e "#\n# drbd.o was compiled with" ; \
+ @config=$$( (for x in $(KDIR)/.config $(O)/.config ; do \
+ if test -e $$x ; then echo $$x ; exit 0; fi ; \
+ done; echo $(KDIR)/.config) | sed -e 's,//,/,g') ; \
+ { echo -e "#\n# drbd.o was compiled with" ; \
echo "# `gcc -v 2>&1 | tail -1`" ; \
echo "# against this kernelrelease:" ; \
sed 's/^/# /' .drbd_kernelrelease ; \
echo "# kernel .config from" ; \
- echo -n "# $(KDIR)/.config" ; \
- test -L "$(KDIR)" && echo " alias" && \
- echo "# $$(readlink $(KDIR))/.config" || echo "" ; \
+ echo -n "# $$config" ; \
+ test -L "$${config%/.config}" && echo " alias" && \
+ echo "# $$(readlink $${config%/.config})/.config" || echo "" ; \
echo -e "# follows\n#\n" ; \
- cat $(KDIR)/.config ; } | gzip > .kernel.config.gz
+ cat $$config ; } | gzip > .kernel.config.gz
@echo "done."
ifneq ($(KDIR_Makefile_PATCHLEVEL),6)
Modified: branches/drbd-0.7/drbd/drbd_worker.c
===================================================================
--- branches/drbd-0.7/drbd/drbd_worker.c 2006-10-19 14:42:18 UTC (rev 2550)
+++ branches/drbd-0.7/drbd/drbd_worker.c 2006-10-19 14:55:58 UTC (rev 2551)
@@ -150,7 +150,7 @@
drbd_chk_io_error(mdev,!uptodate);
// req may get freed within drbd_end_req
rsector = req->sector;
- drbd_end_req(req, RQ_DRBD_LOCAL, uptodate, rsector);
+ drbd_end_req(req, RQ_DRBD_LOCAL, uptodate);
drbd_al_complete_io(mdev,rsector);
dec_local(mdev);
}
Modified: branches/drbd-0.7/drbd/linux/drbd_config.h
===================================================================
--- branches/drbd-0.7/drbd/linux/drbd_config.h 2006-10-19 14:42:18 UTC (rev 2550)
+++ branches/drbd-0.7/drbd/linux/drbd_config.h 2006-10-19 14:55:58 UTC (rev 2551)
@@ -69,6 +69,6 @@
// but more recent kernels define it in arch/um/include/mem.h
#define HAVE_UML_TO_VIRT
-#define NO_MORE_DEV_FS
+//#define NO_MORE_DEV_FS
#endif
Modified: branches/drbd-0.7/drbd.spec.in
===================================================================
--- branches/drbd-0.7/drbd.spec.in 2006-10-19 14:42:18 UTC (rev 2550)
+++ branches/drbd-0.7/drbd.spec.in 2006-10-19 14:55:58 UTC (rev 2551)
@@ -64,9 +64,7 @@
%prep
%setup
test -d %{kdir}/.
-test $(echo -e "#include <linux/version.h>\ndrbd_kernel_release UTS_RELEASE" |
- gcc -nostdinc -E -P -I%{kdir}/include - |
- sed -ne 's/^drbd_kernel_release "\(.*\)".*/\1/p') = %{kernelversion}
+test "$(scripts/get_uts_release.sh)" = %{kernelversion}
%build
echo kernelversion=%{kernelversion}
Modified: branches/drbd-0.7/scripts/adjust_drbd_config_h.sh
===================================================================
--- branches/drbd-0.7/scripts/adjust_drbd_config_h.sh 2006-10-19 14:42:18 UTC (rev 2550)
+++ branches/drbd-0.7/scripts/adjust_drbd_config_h.sh 2006-10-19 14:55:58 UTC (rev 2551)
@@ -22,11 +22,21 @@
test -n "$KDIR"
KDIR=${KDIR%/}
+if test -z "$O"; then
+ O=$KDIR;
+else
+ O=${O%/}
+fi
-ls >/dev/null \
-$KDIR/{.config,Makefile,include/{linux/{version,sched,list,fs},asm/bitops}.h}
+# some paranoia: check that all files are where we expect them
+ls > /dev/null \
+$KDIR/{Makefile,include/linux/{sched,list,fs}.h}
+ls > /dev/null \
+$O/{.config,Makefile,include/linux/version.h}
+test -e $KDIR/include/asm/bitops.h ||
+test -e $O/include2/asm/bitops.h ||
+exit 1
-
if grep_q "^PATCHLEVEL *= *4" $KDIR/Makefile ; then
# do we have the threadding stuff in the kernel,
# and need to use the sighand lock instead of the signal lock?
Added: branches/drbd-0.7/scripts/get_uts_release.sh
===================================================================
--- branches/drbd-0.7/scripts/get_uts_release.sh 2006-10-19 14:42:18 UTC (rev 2550)
+++ branches/drbd-0.7/scripts/get_uts_release.sh 2006-10-19 14:55:58 UTC (rev 2551)
@@ -0,0 +1,12 @@
+#!/bin/bash
+{
+ for x in include/linux/{utsrelease,version}.h;
+ do
+ for d in $KDIR $O;
+ do
+ test -e "$d/$x" || continue;
+ echo "#include \"$d/$x\"";
+ done;
+ done;
+ echo "drbd_kernel_release UTS_RELEASE"
+} | gcc -nostdinc -E -P - | sed -ne 's/^drbd_kernel_release "\(.*\)".*/\1/p'
Property changes on: branches/drbd-0.7/scripts/get_uts_release.sh
___________________________________________________________________
Name: svn:executable
+ *
More information about the drbd-cvs
mailing list