Browse code

kpatch: update to latest version

Update from 0.9.6 to 0.9.7

Change-Id: I9c4d0e3315a1b15590ddf40792291c1c17f8aba1
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/18998
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Shreenidhi Shedi <sshedi@vmware.com>

Brennan Lamoreaux authored on 2022/12/16 11:29:47
Showing 2 changed files
... ...
@@ -1,7 +1,7 @@
1
-From 7824520b34ee246c6ed67300eaaaa7cda428b930 Mon Sep 17 00:00:00 2001
1
+From ca27f78e8186fbcce8872a73a70bee64e57ea6da Mon Sep 17 00:00:00 2001
2 2
 From: Brennan Lamoreaux <blamoreaux@vmware.com>
3
-Date: Wed, 24 Aug 2022 01:18:53 +0000
4
-Subject: [PATCH] allow livepatches to be visible to modinfo after load/install
3
+Date: Thu, 15 Dec 2022 21:33:31 +0000
4
+Subject: [PATCH] Allow livepatches to be visible to modinfo after loading
5 5
 
6 6
 There is a problem with kpatch where livepatch modules, once loaded, can be seen with lsmod, but not modinfo.
7 7
 This is because kpatch by default installs livepatches into /ver/lib/kpatch/<kernel-version>.
... ...
@@ -16,7 +16,7 @@ information about loaded/installed livepatch modules.
16 16
  1 file changed, 23 insertions(+), 13 deletions(-)
17 17
 
18 18
 diff --git a/kpatch/kpatch b/kpatch/kpatch
19
-index f4eb516..dbb67f5 100755
19
+index 2a00b07..3184b5a 100755
20 20
 --- a/kpatch/kpatch
21 21
 +++ b/kpatch/kpatch
22 22
 @@ -23,7 +23,8 @@
... ...
@@ -27,7 +27,7 @@ index f4eb516..dbb67f5 100755
27 27
 +KVER="$(uname -r)"
28 28
 +INSTALLDIR="/lib/modules/$KVER/livepatches"
29 29
  SCRIPTDIR="$(readlink -f "$(dirname "$(type -p "$0")")")"
30
- VERSION="0.9.6"
30
+ VERSION="0.9.7"
31 31
  POST_ENABLE_WAIT=15	# seconds
32 32
 @@ -76,7 +77,7 @@ __find_module () {
33 33
  	MODULE="$1"
... ...
@@ -47,7 +47,7 @@ index f4eb516..dbb67f5 100755
47 47
  			mod_name "$i"
48 48
  			if [[ "$MODNAME" == "$arg" ]]; then
49 49
  				MODULE="$i"
50
-@@ -456,7 +457,7 @@ case "$1" in
50
+@@ -460,7 +461,7 @@ case "$1" in
51 51
  	[[ "$#" -ne 2 ]] && usage
52 52
  	case "$2" in
53 53
  	"--all")
... ...
@@ -56,7 +56,7 @@ index f4eb516..dbb67f5 100755
56 56
  			[[ -e "$i" ]] || continue
57 57
  			load_module "$i" || die "failed to load module $i"
58 58
  		done
59
-@@ -464,9 +465,18 @@ case "$1" in
59
+@@ -468,9 +469,18 @@ case "$1" in
60 60
  	*)
61 61
  		PATCH="$2"
62 62
  		find_module "$PATCH" || die "can't find $PATCH"
... ...
@@ -75,7 +75,7 @@ index f4eb516..dbb67f5 100755
75 75
  	;;
76 76
  
77 77
  "unload")
78
-@@ -514,7 +524,6 @@ case "$1" in
78
+@@ -518,7 +528,6 @@ case "$1" in
79 79
  	;;
80 80
  
81 81
  "install")
... ...
@@ -83,7 +83,7 @@ index f4eb516..dbb67f5 100755
83 83
  	shift
84 84
  	options="$(getopt -o k: -l "kernel-version:" -- "$@")" || die "getopt failed"
85 85
  	eval set -- "$options"
86
-@@ -538,16 +547,18 @@ case "$1" in
86
+@@ -542,16 +551,18 @@ case "$1" in
87 87
  	get_module_version "$PATCH" || die "modinfo failed"
88 88
  	[[ "$KVER" != "$MODVER" ]] && die "invalid module version $MODVER for kernel $KVER"
89 89
  
... ...
@@ -106,7 +106,7 @@ index f4eb516..dbb67f5 100755
106 106
  	shift
107 107
  	options="$(getopt -o k: -l "kernel-version:" -- "$@")" || die "getopt failed"
108 108
  	eval set -- "$options"
109
-@@ -566,11 +577,11 @@ case "$1" in
109
+@@ -570,11 +581,11 @@ case "$1" in
110 110
  		shift
111 111
  	done
112 112
  
... ...
@@ -120,7 +120,7 @@ index f4eb516..dbb67f5 100755
120 120
  			mod_name "$i"
121 121
  			if [[ "$MODNAME" == "$PATCHNAME" ]]; then
122 122
  				MODULE="$i"
123
-@@ -583,9 +594,8 @@ case "$1" in
123
+@@ -587,9 +598,8 @@ case "$1" in
124 124
  
125 125
  	echo "uninstalling $PATCH ($KVER)"
126 126
  	rm -f "$MODULE" || die "failed to uninstall module $PATCH"
... ...
@@ -132,5 +132,5 @@ index f4eb516..dbb67f5 100755
132 132
  
133 133
  "list")
134 134
 -- 
135
-2.30.3
135
+2.35.5
136 136
 
... ...
@@ -1,7 +1,7 @@
1 1
 Name:           kpatch
2 2
 Summary:        Dynamic kernel patching
3
-Version:        0.9.6
4
-Release:        5%{?dist}
3
+Version:        0.9.7
4
+Release:        1%{?dist}
5 5
 URL:            http://github.com/dynup/kpatch
6 6
 License:        GPLv2
7 7
 Group:          System Environment/Kernel
... ...
@@ -9,7 +9,7 @@ Vendor:         VMware, Inc.
9 9
 Distribution:   Photon
10 10
 
11 11
 Source0:        https://github.com/dynup/kpatch/archive/refs/tags/kpatch-v%{version}.tar.gz
12
-%define sha512 kpatch=898c5704098c473187f2eab9bccd5fb3cfc31f4211492d658abcd0b7cac6d03f11a27df19a56ad17c20163803084ddf54a27defcf12b4975a8a8eb5dbad73f21
12
+%define sha512 %{name}=c876d9b1e5f6e6ab858fa6f302e78152beb3e50cedd93f3c61ab6f747e32199b0601ad4a36d426d43d0e9a37d9bf1d6bbfddccc86df4b31d5e3e6edead6cded3
13 13
 
14 14
 Source1:        scripts/auto_livepatch.sh
15 15
 Source2:        scripts/gen_livepatch.sh
... ...
@@ -118,6 +118,8 @@ cp %{SOURCE6} %{buildroot}%{_sysconfdir}/gen_livepatch/build-rpm.spec
118 118
 %{_sysconfdir}/gen_livepatch/build-rpm.spec
119 119
 
120 120
 %changelog
121
+* Thu Dec 15 2022 Brennan Lamoreaux <blamoreaux@vmware.com> 0.9.7-1
122
+- Update to latest version
121 123
 * Thu Aug 25 2022 Brennan Lamoreaux <blamoreaux@vmware.com> 0.9.6-5
122 124
 - Add a patch to make installed livepatches visible to modinfo.
123 125
 - Add capability of packaging livepatch modules as RPMs.