Skip to content

Consolidate make_rpm.bzl and experimental/make_rpm.bzl#179

Merged
aiuto merged 6 commits intobazelbuild:masterfrom
nacl:topic/consolidated-make-rpm-script
Aug 4, 2020
Merged

Consolidate make_rpm.bzl and experimental/make_rpm.bzl#179
aiuto merged 6 commits intobazelbuild:masterfrom
nacl:topic/consolidated-make-rpm-script

Conversation

@nacl
Copy link
Copy Markdown
Collaborator

@nacl nacl commented May 13, 2020

This change consolidates all of new features/fixes from
pkg/experimental/make_rpm.bzl into pkg/make_rpm.bzl.

Code used specifically by experimental/rpm.bzl is marked as such, and is grouped
as to be generally obvious.

Features now supported by non-experimental pkg_rpm:

  • Support for older versions of rpm(8) (creation of RPMS output directory)

Features supported by non-experimental pkg_rpm not supported by experimental
pkg_rpm:

  • Support for SOURCE_DATE_EPOCH

Fixes #173.

This change consolidates all of new features/fixes from
pkg/experimental/make_rpm.bzl into pkg/make_rpm.bzl.

Code used specifically by experimental/rpm.bzl is marked as such, and is grouped
as to be generally obvious.

Features now supported by non-experimental `pkg_rpm`:
- Support for older versions of `rpm(8)` (creation of `RPMS` output directory)

Features supported by non-experimental `pkg_rpm` not supported by experimental
`pkg_rpm`:
- Support for `SOURCE_DATE_EPOCH`

Fixes bazelbuild#173
@nacl nacl requested a review from aiuto as a code owner May 13, 2020 14:27
Copy link
Copy Markdown
Collaborator

@aiuto aiuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only some nits about indents and comments.

@nacl nacl requested a review from aiuto June 8, 2020 17:45
Copy link
Copy Markdown
Collaborator

@aiuto aiuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the hard part of this CL is not the logic, but the fact that the why of how each file is treated might be underdocumented. Since this is not code that we touch frequently, we need to relearn the interaction of the rule, make_rpm and rpmbuild anew each time.

Perhaps it is time to document that. If not in this PR, but shortly after.

nacl added 2 commits August 3, 2020 16:02
- Discontinuing use of `str.format` in `CallRpmBuild()`

- Move RPM spec fields away from the `RpmBuilder` constructor and into
  `SetupWorkdir()`.  Initialize values set up in `RpmBuilder` to `None` in the
  constructor.

- Additional comments in `SetupWorkdir()` to clarify the purpose of the various
  actions taken there.
@nacl nacl requested a review from aiuto August 3, 2020 20:07
Copy link
Copy Markdown
Collaborator

@aiuto aiuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should burn make_rpm down and start fresh.

@aiuto aiuto merged commit 5985cff into bazelbuild:master Aug 4, 2020
@nacl nacl deleted the topic/consolidated-make-rpm-script branch January 19, 2021 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate experimental and existing make_rpm scripts

2 participants