Add prototype pkgfilegroup-based RPM builder#129
Conversation
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to determine that you authored the commits in this PR. Maybe you used a different email address in the git commits than was used to sign the CLA? If someone else authored these commits, then please add them to this pull request and have them confirm that they're okay with them being contributed to Google. If there are co-authors, make sure they're formatted properly. In order to pass this check, please resolve this problem and then comment ℹ️ Googlers: Go here for more info. |
6c123bf to
bd8d531
Compare
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
aiuto
left a comment
There was a problem hiding this comment.
Can you merge with the current upstream so this is a smaller change.
bd8d531 to
331cdc1
Compare
Done. |
|
Hi. I'm back from vacation, so I can take a look again.
What are your plans to get the improvements migrated from experimental up to the top level package? |
331cdc1 to
9e9e7a6
Compare
From what I can tell, it shouldn't be too difficult to combine the two together; the logic could be made more robust to multiple template types. Could also change the pkg_rpm starlark logic, but I think changes to |
|
What I was trying to get at was to not to do everything here and replace, but to take the rpm enhancements (like built in spec-file, pre/post scripts) and move them to the mainline code. Then have experimental derive from that. But I'll be OK with getting this merged so that others can provide feedback no the pkg_filegroup stuff. While that is improving, we can backport the new features to the mainline code first, and bring in pkgfilegroup as we reach concensus. |
aiuto
left a comment
There was a problem hiding this comment.
While we are still experimenting, can you name it pkg_filegroup, rather than pkgfilergroup so it matches the convention of all the other names.
Certainly. How about I take care of this in a change that will go in after this one? |
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]>
9e9e7a6 to
229a244
Compare
Ah, OK. Fair enough. I'll work on this next after I clear out my stack of pending changes. I got symlink support and an RPM build tester in the pipe. |
|
It just occurred me that I'm probably making reviews difficult by force-pushing updates all the time. Sorry about that. Here's the text diff for the latest change: |
|
One thing I truly hate about github reviews is that it is telling me I requested changes, and it won't point me to the place I asked for them. There are more things, but that is one.
Sure. |
This change renames all instances of `pkgfilegroup` with `pkg_filegroup`, and renames `experimental/genpkg.bzl` to `experimental/pkg_filegroup.bzl`. Names of tests and documentation have been updated accordingly. The change was mostly made mechanically using `sed(1)`, with minor cleanup afterward. This change makes the names within the experimental/ branch consistent, and was requested in the review of bazelbuild#129.
This change renames all instances of `pkgfilegroup` with `pkg_filegroup`, and renames `experimental/genpkg.bzl` to `experimental/pkg_filegroup.bzl`. Names of tests and documentation have been updated accordingly. The change was mostly made mechanically using `sed(1)`, with minor cleanup afterward. This change makes the names within the experimental/ branch consistent, and was requested in the review of bazelbuild#129.
This change renames all instances of `pkgfilegroup` with `pkg_filegroup`, and renames `experimental/genpkg.bzl` to `experimental/pkg_filegroup.bzl`. Names of tests and documentation have been updated accordingly. The change was mostly made mechanically using `sed(1)`, with minor cleanup afterward. This change makes the names within the experimental/ directory consistent, and was requested in the review of bazelbuild#129.
This change renames all instances of `pkgfilegroup` to `pkg_filegroup`, and renames `experimental/genpkg.bzl` to `experimental/pkg_filegroup.bzl`. Names of tests and documentation have been updated accordingly. The change was mostly made mechanically using `sed(1)`, with minor cleanup afterward. This change makes the names within the experimental/ directory consistent, and was requested in the review of bazelbuild#129.
This change renames all instances of `pkgfilegroup` to `pkg_filegroup`, and renames `experimental/genpkg.bzl` to `experimental/pkg_filegroup.bzl`. Names of tests and documentation have been updated accordingly. The change was mostly made mechanically using `sed(1)`, with minor cleanup afterward. This change makes the names within the experimental/ directory consistent, and was requested in the review of #129.
NOTE: only the third commit (currently bd8d531) should be reviewed as a part of this change. The first two should be reviewed as a part of #128.
This change provides a prototype
pkgfilegroup-based RPM builder in the form ofthe
gen_rpmrule. See #128 for more details onpkgfilegroup.The RPM generator was derived from
make_rpm.pyinpkg/and supports a numberof features over and above what's available in
pkg_rpm. As written, it, givena template like the one provided, 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_rpmwill write much of the preamble,%descriptiontext,%installscriptlets, and%filesbased 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: