mirror of
https://github.com/t2linux/fedora.git
synced 2026-04-30 13:51:42 -07:00
26 lines
891 B
Bash
Executable File
26 lines
891 B
Bash
Executable File
#!/usr/bin/bash
|
|
set -e
|
|
|
|
KERNEL_VERSION=6.5.11-300.fc39
|
|
|
|
cd "$package_builddir"
|
|
koji download-build --quiet --arch=src "kernel-$KERNEL_VERSION"
|
|
rpmdev-extract -q "kernel-$KERNEL_VERSION.src.rpm"
|
|
mv -n "kernel-$KERNEL_VERSION.src"/* .
|
|
rm -r "kernel-$KERNEL_VERSION.src.rpm" "kernel-$KERNEL_VERSION.src"
|
|
|
|
# Fedora devs are against merging kernel-local for all architectures when keys are not properly specified, so we have to patch it in.
|
|
sed -i "s@for i in %{all_arch_configs}@for i in *.config@g" "kernel.spec"
|
|
|
|
# Set buildid to .t2
|
|
sed -i 's/# define buildid .local/%define buildid .t2/g' "kernel.spec"
|
|
|
|
# Disable debug kernels
|
|
sed -i "/%define with_debug /c %define with_debug 0" "kernel.spec"
|
|
|
|
# Add our patches
|
|
sed -i "/Patch1:/a Patch2: t2linux-combined.patch" "kernel.spec"
|
|
|
|
cat "linux-t2-patches/extra_config" > "kernel-local"
|
|
cat "linux-t2-patches"/*.patch > "t2linux-combined.patch"
|