diff --git a/0001-iio-Use-event-header-from-kernel-tree.patch b/0001-iio-Use-event-header-from-kernel-tree.patch deleted file mode 100644 index 1724db3..0000000 --- a/0001-iio-Use-event-header-from-kernel-tree.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 0eadbb65c0026fb4eec89c54f6b48a0febd87f92 Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Fri, 9 Sep 2016 08:19:17 -0700 -Subject: [PATCH] iio: Use type header from kernel tree -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -To: Jonathan Cameron -To: Hartmut Knaack -To: Lars-Peter Clausen -To: Peter Meerwald-Stadler -Cc: linux-iio@vger.kernel.org -Cc: linux-kernel@vger.kernel.org - - -The iio tools have been updated as new event types have been added to -the kernel. The tools currently use the standard system headers which -means that the system may not have the newest defintitions. This leads -to build failures when building newer tools on older hosts: - -gcc -Wall -g -D_GNU_SOURCE -c -o iio_event_monitor.o -iio_event_monitor.c -iio_event_monitor.c:59:3: error: ‘IIO_UVINDEX’ undeclared here (not in a -function) - [IIO_UVINDEX] = "uvindex", - ^~~~~~~~~~~ -iio_event_monitor.c:59:3: error: array index in initializer not of -integer type -iio_event_monitor.c:59:3: note: (near initialization for -‘iio_chan_type_name_spec’) -iio_event_monitor.c:97:3: error: ‘IIO_MOD_LIGHT_UV’ undeclared here (not -in a function) - [IIO_MOD_LIGHT_UV] = "uv", - ^~~~~~~~~~~~~~~~ -iio_event_monitor.c:97:3: error: array index in initializer not of -integer type -iio_event_monitor.c:97:3: note: (near initialization for -‘iio_modifier_names’) -: recipe for target 'iio_event_monitor.o' failed - -Switch to using the header from the kernel tree to ensure the newest -defintions are always picked up. - -Signed-off-by: Laura Abbott ---- - tools/iio/iio_event_monitor.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c -index d9b7e0f..f02523d 100644 ---- a/tools/iio/iio_event_monitor.c -+++ b/tools/iio/iio_event_monitor.c -@@ -26,7 +26,7 @@ - #include - #include "iio_utils.h" - #include --#include -+#include "../../include/uapi/linux/iio/types.h" - - static const char * const iio_chan_type_name_spec[] = { - [IIO_VOLTAGE] = "voltage", --- -2.7.4 - diff --git a/0002-perf-Don-t-make-sourced-script-executable.patch b/0002-perf-Don-t-make-sourced-script-executable.patch deleted file mode 100644 index 5932867..0000000 --- a/0002-perf-Don-t-make-sourced-script-executable.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a6e7db4598211d4022c97d699142cd02740faa4e Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Tue, 19 Dec 2017 11:45:52 -0800 -Subject: [PATCH 2/2] perf: Don't make sourced script executable - -rpm lint flagged this: - -perf.x86_64: E: executable-sourced-script /etc/bash_completion.d/perf 755 - -Make this not be executable - -Signed-off-by: Laura Abbott ---- - tools/perf/Makefile.perf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf -index 68cf1360a3f3..a072790f5fad 100644 ---- a/tools/perf/Makefile.perf -+++ b/tools/perf/Makefile.perf -@@ -789,7 +789,7 @@ ifndef NO_LIBPYTHON - $(INSTALL) $(DLFILTERS) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/dlfilters'; - $(call QUIET_INSTALL, perf_completion-script) \ - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ -- $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' -+ $(INSTALL) -m 644 perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' - $(call QUIET_INSTALL, perf-tip) \ - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \ - $(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)' --- -2.14.3 - diff --git a/kernel-tools.spec b/kernel-tools.spec index 3623090..6ae891c 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -11,19 +11,19 @@ # base_sublevel is the kernel version we're starting with and patching # on top of -- for example, 3.1-rc7-git1 starts with a 3.0 base, # which yields a base_sublevel of 0. -%global base_sublevel 19 +%global base_sublevel 0 ## If this is a released kernel ## %if 0%{?released_kernel} # Do we have a -stable update to apply? -%global stable_update 4 +%global stable_update 5 # Set rpm version accordingly %if 0%{?stable_update} %global stablerev %{stable_update} %global stable_base %{stable_update} %endif -%global rpmversion 5.%{base_sublevel}.%{stable_update} +%global rpmversion 6.%{base_sublevel}.%{stable_update} ## The not-released-kernel case ## %else @@ -33,7 +33,7 @@ # The rc snapshot level %global rcrev 0 # Set rpm version accordingly -%global rpmversion 5.%{upstream_sublevel}.0 +%global rpmversion 6.%{upstream_sublevel}.0 %endif # Nb: The above rcrev values automagically define Patch00 and Patch01 below. @@ -56,7 +56,7 @@ %endif # The kernel tarball/base version -%global kversion 5.%{base_sublevel} +%global kversion 6.%{base_sublevel} %global KVERREL %{version}-%{release}.%{_target_cpu} # perf needs this @@ -90,7 +90,7 @@ BuildRequires: rpm-build, elfutils %{?systemd_requires} BuildRequires: systemd -Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{kversion}.tar.xz +Source0: https://www.kernel.org/pub/linux/kernel/v6.x/linux-%{kversion}.tar.xz # Sources for kernel-tools Source2000: cpupower.service @@ -100,18 +100,17 @@ Source2001: cpupower.config # For a stable release kernel %if 0%{?stable_base} -Source5000: patch-5.%{base_sublevel}.%{stable_base}.xz +Source5000: patch-6.%{base_sublevel}.%{stable_base}.xz %else # non-released_kernel case # These are automagically defined by the rcrev value set up # near the top of this spec file. %if 0%{?rcrev} -Source5000: patch-5.%{upstream_sublevel}-rc%{rcrev}.xz +Source5000: patch-6.%{upstream_sublevel}-rc%{rcrev}.xz %endif %endif -# rpmlint cleanup -Patch6: 0002-perf-Don-t-make-sourced-script-executable.patch +# Patch1: Name: kernel-tools Summary: Assortment of tools for the Linux kernel @@ -214,7 +213,7 @@ cd linux-%{kversion} xzcat %{SOURCE5000} | patch -p1 -F1 -s %endif -%patch6 -p1 +# %patch1 -p1 # END OF PATCH APPLICATIONS @@ -531,6 +530,9 @@ popd %{_mandir}/man1/rtla.1.gz %changelog +* Wed Oct 26 2022 Justin M. Forbes - 6.0.5-200 +- Linux v6.0.5 + * Thu Aug 25 2022 Justin M. Forbes - 5.19.4-200 - Linux v5.19.4 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 6b62a55..1bb3571 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (linux-5.19.tar.xz) = 00313b2f9b82d2dc3fb8294007cf7d7599d254b717ed2de23c81fa7a1bbcbc2798ad286cb94e2f7f5bd54132d1d764facd90d30f79dbcc6616cc7f926adc2623 -SHA512 (patch-5.19.4.xz) = 567f205bad2b2d782d0bc450a7c2f6c313155cb03c2395b9e99016255e96458166282f79f28ca32c42453c8a4ae58cef275c2b52f635151efe0cf1118d2b3d58 +SHA512 (linux-6.0.tar.xz) = bac41a7aeb6e809616cee2f13dcd1c45e829dfd1ccf60aee1dc4c46b1e28532f4485c7d819a32940de84fdfbf89db80a4e919bce8a74b2948c5a01551771b714 +SHA512 (patch-6.0.5.xz) = c4ac4387c490e73b8d91d13fbea9a1e065be4bacf9535177e625561adb2411908a546f9c4327748aab6bbfc021f30887f3e5df5d6019c6cfe00fe5bf64aad2eb