[RTEMS Project] #3532: RSB source only download is host specific

RTEMS trac trac at rtems.org
Thu Sep 27 23:08:52 UTC 2018


#3532: RSB source only download is host specific
-------------------------+--------------------------
 Reporter:  Chris Johns  |       Owner:  Chris Johns
     Type:  defect       |      Status:  assigned
 Priority:  normal       |   Milestone:  5.1
Component:  tool/rsb     |     Version:  5
 Severity:  blocker      |  Resolution:
 Keywords:               |  Blocked By:
 Blocking:               |
-------------------------+--------------------------
Description changed by Chris Johns:

Old description:

> The RSB source only download is host specific. Configurations for builds
> can restrict sources or patches by host to work around specific host
> issues. Currently a source only download is host specific because the
> host check is based on the host the RSB is being run on.
>
> The release process uses source only downloading to create the complete
> set of sources in a release. This issue means some host specific source
> may not be captured.
>
> I am yet to figure how to resolve this issue because the download logic
> is driven by the configuration scripts and this type of logic exists in
> configuration files such as `rtems-gcc-7.3.0-newlib-
> d13c84eb07e35984bf7a974cd786a6cdac29e6b9.cfg`:
> {{{
> %if %{_build_os} == freebsd || %{_build_os} == darwin
>  %patch add gcc --rsb-file=freebsd-libgcc-sed-fix.patch -p0
> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41380
>  %hash  sha256 freebsd-libgcc-sed-fix.patch
> 8a11bd619c2e55466688e328da00b387d02395c1e8ff4a99225152387a1e60a4
> %endif
> }}}
> The simpler construct `rtems-tools-common-1.cfg` of:
> {{{
>   %ifos win32 mingw ming32
>    SB_BUILD_ROOT_WAF=$SB_BUILD_ROOT$(echo %{_prefix} | cut -c 1-2)
>   %else
>    SB_BUILD_ROOT_WAF=$SB_BUILD_ROOT
>   %endif
> }}}
> is easier to manage as the `%ifos` logic can always return `True` however
> the `%else` patch also need to be followed and this could break the logic
> in a configuration file. Yes, the example is not about sources or patches
> however it shows what could be used.
> I do not think adding logic to the configuration file parsing will help,
> for example consider this case:
> {{{
> %if %{_build_os} == freebsd || %{_build_os} == darwin
>  %patch add gcc foobar-bsd.patch
> %else
>  %patch add gcc foobar-gnu.patch
> %endif
> }}}
> We require the logic to follow the `%if True` path and the `%else` path.

New description:

 The RSB source only download is host specific. Configurations for builds
 can restrict sources or patches by host to work around specific host
 issues. Currently a source only download is host specific because the host
 check is based on the host the RSB is being run on.

 The release process uses source only downloading to create the complete
 set of sources in a release. This issue means some host specific source
 may not be captured.

 I am yet to figure how to resolve this issue because the download logic is
 driven by the configuration scripts and this type of logic exists in
 configuration files such as `rtems-gcc-7.3.0-newlib-
 d13c84eb07e35984bf7a974cd786a6cdac29e6b9.cfg`:
 {{{
 %if %{_build_os} == freebsd || %{_build_os} == darwin
  %patch add gcc --rsb-file=freebsd-libgcc-sed-fix.patch -p0
 https://gcc.gnu.org/bugzilla/attachment.cgi?id=41380
  %hash  sha256 freebsd-libgcc-sed-fix.patch
 8a11bd619c2e55466688e328da00b387d02395c1e8ff4a99225152387a1e60a4
 %endif
 }}}
 The simpler construct in `rtems-tools-common-1.cfg` of:
 {{{
   %ifos win32 mingw ming32
    SB_BUILD_ROOT_WAF=$SB_BUILD_ROOT$(echo %{_prefix} | cut -c 1-2)
   %else
    SB_BUILD_ROOT_WAF=$SB_BUILD_ROOT
   %endif
 }}}
 is easier to manage as the `%ifos` logic can always return `True` however
 the `%else` path also need to be followed and this could break the logic
 in a configuration file. Yes, the example is not about sources or patches
 however it shows what could be used.
 I do not think creating a new variable such as `%{download_only}`and
 adding logic to the configuration file will help, for example:
 {{{
 %if %{download_only} || %{_build_os} == freebsd || %{_build_os} == darwin
  %patch add gcc foobar-bsd.patch
 %else
  %patch add gcc foobar-gnu.patch
 %endif
 }}}
 We require the logic to follow the `%if True` path '''and''' the `%else`
 path.

--

--
Ticket URL: <http://devel.rtems.org/ticket/3532#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list