diff -Nru kpatch-0.3.2/debian/changelog kpatch-0.3.2/debian/changelog --- kpatch-0.3.2/debian/changelog 2016-04-07 08:31:06.000000000 +0000 +++ kpatch-0.3.2/debian/changelog 2016-04-13 16:45:10.000000000 +0000 @@ -1,3 +1,10 @@ +kpatch (0.3.2-1ubuntu5) xenial; urgency=medium + + * Only record the last build performed, to save space + * Generate dots during non-debug kernel build to avoid timeouts + + -- Benjamin M Romer Wed, 13 Apr 2016 16:43:49 +0000 + kpatch (0.3.2-1ubuntu4) xenial; urgency=medium [ Chris J Arges ] diff -Nru kpatch-0.3.2/debian/patches/reduce-kernel-build-output.patch kpatch-0.3.2/debian/patches/reduce-kernel-build-output.patch --- kpatch-0.3.2/debian/patches/reduce-kernel-build-output.patch 1970-01-01 00:00:00.000000000 +0000 +++ kpatch-0.3.2/debian/patches/reduce-kernel-build-output.patch 2016-04-13 16:52:00.000000000 +0000 @@ -0,0 +1,77 @@ +Description: Reduce kernel build output retention and avoid timeouts + The .kpatch/build.log file is enormous because it is carrying around + the entire build log for two kernel builds, when realistically it only + needs to keep the last build performed. + + There's no reason to hang on to the initial kernel build after it is + complete, as a) it should normally complete without error, and b) if + there is a problem, the script will bail out there anyway. The script + needs the second build output for checking for unresolved symbols, + but since this build is only touching files modified by the patch, it + should be much smaller. + + Running the build in non-debug mode cuts down on noise as well, though + some output is still necessary to avoid timeouts. Adding a function to + output dots during the kernel builds will take care of timeouts without + cluttering the screen. + + . + kpatch (0.3.2-1ubuntu5) xenial; urgency=medium + . + * Only record the last build performed, to save space + * Generate dots during non-debug kernel build to avoid timeouts + +Author: Benjamin M Romer +Bug-Ubuntu: https://launchpad.net/bugs/1570012 +Last-Update: 2016-04-13 + +--- kpatch-0.3.2.orig/kpatch-build/kpatch-build ++++ kpatch-0.3.2/kpatch-build/kpatch-build +@@ -49,6 +49,15 @@ APPLIEDPATCHFILE="kpatch.patch" + DEBUG=0 + SKIPGCCCHECK=0 + ++eatio () { ++ COUNT=0 ++ while read line; do ++ let COUNT+=1 ++ [[ $COUNT = 25 ]] && echo -n . && COUNT=0 ++ done ++ echo ++} ++ + warn() { + echo "ERROR: $1" >&2 + } +@@ -477,16 +486,15 @@ for i in $ALT_STRUCT_SIZE $BUG_STRUCT_SI + fi + done + +-echo "Building original kernel" ++echo -n "Building original kernel" + ./scripts/setlocalversion --save-scmversion || die +-make mrproper 2>&1 | \ +- ( ( [[ "$DEBUG" -eq 1 ]] && tee -a "$LOGFILE" ) || cat >> "$LOGFILE" ) || die ++make mrproper 2>&1 | tee "$LOGFILE" | ( [[ "$DEBUG" -eq 0 ]] && eatio ) || die + CROSS_COMPILE="$TOOLSDIR/kpatch-gcc " make "-j$CPUS" $TARGETS "O=$OBJDIR" 2>&1 | \ +- ( ( [[ "$DEBUG" -eq 1 ]] && tee -a "$LOGFILE" ) || cat >> "$LOGFILE" ) || die ++ tee "$LOGFILE" | ( [[ "$DEBUG" -eq 0 ]] && eatio ) || die + + echo "Building patched kernel" + patch -N -p1 < "$APPLIEDPATCHFILE" 2>&1 | \ +- ( ( [[ "$DEBUG" -eq 1 ]] && tee -a "$LOGFILE" ) || cat >> "$LOGFILE" ) || die ++ tee "$LOGFILE" | ( [[ "$DEBUG" -eq 0 ]] && eatio ) || die + mkdir -p "$TEMPDIR/orig" "$TEMPDIR/patched" + export TEMPDIR + # TODO: remove custom LDFLAGS and ugly "undefined reference" grep when core +@@ -494,8 +502,8 @@ export TEMPDIR + CROSS_COMPILE="$TOOLSDIR/kpatch-gcc " \ + LDFLAGS_vmlinux="--warn-unresolved-symbols" \ + KBUILD_MODPOST_WARN=1 \ +- make "-j$CPUS" $TARGETS "O=$OBJDIR" 2>&1 | \ +- ( ( [[ "$DEBUG" -eq 1 ]] && tee -a "$LOGFILE" ) || cat >> "$LOGFILE" ) || die ++ make "-j$CPUS" $TARGETS "O=$OBJDIR" 2>&1 | tee "$LOGFILE" | \ ++ ( [[ "$DEBUG" -eq 0 ]] && eatio ) || die + [[ "${PIPESTATUS[0]}" -eq 0 ]] || die + grep -q "undefined reference" "$LOGFILE" | grep -qv kpatch_shadow && die + grep -q "undefined!" "$LOGFILE" |grep -qv kpatch_shadow && die diff -Nru kpatch-0.3.2/debian/patches/series kpatch-0.3.2/debian/patches/series --- kpatch-0.3.2/debian/patches/series 2016-04-07 08:19:57.000000000 +0000 +++ kpatch-0.3.2/debian/patches/series 2016-04-13 16:45:41.000000000 +0000 @@ -3,3 +3,4 @@ use-livepatch-4.5-kernel-features.patch use-ubuntu-utsrelease-for-kpatch-build.patch output-kernel-build-in-debug.patch +reduce-kernel-build-output.patch