[fix][C++ client] Fix rpm and deb packaging - #17064
Merged
Technoboy- merged 1 commit intoAug 15, 2022
Merged
Conversation
BewareMyPower
requested review from
RobertIndie,
codelipenghui,
eolivelli,
massakam,
merlimat,
michaeljmarshall,
nodece and
rdhabalia
August 11, 2022 07:38
Contributor
Author
|
I add the |
|
@BewareMyPower Please provide a correct documentation label for your PR. |
BewareMyPower
marked this pull request as draft
August 11, 2022 08:38
|
@BewareMyPower Please provide a correct documentation label for your PR. |
BewareMyPower
marked this pull request as ready for review
August 11, 2022 09:14
Contributor
Author
|
/pulsarbot rerun-failure-checks |
|
@BewareMyPower Please provide a correct documentation label for your PR. |
BewareMyPower
force-pushed
the
bewaremypower/fix-cpp-deb-build
branch
from
August 15, 2022 03:08
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.
BewareMyPower
force-pushed
the
bewaremypower/fix-cpp-deb-build
branch
from
August 15, 2022 07:28
1b81221 to
96fb9d0
Compare
shibd
reviewed
Aug 15, 2022
Demogorgon314
approved these changes
Aug 15, 2022
Demogorgon314
left a comment
Member
There was a problem hiding this comment.
I tried the M1 macOS, it can build packages.
Technoboy-
approved these changes
Aug 15, 2022
Contributor
|
Also worked in my M1 |
Technoboy-
pushed a commit
that referenced
this pull request
Aug 15, 2022
Technoboy-
pushed a commit
to merlimat/pulsar
that referenced
this pull request
Aug 16, 2022
coderzc
added a commit
to coderzc/pulsar
that referenced
this pull request
Aug 22, 2022
This reverts commit d88933a.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)