Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-06 Thread Michal Schorm
I further discussed it with Neil.

We came to a compromise.
We will document this macro and its potential usage, as well as the
warning why and when it shouldn't be used; and an information that it
will be removed in some future Fedora release.

I've made a PR to the Docs [1], we should discuss its wording further there.

Once the PR is accepted, the maintainers will be allowed to use this
macro for the special compatibility reasons we talked about here,
knowing of the drawbacks. (unstable private macro that will be
removed)

[1] https://pagure.io/packaging-committee/pull-request/1012

--

Michal Schorm
Software Engineer
Core Services - Databases Team
Red Hat

--

On Thu, Aug 6, 2020 at 1:13 PM Richard Shaw  wrote:
>
> On Thu, Aug 6, 2020 at 5:35 AM Neal Gompa  wrote:
>>
>> On Thu, Aug 6, 2020 at 6:20 AM Michal Schorm  wrote:
>> >
>> > On Tue, Aug 4, 2020 at 5:54 PM Neal Gompa  wrote:
>> > > > On Tue, Aug 4, 2020 at 3:12 PM Neal Gompa  wrote:
>> > > > > You are not supposed to use %__cmake_builddir.
>> > >
>> > > It is not documented, and eventually will be removed. So don't rely on
>> > > it. If you want to change the build directory, set %_vpath_builddir
>> > > instead.
>> >
>> > Well, just make it documented ?
>> >
>>
>> The %_vpath_builddir macro is *already* documented:
>> https://docs.fedoraproject.org/en-US/packaging-guidelines/vpath/
>
>
> Ok, that helps, but it's rather non-intuitive that it's not with the CMake 
> packaging guidelines. A link would be nice from there would be nice.
>
> Thanks,
> Richard
> ___
> devel mailing list -- devel@lists.fedoraproject.org
> To unsubscribe send an email to devel-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-06 Thread Neal Gompa
On Thu, Aug 6, 2020 at 7:12 AM Richard Shaw  wrote:
>
> On Thu, Aug 6, 2020 at 5:35 AM Neal Gompa  wrote:
>>
>> On Thu, Aug 6, 2020 at 6:20 AM Michal Schorm  wrote:
>> >
>> > On Tue, Aug 4, 2020 at 5:54 PM Neal Gompa  wrote:
>> > > > On Tue, Aug 4, 2020 at 3:12 PM Neal Gompa  wrote:
>> > > > > You are not supposed to use %__cmake_builddir.
>> > >
>> > > It is not documented, and eventually will be removed. So don't rely on
>> > > it. If you want to change the build directory, set %_vpath_builddir
>> > > instead.
>> >
>> > Well, just make it documented ?
>> >
>>
>> The %_vpath_builddir macro is *already* documented:
>> https://docs.fedoraproject.org/en-US/packaging-guidelines/vpath/
>
>
> Ok, that helps, but it's rather non-intuitive that it's not with the CMake 
> packaging guidelines. A link would be nice from there would be nice.
>

It is linked from the CMake packaging guidelines page, the hyperlink labeled
"Defining source and build directories" points to that page.




--
真実はいつも一つ!/ Always, there's only one truth!
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-06 Thread Richard Shaw
On Thu, Aug 6, 2020 at 5:35 AM Neal Gompa  wrote:

> On Thu, Aug 6, 2020 at 6:20 AM Michal Schorm  wrote:
> >
> > On Tue, Aug 4, 2020 at 5:54 PM Neal Gompa  wrote:
> > > > On Tue, Aug 4, 2020 at 3:12 PM Neal Gompa 
> wrote:
> > > > > You are not supposed to use %__cmake_builddir.
> > >
> > > It is not documented, and eventually will be removed. So don't rely on
> > > it. If you want to change the build directory, set %_vpath_builddir
> > > instead.
> >
> > Well, just make it documented ?
> >
>
> The %_vpath_builddir macro is *already* documented:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/vpath/


Ok, that helps, but it's rather non-intuitive that it's not with the CMake
packaging guidelines. A link would be nice from there would be nice.

