Skip to content

Commit

Permalink
[SMAGENT-1292] Probe is not built for a number of ubuntu kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
fremmi committed Apr 2, 2019
1 parent 6edb41d commit c9293a9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
13 changes: 10 additions & 3 deletions scripts/build-probe-binaries
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,15 @@ function clean_sysdig {

function build_probe {

if [ ! -f $BASEDIR/output/$PROBE_NAME-$PROBE_VERSION-$ARCH-$KERNEL_RELEASE-$HASH.ko ] ||
[ ! -f $BASEDIR/output/$PROBE_NAME-$PROBE_VERSION-$ARCH-$KERNEL_RELEASE-$HASH_ORIG.ko ]; then
# Skip Kernel 4.15.0-29 because probe does not build against it
if [ $KERNEL_RELEASE-$HASH = "4.15.0-29-generic-ea0aa038a6b9bdc4bb42152682bba6ce" ]
then
echo "Temporarily skipping " $PROBE_NAME-$PROBE_VERSION-$ARCH-$KERNEL_RELEASE-$HASH.ko
return
fi

if [ ! -f $BASEDIR/output/$PROBE_NAME-$PROBE_VERSION-$ARCH-$KERNEL_RELEASE-$HASH.ko ] ||
[ ! -f $BASEDIR/output/$PROBE_NAME-$PROBE_VERSION-$ARCH-$KERNEL_RELEASE-$HASH_ORIG.ko ]; then

if [[ -f "${KERNELDIR}/scripts/gcc-plugins/stackleak_plugin.so" ]]; then
echo "Rebuilding gcc plugins for ${KERNELDIR}"
Expand Down Expand Up @@ -325,7 +332,7 @@ function ubuntu_build {

NUM_DEB=$(ls linux-*.deb -1 | wc -l)

if [ $NUM_DEB -eq 3 ]; then
if [ $NUM_DEB -eq 4 ]; then

local KERNEL_FOLDER=$KERNEL_RELEASE
KERNEL_RELEASE=$(ls -1 linux-image-* | grep -E -o "[0-9]{1}\.[0-9]+\.[0-9]+-[0-9]+-[a-z]+")
Expand Down
11 changes: 9 additions & 2 deletions scripts/kernel-crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"root" : "https://mirrors.kernel.org/ubuntu/pool/main/l/",
"discovery_pattern" : "/html/body//a[@href = 'linux/']/@href",
"subdirs" : [""],
"page_pattern" : "/html/body//a[regex:test(@href, '^linux-(image|headers)-[3-9].*-generic.*amd64.deb$')]/@href"
"page_pattern" : "/html/body//a[regex:test(@href, '^linux-(image|headers)-(unsigned-)*[3-9].*-generic.*amd64.deb$')]/@href"
},

{
Expand All @@ -105,14 +105,21 @@
"root" : "http://security.ubuntu.com/ubuntu/pool/main/l/",
"discovery_pattern" : "/html/body//a[@href = 'linux/']/@href",
"subdirs" : [""],
"page_pattern" : "/html/body//a[regex:test(@href, '^linux-(image|headers)-[3-9].*-generic.*amd64.deb$')]/@href"
"page_pattern" : "/html/body//a[regex:test(@href, '^linux-(image|headers)-(unsigned-)*[3-9].*-generic.*amd64.deb$')]/@href"
},

{
"root" : "http://security.ubuntu.com/ubuntu/pool/main/l/",
"discovery_pattern" : "/html/body//a[@href = 'linux/']/@href",
"subdirs" : [""],
"page_pattern" : "/html/body//a[regex:test(@href, '^linux-headers-[3-9].*_all.deb$')]/@href"
},

{
"root" : "http://security.ubuntu.com/ubuntu/pool/main/l/",
"discovery_pattern" : "/html/body//a[@href = 'linux/']/@href",
"subdirs" : [""],
"page_pattern" : "/html/body//a[regex:test(@href, '^linux-modules-[3-9].*-generic.*amd64.deb$')]/@href"
}
],

Expand Down

0 comments on commit c9293a9

Please sign in to comment.