[repo-coord] Repo information inside rpm?

Morten Kjeldgaard mok at imsb.au.dk
Fri Aug 13 19:55:07 CEST 2004


> + Why would you put the language in there ?

Because some repos, like for example ATrpms, have a language component in 
the path:

rpm http://apt.physik.fu-berlin.de/ fedora/1/en/i386 at-stable
                                              ^^
> + Why would you put the architecture in there ? It's already part of the
>   package.

Yes, but the apt convention is to put both i386, noarch etc. RPMs into the 
same directory called "i386". You yourself have "i386" and "x86_64" 
directories in your repo. So "arch" has to do with the repo organization, 
not the RPM itself.

> + What is the comp supposed to mean, and if it means component or a

"comp" is the component, typically "os", "updates", "stable", "freshrpms" 
etc. In apt terms, it is the blabla what comes in the end of the 
RPMS.blabla directory name.

>   seperate repository, it would mean you can't move it later without
>   rebuilding ?

Right. Not if you want to keep things consistent. On the other hand, how 
often do you move a package from one component to another?? Perhaps from 
"unstable" to "testing" and later to "stable", but then it probably 
requires rebuilding anyway.

> Also, we are already using %dist for the visible disttag being rh8, fc2
> or el3. The real release however adds a number to the release like: 0.rh8,
> 1.el3 and 1.fc2.

You can call the variable anything you want. I admit this is confusing. I 
am now using %{reltag} for that, because fc1, fc2 etc. are really 
_releases_ of the _same_ distribution (Fedora). When I first set up my 
repo, I followed the recommendation on Matthias' site, but without the 
"language" directory. So my "xray" component goes into:

  /home/apt/fedora/1/i386/RPMS.xray
            ^      ^ ^         ^
            |      | |         |
            |      | |         %{comp}
            |      | %{arch}
            |      %{rel}
            %{dist}

But I call my packages:

      package-1.1-1.fc1.mok.noarch.rpm
              ^   ^ ^   ^
              |   | |   |
              |   | |   %{repotag}
              |   | %{reltag}
              |   %{release} (defined by rpm)
              %{version}     (   -    -   - )

so you see %{reltag} != %{rel}, and %{arch} != rpmarch. (I use "fc1", not 
"1.fc1" etc).

> Well, I think some of the values would be useful to have, but I don't
> think you're doing it for the right reasons. If the goal is to extract an
> Apt/Yum location, I don't think that is a good idea. What about i568
> packages that are part of the i386 repository or even x86_64 ? What about
> noarch packages ?

Not a problem, as explained above. I can tell you are confused ;-)

> Why do you want to extract an Apt location ?

That's a very good question! Well, first of all, I want to use it when I 
build packages. When building, my packages end up in the place defined by 
%_rpmdir and %_srcrpmdir. I am really tired of moving the packages by hand 
to my apt directory. I keep making mistakes. If the package contains the 
apt location, I can write a script to move it over.

Secondly, say you find a neat package somewhere, and say "I'd like more 
stuff from this repo". Well, you can extract the apt location and see what 
is there.

Thirdly, having the repo information there <em> will tell you where to go 
to resolve dependencies </em>. This could be extremely useful in the 
future as apt/yum tools become smarter and smarter.

Cheers,
Morten



More information about the repo-coord mailing list