-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Allow safe stripping of Bazel binary #11842
Comments
Following up on Solution 2 above: a simple way of achieving that might be if the C++ launcher skipped looked for the embedded zip when the |
So perhaps a check like this could be extended to the other locations (I believe all in the blaze.cc file) where Bazel tries to read from the embedded archive? |
@meteorcloudy This is the big holdup right now. I've tried a couple patches to implement what I suggest here but I can't get them to work... |
This will allow Bazel client to run individually without the appended zip archive, which is a requirement for Debian installation. The following changes are made: - Add --trust_install_base option. When this is enabled. Bazel client trusts the install base provided by --install_base option and skip the step of verifying the install directory. We need it because the Bazel client alone doesn't contain information to verify the install directory. - Reimplement --version as a actual Bazel startup flag. The version info is read from the zip archive, but when --trust_install_base is enabled it should be read from the given install base. Related: bazelbuild#9408 Fixes: bazelbuild#11842
This will allow Bazel client to run individually without the appended zip archive, which is a requirement for Debian installation. The following changes are made: - Add --trust_install_base option. When this is enabled. Bazel client trusts the install base provided by --install_base option and skip the step of verifying the install directory. We need it because the Bazel client alone doesn't contain information to verify the install directory. - Reimplement --version as a actual Bazel startup flag. The version info is read from the zip archive, but when --trust_install_base is enabled it should be read from the given install base. Related: bazelbuild#9408 Fixes: bazelbuild#11842
This will allow Bazel client to run individually without the appended zip archive, which is a requirement for Debian installation. The following changes are made: - Add --trust_install_base option. When this is enabled. Bazel client trusts the install base provided by --install_base option and skip the step of verifying the install directory. We need it because the Bazel client alone doesn't contain information to verify the install directory. - Reimplement --version as a actual Bazel startup flag. The version info is read from the zip archive, but when --trust_install_base is enabled it should be read from the given install base. Related: bazelbuild#9408 Fixes: bazelbuild#11842
This will allow Bazel client to run individually without the appended zip archive, which is a requirement for Debian installation. The following changes are made: - Add --trust_install_base option. When this is enabled. Bazel client trusts the install base provided by --install_base option and skip the step of verifying the install directory. We need it because the Bazel client alone doesn't contain information to verify the install directory. - Reimplement --version as a actual Bazel startup flag. The version info is read from the zip archive, but when --trust_install_base is enabled it should be read from the given install base. Related: bazelbuild#9408 Fixes: bazelbuild#11842
This will allow Bazel client to run individually without the appended zip archive, which is a requirement for Debian installation. The following changes are made: - Add --trust_install_base option. When this is enabled. Bazel client trusts the install base provided by --install_base option and skip the step of verifying the install directory. We need it because the Bazel client alone doesn't contain information to verify the install directory. - Reimplement --version as a actual Bazel startup flag. The version info is read from the zip archive, but when --trust_install_base is enabled it should be read from the given install base. Related: bazelbuild#9408 Fixes: bazelbuild#11842
This will allow Bazel client to run individually without the appended zip archive, which is a requirement for Debian installation. The following changes are made: - Add --trust_install_base option. When this is enabled. Bazel client trusts the install base provided by --install_base option and skip the step of verifying the install directory. We need it because the Bazel client alone doesn't contain information to verify the install directory. - Reimplement --version as a actual Bazel startup flag. The version info is read from the zip archive, but when --trust_install_base is enabled it should be read from the given install base. Related: bazelbuild#9408 Fixes: bazelbuild#11842
Hello @oquenchil , why was this closed? I don't think #11905 was merged yet? |
Re-opening and marking as P4. @meteorcloudy if you ever restart that work please mark as P2. |
|
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale. |
This is still needed |
Description of the problem / feature request:
Please consider implementing a means of safely stripping the Bazel binary. I see two possible means by which this might be achieved:
Document strip command options that would allow debug symbols to be removed without also removing the embedded zip file.
Provide (or document, if it exists already) a means by which a "skinny" Bazel binary could be built that would not contain the embedded zip and could therefore be safely stripped. This is the preferred solution from a Debian perspective since we are already packaging Bazel with an extracted system-level installation base that we point to upon execution with
--install_base
.Feature requests: what underlying problem are you trying to solve with this feature?
Stripping release binaries is common practice and even required in many cases for both speed and storage efficiency. For example, this is a requirement in Debian and produces a packaging error if skipped.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Strip the Bazel binary with
strip --strip-unneeded
orstrip --strip-debug
.What operating system are you running Bazel on?
Debian Unstable
What's the output of
bazel info release
?Same as
bazel version
above.If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.Built as part of Debian package for #9408.
Have you found anything relevant by searching the web?
Yes. The stripping problem seem to be a known issue as shown in #600.
The text was updated successfully, but these errors were encountered: