-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-19605. Upgrade Protobuf 3.25.5 for docker images #7780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,29 +27,33 @@ if [ $? -eq 1 ]; then | |
exit 1 | ||
fi | ||
|
||
default_version="3.21.12" | ||
default_version="3.25.5" | ||
version_to_install=$default_version | ||
if [ -n "$2" ]; then | ||
version_to_install="$2" | ||
fi | ||
|
||
if [ "$version_to_install" != "3.21.12" ]; then | ||
if [ "$version_to_install" != "3.25.5" ]; then | ||
echo "WARN: Don't know how to install version $version_to_install, installing the default version $default_version instead" | ||
version_to_install=$default_version | ||
fi | ||
|
||
if [ "$version_to_install" == "3.21.12" ]; then | ||
if [ "$version_to_install" == "3.25.5" ]; then | ||
# hadolint ignore=DL3003 | ||
mkdir -p /opt/protobuf-src && | ||
curl -L -s -S \ | ||
https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz \ | ||
https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.25.5.tar.gz \ | ||
-o /opt/protobuf.tar.gz && | ||
tar xzf /opt/protobuf.tar.gz --strip-components 1 -C /opt/protobuf-src && | ||
mkdir -p /opt/abseil-cpp-src && | ||
curl -L -s -S \ | ||
https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. recent protobuf versions have hard dependency on abseil, the version is defined at |
||
-o /opt/abseil-cpp.tar.gz && | ||
tar xzf /opt/abseil-cpp.tar.gz --strip-components 1 -C /opt/protobuf-src/third_party/abseil-cpp && | ||
cd /opt/protobuf-src && | ||
./autogen.sh && | ||
./configure --prefix=/opt/protobuf && | ||
make "-j$(nproc)" && | ||
make install && | ||
cmake -S . -B build -Dprotobuf_BUILD_TESTS=OFF && | ||
cmake --build build --parallel $(nproc) && | ||
cmake --install build --prefix /opt/protobuf && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. protocolbuffers/protobuf#10132 (since protobuf 3.22.0) removes autotools support, the supported toolchains are bazel and cmake. |
||
cd /root && | ||
rm -rf /opt/protobuf-src | ||
else | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
"overrides": [ | ||
{ | ||
"name": "protobuf", | ||
"version": "3.21.12" | ||
"version": "3.25.5" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose this works, but I don't have Windows env to verify this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for PR @pan3793. Please let me know once you're done with all the changes and I can verify it on Windows. |
||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now it returns 25.5 (seems protobuf changed version policy recently)