Mailinglist Archive: opensuse-packaging (49 mails)

< Previous Next >
Re: [opensuse-packaging] Generalized %license <-> %doc macros backward compability patch
  • From: Mikhail Kasimov <mikhail.kasimov@xxxxxxxxx>
  • Date: Tue, 11 Dec 2018 13:41:04 +0200
  • Message-id: <CACQ1ekj93ScstX7ZgMLGR0W+H4wy=K0NZUbzj-29ZSYeJU329Q@mail.gmail.com>
Hello!

The problem for SLE_12_SP3_Backport (i586), in fact, looks more
specific, with "underwater stone":
https://bugzilla.opensuse.org/show_bug.cgi?id=1118751 . In particular
https://bugzilla.opensuse.org/show_bug.cgi?id=1118751#c7

've left patch code "long", as it was in initial variant, to avoid
potential "underwater stones" like mentioned above.

Thanks!
чт, 29 нояб. 2018 г. в 19:56, Christian Boltz <opensuse@xxxxxxxxx>:

Hello,

Am Donnerstag, 29. November 2018, 15:31:58 CET schrieb Mikhail Kasimov:
чт, 29 нояб. 2018 г. в 14:08, Neal Gompa <ngompa13@xxxxxxxxx>:
On Thu, Nov 29, 2018 Michael Schroeder <mls@xxxxxxx> wrote:
Can't you do something simple like (untested):

%{?!_licensedir:%define license %%doc}

This works for everyone but SLE 12 and SLE 12.1 (and corresponding
Leap derivative releases).

The reason it doesn't work is because %_licensedir is defined and
filesystem didn't own the directory. So the %license macro would
work, but OBS would reject the package anyway. That was fixed in
SLE 12.2.
...
fprobe-1.1-23.1.i586.rpm: directories not owned by a package: -
/usr/share/licenses).

The same is to the second package. Me surprised... Ideas?

You could add
%dir /usr/share/licenses
to %files. Even if you add version checks for the (IIRC) two
distributions where this directory isn't owned by aaa_base, the spec
will still look much cleaner than the big chain of version checks in
your initial proposal ;-)

"Can't you do something simple like (untested):
%{?!_licensedir:%define license %%doc}" <-- I'm very сareful on
"simplifications" instead of giving explicit constructions. In what
exact location of spec file such construction should be put?

AFAIK at or near the beginning, so that %license is defined when it gets
used ;-)


Regards,

Christian Boltz
--
höflich
Erklärung auf einem Niveau, das nicht vorsätzlich das Gegenüber
als Volltrottel hinstellt. [Lars Marowsky-Brée]



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

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

< Previous Next >
This Thread
  • No further messages