Page 1 of 1

Question about packages with missing keyword

Posted: Thu May 08, 2025 6:34 am
by Banana
Using UTM to run virtual machines on iOS and gentoo arm64 as a guest.


As an example I want install app-editors/sublime-text

Code: Select all

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 0.82 s (backtrack: 0/20).


!!! All ebuilds that could satisfy "app-editors/sublime-text" have been masked.
!!! One of the following masked packages is required to complete your request:
- app-editors/sublime-text-4_p4192::gentoo (masked by: missing keyword)
- app-editors/sublime-text-4_p4189::gentoo (masked by: missing keyword)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
I do understand that this means a package is not provided for the used arch (in this case arm64).

1. What needs to be done or can be done?
2. What does this mean to other packages? Is the availability for this arch limited and thus using gentoo is limited compared to other archs?

Re: Question about packages with missing keyword

Posted: Thu May 08, 2025 7:03 am
by Koyan
The package maintainer probably doesn't have an arm64 system so he hasn't been able to test the package on that arch.

Keyword it for yourself: create a file /etc/portage/package.accept_keywords/sublime-text with contents:

Code: Select all

=app-editors/sublime-text-4_p4192 **
If the package compiles and works fine, you could open a bug report with a request to keyword it in the repo.

Re: Question about packages with missing keyword

Posted: Thu May 08, 2025 7:21 am
by fedeliallalinea
With a source based package usually you can try to add app-editors/sublime-text ** entry in package.accept_keywords to see if compile with your arch.
It's possibile that a keyword is not added because not tested.
In this case this workaround doesn't work because sublime-text download a compiled package for amd64, the solution is change ebuild to add the arm64 keywords because exists also a linux version for this keyword.

Posted: Thu May 08, 2025 8:01 am
by Zucca
For such packages on my arm64 system, I've set them to accept amd64 keyword up to certain version.
For example:

Code: Select all

<app-editors/sublime-text-4_p9999 amd64
So then you get the stable versions for amd64 for your arm64. So far this has worked on my use-cases. Although, I haven't installed this exact package on my arm64 system.

Posted: Thu May 08, 2025 10:49 am
by Banana
Ah, thx so far.

It looks like that the ebuilds https://gitweb.gentoo.org/repo/gentoo.g ... blime-text do only download the x64 package

Code: Select all

SRC_URI=" amd64? ( https://download.sublimetext.com/sublime_text_build_${MY_PV}_x64.tar.xz )"
But https://www.sublimetext.com/download does provide (after a click on direct downloads after Linux repos) an arm package.
Next step would be to create a ebuild for the arm package and try that.

A emerge does currenlt result in, but I'm not really sure if this is related to the arch difference

Code: Select all

>>> Emerging (1 of 1) app-editors/sublime-text-4_p4192::gentoo
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/app-editors/sublime-text-4_p4192/work
>>> Preparing source in /var/tmp/portage/app-editors/sublime-text-4_p4192/work ...
 * Applying sublime-text-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch ...
can't find file to patch at input line 19
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 9df21c9ec00ac34174b443cc7cd8c4053b98eb00 Mon Sep 17 00:00:00 2001
|From: webstrand <webstrand@gmail.com>
|Date: Thu, 27 May 2021 17:08:03 -0400
|Subject: [PATCH 1/2] remove deprecated key OnlyShowIn from launcher
|
|Silences a QA notice that the key "OnlyShowIn" in group
|"Desktop Action new-file" and "Desktop Action new-window" is deprecated.
|
|https://bugs.freedesktop.org/show_bug.cgi?id=66712 No replacement or
|alternative is provided, the key is simply ignored.
|---
| sublime_text.desktop | 2 --
| 1 file changed, 2 deletions(-)
|
|diff --git a/sublime_text.desktop b/sublime_text.desktop
|index 7407709..b171254 100644
|--- a/sublime_text.desktop
|+++ b/sublime_text.desktop
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored                                                                                          [ !! ]
 * ERROR: app-editors/sublime-text-4_p4192::gentoo failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/app-editors/sublime-text-4_p4192/files/sublime-text-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch
 * 
 * Call stack:
 *               ebuild.sh, line  136:  Called src_prepare
 *             environment, line  611:  Called default
 *      phase-functions.sh, line  877:  Called default_src_prepare
 *      phase-functions.sh, line  953:  Called __eapi8_src_prepare
 *        phase-helpers.sh, line  815:  Called eapply '--' '/var/tmp/portage/app-editors/sublime-text-4_p4192/files/sublime-text-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch' '/var/tmp/portage/app-editors/sublime-text-4_p4192/files/sublime-text-4_p4107-set-explicit-startupwmclass-in-launcher.patch'
 *        phase-helpers.sh, line 1070:  Called _eapply_patch '/var/tmp/portage/app-editors/sublime-text-4_p4192/files/sublime-text-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch'
 *        phase-helpers.sh, line 1003:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/app-editors/sublime-text-4_p4192/files/sublime-text-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=app-editors/sublime-text-4_p4192::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-editors/sublime-text-4_p4192::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-editors/sublime-text-4_p4192/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-editors/sublime-text-4_p4192/temp/environment'.
 * Working directory: '/var/tmp/portage/app-editors/sublime-text-4_p4192/work'
 * S: '/var/tmp/portage/app-editors/sublime-text-4_p4192/work/sublime_text'

Posted: Thu May 08, 2025 10:57 am
by NeddySeagoon
Banana,

If it works, file a bug so that the ebuild can be updated and we can all have app-editors/sublime-text on arm64. Well, it must start at ~arm64
For bonus points make a github pull request that closes the above bug.

-- edit --

Eww ...
https://www.sublimetext.com/download wrote:Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use. There is currently no enforced time limit for the evaluation.
It's an evil binary blob too.

Posted: Thu May 08, 2025 11:12 am
by fedeliallalinea
Banana wrote:A emerge does currenlt result in, but I'm not really sure if this is related to the arch difference
In a amd64 arch patches are applied

Code: Select all

 * sublime_text_build_4192_x64.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                      [ ok ]
>>> Unpacking source...
>>> Unpacking sublime_text_build_4192_x64.tar.xz to /var/tmp/portage/app-editors/sublime-text-4_p4192/work
>>> Source unpacked in /var/tmp/portage/app-editors/sublime-text-4_p4192/work
>>> Preparing source in /var/tmp/portage/app-editors/sublime-text-4_p4192/work/sublime_text ...
 * Applying sublime-text-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch ...                                                              [ ok ]
 * Applying sublime-text-4_p4107-set-explicit-startupwmclass-in-launcher.patch ...                                                                     [ ok ]
>>> Source prepared.

Posted: Thu May 08, 2025 6:40 pm
by Zucca
NeddySeagoon wrote:It's an evil binary blob too.
Wait what?
I always thought it was FOSS. But indeed it's "shareware" according to wikipedia.

I stand corrected: My method, previously suggested, doesn't work at all on binary packages.

Posted: Fri May 09, 2025 6:20 am
by Banana
NeddySeagoon wrote:It's an evil binary blob too.
Zucca wrote:I always thought it was FOSS. But indeed it's "shareware" according to wikipedia.
Yeah, I know. I often need something between vi/nano and intelliJ to quickly note or edit something. Which does have a nice folder and file view, is not too bloated and is fast.

Next step would be to create an ebuild for the arm package.

Posted: Mon May 12, 2025 8:27 am
by Banana
I've found an existing bug and added my changes as a comment.