Re: Specfile question about %{?dist}



Martin Tarenskeen wrote:

Hi,

I have a Fedora FC5 running hapily on my laptop. Regularly I build my own
RPM packages, starting from *.src.rpm source packages and applying my
personal patches.

In the header of some SPEC files I find something like:

Release: 3%{?dist}

Which should - I guess - automatically be expanded to "3.fc5" while
building the rpm package. But on my system this is ignored and the built
package will only have "3" as release number. No big deal, but what's
missing on my system ? Maybe I should edit the rpm macro files somewhere ?

No it is not automatically expanded to show the distro version, you need to
supply the information by adding it to the spec file or when typing the
rpmbuild command;

Spec file addition: %define dist .fc5
rpmbuild -bb --define 'dist .fc5' foo.spec

What really makes this fun is when you use the define statement the binary
packagename(s) results can be different;

rpmbuild -bb --define 'dist .xyz' foo.spec

The resulting binary rpm package(s0 will have .xyz as part of the package
name. Consider that setting the define dist statement as a quick and easy
way to know if the packages are meant for the distro in question.


--
Contained within the Microsoft EULA;
This Limited Warranty is void if failure of the Product has resulted
from accident, abuse, misapplication, abnormal use or a virus.
.



Relevant Pages

  • Re: [SLE] samba 3.0.7 from suse.com on 8.2 pro (SMP) does not work
    ... I am on a very similar platform, also SuSE 8.2 Prof., and I have updated Samba ... using the very same rpm packages you mention and everything is working just ...
    (SuSE)
  • Re: when rpm --rebuilddb doesnt work! what next?
    ... > rotated by log rotate), and you have available the rpm packages (On CD, in ... redhat-linux/redhat for a lot of files. ... Sort that list and you should have a list of all the packages installed on ...
    (RedHat)
  • Re: The GNU Ada: Homepage online.
    ... >> creating RPM packages. ... >> of rpm based packages out of the door. ... > I'm starting to work on the transition from gnat to GCC 4.1 now. ... BTW: There is a 2nd part to the project: A repository of script files to ...
    (comp.lang.ada)
  • Re: Disk defragmenter in Linux
    ... RPM packages are supposed to create a .rpmnew file if the preexisting configuration files are modifed. ... The rules governing such changes are documented in detail in several guides. ... If packages dont honor such rules then it can be consider a bug with those specific packages rather than RPM itself. ... Do file bug reports as appropriate. ...
    (Fedora)
  • Re: [SLE] Rebuilding the SUSE src.rpm for KDE3.2
    ... > compiling goes on, but then ends with: ... > building the rpms that the problem occurs. ... > various mods to the spec file too, ... > made sure they are all installed as well as their -devel packages. ...
    (SuSE)