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

Update runtime and scratch desktop #55

Merged

Conversation

dylanmccall
Copy link
Contributor

@dylanmccall dylanmccall commented Nov 21, 2023

In addition to updating scratch-desktop and its ilk, along with the runtime (which all happened together due to requiring a newer version of NodeJS), I ended up doing a few other things while I was here:

  • I cleaned up a few details in edu.mit.Scratch.yaml, removing some old comments and unused code.
  • The newer version of Electron means we can drop the filesystem=home permission.
  • I noticed Turbowarp was handling *.sb3 files from Scratch, so I added the same kind of support to the Scratch app. The mime type is a bit odd (application/x.scratch.sb3 as opposed to application/x-scratch-sb3), but that appears to be the format Scratch upstream uses, as well as Turbowarp.

I ran into one strange issue where the URL for the scratch-gui git repo in generated-sources.json turned out to be a git+ssh:// style URL, which Flathub wasn't impressed with. I'd love to explore why that happened, but for now, I manually changed it to an https:// URL.

Also, note that I'm only updating to org.freedesktop.Platform//22.08 for now. I'd like to bump all the way to 23.08 soon, but this was already tricky to line up (due to also needing a different version of NodeJS), so I think it's easier doing that separately.

I'm happy to split this all into different pull requests if you prefer.

@flathubbot
Copy link

Started test build 82833

@flathubbot
Copy link

Build 82833 failed

@dylanmccall
Copy link
Contributor Author

There's one last (I think) thing to do here, which is scratch-gui added a prepublish script. A prepublish script is yet another diabolical way a nodejs project can ruin the day of anyone who cares about reproducible builds. This one runs this glob of code: https://github.com/scratchfoundation/scratch-gui/blob/develop/scripts/prepublish.mjs#L113-L126. I was hoping to just ignore it and not download this file and call it a day, //but// it breaks the build, so i need to add some extra handling to the project's Python script that generates "asset-sources.json".

@dylanmccall dylanmccall force-pushed the update-runtime-and-scratch-desktop branch from d1c5f3d to 455d1f9 Compare November 21, 2023 21:20
@flathubbot
Copy link

Started test build 82966

@flathubbot
Copy link

Build 82966 failed

@flathubbot
Copy link

Started test build 82970

@flathubbot
Copy link

Build 82970 failed

Update runtime to org.freedesktop.Platform//22.08
Update nodejs to 16
Update scratch-desktop to v3.30.5
@dylanmccall dylanmccall force-pushed the update-runtime-and-scratch-desktop branch from 5433d52 to d635e9d Compare November 22, 2023 04:32
@flathubbot
Copy link

Started test build 83019

@dylanmccall dylanmccall marked this pull request as ready for review November 22, 2023 04:32
@flathubbot
Copy link

Build 83019 failed

@dylanmccall dylanmccall force-pushed the update-runtime-and-scratch-desktop branch from d635e9d to b744c92 Compare November 22, 2023 04:47
@flathubbot
Copy link

Started test build 83021

@flathubbot
Copy link

Build 83021 failed

@dylanmccall dylanmccall force-pushed the update-runtime-and-scratch-desktop branch from b744c92 to 9187780 Compare November 22, 2023 04:51
@flathubbot
Copy link

Started test build 83023

@flathubbot
Copy link

Build 83023 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/65657/edu.mit.Scratch.flatpakref

@dylanmccall dylanmccall force-pushed the update-runtime-and-scratch-desktop branch from 9187780 to de2d158 Compare November 22, 2023 18:39
@flathubbot
Copy link

Started test build 83134

@flathubbot
Copy link

Build 83134 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/65769/edu.mit.Scratch.flatpakref

@refi64
Copy link
Collaborator

refi64 commented Nov 22, 2023

Thanks!

I ran into one strange issue where the URL for the scratch-gui git repo in generated-sources.json turned out to be a git+ssh:// style URL, which Flathub wasn't impressed with. I'd love to explore why that happened, but for now, I manually changed it to an https:// URL.

Might be worth mentioning in the readme if that needs to be redone when flatpak-node-generator gets run?

I was hoping to just ignore it and not download this file and call it a day, //but// it breaks the build, so i need to add some extra handling to the project's Python script that generates "asset-sources.json".

I don't see any changes there other than the URL update, was this no longer necessary or did they get accidentally left out of the commits?

@dylanmccall
Copy link
Contributor Author

dylanmccall commented Nov 23, 2023

Might be worth mentioning in the readme if that needs to be redone when flatpak-node-generator gets run?

Yeah, I can do that :) Maybe I'll add a note to run flatpak-builder-lint, since there's a lot happening here. The problem I ran into was probably this one you were working on: flatpak/flatpak-builder-tools#381. The lockfile is indeed lockfile version 2 now. So that's, err, concerning, but also nice it's only the one thing that breaks here 🤔

I don't see any changes there other than the URL update, was this no longer necessary or did they get accidentally left out of the commits?

Yep, I ended up squashing that change into c5126b6. Mostly this part: c5126b6#diff-1660a6484fcf48528c7f07a34e072c0405e15616909a7ddf1c8df4dfd9189273R99-R107, and the addition of npm_config_ignore_scripts: 'true'.

Our system for generating package sources is complicated. So, it is
useful to check that the resulting files are correct, and it quicker to
run flatpak-builder-lint locally before submitting to Flathub.
@flathubbot
Copy link

Started test build 83168

@flathubbot
Copy link

Build 83168 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/65803/edu.mit.Scratch.flatpakref

@wjt
Copy link
Member

wjt commented Nov 27, 2023

bot, build

@flathubbot
Copy link

Queued test build for edu.mit.Scratch.

@flathubbot
Copy link

Started test build 83853

@flathubbot
Copy link

Build 83853 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/66494/edu.mit.Scratch.flatpakref

Copy link
Member

@wjt wjt left a comment

Choose a reason for hiding this comment

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

I'm just a person but this looks good to me.

- 'install -Dm 644 edu.mit.Scratch.desktop /app/share/applications/edu.mit.Scratch.desktop'
- install -Dm 644 edu.mit.Scratch.appdata.xml /app/share/metainfo/edu.mit.Scratch.appdata.xml
- install -Dm 644 edu.mit.Scratch.desktop /app/share/applications/edu.mit.Scratch.desktop
- install -Dm 644 edu.mit.Scratch.mime.xml /app/share/mime/packages/edu.mit.Scratch.mime.xml
Copy link
Member

Choose a reason for hiding this comment

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

Interesting, today I learned how mime types are exported by Flatpak apps.

sha256: dfd574b709307fe76c44dbb6b0ac8942e7908f4d5c18359fae25fbda3c9f4399
- type: inline
dest: scratch-gui-src-generated
dest-filename: microbit-hex-url.cjs
Copy link
Member

Choose a reason for hiding this comment

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

I'm sorry to report that this extension doesn't work, but that's not a regression.

@refi64 refi64 merged commit 957667d into flathub:master Dec 8, 2023
2 checks passed
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.

4 participants