Mailinglist Archive: opensuse-packaging (23 mails)

< Previous Next >
Re: [opensuse-packaging] very weird packaging problem on Leap 15.0
  • From: Thomas Schraitle <toms@xxxxxxx>
  • Date: Sun, 23 Sep 2018 14:46:27 +0200
  • Message-id: <1548720.P12IURFagv@erde>
Hi Mathias,

Am Sonntag, 23. September 2018, 10:29:41 CEST schrieb Mathias Homann:

I'm having a really strange packaging issue on Leap 15.0:

the %files se4ction of my spec file fails!
here's the part of the spec file in question:

%doc $RPM_BUILD_DIR/%{_srcname}/build-linux-%{_arch}/newview/packaged/*.txt

IMHO this looks wrong.

If you need to include documentation into your package, use relative paths.
Depending on the structure of your archive, it could mean you use:

%doc newview/packaged/*.txt

Probably your archive contains more files that the above. Maybe it contains
README files, Changelog, NEWS etc.? Depending on what you consider meaningful,
you should add them to your %doc section too:



For all three lines you should use the %_datadir macro instead of /usr/share:


Although it means the same, you should avoid hard-coded paths.

On every suse version until now this had worked just fine, but on 15.0 it
almost looks as if $RPM_BUILD_DIR is not defined anymore, or as if variables
are not expanded anymore at that point.

I vaguely remember that $RPM_BUILD_DIR should be replaced(?) in favor of the
%buildroot macro, but I may be wrong.

However, regardless of this issue, you should neither use $RPM_BUILD_DIR nor
the %{buildroot} macro inside %doc. I never saw absolute paths in %doc
(although it could work, as you proofed it with your previous versions). In
99% you should use the above lines. :)

Hope that helps. :)

Thomas Schraitle

SUSE LINUX Products GmbH (o<
Maxfeldstrasse 5 /\\ Documentation Specialist
90409 Nuernberg, Germany _\_v | HRB 21284
SUSE LINUX GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu,
Graham Norton, HRB 21284 (AG Nürnberg)

To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >