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:

foo-2-300.bar.rpm

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.)

--Mark

Andy Harrison wrote:
> -----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-----
> _______________________________________________
> Rpm-maint mailing list
> Rpm-maint@lists.rpm.org
> https://lists.rpm.org/mailman/listinfo/rpm-maint

_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to