From 84f58189f269be6633e0c8897d5624d3dfaaa650 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Thu, 4 Jan 2018 22:47:35 +0100 Subject: [centos jump] nbd build: Fix REQ_TYPE_SPECIAL Change-Id: Ia514418d2aae1b4f7e752d4610fa6c9829c67e51 Signed-off-by: Alexandru Avadanii --- mcp/scripts/lib.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mcp') diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index fe80d4937..05780bb62 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -91,8 +91,12 @@ function __kernel_modules { ( cd ~/rpmbuild/SPECS rpmbuild -bp --nodeps --target="${__uname_m}" kernel*.spec - cd ~/rpmbuild/BUILD/"${__srpm%.src.rpm}/linux-${__uname_r/el7*./el7.centos.}" + cd ~/rpmbuild/BUILD/"${__srpm%.src.rpm}"/linux-* sed -i 's/^.*\(CONFIG_BLK_DEV_NBD\).*$/\1=m/g' .config + # http://centosfaq.org/centos/nbd-does-not-compile-for-3100-514262el7x86_64 + if grep -Rq 'REQ_TYPE_DRV_PRIV' drivers/block; then + sed -i 's/REQ_TYPE_SPECIAL/REQ_TYPE_DRV_PRIV/g' drivers/block/nbd.c + fi gunzip -c "/boot/symvers-${__uname_r}.gz" > Module.symvers make prepare modules_prepare make M=drivers/block -j -- cgit 1.2.3-korg