packages: hadoop/hadoop.spec (NEW) - initial from

glen glen at
Sun Jan 17 22:42:56 CET 2010

Author: glen                         Date: Sun Jan 17 21:42:56 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- initial from

---- Files affected:
   hadoop.spec (NONE -> 1.1)  (NEW)

---- Diffs:

Index: packages/hadoop/hadoop.spec
diff -u /dev/null packages/hadoop/hadoop.spec:1.1
--- /dev/null	Sun Jan 17 22:42:56 2010
+++ packages/hadoop/hadoop.spec	Sun Jan 17 22:42:50 2010
@@ -0,0 +1,102 @@
+# $Revision$, $Date$
+# - hadoop-fuse?
+# - pick snippets from
+# -
+# -
+Summary:	Hadoop Distributed File System and MapReduce implementation
+Name:		hadoop
+Version:	0.20.1
+Release:	0.1
+License:	ASL 2.0
+Group:		Daemons
+# Source0-md5:	719e169b7760c168441b49f405855b72
+BuildRequires:	rpmbuild(macros) >= 1.202
+Requires(postun):	/usr/sbin/groupdel
+Requires(postun):	/usr/sbin/userdel
+Requires(pre):	/bin/id
+Requires(pre):	/usr/bin/getgid
+Requires(pre):	/usr/sbin/groupadd
+Requires(pre):	/usr/sbin/useradd
+Requires:	jdk
+Provides:	group(hadoop)
+Provides:	user(hadoop)
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Apache Hadoop Core is a software platform that lets one easily write
+and run applications that process vast amounts of data.
+Here's what makes Hadoop especially useful:
+ - Scalable: Hadoop can reliably store and process petabytes.
+ - Economical: It distributes the data and processing across clusters
+   of commonly available computers. These clusters can number into the
+   thousands of nodes.
+ - Efficient: By distributing the data, Hadoop can process it in
+   parallel on the nodes where the data is located. This makes it
+   extremely rapid.
+ - Reliable: Hadoop automatically maintains multiple copies of data and
+   automatically redeploys computing tasks based on failures.
+Hadoop implements MapReduce, using the Hadoop Distributed File System
+(HDFS). MapReduce divides applications into many small blocks of work.
+HDFS creates multiple replicas of data blocks for reliability, placing
+them on compute nodes around the cluster. MapReduce can then process
+the data where it is located.
+%setup -q
+# defaults
+%{__sed} -i -e '
+s|.*JAVA_HOME=.*|export JAVA_HOME=%{_prefix}/java/latest|
+	s|.*HADOOP_CLASSPATH=.*|export HADOOP_CLASSPATH=$HADOOP_CONF_DIR:$(build-classpath hadoop)|
+	s|.*HADOOP_LOG_DIR=.*|export HADOOP_LOG_DIR=%{_var}/log/hadoop|
+	s|.*HADOOP_PID_DIR=.*|export HADOOP_PID_DIR=%{_var}/run/hadoop|
+' conf/
+install -d $RPM_BUILD_ROOT%{_prefix}/local/%{name}
+for D in $(find . -mindepth 1 -maxdepth 1 -type d | cut -c 3- | %{__grep} -Evw 'build|docs|src'); do
+	%{__cp} -a $D $RPM_BUILD_ROOT%{_prefix}/local/%{name}/
+install *.jar $RPM_BUILD_ROOT%{_prefix}/local/%{name}/
+install *.txt $RPM_BUILD_ROOT%{_prefix}/local/%{name}/
+install *.xml $RPM_BUILD_ROOT%{_prefix}/local/%{name}/
+install -d $RPM_BUILD_ROOT%{_var}/run/hadoop
+install -d $RPM_BUILD_ROOT%{_var}/log/hadoop
+# Packing list
+	echo '%defattr(-,root,root,-)'
+	echo '%attr(0755,hadoop,hadoop) %{_var}/run/hadoop'
+	echo '%attr(0755,hadoop,hadoop) %{_var}/log/hadoop'
+	find $RPM_BUILD_ROOT%{_prefix}/local/%{name} -type d -printf '%%%dir %p\n' | %{__sed} -e 's|$RPM_BUILD_ROOT||g'
+	find $RPM_BUILD_ROOT%{_prefix}/local/%{name} -type f -printf '%p\n' | %{__grep} -v 'conf/' | %{__sed} -e 's|$RPM_BUILD_ROOT||g'
+	find $RPM_BUILD_ROOT%{_prefix}/local/%{name}/conf -type f -printf '%%%config(noreplace) %p\n' | %{__sed} -e 's|$RPM_BUILD_ROOT||g'
+) > filelist
+%groupadd -r hadoop
+%useradd -m -r -g hadoop -c 'HDFS Runtime User' -s /bin/sh hadoop
+%files -f filelist
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+* %{date} PLD Team <feedback at>
+All persons listed below can be reached at <cvs_login>
+Revision 1.1  2010/01/17 21:42:50  glen
+- initial from

More information about the pld-cvs-commit mailing list