diff --git a/Storage/curve/1.2.6/24.03-lts-sp2/Dockerfile b/Storage/curve/1.2.6/24.03-lts-sp2/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..087d3471430b033e807735c0eca9def50d12fe5a --- /dev/null +++ b/Storage/curve/1.2.6/24.03-lts-sp2/Dockerfile @@ -0,0 +1,44 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp2 +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.2.6/24.03-lts-sp2/WORKSPACE.patch b/Storage/curve/1.2.6/24.03-lts-sp2/WORKSPACE.patch new file mode 100644 index 0000000000000000000000000000000000000000..a8dfbdd60d54448880a85415bb3bbfb90b0c0b5b --- /dev/null +++ b/Storage/curve/1.2.6/24.03-lts-sp2/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.2.6/24.03-lts-sp2/client.patch b/Storage/curve/1.2.6/24.03-lts-sp2/client.patch new file mode 100644 index 0000000000000000000000000000000000000000..4b5f5ca716c3aa99388c423f7e4e53954ba8da47 --- /dev/null +++ b/Storage/curve/1.2.6/24.03-lts-sp2/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.2.6/24.03-lts-sp2/grpc.patch b/Storage/curve/1.2.6/24.03-lts-sp2/grpc.patch new file mode 100644 index 0000000000000000000000000000000000000000..2d15f68085e765bc5cf42c49b0540b83f1b6d8ed --- /dev/null +++ b/Storage/curve/1.2.6/24.03-lts-sp2/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.2.6/24.03-lts-sp2/unix.patch b/Storage/curve/1.2.6/24.03-lts-sp2/unix.patch new file mode 100644 index 0000000000000000000000000000000000000000..2568567208e214937f97a7dcf57a74c5a8401e2b --- /dev/null +++ b/Storage/curve/1.2.6/24.03-lts-sp2/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/README.md b/Storage/curve/README.md index 7fffbf09f16c290f5c449fa9eb4bd5693f4d3c08..8545bb8e886903d4fcb951c0801e169b1bb90055 100644 --- a/Storage/curve/README.md +++ b/Storage/curve/README.md @@ -16,6 +16,7 @@ The tag of each `curve` docker image is consist of the version of `curve` and th | Tag | Currently | Architectures | |---------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|---------------| +|[1.2.6-oe2403sp2](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Storage/curve/1.2.6/24.03-lts-sp2/Dockerfile) | curve 1.2.6 on openEuler 24.03-LTS-SP2 | amd64, arm64 | | [1.0.0-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Storage/curve/1.0.0/24.03-lts-sp1/Dockerfile) | Curve 1.0.0 on openEuler 24.03-LTS-SP1 | amd64, arm64 | # Usage diff --git a/Storage/curve/doc/image-info.yml b/Storage/curve/doc/image-info.yml index 9ecc8b9d941ce46e312f6ae9060e8c10c00cd603..1273edba0fa43d2cb3ac003340b2316adaf5b437 100644 --- a/Storage/curve/doc/image-info.yml +++ b/Storage/curve/doc/image-info.yml @@ -11,6 +11,7 @@ tags: | | Tag | Currently | Architectures | |----------|-------------|------------------| + |[1.2.6-oe2403sp2](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Storage/curve/1.2.6/24.03-lts-sp2/Dockerfile) | curve 1.2.6 on openEuler 24.03-LTS-SP2 | amd64, arm64 | |[1.0.0-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Storage/curve/1.0.0/24.03-lts-sp1/Dockerfile)| Curve 1.0.0 on openEuler 24.03-LTS-SP1 | amd64, arm64 | download: | @@ -46,4 +47,4 @@ upstream: version_prefix: v version_filter: rc;beta;hotfix;latest; backend: GitHub - version_scheme: RPM + version_scheme: RPM \ No newline at end of file diff --git a/Storage/curve/meta.yml b/Storage/curve/meta.yml index 8ef7ff4640288ab21b7b9dda872aaca2d8e5972b..bc2388f8046b39251fb4862dc4f774620b4b2d2d 100644 --- a/Storage/curve/meta.yml +++ b/Storage/curve/meta.yml @@ -1,3 +1,5 @@ 1.1.0-oe2403sp1: path: 1.1.0/24.03-lts-sp1/Dockerfile - arch: aarch64 \ No newline at end of file + arch: aarch64 +1.2.6-oe2403sp2: + path: 1.2.6/24.03-lts-sp2/Dockerfile \ No newline at end of file