Blame amplab-tachyon.spec

Timothy St. Clair e186605
%global commit      e5cba5beb849e01b7bd21bf3d35e2c901121cd4b
Timothy St. Clair 942ec6f
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Timothy St. Clair 942ec6f
%global shortname   tachyon
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
Name:          amplab-%{shortname}
Timothy St. Clair 942ec6f
# Given the naming conflicts with other packages, and eventually this will 
Timothy St. Clair 942ec6f
# switch to apache-tachyon should 
Timothy St. Clair 942ec6f
Version:       0.4.0
Timothy St. Clair 112474a
Release:       6.SNAPSHOT.%{shortcommit}%{?dist}
Timothy St. Clair 942ec6f
Summary:       Reliable file sharing at memory speed across cluster frameworks
Timothy St. Clair 942ec6f
License:       ASL 2.0
Timothy St. Clair 942ec6f
URL:           https://github.com/amplab/tachyon/wiki
Timothy St. Clair 942ec6f
Source0:       https://github.com/amplab/tachyon/archive/%{commit}/%{shortname}-%{version}-%{shortcommit}.tar.gz
Timothy St. Clair 942ec6f
Source1:       %{shortname}-tmpfiles.conf
Timothy St. Clair 942ec6f
Source2:       %{shortname}-master.service
Timothy St. Clair 942ec6f
Source3:       %{shortname}-slave.service
Timothy St. Clair 942ec6f
Source4:       %{shortname}-layout.sh
Timothy St. Clair 942ec6f
Source5:       %{shortname}-env.sh
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
Patch0:        tachyon-0.4.0-SNAPSHOT-log4props.patch
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
BuildRequires: java-devel
Timothy St. Clair 942ec6f
BuildRequires: mvn(commons-io:commons-io)
Timothy St. Clair 942ec6f
BuildRequires: mvn(log4j:log4j)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.apache.ant:ant)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.apache.commons:commons-lang3)
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.apache.hadoop:hadoop-common)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.apache.hadoop:hadoop-mapreduce-client-core)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.apache.hadoop:hadoop-hdfs)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.apache.curator:curator-recipes)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.apache.curator:curator-test)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.apache.thrift:libthrift)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.eclipse.jetty:jetty-webapp)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.eclipse.jetty:jetty-server)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.eclipse.jetty:jetty-servlet)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.glassfish.web:javax.servlet.jsp)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.slf4j:slf4j-api)
Timothy St. Clair 942ec6f
BuildRequires: mvn(org.slf4j:slf4j-log4j12)
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
# Test deps
Timothy St. Clair 942ec6f
BuildRequires: mvn(junit:junit)
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
BuildRequires: maven-local
Timothy St. Clair 942ec6f
BuildRequires: maven-plugin-bundle
Timothy St. Clair 942ec6f
BuildRequires: exec-maven-plugin
Timothy St. Clair 942ec6f
BuildRequires: maven-remote-resources-plugin
Timothy St. Clair 942ec6f
BuildRequires: maven-site-plugin
Timothy St. Clair 942ec6f
BuildRequires: replacer
Timothy St. Clair 942ec6f
BuildRequires: thrift
Timothy St. Clair 942ec6f
BuildRequires: systemd
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
BuildArch:     noarch
Timothy St. Clair 942ec6f
Timothy St. Clair 8977acd
ExcludeArch: %{arm}
Timothy St. Clair 8977acd
Timothy St. Clair 942ec6f
%description
Timothy St. Clair 942ec6f
Tachyon is a fault tolerant distributed file system
Timothy St. Clair 942ec6f
enabling reliable file sharing at memory-speed
Timothy St. Clair 942ec6f
across cluster frameworks, such as Spark and MapReduce.
Timothy St. Clair 942ec6f
It achieves high performance by leveraging lineage
Timothy St. Clair 942ec6f
information and using memory aggressively.
Timothy St. Clair 942ec6f
Tachyon caches working set files in memory, and
Timothy St. Clair 942ec6f
enables different jobs/queries and frameworks to
Timothy St. Clair 942ec6f
access cached files at memory speed. Thus, Tachyon
Timothy St. Clair 942ec6f
avoids going to disk to load data-sets that
Timothy St. Clair 942ec6f
are frequently read.
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%package javadoc
Timothy St. Clair 942ec6f
Summary:       Javadoc for %{name}
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%description javadoc
Timothy St. Clair 942ec6f
This package contains javadoc for %{name}.
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%prep
Timothy St. Clair 942ec6f
%setup -q -n tachyon-%{commit}
Timothy St. Clair 942ec6f
find -name '*.class' -print -delete
Timothy St. Clair 942ec6f
find -name '*.jar' -print -delete
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%patch0 -p1
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
sed -i "s|<artifactId>hadoop-client|<artifactId>hadoop-mapreduce-client-core|" pom.xml
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%pom_xpath_remove "pom:repositories"
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
# Remove unnecessary plugin
Timothy St. Clair 942ec6f
%pom_remove_plugin :maven-assembly-plugin
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
# Fix unavailable jetty-jsp-2.1
Timothy St. Clair 942ec6f
%pom_remove_dep org.eclipse.jetty:jetty-jsp
Timothy St. Clair 942ec6f
%pom_add_dep org.glassfish.web:javax.servlet.jsp::compile
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
#make additions for hadoop2
Timothy St. Clair 942ec6f
%pom_add_dep org.apache.hadoop:hadoop-common
Timothy St. Clair 942ec6f
%pom_add_dep org.apache.hadoop:hadoop-hdfs
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
# Fix jetty9 support
Timothy St. Clair 942ec6f
sed -i "s|org.mortbay.log.Log|org.eclipse.jetty.util.log.Log|" src/main/java/tachyon/MasterInfo.java
Timothy St. Clair 942ec6f
sed -i "s|Log.info|Log.getRootLogger().info|" src/main/java/tachyon/MasterInfo.java
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
# This is required to update to the latest thrift.
Timothy St. Clair 942ec6f
./bin/tachyon thriftGen
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%build
Timothy St. Clair 942ec6f
 