Thanks,
Richard
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-06 Thread Neal Gompa
On Thu, Aug 6, 2020 at 6:43 AM Michal Schorm  wrote:
>
> On Thu, Aug 6, 2020 at 12:35 PM Neal Gompa  wrote:
> >
> > On Thu, Aug 6, 2020 at 6:20 AM Michal Schorm  wrote:
> > >
> > > On Tue, Aug 4, 2020 at 5:54 PM Neal Gompa  wrote:
> > > > > On Tue, Aug 4, 2020 at 3:12 PM Neal Gompa  wrote:
> > > > > > You are not supposed to use %__cmake_builddir.
> > > >
> > > > It is not documented, and eventually will be removed. So don't rely on
> > > > it. If you want to change the build directory, set %_vpath_builddir
> > > > instead.
> > >
> > > Well, just make it documented ?
> > >
> >
> > The %_vpath_builddir macro is *already* documented:
> > https://docs.fedoraproject.org/en-US/packaging-guidelines/vpath/
>
> But it doesn't do what we need.
> This %_vpath_builddir macro gives a path to the defined builddir.
>
> While %__cmake_builddir macro gives a path to the *actual* directory
> that was used as a builddir.
> Which is a huge difference, especially, when we talk about unifying
> SPECfiles for F31, F32 and F33.
>
> I see the macro defined as:
> %__cmake_builddir
> %{!?__cmake_in_source_build:%{_vpath_builddir}}%{?__cmake_in_source_build:.}
> This very line will either be in the
> "/usr/lib/rpm/macros.d/macros.cmake" from the
> "cmake-rpm-macros.noarch" package, or in every SPECfile that needs
> this macro.
>
> Why can't it be part of the standard CMake macros set, given that it
> does a different thing than %_vpath_builddir ?
>

I don't want to document something that I don't want to guarantee as
an interface. That knob will eventually be removed (probably in a
couple of Fedora releases). When I do that, %_vpath_builddir will
always directly map to the build directory passed to CMake.


-- 
真実はいつも一つ!/ Always, there's only one truth!
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-06 Thread Michal Schorm
On Thu, Aug 6, 2020 at 12:35 PM Neal Gompa  wrote:
>
> On Thu, Aug 6, 2020 at 6:20 AM Michal Schorm  wrote:
> >
> > On Tue, Aug 4, 2020 at 5:54 PM Neal Gompa  wrote:
> > > > On Tue, Aug 4, 2020 at 3:12 PM Neal Gompa  wrote:
> > > > > You are not supposed to use %__cmake_builddir.
> > >
> > > It is not documented, and eventually will be removed. So don't rely on
> > > it. If you want to change the build directory, set %_vpath_builddir
> > > instead.
> >
> > Well, just make it documented ?
> >
>
> The %_vpath_builddir macro is *already* documented:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/vpath/

But it doesn't do what we need.
This %_vpath_builddir macro gives a path to the defined builddir.

While %__cmake_builddir macro gives a path to the *actual* directory
that was used as a builddir.
Which is a huge difference, especially, when we talk about unifying
SPECfiles for F31, F32 and F33.

I see the macro defined as:
%__cmake_builddir
%{!?__cmake_in_source_build:%{_vpath_builddir}}%{?__cmake_in_source_build:.}
This very line will either be in the
"/usr/lib/rpm/macros.d/macros.cmake" from the
"cmake-rpm-macros.noarch" package, or in every SPECfile that needs
this macro.

Why can't it be part of the standard CMake macros set, given that it
does a different thing than %_vpath_builddir ?

--

Michal Schorm
Software Engineer
Core Services - Databases Team
Red Hat
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-06 Thread Neal Gompa
On Thu, Aug 6, 2020 at 6:20 AM Michal Schorm  wrote:
>
> On Tue, Aug 4, 2020 at 5:54 PM Neal Gompa  wrote:
> > > On Tue, Aug 4, 2020 at 3:12 PM Neal Gompa  wrote:
> > > > You are not supposed to use %__cmake_builddir.
> >
> > It is not documented, and eventually will be removed. So don't rely on
> > it. If you want to change the build directory, set %_vpath_builddir
> > instead.
>
> Well, just make it documented ?
>

