Fedora apply npt patch

Hello,
since there’s a patch for the npt bug in KVM now (https://patchwork.kernel.org/patch/10027525/) I wanted to apply it to my kernel until it’s in a Fedora kernel. I followed this guide, downloaded the patch and applied it running scripts/newpatch.sh KVM…patch. Then I ran fedpkg local and it failed with to following errors:

make: *** [Makefile:1004: vmlinux] Error 1
Fehler: Fehler-Status beim Beenden von /var/tmp/rpm-tmp.rzn1Mj (%build)
Fehler-Status beim Beenden von /var/tmp/rpm-tmp.rzn1Mj (%build)
Fehler beim Bauen des RPM:
Could not execute local: rpmbuild --define '_sourcedir /root/kernel' --define '_specdir /root/kernel' --define '_builddir         /root/kernel' --define '_srcrpmdir /root/kernel' --define '_rpmdir /root/kernel' --define 'dist .fc26' --define 'fedora 26' --eval '%undefine rhel' --define 'fc26 1' -ba /root/kernel/kernel.spec | tee .build-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.log

I’m sorry that it’s in German. When I try to build the packages without the patch applied, everything runs fine. Can somebody help me with that?

Is that the only output you have?

If you could include a few lines (10-20) preceding the make: *** [Makefile:1004: vmlinux] Error 1 line, that would help a lot.

Make is giving an error and I’m not sure it’s got all the information I need. That said, I don’t speak German, so I am relying on google translate.


Since I’m also on Fedora, I’ll give the build a go to see if I can find where the instructions must be modified.

For future reference, there is a small linux problems thread for this sort of thing. Please post there in the future. Thank you.

Are you a moderator? Because this 100% deserves its own thread. The NPT bug is an ongoing issue and needs all the exposure it can get. It shouldn’t be buried deep in a thread nobody reads for future reference. Thank you.

And thanks to DennisG1 for asking this question because I too was wondering how to make this patch work.

1 Like

Just let him be. He’s obviously not had his covfefe yet today.

Currently working on this issue but I’m on my laptop, so it’s going to take quite a while to validate the build works.

Oh alright. I don’t use fedora much so I didn’t know. Just seeing a lot of these threads getting shotgunned all over the forum so I thought I would let users know.

Just a clean up thats all.

OP you should put a tag for bugs or something.

Thank you for your answer. This is the whole output from the command.

+ /usr/lib/rpm/debugedit -b /root/kernel -d /usr/src/debug -i .tmp_vmlinux1
Dest dir longer than base dir is not supported

https://access.redhat.com/solutions/1426113

This page should help you.

I tried that and it didn’t change anything, so I just created a subfolder to make the path longer. Now it compiles but theres another error later:

+ cp Module.symvers /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build
+ cp System.map /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build
+ '[' -s Module.markers ']'
+ rm -rf /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/Documentation
+ rm -rf /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/scripts
+ rm -rf /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/include
+ cp .config /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build
+ cp -a scripts /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build
+ '[' -f tools/objtool/objtool ']'
+ cp -a tools/objtool/objtool /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/tools/objtool/
+ '[' -d arch/x86_64/scripts ']'
+ '[' -f 'arch/x86_64/*lds' ']'
+ rm -f '/root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/scripts/*.o'
+ rm -f /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/scripts/kconfig/conf.o /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/scripts/kconfig/zconf.tab.o /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/scripts/mod/empty.o /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/scripts/mod/file2alias.o /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/scripts/mod/modpost.o /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/scripts/mod/sumversion.o
+ '[' -d arch/x86/include ']'
+ cp -a --parents arch/x86/include /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a include /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/include
+ cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/entry/syscalls/syscalltbl.sh /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/entry/syscalls/syscallhdr.sh /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/entry/syscalls/syscall_64.tbl /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/tools/relocs_32.c /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/tools/relocs_64.c /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/tools/relocs.c /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/tools/relocs_common.c /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/tools/relocs.h /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents tools/include/tools/le_byteshift.h /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/purgatory/purgatory.c /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/purgatory/sha256.h /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/purgatory/sha256.c /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/purgatory/stack.S /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/purgatory/string.c /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/purgatory/setup-x86_64.S /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/purgatory/entry64.S /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/boot/string.h /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/boot/string.c /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ cp -a --parents arch/x86/boot/ctype.h /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/
+ touch -r /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/Makefile /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/include/generated/uapi/linux/version.h
+ cp /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/.config /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/include/config/auto.conf
+ test -s vmlinux.id
+ cp vmlinux.id /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build/vmlinux.id
+ mkdir -p /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/usr/lib/debug/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug
+ cp vmlinux /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/usr/lib/debug/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug
+ find /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug -name '*.ko' -type f
+ xargs --no-run-if-empty chmod u+x
+ grep -F /drivers/ modnames
+ xargs --no-run-if-empty nm -upA
+ sed -n 's,^.*/\([^/]*\.ko\):  *U \(.*\)$,\1 \2,p'
+ collect_modules_list networking 'register_netdev|ieee80211_register_hw|usbnet_probe|phy_driver_register|rt(l_|2x00)(pci|usb)_probe|register_netdevice'
+ sed -r -n -e 's/^([^ ]+) \.?(register_netdev|ieee80211_register_hw|usbnet_probe|phy_driver_register|rt(l_|2x00)(pci|usb)_probe|register_netdevice)$/\1/p' drivers.undef
+ LC_ALL=C
+ sort -u
+ '[' '!' -z '' ']'
+ collect_modules_list block 'ata_scsi_ioctl|scsi_add_host|scsi_add_host_with_dma|blk_alloc_queue|blk_init_queue|register_mtd_blktrans|scsi_esp_register|scsi_register_device_handler|blk_queue_physical_block_size' 'pktcdvd.ko|dm-mod.ko'
+ sed -r -n -e 's/^([^ ]+) \.?(ata_scsi_ioctl|scsi_add_host|scsi_add_host_with_dma|blk_alloc_queue|blk_init_queue|register_mtd_blktrans|scsi_esp_register|scsi_register_device_handler|blk_queue_physical_block_size)$/\1/p' drivers.undef
+ LC_ALL=C
+ sort -u
+ '[' '!' -z 'pktcdvd.ko|dm-mod.ko' ']'
+ sed -r -e '/^(pktcdvd.ko|dm-mod.ko)$/d' -i /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/modules.block
+ collect_modules_list drm 'drm_open|drm_init'
+ sed -r -n -e 's/^([^ ]+) \.?(drm_open|drm_init)$/\1/p' drivers.undef
+ LC_ALL=C
+ sort -u
+ '[' '!' -z '' ']'
+ collect_modules_list modesetting drm_crtc_init
+ sed -r -n -e 's/^([^ ]+) \.?(drm_crtc_init)$/\1/p' drivers.undef
+ LC_ALL=C
+ sort -u
+ '[' '!' -z '' ']'
+ find /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug -name '*.ko'
+ xargs /sbin/modinfo -l
+ grep -E -v 'GPL( v2)?$|Dual BSD/GPL$|Dual MPL/GPL$|GPL and additional rights$'
+ pushd /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/
~/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug ~/patched_kernel/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ rm -f modules.alias modules.alias.bin modules.builtin.bin modules.dep modules.dep.bin 'modules.*map' modules.symbols modules.symbols.bin modules.devname modules.softdep
+ popd
~/patched_kernel/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ /root/patched_kernel/kernel/mod-extra.sh /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug /root/patched_kernel/kernel/mod-extra.list
~/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug ~/patched_kernel/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
~/patched_kernel/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
~/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug ~/patched_kernel/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
~/patched_kernel/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ cp System.map /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/.
+ pushd /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
~/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64 ~/patched_kernel/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ mkdir restore
+ cp -r lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/System.map lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/build lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/config lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/extra lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/modules.block lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/modules.builtin lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/modules.drm lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/modules.modesetting lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/modules.networking lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/modules.order lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/source lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/updates lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/vdso lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/vmlinuz restore/.
+ rm -rf lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/extra
+ find lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel -name '*.ko'
+ sort -n
+ cp /root/patched_kernel/kernel/filter-aarch64.sh /root/patched_kernel/kernel/filter-armv7hl.sh /root/patched_kernel/kernel/filter-i686.sh /root/patched_kernel/kernel/filter-modules.sh /root/patched_kernel/kernel/filter-ppc64.sh /root/patched_kernel/kernel/filter-ppc64le.sh /root/patched_kernel/kernel/filter-ppc64p7.sh /root/patched_kernel/kernel/filter-s390x.sh /root/patched_kernel/kernel/filter-x86_64.sh .
+ /root/patched_kernel/kernel/filter-modules.sh modules.list x86_64
+ rm filter-aarch64.sh filter-armv7hl.sh filter-i686.sh filter-modules.sh filter-ppc64.sh filter-ppc64le.sh filter-ppc64p7.sh filter-s390x.sh filter-x86_64.sh
+ depmod -b . -aeF ./System.map 4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug
+ '[' -s depmod.out ']'
+ echo 'Depmod failure'
+ cat depmod.out
Depmod failure
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_create_queue
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_max_size
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_unregister_client_dev
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_register_client_dev
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_free_queue
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_tx_enqueue
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_register_client
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_link_query
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_link_up
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_rx_remove
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_unregister_client
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_rx_enqueue
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_tx_free_entry
depmod: WARNING: /root/rpmbuild_usr_src_debug/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/./lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64+debug/kernel/drivers/net/ntb_netdev.ko needs unknown symbol ntb_transport_link_down
+ exit 1
Fehler: Fehler-Status beim Beenden von /var/tmp/rpm-tmp.IAo8NE (%build)
    Fehler-Status beim Beenden von /var/tmp/rpm-tmp.IAo8NE (%build)


Fehler beim Bauen des RPM:
Could not execute local: rpmbuild --define '_sourcedir /root/patched_kernel/kernel' --define '_specdir /root/patched_kernel/kernel' --define '_builddir /root/patched_kernel/kernel' --define '_srcrpmdir /root/patched_kernel/kernel' --define '_rpmdir /root/patched_kernel/kernel' --define 'dist .fc26' --define 'fedora 26' --eval '%undefine rhel' --define 'fc26 1' -ba /root/patched_kernel/kernel/kernel.spec | tee .build-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.log

That’s odd. those don’t look like failures…

Did you check out the sources as root?

Try checking out the sources in your user’s home directory (not root) and give it another go. Don’t run the commands as root unless the command has a # in front of it.

I did everything from scratch with my regular user now and I got a similar output:

+ cp Module.symvers /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build
+ cp System.map /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build
+ '[' -s Module.markers ']'
+ rm -rf /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/Documentation
+ rm -rf /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/scripts
+ rm -rf /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/include
+ cp .config /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build
+ cp -a scripts /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build
+ '[' -f tools/objtool/objtool ']'
+ cp -a tools/objtool/objtool /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/tools/objtool/
+ '[' -d arch/x86_64/scripts ']'
+ '[' -f 'arch/x86_64/*lds' ']'
+ rm -f '/home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/scripts/*.o'
+ rm -f /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/scripts/kconfig/conf.o /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/scripts/kconfig/zconf.tab.o /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/scripts/mod/empty.o /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/scripts/mod/file2alias.o /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/scripts/mod/modpost.o /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/scripts/mod/sumversion.o
+ '[' -d arch/x86/include ']'
+ cp -a --parents arch/x86/include /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a include /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/include
+ cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/entry/syscalls/syscalltbl.sh /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/entry/syscalls/syscallhdr.sh /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/entry/syscalls/syscall_64.tbl /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/tools/relocs_32.c /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/tools/relocs_64.c /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/tools/relocs.c /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/tools/relocs_common.c /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/tools/relocs.h /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents tools/include/tools/le_byteshift.h /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/purgatory/purgatory.c /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/purgatory/sha256.h /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/purgatory/sha256.c /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/purgatory/stack.S /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/purgatory/string.c /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/purgatory/setup-x86_64.S /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/purgatory/entry64.S /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/boot/string.h /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/boot/string.c /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ cp -a --parents arch/x86/boot/ctype.h /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/
+ touch -r /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/Makefile /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/include/generated/uapi/linux/version.h
+ cp /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/.config /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/include/config/auto.conf
+ test -s vmlinux.id
+ cp vmlinux.id /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build/vmlinux.id
+ mkdir -p /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/usr/lib/debug/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ cp vmlinux /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/usr/lib/debug/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ find /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64 -name '*.ko' -type f
+ xargs --no-run-if-empty chmod u+x
+ grep -F /drivers/ modnames
+ xargs --no-run-if-empty nm -upA
+ sed -n 's,^.*/\([^/]*\.ko\):  *U \(.*\)$,\1 \2,p'
+ collect_modules_list networking 'register_netdev|ieee80211_register_hw|usbnet_probe|phy_driver_register|rt(l_|2x00)(pci|usb)_probe|register_netdevice'
+ sed -r -n -e 's/^([^ ]+) \.?(register_netdev|ieee80211_register_hw|usbnet_probe|phy_driver_register|rt(l_|2x00)(pci|usb)_probe|register_netdevice)$/\1/p' drivers.undef
+ LC_ALL=C
+ sort -u
+ '[' '!' -z '' ']'
+ collect_modules_list block 'ata_scsi_ioctl|scsi_add_host|scsi_add_host_with_dma|blk_alloc_queue|blk_init_queue|register_mtd_blktrans|scsi_esp_register|scsi_register_device_handler|blk_queue_physical_block_size' 'pktcdvd.ko|dm-mod.ko'
+ sed -r -n -e 's/^([^ ]+) \.?(ata_scsi_ioctl|scsi_add_host|scsi_add_host_with_dma|blk_alloc_queue|blk_init_queue|register_mtd_blktrans|scsi_esp_register|scsi_register_device_handler|blk_queue_physical_block_size)$/\1/p' drivers.undef
+ LC_ALL=C
+ sort -u
+ '[' '!' -z 'pktcdvd.ko|dm-mod.ko' ']'
+ sed -r -e '/^(pktcdvd.ko|dm-mod.ko)$/d' -i /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/modules.block
+ collect_modules_list drm 'drm_open|drm_init'
+ sed -r -n -e 's/^([^ ]+) \.?(drm_open|drm_init)$/\1/p' drivers.undef
+ LC_ALL=C
+ sort -u
+ '[' '!' -z '' ']'
+ collect_modules_list modesetting drm_crtc_init
+ sed -r -n -e 's/^([^ ]+) \.?(drm_crtc_init)$/\1/p' drivers.undef
+ LC_ALL=C
+ sort -u
+ '[' '!' -z '' ']'
+ find /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64 -name '*.ko'
+ xargs /sbin/modinfo -l
+ grep -E -v 'GPL( v2)?$|Dual BSD/GPL$|Dual MPL/GPL$|GPL and additional rights$'
+ pushd /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/
~/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64 ~/Downloads/Temp/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ rm -f modules.alias modules.alias.bin modules.builtin.bin modules.dep modules.dep.bin 'modules.*map' modules.symbols modules.symbols.bin modules.devname modules.softdep
+ popd
+ /home/dennis/Downloads/Temp/kernel/mod-extra.sh /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64 /home/dennis/Downloads/Temp/kernel/mod-extra.list
~/Downloads/Temp/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
~/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64 ~/Downloads/Temp/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
~/Downloads/Temp/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
~/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64 ~/Downloads/Temp/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
~/Downloads/Temp/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ cp System.map /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/.
+ pushd /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ mkdir restore
~/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64 ~/Downloads/Temp/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ cp -r lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/System.map lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/build lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/config lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/extra lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/kernel lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/modules.block lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/modules.builtin lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/modules.drm lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/modules.modesetting lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/modules.networking lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/modules.order lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/source lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/updates lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/vdso lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/vmlinuz restore/.
+ rm -rf lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/extra
+ sort -n
+ find lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/kernel -name '*.ko'
+ cp /home/dennis/Downloads/Temp/kernel/filter-aarch64.sh /home/dennis/Downloads/Temp/kernel/filter-armv7hl.sh /home/dennis/Downloads/Temp/kernel/filter-i686.sh /home/dennis/Downloads/Temp/kernel/filter-modules.sh /home/dennis/Downloads/Temp/kernel/filter-ppc64.sh /home/dennis/Downloads/Temp/kernel/filter-ppc64le.sh /home/dennis/Downloads/Temp/kernel/filter-ppc64p7.sh /home/dennis/Downloads/Temp/kernel/filter-s390x.sh /home/dennis/Downloads/Temp/kernel/filter-x86_64.sh .
+ /home/dennis/Downloads/Temp/kernel/filter-modules.sh modules.list x86_64
+ rm filter-aarch64.sh filter-armv7hl.sh filter-i686.sh filter-modules.sh filter-ppc64.sh filter-ppc64le.sh filter-ppc64p7.sh filter-s390x.sh filter-x86_64.sh
+ depmod -b . -aeF ./System.map 4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ '[' -s depmod.out ']'
+ rm depmod.out
+ pushd /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/
~/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64 ~/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64 ~/Downloads/Temp/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ rm -f modules.alias modules.alias.bin modules.builtin.bin modules.dep modules.dep.bin 'modules.*map' modules.symbols modules.symbols.bin modules.devname modules.softdep
+ popd
~/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64 ~/Downloads/Temp/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ find lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/kernel -mindepth 1 -type d
+ sort -n
+ rm System.map
+ cp -r restore/System.map restore/build restore/config restore/extra restore/kernel restore/modules.block restore/modules.builtin restore/modules.drm restore/modules.modesetting restore/modules.networking restore/modules.order restore/source restore/updates restore/vdso restore/vmlinuz lib/modules/4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/.
+ rm -rf restore
+ popd
~/Downloads/Temp/kernel/kernel-4.13.fc26/linux-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64
+ sed -e 's/^lib*/\/lib/' -e 's/.ko$/.ko.xz/' /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/k-d.list
+ sed -e 's/^lib*/%dir \/lib/' -e 's/.ko$/.ko.xz/' /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/module-dirs.list
+ sed -e 's/^lib*/\/lib/' -e 's/.ko$/.ko.xz/' /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/modules.list
sed: can't read /home/dennis/rpmbuild/BUILDROOT/kernel-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.x86_64/modules.list: No such file or directory
Fehler: Fehler-Status beim Beenden von /var/tmp/rpm-tmp.vwLyNY (%build)
    Fehler-Status beim Beenden von /var/tmp/rpm-tmp.vwLyNY (%build)


Fehler beim Bauen des RPM:
Could not execute local: rpmbuild --define '_sourcedir /home/dennis/Downloads/Temp/kernel' --define '_specdir /home/dennis/Downloads/Temp/kernel' --define '_builddir /home/dennis/Downloads/Temp/kernel' --define '_srcrpmdir /home/dennis/Downloads/Temp/kernel' --define '_rpmdir /home/dennis/Downloads/Temp/kernel' --define 'dist .fc26' --define 'fedora 26' --eval '%undefine rhel' --define 'fc26 1' -ba /home/dennis/Downloads/Temp/kernel/kernel.spec | tee .build-4.13.10-200.KVM_SVM_obey_guest_PAT.patch.fc26.log

Made any progress yet? If not, I would advise you to check out this guide from the fedora wiki:
https://fedoraproject.org/wiki/Building_a_custom_kernel
It explains how to clone the sources with git, apply a patch and build and install it with make.
Applys to just about any Linux distro. You can probably skip the part on installing dependencies since Yardas guide has covered this too, although make sure that you have ‘openssl-devel’ and maybe ‘compat-openssl10-devel’ installed.

Haven’t seen this done with fedpkg before, so I can’t help you there.

Viel Erfolg!

1 Like

It boils down to:

git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
#this will clone the kernel sources into a directory 'linux'
cd linux
git checkout v4.14-rc6
#adjust this tag for whatever is the current mainline branch, probably not a good idea to build the master branch for now.
patch -p1 < /path/to/your/npt.patch
#the -p1 flag tells patch that the diff uses relative paths
make menuconfig
#you can set the general setup->local version to something like '-dennis-npt', leave the other options at thier defaults for now
make modules
make bzImage
sudo make install_modules
sudo make install

#Maybe you have to rebuild your Grub config afterwards:
sudo grub2-mkconfig -o /etc/grub2-efi.cfg
1 Like

Should I use the vanilla sources or should I get the git tree mentioned in the wiki article with the fedora patches applied? Also if I use make install, it will not install as an rpm, right?

I would recommend using vanilla which always worked fine for me and will get you the most recent kernel version, which is a good idea for this kind of virtualization.
You’re right, this will not install as an rpm.

Will it be a problem if it doesn’t install as rpm? Could I safely remove it, if it doesn’t work out?

Yes, you can. It will also keep all your other kernels intact so you can always select an other one at boottime.
To remove a custom kernel, remove it from /boot.
If you added the local version string, you could do something like:
rm /boot/*dennis*

Also remove your now unused modules:

rm -r /lib/modules/*dennis*

Will it automatically install my DKMS modules or do I have to do that manually?

It should, at least as far as i know. Just realized that akmods seems to not like more then one -dash in the kernel name, it gave me this error: line 53: Invalid version (double separator '-').
You might want to consider this when choosing a local version string…

I don’t think I have any akmods, but I’ll consider it once make modules is done