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

Gourmet flatpak repository builder #149

Merged
merged 12 commits into from
Jul 30, 2020

Conversation

OzarkShepherd
Copy link

This workflow builds a flatpak repository from the github. The commands to install the flatpak are commented out for reference.

upload flatpak manifest
added workflow to build a repo
…hinkle.Gourmet.yml

changed directory to root
removed trailing white spaces
@cydanil
Copy link
Collaborator

cydanil commented Jul 19, 2020

I think that this workflow could be merged within the existing CreateFlatpak, and following that, creating a single-file bundle

@OzarkShepherd
Copy link
Author

The CreateFlatpack workflow is meant for building a test run of changes to Gourmet without actually installing Gourmet to a system. The repository builder is for hosting the finished app so it can be downloaded and installed. Merging would essentially change the function of CreateFlatpak and remove the test run. I could do that, but is CreateFlatpak not useful by itself?

added single-file bundle workflow
removed trailing whitespaces
renamed yaml to better show present purpose
@OzarkShepherd
Copy link
Author

The single-file bundle is now in the workflow.

Copy link
Collaborator

@cydanil cydanil left a comment

Choose a reason for hiding this comment

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

Okay, now that the bundle is created, it's possible to make it an artefact with something like

    - name: Upload Flatpak
      uses: actions/upload-artifact@v2
      with:
        name: gourmet.flatpak
        path: ./gourmet.flatpak

at the end of the workflow :)


- name: Build Bundle
run: |
flatpak build-bundle repo Gourmet io.github.thinkle.Gourmet
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's make the output file gourmet.flatpak, so that we know what it is.

changed filename to gourmet.flatpack
added Upload Flatpak script from Cyril
@cydanil
Copy link
Collaborator

cydanil commented Jul 19, 2020

I see that the copy of files is not working:

  cp /app/share/gourmet/ui/* /app/share/gourmet
  shell: /usr/bin/bash -e {0}
cp: cannot stat '/app/share/gourmet/ui/*': No such file or directory
##[error]Process completed with exit code 1.

Maybe it can be skipped altogether, given that it's a workaround for a known bug?

took out workaround for issue 107
@OzarkShepherd
Copy link
Author

The workaround is taken out now.

@cydanil
Copy link
Collaborator

cydanil commented Jul 19, 2020

LGTM! I was able to install the flatpak from the artifact, and it installed all right on Linux Mint 20:

image

(it crashes because of #107, but's that's unrelated)

That's a massive achievement, thanks a lot for your efforts!
Absolutely cracking :)

Copy link
Collaborator

@cydanil cydanil left a comment

Choose a reason for hiding this comment

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

Let's leave the PR simmer a bit, would other people have some input.

In my opinion, it deprecates the previous workflow, but I have no strong opinion on that.

@cydanil
Copy link
Collaborator

cydanil commented Jul 23, 2020

Do you know what's the deal with the icon?

@OzarkShepherd
Copy link
Author

I have the icons on my computer but maybe because I installed for the user only. For some reason I thought it was fixed until I tried a system wide install in a virtual machine. The icons I believe are not installing system wide because of permissions. I gave the Gourmet flatpak home directory access but was reluctant to give it root file access permanently just for the one time need of installing icons. I have asked people more proficient with flatpaks than me if there is a workaround, and am waiting for a response.

@cydanil
Copy link
Collaborator

cydanil commented Jul 23, 2020

In io.github.thinkle.Gourmet.yml, why are there two sections PrePipDependencies and PipDependencies?
I think it would be better to do a pip install -r requirements, which should encompass all the dependencies.

@OzarkShepherd
Copy link
Author

The icons are a formatting issue. They need to be renamed to io.github.thinkle.gourmet.png or .svg, which I can do in the manifest. However, when I rename the icons for the flatpak to install, Gourmet crashes because it is looking for the old icon name.
DEBUG: /app/lib/python3.8/site-packages/gourmet/GourmetRecipeManager.py: 44 No RTF support Traceback (most recent call last): File "/app/bin/gourmet", line 33, in <module> GourmetRecipeManager.startGUI() File "/app/lib/python3.8/site-packages/gourmet/GourmetRecipeManager.py", line 670, in startGUI splash.set_icon_from_file(os.path.join(icondir,'gourmet.png')) gi.repository.GLib.Error: g-file-error-quark: Failed to open file “/app/share/icons/hicolor/48x48/apps/gourmet.png”: No such file or directory (4)

@cydanil
Copy link
Collaborator

cydanil commented Jul 30, 2020

This will help develop a more streamlined installation down the line, where we aim to add it to flathub. Thank you again for your work!

@cydanil cydanil merged commit 73080d1 into kirienko:master Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants