Add pkgfilegroup for package-independent destination mappings#128
Merged
aiuto merged 2 commits intobazelbuild:masterfrom Feb 28, 2020
Merged
Add pkgfilegroup for package-independent destination mappings#128aiuto merged 2 commits intobazelbuild:masterfrom
aiuto merged 2 commits intobazelbuild:masterfrom
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`)
nacl
added a commit
to nacl/rules_pkg
that referenced
this pull request
Jan 14, 2020
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
nacl
added a commit
to nacl/rules_pkg
that referenced
this pull request
Jan 14, 2020
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
nacl
added a commit
to nacl/rules_pkg
that referenced
this pull request
Jan 15, 2020
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]>
aiuto
reviewed
Feb 28, 2020
Collaborator
aiuto
left a comment
There was a problem hiding this comment.
Since this is all in experimental, it's fine.
Just the question about the workspace.
Thanks for putting in the missing copyright blocks.
aiuto
approved these changes
Feb 28, 2020
Collaborator
aiuto
left a comment
There was a problem hiding this comment.
Can you write a doc outlining the remaining plan here so that interested parties can try to experiment with it?
aiuto
added a commit
to aiuto/rules_pkg
that referenced
this pull request
Feb 28, 2020
Fixes problem introduced by bazelbuild#128
aiuto
added a commit
that referenced
this pull request
Feb 28, 2020
Fixes problem introduced by #128
nacl
added a commit
to nacl/rules_pkg
that referenced
this pull request
Feb 28, 2020
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]>
nacl
added a commit
to nacl/rules_pkg
that referenced
this pull request
Mar 26, 2020
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]>
nacl
added a commit
to nacl/rules_pkg
that referenced
this pull request
Apr 14, 2020
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]>
aiuto
pushed a commit
that referenced
this pull request
Apr 15, 2020
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 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.
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)