[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r21718: {projects} Properly patch src, cross compile and strip all binaries (in projects/chumby: . patches)



Author: ioerror
Date: 2010-02-22 04:45:09 +0000 (Mon, 22 Feb 2010)
New Revision: 21718

Modified:
   projects/chumby/build.sh
   projects/chumby/patches/openssl-0.9.8l.patch
   projects/chumby/patches/zlib-1.2.3.patch
Log:
Properly patch src, cross compile and strip all binaries

Modified: projects/chumby/build.sh
===================================================================
--- projects/chumby/build.sh	2010-02-22 03:36:22 UTC (rev 21717)
+++ projects/chumby/build.sh	2010-02-22 04:45:09 UTC (rev 21718)
@@ -7,11 +7,11 @@
 #   http://wiki.chumby.com/mediawiki/index.php/GNU_Toolchain
 #
 # Please set the following to your arm cross compiler:
-export PATH=$PATH:/usr/arm-linux/bin/;
+export PATH=/usr/arm-linux/bin/:$PATH;
 
 # Perhaps you'd want to use Tor alpha releases in the future?
 #TOR_SRC="https://www.torproject.org/dist/tor-0.2.2.8-alpha.tar.gz";
-TOR_VER="0.2.1.23";
+TOR_VER="0.2.1.24";
 TOR_SRC="https://www.torproject.org/dist/tor-$TOR_VER.tar.gz";;
 LIBEVENT_VER="1.4.13-stable";
 LIBEVENT_SRC="http://www.monkey.org/~provos/libevent-$LIBEVENT_VER.tar.gz";;
@@ -45,8 +45,10 @@
 # Libevent
 echo "Building libevent $LIBEVENT_VER";
 cd libevent-$LIBEVENT_VER;
-./configure --host=arm-linux;
+echo "You'll need to install Libevent into /usr/arm-linux/local/ now...";
+./configure --prefix=/usr/arm-linux/local/ --host=arm-linux;
 make;
+sudo make install;
 cd $TMP_DIR;
 
 # zlib
@@ -63,17 +65,23 @@
 ./Configure linux-generic32;
 patch < $OPENSSL_PATCH;
 make;
+echo "You'll need to install OpenSSL into /usr/arm-linux/local/ssl/include/ now...";
+sudo make install;
 cd $TMP_DIR;
 
 # Tor
 echo "Building Tor $TOR_VER";
 cd tor-$TOR_VER;
+# There may be value in adding --enable-openbsd-malloc at some point
 ./configure --host=arm-linux \
-            --with-libevent-dir=$TMP_DIR/libevent-$LIBEVENT_VER/.libs/ \
+            --with-libevent-dir=/usr/arm-linux/local/ \
             --with-openssl-dir=/usr/arm-linux/local/ssl/ \
-            -includedir=/usr/arm-linux/local/ssl/include/ \
+            --includedir=/usr/arm-linux/local/ssl/include/ \
             --with-zlib-dir=$TMP_DIR/zlib-$ZLIB_VER/;
+
 make
+echo "Tor done - did it work?";
+sleep 60;
 
 # Now we'll build the mod
 echo "Copying the contents of $SRC_DIR to our build directory...";
@@ -81,10 +89,15 @@
 
 # Now we'll pack the following most current files into the build
 echo "Copying libevent into our build directory...";
+mkdir -p $BUILD_DIR/tor/libs/;
 cp -v $TMP_DIR/libevent-$LIBEVENT_VER/.libs/*.so $BUILD_DIR/tor/libs/;
 cp -v $TMP_DIR/libevent-$LIBEVENT_VER/.libs/*.so.* $BUILD_DIR/tor/libs/;
+echo "Stripping libevent to save space...";
+strip $BUILD_DIR/tor/libs/*;
 echo "Copying Tor into our build directory...";
 cp -v $TMP_DIR/tor-$TOR_VER/src/or/tor $BUILD_DIR/tor/;
+echo "Stripping Tor to save space...";
+strip $BUILD_DIR/tor/tor;
 cp -v $TMP_DIR/tor-$TOR_VER/src/config/geoip $BUILD_DIR/tor/;
 
 echo "Creating tar.gz package for Chumby...";

Modified: projects/chumby/patches/openssl-0.9.8l.patch
===================================================================
--- projects/chumby/patches/openssl-0.9.8l.patch	2010-02-22 03:36:22 UTC (rev 21717)
+++ projects/chumby/patches/openssl-0.9.8l.patch	2010-02-22 04:45:09 UTC (rev 21718)
@@ -1,6 +1,16 @@
+Common subdirectories: openssl-0.9.8l/apps and openssl-0.9.8l-chumby-diff/apps
+Common subdirectories: openssl-0.9.8l/bugs and openssl-0.9.8l-chumby-diff/bugs
+Common subdirectories: openssl-0.9.8l/certs and openssl-0.9.8l-chumby-diff/certs
+Common subdirectories: openssl-0.9.8l/crypto and openssl-0.9.8l-chumby-diff/crypto
+Common subdirectories: openssl-0.9.8l/demos and openssl-0.9.8l-chumby-diff/demos
+Common subdirectories: openssl-0.9.8l/doc and openssl-0.9.8l-chumby-diff/doc
+Common subdirectories: openssl-0.9.8l/engines and openssl-0.9.8l-chumby-diff/engines
+Common subdirectories: openssl-0.9.8l/fips and openssl-0.9.8l-chumby-diff/fips
+Common subdirectories: openssl-0.9.8l/include and openssl-0.9.8l-chumby-diff/include
+Common subdirectories: openssl-0.9.8l/MacOS and openssl-0.9.8l-chumby-diff/MacOS
 diff -u openssl-0.9.8l/Makefile openssl-0.9.8l-chumby-diff/Makefile
---- openssl-0.9.8l/Makefile	2010-02-19 18:52:59.000000000 -0800
-+++ openssl-0.9.8l-chumby-diff/Makefile	2010-02-19 18:52:25.000000000 -0800
+--- openssl-0.9.8l/Makefile	2010-02-21 19:14:16.000000000 -0800
++++ openssl-0.9.8l-chumby-diff/Makefile	2010-02-21 19:16:10.000000000 -0800
 @@ -26,10 +26,10 @@
  # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
  # Normally it is left empty.
@@ -28,10 +38,9 @@
  ARFLAGS= 
 -AR=ar $(ARFLAGS) r
 -ARD=ar $(ARFLAGS) d
--RANLIB= /usr/bin/ranlib
 +AR=arm-none-linux-gnueabi-ar $(ARFLAGS) r
 +ARD=arm-none-linux-gnueabi-ar $(ARFLAGS) d
-+RANLIB= arm-none-linux-gnueabi-ranlib
+ RANLIB= /usr/arm-linux/bin//ranlib
  PERL= /usr/bin/perl
  TAR= tar
  TARFLAGS= --no-recursion
@@ -40,3 +49,14 @@
  
  # We let the C compiler driver to take care of .s files. This is done in
  # order to be excused from maintaining a separate set of architecture
+Common subdirectories: openssl-0.9.8l/ms and openssl-0.9.8l-chumby-diff/ms
+Common subdirectories: openssl-0.9.8l/Netware and openssl-0.9.8l-chumby-diff/Netware
+Common subdirectories: openssl-0.9.8l/os2 and openssl-0.9.8l-chumby-diff/os2
+Common subdirectories: openssl-0.9.8l/perl and openssl-0.9.8l-chumby-diff/perl
+Common subdirectories: openssl-0.9.8l/shlib and openssl-0.9.8l-chumby-diff/shlib
+Common subdirectories: openssl-0.9.8l/ssl and openssl-0.9.8l-chumby-diff/ssl
+Common subdirectories: openssl-0.9.8l/test and openssl-0.9.8l-chumby-diff/test
+Common subdirectories: openssl-0.9.8l/times and openssl-0.9.8l-chumby-diff/times
+Common subdirectories: openssl-0.9.8l/tools and openssl-0.9.8l-chumby-diff/tools
+Common subdirectories: openssl-0.9.8l/util and openssl-0.9.8l-chumby-diff/util
+Common subdirectories: openssl-0.9.8l/VMS and openssl-0.9.8l-chumby-diff/VMS

Modified: projects/chumby/patches/zlib-1.2.3.patch
===================================================================
--- projects/chumby/patches/zlib-1.2.3.patch	2010-02-22 03:36:22 UTC (rev 21717)
+++ projects/chumby/patches/zlib-1.2.3.patch	2010-02-22 04:45:09 UTC (rev 21718)
@@ -1,26 +1,30 @@
+Common subdirectories: zlib-1.2.3/amiga and zlib-1.2.3-chumby-diff/amiga
+Common subdirectories: zlib-1.2.3/as400 and zlib-1.2.3-chumby-diff/as400
+Common subdirectories: zlib-1.2.3/contrib and zlib-1.2.3-chumby-diff/contrib
+Common subdirectories: zlib-1.2.3/examples and zlib-1.2.3-chumby-diff/examples
 diff -u zlib-1.2.3/Makefile zlib-1.2.3-chumby-diff/Makefile
---- zlib-1.2.3/Makefile	2005-07-17 19:25:21.000000000 -0700
-+++ zlib-1.2.3-chumby-diff/Makefile	2010-02-19 18:28:22.000000000 -0800
-@@ -16,15 +16,15 @@
+--- zlib-1.2.3/Makefile	2010-02-21 19:05:38.000000000 -0800
++++ zlib-1.2.3-chumby-diff/Makefile	2010-02-21 19:05:32.000000000 -0800
+@@ -16,7 +16,7 @@
  # To install in $HOME instead of /usr/local, use:
  #    make install prefix=$HOME
  
 -CC=gcc
-+CC=arm-none-linux-gnueabi-gcc
++CC=arm-none-linux-gnueabi-gcc-4.3.2
  
--CFLAGS=-O
-+CFLAGS=-O3 -DUSE_MMAP
+ CFLAGS=-O3 -DUSE_MMAP
  #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
- #CFLAGS=-g -DDEBUG
- #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
+@@ -25,16 +25,16 @@
  #           -Wstrict-prototypes -Wmissing-prototypes
  
--LDFLAGS=libz.a
-+LDFLAGS=-L. libz.a
- LDSHARED=$(CC)
- CPP=$(CC) -E
+ LDFLAGS=-L. libz.a
+-LDSHARED=gcc
+-CPP=gcc -E
++LDSHARED=$(CC)
++CPP=$(CC) -E
  
-@@ -33,8 +33,8 @@
+ LIBS=libz.a
+ SHAREDLIB=libz.so
  SHAREDLIBV=libz.so.1.2.3
  SHAREDLIBM=libz.so.1
  
@@ -31,3 +35,8 @@
  TAR=tar
  SHELL=/bin/sh
  EXE=
+Common subdirectories: zlib-1.2.3/msdos and zlib-1.2.3-chumby-diff/msdos
+Common subdirectories: zlib-1.2.3/old and zlib-1.2.3-chumby-diff/old
+Common subdirectories: zlib-1.2.3/projects and zlib-1.2.3-chumby-diff/projects
+Common subdirectories: zlib-1.2.3/qnx and zlib-1.2.3-chumby-diff/qnx
+Common subdirectories: zlib-1.2.3/win32 and zlib-1.2.3-chumby-diff/win32