已开启
Use nodejs-18 to enable webui for riscv64 #64
Dingli Zhang创建于 2025年1月17日
Use nodejs-18 to enable webui for riscv64 #64
已开启
Dingli Zhang创建于 2025年1月17日
从refs/pull/64/head合入到master
共 4 个文件变更+55-15
@@ -0,0 +1,31 @@
1+From d193fc6f8a272c661ba4b0603b01ef0d36185812 Mon Sep 17 00:00:00 2001
2+From: Dingli Zhang <dingli@iscas.ac.cn>
3+Date: Sun, 5 May 2024 11:27:18 +0800
4+Subject: [PATCH] Add RISC-V support for frontend-maven-plugin
5+ 
6+ 
7+diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/Platform.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/Platform.java
8+index 3bdb029..2f82c1e 100644
9+--- a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/Platform.java
10++++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/Platform.java
11+@@ -2,7 +2,7 @@ package com.github.eirslett.maven.plugins.frontend.lib;
12+
13+ import java.io.File;
14+
15+-enum Architecture { x86, x64, ppc64le, s390x, arm64, armv7l;
16++enum Architecture { x86, x64, ppc64le, s390x, arm64, armv7l, riscv64;
17+ public static Architecture guess(){
18+ String arch = System.getProperty("os.arch");
19+ String version = System.getProperty("os.version");
20+@@ -15,6 +15,8 @@ enum Architecture { x86, x64, ppc64le, s390x, arm64, armv7l;
21+ return s390x;
22+ } else if (arch.equals("arm") && version.contains("v7")) {
23+ return armv7l;
24++ } else if (arch.equals("riscv64")) {
25++ return riscv64;
26+ } else {
27+ return arch.contains("64") ? x64 : x86;
28+ }
29+--
30+2.41.0
31+ 
Mflink.spec+24-15
@@ -11,7 +11,7 @@
11 11 
12Name: flink12Name: flink
13Version: 1.17.113Version: 1.17.1
14-Release: 514+Release: 6
15Summary: Stateful Computations over Data Streams15Summary: Stateful Computations over Data Streams
16License: Apache License v2.016License: Apache License v2.0
17URL: https://github.com/apache/%{name}17URL: https://github.com/apache/%{name}
@@ -24,6 +24,8 @@ Source6: npm-8.1.2.tar.gz
24Source7: https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.7.tar.gz24Source7: https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.7.tar.gz
25Source8: https://github.com/os72/protoc-jar/archive/refs/tags/v3.11.4.tar.gz25Source8: https://github.com/os72/protoc-jar/archive/refs/tags/v3.11.4.tar.gz
26Source9: https://github.com/os72/protoc-jar-maven-plugin/archive/refs/tags/v3.11.4.zip26Source9: https://github.com/os72/protoc-jar-maven-plugin/archive/refs/tags/v3.11.4.zip
27+Source10: https://github.com/eirslett/frontend-maven-plugin/archive/refs/tags/frontend-plugins-1.11.0.tar.gz
28+Source11: https://unofficial-builds.nodejs.org/download/release/v18.0.0/node-v18.0.0-linux-riscv64.tar.gz
27 29 
28Patch0: 0001-add-npm.hw-repo.patch30Patch0: 0001-add-npm.hw-repo.patch
29Patch1: 0002-fix-compilation-failure.patch31Patch1: 0002-fix-compilation-failure.patch
@@ -32,6 +34,7 @@ Patch3: 0004-update-npm.hw-repo.patch
32Patch4: 0005-upgrade-os-maven-plugin-to-1.7.1.patch34Patch4: 0005-upgrade-os-maven-plugin-to-1.7.1.patch
33Patch1000: 1000-Add-protoc-java-support-for-riscv64.patch35Patch1000: 1000-Add-protoc-java-support-for-riscv64.patch
34Patch1001: 1001-Added-support-for-building-the-riscv64-protoc-binari.patch36Patch1001: 1001-Added-support-for-building-the-riscv64-protoc-binari.patch
37+Patch1002: 1002-Add-RISC-V-support-for-frontend-maven-plugin.patch
35BuildRequires: java-1.8.0-openjdk-devel maven npm38BuildRequires: java-1.8.0-openjdk-devel maven npm
36Requires: java-1.8.0-openjdk39Requires: java-1.8.0-openjdk
37%ifarch riscv6440%ifarch riscv64
@@ -42,18 +45,14 @@ BuildRequires: autoconf automake libtool pkgconfig zlib-devel libstdc++-static
42Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale.45Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale.
43 46 
44%prep47%prep
48+%setup -n %{name}-release-%{version}
49+%autopatch -M999 -p1
45%ifarch riscv6450%ifarch riscv64
46-%setup -qn %{name}-release-%{version}
47-%patch0 -p1
48-%patch1 -p1
49-%patch2 -p1
50-%patch3 -p1
51-%patch4 -p1
52mkdir -p ${HOME}/%{name}-prep_dir51mkdir -p ${HOME}/%{name}-prep_dir
53# protoc52# protoc
54tar -mxf %{SOURCE7} -C ${HOME}/%{name}-prep_dir53tar -mxf %{SOURCE7} -C ${HOME}/%{name}-prep_dir
55pushd ${HOME}/%{name}-prep_dir/protobuf-3.21.754pushd ${HOME}/%{name}-prep_dir/protobuf-3.21.7
56-%patch1001 -p155+%patch 1001 -p1
57./autogen.sh56./autogen.sh
58./protoc-artifacts/build-protoc.sh linux riscv64 protoc57./protoc-artifacts/build-protoc.sh linux riscv64 protoc
59mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.21.7 -Dclassifier=linux-riscv64 -Dpackaging=exe -Dfile=protoc-artifacts/target/linux/riscv64/protoc.exe58mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.21.7 -Dclassifier=linux-riscv64 -Dpackaging=exe -Dfile=protoc-artifacts/target/linux/riscv64/protoc.exe
@@ -61,7 +60,7 @@ popd
61# protoc-jar60# protoc-jar
62tar -mxf %{SOURCE8} -C ${HOME}/%{name}-prep_dir61tar -mxf %{SOURCE8} -C ${HOME}/%{name}-prep_dir
63pushd ${HOME}/%{name}-prep_dir/protoc-jar-3.11.462pushd ${HOME}/%{name}-prep_dir/protoc-jar-3.11.4
64-%patch1000 -p163+%patch 1000 -p1
65mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true64mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
66popd65popd
67# protoc-jar-maven-plugin66# protoc-jar-maven-plugin
@@ -69,9 +68,17 @@ unzip %{SOURCE9} -d ${HOME}/%{name}-prep_dir
69pushd ${HOME}/%{name}-prep_dir/protoc-jar-maven-plugin-3.11.468pushd ${HOME}/%{name}-prep_dir/protoc-jar-maven-plugin-3.11.4
70mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true69mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
71popd70popd
72-%else71+# frontend-plugin
73-%setup -n %{name}-release-%{version}72+tar -mxf %{SOURCE10} -C ${HOME}/%{name}-prep_dir
74-%autopatch -M999 -p173+pushd ${HOME}/%{name}-prep_dir/frontend-maven-plugin-frontend-plugins-1.11.0
74+%patch 1002 -p1
75+mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
76+popd
77+# Use nodejs-18 for riscv64
78+sed -i 's/v16.13.2/v18.0.0/g' flink-runtime-web/pom.xml
79+mkdir -p ${HOME}/.m2/repository/com/github/eirslett/node/18.0.0/
80+cp %{SOURCE11} ${HOME}/.m2/repository/com/github/eirslett/node/18.0.0/
81+mv ${HOME}/.m2/repository/com/github/eirslett/node/18.0.0/node-v18.0.0-linux-riscv64.tar.gz ${HOME}/.m2/repository/com/github/eirslett/node/18.0.0/node-18.0.0-linux-riscv64.tar.gz
75%endif82%endif
76mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-schema-registry-client -Dversion=7.2.2 -Dpackaging=jar -Dfile=%{SOURCE2}83mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-schema-registry-client -Dversion=7.2.2 -Dpackaging=jar -Dfile=%{SOURCE2}
77mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-avro-serializer -Dversion=7.2.2 -Dpackaging=jar -Dfile=%{SOURCE3}84mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-avro-serializer -Dversion=7.2.2 -Dpackaging=jar -Dfile=%{SOURCE3}
@@ -84,11 +91,9 @@ cp %{SOURCE6} ${HOME}/.m2/repository/com/github/eirslett/npm/8.1.2/
84%ifarch riscv6491%ifarch riscv64
85export MAVEN_OPTS="-Xms10240m -Xmx10240m -Xss2m -XX:MaxTenuringThreshold=0"92export MAVEN_OPTS="-Xms10240m -Xmx10240m -Xss2m -XX:MaxTenuringThreshold=0"
86export JAVA_TOOL_OPTIONS="-Xms10240m -Xmx10240m"93export JAVA_TOOL_OPTIONS="-Xms10240m -Xmx10240m"
87-mvn clean install -DskipTests -Dfast -T 2 -Pskip-webui-build94+%endif
88-%else
89npm config set registry https://repo.huaweicloud.com/repository/npm/95npm config set registry https://repo.huaweicloud.com/repository/npm/
90mvn clean install -DskipTests -Dfast -T 296mvn clean install -DskipTests -Dfast -T 2
91-%endif
92 97 
93%install98%install
94mkdir -p %{buildroot}/opt/99mkdir -p %{buildroot}/opt/
@@ -102,6 +107,10 @@ find %{buildroot}/opt/apache-%{name}-%{version}/ -type f -name '*.py' | xargs -i
102%license LICENSE107%license LICENSE
103 108 
104%changelog109%changelog
110+* Tue Jan 14 2025 Dingli Zhang <dingli@iscas.ac.cn> - 1.17.1-6
111+- Use nodejs-18 to enable webui for riscv64
112+- Remove unused source file
113+ 
105* Tue Dec 10 2024 shenzhongwei <shenzhongwei@kylinos.cn> - 1.17.1-5114* Tue Dec 10 2024 shenzhongwei <shenzhongwei@kylinos.cn> - 1.17.1-5
106- include all patches in the source package.115- include all patches in the source package.
107 116 
Binary files do not support preview
Rnode-16.13.2-linux-arm64.tar.gz→node-v18.0.0-linux-riscv64.tar.gz+0-0
Binary files do not support preview