Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
24ab9a762e
!36 [sync] PR-35: fix CVE-2024-23454
From: @openeuler-sync-bot 
Reviewed-by: @wenwj0 
Signed-off-by: @wenwj0
2024-10-22 08:05:51 +00:00
fandeyuan
2570e299be fix CVE-2024-23454
(cherry picked from commit 11d1878c74cf8771a2e4051e8bf3989bcef4ff8b)
2024-10-19 23:11:38 +08:00
openeuler-ci-bot
bb7f4568fd
!33 [sync] PR-32: Fix build on riscv64
From: @openeuler-sync-bot 
Reviewed-by: @wenwj0 
Signed-off-by: @wenwj0
2024-06-06 14:07:26 +00:00
Dingli Zhang
32d6288812 Fix build on riscv64
(cherry picked from commit 54bc4b7f7cd071a90722f069d3b0c710c0ea9ba7)
2024-05-28 22:08:58 +08:00
openeuler-ci-bot
137c9786a3
!30 【WIP】【LLVM平行宇宙】Support build with clang
From: @luofeng14 
Reviewed-by: @wenwj0 
Signed-off-by: @wenwj0
2023-12-15 01:28:46 +00:00
lf14
4d25f3f671 support clang build 2023-10-12 09:46:10 +08:00
openeuler-ci-bot
7b87c97646
!29 修复gcc12构建失败问题
From: @wenwj0 
Reviewed-by: @macchen1 
Signed-off-by: @macchen1
2023-07-24 02:02:30 +00:00
Weijian
c73bf6b88c compatible with gcc12 2023-07-21 17:23:29 +08:00
Weijian
e8e283f382 compatible with gcc12 2023-07-21 17:11:40 +08:00
openeuler-ci-bot
f3afad8e14
!28 [合规提升]spec文件的License声明有歧义
From: @YixiongChen 
Reviewed-by: @wuzeyi1 
Signed-off-by: @wuzeyi1
2022-08-08 09:04:52 +00:00
chenyx2012
1af5349667
update hadoop-3.1.spec. 2022-06-15 02:52:18 +00:00
5 changed files with 135 additions and 3 deletions

View File

@ -0,0 +1,10 @@
--- hadoop-3.1.4-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/CMakeLists.txt 2020-07-21 01:17:58.000000000 +0800
+++ hadoop-3.1.4-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/CMakeLists.txt 2023-07-21 16:33:10.948752821 +0800
@@ -27,6 +27,7 @@
# Add extra compiler and linker flags.
# -Wno-sign-compare
hadoop_add_compiler_flags("-DNDEBUG -DSIMPLE_MEMCPY -fno-strict-aliasing -fsigned-char")
+set(CMAKE_CXX_STANDARD 11)
# Source location.
set(SRC main/native)

View File

@ -0,0 +1,20 @@
--- hadoop-3.1.4-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/primitives.h.ori 2020-07-21 01:17:58.000000000 +0800
+++ hadoop-3.1.4-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/primitives.h 2022-09-03 12:43:35.309454600 +0800
@@ -99,6 +99,8 @@
inline uint32_t bswap(uint32_t val) {
#ifdef __aarch64__
__asm__("rev %w[dst], %w[src]" : [dst]"=r"(val) : [src]"r"(val));
+#elif defined(__ppc64__)||(__PPC64__)||(__powerpc64__)||(__riscv)
+ return __builtin_bswap32(val);
#else
__asm__("bswap %0" : "=r" (val) : "0" (val));
#endif
@@ -108,6 +110,8 @@
inline uint64_t bswap64(uint64_t val) {
#ifdef __aarch64__
__asm__("rev %[dst], %[src]" : [dst]"=r"(val) : [src]"r"(val));
+#elif defined(__ppc64__)||(__PPC64__)||(__powerpc64__)||(__riscv)
+ return __builtin_bswap64(val);
#else
#ifdef __X64
__asm__("bswapq %0" : "=r" (val) : "0" (val));

View File

@ -0,0 +1,11 @@
--- hadoop-3.1.4-src/hadoop-project/pom.xml.ori 2020-07-21 14:34:40.000000000 +0800
+++ hadoop-3.1.4-src/hadoop-project/pom.xml 2022-08-26 13:33:06.382209900 +0800
@@ -85,7 +85,7 @@
<!-- Maven protoc compiler -->
<protobuf-maven-plugin.version>0.5.1</protobuf-maven-plugin.version>
- <os-maven-plugin.version>1.5.0.Final</os-maven-plugin.version>
+ <os-maven-plugin.version>1.7.1</os-maven-plugin.version>
<zookeeper.version>3.4.13</zookeeper.version>
<curator.version>2.13.0</curator.version>

View File

@ -0,0 +1,58 @@
From 7c30e7ffb65f9a58a85b3b556f8c0de04c1b4b20 Mon Sep 17 00:00:00 2001
From: He Xiaoqiao <hexiaoqiao@apache.org>
Date: Mon, 15 Jan 2024 16:01:08 +0800
Subject: [PATCH] HADOOP-19031. Enhance access control for RunJar.
---
.../java/org/apache/hadoop/util/RunJar.java | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
index 239d464..20c2d13 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
@@ -28,10 +28,15 @@ import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
+import java.nio.file.Files;
+import java.nio.file.attribute.FileAttribute;
+import java.nio.file.attribute.PosixFilePermission;
+import java.nio.file.attribute.PosixFilePermissions;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.List;
+import java.util.Set;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.JarInputStream;
@@ -278,20 +283,18 @@ public class RunJar {
final File workDir;
try {
- workDir = File.createTempFile("hadoop-unjar", "", tmpDir);
- } catch (IOException ioe) {
+ FileAttribute<Set<PosixFilePermission>> perms = PosixFilePermissions
+ .asFileAttribute(PosixFilePermissions.fromString("rwx------"));
+ workDir = Files.createTempDirectory(tmpDir.toPath(), "hadoop-unjar", perms).toFile();
+ } catch (IOException | SecurityException e) {
// If user has insufficient perms to write to tmpDir, default
// "Permission denied" message doesn't specify a filename.
System.err.println("Error creating temp dir in java.io.tmpdir "
- + tmpDir + " due to " + ioe.getMessage());
+ + tmpDir + " due to " + e.getMessage());
System.exit(-1);
return;
}
- if (!workDir.delete()) {
- System.err.println("Delete failed for " + workDir);
- System.exit(-1);
- }
ensureDirectory(workDir);
ShutdownHookManager.get().addShutdownHook(
--
2.43.0

View File

@ -12,11 +12,11 @@
%define _binaries_in_noarch_packages_terminate_build 0
Name: hadoop-3.1
Version: 3.1.4
Release: 4
Release: 9
Summary: A software platform for processing vast amounts of data
# The BSD license file is missing
# https://issues.apache.org/jira/browse/HADOOP-9849
License: Apache-2.0 and MIT and BSD-2-Clause and EPL and Zlib and MPL-2.0
License: Apache-2.0 and MIT and BSD-2-Clause and EPL-1.0 and Zlib and MPL-2.0
URL: https://%{real_name}.apache.org
Source0: https://www.apache.org/dist/%{real_name}/core/%{real_name}-%{version}/%{real_name}-%{version}-src.tar.gz
Source1: %{real_name}-layout.sh
@ -35,7 +35,10 @@ Source13: %{real_name}-yarn-site.xml
Patch1: 0001-sys_errlist-undeclared.patch
Patch2: 0002-bugfix-invalid-variable-name.patch
Patch3: 0003-compatible-with-gcc12.patch
Patch4: 0004-fix_build_issue_on_riscv.patch
Patch5: 0005-upgrade_os-maven_plugin_to_1.7.1.patch
Patch6: 0006-Enhance-access-control-for-RunJar.patch
BuildRoot: %{_tmppath}/%{real_name}-%{version}-%{release}-root
BuildRequires: java-1.8.0-openjdk-devel maven hostname maven-local tomcat cmake snappy openssl-devel
@ -243,6 +246,9 @@ This package contains files needed to run Apache Hadoop YARN in secure mode.
%prep
%autosetup -p1 -n %{real_name}-%{version}-src
mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=2.5.0 -Dclassifier=linux-aarch_64 -Dpackaging=exe -Dfile=/usr/bin/protoc
%ifarch riscv64
mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=2.5.0 -Dclassifier=linux-riscv64 -Dpackaging=exe -Dfile=/usr/bin/protoc
%endif
mvn install:install-file -DgroupId=org.fusesource.leveldbjni -DartifactId=leveldbjni-all -Dversion=1.8 -Dpackaging=jar -Dfile=/usr/lib/java/leveldbjni-all.jar
mvn install:install-file -DgroupId=org.fusesource.leveldbjni -DartifactId=leveldbjni -Dversion=1.8 -Dpackaging=jar -Dfile=/usr/lib/java/leveldbjni/leveldbjni.jar
mvn install:install-file -DgroupId=org.iq80.leveldb -DartifactId=leveldb-api -Dversion=0.7 -Dpackaging=jar -Dfile=/usr/share/java/leveldb-java/leveldb-api.jar
@ -298,6 +304,17 @@ mvn install:install-file -DgroupId=orn.fusesource.hawtjni -DartifactId=hawtjni-r
%mvn_file :%{real_name}-common::tests: %{real_name}/%{real_name}-common
%build
if [[ "%{?toolchain}" == "clang" ]]
then
export CXXFLAGS="$CXXFLAGS -mcpu=generic+Crc -Wno-reserved-user-defined-literal"
export CFLAGS="$CFLAGS -mcpu=generic+Crc -Wno-reserved-user-defined-literal"
fi
%ifarch riscv64
export MAVEN_OPTS="-Xms2048M -Xmx8000M"
function keepalive() { while true; do date; sleep 3600; done }
keepalive &
%endif
mvn -Dsnappy.lib=/usr/lib64 -Dbundle.snappy -Dcontainer-executor.conf.dir=%{_sysconfdir}/%{real_name} -Pdist,native -DskipTests -DskipIT -Dmaven.javadoc.skip=true package
%install
@ -1113,6 +1130,22 @@ fi
%config(noreplace) %{_sysconfdir}/%{real_name}/container-executor.cfg
%changelog
* Mon Oct 14 2024 Deyuan Fan <fandeyuan@kylinos.cn> - 3.1.4-9
- fix CVE-2024-23454
* Sun May 12 2024 Dingli Zhang <dingli@iscas.ac.cn> - 3.1.4-8
- Fix build on riscv64
- Upgrade os-maven-plugin to 1.7.1
* Wed Oct 11 2023 luofeng <luofeng13@huawei.com> - 3.1.4-7
- support clang build
* Fri Jul 21 2023 wenweijian <wenweijian2@huawei.com> - 3.1.4-6
- compatiable with gcc12
* Wed Jun 15 2022 Chenyx <chenyixiong3@huawei.com> - 3.1.4-5
- License compliance rectification
* Mon Jul 12 2021 lingsheng <lingsheng@huawei.com> - 3.1.4-4
- Fix stop service failure