Re: %set_build_flags problem in rpm spec file

2020-10-05 Thread Panu Matilainen

On 10/3/20 3:06 PM, Neal Gompa wrote:

On Sat, Oct 3, 2020 at 2:45 AM Miro Hrončok  wrote:


On 03. 10. 20 5:04, Ruki Wang wrote:

Hi, every one.

I am making rpm spec and doing tests on copr.

But on opensuse-leap-15.1-*, %set_build_flags still causes some problems.


+ %set_build_flags
/var/tmp/rpm-tmp.9RYL8i: line 32: fg: no job control
error: Bad exit status from /var/tmp/rpm-tmp.9RYL8i (%build)
  Bad exit status from /var/tmp/rpm-tmp.9RYL8i (%build)


Links:

https://copr.fedorainfracloud.org/coprs/waruqi/xmake/build/1693007/
https://download.copr.fedorainfracloud.org/results/waruqi/xmake/opensuse-leap-15.2-x86_64/01693007-xmake/builder-live.log.gz


Buzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1882871

Does anyone know the reason for this? Thanks!



Yes. The reason is openSUSE and Fedora are different. and they don't have our 
macro.

A quick "make it build" action would be to add ?:

  %?set_build_flags

However, the openSUSE build might not have the proper flags.



It's because %set_build_flags was introduced in RPM 4.15, and openSUSE
Leap 15.x uses RPM 4.14. Moreover, openSUSE Leap 15.1 predates the
introduction of the macro even upstream. It was not backported into
openSUSE Leap 15.2 either, so the macro just doesn't exist in openSUSE
Leap yet.

The macro was backported to RHEL 8 during its development, so it
exists there despite it using RPM 4.14 as well.


Not quite. The macro originated in Fedora in early 2018 and RHEL 
8inherited it from there. Upstream adopted it spring 2019 and was 
consequently included in 4.15.


Please check your facts when making such statements. This may be a 
mostly harmless error but that's not always the case.


- Panu -
___
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: %set_build_flags problem in rpm spec file

2020-10-04 Thread Ruki Wang
It works fine, Thanks!

Neal Gompa  于2020年10月3日周六 下午10:55写道:

> On Sat, Oct 3, 2020 at 10:18 AM Vitaly Zaitsev via devel
>  wrote:
> >
> > On 03.10.2020 15:47, Ruki Wang wrote:
> > > I try `%?set_build_flags` and it works fine.
> >
> > No, it will not. This command will just force RPM to ignore errors. No
> > actual build flags will be forwarded.
> >
> > You need to create separate SPEC files for Fedora and openSUSE.
> >
>
> That's not even close to true. The solution is quite simple for
> handling openSUSE Leap.
>
> Instead of "%set_build_flags" or "%?set_build_flags", do the following:
>
> %if 0%{?suse_version} && 0%{?suse_version} < 1550
> export CFLAGS="%{optflags}"
> export CXXFLAGS="%{optflags}"
> %else
> %set_build_flags
> %endif
>
>
>
> --
> 真実はいつも一つ!/ 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
>


-- 

Ruki Wang
war...@gmail.com
https://github.com/waruqi
https://twitter.com/waruqi
___
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: %set_build_flags problem in rpm spec file

2020-10-03 Thread Ruki Wang
ok, I will try it. Thanks! : )

在 2020年10月3日星期六,Neal Gompa  写道:

> On Sat, Oct 3, 2020 at 10:18 AM Vitaly Zaitsev via devel
>  wrote:
> >
> > On 03.10.2020 15:47, Ruki Wang wrote:
> > > I try `%?set_build_flags` and it works fine.
> >
> > No, it will not. This command will just force RPM to ignore errors. No
> > actual build flags will be forwarded.
> >
> > You need to create separate SPEC files for Fedora and openSUSE.
> >
>
> That's not even close to true. The solution is quite simple for
> handling openSUSE Leap.
>
> Instead of "%set_build_flags" or "%?set_build_flags", do the following:
>
> %if 0%{?suse_version} && 0%{?suse_version} < 1550
> export CFLAGS="%{optflags}"
> export CXXFLAGS="%{optflags}"
> %else
> %set_build_flags
> %endif
>
>
>
> --
> 真実はいつも一つ!/ 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
>


