Skip to content

RedHat build scripts: support for overriding release#527

Open
mbert wants to merge 1 commit intotrunkmaster:masterfrom
mbert:rpmbuild
Open

RedHat build scripts: support for overriding release#527
mbert wants to merge 1 commit intotrunkmaster:masterfrom
mbert:rpmbuild

Conversation

@mbert
Copy link
Contributor

@mbert mbert commented Feb 24, 2026

This PR aims to provide better supports for frequent (nightly?) RPM builds from the master branch. The main obstacle is versioning: if a build comes out with the same version as the previous one, the RPMs are not cleanly upgradable. This is solved by making the Release field in the RPM version overridable and setting it from the command line. Along with this I have removed some boilerplate code and simplified the build automation (I hope you agree).

  1. All RedHat build scripts apart frombuild_all.sh can be called as before, i.e. with no arguments.
  2. Optionally, they can be called with a command line argument --release <release> which will cause <release> to override the respective values from the .spec files when building the RPMs.
  3. The build_all.sh script will now determine ${NEXTSPACE_DIR} automatically, i.e. no longer needs it as a command line argument. Also, optionally, it can be called the same way as the other build scripts and will pass on the release override.

Practical example:

DATE=$(date +%Y%m%d)
CMD="./build_all.sh --release ${DATE}"
echo "$CMD"
$CMD

The syntax for overriding stuff in the .spec files used by rpmspec and rpmbuild is awkward: --define "foo bar". I have opted not to use eval or bashisms which is why the two functions rpm_version() and run_rpmbuild() in Packaging/functions.sh got a bit lengthy.

Optionally this here could be used for setting up nightly builds from which people could pull the RPMs and update their installations. As a nice-to-have this also could help identifying regressions in the RPM builds early.

* Use the same entry point for calling `rpmbuild'
* The rpm release can be overridden by `--release <release>' from the CL
* Simplified build error handling
* Automatically determine ${NEXTSPACE_DIR} in `build_all.sh'
* Make `build_all.sh' work again
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.

1 participant