Skip to content
This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Enabling arm64 support for omakub - #29

Closed
ghost wants to merge 20 commits into
masterfrom
unknown repository
Closed

Enabling arm64 support for omakub#29
ghost wants to merge 20 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jun 7, 2024

Copy link
Copy Markdown

Hey I'm trying to incoporate arm64 support under this script as mentioned in

Currently NOT every app will work, with the biggest app that doesn't work being chrome
We can go chrome flatpak for example here, but leaving that up to you @dhh
Currently I am NOT finished doing every app and checking every package.
A good rule of thumb, If I haven't changed anything it probability works on arm unless it is farther down the list then docker.sh
Further I haven't checked YET
I haven't also done neovim(even though it is easy) since I was waiting for the other pull request about neovim to be finished before doing neovim stuff in this pull

Iljo De Poorter added 2 commits June 7, 2024 11:23
@ghost

ghost commented Jun 7, 2024

Copy link
Copy Markdown
Author

this is in reference to #29 not wholly done yet but I'm getting very very close. But I need to leave for an exam right now, sorry to ping @dhh but is this a good way of handing it?

@ghost

ghost commented Jun 7, 2024

Copy link
Copy Markdown
Author

Out of what I've done already
Chrome, Signal, dropbox-nautilus, Zoom
Those are the apps which currently don't have a native arm version for linux(yet). We could use flatpaks or webapps for any of these options. DHH chooses which he prefers where

@ghost

ghost commented Jun 7, 2024

Copy link
Copy Markdown
Author

I'm pretty sure if you merge this piece of code there will be arm64 support for all the app installs, I also found a way to get automatically the latest ruby version automatically
@dhh could you review the code?

@ghost

ghost commented Jun 7, 2024

Copy link
Copy Markdown
Author

the ruby push is to fix #38 which is something you noted
And the latest push about pinta is me reversing an error I made while very sleepy yesterday

Comment thread install/app-chrome.sh Outdated
the issue with app-localsend needs to be resolved by dhh, but the -y fix was already implemented here before
@ghost

ghost commented Jun 8, 2024

Copy link
Copy Markdown
Author

if you could, would you mind looking at this pr @dhh

@coffeejunk

Copy link
Copy Markdown
Contributor

This is great, however, the current version will make the login hang due to the migration to mise (#36).

The initial install of mise will fail (silently) since it's not (yet) targeting arm64 and after the logout the system will hang on the installation confirmation.

@coffeejunk coffeejunk mentioned this pull request Jun 8, 2024
@ghost

ghost commented Jun 8, 2024

Copy link
Copy Markdown
Author

This is great, however, the current version will make the login hang due to the migration to mise (#36).

The initial install of mise will fail (silently) since it's not (yet) targeting arm64 and after the logout the system will hang on the installation confirmation.

Great I didn't catch that, thanks a lot and I'il implement it now

now I really think we should be ready for a merger or changes as to how we handle the non supported arm packages
@ghost

ghost commented Jun 8, 2024

Copy link
Copy Markdown
Author

Thanks a lot for the feedback, should be fixed now
Now I think we are ready for a merger unless dhh decides what he wants to do with the non arm native apps

Comment thread install/mise.sh
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1>/dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=${ARCH}] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: i guess you could also set arch=amd64,arm64 to support both?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean? Current we use ARCH to get the architecture, ARCH is a global variable set in the main sh script ran on starting omakub. And then ARCH indeed is arm64 or amd64, whatever ARCH is automatically set to at the start. What do you mean here, what do I need to change?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so ARCH is dynamically set based on what architecture you use, so just doing arch=${ARCH} should work no?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roele That'll fetch package info for the other architecture as well, however.

The arch can just be omitted, too. Then it'll use the default Apt::Architectures, which is just the native amd64/arm64.

@coffeejunk

Copy link
Copy Markdown
Contributor
Screenshot 2024-06-09 at 10 41 13 PM

🎉

@ghost

ghost commented Jun 10, 2024

Copy link
Copy Markdown
Author

🎉

thanks a lot for testing and verifying, are there any issues with the installing? of the apps? (ignoring the issues I already know about with missing apps)

@coffeejunk

Copy link
Copy Markdown
Contributor

@iljo-dp you can view the install log here: https://gist.github.com/coffeejunk/f228157342789a629425579ee5918b09

@ghost

ghost commented Jun 10, 2024

Copy link
Copy Markdown
Author

added a zoom webapp when using arm64, this uses Chromium..
Chromium itself isn't yet installed by default, and we are still discussing internally whether or not to opt for chromium or something else;

@ghost

ghost commented Jun 10, 2024

Copy link
Copy Markdown
Author

and this last commit is just fixing compatibility between my branch and the main branch

@ghost

ghost commented Jun 11, 2024

Copy link
Copy Markdown
Author

@dhh what do we still need before a merger would be possible?

Comment thread install.sh
# Determine architecture
ARCH=$(dpkg --print-architecture)
export ARCH

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nice property of the install/* scripts is that they can be invoked independently. Introducing global env vars breaks that. Would keep this invocation in each script.

Alternatively, you could

: "${ARCH:=$(dpkg --print-architecture)}"

in the scripts to lazy-set the env var.

Comment thread install.sh Outdated
Comment thread install/app-github-cli.sh Outdated
Comment thread install/app-lazydocker.sh Outdated
Comment thread install/app-lazydocker.sh
Comment thread install/app-zellij.sh Outdated
Comment thread install/app-zoom.sh Outdated
Comment thread install/docker.sh Outdated
Comment thread install/mise.sh
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1>/dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=${ARCH}] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roele That'll fetch package info for the other architecture as well, however.

The arch can just be omitted, too. Then it'll use the default Apt::Architectures, which is just the native amd64/arm64.

gtk-launch dropbox.desktop
elif [[ $ARCH == "arm64" ]]; then
#https://packages.ubuntu.com/noble/nautilus-dropbox
echo "Dropbox is not supported on arm64 architecture."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk building from source seems kinda sketchy? we could do that but ehh...
Maestral seems nice, and is perhaps something @dhh would like also, perhaps as just a replacement for dropbox?

@ghost

ghost commented Jun 11, 2024

Copy link
Copy Markdown
Author

Thanks a lot for the amazing feedback @jeremy I'll work on it all tomorrow, current I don't have the time but thanks a lot for the deep thorough help I'll make it work tomorrow, thanks a lot I really mean it.

Iljodp and others added 5 commits June 12, 2024 12:01
Co-authored-by: Jeremy Daer <jeremydaer@gmail.com>
Co-authored-by: Jeremy Daer <jeremydaer@gmail.com>
Co-authored-by: Jeremy Daer <jeremydaer@gmail.com>
Co-authored-by: Jeremy Daer <jeremydaer@gmail.com>
Co-authored-by: Jeremy Daer <jeremydaer@gmail.com>

@ghost ghost left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot for the amazing feedback, most of it should be finished by now thanks a lot again we wouldn't have done this without you

Comment thread install/mise.sh
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1>/dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=${ARCH}] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean? Current we use ARCH to get the architecture, ARCH is a global variable set in the main sh script ran on starting omakub. And then ARCH indeed is arm64 or amd64, whatever ARCH is automatically set to at the start. What do you mean here, what do I need to change?

Comment thread install/mise.sh
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1>/dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=${ARCH}] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so ARCH is dynamically set based on what architecture you use, so just doing arch=${ARCH} should work no?

Comment thread install/app-pinta.sh Outdated
Comment thread install/app-localsend.sh
Comment thread install/app-github-cli.sh Outdated
Comment thread install/app-lazygit.sh Outdated
Comment thread install/app-signal.sh
sudo apt update
sudo apt install -y signal-desktop
elif [[ $ARCH == "arm64" ]]; then
echo "Signal Desktop is only available for amd64 architecture."

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wow, sounds great I'il look into it soon :D

Comment thread install/app-vscode.sh
Comment thread install/app-zoom.sh Outdated
gtk-launch dropbox.desktop
elif [[ $ARCH == "arm64" ]]; then
#https://packages.ubuntu.com/noble/nautilus-dropbox
echo "Dropbox is not supported on arm64 architecture."

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk building from source seems kinda sketchy? we could do that but ehh...
Maestral seems nice, and is perhaps something @dhh would like also, perhaps as just a replacement for dropbox?

@ghost

ghost commented Jun 12, 2024

Copy link
Copy Markdown
Author

I'il fix the other stuff soon, I got an exam to take tomorrow so currently I'm working for that, sorry to let y'all down for now

@Clay26

Clay26 commented Jun 13, 2024

Copy link
Copy Markdown

For Neovim, the latest available version for ARM in the apt repository is 0.7.2, even when using ppa:neovim-ppa/stable, which is not supported by LazyVim (see requirements). One option is to install from source. Here's how I currently install Neovim on my ARM machines (credit to Carlos Hurtado):

sudo apt-get install ninja-build \
gettext libtool libtool-bin \
autoconf automake cmake g++ \
pkg-config unzip
git clone https://github.com/neovim/neovim.git
cd neovim
git pull
git checkout stable
sudo make CMAKE_BUILD_TYPE=Release CMAKE_INSTALL_PREFIX=/opt/nvim install
echo 'export PATH="/opt/nvim/bin:$PATH"' >> ~/.bashrc

@nahue

nahue commented Jun 13, 2024 via email

Copy link
Copy Markdown

Comment thread install/app-chrome.sh
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install -y ./google-chrome-stable_current_amd64.deb
rm google-chrome-stable_current_amd64.deb
elif [[ $ARCH == "arm64" ]]; then

@dre-hh dre-hh Jun 17, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chromium has no widevine on arm64, thereofre cannot play netflix, spotify etc.
Also it might require certain flags for launching with gpu acceleration suuport to watch youtube properly. (guess the latter can only be properly tested on the actual device)
For widevine people often pull some bins from chromeos projects

@dre-hh dre-hh Jun 28, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some recent reserach on this, there is still no binary package with widevine for ubuntu or an arm browser which ships with it.

AsahiLinux is hosting a widevine installer script from crhomeos project which is pulling it from googleapis.com

And Brave browser published a manual how to link it #28903.

Chrome has released an arm64 version for windows. Guess a an arm chrome with widevine support is also likely to happen in future. But for now, probably going asahilinux way is best: adding custom installer, updater via chromeos binaries. Probably its best done in another PR once arm support ist merged

Comment thread install/app-spotify.sh
Version=1.0
Name=Spotify
Comment=Spotify online music player
Exec=xdg-open --app=https://open.spotify.com/ --name=Spotify

@dre-hh dre-hh Jun 17, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this opening in Chromium? I believe that also won't run without widevine

@Clay26

Clay26 commented Jul 3, 2024

Copy link
Copy Markdown

Hi @iljo-dp,

I wanted to check in on this PR. Are you still working on it? Is there anything I can assist with to help move this forward?

Thanks!

@Clay26

Clay26 commented Jul 3, 2024

Copy link
Copy Markdown

I believe we also need to build alacrity from source since there's no available packages for aarch64

@rwiankowski

Copy link
Copy Markdown

I believe we also need to build alacrity from source since there's no available packages for aarch64

You can install alacritty using snap: sudo snap install alacritty --classic

It works out of the box on a fresh arm64 Ubuntu install

@dhh

dhh commented Jul 27, 2024

Copy link
Copy Markdown
Collaborator

This PR needs a major overhaul. Anyone interested in investigating? For now, I'd prefer if we just don't install an application if it's not available as arm64. Then we fill in as they become available.

@IbrahimTanyalcin

Copy link
Copy Markdown

Any news on this PR?, it is essentially aims the same as #227. In 227 if things fail, installation continues, essentially skipping those that are faulty/Not available and generates a report in the root dir so that they can be retried later as they are available.

@ghost ghost closed this by deleting the head repository Sep 3, 2024
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants