Compare commits
No commits in common. "rawhide" and "f20" have entirely different histories.
12 changed files with 767 additions and 1 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/zookeeper-3.4.5.tar.gz
|
||||
/zookeeper-3.4.6-601207e.tar.gz
|
||||
|
|
@ -1 +0,0 @@
|
|||
Orphaned for 6+ weeks
|
||||
1
sources
Normal file
1
sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
623bfbaa0efbd2cc196fe06ea9f85566 zookeeper-3.4.6-601207e.tar.gz
|
||||
65
zkEnv.sh
Executable file
65
zkEnv.sh
Executable file
File diff suppressed because one or more lines are too long
85
zookeeper-3.4.5-add-PIE-and-RELRO.patch
Normal file
85
zookeeper-3.4.5-add-PIE-and-RELRO.patch
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
diff -Nru zookeeper-3.4.5/contrib/zktreeutil/src/Makefile.am zookeeper-3.4.5-gil/contrib/zktreeutil/src/Makefile.am
|
||||
--- zookeeper-3.4.5/contrib/zktreeutil/src/Makefile.am 2012-09-30 19:53:30.000000000 +0200
|
||||
+++ zookeeper-3.4.5-gil/contrib/zktreeutil/src/Makefile.am 2013-06-11 18:09:15.097330579 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
AM_CXXFLAGS = -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \
|
||||
-I$(top_srcdir)/include -I${LOG4CXX_INCLUDE} -I/usr/include \
|
||||
- -I${XML2_INCLUDE}
|
||||
+ -I${XML2_INCLUDE} -fPIE
|
||||
|
||||
bin_PROGRAMS = zktreeutil
|
||||
|
||||
diff -Nru zookeeper-3.4.5/recipes/lock/src/c/Makefile.am zookeeper-3.4.5-gil/recipes/lock/src/c/Makefile.am
|
||||
--- zookeeper-3.4.5/recipes/lock/src/c/Makefile.am 2012-09-30 19:53:31.000000000 +0200
|
||||
+++ zookeeper-3.4.5-gil/recipes/lock/src/c/Makefile.am 2013-06-11 17:10:22.808629998 +0200
|
||||
@@ -17,14 +17,14 @@
|
||||
include $(top_srcdir)/aminclude.am
|
||||
|
||||
AM_CFLAGS = -Wall -fPIC -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \
|
||||
- -I$(top_srcdir)/include -I/usr/include
|
||||
+ -I$(top_srcdir)/include -I/usr/include -fPIE
|
||||
AM_CPPFLAGS = -Wall -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated\
|
||||
- -I${top_srcdir}/include -I/usr/include
|
||||
+ -I${top_srcdir}/include -I/usr/include -fPIE
|
||||
EXTRA_DIST = LICENSE
|
||||
lib_LTLIBRARIES = libzoolock.la
|
||||
libzoolock_la_SOURCES = src/zoo_lock.c include/zoo_lock.h
|
||||
libzoolock_la_CPPFLAGS = -DDLOPEN_MODULE
|
||||
-libzoolock_la_LDFLAGS = -version-info 0:1:0
|
||||
+libzoolock_la_LDFLAGS = -version-info 0:1:0 -pie -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
#run the tests now
|
||||
|
||||
diff -Nru zookeeper-3.4.5/recipes/queue/src/c/Makefile.am zookeeper-3.4.5-gil/recipes/queue/src/c/Makefile.am
|
||||
--- zookeeper-3.4.5/recipes/queue/src/c/Makefile.am 2012-09-30 19:53:31.000000000 +0200
|
||||
+++ zookeeper-3.4.5-gil/recipes/queue/src/c/Makefile.am 2013-06-11 17:09:50.816288611 +0200
|
||||
@@ -17,14 +17,14 @@
|
||||
include $(top_srcdir)/aminclude.am
|
||||
|
||||
AM_CFLAGS = -Wall -fPIC -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \
|
||||
- -I$(top_srcdir)/include -I/usr/include
|
||||
+ -I$(top_srcdir)/include -I/usr/include -fPIE
|
||||
AM_CPPFLAGS = -Wall -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated\
|
||||
- -I${top_srcdir}/include -I/usr/include
|
||||
+ -I${top_srcdir}/include -I/usr/include -fPIE
|
||||
EXTRA_DIST = LICENSE
|
||||
lib_LTLIBRARIES = libzooqueue.la
|
||||
libzooqueue_la_SOURCES = src/zoo_queue.c include/zoo_queue.h
|
||||
libzooqueue_la_CPPFLAGS = -DDLOPEN_MODULE
|
||||
-libzooqueue_la_LDFLAGS = -version-info 0:1:0
|
||||
+libzooqueue_la_LDFLAGS = -version-info 0:1:0 -pie -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
#run the tests now
|
||||
|
||||
diff -Nru zookeeper-3.4.5/src/c/Makefile.am zookeeper-3.4.5-gil/src/c/Makefile.am
|
||||
--- zookeeper-3.4.5/src/c/Makefile.am 2012-09-30 19:53:31.000000000 +0200
|
||||
+++ zookeeper-3.4.5-gil/src/c/Makefile.am 2013-06-11 17:02:31.701054099 +0200
|
||||
@@ -1,11 +1,11 @@
|
||||
# need this for Doxygen integration
|
||||
include $(top_srcdir)/aminclude.am
|
||||
|
||||
-AM_CPPFLAGS = -I${srcdir}/include -I${srcdir}/tests -I${srcdir}/generated
|
||||
-AM_CFLAGS = -Wall -Werror
|
||||
-AM_CXXFLAGS = -Wall $(USEIPV6)
|
||||
+AM_CPPFLAGS = -I${srcdir}/include -I${srcdir}/tests -I${srcdir}/generated -fPIE
|
||||
+AM_CFLAGS = -Wall -Werror -fPIE
|
||||
+AM_CXXFLAGS = -Wall $(USEIPV6) -fPIE
|
||||
|
||||
-LIB_LDFLAGS = -no-undefined -version-info 2
|
||||
+LIB_LDFLAGS = -no-undefined -version-info 2 -pie -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
pkginclude_HEADERS = include/zookeeper.h include/zookeeper_version.h include/zookeeper_log.h include/proto.h include/recordio.h generated/zookeeper.jute.h
|
||||
EXTRA_DIST=LICENSE
|
||||
diff -Nru zookeeper-3.4.5/src/contrib/zktreeutil/src/Makefile.am zookeeper-3.4.5-gil/src/contrib/zktreeutil/src/Makefile.am
|
||||
--- zookeeper-3.4.5/src/contrib/zktreeutil/src/Makefile.am 2012-09-30 19:53:32.000000000 +0200
|
||||
+++ zookeeper-3.4.5-gil/src/contrib/zktreeutil/src/Makefile.am 2013-06-11 18:12:03.908634751 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
AM_CXXFLAGS = -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \
|
||||
-I$(top_srcdir)/include -I${LOG4CXX_INCLUDE} -I/usr/include \
|
||||
- -I${XML2_INCLUDE}
|
||||
+ -I${XML2_INCLUDE} -fPIE
|
||||
|
||||
bin_PROGRAMS = zktreeutil
|
||||
|
||||
27
zookeeper-3.4.5-disable-cygwin-detection.patch
Normal file
27
zookeeper-3.4.5-disable-cygwin-detection.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
--- bin/zkServer.sh 2012-09-30 19:53:31.000000000 +0200
|
||||
+++ bin/zkServer.sh-gil 2013-04-27 11:27:59.972764863 +0200
|
||||
@@ -69,15 +69,6 @@
|
||||
ZOOCFG="$2"
|
||||
fi
|
||||
|
||||
-if $cygwin
|
||||
-then
|
||||
- ZOOCFG=`cygpath -wp "$ZOOCFG"`
|
||||
- # cygwin has a "kill" in the shell itself, gets confused
|
||||
- KILL=/bin/kill
|
||||
-else
|
||||
- KILL=kill
|
||||
-fi
|
||||
-
|
||||
echo "Using config: $ZOOCFG" >&2
|
||||
|
||||
if [ -z $ZOOPIDFILE ]; then
|
||||
@@ -140,7 +131,7 @@
|
||||
then
|
||||
echo "no zookeeper to stop (could not find file $ZOOPIDFILE)"
|
||||
else
|
||||
- $KILL -9 $(cat "$ZOOPIDFILE")
|
||||
+ kill -9 $(cat "$ZOOPIDFILE")
|
||||
rm "$ZOOPIDFILE"
|
||||
echo STOPPED
|
||||
fi
|
||||
10
zookeeper-3.4.5-zktreeutil-gcc.patch
Normal file
10
zookeeper-3.4.5-zktreeutil-gcc.patch
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
--- src/contrib/zktreeutil/src/ZkAdaptor.h 2012-09-30 19:53:32.000000000 +0200
|
||||
+++ src/contrib/zktreeutil/src/ZkAdaptor.h-gil 2013-04-04 03:37:46.731950855 +0200
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
+#include <unistd.h>
|
||||
|
||||
extern "C" {
|
||||
#include "zookeeper.h"
|
||||
121
zookeeper-3.4.6-ivy-build.patch
Normal file
121
zookeeper-3.4.6-ivy-build.patch
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
diff --git a/build.xml b/build.xml
|
||||
index 442d52e..bc1f4a2 100644
|
||||
--- a/build.xml
|
||||
+++ b/build.xml
|
||||
@@ -257,7 +257,7 @@ xmlns:maven="antlib:org.apache.maven.artifact.ant">
|
||||
<mkdir dir="${ivy.package.lib}"/>
|
||||
<mkdir dir="${ivy.test.lib}"/>
|
||||
<condition property="ivy.jar.exists">
|
||||
- <available file="${lib.dir}/ivy-${ivy.version}.jar"/>
|
||||
+ <available file="/usr/share/java/ivy.jar"/>
|
||||
</condition>
|
||||
|
||||
<tstamp>
|
||||
@@ -343,9 +343,9 @@ xmlns:maven="antlib:org.apache.maven.artifact.ant">
|
||||
|
||||
<target name="ivy-download" unless="ivy.jar.exists" depends="init">
|
||||
<delete dir="${lib.dir}"
|
||||
- includes="ivy-*.jar" excludes="ivy-${ivy.version}.jar"/>
|
||||
- <get src="${ivy.url}/${ivy.version}/ivy-${ivy.version}.jar"
|
||||
- dest="${lib.dir}/ivy-${ivy.version}.jar" usetimestamp="true"/>
|
||||
+ includes="ivy.jar" excludes="ivy.jar"/>
|
||||
+ <get src="${ivy.url}/ivy.jar"
|
||||
+ dest="${lib.dir}/ivy.jar" usetimestamp="true"/>
|
||||
</target>
|
||||
|
||||
<target name="ivy-taskdef" unless="ivy.initialized">
|
||||
diff --git a/ivy.xml b/ivy.xml
|
||||
index 561832a..0d9e2ed 100644
|
||||
--- a/ivy.xml
|
||||
+++ b/ivy.xml
|
||||
@@ -58,12 +58,12 @@
|
||||
<dependency org="junit" name="junit" rev="4.8.1" conf="test->default"/>
|
||||
<dependency org="org.mockito" name="mockito-all" rev="1.8.2"
|
||||
conf="test->default"/>
|
||||
- <dependency org="checkstyle" name="checkstyle" rev="5.0"
|
||||
+ <dependency org="com.puppycrawl.tools" name="checkstyle" rev="5.6"
|
||||
conf="test->default"/>
|
||||
|
||||
<dependency org="jdiff" name="jdiff" rev="1.0.9"
|
||||
conf="jdiff->default"/>
|
||||
- <dependency org="xerces" name="xerces" rev="1.4.4"
|
||||
+ <dependency org="xerces" name="xercesImpl" rev="1.4.4"
|
||||
conf="jdiff->default"/>
|
||||
|
||||
<dependency org="org.apache.rat" name="apache-rat-tasks"
|
||||
diff --git a/ivysettings.xml b/ivysettings.xml
|
||||
index 52cfa52..f207811 100644
|
||||
--- a/ivysettings.xml
|
||||
+++ b/ivysettings.xml
|
||||
@@ -17,29 +17,14 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
- <property name="repo.maven.org"
|
||||
- value="http://repo1.maven.org/maven2/" override="false"/>
|
||||
- <property name="repo.jboss.org"
|
||||
- value="http://repository.jboss.org/nexus/content/groups/public/" override="false"/>
|
||||
- <property name="repo.sun.org"
|
||||
- value="http://download.java.net/maven/2/" override="false"/>
|
||||
- <property name="maven2.pattern"
|
||||
- value="[organisation]/[module]/[revision]/[module]-[revision]"/>
|
||||
- <property name="maven2.pattern.ext" value="${maven2.pattern}.[ext]"/>
|
||||
<include url="${ivy.default.conf.dir}/ivyconf-local.xml"/>
|
||||
<settings defaultResolver="default"/>
|
||||
+ <typedef name="xmvn" classname="org.fedoraproject.maven.connector.ivy.IvyResolver"/>
|
||||
<resolvers>
|
||||
- <ibiblio name="maven2" root="${repo.maven.org}"
|
||||
- pattern="${maven2.pattern.ext}" m2compatible="true"/>
|
||||
- <ibiblio name="jboss-maven2" root="${repo.jboss.org}"
|
||||
- pattern="${maven2.pattern.ext}" m2compatible="true"/>
|
||||
- <ibiblio name="sun-maven2" root="${repo.sun.org}"
|
||||
- pattern="${maven2.pattern.ext}" m2compatible="true"/>
|
||||
+ <xmvn name="XMvn"/>
|
||||
|
||||
<chain name="default" dual="true">
|
||||
- <resolver ref="maven2"/>
|
||||
- <resolver ref="jboss-maven2"/>
|
||||
- <resolver ref="sun-maven2"/>
|
||||
+ <resolver ref="XMvn"/>
|
||||
</chain>
|
||||
|
||||
</resolvers>
|
||||
diff --git a/src/contrib/build-contrib.xml b/src/contrib/build-contrib.xml
|
||||
index 0e57d08..708f64f 100644
|
||||
--- a/src/contrib/build-contrib.xml
|
||||
+++ b/src/contrib/build-contrib.xml
|
||||
@@ -103,7 +103,7 @@
|
||||
<mkdir dir="${ivy.lib}"/>
|
||||
<mkdir dir="${ivy.test.lib}"/>
|
||||
<condition property="ivy.jar.exists">
|
||||
- <available file="${lib.dir}/ivy-${ivy.version}.jar"/>
|
||||
+ <available file="/usr/share/java/ivy.jar"/>
|
||||
</condition>
|
||||
|
||||
<antcall target="init-contrib"/>
|
||||
@@ -219,9 +219,9 @@
|
||||
<!-- ====================================================== -->
|
||||
<target name="ivy-download" unless="ivy.jar.exists" depends="init">
|
||||
<delete dir="${lib.dir}"
|
||||
- includes="ivy-*.jar" excludes="ivy-${ivy.version}.jar"/>
|
||||
- <get src="${ivy.url}/${ivy.version}/ivy-${ivy.version}.jar"
|
||||
- dest="${lib.dir}/ivy-${ivy.version}.jar" usetimestamp="true"/>
|
||||
+ includes="ivy.jar" excludes="ivy.jar"/>
|
||||
+ <get src="${ivy.url}/ivy.jar"
|
||||
+ dest="${lib.dir}/ivy.jar" usetimestamp="true"/>
|
||||
</target>
|
||||
|
||||
<target name="ivy-init" depends="ivy-download" unless="ivy.initialized">
|
||||
diff --git a/src/contrib/build.xml b/src/contrib/build.xml
|
||||
index 7f7ba4f..701dfea 100644
|
||||
--- a/src/contrib/build.xml
|
||||
+++ b/src/contrib/build.xml
|
||||
@@ -20,7 +20,7 @@
|
||||
<project name="zookeepercontrib" default="compile" basedir=".">
|
||||
|
||||
<property name="contribfilesetincludes" value="*/build.xml" />
|
||||
- <property name="contribfilesetexcludes" value="" />
|
||||
+ <property name="contribfilesetexcludes" value="rest/build.xml" />
|
||||
|
||||
<fileset id="contribfileset" dir=".">
|
||||
<include name="${contribfilesetincludes}"/>
|
||||
20
zookeeper-3.4.6-server.patch
Normal file
20
zookeeper-3.4.6-server.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
diff --git a/bin/zkServer.sh b/bin/zkServer.sh
|
||||
index 0490982..b4766e5 100755
|
||||
--- a/bin/zkServer.sh
|
||||
+++ b/bin/zkServer.sh
|
||||
@@ -69,14 +69,7 @@ then
|
||||
ZOOCFG="$2"
|
||||
fi
|
||||
|
||||
-if $cygwin
|
||||
-then
|
||||
- ZOOCFG=`cygpath -wp "$ZOOCFG"`
|
||||
- # cygwin has a "kill" in the shell itself, gets confused
|
||||
- KILL=/bin/kill
|
||||
-else
|
||||
- KILL=kill
|
||||
-fi
|
||||
+KILL=kill
|
||||
|
||||
echo "Using config: $ZOOCFG" >&2
|
||||
|
||||
48
zookeeper-ZooInspector-template.pom
Normal file
48
zookeeper-ZooInspector-template.pom
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.zookeeper</groupId>
|
||||
<artifactId>zookeeper-ZooInspector</artifactId>
|
||||
<version>@version@</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.zookeeper</groupId>
|
||||
<artifactId>zookeeper</artifactId>
|
||||
<version>@version@</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>any</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>any</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>any</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.netty</groupId>
|
||||
<artifactId>netty</artifactId>
|
||||
<version>any</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jline</groupId>
|
||||
<artifactId>jline</artifactId>
|
||||
<version>any</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nitido</groupId>
|
||||
<artifactId>jtoaster</artifactId>
|
||||
<version>any</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>any</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
24
zookeeper.service
Normal file
24
zookeeper.service
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[Unit]
|
||||
Description=Apache ZooKeeper
|
||||
After=network.target
|
||||
ConditionPathExists=/etc/zookeeper/zoo.cfg
|
||||
ConditionPathExists=/etc/zookeeper/log4j.properties
|
||||
ConditionPathExists=/var/lib/zookeeper/data/myid
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
User=zookeeper
|
||||
SyslogIdentifier=zookeeper
|
||||
WorkingDirectory=/var/lib/zookeeper
|
||||
ExecStart=/usr/bin/zkServer.sh start zoo.cfg
|
||||
ExecStop=/usr/bin/zkServer.sh stop
|
||||
|
||||
User=root
|
||||
Group=root
|
||||
# TODO: check updated permissions.
|
||||
# Group=zookeeper
|
||||
Restart=always
|
||||
RestartSec=20
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
364
zookeeper.spec
Normal file
364
zookeeper.spec
Normal file
|
|
@ -0,0 +1,364 @@
|
|||
%global commit 601207e1151b2691112c431fc3b4130a85ac93b5
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
%global _hardened_build 1
|
||||
%global skiptests 1
|
||||
|
||||
Name: zookeeper
|
||||
Version: 3.4.6
|
||||
Release: 1%{?dist}
|
||||
Summary: A high-performance coordination service for distributed applications
|
||||
License: ASL 2.0 and BSD
|
||||
URL: http://zookeeper.apache.org/
|
||||
Source0: https://github.com/apache/zookeeper/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
|
||||
Source1: %{name}-ZooInspector-template.pom
|
||||
Source2: %{name}.service
|
||||
Source3: zkEnv.sh
|
||||
|
||||
Patch1: %{name}-3.4.5-zktreeutil-gcc.patch
|
||||
Patch2: %{name}-3.4.6-ivy-build.patch
|
||||
Patch3: %{name}-3.4.6-server.patch
|
||||
|
||||
# The native bits don't compile on ARM
|
||||
ExcludeArch: %{arm}
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: cppunit-devel
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: java-javadoc
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: log4cxx-devel
|
||||
BuildRequires: python-devel
|
||||
|
||||
BuildRequires: ant
|
||||
BuildRequires: ant-junit
|
||||
BuildRequires: apache-ivy
|
||||
BuildRequires: ivy-local
|
||||
BuildRequires: checkstyle
|
||||
BuildRequires: jline1
|
||||
BuildRequires: jtoaster
|
||||
BuildRequires: junit
|
||||
BuildRequires: jdiff
|
||||
%if 0%{?fedora} >= 21
|
||||
BuildRequires: mvn(org.slf4j:slf4j-log4j12)
|
||||
BuildRequires: javapackages-tools
|
||||
Requires: log4j12
|
||||
%else
|
||||
BuildRequires: mvn(log4j:log4j)
|
||||
Requires: log4j
|
||||
%endif
|
||||
|
||||
BuildRequires: json_simple
|
||||
|
||||
BuildRequires: mockito
|
||||
BuildRequires: netty3
|
||||
BuildRequires: slf4j
|
||||
BuildRequires: xerces-j2
|
||||
BuildRequires: xml-commons-apis
|
||||
|
||||
# remove later on.
|
||||
BuildRequires: apache-commons-parent
|
||||
BuildRequires: jetty-server
|
||||
BuildRequires: jetty-servlet
|
||||
BuildRequires: systemd
|
||||
|
||||
Requires: checkstyle
|
||||
Requires: jline1
|
||||
Requires: jtoaster
|
||||
Requires: junit
|
||||
Requires: mockito
|
||||
Requires: netty3
|
||||
Requires: slf4j
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
|
||||
%description
|
||||
ZooKeeper is a centralized service for maintaining configuration information,
|
||||
naming, providing distributed synchronization, and providing group services.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for the %{name} library
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Development files for the ZooKeeper C client library.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
BuildArch: noarch
|
||||
|
||||
%description javadoc
|
||||
This package contains javadoc for %{name}.
|
||||
|
||||
%package -n python-%{name}
|
||||
Summary: Python support for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Provides: zkpython%{?_isa} = %{version}-%{release}
|
||||
Requires: python2
|
||||
|
||||
%description -n python-%{name}
|
||||
The python-%{name} package contains Python bindings for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{commit}
|
||||
|
||||
%patch1 -p0
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
iconv -f iso8859-1 -t utf-8 src/c/ChangeLog > src/c/ChangeLog.conv && mv -f src/c/ChangeLog.conv src/c/ChangeLog
|
||||
sed -i 's/\r//' src/c/ChangeLog
|
||||
|
||||
sed -i 's|<exec executable="hostname" outputproperty="host.name"/>|<!--exec executable="hostname" outputproperty="host.name"/-->|' build.xml
|
||||
sed -i 's|<attribute name="Built-On" value="${host.name}" />|<attribute name="Built-On" value="${user.name}" />|' build.xml
|
||||
|
||||
sed -i 's@^dataDir=.*$@dataDir=%{_sharedstatedir}/zookeeper/data\ndataLogDir=%{_sharedstatedir}/zookeeper/log@' conf/zoo_sample.cfg
|
||||
|
||||
%build
|
||||
%ant -Divy.mode=local \
|
||||
-Dtarget.jdk=1.5 \
|
||||
-Djavadoc.link.java=%{_javadocdir}/java \
|
||||
-Dant.build.javac.source=1.5 \
|
||||
-Dant.build.javac.target=1.5 \
|
||||
package
|
||||
|
||||
pushd src/c
|
||||
autoreconf -if
|
||||
%configure --disable-static --disable-rpath
|
||||
%{__make} %{?_smp_mflags}
|
||||
popd
|
||||
|
||||
## TODO: install utilities?
|
||||
|
||||
%check
|
||||
%if %skiptests
|
||||
echo "Testing disabled, please enable in mock"
|
||||
%else
|
||||
%ant -Divy.mode=local test
|
||||
%endif
|
||||
|
||||
%install
|
||||
|
||||
# the following is used to update zkEnv.sh
|
||||
# find . -name "*.jar" -exec basename {} \; |sort|uniq
|
||||
# remove items that don't belong and update execute build-classpath
|
||||
|
||||
#install the c tools
|
||||
pushd src/c
|
||||
%make_install
|
||||
popd
|
||||
|
||||
# install the java dependencies.
|
||||
mkdir -p %{buildroot}%{_javadir}/%{name}
|
||||
install -pm 644 build/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar
|
||||
install -pm 644 build/%{name}-%{version}-test.jar %{buildroot}%{_javadir}/%{name}/%{name}-tests.jar
|
||||
install -pm 644 build/contrib/ZooInspector/%{name}-%{version}-ZooInspector.jar %{buildroot}%{_javadir}/%{name}/%{name}-ZooInspector.jar
|
||||
|
||||
install -pm 755 bin/zkCleanup.sh %{buildroot}%{_bindir}
|
||||
install -pm 755 bin/zkCli.sh %{buildroot}%{_bindir}
|
||||
install -pm 755 bin/zkServer.sh %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_libexecdir}
|
||||
install -pm 755 %{SOURCE3} %{buildroot}%{_libexecdir}
|
||||
|
||||
%if 0%{?fedora} >= 21
|
||||
mkdir -p %{buildroot}%{_datadir}/maven-metadata
|
||||
mkdir -p %{buildroot}%{_datadir}/maven-poms
|
||||
install -pm 644 build/%{name}-%{version}/dist-maven/%{name}-%{version}.pom %{buildroot}%{_datadir}/maven-poms/%{name}-%{name}.pom
|
||||
|
||||
%add_maven_depmap %{name}-%{name}.pom %{name}/%{name}.jar
|
||||
%add_maven_depmap org.apache.zookeeper:zookeeper::tests:%{version} %{name}/%{name}-tests.jar
|
||||
|
||||
install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/maven-poms/%{name}-%{name}-ZooInspector.pom
|
||||
sed -i "s|@version@|%{version}|" %{buildroot}%{_datadir}/maven-poms/%{name}-%{name}-ZooInspector.pom
|
||||
%add_maven_depmap %{name}-%{name}-ZooInspector.pom %{name}/%{name}-ZooInspector.jar
|
||||
%else
|
||||
mkdir -p %{buildroot}%{_mavenpomdir}
|
||||
install -pm 644 build/%{name}-%{version}/dist-maven/%{name}-%{version}.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}.pom
|
||||
|
||||
%add_maven_depmap JPP.%{name}-%{name}.pom %{name}/%{name}.jar
|
||||
%add_maven_depmap org.apache.zookeeper:zookeeper::tests:%{version} %{name}/%{name}-tests.jar
|
||||
|
||||
install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-ZooInspector.pom
|
||||
sed -i "s|@version@|%{version}|" %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-ZooInspector.pom
|
||||
%add_maven_depmap JPP.%{name}-%{name}-ZooInspector.pom %{name}/%{name}-ZooInspector.jar
|
||||
%endif
|
||||
|
||||
mkdir -p %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr build/docs/api/* %{buildroot}%{_javadocdir}/%{name}/
|
||||
|
||||
pushd src/contrib/zkpython
|
||||
%{__python} src/python/setup.py build --build-base=$PWD/build \
|
||||
install --root=%{buildroot} ;\
|
||||
chmod 0755 %{buildroot}%{python_sitearch}/zookeeper.so
|
||||
popd
|
||||
|
||||
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
||||
find %{buildroot} -name '*.a' -exec rm -f {} ';'
|
||||
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/zookeeper
|
||||
mkdir -p %{buildroot}%{_localstatedir}/log/zookeeper
|
||||
mkdir -p %{buildroot}%{_sharedstatedir}/zookeeper
|
||||
mkdir -p %{buildroot}%{_sharedstatedir}/zookeeper/data
|
||||
mkdir -p %{buildroot}%{_sharedstatedir}/zookeeper/log
|
||||
install -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}
|
||||
install -p -m 0640 conf/log4j.properties %{buildroot}%{_sysconfdir}/zookeeper
|
||||
install -p -m 0640 conf/zoo_sample.cfg %{buildroot}%{_sysconfdir}/zookeeper
|
||||
touch %{buildroot}%{_sysconfdir}/zookeeper/zoo.cfg
|
||||
touch %{buildroot}%{_sharedstatedir}/zookeeper/data/myid
|
||||
|
||||
%pre
|
||||
getent group zookeeper >/dev/null || groupadd -r zookeeper
|
||||
getent passwd zookeeper >/dev/null || \
|
||||
useradd -r -g zookeeper -d %{_sharedstatedir}/zookeeper -s /sbin/nologin \
|
||||
-c "ZooKeeper service account" zookeeper
|
||||
|
||||
%post
|
||||
%systemd_post zookeeper.service
|
||||
/sbin/ldconfig
|
||||
|
||||
%preun
|
||||
%systemd_preun zookeeper.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart zookeeper.service
|
||||
/sbin/ldconfig
|
||||
|
||||
%files
|
||||
%{_bindir}/cli_mt
|
||||
%{_bindir}/cli_st
|
||||
%{_bindir}/load_gen
|
||||
%{_bindir}/zk*.sh
|
||||
%{_libexecdir}/zkEnv.sh
|
||||
%{_libdir}/lib*.so.*
|
||||
%dir %{_javadir}/%{name}
|
||||
%{_javadir}/%{name}/%{name}.jar
|
||||
%{_javadir}/%{name}/%{name}-tests.jar
|
||||
%{_javadir}/%{name}/%{name}-ZooInspector.jar
|
||||
|
||||
%if 0%{?fedora} >= 21
|
||||
%{_datadir}/maven-poms/%{name}-%{name}.pom
|
||||
%{_datadir}/maven-poms/%{name}-%{name}-ZooInspector.pom
|
||||
%{_datadir}/maven-metadata/%{name}.xml
|
||||
%else
|
||||
%{_mavendepmapfragdir}/%{name}
|
||||
%{_mavenpomdir}/JPP.%{name}-%{name}.pom
|
||||
%{_mavenpomdir}/JPP.%{name}-%{name}-ZooInspector.pom
|
||||
%endif
|
||||
|
||||
%attr(0755,root,root) %dir %{_sysconfdir}/zookeeper
|
||||
%attr(0644,root,root) %ghost %config(noreplace) %{_sysconfdir}/zookeeper/zoo.cfg
|
||||
%attr(0644,root,root) %{_sysconfdir}/zookeeper/zoo_sample.cfg
|
||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/zookeeper/log4j.properties
|
||||
|
||||
%attr(0755,zookeeper,zookeeper) %dir %{_localstatedir}/log/zookeeper
|
||||
%attr(0755,root,root) %dir %{_sharedstatedir}/zookeeper
|
||||
%attr(0750,zookeeper,zookeeper) %dir %{_sharedstatedir}/zookeeper/data
|
||||
%attr(0640,zookeeper,zookeeper) %ghost %{_sharedstatedir}/zookeeper/data/myid
|
||||
%attr(0755,zookeeper,zookeeper) %dir %{_sharedstatedir}/zookeeper/log
|
||||
%{_unitdir}/zookeeper.service
|
||||
%doc CHANGES.txt LICENSE.txt NOTICE.txt README.txt
|
||||
|
||||
%files devel
|
||||
%{_includedir}/%{name}/
|
||||
%{_libdir}/*.so
|
||||
%doc src/c/LICENSE src/c/NOTICE.txt
|
||||
|
||||
%files javadoc
|
||||
%{_javadocdir}/%{name}
|
||||
%doc LICENSE.txt NOTICE.txt
|
||||
|
||||
%files -n python-%{name}
|
||||
%{python_sitearch}/ZooKeeper-?.?-py%{python_version}.egg-info
|
||||
%{python_sitearch}/zookeeper.so
|
||||
%doc LICENSE.txt NOTICE.txt src/contrib/zkpython/README
|
||||
|
||||
%changelog
|
||||
* Tue Oct 21 2014 Timothy St. Clair <tstclair@redhat.com> - 3.4.6-1
|
||||
- Update to latest stable series
|
||||
- Cleanup and overhaul package
|
||||
- Updated system integration
|
||||
|
||||
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.5-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.5-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 3.4.5-18
|
||||
- Rebuild for boost 1.55.0
|
||||
|
||||
* Mon Feb 24 2014 Timothy St. Clair <tstclair@redhat.com> - 3.4.5-17
|
||||
- Update due to cascading dependencies around java-headless
|
||||
|
||||
* Fri Jan 31 2014 Timothy St. Clair <tstclair@redhat.com> - 3.4.5-16
|
||||
- Update of tests.jar due to netty3 compat packaging conflicts
|
||||
|
||||
* Fri Jan 24 2014 Timothy St. Clair <tstclair@redhat.com> - 3.4.5-15
|
||||
- Update jline and netty3 for f21 builds
|
||||
|
||||
* Fri Oct 25 2013 Timothy St. Clair <tstclair@redhat.com> - 3.4.5-14
|
||||
- Update dependencies to jline1
|
||||
|
||||
* Wed Sep 18 2013 Timothy St. Clair <tstclair@redhat.com> - 3.4.5-13
|
||||
- Fixed the atomic patch which actually caused recursive crashing on zookeeper_close
|
||||
|
||||
* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 3.4.5-12
|
||||
- Rebuild for boost 1.54.0
|
||||
|
||||
* Tue Jul 30 2013 gil cattaneo <puntogil@libero.it> 3.4.5-11
|
||||
- fix changelog entries
|
||||
|
||||
* Mon Jul 22 2013 Timothy St. Clair <tstclair@redhat.com> - 3.4.5-10
|
||||
- update permissions to be in line with default policies
|
||||
|
||||
* Mon Jul 22 2013 gil cattaneo <puntogil@libero.it> 3.4.5-9
|
||||
- removed not needed %%defattr (only required for rpm < 4.4)
|
||||
- removed not needed Group fields (new package guideline)
|
||||
- fix directory ownership in java sub package
|
||||
|
||||
* Mon Jul 22 2013 Timothy St. Clair <tstclair@redhat.com> - 3.4.5-8
|
||||
- cleanup file ownership properties.
|
||||
|
||||
* Sat Jun 15 2013 Jeffrey C. Ollie <jeff@ocjtech.us> - 3.4.5-7
|
||||
- add server subpackage
|
||||
|
||||
* Fri Jun 14 2013 Dan Horák <dan[at]danny.cz> - 3.4.5-6
|
||||
- use fetch_and_add from GCC, fixes build on non-x86 arches
|
||||
|
||||
* Tue Jun 11 2013 gil cattaneo <puntogil@libero.it> 3.4.5-5
|
||||
- fixed zookeeper.so non-standard-executable-perm thanks to Björn Esser
|
||||
|
||||
* Tue Jun 11 2013 gil cattaneo <puntogil@libero.it> 3.4.5-4
|
||||
- enabled hardened-builds
|
||||
- fixed fully versioned dependency in subpackages (lib-devel and python)
|
||||
- fixed License tag
|
||||
- moved large documentation in lib-doc subpackage
|
||||
|
||||
* Sat Apr 27 2013 gil cattaneo <puntogil@libero.it> 3.4.5-3
|
||||
- built ZooInspector
|
||||
- added additional poms files
|
||||
|
||||
* Tue Apr 23 2013 gil cattaneo <puntogil@libero.it> 3.4.5-2
|
||||
- building/packaging of the zookeeper-test.jar thanks to Robert Rati
|
||||
|
||||
* Sun Dec 02 2012 gil cattaneo <puntogil@libero.it> 3.4.5-1
|
||||
- update to 3.4.5
|
||||
|
||||
* Tue Oct 30 2012 gil cattaneo <puntogil@libero.it> 3.4.4-3
|
||||
- fix missing hostname
|
||||
|
||||
* Fri Oct 12 2012 gil cattaneo <puntogil@libero.it> 3.4.4-2
|
||||
- add ant-junit as BR
|
||||
|
||||
* Fri Oct 12 2012 gil cattaneo <puntogil@libero.it> 3.4.4-1
|
||||
- update to 3.4.4
|
||||
|
||||
* Fri May 18 2012 gil cattaneo <puntogil@libero.it> 3.4.3-1
|
||||
- initial rpm
|
||||
Loading…
Add table
Add a link
Reference in a new issue