-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add support for .ar and .deb files to repository_ctx #15130
Comments
I would like to find a way to do this by making it an external set of repository rules that can have it's own development team. The issue is that most of the core Bazel team never see .deb files. They won't be able to adequately maintain or enhance it. I;m tied up this week and meteorcloudy@ is out on vacation. We can talk next week. |
The more I think about it, the more I believe this belongs to a new rule set. That would follow the pattern of jvm_external, where we built new repository rules outside of bazel itself, so they can advance at different rates. Looking at your patch, you will decompress the .deb file, but a fully fleshed out rule could have so much more. For example, installing a package and then making the libraries and headers available as a .so. Since I have some .deb file experience (on the building them side from rules_pkg), I can offer to help on parts of this, but what you need is a place to host it. Could you create a repository under Skia's control? Then we can point to that as the recommended place for support of .deb install from the workspace. |
Hey Tony, this features is already implemented in #15132. I don't think this belong to a new rule, just like we are not extracting .zip, .tar files using a ruleset (this is a totally different process as building archive with rules_pkg). This is an enhancement of the functionality in repository_ctx to decompress an archive, then the repository rule can do anything it wants. This works naturally with I'm closing this since the feature has already been merged. |
This implements #[15130](bazelbuild#15130). As I was updating the docs for .ar and .deb formats, I also addressed some previous formats that had been added but not propagated through to all the documentation places. Closes bazelbuild#15132. PiperOrigin-RevId: 439569440
This implements #[15130](#15130). As I was updating the docs for .ar and .deb formats, I also addressed some previous formats that had been added but not propagated through to all the documentation places. Closes #15132. PiperOrigin-RevId: 439569440 Co-authored-by: Kevin Lubick <[email protected]>
|
@uhthomas I think it's possible to write a custom starlark repository rule to keep extracting the *.tar files with the repository_ctx.extract API. Doing this in http_archive is probably not ideal, because how do you decide when to extract further? |
Description of the problem / feature request:
I intend to add support for .ar archive files and .deb files (which are the same file format).
Feature requests: what underlying problem are you trying to solve with this feature?
download_and_extract supports many compressed or packaged file formats already. Adding .ar and .deb files will make it easier for toolchains to download and extract .deb files into their sysroot without requiring an external tool.
Example hermetic toolchain that downloads .deb files and extracts them.
Have you found anything relevant by searching the web?
Apache Commons Compress already has support for .ar files and this package is already used by Bazel for Compressed Tar files so we shouldn't need any additional third party dependencies.
The text was updated successfully, but these errors were encountered: