Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibor Pechacek <lpechacek@suse.com>2017-10-26 13:54:06 +0200
committerMiroslav Benes <mbenes@suse.cz>2017-12-08 13:03:34 +0100
commitf842fd53a604965a864d3827ab90c691b44cb9a6 (patch)
treebe853c80261d65ce69d7a3c9b95a66cc7ad78354
parent7e20201cdcb88e7a236fe9f86f36f2e72f95c121 (diff)
kGraft to livepatch migration. External rename.
External rename and thus final step of kGraft -> upstream livepatch migration. kgraft-patch* modules are now livepatch* and live in /lib/modules/$(uname -r)/livepatch. References: fate#323682 Signed-off-by: Libor Pechacek <lpechacek@suse.com> [ mb: changelog ] Signed-off-by: Miroslav Benes <mbenes@suse.cz>
-rw-r--r--rpm/kernel-livepatch.spec (renamed from rpm/kgraft-patch.spec)14
-rwxr-xr-xscripts/create-makefile.sh4
-rwxr-xr-xscripts/register-patches.sh10
-rwxr-xr-xscripts/tar-up.sh16
-rw-r--r--uname_patch/livepatch_uname.c4
5 files changed, 24 insertions, 24 deletions
diff --git a/rpm/kgraft-patch.spec b/rpm/kernel-livepatch.spec
index 8fbd419..707d657 100644
--- a/rpm/kgraft-patch.spec
+++ b/rpm/kernel-livepatch.spec
@@ -1,5 +1,5 @@
#
-# spec file for package kGraft patch module
+# spec file for package Kernel live patch module
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -17,12 +17,12 @@
# needssslcertforbuild
-Name: kgraft-patch-@@RELEASE@@
+Name: kernel-livepatch-@@RELEASE@@
Version: 1
Release: 1
%define module_num %(echo %version-%release | sed 'y/\./_/')
License: GPL-2.0
-Summary: Kgraft patch module
+Summary: Kernel live patch module
Group: System/Kernel
Source0: uname_patch.tar.bz2
Source1: Makefile
@@ -32,9 +32,9 @@ Source4: source-timestamp
Source5: shadow.c
Source6: shadow.h
@@KLP_PATCHES_SOURCES@@
-BuildRequires: kernel-syms kgraft-devel libelf-devel
+BuildRequires: kernel-syms kernel-livepatch-tools-devel libelf-devel
ExclusiveArch: @@EXCARCH@@
-%kgraft_module_package
+%klp_module_package
%description
This is a live patch for SUSE Linux Enterprise Server kernel.
@@ -52,7 +52,7 @@ cp %_sourcedir/shadow.h .
%build
sed -i 's/@@RPMRELEASE@@/%module_num/g' Makefile
sed -i 's/@@RPMRELEASE@@/%module_num/g' livepatch_main.c
-echo 'kgraft-patch-%module_num' >Module.supported
+echo 'livepatch-%module_num' >Module.supported
set -- *
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
@@ -65,7 +65,7 @@ for flavor in %flavors_to_build; do
done
%install
-export INSTALL_MOD_DIR=kgraft
+export INSTALL_MOD_DIR=livepatch
export INSTALL_MOD_PATH=%buildroot
for flavor in %flavors_to_build; do
make -C %{kernel_source $flavor} M="$PWD/obj/$flavor" modules_install
diff --git a/scripts/create-makefile.sh b/scripts/create-makefile.sh
index c13b7fd..401154c 100755
--- a/scripts/create-makefile.sh
+++ b/scripts/create-makefile.sh
@@ -13,9 +13,9 @@ objects=$(find . -type f -name "*.c" | sed "s/^\.\/\(.*\)\.c$/\1.o/" | tr '\n' '
cat << EOF > $1/Makefile
KDIR ?= /lib/modules/\`uname -r\`/build
-obj-m := kgraft-patch-@@RPMRELEASE@@.o
+obj-m := livepatch-@@RPMRELEASE@@.o
-kgraft-patch-@@RPMRELEASE@@-y := $objects
+livepatch-@@RPMRELEASE@@-y := $objects
default:
\$(MAKE) -C \$(KDIR) M=\$(CURDIR) modules
diff --git a/scripts/register-patches.sh b/scripts/register-patches.sh
index f0cf7a0..df611d9 100755
--- a/scripts/register-patches.sh
+++ b/scripts/register-patches.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
-# register-patches.sh -- add subpatches to KGraft patch
+# register-patches.sh -- add subpatches to kernel live patch
#
# Copyright (c) 2017 SUSE
# Author: Nicolai Stange <nstange@suse.de>
@@ -20,7 +20,7 @@
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
-# This script expects a kGraft subpatch to live in a subdirectory
+# This script expects a kernel live subpatch to live in a subdirectory
# SUBPATCH and to provide a SUBPATCH/livepatch_SUBPATCH.h
# header.
#
@@ -28,11 +28,11 @@
# - klp_patch_SUBPATCH_init()
# - klp_patch_SUBPATCH_cleanup()
# and an (all uppercase) KLP_PATCH_SUBPATCH_FUNCS macro.
-# The latter should be a comma separated list of KGR_PATCH*() entries,
+# The latter should be a comma separated list of KLP_PATCH*() entries,
# each corresponding to a function the subpatch wants to replace.
#
# Usage:
-# register-patches.sh livepatch_main.c kgraft-patch.spec
+# register-patches.sh livepatch_main.c kernel-livepatch.spec
#
# This will properly substitute a number of placeholders in-place.
#
@@ -124,7 +124,7 @@ s%\s*@@KLP_PATCHES_CLEANUP_CALLS@@;\?%$KLP_PATCHES_CLEANUP_CALLS%;
EOF
-# Finish kgraft-patch.spec:
+# Finish kernel-livepatch.spec:
## Enumerate the per subpatch source *.tar.bz2.
## Note: Start with Source7
S=7
diff --git a/scripts/tar-up.sh b/scripts/tar-up.sh
index 9b0ce0e..5577afc 100755
--- a/scripts/tar-up.sh
+++ b/scripts/tar-up.sh
@@ -1,5 +1,5 @@
#
-# tar-up.sh - script for building a kGraft rpm package
+# tar-up.sh - script for building a kernel live patch rpm package
#
# Copyright (c) 2014 SUSE
# Author: Miroslav Benes <mbenes@suse.cz>
@@ -34,10 +34,10 @@ until [ "$#" = "0" ] ; do
-h|--help|-v|--version)
cat <<EOF
-${0##*/} prepares a kGraft module package for submission into build service
+${0##*/} prepares a kernel live patch module package for submission into build service
these options are recognized:
- -d, --dir=DIR create package in DIR instead of default kgraft-mod-source
+ -d, --dir=DIR create package in DIR instead of default klp-mod-source
EOF
exit 1
@@ -50,7 +50,7 @@ EOF
done
# builddir
-[ -z "$build_dir" ] && build_dir=kgraft-mod-source
+[ -z "$build_dir" ] && build_dir=klp-mod-source
if [ -z "$build_dir" ]; then
echo "Please define the build directory with the --dir option" >&2
exit 1
@@ -73,8 +73,8 @@ done
source $(dirname $0)/release-version.sh
install -m 644 livepatch_main.c $build_dir
-install -m 644 rpm/kgraft-patch.spec $build_dir/kgraft-patch-"$RELEASE".spec
-scripts/register-patches.sh $build_dir/livepatch_main.c $build_dir/kgraft-patch-"$RELEASE".spec
+install -m 644 rpm/kernel-livepatch.spec $build_dir/kernel-livepatch-"$RELEASE".spec
+scripts/register-patches.sh $build_dir/livepatch_main.c $build_dir/kernel-livepatch-"$RELEASE".spec
install -m 644 rpm/config.sh $build_dir/config.sh
install -m 644 shadow.c $build_dir
install -m 644 shadow.h $build_dir
@@ -106,8 +106,8 @@ sed -i \
d
}" \
-e "s/@@EXCARCH@@/$excarch/" \
- $build_dir/kgraft-patch-"$RELEASE".spec
+ $build_dir/kernel-livepatch-"$RELEASE".spec
# changelog
-changelog=$build_dir/kgraft-patch-"$RELEASE".changes
+changelog=$build_dir/kernel-livepatch-"$RELEASE".changes
scripts/gitlog2changes.pl HEAD -- > "$changelog"
diff --git a/uname_patch/livepatch_uname.c b/uname_patch/livepatch_uname.c
index e3878e1..fdd11cc 100644
--- a/uname_patch/livepatch_uname.c
+++ b/uname_patch/livepatch_uname.c
@@ -1,7 +1,7 @@
/*
- * kgraft_patch -- initial SLE Live Patching patch
+ * livepatch -- initial SLE Live Patching patch
*
- * Patch uname to show kGraft in version string
+ * Patch uname to show Kernel Live Patching in version string
*
* Copyright (c) 2014 SUSE
* Author: Libor Pechacek