]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - debian/scripts/retpoline-extract
UBUNTU: [Packaging] Only install cloud init files when do_tools_common=true
[mirror_ubuntu-bionic-kernel.git] / debian / scripts / retpoline-extract
1 #!/bin/bash
2
3 cd "$1" || exit 1
4
5 # Find all valid retpoline information, collate the detected and
6 # safe information together. Join the result to find the detected
7 # but non-safe elements. These are our concern.
8 tmp="/tmp/retpoline-check.$$"
9 find "." -path './drivers/firmware/efi/libstub' -prune -o \
10 -path './arch/x86/boot' -prune -o \
11 -path './arch/x86/purgatory' -prune -o \
12 -name \*.ur-detected | xargs cat | \
13 sed -e "s@^$1@@" -e "s@ $2/@ @" -e "s@^/@@" | \
14 sort -k 1b,1 >"$tmp.ur-detected"
15 find "." -name \*.ur-safe | xargs cat | \
16 sed -e "s@^$1@@" -e "s@^/@@" | \
17 sort -k 1b,1 >"$tmp.ur-safe"
18
19 join -v 1 -j 1 "$tmp.ur-detected" "$tmp.ur-safe" | sed -s 's/[^ ]* *//'
20
21 rm -f "$tmp".*