The %_vpath_builddir macro is *already* documented:
https://docs.fedoraproject.org/en-US/packaging-guidelines/vpath/



-- 
真実はいつも一つ!/ Always, there's only one truth!
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-06 Thread Michal Schorm
On Tue, Aug 4, 2020 at 5:54 PM Neal Gompa  wrote:
> > On Tue, Aug 4, 2020 at 3:12 PM Neal Gompa  wrote:
> > > You are not supposed to use %__cmake_builddir.
>
> It is not documented, and eventually will be removed. So don't rely on
> it. If you want to change the build directory, set %_vpath_builddir
> instead.

Well, just make it documented ?

Otherwise I probably would literally copy it to all of my SPECfiles ... .
And from other replies I see I most likely won't be the only one who
needs *exactly* behaviour of that macro. (To find out what the
builddir path is; without need of changing it)
It only makes sense to provide it in some central place - like among
cmake macros - to avoid a lot of code duplication.

The only other solution I see for now would be to change the builddir
to some other location and use that around the SPECfile.
But ... why? The re-defining of the location from a standard (for
Fedora CMake SPECs) location neither does bring any benefit, nor do we
actually want to do it.

The solution is already in-place. And already we know we will want to
use this macro (To find out what the builddir path is) in the future.
If documenting it and making it "stable" is the only thing needed, I
see it as a max. 5 minute work to save *a lots* of 5-minute work from
others. (For each one per each SPECfile)

Maybe there are some real issues behind the macro which makes it hard
to standardize.
I'd like if you share them in that case, so we might come up with a
better solution together, on this list.

--

Michal Schorm
Software Engineer
Core Services - Databases Team
Red Hat
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-04 Thread Richard Shaw
On Tue, Aug 4, 2020 at 11:47 AM Neal Gompa  wrote:

> On Tue, Aug 4, 2020 at 11:50 AM Michal Schorm  wrote:
> >
> > On Tue, Aug 4, 2020 at 3:12 PM Neal Gompa  wrote:
> > > On Tue, Aug 4, 2020 at 9:10 AM Richard Shaw 
> wrote:
> > > > On Tue, Aug 4, 2020 at 6:17 AM Michal Schorm 
> wrote:
> > > >>
> > > >> Since this change, all (subsequent) CMake commands (after "%cmake")
> > > >> MUST be used with the builddir argument ( "-B %{__cmake_builddir}"
> ).
> > > >
> > > > Ok, I'll use that in the future, but it still needs a mention in the
> guidelines :)
> > > >
> > > You are not supposed to use %__cmake_builddir.
> >
> > You say I'm not supposed to use that macro, but that's exactly the macro
> I need.
> >
> > > That macro only exists
> > > so we don't have to mutate %_vpath_builddir when switching behaviors
> > > through %__cmake_in_source_build.
> >
> > Any other way would do exactly what you just wrote here - I would be
> > re-implementing this macro - which doesn't make sense.
> >
> > I'm open to new ideas, but this (using the "%__cmake_builddir" )
> > sounds like the most straightforward and easy way to do it.
> >
>
> It is not documented, and eventually will be removed. So don't rely on
> it. If you want to change the build directory, set %_vpath_builddir
> instead.
>

In my case I don't want to change it, I just need to know what it is for
some of my projects.

Thanks,
Richard
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-04 Thread Neal Gompa
On Tue, Aug 4, 2020 at 11:50 AM Michal Schorm  wrote:
>
> On Tue, Aug 4, 2020 at 3:12 PM Neal Gompa  wrote:
> > On Tue, Aug 4, 2020 at 9:10 AM Richard Shaw  wrote:
> > > On Tue, Aug 4, 2020 at 6:17 AM Michal Schorm  wrote:
> > >>
> > >> Since this change, all (subsequent) CMake commands (after "%cmake")
> > >> MUST be used with the builddir argument ( "-B %{__cmake_builddir}" ).
> > >
> > > Ok, I'll use that in the future, but it still needs a mention in the 
> > > guidelines :)
> > >
> > You are not supposed to use %__cmake_builddir.
>
> You say I'm not supposed to use that macro, but that's exactly the macro I 
> need.
>
> > That macro only exists
> > so we don't have to mutate %_vpath_builddir when switching behaviors
> > through %__cmake_in_source_build.
>
> Any other way would do exactly what you just wrote here - I would be
> re-implementing this macro - which doesn't make sense.
>
> I'm open to new ideas, but this (using the "%__cmake_builddir" )
> sounds like the most straightforward and easy way to do it.
>

It is not documented, and eventually will be removed. So don't rely on
it. If you want to change the build directory, set %_vpath_builddir
instead.



--
真実はいつも一つ!/ Always, there's only one truth!
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-04 Thread Michal Schorm
On Tue, Aug 4, 2020 at 3:12 PM Neal Gompa  wrote:
> On Tue, Aug 4, 2020 at 9:10 AM Richard Shaw  wrote:
> > On Tue, Aug 4, 2020 at 6:17 AM Michal Schorm  wrote:
> >>
> >> Since this change, all (subsequent) CMake commands (after "%cmake")
> >> MUST be used with the builddir argument ( "-B %{__cmake_builddir}" ).
> >
> > Ok, I'll use that in the future, but it still needs a mention in the 
> > guidelines :)
> >
> You are not supposed to use %__cmake_builddir.

You say I'm not supposed to use that macro, but that's exactly the macro I need.

> That macro only exists
> so we don't have to mutate %_vpath_builddir when switching behaviors
> through %__cmake_in_source_build.

Any other way would do exactly what you just wrote here - I would be
re-implementing this macro - which doesn't make sense.

I'm open to new ideas, but this (using the "%__cmake_builddir" )
sounds like the most straightforward and easy way to do it.

--

Michal Schorm
Software Engineer
Core Services - Databases Team
Red Hat
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-04 Thread Christoph Junghans
On Tue, Aug 4, 2020 at 7:22 AM Tom Hughes via devel
 wrote:
>
> On 04/08/2020 14:11, Neal Gompa wrote:
> > On Tue, Aug 4, 2020 at 9:10 AM Richard Shaw  wrote:
> >>
> >> On Tue, Aug 4, 2020 at 6:17 AM Michal Schorm  wrote:
> >>>
> >>> Since this change, all (subsequent) CMake commands (after "%cmake")
> >>> MUST be used with the builddir argument ( "-B %{__cmake_builddir}" ).
> >>
> >>
> >> Ok, I'll use that in the future, but it still needs a mention in the 
> >> guidelines :)
> >>
> >
> > You are not supposed to use %__cmake_builddir. That macro only exists
> > so we don't have to mutate %_vpath_builddir when switching behaviors
> > through %__cmake_in_source_build.
>
> Surely that's exactly the advantage of using %__cmake_builddir, that it
> points at the place that was actually used for the build regardless of
> whether in source builds are enabled or disabled...
I had to do some similar hackery to make the legion package build
again after the cmake changes:
https://src.fedoraproject.org/rpms/legion/c/bebc0d947b45caa64941507f0f21306b11d87f73?branch=master
certainly not the most elegant way.

My question is if one can set __cmake_builddir to shell variable,
which expands later, something like:

%build
%global __cmake_builddir ${mpi:-serial}
. /etc/profile.d/modules.sh
for mpi in '' mpich openmpi ; do
  test -n "${mpi}" && module load mpi/${mpi}-%{_arch}
  %cmake
  %cmake_build
  test -n "${mpi}" && module unload mpi/${mpi}-%{_arch}
done

But I am not 100% sure about the expansion order.

Christoph