-- 

Ruki Wang
war...@gmail.com
https://github.com/waruqi
https://twitter.com/waruqi
___
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: %set_build_flags problem in rpm spec file

2020-10-03 Thread Neal Gompa
On Sat, Oct 3, 2020 at 11:09 AM Vitaly Zaitsev via devel
 wrote:
>
> On 03.10.2020 16:54, Neal Gompa wrote:
> > Instead of "%set_build_flags" or "%?set_build_flags", do the following:
>
> Don't forget about the different package names in Fedora and openSUSE.
>
> Maintainers can use something like this to avoid this problem:
>
> BuildRequires: cmake(Foo)
> BuildRequires: pkgconfig(foo)

That's true. Thankfully this is rarer with -devel packages, but yes,
using generic common names like pkgconfig(), cmake(), perl(), rubygem(), and
others will help this considerably.



--
真実はいつも一つ!/ 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: %set_build_flags problem in rpm spec file

2020-10-03 Thread Vitaly Zaitsev via devel
On 03.10.2020 16:54, Neal Gompa wrote:
> Instead of "%set_build_flags" or "%?set_build_flags", do the following:

Don't forget about the different package names in Fedora and openSUSE.

Maintainers can use something like this to avoid this problem:

BuildRequires: cmake(Foo)
BuildRequires: pkgconfig(foo)

-- 
Sincerely,
  Vitaly Zaitsev (vit...@easycoding.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: %set_build_flags problem in rpm spec file

2020-10-03 Thread Neal Gompa
On Sat, Oct 3, 2020 at 10:18 AM Vitaly Zaitsev via devel
 wrote:
>
> On 03.10.2020 15:47, Ruki Wang wrote:
> > I try `%?set_build_flags` and it works fine.
>
> No, it will not. This command will just force RPM to ignore errors. No
> actual build flags will be forwarded.
>
> You need to create separate SPEC files for Fedora and openSUSE.
>

That's not even close to true. The solution is quite simple for
handling openSUSE Leap.

Instead of "%set_build_flags" or "%?set_build_flags", do the following:

%if 0%{?suse_version} && 0%{?suse_version} < 1550
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
%else
%set_build_flags
%endif



-- 
真実はいつも一つ!/ 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: %set_build_flags problem in rpm spec file

2020-10-03 Thread Vitaly Zaitsev via devel
On 03.10.2020 15:47, Ruki Wang wrote:
> I try `%?set_build_flags` and it works fine.

No, it will not. This command will just force RPM to ignore errors. No
actual build flags will be forwarded.

You need to create separate SPEC files for Fedora and openSUSE.

-- 
Sincerely,
  Vitaly Zaitsev (vit...@easycoding.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: %set_build_flags problem in rpm spec file

2020-10-03 Thread Ruki Wang
I try `%?set_build_flags` and it works fine.

Thanks!

Miro Hrončok  于2020年10月3日周六 下午2:45写道:

> On 03. 10. 20 5:04, Ruki Wang wrote:
> > Hi, every one.
> >
> > I am making rpm spec and doing tests on copr.
> >
> > But on opensuse-leap-15.1-*, %set_build_flags still causes some problems.
> >
> >
> > + %set_build_flags
> > /var/tmp/rpm-tmp.9RYL8i: line 32: fg: no job control
> > error: Bad exit status from /var/tmp/rpm-tmp.9RYL8i (%build)
> >  Bad exit status from /var/tmp/rpm-tmp.9RYL8i (%build)
> >
> >
> > Links:
> >
> > https://copr.fedorainfracloud.org/coprs/waruqi/xmake/build/1693007/
> >
> https://download.copr.fedorainfracloud.org/results/waruqi/xmake/opensuse-leap-15.2-x86_64/01693007-xmake/builder-live.log.gz
> > <
> https://download.copr.fedorainfracloud.org/results/waruqi/xmake/opensuse-leap-15.2-x86_64/01693007-xmake/builder-live.log.gz
> >
> >
> > Buzilla:
> > https://bugzilla.redhat.com/show_bug.cgi?id=1882871
> >
> > Does anyone know the reason for this? Thanks!
> > 
>
> Yes. The reason is openSUSE and Fedora are different. and they don't have
> our macro.
>
> A quick "make it build" action would be to add ?:
>
>  %?set_build_flags
>
> However, the openSUSE build might not have the proper flags.
>
> --
> Miro Hrončok
> --
> Phone: +420777974800
> IRC: mhroncok
> ___
> 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
>


-- 

Ruki Wang
war...@gmail.com
https://github.com/waruqi
https://twitter.com/waruqi
___
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: %set_build_flags problem in rpm spec file

2020-10-03 Thread Ruki Wang
Got it, thanks!

Neal Gompa  于2020年10月3日周六 下午8:07写道:

> On Sat, Oct 3, 2020 at 2:45 AM Miro Hrončok  wrote:
> >
> > On 03. 10. 20 5:04, Ruki Wang wrote:
> > > Hi, every one.
> > >
> > > I am making rpm spec and doing tests on copr.
> > >
> > > But on opensuse-leap-15.1-*, %set_build_flags still causes some
> problems.
> > >
> > >
> > > + %set_build_flags
> > > /var/tmp/rpm-tmp.9RYL8i: line 32: fg: no job control
> > > error: Bad exit status from /var/tmp/rpm-tmp.9RYL8i (%build)
> > >  Bad exit status from /var/tmp/rpm-tmp.9RYL8i (%build)
> > >
> > >
> > > Links:
> > >
> > > https://copr.fedorainfracloud.org/coprs/waruqi/xmake/build/1693007/
> > >
> https://download.copr.fedorainfracloud.org/results/waruqi/xmake/opensuse-leap-15.2-x86_64/01693007-xmake/builder-live.log.gz
> > > <
> https://download.copr.fedorainfracloud.org/results/waruqi/xmake/opensuse-leap-15.2-x86_64/01693007-xmake/builder-live.log.gz
> >
> > >
> > > Buzilla:
> > > https://bugzilla.redhat.com/show_bug.cgi?id=1882871
> > >
> > > Does anyone know the reason for this? Thanks!
> > > 
> >
> > Yes. The reason is openSUSE and Fedora are different. and they don't
> have our macro.
> >
> > A quick "make it build" action would be to add ?:
> >
> >  %?set_build_flags
> >
> > However, the openSUSE build might not have the proper flags.
> >
>
> It's because %set_build_flags was introduced in RPM 4.15, and openSUSE
> Leap 15.x uses RPM 4.14. Moreover, openSUSE Leap 15.1 predates the
> introduction of the macro even upstream. It was not backported into
> openSUSE Leap 15.2 either, so the macro just doesn't exist in openSUSE
> Leap yet.
>
> The macro was backported to RHEL 8 during its development, so it
> exists there despite it using RPM 4.14 as well.
>
>
>
>
> --
> 真実はいつも一つ!/ 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
>


-- 

Ruki Wang
war...@gmail.com
https://github.com/waruqi
https://twitter.com/waruqi
___
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: %set_build_flags problem in rpm spec file

2020-10-03 Thread Neal Gompa
On Sat, Oct 3, 2020 at 2:45 AM Miro Hrončok  wrote:
>
> On 03. 10. 20 5:04, Ruki Wang wrote:
> > Hi, every one.
> >
> > I am making rpm spec and doing tests on copr.
> >
> > But on opensuse-leap-15.1-*, %set_build_flags still causes some problems.
> >
> >
> > + %set_build_flags
> > /var/tmp/rpm-tmp.9RYL8i: line 32: fg: no job control
> > error: Bad exit status from /var/tmp/rpm-tmp.9RYL8i (%build)
> >  Bad exit status from /var/tmp/rpm-tmp.9RYL8i (%build)
> >
> >
> > Links:
> >
> > https://copr.fedorainfracloud.org/coprs/waruqi/xmake/build/1693007/
> > https://download.copr.fedorainfracloud.org/results/waruqi/xmake/opensuse-leap-15.2-x86_64/01693007-xmake/builder-live.log.gz
> > 
> >
> > Buzilla:
> > https://bugzilla.redhat.com/show_bug.cgi?id=1882871
> >
> > Does anyone know the reason for this? Thanks!
> > 
>
> Yes. The reason is openSUSE and Fedora are different. and they don't have our 
> macro.
>
> A quick "make it build" action would be to add ?:
>
>  %?set_build_flags
>
> However, the openSUSE build might not have the proper flags.
>

It's because %set_build_flags was introduced in RPM 4.15, and openSUSE
Leap 15.x uses RPM 4.14. Moreover, openSUSE Leap 15.1 predates the
introduction of the macro even upstream. It was not backported into
openSUSE Leap 15.2 either, so the macro just doesn't exist in openSUSE
Leap yet.

The macro was backported to RHEL 8 during its development, so it
exists there despite it using RPM 4.14 as well.




--
真実はいつも一つ!/ 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: %set_build_flags problem in rpm spec file

2020-10-03 Thread Miro Hrončok

On 03. 10. 20 5:04, Ruki Wang wrote:

Hi, every one.

I am making rpm spec and doing tests on copr.

But on opensuse-leap-15.1-*, %set_build_flags still causes some problems.


+ %set_build_flags
/var/tmp/rpm-tmp.9RYL8i: line 32: fg: no job control
error: Bad exit status from /var/tmp/rpm-tmp.9RYL8i (%build)
     Bad exit status from /var/tmp/rpm-tmp.9RYL8i (%build)


Links:

https://copr.fedorainfracloud.org/coprs/waruqi/xmake/build/1693007/
https://download.copr.fedorainfracloud.org/results/waruqi/xmake/opensuse-leap-15.2-x86_64/01693007-xmake/builder-live.log.gz 



Buzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1882871

Does anyone know the reason for this? Thanks!



Yes. The reason is openSUSE and Fedora are different. and they don't have our 
macro.

A quick "make it build" action would be to add ?:

%?set_build_flags

However, the openSUSE build might not have the proper flags.

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
___
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: %set_build_flags problem in rpm spec file

2020-10-02 Thread Brady Pote


On October 2, 2020, at 11:04 PM, Ruki Wang  wrote:

Hi, every one.


I am making rpm spec and doing tests on copr.


But on opensuse-leap-15.1-*, %set_build_flags still causes some problems.



+ %set_build_flags
/var/tmp/rpm-tmp.9RYL8i: line 32: fg: no job control
error: Bad exit status from /var/tmp/rpm-tmp.9RYL8i (%build)
    Bad exit status from /var/tmp/rpm-tmp.9RYL8i (%build)


Links:

https://copr.fedorainfracloud.org/coprs/waruqi/xmake/build/1693007/

https://download.copr.fedorainfracloud.org/results/waruqi/xmake/opensuse-leap-15.2-x86_64/01693007-xmake/builder-live.log.gz
 


Buzilla:

https://bugzilla.redhat.com/show_bug.cgi?id=1882871


Does anyone know the reason for this? Thanks!


-- 


Ruki Wang 
war...@gmail.com 

https://github.com/waruqi

https://twitter.com/waruqi


___
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