Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AppDir and AppImage the default for linux #95

Merged
merged 5 commits into from
Sep 26, 2023

Conversation

afbjorklund
Copy link
Contributor

@afbjorklund afbjorklund commented Sep 1, 2023

Add AppDir files to the tarball so that is possible to run.

AppRun .DirIcon minikube-gui minikube-gui.desktop minikube.png usr/

Create an AppImage to get an all-in-one similar to the dmg.

minikube-gui-linux.AppImage

Closes #49


Uses:

See also:

Add AppDir files to the tarball so that is possible to run.

Create an AppImage to get an all-in-one similar to the dmg.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 1, 2023
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: afbjorklund
Once this PR has been reviewed and has the lgtm label, please assign spowelljr for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 1, 2023
@afbjorklund
Copy link
Contributor Author

@medyagh can we test this, to see if the linuxdeployqt program is installed by default or needs adding ?

@afbjorklund
Copy link
Contributor Author

No such luck: /bin/sh: 2: linuxdeployqt: not found

So we need to download and install it, I suppose...


curl -LO https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
sudo install linuxdeployqt-continuous-x86_64.AppImage /usr/local/bin/linuxdeployqt

Unfortunately jurplel/install-qt-action only installs
macdeployqt and windeployqt, but not linuxdeployqt...

Keep it simple and just `curl` and `sudo install` it,
but do keep a copy around in the cache for next run.
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 5, 2023
@afbjorklund
Copy link
Contributor Author

@medyagh try again ? added a commit to install the missing linuxdeployqt program

@afbjorklund
Copy link
Contributor Author

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Sep 12, 2023

The Linux pipeline will not work in this environment.

There is a problem with running the .AppImage directly:

dlopen(): error loading libfuse.so.2

AppImages require FUSE to run. 
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information

You can install libfuse2, but there is no /dev/fuse anyway:

fuse: device not found, try 'modprobe fuse' first

Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 

It is mostly about some bundled libraries and helpers:

# linuxdeployqt --appimage-extract
squashfs-root/.DirIcon
squashfs-root/AppRun
squashfs-root/linuxdeployqt.desktop
squashfs-root/linuxdeployqt.svg
squashfs-root/usr
squashfs-root/usr/bin
squashfs-root/usr/bin/appimagetool
squashfs-root/usr/bin/desktop-file-validate
squashfs-root/usr/bin/linuxdeployqt
squashfs-root/usr/bin/patchelf
squashfs-root/usr/bin/qt.conf
squashfs-root/usr/bin/zsyncmake
squashfs-root/usr/lib
squashfs-root/usr/lib/appimagekit
squashfs-root/usr/lib/appimagekit/mksquashfs
squashfs-root/usr/lib/libQt5Core.so.5
squashfs-root/usr/lib/libglib-2.0.so.0
squashfs-root/usr/lib/libicudata.so.55
squashfs-root/usr/lib/libicui18n.so.55
squashfs-root/usr/lib/libicuuc.so.55
squashfs-root/usr/lib/libpcre.so.3
squashfs-root/usr/share
squashfs-root/usr/share/doc
squashfs-root/usr/share/doc/libglib2.0-0
squashfs-root/usr/share/doc/libglib2.0-0/copyright
squashfs-root/usr/share/doc/libicu55
squashfs-root/usr/share/doc/libicu55/copyright
squashfs-root/usr/share/doc/libpcre3
squashfs-root/usr/share/doc/libpcre3/copyright
squashfs-root/usr/share/doc/qt59base
squashfs-root/usr/share/doc/qt59base/copyright
squashfs-root/usr/translations

But if you do extract it, then it doesn't work with ubuntu:22.04

ERROR: The host system is too new.
Please run on a system with a glibc version no newer than what comes with the oldest
currently supported mainstream distribution (Ubuntu Focal Fossa), which is glibc 2.31.
This is so that the resulting bundle will work on most still-supported Linux distributions.
For more information, please see
https://github.com/probonopd/linuxdeployqt/issues/340

So it would require the runner to be downgraded to ubuntu:20.04

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Sep 12, 2023

ping @medyagh @spowelljr

@medyagh
Copy link
Contributor

medyagh commented Sep 20, 2023

@afbjorklund is the test/build happy now?

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Sep 20, 2023

Looks happy:

minikube-gui-linux

Was just to chmod +x and run, all dependencies bundled within the single file:

minikube-gui-linux.AppImage


Filesystem size 28203.43 Kbytes (27.54 Mbytes)
	39.07% of uncompressed filesystem size (72194.32 Kbytes)

Running the AppRun from the directory also works fine, while minikube-gui direct has the usual lib issues:

$ ./minikube-gui 
./minikube-gui: /lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.15' not found (required by ./minikube-gui)

@afbjorklund
Copy link
Contributor Author

There is some extra file though, "Minikube--x86_64.AppImage" - it looks like some kind of leftover

I think it was supposed to have the version in the filename but it looks like VERSION is empty ?

@medyagh
Copy link
Contributor

medyagh commented Sep 20, 2023

inikube--x86_64.AppImage" - it looks like some kind of leftover

I think it was supposed to have the version in the filename but it looks like VERSION is empty ?

not sure, can we merge this PR now ?

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Sep 20, 2023

It seems like VERSION is not set for the PR, but only for the release builds - should be OK to merge

If required, extra code added to the GHA workflow to calculate something like 0.3.0-16-gedc5f4e

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 21, 2023
@afbjorklund
Copy link
Contributor Author

Added support for adwaita-qt, so that one can use adwaita or adwaita-dark styles...

Previous error message:

QApplication: invalid style override passed, ignoring it.
    Available styles: Windows, Fusion

light
minikube-gui-linux-light
dark
minikube-gui-linux-dark

@afbjorklund

This comment was marked as resolved.

@afbjorklund afbjorklund marked this pull request as draft September 25, 2023 19:22
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 25, 2023
@afbjorklund afbjorklund marked this pull request as ready for review September 25, 2023 19:39
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 25, 2023
Being set in the environment as QT_STYLE_OVERRIDE=adwaita or
QT_STYLE_OVERRIDE=adwaita-dark, in order to get the theme.

Users with high resolution screens might also need to set
QT_AUTO_SCREEN_SCALE_FACTOR=1 in order to see the icons.
@afbjorklund
Copy link
Contributor Author

afbjorklund commented Sep 25, 2023

Linux looks good now.

	Available styles: HighContrastInverse, HighContrast, Adwaita-HighContrastInverse, Adwaita-HighContrast, Adwaita-Dark, Adwaita, Windows, Fusion

@medyagh medyagh merged commit 079660c into kubernetes-sigs:main Sep 26, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not able to run the linux version on fedora, undefined symbol related to some python lib Qt_5
3 participants