>
> Tom
>
> --
> Tom Hughes (t...@compton.nu)
> http://compton.nu/
> ___
> devel mailing list -- devel@lists.fedoraproject.org
> To unsubscribe send an email to devel-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org



-- 
Christoph Junghans
Web: http://www.compphys.de
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-04 Thread Tom Hughes via devel

On 04/08/2020 14:11, Neal Gompa wrote:

On Tue, Aug 4, 2020 at 9:10 AM Richard Shaw  wrote:


On Tue, Aug 4, 2020 at 6:17 AM Michal Schorm  wrote:


Since this change, all (subsequent) CMake commands (after "%cmake")
MUST be used with the builddir argument ( "-B %{__cmake_builddir}" ).



Ok, I'll use that in the future, but it still needs a mention in the guidelines 
:)



You are not supposed to use %__cmake_builddir. That macro only exists
so we don't have to mutate %_vpath_builddir when switching behaviors
through %__cmake_in_source_build.


Surely that's exactly the advantage of using %__cmake_builddir, that it
points at the place that was actually used for the build regardless of
whether in source builds are enabled or disabled...

Tom

--
Tom Hughes (t...@compton.nu)
http://compton.nu/
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-04 Thread Neal Gompa
On Tue, Aug 4, 2020 at 9:10 AM Richard Shaw  wrote:
>
> On Tue, Aug 4, 2020 at 6:17 AM Michal Schorm  wrote:
>>
>> Since this change, all (subsequent) CMake commands (after "%cmake")
>> MUST be used with the builddir argument ( "-B %{__cmake_builddir}" ).
>
>
> Ok, I'll use that in the future, but it still needs a mention in the 
> guidelines :)
>

You are not supposed to use %__cmake_builddir. That macro only exists
so we don't have to mutate %_vpath_builddir when switching behaviors
through %__cmake_in_source_build.



-- 
真実はいつも一つ!/ Always, there's only one truth!
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-04 Thread Richard Shaw
On Tue, Aug 4, 2020 at 6:17 AM Michal Schorm  wrote:

> Since this change, all (subsequent) CMake commands (after "%cmake")
> MUST be used with the builddir argument ( "-B %{__cmake_builddir}" ).
>

Ok, I'll use that in the future, but it still needs a mention in the
guidelines :)

Thanks,
RIchard
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-04 Thread Michal Schorm
Since this change, all (subsequent) CMake commands (after "%cmake")
MUST be used with the builddir argument ( "-B %{__cmake_builddir}" ).

I use in my packages "cmake -LAH" from time to time, to verify that
all CMake arguments (-D...) were passed and processed correctly, since
the processing logic behind each such argument can be quite
complicated.

Now (with the new CMake behaviour), when you call "cmake -LAH" after
you used the "%cmake", it will create a *new* cache, in the current
(that usually mean source) directory, *with incorrect values* and show
you that values instead of the correct ones (from the correct
builddir).
That was a nice quantum physic problem - since the new incorrect cache
was only created when you wanted to observe it :)
I'd like to anyone after me to not get caught by this (probably
correct, but not intuitive) behaviour.

I'd like to have the "%{__cmake_builddir}" and "%_vpath_builddir" more
visible, than hidden behind "See the Defining source and build
directories for more information".
I was on that page several times but I haven't clicked that link since
I was looking how to *get* the patch of the builddir, instead of
defining it.
I'd submit a PR, but unfortunately no good idea how to reword the
sentence has passed my mind yet.

--

Michal Schorm
Software Engineer
Core Services - Databases Team
Red Hat

--


On Tue, Aug 4, 2020 at 9:37 AM Igor Raits
 wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
>
> On Mon, 2020-08-03 at 22:14 -0500, Richard Shaw wrote:
> > Sometimes you need to get into the build directory, in my case for
> > OpenColorIO I use help2man to generate some of the man pages.
> >
> > I had to rely on the power of Google/Gmail to find Neal's response to
> > one
> > of my earlier emails to find the answer again...
>
> https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/
>
> %__cmake_in_source_build
>
> Controls whether builds are done in-source (when defined) or out-
> of-source (when undefined). See the Defining source and build
> directories for more information.
>
> Links to:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/vpath/
>
> Feel free to submit a PR to make it more visible.
>
> >
> > %{_vpath_builddir}
> >
> > But that begs the question, now that we have updated %cmake, and new
> > %cmake_build & %cmake_install, why is it %_vpath_builddir and not
> > %_cmake_builddir?
> >
> > Thanks,
> > Richard
> > ___
> > devel mailing list -- devel@lists.fedoraproject.org
> > To unsubscribe send an email to devel-le...@lists.fedoraproject.org
> > Fedora Code of Conduct:
> > https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> > List Guidelines:
> > https://fedoraproject.org/wiki/Mailing_list_guidelines
> > List Archives:
> > https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
>
> - --
> Igor Raits 
> -BEGIN PGP SIGNATURE-
>
> iQIzBAEBCgAdFiEEcwgJ58gsbV5f5dMcEV1auJxcHh4FAl8pECIACgkQEV1auJxc
> Hh4L7Q/+M7N/MJg0od9JZ2ri3Kcd7dtzd7WzU6X6/MPtoTtnTYd5AlJQM8zZYrfj
> jLFM6Hd9JdhReUodTeXYMzcuIRctjFNJv3ycI7E7pF5XvkQc6rnie6e/NwrUyCUG
> b0/I4F4RUpHQfAbR/Pa05lbBfFb1pN0jCoXsc77dLWLZ//FefBYEVYTdzc44mKhx
> TMOX8MPapBlu6P4XITajcI/cXMwecqgSfGPmiGwz2aqn9Ec4415khsKhjhT6CnaA
> IkgLGPHZwrO1WwZXnOR+TLR6QBpGyna3xLOCE7VskH+WmsYgd6UGTm+t86BFbBDl
> hThVdjK4I+uV0SU7qVq+NqtOIQRd014aKBGJpl1pmadjJhvBApJgZyC8e83OiOLm
> FC1OziylaOsYvJuUIZzBG7VMyFNM4J7YR8CKD4r0CLkvkCTT0Re0jzxmXzvZzQd+
> mmAsvehjIHPG0SDti8521l22dN7pvkvVO0OAfb0XDXKAdQaIQnosZyEi2G3Q4w1j
> kRNLyKsIvLdHaXMqqQ/6T/O5zkaSdM7vdD54HebdzcR3iVqy3TyaI8TmMsSlA0jz
> DfSd5/+W/dIen6lBOAwVO6R935Y9LCt5IdD5Szbs75wAJNOyRLnwHj2I8beNHxVi
> iaUNm4KdaKxupzqwiQ9EPpClssNdkgEi2HQi/q3B+PXSu57RrOI=
> =ZYgX
> -END PGP SIGNATURE-
> ___
> devel mailing list -- devel@lists.fedoraproject.org
> To unsubscribe send an email to devel-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-04 Thread Igor Raits
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On Mon, 2020-08-03 at 22:14 -0500, Richard Shaw wrote:
> Sometimes you need to get into the build directory, in my case for
> OpenColorIO I use help2man to generate some of the man pages.
> 
> I had to rely on the power of Google/Gmail to find Neal's response to
> one
> of my earlier emails to find the answer again...

https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/

%__cmake_in_source_build

Controls whether builds are done in-source (when defined) or out-
of-source (when undefined). See the Defining source and build
directories for more information.

Links to:
https://docs.fedoraproject.org/en-US/packaging-guidelines/vpath/

Feel free to submit a PR to make it more visible.

> 
> %{_vpath_builddir}
> 
> But that begs the question, now that we have updated %cmake, and new
> %cmake_build & %cmake_install, why is it %_vpath_builddir and not
> %_cmake_builddir?
> 
> Thanks,
> Richard
> ___
> devel mailing list -- devel@lists.fedoraproject.org
> To unsubscribe send an email to devel-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: 
> https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

