On Wed, Aug 5, 2020 at 7:53 AM Lukáš Hrázký <lhrazky(a)redhat.com> wrote:
Hi Neal, all,
On Tue, 2020-08-04 at 07:42 -0400, Neal Gompa wrote:
> On Tue, Aug 4, 2020 at 7:32 AM Till Hofmann <thofmann(a)fedoraproject.org>
wrote:
> > Hi all,
> >
> > I have a number of packages that are FTBFS due to
> >
https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds.
> >
> > None of my packages has seen any commits for that change. I've read on
> > the list that packages that are considered "a complete mess" are not
> > touched. Are all my packages "a complete mess"?
> >
> > More seriously, are we expected to fix this ourselves? What happened to
> > "proposal owners will fix as many Fedora packages as possible"?
Should I
> > just re-assign the bug to cmake?
> >
> > I don't generally mind fixing my packages, but I'm confused by the
lack
> > of communication here.
>
> There are only a few packages that were considered a complete mess,
> mostly packages that did crazy build process scripting in the %build
> and %install sections. Most packages don't fall in that category.
> Basically if I can't understand how it works, I don't want to touch
> it.
>
> The reason yours hadn't been touched yet is because neither Igor nor
> myself managed to get to yours before the mass rebuild.
>
> It would be ideal if you can fix your own packages if we hadn't gotten
> to them, as you know your packages. :)
>
> The general advice I would give is that if you did the following:
>
> %cmake .
> %make_build
> %make_install
>
> Then you should change it to the following:
>
> %cmake
> %cmake_build
> %cmake_install
>
> (Note the lack of "." as an argument to %cmake)
>
> If you are doing something like the following:
>
> mkdir -p %{_target_platform}
> pushd %{_target_platform}
> %cmake ..
> popd
>
> %make_build -C %{_target_platform}
> %make_install -C %{_target_platform}
>
> Or like the following
>
> mkdir -p %{_target_platform}
> pushd %{_target_platform}
> %cmake ..
> popd
>
> pushd %{_target_platform}
> %make_build
> popd
> pushd %{_target_platform}
> %make_install
> popd
>
> Then you should do the following:
>
> %undefine __cmake_in_source_build
>
> %cmake
> %cmake_build
> %cmake_install
What if I build for multiple platforms at the same time? E.g. in dnf we
have:
%build
%if %{with python2}
pushd build-py2
%cmake -DPYTHON_DESIRED:FILEPATH=%{__python2} -DDNF_VERSION=%{version}
%cmake_build
make doc-man
popd
%endif
%if %{with python3}
pushd build-py3
%cmake -DPYTHON_DESIRED:FILEPATH=%{__python3} -DDNF_VERSION=%{version}
%cmake_build
make doc-man
popd
%endif
Do the new macros handle this case as well or do I need to stick to the
old way (with defining the variable)?
It appears Igor already did the conversion for you[1][2], but you
could also elect to go the other way as you considered.
However, you may want to go ahead and start simplifying that spec
because we're not building Python 2 support anywhere. Even RHEL 7
isn't getting updated versions of DNF anytime soon.
[1]:
https://src.fedoraproject.org/rpms/dnf/c/a8a0affb4c4fd1022f18b203d578e223...
[2]:
https://src.fedoraproject.org/rpms/dnf/c/61ec663be5c477cea68afb6027977366...
--
真実はいつも一つ!/ Always, there's only one truth!