[Rpm-maint] Question about changing the name of an RPM

Mark Hatle mark.hatle at windriver.com
Wed Sep 3 18:11:07 UTC 2008

The filename does not affect the contents of the RPM package.

So if you set the "version" to 1, the release to "1".  And then name filename:


RPM is going to install the package using a version of 1 and a release of 1.

On many systems, the filename is truncated to be simply "foo.rpm" to allow for
ISO media.

(Short answer, if version or release are wrong, you need to rebuild to fix it.)


Andy Harrison wrote:
> Hash: SHA1
> On Wed, Aug 20, 2008 at 5:45 PM, Nitzan Gurfinkel  wrote:
>> I hope I'm on the right lit and I apologize if not.
>> During the build process the RPMs get their names through the following
>> Makefile line:
>> $(PKGDIR)/$(RPM_TEMPLATE) > $(PKGDIR)/$(RPM_TEMPLATE:%.tmpl=%.spec)
>> The final name looks like: host-
>> It turned out that there was a mistake in the build and $(RELEASETEXT)
>> should not be "pre" but a different string.
>> Is it OK to rename the file, or does the $(RELEASETEXT) somehow internally
>> integrated into the RPM and there is a need to build again?
> Although renaming the file won't break anything, you can tailor the
> name of the resulting rpm yourself anyway.  Without knowing your
> operating system and/or related versions, the default that rpm uses
> for naming is contained in the _build_name_fmt macro.  Were you to
> drop this in the ~/.rpmmacros file of the user performing the
> rpmbuild, your rpm name would be the same as the default:
> %_build_name_fmt    %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
> - --
> Andy Harrison
> public key: 0x67518262
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: http://getfiregpg.org
> iD8DBQFIvs1wNTm8fWdRgmIRAss1AJwMR4/0e1q/Br7elYbb3iGr8fDIvwCg+UAP
> v+mw4u8Bt0ybQw+H60y4UFg=
> =l2bL
> _______________________________________________
> Rpm-maint mailing list
> Rpm-maint at lists.rpm.org
> https://lists.rpm.org/mailman/listinfo/rpm-maint

More information about the Rpm-maint mailing list