Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added binaries/linux/x86_64/strace
Binary file not shown.
8 changes: 8 additions & 0 deletions strace/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM andrewd/musl-cross
MAINTAINER Andrew Dunham <andrew@du.nham.ca>

# Add our build script
ADD . /build/

# This builds the program and copies it to /output
CMD /build/build.sh
47 changes: 47 additions & 0 deletions strace/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

set -e
set -o pipefail
set -x


STRACE_VERSION=4.10


function build_strace() {
cd /build

# Download
curl -LO http://downloads.sourceforge.net/project/strace/strace/${STRACE_VERSION}/strace-${STRACE_VERSION}.tar.xz
tar xJvf strace-${STRACE_VERSION}.tar.xz
cd strace-${STRACE_VERSION}

# Add missing headers.
patch -p2 < /build/strace.patch

# Set up path
export PATH=$PATH:/opt/cross/x86_64-linux-musl/bin/

# Build
CC='x86_64-linux-musl-gcc -static -fPIC' \
./configure --host=x86_64-linux
make
x86_64-linux-musl-strip strace
}

function doit() {
build_strace

# Copy to output
if [ -d /output ]
then
OUT_DIR=/output/`uname | tr 'A-Z' 'a-z'`/x86_64
mkdir -p $OUT_DIR
cp /build/strace-${STRACE_VERSION}/strace $OUT_DIR/
echo "** Finished **"
else
echo "** /output does not exist **"
fi
}

doit
13 changes: 13 additions & 0 deletions strace/strace.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git 1/strace-4.10-orig/defs.h 2/strace-4.10/defs.h
index dad4fe8..d1378ab 100644
--- 1/strace-4.10-orig/defs.h
+++ 2/strace-4.10/defs.h
@@ -54,6 +54,8 @@
#include <time.h>
#include <sys/time.h>
#include <sys/syscall.h>
+#include <asm-generic/ioctl.h>
+#include <linux/stat.h>

#ifndef HAVE_STRERROR
const char *strerror(int);