Skip to content

Instantly share code, notes, and snippets.

@billyteves
Forked from andrewkroh/rpmrebuild.sh
Created December 4, 2017 13:31
Show Gist options
  • Save billyteves/56955192ebf6477044b5b8065984187c to your computer and use it in GitHub Desktop.
Save billyteves/56955192ebf6477044b5b8065984187c 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