From 689c83afaa830c1b21e678495b03f69ecb4d2ebf Mon Sep 17 00:00:00 2001 From: Justin M. Forbes Date: Mar 13 2023 17:55:37 +0000 Subject: Linux v6.2.6 Signed-off-by: Justin M. Forbes --- diff --git a/kernel-tools.spec b/kernel-tools.spec index 9a47ec0..8d5bd09 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -5,7 +5,7 @@ # and/or a kernel built from an rc or git snapshot, released_kernel should # be 0. %global released_kernel 1 -%global baserelease 1 +%global baserelease 100 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -19,7 +19,7 @@ %if 0%{?released_kernel} # Do we have a -stable update to apply? -%global stable_update 0 +%global stable_update 6 # Set rpm version accordingly %if 0%{?stable_update} %global stablerev %{stable_update} @@ -558,6 +558,9 @@ popd %{_mandir}/man1/rtla.1.gz %changelog +* Mon Mar 13 2023 Justin M. Forbes - 6.2.6-100 +- Linux v6.2.6 + * Mon Feb 20 2023 Justin M. Forbes - 6.2.0-1 - Linux v6.2.0 diff --git a/scripts/stable-update.sh b/scripts/stable-update.sh new file mode 100755 index 0000000..cdc3ebe --- /dev/null +++ b/scripts/stable-update.sh @@ -0,0 +1,84 @@ +#!/bin/sh +# +# Author: Laura Abbott +# +# Apply a stable patch update to the Fedora tree. This takes care of +# - Downloading the patch from kernel.org +# - Uploading the source file +# - Removing old patch files +# - Updating the spec file stable version +# - Adding a proper changelog entry +# +# Based on steps from https://fedoraproject.org/wiki/Kernel/DayToDay#Stable_kernel_update +# +# Args: Stable version to update (e.g. 4.7.7, 4.8.1) + +if [ $# -lt 1 ]; then + echo "Need a version" + exit 1 +fi + +VERSION=`echo $1 | cut -d . -f 1` +if [ -z $VERSION ]; then + echo "Malformed version $1" + exit 1 +fi +PATCHLEVEL=`echo $1 | cut -d . -f 2` +if [ -z $VERSION ]; then + echo "Malformed version $1" + exit 1 +fi +SUBLEVEL=`echo $1 | cut -d . -f 3` +if [ -z $VERSION ]; then + echo "Malformed version $1" + exit 1 +fi + +if [ ! -f patch-$1.xz ]; then + wget https://cdn.kernel.org/pub/linux/kernel/v6.x/patch-$1.xz + if [ ! $? -eq 0 ]; then + echo "Download fail" + exit 1 + fi +fi + +# This all needs to be updated for the new generation system +# +# if [ ! -f "patch-$1.sign" ]; then +# wget "https://cdn.kernel.org/pub/linux/kernel/v4.x/patch-$1.sign" +# if [ ! $? -eq 0 ]; then +# echo "Signature download failed" +# exit 1 +# fi +# fi + +# xzcat "patch-$1.xz" | gpg2 --verify "patch-$1.sign" - +# if [ ! $? -eq 0 ]; then +# echo "Patch file has invalid or untrusted signature!" +# echo "See https://www.kernel.org/category/signatures.html" +# exit 1 +# fi + +grep $1 sources &> /dev/null +if [ ! $? -eq 0 ]; then + fedpkg upload patch-$1.xz + + # Cryptic awk: search for the previous patch level (if one exists) and + # remove it from the source file + awk -v VER=$VERSION.$PATCHLEVEL.$((SUBLEVEL-1)) '$0 !~ VER { print $0; }' < sources > sources.tmp + mv sources.tmp sources +fi + +# Update the stable level +awk -v STABLE=$SUBLEVEL '/%global stable_update/ \ + { print "%global stable_update " STABLE } \ + !/%global stable_update/ { print $0 }' \ + < kernel-tools.spec > kernel-tools.spec.tmp +mv kernel-tools.spec.tmp kernel-tools.spec + +# Reset the base release for use with rpmdev-bumpspec +BASERELEASE=`cat kernel-tools.spec | grep "%global baserelease" | cut -d ' ' -f 3 | head -c 1`00 +BASERELEASE=$(($BASERELEASE-1)) +BASERELEASE=$BASERELEASE perl -p -i -e 's|%global baserelease.*|%global baserelease $ENV{'BASERELEASE'}|' kernel-tools.spec + +rpmdev-bumpspec -c "Linux v$1" kernel-tools.spec diff --git a/sources b/sources index 76cd8d4..09f961e 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (linux-6.2.tar.xz) = a01bee0b968b95183934fe3504516be7ef5811944a061f5aed05ecebaa27b5eb64e33232fd0a8dd622b3c8743bfe462ef7e464d381734d111a0ad6a6d9f66ddd +SHA512 (patch-6.2.6.xz) = 9dea17f7d385fc1b1cfb95dcd0cfdb5a73d77e52c585c518a91be03ad862017ef8762d423030071cde893814051cbb6898cd14a41ab3939ffac252b1106948e8