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

Andy Harrison aharrison at gmail.com
Wed Sep 3 17:46:24 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
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:
>
> $(M4) -DBUILDNUMBER=$(BUILDNUMBER) -DUSERNAME=$(USERNAME)
> -DRELEASETEXT=$(RELEASETEXT) -I$(RPM_TMPL_DIR) $(EXTRA_M4DEFINES)
> $(PKGDIR)/$(RPM_TEMPLATE) > $(PKGDIR)/$(RPM_TEMPLATE:%.tmpl=%.spec)
>
> The final name looks like: host-1.1.1.22222-pre.XXX.rpm
>
> 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


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: http://getfiregpg.org

iD8DBQFIvs1wNTm8fWdRgmIRAss1AJwMR4/0e1q/Br7elYbb3iGr8fDIvwCg+UAP
v+mw4u8Bt0ybQw+H60y4UFg=
=l2bL
-----END PGP SIGNATURE-----



More information about the Rpm-maint mailing list