Update to 3.4.9; CVE-2016-5017 (bz#1377281)

This commit is contained in:
Christopher Tubbs 2016-12-21 21:27:13 -05:00
parent 6bf81fc7b4
commit b5809e5b24
9 changed files with 119 additions and 300 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/zookeeper-3.4.5.tar.gz
/zookeeper-3.4.6-601207e.tar.gz
/zookeeper-3.4.9.tar.gz

View File

@ -0,0 +1,47 @@
diff --git a/src/pom.template b/src/pom.template
new file mode 100644
index 0000000..a02c0b3
--- /dev/null
+++ b/src/pom.template
@@ -0,0 +1,41 @@
+SKIP_LINE ***************************************************************
+SKIP_LINE * Licensed to the Apache Software Foundation (ASF) under one
+SKIP_LINE * or more contributor license agreements. See the NOTICE file
+SKIP_LINE * distributed with this work for additional information
+SKIP_LINE * regarding copyright ownership. The ASF licenses this file
+SKIP_LINE * to you under the Apache License, Version 2.0 (the
+SKIP_LINE * "License"); you may not use this file except in compliance
+SKIP_LINE * with the License. You may obtain a copy of the License at
+SKIP_LINE *
+SKIP_LINE * http://www.apache.org/licenses/LICENSE-2.0
+SKIP_LINE *
+SKIP_LINE * Unless required by applicable law or agreed to in writing,
+SKIP_LINE * software distributed under the License is distributed on an
+SKIP_LINE * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+SKIP_LINE * KIND, either express or implied. See the License for the
+SKIP_LINE * specific language governing permissions and limitations
+SKIP_LINE * under the License.
+SKIP_LINE ***************************************************************
+<?xml version="1.0" encoding="UTF-8"?>
+${ivy.pom.license}
+${ivy.pom.header}
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>${ivy.pom.groupId}</groupId>
+ <artifactId>${ivy.pom.artifactId}</artifactId>
+ <packaging>${ivy.pom.packaging}</packaging>
+ <version>${ivy.pom.version}</version>
+ <name>${ivy.pom.name}</name>
+ <description>${ivy.pom.description}</description>
+ <url>${ivy.pom.url}</url>
+
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+</project>

View File

@ -1,8 +1,8 @@
Index: src/c/src/mt_adaptor.c
===================================================================
--- src/c/src/mt_adaptor.c (revision 1447974)
+++ src/c/src/mt_adaptor.c (working copy)
@@ -484,25 +484,9 @@
diff --git a/src/c/src/mt_adaptor.c b/src/c/src/mt_adaptor.c
index 7dc7878..1b18ac6 100644
--- a/src/c/src/mt_adaptor.c
+++ b/src/c/src/mt_adaptor.c
@@ -483,25 +483,9 @@ int32_t inc_ref_counter(zhandle_t* zh,int i)
int32_t fetch_and_add(volatile int32_t* operand, int incr)
{
#ifndef WIN32

View File

@ -1 +1 @@
623bfbaa0efbd2cc196fe06ea9f85566 zookeeper-3.4.6-601207e.tar.gz
SHA512 (zookeeper-3.4.9.tar.gz) = 4f3e003c6ce5e3338f642f7deaa0fd2cfd1b30591d3ed4fe880492dded6c4bf01d30483e28f3a38b43bb6d2696ff4d819fc9577733224cec07e236437e88a657

View File

@ -1,27 +0,0 @@
--- 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

View File

@ -1,5 +1,5 @@
--- 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
--- a/src/contrib/zktreeutil/src/ZkAdaptor.h 2012-09-30 19:53:32.000000000 +0200
+++ b/src/contrib/zktreeutil/src/ZkAdaptor.h 2013-04-04 03:37:46.731950855 +0200
@@ -21,6 +21,7 @@
#include <string>

View File

@ -1,5 +1,5 @@
diff --git a/build.xml b/build.xml
index 442d52e..bc1f4a2 100644
index 8562000..7975f13 100644
--- a/build.xml
+++ b/build.xml
@@ -257,7 +257,7 @@ xmlns:maven="antlib:org.apache.maven.artifact.ant">
@ -25,7 +25,7 @@ index 442d52e..bc1f4a2 100644
<target name="ivy-taskdef" unless="ivy.initialized">
diff --git a/ivy.xml b/ivy.xml
index 561832a..93176d5 100644
index 95b0e5a..0ea5c4d 100644
--- a/ivy.xml
+++ b/ivy.xml
@@ -46,10 +46,10 @@
@ -37,18 +37,20 @@ index 561832a..93176d5 100644
+ <dependency org="log4j" name="log4j" rev="1.2.17" transitive="false" conf="default"/>
+ <dependency org="jline" name="jline" rev="1.0" transitive="false" conf="default"/>
- <dependency org="io.netty" name="netty" conf="default" rev="3.7.0.Final">
- <dependency org="io.netty" name="netty" conf="default" rev="3.10.5.Final">
+ <dependency org="io.netty" name="netty" conf="default" rev="3.9.3.Final">
<artifact name="netty" type="jar" conf="default"/>
</dependency>
@@ -58,12 +58,12 @@
@@ -58,14 +58,14 @@
<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="commons-collections" name="commons-collections"
rev="3.2.2" conf="test->default"/>
- <dependency org="jdiff" name="jdiff" rev="1.0.9"
+ <dependency org="jdiff" name="jdiff" rev="1.1.1"
@ -96,7 +98,7 @@ index 52cfa52..595dd4c 100644
</resolvers>
diff --git a/src/contrib/build-contrib.xml b/src/contrib/build-contrib.xml
index 0e57d08..708f64f 100644
index fab8a5f..80518a8 100644
--- a/src/contrib/build-contrib.xml
+++ b/src/contrib/build-contrib.xml
@@ -103,7 +103,7 @@
@ -136,10 +138,10 @@ index 7f7ba4f..701dfea 100644
<include name="${contribfilesetincludes}"/>
diff --git a/src/contrib/rest/build.xml b/src/contrib/rest/build.xml
deleted file mode 100644
index 649dff7..0000000
index fb628bc..0000000
--- a/src/contrib/rest/build.xml
+++ /dev/null
@@ -1,167 +0,0 @@
@@ -1,183 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
@ -190,6 +192,22 @@ index 649dff7..0000000
- </sequential>
- </macrodef>
-
- <target name="package" depends="jar" unless="skip.contrib">
- <echo message="contrib: ${name}"/>
- <mkdir dir="${dist.dir}${package.share}/contrib/${name}"/>
- <copy todir="${dist.dir}${package.share}/contrib/${name}">
- <fileset dir="${build.dir}">
- <include name="zookeeper-${version}-${name}.jar" />
- </fileset>
- </copy>
- <copy todir="${dist.dir}${package.share}/contrib/${name}/lib">
- <fileset dir="${build.dir}/lib" />
- </copy>
- <copy todir="${dist.dir}${package.share}/contrib/${name}/conf">
- <fileset dir="conf" />
- </copy>
- </target>
-
- <target name="setjarname">
- <property name="jarname"
- value="${build.dir}/zookeeper-${version}-${name}.jar"/>
@ -361,245 +379,29 @@ index 903d390..0000000
- </dependencies>
-
-</ivy-module>
diff --git a/src/contrib/rest/oldbuild._xml b/src/contrib/rest/oldbuild._xml
new file mode 100644
index 0000000..649dff7
--- /dev/null
+++ b/src/contrib/rest/oldbuild._xml
@@ -0,0 +1,167 @@
+<?xml version="1.0"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project name="rest" default="jar">
+ <import file="../build-contrib.xml"/>
+
+ <property name="test.build.dir" value="${build.test}" />
+ <property name="test.src.dir" value="src/test"/>
+ <property name="test.log.dir" value="${test.build.dir}/logs" />
+ <property name="test.data.dir" value="${test.build.dir}/data" />
+ <property name="test.data.upgrade.dir" value="${test.data.dir}/upgrade" />
+ <property name="test.tmp.dir" value="${test.build.dir}/tmp" />
+ <property name="test.output" value="no" />
+ <property name="test.timeout" value="900000" />
+ <property name="test.junit.output.format" value="plain" />
+ <property name="test.junit.fork.mode" value="perTest" />
+ <property name="test.junit.printsummary" value="yes" />
+ <property name="test.junit.haltonfailure" value="no" />
+ <property name="test.junit.maxmem" value="512m" />
+
+ <!-- ====================================================== -->
+ <!-- Macro definitions -->
+ <!-- ====================================================== -->
+ <macrodef name="macro_tar" description="Worker Macro for tar">
+ <attribute name="param.destfile"/>
+ <element name="param.listofitems"/>
+ <sequential>
+ <tar compression="gzip" longfile="gnu"
+ destfile="@{param.destfile}">
+ <param.listofitems/>
+ </tar>
+ </sequential>
+ </macrodef>
+
+ <target name="setjarname">
+ <property name="jarname"
+ value="${build.dir}/zookeeper-${version}-${name}.jar"/>
+ </target>
+
+ <target name="compile" depends="ivy-retrieve,zookeeperbuildcontrib.compile"/>
+
+ <target name="test"
+ depends="compile-test,test-init,test-category,test-start,junit.run,test-stop" />
+
+ <target name="compile-test" depends="ivy-retrieve-test,compile">
+ <property name="target.jdk" value="${ant.java.version}" />
+ <property name="src.test.local" location="${basedir}/src/test" />
+ <mkdir dir="${build.test}"/>
+ <javac srcdir="${src.test.local}"
+ destdir="${build.test}"
+ target="${target.jdk}"
+ debug="on" >
+ <classpath refid="classpath" />
+ </javac>
+ </target>
+
+ <target name="test-init" depends="jar,compile-test">
+ <delete dir="${test.log.dir}" />
+ <delete dir="${test.tmp.dir}" />
+ <delete dir="${test.data.dir}" />
+ <mkdir dir="${test.log.dir}" />
+ <mkdir dir="${test.tmp.dir}" />
+ <mkdir dir="${test.data.dir}" />
+ </target>
+
+ <target name="test-start">
+ <exec executable="${test.src.dir}/zkServer.sh">
+ <arg value="startClean"/>
+ </exec>
+ </target>
+
+ <target name="test-stop">
+ <exec executable="${test.src.dir}/zkServer.sh">
+ <arg value="stop"/>
+ </exec>
+ </target>
+
+ <target name="test-category">
+ <property name="test.category" value=""/>
+ </target>
+
+ <target name="junit.run">
+ <echo message="${test.src.dir}" />
+ <junit showoutput="${test.output}"
+ printsummary="${test.junit.printsummary}"
+ haltonfailure="${test.junit.haltonfailure}"
+ fork="yes"
+ forkmode="${test.junit.fork.mode}"
+ maxmemory="${test.junit.maxmem}"
+ dir="${basedir}" timeout="${test.timeout}"
+ errorProperty="tests.failed" failureProperty="tests.failed">
+ <sysproperty key="build.test.dir" value="${test.tmp.dir}" />
+ <sysproperty key="test.data.dir" value="${test.data.dir}" />
+ <sysproperty key="log4j.configuration"
+ value="file:${basedir}/conf/log4j.properties" />
+ <classpath refid="classpath"/>
+ <classpath>
+ <pathelement path="${build.test}" />
+ </classpath>
+ <formatter type="${test.junit.output.format}" />
+ <batchtest todir="${test.log.dir}" unless="testcase">
+ <fileset dir="${test.src.dir}"
+ includes="**/*${test.category}Test.java"/>
+ </batchtest>
+ <batchtest todir="${test.log.dir}" if="testcase">
+ <fileset dir="${test.src.dir}" includes="**/${testcase}.java"/>
+ </batchtest>
+ </junit>
+ <fail if="tests.failed">Tests failed!</fail>
+ </target>
+
+ <target name="jar" depends="checkMainCompiled, setjarname, compile">
+ <echo message="contrib: ${name}"/>
+ <jar jarfile="${jarname}">
+ <fileset file="${zk.root}/LICENSE.txt" />
+ <fileset dir="${build.classes}"/>
+ <fileset dir="${build.test}"/>
+ </jar>
+ </target>
+
+ <target name="run" depends="jar">
+ <echo message="contrib: ${name}"/>
+ <java classname="org.apache.zookeeper.server.jersey.RestMain" fork="true">
+ <classpath>
+ <pathelement path="${jarname}" />
+ <fileset dir="${build.dir}/lib" includes="*.jar"/>
+ <fileset dir="${zk.root}/build" includes="zookeeper-*.jar"/>
+ <pathelement path="${zk.root}/src/contrib/${name}/conf" />
+ <fileset dir="${zk.root}/src/java/lib">
+ <include name="**/*.jar" />
+ </fileset>
+ </classpath>
+ </java>
+ </target>
+
+ <target name="tar" depends="clean, jar">
+ <echo message="building tar.gz: ${name}" />
+ <macro_tar param.destfile="${build.dir}/zookeeper-${version}-${name}.tar.gz">
+ <param.listofitems>
+ <tarfileset dir="${build.dir}/lib" prefix="lib" includes="**/*.jar" />
+ <tarfileset file="${build.dir}/zookeeper-*-rest.jar" />
+ <tarfileset dir="${zk.root}/build" includes="zookeeper-*.jar" prefix="lib" />
+ <tarfileset dir="${zk.root}/src/contrib/${name}/conf" prefix="conf" />
+ <tarfileset dir="${zk.root}/src/java/lib" prefix="lib" includes="**/*.jar" />
+ <tarfileset file="${zk.root}/src/contrib/${name}/rest.sh" />
+ </param.listofitems>
+ </macro_tar>
+ </target>
+
+</project>
+
diff --git a/src/contrib/rest/oldivy._xml b/src/contrib/rest/oldivy._xml
new file mode 100644
index 0000000..903d390
--- /dev/null
+++ b/src/contrib/rest/oldivy._xml
@@ -0,0 +1,48 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<ivy-module version="2.0"
+ xmlns:e="http://ant.apache.org/ivy/extra">
+
+ <info organisation="org.apache.zookeeper"
+ module="${name}" revision="${version}">
+ <license name="Apache 2.0"/>
+ <ivyauthor name="Apache ZooKeeper" url="http://zookeeper.apache.org"/>
+ <description>ZooKeeper REST</description>
+ </info>
+
+ <configurations defaultconfmapping="default">
+ <conf name="default"/>
+ <conf name="test"/>
+ </configurations>
+
+ <dependencies>
+ <dependency org="org.slf4j" name="slf4j-api" rev="1.6.1"/>
+ <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.1" transitive="false"/>
+
+ <!-- transitive false turns off dependency checking, log4j deps seem borked -->
+ <dependency org="log4j" name="log4j" rev="1.2.15" transitive="false"/>
+ <dependency org="asm" name="asm" rev="3.1" />
+ <dependency org="com.sun.grizzly" name="grizzly-servlet-webserver" rev="1.9.8" />
+ <dependency org="com.sun.jersey" name="jersey-server" rev="1.1.5.1" />
+ <dependency org="com.sun.jersey" name="jersey-json" rev="1.1.5.1" />
+
+ <dependency org="junit" name="junit" rev="4.8.1" conf="test->default"/>
+ <dependency org="com.sun.jersey" name="jersey-client" rev="1.1.5.1" conf="test->default"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/src/contrib/loggraph/ivy.xml b/src/contrib/loggraph/ivy.xml
index d6fa9d6..fdcc35f 100644
--- a/src/contrib/loggraph/ivy.xml
+++ b/src/contrib/loggraph/ivy.xml
@@ -35,7 +35,7 @@
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.1" transitive="false"/>
<!-- transitive false turns off dependency checking, log4j deps seem borked -->
- <dependency org="log4j" name="log4j" rev="1.2.15" transitive="false"/>
+ <dependency org="log4j" name="log4j" rev="1.2.17" transitive="false"/>
<dependency org="org.eclipse.jetty" name="jetty-server" rev="7.0.1.v20091125" />
<dependency org="org.eclipse.jetty" name="jetty-servlet" rev="7.0.1.v20091125" />
<dependency org="com.googlecode.json-simple" name="json-simple" rev="1.1" />
diff --git a/src/contrib/zooinspector/ivy.xml b/src/contrib/zooinspector/ivy.xml
index 4e5107e..ac71a9b 100644
index bc02946..cb4061f 100644
--- a/src/contrib/zooinspector/ivy.xml
+++ b/src/contrib/zooinspector/ivy.xml
@@ -42,7 +42,7 @@
<dependency org="commons-lang" name="commons-lang"
rev="2.4" conf="releaseaudit->default"/>
<dependency org="commons-collections" name="commons-collections"
- rev="3.1" conf="releaseaudit->default"/>
+ rev="3.2.1" conf="releaseaudit->default"/>
</dependencies>
-</ivy-module>
\ No newline at end of file
+</ivy-module>
@@ -35,7 +35,7 @@
<dependency org="org.slf4j" name="slf4j-api" rev="1.6.1"/>
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.1" transitive="false"/>
- <dependency org="log4j" name="log4j" rev="1.2.15" transitive="false"/>
+ <dependency org="log4j" name="log4j" rev="1.2.17" transitive="false"/>
<dependency org="junit" name="junit" rev="4.7" conf="test->default"/>
<dependency org="org.apache.rat" name="apache-rat-tasks"
rev="0.6" conf="releaseaudit->default"/>

View File

@ -1,8 +1,8 @@
diff --git a/bin/zkServer.sh b/bin/zkServer.sh
index 0490982..b4766e5 100755
index 51dbe9f..bc9be90 100755
--- a/bin/zkServer.sh
+++ b/bin/zkServer.sh
@@ -69,14 +69,7 @@ then
@@ -92,14 +92,7 @@ then
ZOOCFG="$2"
fi

View File

@ -1,25 +1,24 @@
%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: 17%{?dist}
Version: 3.4.9
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
URL: https://zookeeper.apache.org/
Source0: https://www.apache.org/dist/%{name}/%{name}-%{version}.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
# patch accepted in 3.5.0
Patch4: https://issues.apache.org/jira/secure/attachment/12570030/mt_adaptor.c.patch
Patch2: %{name}-3.4.9-ivy-build.patch
Patch3: %{name}-3.4.9-server.patch
# ZOOKEEPER-1643; patch accepted in 3.5.0
Patch4: mt_adaptor.c.patch
Patch5: 0001-cppunit-config-no-longer-exists-use-pkg-config.patch
Patch6: missing-pom.template.patch
BuildRequires: autoconf
@ -122,13 +121,7 @@ Requires: python2
The python-%{name} package contains Python bindings for %{name}.
%prep
%setup -q -n %{name}-%{commit}
%patch1 -p0
%patch2 -p1
%patch3 -p1
%patch4 -p0 -F2
%patch5 -p1
%autosetup -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
@ -309,6 +302,9 @@ getent passwd zookeeper >/dev/null || \
%doc LICENSE.txt NOTICE.txt src/contrib/zkpython/README
%changelog
* Thu Dec 22 2016 Christopher Tubbs <ctubbsii@fedoraproject.org> - 3.4.9-1
- Update to 3.4.9; CVE-2016-5017 (bz#1377281)
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.6-17
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages