bazelbuild / bazelbuild/rules_pkg

Streamline RPM generation process

Open
#209 0 comments 0 reactions 0 assignees View on GitHub
feature-request P3
Dominant language
Starlark
Stars
253
Forks
221
Avg merge
10h 33m
Merged PRs (30d)
1

Description

@aiuto in the [review for #179](https://github.com/bazelbuild/rules_pkg/pull/179#discussion_r438335224) pointed out that there were several confusing parts in the consolidated RPM generator.

Instead, the process could be streamlined to something that looks like this ([see my comment to that same review](https://github.com/bazelbuild/rules_pkg/pull/179#discussion_r464526616)):

> 1) The template spec file is expanded to a more fully-qualified spec file that can be invoked by `rpmbuild` with minimal additional magic. Also, preferably with a single template expansion scheme.
> 2) The rpmbuild directory structure is created, and, if necessary (see below), the already-built artifacts are put in the right place.
> 3) `rpmbuild` is invoked with the necessary arguments to build the RPM (This would be `make_rpm.py`)
>
> This could help us dramatically reduce the complexity of `make_rpm.py`.
>
> We might be able to somewhat reduce the number of file copies this process entails by having the `%install` phase simply copy (or hardlink) the files from the bazel build tree to where they are supposed to be relative to RPM builds the package. Haven't yet tried this out either.

This should result in much more readable and efficient code overall.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.