Re: fedpkg clone -a kernel failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/26/21 10:29 PM, Sampson Fung wrote:
For my own use.  Trying to enable more btrfs debug options.


for me, fedpkg mockbuilds were ... unsuccessful.  same errors you're seeing; and then some.

if you're !building for official pkg'ing, you can live without it.

asking in #fedora-kernel, i got some experienced "don't bother" advice ...
instead, worked out the following for myself.

it works reliably for me.

I exec'd this once, to ensure all kernel build deps were in place

	git clone --branch f34 https://src.fedoraproject.org/rpms/kernel.git
	cd kernel
	dnf builddep kernel.spec
	cd ../
	rm -rf kernel

then, for repeatable builds, checkout source

	git clone --filter=tree:0 https://gitlab.com/cki-project/kernel-ark.git
	cd kernel-ark

and checkout branch/tag as req'd. or, start a bisect, etc.

never hurts to clean/reset

	git clean -xfd
	git reset --hard

clean-up your rmpbuild tree (might want to use a smaller hammer here ...)

	rm -rf ~/rpmbuild/*
	rpmdev-setuptree
	tree ~/rpmbuild/
		~/rpmbuild/
		├── BUILD
		├── RPMS
		├── SOURCES
		├── SPECS
		└── SRPMS

clean the build

	make clean

copy your config of choice, e.g.

	/bin/cp -f /boot/config-5.12.15-300.fc34.x86_64 .config

modify, &/or, create a custom config. i label mine for convenience

	_LABEL=$( git rev-parse --short HEAD )
	perl -pi -e 's|^(EXTRAVERSION).*|${1} = -custom-'${_LABEL}'|g' Makefile

prep the config

	make oldconfig

and build; here, I'm building the rpm target, as I build locally on a big box, and transport/install on a small one

	make -j16 binrpm-pkg

this is useful to have around

	https://www.kernel.org/doc/makehelp.txt

with that^, you'll end up with

	tree ~/rpmbuild/RPMS/
		~/rpmbuild/RPMS/
		└── x86_64
		    ├── kernel-5.12.15_custom_XXXXXXXX.x86_64.rpm
		    └── kernel-headers-5.12.15_custom_XXXXXXXX.x86_64.rpm


install the

	kernel-5.12.15_custom_XXXXXXXX.x86_64.rpm

rebuild your initrd.
reboot.
enjoy.

hth.
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux