Skip to content

Commit

Permalink
Misc changes
Browse files Browse the repository at this point in the history
 - Change location of compiled binaries from tarball to local dir

 - enable gdbserver and gdbreplay for gdb build

 - pin version of jattach
  • Loading branch information
Peter Willis committed Jan 15, 2020
1 parent 086a93a commit 240c35e
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 25 deletions.
6 changes: 4 additions & 2 deletions software/curl-static/alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ GPG_KEY_PATH="/tmp/curl-gpg.pub"
gpg --import --always-trust ${GPG_KEY_PATH}
gpg --verify "$FILENAME".asc "$FILENAME"

[ -n "$HOSTTYPE" ] || HOSTTYPE="$(uname -m)"
ROOTWD="$(pwd)"
SRCWD="$ROOTWD/$NAME-$VERSION"
INSTALLDIR="$ROOTWD/$NAME-$VERSION-$HOSTTYPE-$BUILDNAME-$BUILDVER/bin"

[ -d "$FILENAME" ] || tar -xf $FILENAME
[ -d "tmp" ] && rm -rf tmp
Expand All @@ -32,8 +34,8 @@ make curl_LDFLAGS=-all-static
strip src/curl

# Pack up the static binary
[ -n "$HOSTTYPE" ] || HOSTTYPE="$(uname -m)"
tar -czf "$ROOTWD/$NAME-$VERSION-$HOSTTYPE-$BUILDNAME-$BUILDVER.txz" -C src curl
mkdir -p "$INSTALLDIR"
cp -f src/curl "$INSTALLDIR"/

# Clean up
cd "$ROOTWD"
Expand Down
14 changes: 6 additions & 8 deletions software/gdb-static/ubuntu.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/bin/bash
set -e -o pipefail -x -u

#
# Statically compile GDB
#

. ./env

# Install build-time dependencies
Expand All @@ -13,8 +9,10 @@ sudo apt-get install -y zlib1g-dev libreadline-dev

echo "Downloading $NAME version $VERSION ..."

[ -n "$HOSTTYPE" ] || HOSTTYPE="$(uname -m)"
ROOTWD="`pwd`"
SRCWD="$ROOTWD/$NAME-$VERSION"
INSTALLDIR="$ROOTWD/$NAME-$VERSION-$HOSTTYPE-$BUILDNAME-$BUILDVER/bin"

[ -r "$FILENAME" ] || curl -o "$FILENAME" "$URL"
[ -d "$SRCWD" ] || tar -xf "$FILENAME"
Expand All @@ -30,15 +28,15 @@ cd tmp
# Strip it down to the essentials.
# You can add --disable-gdbserver to skip a potentially problematic set of tools
# (they won't finish building properly due to NSS library use for network calls)
"$SRCWD"/configure --prefix=/usr --enable-static --disable-interprocess-agent --disable-inprocess-agent --disable-unit-tests --disable-profiling --disable-plugins --disable-gdbmi --disable-curses --disable-tui --disable-gdbtk --disable-ubsan --disable-sim --disable-gdbserver --with-system-zlib --with-system-readline --without-expat --without-lzma --without-mpfr --without-python --without-guile
"$SRCWD"/configure --prefix=/usr --enable-static --disable-interprocess-agent --disable-inprocess-agent --disable-unit-tests --disable-profiling --disable-plugins --disable-gdbmi --disable-curses --disable-tui --disable-gdbtk --disable-ubsan --disable-sim --with-system-zlib --with-system-readline --without-expat --without-lzma --without-mpfr --without-python --without-guile

make -j8 CXXFLAGS="-fPIC -static" all-gdb

strip gdb/gdb
strip gdb/gdb gdb/gdbserver/gdbreplay gdb/gdbserver/gdbserver

# Pack up the static binary
[ -n "$HOSTTYPE" ] || HOSTTYPE="$(uname -m)"
tar -czf "$ROOTWD/$NAME-$VERSION-$HOSTTYPE-$BUILDNAME-$BUILDVER.txz" -C gdb gdb gcore gdbserver/gdbserver gdbserver/gdbreplay
mkdir -p "$INSTALLDIR"
cp -f gdb/gdb gdb/gcore gdb/gdbserver/gdbreplay gdb/gdbserver/gdbserver "$INSTALLDIR"/

# Clean up
cd "$ROOTWD"
Expand Down
1 change: 1 addition & 0 deletions software/jattach-static/env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
NAME=jattach
VERSION=1.5_55745c5
BUILDNAME=static
BUILDVER=1
URL=https://github.com/apangin/jattach.git
13 changes: 10 additions & 3 deletions software/jattach-static/ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,25 @@ sudo apt-get install -y git

[ -d "$NAME" ] || git clone $URL

[ -n "$HOSTTYPE" ] || HOSTTYPE="$(uname -m)"
ROOTWD="$(pwd)"
SRCWD="$ROOTWD/$NAME"
INSTALLDIR="$ROOTWD/$NAME-$VERSION-$HOSTTYPE-$BUILDNAME-$BUILDVER/bin"

cd "$SRCWD"
# VERSION=1.5_abcdef
sha=$(echo "$VERSION" | cut -d _ -f 2)
git checkout "$sha"

VERSION=$(grep '^Version:' jattach.spec | cut -d : -f 2 | xargs)
#VERSION=$(grep '^Version:' jattach.spec | cut -d : -f 2 | xargs)

make CFLAGS="-O2 -fPIC -static"
make CFLAGS="-O2 -fPIC -static" JATTACH_VERSION="$VERSION"

strip build/jattach

tar -czf "$ROOTWD/$NAME-$VERSION-$HOSTTYPE-$BUILDNAME-$BUILDVER.txz" -C build jattach
# Pack up the static binary
mkdir -p "$INSTALLDIR"
cp -f build/jattach "$INSTALLDIR"/

cd "$ROOTWD"
rm -rf "$NAME"
10 changes: 4 additions & 6 deletions software/openssl-static/ubuntu.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/bin/bash
set -e -o pipefail -x -u

#
# Statically compile OpenSSL
#

. ./env

# Install build-time dependencies
Expand All @@ -13,8 +9,10 @@ set -e -o pipefail -x -u

echo "Downloading $NAME version $VERSION ..."

[ -n "$HOSTTYPE" ] || HOSTTYPE="$(uname -m)"
ROOTWD="`pwd`"
SRCWD="$ROOTWD/$NAME-$VERSION"
INSTALLDIR="$ROOTWD/$NAME-$VERSION-$HOSTTYPE-$BUILDNAME-$BUILDVER/bin"

[ -r "$FILENAME" ] || curl -o "$FILENAME" "$URL"
[ -d "$SRCWD" ] || tar -xf "$FILENAME"
Expand All @@ -30,8 +28,8 @@ make CFLAG="-O2 -fPIC -g -static"
strip apps/openssl

# Pack up the static binary
[ -n "$HOSTTYPE" ] || HOSTTYPE="$(uname -m)"
tar -czf "$ROOTWD/$NAME-$VERSION-$HOSTTYPE-$BUILDNAME-$BUILDVER.txz" -C apps openssl
mkdir -p "$INSTALLDIR"
cp -f apps/openssl "$INSTALLDIR"/

# Clean up
cd "$ROOTWD"
Expand Down
10 changes: 4 additions & 6 deletions software/zstd-static/ubuntu.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/bin/bash
set -e -o pipefail -x -u

#
# Statically compile zstd
#

. ./env

# Install build-time dependencies
Expand All @@ -13,8 +9,10 @@ sudo apt-get install -y liblzma-dev liblz4-dev zlib1g-dev

echo "Downloading $NAME version $VERSION ..."

[ -n "$HOSTTYPE" ] || HOSTTYPE="$(uname -m)"
ROOTWD="`pwd`"
SRCWD="$ROOTWD/$NAME-$VERSION"
INSTALLDIR="$ROOTWD/$NAME-$VERSION-$HOSTTYPE-$BUILDNAME-$BUILDVER/bin"

[ -r "$FILENAME" ] || curl -L -o "$FILENAME" "$URL"
[ -d "$SRCWD" ] || tar -xf "$FILENAME"
Expand All @@ -26,8 +24,8 @@ make -C programs zstd CFLAGS="-O3 -fPIC -g -static"
strip programs/zstd

# Pack up the static binary
[ -n "$HOSTTYPE" ] || HOSTTYPE="$(uname -m)"
tar -czf "$ROOTWD/$NAME-$VERSION-$HOSTTYPE-$BUILDNAME-$BUILDVER.txz" -C programs zstd
mkdir -p "$INSTALLDIR"
cp -f programs/zstd "$INSTALLDIR"/

# Clean up
cd "$ROOTWD"
Expand Down

0 comments on commit 240c35e

Please sign in to comment.