- -- 
Igor Raits 
-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEEcwgJ58gsbV5f5dMcEV1auJxcHh4FAl8pECIACgkQEV1auJxc
Hh4L7Q/+M7N/MJg0od9JZ2ri3Kcd7dtzd7WzU6X6/MPtoTtnTYd5AlJQM8zZYrfj
jLFM6Hd9JdhReUodTeXYMzcuIRctjFNJv3ycI7E7pF5XvkQc6rnie6e/NwrUyCUG
b0/I4F4RUpHQfAbR/Pa05lbBfFb1pN0jCoXsc77dLWLZ//FefBYEVYTdzc44mKhx
TMOX8MPapBlu6P4XITajcI/cXMwecqgSfGPmiGwz2aqn9Ec4415khsKhjhT6CnaA
IkgLGPHZwrO1WwZXnOR+TLR6QBpGyna3xLOCE7VskH+WmsYgd6UGTm+t86BFbBDl
hThVdjK4I+uV0SU7qVq+NqtOIQRd014aKBGJpl1pmadjJhvBApJgZyC8e83OiOLm
FC1OziylaOsYvJuUIZzBG7VMyFNM4J7YR8CKD4r0CLkvkCTT0Re0jzxmXzvZzQd+
mmAsvehjIHPG0SDti8521l22dN7pvkvVO0OAfb0XDXKAdQaIQnosZyEi2G3Q4w1j
kRNLyKsIvLdHaXMqqQ/6T/O5zkaSdM7vdD54HebdzcR3iVqy3TyaI8TmMsSlA0jz
DfSd5/+W/dIen6lBOAwVO6R935Y9LCt5IdD5Szbs75wAJNOyRLnwHj2I8beNHxVi
iaUNm4KdaKxupzqwiQ9EPpClssNdkgEi2HQi/q3B+PXSu57RrOI=
=ZYgX
-END PGP SIGNATURE-
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-03 Thread Tom Hughes via devel

On 04/08/2020 04:14, Richard Shaw wrote:

I had to rely on the power of Google/Gmail to find Neal's response to 
one of my earlier emails to find the answer again...


%{_vpath_builddir}

But that begs the question, now that we have updated %cmake, and new 
%cmake_build & %cmake_install, why is it %_vpath_builddir and not 
%_cmake_builddir?


There is a %{__cmake_builddir} which is what I've been using to
access the build directory, as that is what the %cmake macrose us.

Tom

--
Tom Hughes (t...@compton.nu)
http://compton.nu/
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-03 Thread Neal Gompa
On Mon, Aug 3, 2020 at 11:45 PM Richard Shaw  wrote:
>
> Sometimes you need to get into the build directory, in my case for 
> OpenColorIO I use help2man to generate some of the man pages.
>
> I had to rely on the power of Google/Gmail to find Neal's response to one of 
> my earlier emails to find the answer again...
>
> %{_vpath_builddir}
>
> But that begs the question, now that we have updated %cmake, and new 
> %cmake_build & %cmake_install, why is it %_vpath_builddir and not 
> %_cmake_builddir?
>

Because the VPATH macros are intended to be build-tool-agnostic
settings for source and build directories. %_vpath_builddir controls
where the build directory will be, and can be customized if needed
easily enough.

These macros are used by both CMake and Meson now, and the goal is to
use this infrastructure with other build tools as we're able to.

If you need to do things specifically in that directory, the macro is
a reliable way of accessing it.




--
真実はいつも一つ!/ Always, there's only one truth!
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


%{_vpath_builddir} needs to be in the Cmake packaging guidelines

2020-08-03 Thread Richard Shaw
Sometimes you need to get into the build directory, in my case for
OpenColorIO I use help2man to generate some of the man pages.

I had to rely on the power of Google/Gmail to find Neal's response to one
of my earlier emails to find the answer again...

%{_vpath_builddir}

But that begs the question, now that we have updated %cmake, and new
%cmake_build & %cmake_install, why is it %_vpath_builddir and not
%_cmake_builddir?

Thanks,
Richard
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org