playtron-os/rpm-specs-gaming

[kernel] Add RPM spec

Closed this issue · 1 comments

This should track the latest stable kernel for now starting with Linux 6.3 which will be released in a couple of weeks.

https://kernel.org/

Building the Linux kernel with GitHub Actions results in No space left on device error.

+ echo BUILDING A KERNEL FOR x86_64...
+ /usr/bin/make -s 'HOSTCFLAGS=-O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection   ' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' ARCH=x86_64 olddefconfig
USING ARCH=x86_64
BUILDING A KERNEL FOR x86_64...
+ perl -p -i -e 's/^CONFIG_BUILD_SALT.*/CONFIG_BUILD_SALT="6.3.13-200.playtron.fc38.x86_64"/' .config
+ /usr/bin/make -s 'HOSTCFLAGS=-O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection   ' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' ARCH=x86_64 'KCFLAGS= ' WITH_GCOV=0 -j2 bzImage
vmlinux.o: warning: objtool: hyperv_init+0x42f: unreachable instruction
+ '[' 1 -eq 1 ']'
+ /usr/bin/make -s 'HOSTCFLAGS=-O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection   ' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' ARCH=x86_64 'KCFLAGS= ' WITH_GCOV=0 -j2 modules
objcopy: drivers/net/ethernet/aquantia/atlantic/stiY4CzQ: No space left on device
btf_encoder__write_elf: failed to add .BTF section to 'drivers/net/ethernet/aquantia/atlantic/atlantic.ko': 2!
Failed to encode BTF
make[1]: *** [scripts/Makefile.modfinal:62: drivers/net/ethernet/aquantia/atlantic/atlantic.ko] Error 1
make[1]: *** Deleting file 'drivers/net/ethernet/aquantia/atlantic/atlantic.ko'
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1954: modules] Error 2
+ exit 1
error: Bad exit status from /var/tmp/rpm-tmp.vuVTUb (%build)
    Bad exit status from /var/tmp/rpm-tmp.vuVTUb (%build)

RPM build errors:
Error: Process completed with exit code 1.

GitHub Actions only provides virtual machines with 14 GB of storage space. For building a Linux kernel, you need a lot more space than that.

https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources

We will have to compromise and only test building the source RPM and skip the binary RPM build.