Skip to content

Instantly share code, notes, and snippets.

@andrewkroh
Last active December 9, 2020 22:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andrewkroh/1bb16441e36fbf65fba6 to your computer and use it in GitHub Desktop.
Save andrewkroh/1bb16441e36fbf65fba6 to your computer and use it in GitHub Desktop.
Changing RPM Version and Release with rpmrebuild
yum install rpmrebuild -y
mkdir output
# If your RPMs do not contain all of the tags defined in this preamble
# then use the --change-spec-preamble flag to modify the preamble.
cat /usr/lib/rpmrebuild/rpmrebuild_rpmqf.src
# Change the RPM's release number to 2. Ignore Distribution and URL.
rpmrebuild -p --notest-install \
--directory=output \
--change-spec-preamble='sed -e "s/^Distribution:.*//"' \
--change-spec-preamble='sed -e "s/^URL:.*//"' \
--release=2 my-cool-package-1.1_SNAPSHOT-1.noarch.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment