Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 882081 - Reversal of dev-embedded/openocd-9999 last rites
Summary: Reversal of dev-embedded/openocd-9999 last rites
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal enhancement (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords: EBUILD, KEYWORDREQ, PATCH
Depends on:
Blocks:
 
Reported: 2022-11-20 07:01 UTC by Rob MacKinnon
Modified: 2022-11-21 18:34 UTC (History)
3 users (show)

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


Attachments
openocd-9999-proper_ABI_checking.patch (openocd-9999-proper_ABI_checking.patch,698 bytes, patch)
2022-11-20 07:05 UTC, Rob MacKinnon
Details | Diff
Revised patch (openocd-9999-proper_ABI_checking-v2.patch,672 bytes, patch)
2022-11-21 18:34 UTC, Rob MacKinnon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob MacKinnon 2022-11-20 07:01:19 UTC
The current ebuild for 0.11/9999 is marked as a last rights mask as it did not support 64bit architectures. A recent look at the code base at OPENOCD's git repo [https://repo.or.cz/openocd.git] shows active development, and looking into `configuration.ac` shows there is a flag `HAVE_ELF64` to enable/use a 64bit architecture.

Application of the attached patch updates the KEYWORDS and adds checking for the appropriate ABI to the prepare stage of the '9999' ebuild, applying the correct autoreconf flag.

Reproducible: Always

Steps to Reproduce:
Unsure of when the last rights were given...so happens everytime for a while now?
Actual Results:  
Package doesn't build, and you get the mask text.

Expected Results:  
Build the 64bit version.
Comment 1 Rob MacKinnon 2022-11-20 07:05:29 UTC
Created attachment 833927 [details, diff]
openocd-9999-proper_ABI_checking.patch

- Updates KEYWORDS for amd64 and arm64, removing the 32bit ABI
- Applies checking of ABI, and sets built-in autoreconf flag for 64bit binaries.
Comment 2 Rob MacKinnon 2022-11-20 07:09:53 UTC
Sorry @Sam, didn't mean to clobber your change. I re-applied it afterwards.  Thank you!
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-20 07:25:52 UTC
(In reply to Rob MacKinnon from comment #2)
> Sorry @Sam, didn't mean to clobber your change. I re-applied it afterwards. 
> Thank you!

No worries! I've done it countless times to others - I've never once pressed the right button on the mid-air collision page :)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-21 07:31:41 UTC
Rob, would you mind (In reply to Rob MacKinnon from comment #1)
> Created attachment 833927 [details, diff] [details, diff]
> openocd-9999-proper_ABI_checking.patch
> 
> - Updates KEYWORDS for amd64 and arm64, removing the 32bit ABI

Why drop arm/x86? Does it only work for 64-bit now? (Sorry, I'm not familiar with openocd, but I suspect if I don't handle this, it's going to take a while for someone else to.)

> - Applies checking of ABI, and sets built-in autoreconf flag for 64bit
> binaries.

FWIW, ebuilds are guaranteed to be bash, and '==' is a bashism, so we may as well just use [[ ]].

Once I know the deal with the KEYWORDS, I'll apply this, thank you!
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-21 07:32:07 UTC
(In reply to Sam James from comment #4)
> Rob, would you mind (In reply to Rob MacKinnon from comment #1)
> > Created attachment 833927 [details, diff] [details, diff] [details, diff]
> > openocd-9999-proper_ABI_checking.patch
> > 
> > - Updates KEYWORDS for amd64 and arm64, removing the 32bit ABI
> 
> Why drop arm/x86? Does it only work for 64-bit now? (Sorry, I'm not familiar
> with openocd, but I suspect if I don't handle this, it's going to take a
> while for someone else to.)
> 

(oh! I didn't realise it had other maintainers, sorry! I thought it was only embedded@).
Comment 6 Rob MacKinnon 2022-11-21 10:01:11 UTC
(In reply to Sam James from comment #4)
> Rob, would you mind (In reply to Rob MacKinnon from comment #1)
> > Created attachment 833927 [details, diff] [details, diff] [details, diff]
> > openocd-9999-proper_ABI_checking.patch
> > 
> > - Updates KEYWORDS for amd64 and arm64, removing the 32bit ABI
> 
> Why drop arm/x86? Does it only work for 64-bit now? (Sorry, I'm not familiar
> with openocd, but I suspect if I don't handle this, it's going to take a
> while for someone else to.)

Just based on the docs, the KEYWORDS for `arm` and `x86` are 32bit ABI keywords, and are checked against the build system ACCEPT_KEYWORDS. Since the last rites mask message was due to it's multilib deps, seemed right to kill those in favor of the 64bit ones as the app has a flag to build as 64bit and doesn't have any affect on the applications support for devices.
 
> > - Applies checking of ABI, and sets built-in autoreconf flag for 64bit
> > binaries.
> 
> FWIW, ebuilds are guaranteed to be bash, and '==' is a bashism, so we may as
> well just use [[ ]].

Heh, good to know about the brackets! I'm just gun shy to them...
 
> Once I know the deal with the KEYWORDS, I'll apply this, thank you!

So I'm actually going to put on the brakes to applying this.

The app still supports 32bit ABI, and if you are on another profile probably want it to built that ABI binary (e.g. `default/linux/amd64/17.1/desktop/gnome/systemd` ). Since I added the logic for the build env flag to set `HAVE_ELF64` in the event it's a 64bit ABI, and subsequently builds actual 64bit binaries. I realize that I have set the ebuild KEYWORDS incorrectly.

They should inclusively read `KEYWORDS="~amd64 ~arm64 ~arm ~x86"`, and what hit me while writing this response is probably important. I'm building on the no-multilib profile "default/linux/amd64/17.1/no-multilib/systemd". Hence the mask message.

TL;DR; I'm on a no-multilib profile, and restricted the ebuild KEYWORDS, added logic to flag 64bit ABI correctly for prepare, and should have expanded the ebuild KEYWORDS instead of restricting them.

It's pretty late I can submit a new patch tomorrow with the corrected KEYWORDS.
Comment 7 Rob MacKinnon 2022-11-21 18:34:21 UTC
Created attachment 835617 [details, diff]
Revised patch

updated KEYWORDS to be inclusive