Timothy St. Clair 942ec6f
%mvn_file org.tachyonproject:%{shortname} %{shortname}
Timothy St. Clair 942ec6f
%mvn_build
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%install
Timothy St. Clair 942ec6f
%mvn_install
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
#######################
Timothy St. Clair 942ec6f
# install system integration files
Timothy St. Clair 942ec6f
#######################
Timothy St. Clair 942ec6f
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
Timothy St. Clair 942ec6f
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{shortname}.conf
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
#######################
Timothy St. Clair 942ec6f
mkdir -p %{buildroot}%{_unitdir}
Timothy St. Clair 942ec6f
install -m 0644 %{SOURCE2} %{SOURCE3} %{buildroot}%{_unitdir}/
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
#######################
Timothy St. Clair 942ec6f
mkdir -p %{buildroot}%{_libexecdir}/
Timothy St. Clair 942ec6f
install -m 0755 %{SOURCE4} %{buildroot}%{_libexecdir}/
Timothy St. Clair 942ec6f
install -m 0755 libexec/* %{buildroot}%{_libexecdir}/
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
#######################
Timothy St. Clair 942ec6f
mkdir -p %{buildroot}%{_bindir}/
Timothy St. Clair 942ec6f
install -m 0755 bin/tachyon* %{buildroot}%{_bindir}/
Timothy St. Clair 942ec6f
mv %{buildroot}%{_bindir}/%{shortname} %{buildroot}%{_bindir}/%{shortname}.sh
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
#######################
Timothy St. Clair 942ec6f
mkdir -p %{buildroot}/%{_sysconfdir}/%{shortname}
Timothy St. Clair 942ec6f
install -m 0644 conf/log4j.properties conf/slaves %{buildroot}/%{_sysconfdir}/%{shortname}
Timothy St. Clair 942ec6f
install -m 0644 %{SOURCE5} %{buildroot}/%{_sysconfdir}/%{shortname}
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
#######################
Timothy St. Clair 942ec6f
mkdir -p -m0755 %{buildroot}/%{_var}/log/%{shortname}
Timothy St. Clair 942ec6f
mkdir -p -m0755 %{buildroot}%{_var}/lib/%{shortname}/journal
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%files -f .mfiles
Timothy St. Clair 942ec6f
%doc LICENSE README.md
Timothy St. Clair 942ec6f
%dir %{_sysconfdir}/%{shortname}
Timothy St. Clair 942ec6f
%config(noreplace) %{_sysconfdir}/%{shortname}/log4j.properties
Timothy St. Clair 942ec6f
%config(noreplace) %{_sysconfdir}/%{shortname}/slaves
Timothy St. Clair 942ec6f
%config(noreplace) %{_sysconfdir}/%{shortname}/tachyon-env.sh
Timothy St. Clair 942ec6f
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{shortname}.conf
Timothy St. Clair 942ec6f
%{_bindir}/tachyon*
Timothy St. Clair 942ec6f
%{_libexecdir}/tachyon*
Timothy St. Clair 942ec6f
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{shortname}.conf
Timothy St. Clair 942ec6f
%{_unitdir}/*
Timothy St. Clair 942ec6f
%attr(0755,tachyon,tachyon) %dir %{_var}/log/%{shortname}
Timothy St. Clair 942ec6f
%attr(0755,tachyon,tachyon) %dir %{_var}/lib/%{shortname}/journal
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%files javadoc -f .mfiles-javadoc
Timothy St. Clair 942ec6f
%doc LICENSE
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
############################################
Timothy St. Clair 942ec6f
%pre
Timothy St. Clair 942ec6f
getent group tachyon >/dev/null || groupadd -f -r tachyon
Timothy St. Clair 942ec6f
if ! getent passwd tachyon >/dev/null ; then
Timothy St. Clair 942ec6f
      useradd -r -g tachyon -d %{_sharedstatedir}/%{shortname} -s /sbin/nologin \
Timothy St. Clair 942ec6f
              -c "%{shortname} daemon account" tachyon
Timothy St. Clair 942ec6f
fi
Timothy St. Clair 942ec6f
exit 0
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%post
Timothy St. Clair 942ec6f
%systemd_post %{shortname}-master.service %{shortname}-slave.service
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%preun
Timothy St. Clair 942ec6f
%systemd_preun %{shortname}-slave.service %{shortname}-master.service
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%postun
Timothy St. Clair 942ec6f
%systemd_postun_with_restart %{shortname}-slave.service %{shortname}-master.service
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
%changelog
Timothy St. Clair e186605
* Fri Dec 6 2013 Timothy St. Clair<tstclair@redhat.com> 0.4.0-6.SNAPSHOT.e5cba5b
Timothy St. Clair 112474a
- Update to latest modifications
Timothy St. Clair 112474a
Timothy St. Clair 5ed49e6
* Wed Nov 20 2013 Timothy St. Clair<tstclair@redhat.com> 0.4.0-5.SNAPSHOT.515c2c8
Timothy St. Clair 5ed49e6
- Update to exclude arm due to missing dependencies
Timothy St. Clair 5ed49e6
Timothy St. Clair 942ec6f
* Fri Nov 15 2013 Timothy St. Clair<tstclair@redhat.com> 0.4.0-4.SNAPSHOT.515c2c8
Timothy St. Clair 942ec6f
- Patches accepted upstream, thus changing source url to be canonical
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
* Thu Nov 7 2013 Timothy St. Clair<tstclair@redhat.com> 0.4.0-3.SNAPSHOT.9d66149
Timothy St. Clair 942ec6f
- Modifications from system testing.
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
* Mon Nov 4 2013 Timothy St. Clair<tstclair@redhat.com> 0.4.0-2.SNAPSHOT.9d66149
Timothy St. Clair 942ec6f
- System integration and testing.
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
* Mon Oct 28 2013 Timothy St. Clair <tstclair@redhat.com> 0.4.0-1.SNAPSHOT.9d66149
Timothy St. Clair 942ec6f
- Pre-release update to 0.4.0 with script modifications.
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
* Thu Oct 10 2013 Timothy St. Clair <tstclair@redhat.com> 0.3.0-1
Timothy St. Clair 942ec6f
- Update to the latest in preparation for release. 
Timothy St. Clair 942ec6f
Timothy St. Clair 942ec6f
* Sun Sep 29 2013 gil cattaneo <puntogil@libero.it> 0.2.1-1
Timothy St. Clair 942ec6f
- initial rpm