[CentOS-devel] freeradius-2.1.3 spec

Jeff Johnson n3npq at mac.com
Mon Mar 30 15:01:37 UTC 2009


On Mar 30, 2009, at 9:39 AM, Niels de Vos wrote:

> Jeff Johnson wrote:
>> On Mar 30, 2009, at 9:05 AM, Niels de Vos wrote:
>>
>>>> That isn't true for FC4 either. Its been almost a decade
>>>> since requires and prereq are handled identically.
>>> I'm not convinced on this point :-/ Pretty sure there is a  
>>> difference
>>> when installing only two RPMs with changed Requires/PreReq. However
>>> I checked with rpm, not yum?! (yes, without loops)
>>>
>>
>> So shop a different answer if you wish. I'm just the guy
>> who wrote the code in RPM and who tries to explain how to fix
>> packaging problems. If you don't like or believe my answers, by all
>> means, shop elsewhere.
>
> Please don't get me wrong, I'm grateful for you advise and  
> explanations.
>
> It's just that I've checked behavior of Requires/PreReq a long time  
> ago
> with FC4 and am surprised to see that my assumptions are (completely)
> wrong...
>

NP. I'm just trying for solid analysis of packaging problems. You're
not the only person who thinks that replacing Requires: with PreReq:
does something meaningful.

(aside)
There is most definitely an effect (because the dependency is
not ignored in a loop) if PreReq: instead of Requires: is
used. But its about *loops*, not some magical property
of PreReq:.

And relying on how RPM breaks loops is too obscure and feeble
for reliable packaging, because of nested dependency loops
and erasure ordering and ...

>
>>>> Otherwise, adding an additional dependency (use Requires: or
>>>> PreReq: to
>>>> taste, they are synonyms) will change package install (but not  
>>>> erase,
>>>> that's a different problem) ordering.
>>> Ok. Thanks for explaining :)
>>
>> Hint: there is almost certainly a dependency loop
>> because you are trying to use an executable in a
>> %pre script in the *-libs package that has not yet
>> been installed.
>>
>> So the library package needs to be installed before
>> the executable you are trying to use in a %pre script.
>
> The original question as about creating a user/group as owner of some
> files in the libs-package. The creation was done by %pre in the
> base-package. Installing the -libs works, but gives errors about the
> missing user/group.
>
> A missing binary or library is obviously not the case here.
>

OK, there's hope that the packaging can be adjusted to
fix the problem then. Note that I haven't looked at
the root cause of the problem, have just been responding
to the suggested replace with PreReq: as a solution.

>
>> That basically means that you cannot do what you are
>> attempting in the *-libs %pre script.
>>
>> Which then turns the question into
>> 	How do I do <mumble> if I can't use a %pre script
>> 	in a *-libs package?
>
> My conclusion:
> 	Put the creation of users/groups in the <package>-libs,
> 	<package> will be installed after <package>-libs.
>

That will most definitely work if *-libs is always the 1st
package of the set that needs the user/group added.

All other packages then need to depend on the 1st package
which adds the user/group. Either PreReq: or Requires:
should accomplish that.

No other adornment, like Requires(pre):, will be needed. You
can add the (pre) context marker in the *-libs package if
you wish; other packages should just use a Requires: (or
PreReq: if you want, it simply does not matter).

73 de Jeff


More information about the CentOS-devel mailing list