Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@
This GitHub Action builds RPMs from spec file and using repository contents as source (wraps the rpmbuild utility).
Integrates easily with GitHub actions to allow RPMS to be uploaded as Artifact (actions/upload-artifact) or as Release Asset (actions/upload-release-asset).

## SEPE Fork Notice

This repository is a fork of [`naveenrajm7/rpmbuild`](https://github.com/naveenrajm7/rpmbuild),
created on 2024-02-12 to carry CU Boulder OIT Platform Engineering (SEPE)
modifications. It is used by the `oit-sepe-naemon-build` pipeline (and any
other SEPE repos that build RPMs via GitHub Actions). Upstream has been
effectively dormant since November 2022, so this fork is intentionally not
tracked against upstream — changes land here directly.
Comment thread
eschoeller marked this conversation as resolved.

SEPE-specific modifications on top of upstream:

- **AlmaLinux 8 base image.** Switched the Dockerfile from CentOS to AlmaLinux 8,
replaced `yum` with `dnf`, enabled the `powertools` repository, pinned Python
to `python39`, and bumped the Node.js tooling used to build the action.
- **Patch file support.** `src/main.ts` copies any `*.patch` files from the
repo root into `/github/home/rpmbuild/SOURCES/` before invoking `rpmbuild`,
so spec files can reference them via standard `Patch0:`/`Patch1:`/...
declarations. No-op if the repo has no patch files.

Before making further changes, verify the divergence from upstream
(`naveenrajm7/rpmbuild`) and update this notice.

## Usage
### Pre-requisites
Expand Down
11 changes: 11 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ async function run() {
await exec.exec(`ln -s /github/home/rpmbuild/SOURCES/${name}-${version}.tar.gz /github/home/rpmbuild/SOURCES/${name}.tar.gz`);
process.env.GIT_DIR = oldGitDir;

// Copy any *.patch files from the repo root into SOURCES so spec files
// can reference them via standard Patch0:/Patch1:/... declarations.
// No-op if the repo has no patch files.
const workspaceFiles = fs.readdirSync('/github/workspace');
for (const f of workspaceFiles) {
if (f.endsWith('.patch')) {
console.log(`Copying patch file to SOURCES: ${f}`);
await exec.exec(`cp /github/workspace/${f} /github/home/rpmbuild/SOURCES/`);
Comment thread
eschoeller marked this conversation as resolved.
Outdated
}
}

// Installs additional repositories
const additionalRepos = core.getInput('additional_repos'); // user input, eg: '["centos-release-scl"]'
if (additionalRepos) {
Expand Down