Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 905622 - forced x64-macos flag in prefix/darwin/**arm64 may break conditional SRC_URI
Summary: forced x64-macos flag in prefix/darwin/**arm64 may break conditional SRC_URI
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-02 22:59 UTC by Andrey Aleksandrov
Modified: 2023-05-04 07:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Aleksandrov 2023-05-02 22:59:04 UTC
Many ebuilds choose source files to download based on arch use flags. With arm64-macos and x64-macos enabled in profile it's impossible to do that correctly because sources for both architectures would be downloaded.

For example, go-bootstrap package does it like this:
```
SRC_URI="
...
   x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap-${PV}.tbz )
"
```

To make go-bootstrap support arm64-macos natively I added new URI.
```
SRC_URI="
...
   x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap-${PV}.tbz )
   arm64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-arm64-bootstrap-${PV}.tbz )
"
```

And it brakes ebuild! Because two archives extracts now and ebuild doesn't expect that and tries to mv as there is only one archive and rename it.
```
  mv go-*-bootstrap "${ED}/usr/lib/go-bootstrap" || die
```

I believe many ebuilds rely on that only one arch specific archive would be downloaded.
Comment 1 Andrey Aleksandrov 2023-05-03 01:33:51 UTC
I grep'ed repository. And to be fair, there is not that many packages with x64-macos? check, but I still think that it would be better to remove x64-macos from profile, than make custom logic or flags in ebuild.

./www-plugins/gosuslugi-plugin/gosuslugi-plugin-3.1.1.0.ebuild:	x64-macos? ( https://ds-plugin.gosuslugi.ru/plugin/upload/assets/distrib/IFCPlugin.pkg -> ${P}_mac.pkg )
./dev-lang/go-bootstrap/go-bootstrap-1.19.1.ebuild:	x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap-${PV}.tbz )
./dev-lang/go-bootstrap/go-bootstrap-1.18.6.ebuild:	x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap-${PV}.tbz )
./media-libs/xvid/xvid-1.3.7.ebuild:	x64-macos? ( ${NASM} )"
./media-libs/xvid/xvid-1.3.7-r1.ebuild:	x64-macos? ( ${NASM} )"
./media-libs/libjpeg-turbo/libjpeg-turbo-2.1.3.ebuild:	x64-macos? ( ${ASM_DEPEND} )
./media-libs/libjpeg-turbo/libjpeg-turbo-2.1.4.ebuild:	x64-macos? ( ${ASM_DEPEND} )
./media-libs/libjpeg-turbo/libjpeg-turbo-2.1.5.1.ebuild:	x64-macos? ( ${ASM_DEPEND} )
./dev-lisp/clozurecl/clozurecl-1.11.5.ebuild:	x64-macos? ( https://github.com/Clozure/ccl/releases/download/v${PV}/${MY_P}-darwinx86.tar.gz )
./dev-lisp/clozurecl/clozurecl-1.12.ebuild:	x64-macos? ( https://github.com/Clozure/ccl/releases/download/v${PV}/${MY_P}-darwinx86.tar.gz )
./dev-lisp/clozurecl/clozurecl-1.12.1.ebuild:	x64-macos? ( https://github.com/Clozure/ccl/releases/download/v${PV}/${MY_P}-darwinx86.tar.gz )
./dev-lisp/sbcl/sbcl-2.3.3.ebuild:	x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
./dev-lisp/sbcl/sbcl-2.2.9.ebuild:	x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
./dev-lisp/sbcl/sbcl-2.3.2.ebuild:	x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
./dev-lisp/sbcl/sbcl-2.3.3-r1.ebuild:		x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
Comment 2 Fabian Groffen gentoo-dev 2023-05-04 07:23:02 UTC
yep, this was removed, thanks