Permalink
Browse files

Basic docs

  • Loading branch information...
1 parent 24595a9 commit cc370cdf70a37c2012fef4161d9eb7ae281f02d5 @toddlipcon committed Oct 21, 2009
Showing with 59 additions and 8 deletions.
  1. +48 −0 README
  2. +11 −8 run.sh
View
48 README
@@ -0,0 +1,48 @@
+Overview
+===================
+This project is a convenient mechanism of packaging the
+hadoop-gpl-compression project from Google Code.
+
+It has three basic steps:
+
+1) Perform an svn export of the most recent revision of hadoop-gpl-compression
+2) Create and build an RPM
+3) Create an build a Debian package
+
+Requirements:
+====================
+
+- subversion
+- java (preferably sun's JDK)
+- appropriate package building tools for your platform
+ - yum install rpm-build (RedHat based)
+ - apt-get install dev-scripts (Debian based)
+
+When you try to build for your platform, build dependency errors will also
+inform you of any other packages you may need to install (eg lzo2 devel
+packages, ant, etc)
+
+Usage:
+====================
+To build packages, simply run the included shell script.
+
+ ./run.sh
+
+We recommend you run this on the same platform as your tasktrackers so
+as to be sure the built libraries are compatible.
+
+If you would like to skip building debian or rpm, you can do:
+
+ SKIP_RPM=1 ./run.sh
+ or
+ SKIP_DEB=1 ./run.sh
+
+If you'd like to check out a particular revision, you can do:
+
+ SVN_REV=46 ./run.sh
+
+There are some other variables that can be overridden - simply look
+at the top section of run.sh to learn what they are.
+
+After running the script, you should be able to find debs in the build/deb
+directory and RPMs in the build/topdir/RPMS directory.
View
19 run.sh
@@ -3,12 +3,21 @@
##############################
# Begin configurables
##############################
-SVNURL=http://hadoop-gpl-compression.googlecode.com/svn/trunk/
+SVNURL=${SVNURL:-http://hadoop-gpl-compression.googlecode.com/svn/trunk/}
if [ -z "$SVN_REV" ]; then
SVN_REV=$(svn info $SVNURL | grep Revision | awk '{print $2}')
fi
VERSION=${VERSION:-0.2.0svn$SVN_REV}
RELEASE=${RELEASE:-1}
+
+# Some metadata fields for the packages (used only by rpms)
+PACKAGER=${PACKAGER:-$(getent passwd $USER | cut -d':' -f5 | cut -d, -f1)}
+HOST=${HOST:-$(hostname -f)}
+PACKAGER_EMAIL=${PACKAGER_EMAIL:-$USER@$HOST}
+
+# The hadoop home that the packages will eventually install into
+# TODO(todd) this is currently only used by rpms, I believe
+HADOOP_HOME=${HADOOP_HOME:-/usr/lib/hadoop-0.20}
##############################
# End configurables
##############################
@@ -28,12 +37,6 @@ if [ ! -e $SVNTAR ]; then
fi
-VERSION=0.2.0svn$SVN_REV
-PACKAGER=${PACKAGER:-$(getent passwd $USER | cut -d':' -f5 | cut -d, -f1)}
-HOST=$(hostname -f)
-PACKAGER_EMAIL=${PACKAGER_EMAIL:-$USER@$HOST}
-HADOOP_HOME=${HADOOP_HOME:-/usr/lib/hadoop-0.20}
-
[[ $SVN_REV == [0-9]+ ]]
echo "SVN Revision: $SVN_REV"
@@ -83,4 +86,4 @@ pushd hadoop-gpl-compression-$VERSION
dch -D $(lsb_release -cs) --newversion $VERSION-$RELEASE "Local automatic build"
debuild -uc -us -sa
-fi
+fi

0 comments on commit cc370cd

Please sign in to comment.