-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][C++ client] Fix rpm and deb packaging #17064
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
[fix][C++ client] Fix rpm and deb packaging #17064
Conversation
|
I add the |
|
@BewareMyPower Please provide a correct documentation label for your PR. |
|
@BewareMyPower Please provide a correct documentation label for your PR. |
|
/pulsarbot rerun-failure-checks |
|
@BewareMyPower Please provide a correct documentation label for your PR. |
4d4b183 to
f4b68a8
Compare
### Motivation For branch-2.11 and master branches, the rpm and deb packaging is broken. > /usr/bin/env: 'python3': No such file or directory It's caused by [PIP-155](apache#15376), which removes the Python2 support. In addition, the Dockerfiles of `rpm` and `deb` subdirectories of `pulsar-client-cpp/pkg` don't install Boost for Python3 well. But the rpm build disables the `BUILD_PYTHON_WRAPPER` option while the deb build doesn't. ### Modifications - Fix Dockerfiles under `pkg` and `rpm` subdirectories and speed up the `docker build` process: - Install python3 to fix the bug - Download the CMake 3.24.0 binaries directly instead of building from source - Upgrade Boost to 1.79 so that only headers are required (the boost::regex module is required for CentOS 7 because the default GCC is 4.8 that there is something wrong with std::regex) - Add `-j8` option when compiling some large dependencies that uses 8 threads to speed the compilation - Remove the `-v` option of `tar` to avoid showing too many info - Check the `BUILD_IMAGE` environment variable in `docker-build-xxx.sh` under `rpm` and `deb` subdirectories. If it's defined, build the image rather than pull the image from DockerHub before executing the build script. Because currently only a few committers have the permission to push the Docker images. - Add two workflows to build RPM and DEB packages if the files under `pulsar-client-cpp` changed. They build the docker images and run the build script for RPM and DEB packaging. - Specify the platform to `linux/amd64` so that the scripts can be used in ARM64 machines like Mac M1.
1b81221 to
96fb9d0
Compare
Demogorgon314
left a comment
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.
I tried the M1 macOS, it can build packages.
|
Also worked in my M1 |
This reverts commit d88933a.
Motivation
For branch-2.11 and master branches, the rpm and deb packaging is
broken.
It's caused by PIP-155,
which removes the Python2 support. In addition, the Dockerfiles of
rpmand
debsubdirectories ofpulsar-client-cpp/pkgdon't install Boostfor Python3 well. But the rpm build disables the
BUILD_PYTHON_WRAPPERoption while the deb build doesn't.Modifications
pkgandrpmsubdirectories and speed up thedocker buildprocess:from source
boost::regex module is required for CentOS 7 because the default
GCC is 4.8 that there is something wrong with std::regex)
-j8option when compiling some large dependencies that uses 8threads to speed the compilation
-voption oftarto avoid showing too many infoBUILD_IMAGEenvironment variable indocker-build-xxx.shunder
rpmanddebsubdirectories. If it's defined, build the imagerather than pull the image from DockerHub before executing the build
script. Because currently only a few committers have the permission to
push the Docker images.
pulsar-client-cppchanged. They build the docker images and run thebuild script for RPM and DEB packaging.
Documentation
Check the box below or label this PR directly.
Need to update docs?
doc-required(Your PR needs to update docs and you will update later)
doc-not-neededI will update the docs in Wiki pages. The dos in the repository don't need update.
doc(Your PR contains doc changes)
doc-complete(Docs have been already added)