From d7e1f62db48bbed5b4e6ca827e4746cc1f9dd430 Mon Sep 17 00:00:00 2001 From: zzz Date: Wed, 1 Jun 2016 17:45:27 +0000 Subject: [PATCH] Build: Fix Debian build on ARM (ticket #1801) - Fix other jbigi/jcpuid build script errors and typos - Nonzero exit code missing on some jbigi/jcpuid build script failures - Refresh patch --- core/c/jbigi/build_jbigi.sh | 22 +++++++++---------- core/c/jcpuid/build.sh | 20 ++++++++--------- debian/patches/0002-jbigi-soname.patch | 2 +- history.txt | 3 +++ .../src/net/i2p/router/RouterVersion.java | 4 ++-- 5 files changed, 27 insertions(+), 24 deletions(-) diff --git a/core/c/jbigi/build_jbigi.sh b/core/c/jbigi/build_jbigi.sh index 6926bdee4..30cdad5ca 100755 --- a/core/c/jbigi/build_jbigi.sh +++ b/core/c/jbigi/build_jbigi.sh @@ -4,26 +4,26 @@ # When executed in OSX: Produces a libjbigi.jnilib [ -z "$CC" ] && CC="gcc" +UNAME="$(uname -m)" if [ -z $BITS ]; then - UNAME="$(uname -a)" - if test "${UNAME#*x86_64}" != "x86_&4"; then + if test "${UNAME#*x86_64}" != "$UNAME"; then BITS=64 - elif test "${UNAME#*i386}" != "i386"; then + elif test "${UNAME#*i386}" != "$UNAME"; then BITS=32 - elif test "${UNAME#*i686}" != "i686"; then + elif test "${UNAME#*i686}" != "$UNAME"; then BITS=32 - elif test "${UNAME#*armv6}" != "armv6"; then + elif test "${UNAME#*armv6}" != "$UNAME"; then BITS=32 - elif test "${UNAME#*armv7}" != "armv7"; then + elif test "${UNAME#*armv7}" != "$UNAME"; then BITS=32 - elif test "${UNAME#*aarch32}" != "aarch32"; then + elif test "${UNAME#*aarch32}" != "$UNAME"; then BITS=32 - elif test "${UNAME#*aarch64}" != "aarch64"; then + elif test "${UNAME#*aarch64}" != "$UNAME"; then BITS=64 else echo "Unable to detect default setting for BITS variable" - exit + exit 1 fi printf "BITS variable not set, $BITS bit system detected\n" >&2 @@ -85,8 +85,8 @@ else STATICLIBS=".libs/libgmp.a" fi -[ $BITS -eq 32 ] && COMPILEFLAGS="-m32 $COMPILEFLAGS" && LINKFLAGS="-m32 $LINKFLAGS" -[ $BITS -eq 64 ] && COMPILEFLAGS="-m64 $COMPILEFLAGS" && LINKFLAGS="-m64 $LINKFLAGS" +[ $BITS -eq 32 -a "${UNAME#*86}" != "$UNAME" ] && COMPILEFLAGS="-m32 $COMPILEFLAGS" && LINKFLAGS="-m32 $LINKFLAGS" +[ $BITS -eq 64 -a "${UNAME#*86}" != "$UNAME" ] && COMPILEFLAGS="-m64 $COMPILEFLAGS" && LINKFLAGS="-m64 $LINKFLAGS" echo "Compiling C code..." echo "Compile: \"$CC -c $COMPILEFLAGS $INCLUDES ../../jbigi/src/jbigi.c\"" diff --git a/core/c/jcpuid/build.sh b/core/c/jcpuid/build.sh index 8c8a9af09..b119b2fcc 100755 --- a/core/c/jcpuid/build.sh +++ b/core/c/jcpuid/build.sh @@ -19,30 +19,30 @@ case $TARGET in echo "Building `uname -s |tr [A-Z] [a-z]` .sos";; *) echo "Unsupported build environment" - exit;; + exit 1;; esac if [ -z $BITS ]; then - UNAME="$(uname -a)" - if test "${UNAME#*x86_64}" != "x86_&4"; then + UNAME="$(uname -m)" + if test "${UNAME#*x86_64}" != "$UNAME"; then BITS=64 - elif test "${UNAME#*i386}" != "i386"; then + elif test "${UNAME#*i386}" != "$UNAME"; then BITS=32 - elif test "${UNAME#*i686}" != "i686"; then + elif test "${UNAME#*i686}" != "$UNAME"; then BITS=32 - elif test "${UNAME#*armv6}" != "armv6"; then + elif test "${UNAME#*armv6}" != "$UNAME"; then BITS=32 - elif test "${UNAME#*armv7}" != "armv7"; then + elif test "${UNAME#*armv7}" != "$UNAME"; then BITS=32 - elif test "${UNAME#*aarch32}" != "aarch32"; then + elif test "${UNAME#*aarch32}" != "$UNAME"; then BITS=32 - elif test "${UNAME#*aarch64}" != "aarch64"; then + elif test "${UNAME#*aarch64}" != "$UNAME"; then BITS=64 else echo "Unable to detect default setting for BITS variable" - exit + exit 1 fi printf "BITS variable not set, $BITS bit system detected\n" >&2 diff --git a/debian/patches/0002-jbigi-soname.patch b/debian/patches/0002-jbigi-soname.patch index b9ab384c0..08c4748a1 100644 --- a/debian/patches/0002-jbigi-soname.patch +++ b/debian/patches/0002-jbigi-soname.patch @@ -23,7 +23,7 @@ index 1521392..6a89c92 100755 LIBFILE="libjbigi.so";; *) @@ -89,8 +89,8 @@ - [ $BITS -eq 64 ] && COMPILEFLAGS="-m64 $COMPILEFLAGS" && LINKFLAGS="-m64 $LINKFLAGS" + [ $BITS -eq 64 -a "${UNAME#*86}" != "$UNAME" ] && COMPILEFLAGS="-m64 $COMPILEFLAGS" && LINKFLAGS="-m64 $LINKFLAGS" echo "Compiling C code..." -echo "Compile: \"$CC -c $COMPILEFLAGS $INCLUDES ../../jbigi/src/jbigi.c\"" diff --git a/history.txt b/history.txt index 3855f747a..2610833d5 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,6 @@ +2016-06-01 zzz + * Build: Fix Debian build on ARM (ticket #1801) + 2016-05-29 zzz * Console: Fix /configfamily form (ticket #1797) diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index ea17ad55f..421ff4f63 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,10 +18,10 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 15; + public final static long BUILD = 16; /** for example "-test" */ - public final static String EXTRA = ""; + public final static String EXTRA = "-rc"; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; public static void main(String args[]) { System.out.println("I2P Router version: " + FULL_VERSION);