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 13:27:56 UTC 2005


On Mon, 2005-04-25 at 14:12 +0200, Thomas Vander Stichele wrote:
> Hi Ralf,
> 
> > > Can you tell me what the exact difference will be here ?
> > It's a matter of ownership.
> > 
> > %{_datadir} is a property of the package/rpm-spec you are currently
> > building, it is by no means related/coupled to the directory being used
> > by make-dummy-cert.
> > 
> > Try 
> > rpmbuild --define '_datadir /tmp/foo'
> > then you probably understand the difference.
> 
> I should have clarified - what is the difference in *practice* ? Any
> spec can be made to break easily by doing stuff like this.
I have to disagree, things like this don't break proper rpms.

I am fairly frequently doing this when testing rpms.

> If you are saying that Flumotion's post script will break because
> someone is installing an openssl rpm from some other distro that puts %
> {_datadir} in /myowntree/share, then yes, you're right.

No, I am saying this package's %post scriptlets depends on
/usr/share/ssl/certs/make-dummy-cert

and does not depend on
%{_datadir}/ssl/certs/make-dummy-cert

nor does it depend on
openssl

(Note: I am talking about the scriptlet, only.
 There could be other dependencies on openssl)

>   However, it
> will break both ways.

Yes, it will break and it must break - That's the rationale behind
dependencies.

>   I don't see what's the practical difference.
ATM, The practical difference for packages only being build as part of
FE or FC is close to zero.

It's as close to zero as the difference between %{_infodir}
and /usr/share/info, or as %{_libdir} and /usr/lib.

The actual practical question is "What is an input parameter to
rpmbuild'ing this package?":

One input parameter is _datadir. Another, different input parameter
is /usr/share/../make-dummy-cert.

It's just the lucky coincidence that the default for %_datadir as being
used for "rpmbuild flumotion.spec" matches the %_datadir had been used
when "rpmbuild openssl.spec" had been run, which lets both appear to be
identical.

> > It will tell rpmbuild to install files using %_datadir into /tmp/foo,
> > but it will also bogusly tell the package to call 
> > /tmp/foo/..../make-dummy-cert
> > 
> > => The package depends on
> > /usr/share/ssl/certs/make-dummy-cert
> > and does _not_ depend on
> > %{_datadir}/ssl/certs/make-dummy-cert
> 
> 
> So you're saying basically I can choose between:
> 
> Requires(post): %{_datadir}/ssl/certs/make-dummy-cert
> 
> %post
> %{_datadir}/ssl/certs/make-dummy-cert

No, I am saying you should better use the hard-coded
/usr/share/ssl/certs/make-dummy-cert
instead of a using a macro there, because that's the actual file the
flumotion depends on.

> BTW, do you ever see anything else than openssl providing this file ?
> Looking at the script I would be willing to bet you a fair amount of
> money it won't :)

ATM, you are right, but do you know what future will bring?

May-be make-dummy-cert will be replaced by an alternative
implementation, may-be make-dummy-cert will be split out of openssl into
a different package?

Ralf





More information about the fedora-extras-commits mailing list