Description: adjust kpatch-build directories
 dkms puts modules into a different location than is expected, change
 paths to adjust for this. In addition the debian packaging uses /usr/lib
 instead of /usr/libexec for internal binaries.
Author: Chris J Arges <chris.j.arges@canonical.com>
Last-Update: 2016-01-08

--- a/kpatch-build/kpatch-build
+++ b/kpatch-build/kpatch-build
@@ -99,14 +99,14 @@
 		DATADIR="$(readlink -f $SCRIPTDIR/../kmod)"
 		SYMVERSFILE="$DATADIR/core/Module.symvers"
 		return
-	elif [[ -e "$SCRIPTDIR/../libexec/kpatch/create-diff-object" ]]; then
+	elif [[ -e "$SCRIPTDIR/../lib/kpatch/create-diff-object" ]]; then
 		# installation path
-		TOOLSDIR="$(readlink -f $SCRIPTDIR/../libexec/kpatch)"
+		TOOLSDIR="$(readlink -f $SCRIPTDIR/../lib/kpatch)"
 		DATADIR="$(readlink -f $SCRIPTDIR/../share/kpatch)"
 		if [[ -e $SCRIPTDIR/../lib/kpatch/$ARCHVERSION/Module.symvers ]]; then
 			SYMVERSFILE="$(readlink -f $SCRIPTDIR/../lib/kpatch/$ARCHVERSION/Module.symvers)"
-		elif [[ -e /lib/modules/$ARCHVERSION/extra/kpatch/Module.symvers ]]; then
-			SYMVERSFILE="$(readlink -f /lib/modules/$ARCHVERSION/extra/kpatch/Module.symvers)"
+		elif [[ -e /lib/modules/$ARCHVERSION/updates/dkms/kpatch.Module.symvers ]]; then
+			SYMVERSFILE="$(readlink -f /lib/modules/$ARCHVERSION/updates/dkms/kpatch.Module.symvers)"
 		else
 			warn "unable to find Module.symvers for kpatch core module"
 			return 1
