-
Notifications
You must be signed in to change notification settings - Fork 179
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 pkgfilegroup for package-independent destination mappings #128
Conversation
This adds an experimental rule, `pkgfilegroup`, along with associated Providers, that gives rule developers and users a consistent mechanism for using the output of bazel targets in packaging rules. Inspired by bazelbuild#36. Other capabilities that are provided by this that were not mentioned in bazelbuild#36 are: - Creation of empty directories (`pkg_mkdirs`) - Exclusion of files from a `pkgfilegroup` (`excludes`) - Renames of files in a `pkgfilegroup` (`renames`)
This provides some analysis tests for various features of `pkgfilegroup` and `pkg_mkdirs`. See bazelbuild#128. You can run them by invoking `bazel test experimental/...` from the `pkg` directory This implementation of pkgfilegroup was inspired by bazelbuild#36. This commit depends on bazelbuild#128.
This provides some analysis tests for various features of `pkgfilegroup` and `pkg_mkdirs`. See bazelbuild#128. You can run them by invoking `bazel test experimental/...` from the `pkg` directory This implementation of pkgfilegroup was inspired by bazelbuild#36.
78af648
to
e3c71cb
Compare
This change provides a prototype `pkgfilegroup`-based RPM builder in the form of the `gen_rpm` rule. See bazelbuild#128 for more details on `pkgfilegroup`. The RPM generator was derived from `make_rpm.py` in `pkg/` and supports a number of features over and above what's available in `pkg_rpm`. As written, it, given a template like the one provided, you can construct many full-fledged RPM packages entirely within Bazel. In most cases, the templates will only need to be customized with advanced logic and other macros that are not settable via bazel itself; `gen_rpm` will write much of the preamble, `%description` text, `%install` scriptlets, and `%files` based on rule-provided inputs. Documentation outside of the source files is not yet available. This was empirically tested on RPM packages internal to VMware with positive results; actual tests of the rules are not yet ready. This, naturally, is incomplete, and is missing capabilities such as: - Configurable compression - Configurable Provides/Requires - SRPM emission - Reproducibility - Configurable stripping - Configurable construction of "debug" packages Co-authored-by: mzeren-vmw Co-authored-by: klash
This change provides a prototype `pkgfilegroup`-based RPM builder in the form of the `gen_rpm` rule. See bazelbuild#128 for more details on `pkgfilegroup`. The RPM generator was derived from `make_rpm.py` in `pkg/` and supports a number of features over and above what's available in `pkg_rpm`. As written, it, given a template like the one provided, you can construct many full-fledged RPM packages entirely within Bazel. In most cases, the templates will only need to be customized with advanced logic and other macros that are not settable via bazel itself; `gen_rpm` will write much of the preamble, `%description` text, `%install` scriptlets, and `%files` based on rule-provided inputs. Documentation outside of the source files is not yet available. This was empirically tested on RPM packages internal to VMware with positive results; actual tests of the rules are not yet ready. This, naturally, is incomplete, and is missing capabilities such as: - Configurable compression - Configurable Provides/Requires - SRPM emission - Reproducibility - Configurable stripping - Configurable construction of "debug" packages Co-authored-by: mzeren-vmw <[email protected]> Co-authored-by: klash <[email protected]>
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.
Since this is all in experimental, it's fine.
Just the question about the workspace.
Thanks for putting in the missing copyright blocks.
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.
Can you write a doc outlining the remaining plan here so that interested parties can try to experiment with it?
Fixes problem introduced by bazelbuild#128
Fixes problem introduced by #128
This change provides a prototype `pkgfilegroup`-based RPM builder in the form of the `gen_rpm` rule. See bazelbuild#128 for more details on `pkgfilegroup`. The RPM generator was derived from `make_rpm.py` in `pkg/` and supports a number of features over and above what's available in `pkg_rpm`. As written, it, given a template like the one provided, you can construct many full-fledged RPM packages entirely within Bazel. In most cases, the templates will only need to be customized with advanced logic and other macros that are not settable via bazel itself; `gen_rpm` will write much of the preamble, `%description` text, `%install` scriptlets, and `%files` based on rule-provided inputs. Documentation outside of the source files is not yet available. This was empirically tested on RPM packages internal to VMware with positive results; actual tests of the rules are not yet ready. This, naturally, is incomplete, and is missing capabilities such as: - Configurable compression - Configurable Provides/Requires - SRPM emission - Reproducibility - Configurable stripping - Configurable construction of "debug" packages Co-authored-by: mzeren-vmw <[email protected]> Co-authored-by: klash <[email protected]>
This change provides a prototype `pkgfilegroup`-based RPM builder in the form of the `gen_rpm` rule. See bazelbuild#128 for more details on `pkgfilegroup`. The RPM generator was derived from `make_rpm.py` in `pkg/` and supports a number of features over and above what's available in `pkg_rpm`. As written, it, given a template like the one provided, you can construct many full-fledged RPM packages entirely within Bazel. In most cases, the templates will only need to be customized with advanced logic and other macros that are not settable via bazel itself; `gen_rpm` will write much of the preamble, `%description` text, `%install` scriptlets, and `%files` based on rule-provided inputs. Documentation outside of the source files is not yet available. This was empirically tested on RPM packages internal to VMware with positive results; actual tests of the rules are not yet ready. This, naturally, is incomplete, and is missing capabilities such as: - Configurable compression - Configurable Provides/Requires - SRPM emission - Reproducibility - Configurable stripping - Configurable construction of "debug" packages Co-authored-by: mzeren-vmw <[email protected]> Co-authored-by: klash <[email protected]>
This change provides a prototype `pkgfilegroup`-based RPM builder in the form of the `gen_rpm` rule. See bazelbuild#128 for more details on `pkgfilegroup`. The RPM generator was derived from `make_rpm.py` in `pkg/` and supports a number of features over and above what's available in `pkg_rpm`. As written, it, given a template like the one provided, you can construct many full-fledged RPM packages entirely within Bazel. In most cases, the templates will only need to be customized with advanced logic and other macros that are not settable via bazel itself; `gen_rpm` will write much of the preamble, `%description` text, `%install` scriptlets, and `%files` based on rule-provided inputs. Documentation outside of the source files is not yet available. This was empirically tested on RPM packages internal to VMware with positive results; actual tests of the rules are not yet ready. This, naturally, is incomplete, and is missing capabilities such as: - Configurable compression - Configurable Provides/Requires - SRPM emission - Reproducibility - Configurable stripping - Configurable construction of "debug" packages Co-authored-by: mzeren-vmw <[email protected]> Co-authored-by: klash <[email protected]>
This change provides a prototype `pkgfilegroup`-based RPM builder in the form of the `gen_rpm` rule. See #128 for more details on `pkgfilegroup`. The RPM generator was derived from `make_rpm.py` in `pkg/` and supports a number of features over and above what's available in `pkg_rpm`. As written, it, given a template like the one provided, you can construct many full-fledged RPM packages entirely within Bazel. In most cases, the templates will only need to be customized with advanced logic and other macros that are not settable via bazel itself; `gen_rpm` will write much of the preamble, `%description` text, `%install` scriptlets, and `%files` based on rule-provided inputs. Documentation outside of the source files is not yet available. This was empirically tested on RPM packages internal to VMware with positive results; actual tests of the rules are not yet ready. This, naturally, is incomplete, and is missing capabilities such as: - Configurable compression - Configurable Provides/Requires - SRPM emission - Reproducibility - Configurable stripping - Configurable construction of "debug" packages Co-authored-by: mzeren-vmw <[email protected]> Co-authored-by: klash <[email protected]> Co-authored-by: mzeren-vmw <[email protected]> Co-authored-by: klash <[email protected]>
This adds an experimental rule,
pkgfilegroup
, along with associated Providers,that gives rule developers and users a consistent mechanism for using the output
of bazel targets in packaging rules.
Inspired by #36.
Other capabilities that are provided by this that were not mentioned in #36 are:
pkg_mkdirs
)pkgfilegroup
(excludes
)pkgfilegroup
(renames
)