rpms/flumotion/devel flumotion.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Ralf Corsepius rc040203 at freenet.de
Mon Apr 25 15:17:18 UTC 2005


On Mon, 2005-04-25 at 16:40 +0200, Michael Schwendt wrote:
> On Thu, 21 Apr 2005 19:00:32 +0200, Ralf Corsepius wrote:
> 
> > On Thu, 2005-04-21 at 12:40 -0400, Thomas Vander Stichele wrote:
> > 
> > > Requires(post):	openssl
> > 
> > > %post
> > > /sbin/chkconfig --add flumotion
> > > # generate a default .pem certificate ?
> > > PEM_FILE="%{_sysconfdir}/flumotion/default.pem"
> > > if ! test -e ${PEM_FILE}
> > > then
> > >   sh %{_datadir}/ssl/certs/make-dummy-cert ${PEM_FILE}
> > 
> > This is not quite correct.
> > 
> > %{_datadir} is a property of this package, this scriptlet however is
> > expecting /usr/share/ssl/certs/make-dummy-cert (A property currently
> > being provided by openssl)
> > 
> > 
> > Therefore I'd recommend you to change
> > 
> > Requires(post): openssl
> > into
> > Requires(post): /usr/share/ssl/certs/make-dummy-cert
> > 
> > and to use
> > /usr/share/ssl/certs/make-dummy-cert instead of 
> > %{_datadir}/ssl/certs/make-dummy-cert
> > 
> > This might seem negligible to you, but it makes a substantial difference
> > should the location of make-dummy-cert change, or openssl be replaced by
> > another package.
> 
> Skimming over the FC-3 openssl.spec, it installs the file as
> 
>   %{_datadir}/ssl/certs/make-dummy-cert

This is the %_datadir as being used when building openssl.


> Hence "Requires: %{_datadir}/ssl/certs/make-dummy-cert" looks correct.

And this is the %{_datadir} as being used when building flumotion.

These are different %{_datadir}'s. 

> If both packages are rebuilt with a different %_datadir, they would
> still work.

Here you say it: "if .. both .. packages". I.e. if the default value for
%_datadir as being provided by rpmbuild changes globally.

That's why an "FE/FC" build system will not notice the difference.
 
However, %_datadir is a per-package command line parameter to rpmbuild,
and which can be overridden at any time (--define is documented, cf.
rpmbuild --help). 

You are simply ignoring this fact, and instead are blindly relying on
every build run to use the same parameter (here defaults as implicitly
provided by rpm).

> That's how package dependencies work in a given context. You don't just
> depend on the expanded path /usr/share/ssl/certs/make-dummy-cert, because
> the openssl package doesn't hardcode that path. It uses %_datadir, and as long
> as it does that, staying in sync with it is added value.
No.

flumotion's call to make-dummy-cert depends on the value of %_datadir as
it had been used when openssl had been built. This is not the same
_datadir as it is being used when building flumotion.

They just carry the same value when blindly relying on the defaults.

Anyway, apparently we do not share the same view, this issue is not
worth further fretting over, so I'll keep my face shut and leave it up
to you to shoot yourself into the foot ;-)

Ralf





More information about the scm-commits mailing list