Re: adding GCC Toolset usage docs

2022-04-14 Thread Otto Urpelainen

Germano Massullo kirjoitti 13.4.2022 klo 20.08:
Hello, in my opinion we should add to Fedora Packaging Guidelines, a 
paragraph concerning GCC Toolset usage.


I recently experienced some problems in building darktable for 
epel8/epel8-next due bad configuration of gcc-toolset-11 in the spec 
file. In a few words, gcc-toolset-11 was not really enabled, so the 
builder was still using GCC 8.5.


Since this is about EPEL only, the right place to update would be EPEL 
docs [1].


[1]: https://docs.fedoraproject.org/en-US/epel/
___
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
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: adding GCC Toolset usage docs

2022-04-14 Thread Kevin Kofler via devel
Vít Ondruch wrote:
> The sourcing trick is generally very dangerous. It might be OKish in RPM
> scriptlets, but otherwise it might result in unpredictable behavior of
> the system.

It is generally the right thing to do for shell scripts. Those run in a 
subshell, so the sourcing will not affect the calling shell. It should be 
documented somewhere.

Kevin Kofler
___
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
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: adding GCC Toolset usage docs

2022-04-14 Thread Dan Horák
On Thu, 14 Apr 2022 12:15:43 +0200
Vít Ondruch  wrote:

> 
> Dne 14. 04. 22 v 2:49 Kevin Kofler via devel napsal(a):
> > Germano Massullo wrote:
> >> This problem was caused because I had misinterpreted official Red Hat
> >> configuration [2].
> > The documentation was written with interactive use in mind, not for
> > scripting or packaging. The "scl enable" tool is very impractical for
> > packaging because you would have to prefix it before each and every command.
> > Using bash as the command is a workaround
> 
> 
> This was always by design. Not sure what else you propose?
> 
> BTW the idea was also that there will be more commands such as `enable`, 
> so in theory, there could be something like `scl_build` command(script) 
> which could get somehow integrated transparently into RPM, but this was 
> never done (and unfortunately this design was severely broken in 
> scl-utils 2.x :/ ).
> 
> 
> >   that can only possibly work for
> > interactive use. The sourcing trick (that is much more useful for packaging
> > than "scl enable") is unfortunately completely undocumented.
> 
> 
> The sourcing trick is generally very dangerous. It might be OKish in RPM 
> scriptlets, but otherwise it might result in unpredictable behavior of 
> the system.

for the record, I took the sourcing trick from chromium


Dan
___
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
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: adding GCC Toolset usage docs

2022-04-14 Thread Vít Ondruch


Dne 14. 04. 22 v 2:49 Kevin Kofler via devel napsal(a):

Germano Massullo wrote:

This problem was caused because I had misinterpreted official Red Hat
configuration [2].

The documentation was written with interactive use in mind, not for
scripting or packaging. The "scl enable" tool is very impractical for
packaging because you would have to prefix it before each and every command.
Using bash as the command is a workaround



This was always by design. Not sure what else you propose?

BTW the idea was also that there will be more commands such as `enable`, 
so in theory, there could be something like `scl_build` command(script) 
which could get somehow integrated transparently into RPM, but this was 
never done (and unfortunately this design was severely broken in 
scl-utils 2.x :/ ).




  that can only possibly work for
interactive use. The sourcing trick (that is much more useful for packaging
than "scl enable") is unfortunately completely undocumented.



The sourcing trick is generally very dangerous. It might be OKish in RPM 
scriptlets, but otherwise it might result in unpredictable behavior of 
the system.



Vít




 Kevin Kofler
___
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
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


OpenPGP_signature
Description: OpenPGP digital 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
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: adding GCC Toolset usage docs

2022-04-13 Thread Kevin Kofler via devel
Germano Massullo wrote:
> This problem was caused because I had misinterpreted official Red Hat
> configuration [2].

The documentation was written with interactive use in mind, not for 
scripting or packaging. The "scl enable" tool is very impractical for 
packaging because you would have to prefix it before each and every command. 
Using bash as the command is a workaround that can only possibly work for 
interactive use. The sourcing trick (that is much more useful for packaging 
than "scl enable") is unfortunately completely undocumented.

Kevin Kofler
___
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
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: adding GCC Toolset usage docs

2022-04-13 Thread Marek Polacek
On Wed, Apr 13, 2022 at 07:08:13PM +0200, Germano Massullo wrote:
> Hello, in my opinion we should add to Fedora Packaging Guidelines, a
> paragraph concerning GCC Toolset usage.
> 
> I recently experienced some problems in building darktable for
> epel8/epel8-next due bad configuration of gcc-toolset-11 in the spec file.
> In a few words, gcc-toolset-11 was not really enabled, so the builder was
> still using GCC 8.5.
> The build failure led me to open a bugreport against gcc-toolset-11 [1], but
> it turned out to not be a bug
> Dan Horák fixed the problem with pull requests [3] and [4]
> This problem was caused because I had misinterpreted official Red Hat
> configuration [2]. Also other developers in #fedora-devel IRC channel that I
> contacted for help, have misinterpreted it too.
> 
> Adding such new paragraph in the guidelines would help the packaging
> activity of the whole set of EPEL branches.
> If you agree with such proposal I am willing to help

Sure, improving the docs is always welcome.  Note that I've provided
a macro in the metapackage that ought to be used when you want to build
a package using DTS/GTS: %enable_devtoolset11 (rather than
. /opt/rh/gcc-toolset-11/enable and similar).  So the docs should mention
that.

> Cheers
> 
> [1]: https://bugzilla.redhat.com/show_bug.cgi?id=2074663
> [2]: 
> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/developing_c_and_cpp_applications_in_rhel_8/additional-toolsets-for-development_developing-applications
> [3]: https://src.fedoraproject.org/rpms/darktable/pull-request/6
> [4]: https://src.fedoraproject.org/rpms/darktable/pull-request/7

Marek
___
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
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


adding GCC Toolset usage docs

2022-04-13 Thread Germano Massullo
Hello, in my opinion we should add to Fedora Packaging Guidelines, a 
paragraph concerning GCC Toolset usage.


I recently experienced some problems in building darktable for 
epel8/epel8-next due bad configuration of gcc-toolset-11 in the spec 
file. In a few words, gcc-toolset-11 was not really enabled, so the 
builder was still using GCC 8.5.
The build failure led me to open a bugreport against gcc-toolset-11 [1], 
but it turned out to not be a bug

Dan Horák fixed the problem with pull requests [3] and [4]
This problem was caused because I had misinterpreted official Red Hat 
configuration [2]. Also other developers in #fedora-devel IRC channel 
that I contacted for help, have misinterpreted it too.


Adding such new paragraph in the guidelines would help the packaging 
activity of the whole set of EPEL branches.

If you agree with such proposal I am willing to help

Cheers

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=2074663
[2]: 
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/developing_c_and_cpp_applications_in_rhel_8/additional-toolsets-for-development_developing-applications

[3]: https://src.fedoraproject.org/rpms/darktable/pull-request/6
[4]: https://src.fedoraproject.org/rpms/darktable/pull-request/7
___
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
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure