Lines Matching full:patch

34 FIX_PATCH_LINES="$SCRIPT_DIR/fix-patch-lines"
134 -o, --output=<file.ko> Output file [default: livepatch-<patch-name>.ko]
145 5|kmod Build patch module
160 local patch
241 for patch in "${PATCHES[@]}"; do
242 [[ -f "$patch" ]] || die "$patch doesn't exist"
295 # name based on the patch name.
303 NAME="patch"
312 # Hardcode the value printed by the localversion script to prevent patch
332 local patch="$1"
334 grep0 -E '^--- ' "$patch" \
342 local patch="$1"
344 grep0 -E '^\+\+\+ ' "$patch" \
352 local patch="$1"
354 { get_patch_input_files "$patch"; get_patch_output_files "$patch"; } \
359 local patch
361 for patch in "${PATCHES[@]}"; do
364 get_patch_files "$patch" | mapfile -t files
369 die "${patch}: unsupported patch to $file"
377 local patch="$1"
384 [[ ! -f "$patch" ]] && die "$patch doesn't exist"
386 output=$(patch -p1 --dry-run --no-backup-if-mismatch -r /dev/null "${extra_args[@]}" < "$patch" 2>&1) || status=$?
389 die "$patch did not apply"
392 warn "${patch} applied with fuzz"
395 APPLIED_PATCHES+=("$patch")
396 patch -p1 --no-backup-if-mismatch -r /dev/null "${extra_args[@]}" --silent < "$patch"
400 local patch="$1"
403 patch -p1 -R --force --no-backup-if-mismatch -r /dev/null &> /dev/null < "$patch" || true
406 [[ "$p" == "$patch" ]] && continue
415 local patch
417 for patch in "${PATCHES[@]}"; do
418 apply_patch "$patch" "${extra_args[@]}"
462 [[ -x "$FIX_PATCH_LINES" ]] || die "can't find fix-patch-lines"
470 # Refresh the patch hunk headers, specifically the line numbers and counts.
472 local patch="$1"
481 # Get all source files affected by the patch
482 get_patch_input_files "$patch" | mapfile -t input_files
483 get_patch_output_files "$patch" | mapfile -t output_files
489 apply_patch "$patch" "--silent"
491 revert_patch "$patch"
493 # Diff 'a' and 'b' to make a clean patch
494 ( cd "$tmpdir" && diff -Nupr a b > "$patch" ) || true
504 rm -f "$TMP_DIR"/*.patch
509 local tmp_patch="$TMP_DIR/tmp.patch"
510 local patch="${PATCHES[$i]}"
513 new_patch="$TMP_DIR/$idx-fixed-$(basename "$patch")"
544 # When a patch to a kernel module references a newly created unexported
899 status "Validating patch(es)"
912 status "Fixing patch(es)"
939 status "Building patch module: $OUTFILE"