On Thu, Nov 6, 2014 at 6:58 PM, Patrick Ohly <[email protected]> wrote:
> On Thu, 2014-11-06 at 17:18 +0100, Dominig ar Foll wrote:
> > Best practice is to defined option variable via %bcond as it allows to
> > read the default options in an easy way and they can be changed in the
> > rpm command line and add a comment in the spec file.
>
> So bcond is staying as the recommended approach?
>
> I remember an Intel-internal discussion where it was pointed out that
> when inheriting from a project in OBS, the choice of the parent project
> for enabling or disabling something cannot be overridden anymore when
> using bcond.
>
> Ed Bartosh then proposed to use simple macros instead of bconds. Instead
> of:
> %if %{with pulseaudio_samsung_policy}
>
> the spec file would use:
> %if 0%{?_with_pulseaudio_samsung_policy}
>
> Is that proposal dead?
>
Do you see any benefits with this over what Dominig was proposing?
> > For more info of rpm behaviour see :
> > https://en.opensuse.org/openSUSE:Build_Service_prjconf#Macros
>
> For Tizen, https://wiki.tizen.org/wiki/Packaging/Guidelines is the only
> (?!) page we have that explains what a spec file for Tizen should look
> like.
>
> Unfortunately a lot of information is missing:
> * bconds not mentioned at all
>
This page is poorly maintained but we should add bcond info there.
> * no list of recommended and/or available macros
>
> For example, how is one supposed to know that %cmake is better than just
> cmake, or that %{_docdir}/.. should better be %{_datadir}/doc?
>
That's slightly off topic and also something we cannot fully control
because
many of the macros are coming from upstream projects directly:
root@ivi_box:~# rpm -q --whatprovides /etc/rpm/*
cmake-2.8.11.2-5.1.i686
file /etc/rpm/macros.imgcreate is not owned by any package
perl-5.16.3-6.6.i686
prelink-20111012-4.1.i686
python-2.7.8-5.4.i686
shared-mime-info-1.0-4.1.i686
systemd-212-1.1.i686
However, the ones /usr/lib/rpm/tizen/macros (if there's anything missing)
we can
add to the wiki. As far as I can see, many of the macros are already
described there
(other than bcond).
There's only one issue I'm seeing: the RPM path macros are not following
the tizen-platform-config data (or vice versa).
> I would update the page, except that I don't know the answers. Who does?
>
> Regarding bconds or macros (whatever we use), we should maintain a list
> of them in the Wiki. I volunteer to populate the list by grepping
> existing .spec files, but first we should clarify what the desired
> approach is.
>
>
With the current approach, the ones that are globally enabled are defined
in the OBS
config and the ones that are disabled are not there.
For example: you cannot find _with_x in the IVI OBS config because X is not
enabled.
-- Mikko
_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev