Bug 1733898 - octave noarch packages fail: "BuildArch" not repected from spec?
Summary: octave noarch packages fail: "BuildArch" not repected from spec?
Alias: None
Product: Fedora
Classification: Fedora
Component: octave
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2019-07-29 07:24 UTC by Colin Macdonald
Modified: 2019-07-31 20:43 UTC (History)
8 users (show)

Fixed In Version: octave-5.1.0-2.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-07-31 15:58:59 UTC
Type: Bug

Attachments (Terms of Use)

Description Colin Macdonald 2019-07-29 07:24:34 UTC
TL;DR  Something is eating `buildarch` before macros.octave gets it.  It seems to be set to the actual buildnode hardware rather than "noarch" as my spec files says.

- - - - - 

octave-doctest and octave-symbolic are FTBFS on Rawhide.  The Doctest and Symbolic packages both have "BuildArch: noarch" in their specfiles.

After some testing, I think something has gone wrong about `octave_tar_suffix`.  
AFAICT, `octave_tar_suffix` should be set to "any-none" when the package is noarch.

In Rawhide, %build is still making `doctest-0.7.0-any-none.tar.gz`, but then we %install dies with:

BUILDSTDERR: error: pkg: failed to read package '/builddir/build/BUILD/doctest-0.7.0/build/doctest-0.7.0-armv7hl-redhat-linux-gnu-api-v53.tar.gz': 

Note the "armv7hl-redhat-linux-gnu-api-v53" which is `octave_tar_suffix` but it should've been "any-none" because in macros.octave:

  if (rpm.expand("%{?buildarch}") ~= "noarch") then
    rpm.define("octave_tar_suffix %{octave_host}-%{octave_api}")
    rpm.define("octave_tar_suffix any-none")

- - - - -

Here's a recent scratch with a bit of extra debugging which shows the above behaviour:

Note: if I change my package, deleting "BuildArch: noarch", the "doctest-0.7.0-any-none.tar.gz" is still created so that is no solution.

Comment 1 Orion Poplawski 2019-07-31 02:49:50 UTC
Latest rpm no longer sets the buildarch macro due to issues surrounding getting it correct with multiple sub-packages.  I'm working on removing the dependency on that macro.

Comment 2 Colin Macdonald 2019-07-31 20:43:38 UTC
Thanks for the quick fix!  I'm rebuilding -doctest and -symbolic on rawhide.

Note You need to log in before you can comment on or make changes to this bug.