diff --git a/Storage/curve/1.0.0/24.03-lts-sp1/Dockerfile b/Storage/curve/1.0.0/24.03-lts-sp1/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..8ea1125f66e397c18eeb196081d931f0cce81cf7 --- /dev/null +++ b/Storage/curve/1.0.0/24.03-lts-sp1/Dockerfile @@ -0,0 +1,44 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp1 +FROM $BASE + +ARG VERSION=2.6.0-latest + +RUN yum install -y make gcc gcc-c++ patch git java-1.8.0-openjdk-devel java-11-openjdk-devel wget unzip \ + libcurl-devel libnl3-devel python3-devel libunwind-devel \ + zlib-devel openssl-devel uuid-devel libuuid-devel python3-wheel && \ + yum clean all +ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk + +WORKDIR /opt +COPY grpc.patch / +COPY client.patch / +COPY unix.patch / +RUN wget https://github.com/bazelbuild/bazel/releases/download/0.17.2/bazel-0.17.2-dist.zip && \ + unzip bazel-0.17.2-dist.zip -d bazel-0.17.2 && \ + cd /opt/bazel-0.17.2 && \ + mv /grpc.patch /client.patch /unix.patch ./ && \ + patch -p1 < grpc.patch && \ + patch -p1 < client.patch && \ + patch -p1 < unix.patch && \ + ln -s /usr/bin/python3 /usr/bin/python && \ + ./compile.sh && \ + ln -s /opt/bazel-0.17.2/output/bazel /usr/local/bin/bazel + +RUN git clone https://github.com/albertito/libfiu.git && \ + cd libfiu && \ + git checkout -b libfiu-1.00 1.00 && \ + make -j$nproc && make install + +RUN git clone -b arm64 https://github.com/opencurve/curve.git && \ + cd curve/ && \ + git checkout 1a6ad49ba7d11b5b9dcb5c6beb537ca4b9e5044b && \ + git format-patch -p -o .. -1 b71f94469597492b4fcef590cb11e729a003ebb9 && \ + git apply --include=thirdparties/brpc/* --whitespace=fix -p1 ../0001-fix-build-add-a-patch-to-support-build-on-GCC-11.patch + +COPY WORKSPACE.patch / +RUN cd /opt/curve && \ + mv /WORKSPACE.patch ./ && \ + git apply WORKSPACE.patch + +RUN cd /opt/curve && \ + bash mk-tar.sh \ No newline at end of file diff --git a/Storage/curve/1.0.0/24.03-lts-sp1/WORKSPACE.patch b/Storage/curve/1.0.0/24.03-lts-sp1/WORKSPACE.patch new file mode 100644 index 0000000000000000000000000000000000000000..a8dfbdd60d54448880a85415bb3bbfb90b0c0b5b --- /dev/null +++ b/Storage/curve/1.0.0/24.03-lts-sp1/WORKSPACE.patch @@ -0,0 +1,59 @@ +diff --git a/WORKSPACE b/WORKSPACE +index a84c52ec..3efdb3c8 100644 +--- a/WORKSPACE ++++ b/WORKSPACE +@@ -105,8 +105,7 @@ git_repository( + name = "com_github_apache_brpc", + remote = "https://github.com/apache/incubator-brpc", + commit = "1b9e00641cbec1c8803da6a1f7f555398c954cb0", +- patches = ["//:thirdparties/brpc/brpc.patch", "//:thirdparties/brpc/arm64.patch", +- "//:thirdparties/brpc/root_BUILD.patch"], ++ patches = ["//:thirdparties/brpc/brpc.patch", "//:thirdparties/brpc/arm64.patch", "//:thirdparties/brpc/fix-gcc11.patch", "//:thirdparties/brpc/root_BUILD.patch"], + patch_args = ["-p1"], + ) + +diff --git a/mk-tar.sh b/mk-tar.sh +index 7d0b3b74..fd58e463 100644 +--- a/mk-tar.sh ++++ b/mk-tar.sh +@@ -127,7 +127,7 @@ then + echo "please install bazel 0.17.2 first" + exit + fi +-if [ ${bazel_version} != "0.17.2" ] ++if [ ${bazel_version} != "0.17.2" ] && [ ${bazel_version} != "0.17.2-" ] + then + echo "bazel version must 0.17.2" + echo "now version is ${bazel_version}" +@@ -195,7 +195,7 @@ then + echo "build phase1 failed" + exit + fi +-bash ./curvefs_python/configure.sh python2 ++bash ./curvefs_python/configure.sh python3 + if [ $? -ne 0 ] + then + echo "configure failed" +@@ -222,7 +222,7 @@ then + echo "build phase1 failed" + exit + fi +-bash ./curvefs_python/configure.sh python2 ++bash ./curvefs_python/configure.sh python3 + if [ $? -ne 0 ] + then + echo "configure failed" + +diff --git a/nbd/src/main.cpp b/nbd/src/main.cpp +index 0a565510..789cfa32 100644 +--- a/nbd/src/main.cpp ++++ b/nbd/src/main.cpp +@@ -63,7 +63,7 @@ static void HandleSignal(int signum) { + return; + } + +- std::cout << "Got signal " << sys_siglist[signum] << "\n" ++ std::cout << "Got signal " << strsignal(signum) << "\n" + << ", disconnect now" << std::endl; + + ret = nbdTool->Disconnect(nbdConfig.get()); diff --git a/Storage/curve/1.0.0/24.03-lts-sp1/client.patch b/Storage/curve/1.0.0/24.03-lts-sp1/client.patch new file mode 100644 index 0000000000000000000000000000000000000000..4b5f5ca716c3aa99388c423f7e4e53954ba8da47 --- /dev/null +++ b/Storage/curve/1.0.0/24.03-lts-sp1/client.patch @@ -0,0 +1,10 @@ +--- a/third_party/ijar/zlib_client.cc 2025-06-05 07:36:32.094735012 +0000 ++++ b/third_party/ijar/zlib_client.cc 2025-06-05 04:46:25.602169014 +0000 +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + #include "third_party/ijar/common.h" + #include "third_party/ijar/zlib_client.h" diff --git a/Storage/curve/1.0.0/24.03-lts-sp1/grpc.patch b/Storage/curve/1.0.0/24.03-lts-sp1/grpc.patch new file mode 100644 index 0000000000000000000000000000000000000000..2d15f68085e765bc5cf42c49b0540b83f1b6d8ed --- /dev/null +++ b/Storage/curve/1.0.0/24.03-lts-sp1/grpc.patch @@ -0,0 +1,20 @@ +--- a/third_party/grpc/src/core/support/log_linux.c 2025-06-05 07:09:16.478614005 +0000 ++++ b/third_party/grpc/src/core/support/log_linux.c 2025-06-05 04:49:16.119702009 +0000 +@@ -54,7 +54,7 @@ + #include + #include + +-static long gettid(void) { return syscall(__NR_gettid); } ++static long local_gettid(void) { return syscall(__NR_gettid); } + + void gpr_log(const char *file, int line, gpr_log_severity severity, + const char *format, ...) { +@@ -95,7 +95,7 @@ + + gpr_asprintf(&prefix, "%s%s.%09d %7tu %s:%d]", + gpr_log_severity_string(args->severity), time_buffer, +- (int)(now.tv_nsec), gettid(), display_file, args->line); ++ (int)(now.tv_nsec), local_gettid(), display_file, args->line); + + fprintf(stderr, "%-60s %s\n", prefix, args->message); + gpr_free(prefix); diff --git a/Storage/curve/1.0.0/24.03-lts-sp1/unix.patch b/Storage/curve/1.0.0/24.03-lts-sp1/unix.patch new file mode 100644 index 0000000000000000000000000000000000000000..2568567208e214937f97a7dcf57a74c5a8401e2b --- /dev/null +++ b/Storage/curve/1.0.0/24.03-lts-sp1/unix.patch @@ -0,0 +1,9 @@ +--- a/third_party/ijar/mapped_file_unix.cc 2025-06-05 07:50:45.762845004 +0000 ++++ a/third_party/ijar/mapped_file_unix.cc 2025-06-05 04:47:36.196325004 +0000 +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + #include diff --git a/Storage/curve/meta.yml b/Storage/curve/meta.yml new file mode 100644 index 0000000000000000000000000000000000000000..6d7aac8c7d3b88f13114ebe68f5f8ae495a27bb5 --- /dev/null +++ b/Storage/curve/meta.yml @@ -0,0 +1,3 @@ +1.1.0-oe2403lts: + path: 1.1.0/24.03-lts-sp1/Dockerfile + arch: aarch64 \ No newline at end of file diff --git a/Storage/image-list.yml b/Storage/image-list.yml index ee59abf05edae5bc5092816347516e72713f808e..6429e71a72ab83e836cf6c7382b9f9b24416a394 100644 --- a/Storage/image-list.yml +++ b/Storage/image-list.yml @@ -12,3 +12,4 @@ images: fastdfs: fastdfs glusterfs: glusterfs lustre: lustre + curve: curve