-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add a Freedesktop SDK based image #173
base: master
Are you sure you want to change the base?
Conversation
2eb828b
to
74da365
Compare
What scares me on using a buildstream freedesktop based image, is the lack of any information to keep it up to date when needed. I will have a proper look at the PR tomorrow, thank you |
I had to learn some BuildStream basics but I'll try to make a little README in the buildstream folder. |
b0cd610
to
1679bec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than Add update-binfmts action
commit which I am not familiar with how the actions work much, everything else looks super good and nice. I dig the approach.
@@ -19,6 +27,9 @@ bst source track gnome-build-meta.bst | |||
|
|||
Both junctions are now update to the latest commit of their release branch | |||
|
|||
### Note for future update | |||
- Freedesktop SDK can't be updated until flatpak-builder-lint supports lxml 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could bundle older lxml though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to limit how much the Github Action builds since we have not much space, so no deep override on the Freedesktop junction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Freedesktop SDK 23.08 broke the Python "API" by bumping lxml 4 to lxml 5, from far it does not look like a good thing to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you meant side-by-side instalation, I don't how to do that with pypi sources. It really looks like it is not possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be really cool to have flatpak-builder-lint in gnomeos/gnome-build-meta too! wink wink :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad idea, the tool is too unstable to have it on gnome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm even thinking about just installing poetry and some linter deps (e.g. desktop-file-utils
), because of how much the linter changes (also lxml).
Edit: pip install poetry
is fine to pick a specifix version of the linter, and the included linter is updated with its new runtime dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine, it will only be exposed in gnomeos which is building everything from main anyway.
But for CI then we should have both a pinned version of the tool to avoid breaking everyone using the action, as well as installing it at runtime so we only need to bump the version in the action, not rebuild the age too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lxml 4 is still a blocker to add it to GNOME OS since its deps use lxml 5 forevery version relying on newer 23.08 or later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto as flatpak-builder-lint probably, fits nicely with the devel tooling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not versed on how to build this project from source, so I used a pre-built binary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In gnome, we usually build non-gnome components from tarballs or git tags anyway. We only track main for gnome components we have ownership of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to steal this too now 😆
I also wanted to replace the docker images we use in the GNOME CI flatpak template and I think we could look at moving all of this into a standardised gnomeos or fdsdk docker image along with the tools as they are super useful anyway. I'd suggest merging this and then we start moving things around to gnome-build-meta and see how it works out. @tytan652 Would you be interested in this?
Feel free to ping me or any of the GNOME Release team or fdosdk maintainers. This would also be easier if we end up using the same image as I mentioned above, and will move maintenance to gnome-rt which is fine since it's infra. |
I'm not against trying to upstream elements to them, but:
|
I wasn't aware of this, we can probably fix it or tag a "stable" f-b release. Please file an issue! |
The main reason was dropping FUSE2, Freedesktop SDK should have move to 1.4 now this is out. |
1679bec
to
a764280
Compare
Has anyone tried to port it to 1.4 and fuse3? Were there any issues? |
#169 🤷 We will still need to pin the flatpak-builder version just in case a behavior change happen again. |
1b95f80
to
13f5c00
Compare
Hold flatpak-builder to version 1.3.3 to avoid breakage introduced in later versions
f0ccd47
to
c4bd4c0
Compare
Uses already compiled static build of QEMU to avoid reaching the storage limit of the job To simplify binfmt registering, update-binfmt (Debian tooling) is installed and the needed template generated
Meant to be used in conjunction with the Freedesktop SDK based images to enable QEMU architecture emulation for flatpak-builder using update-binfmts and its templates.
c4bd4c0
to
a9b99bb
Compare
Refactored BuildStream workflows to be less prone to out of space issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could avoid needing binfmt-support by adding a config in /etc/binfmt.d
systemd should already be providing the binfmt service and it probably will work in the container too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Systemd services is a no-go/op in Docker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And binfmt requires privileged access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work, we use patches to appstream that are only available in org.flatpak.Builder
, without those patches it's not usable. There is a cyclic dependency between the linter and org.flatpak.Builder
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A problem that should be worked on and avoid to make it worse.
This PR was made before I discover, the mess that the appstream lib transition created.
So a BuildStream based solution will require upstreaming fine fixes.
It is out of question to duplicate patches and use them in this image rather than upstreaming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I might drop the linter in the base image (and let the deps) since upstream only support running the master branch which is not good.
This base image is meant to be re-built only when we update/add something not all the time because of one tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'm suggesting to drop this as it doesn't work. Upstream doesn't agree with some of the patches and at the moment it is not possible to come to a solution.
Also the expectation is that Flathub raise or lower new appstream checks as per our needs - that's not possible to do without patches sometimes. ximion/appstream#604 (comment)
Next time, it's probably best to introduce a new check here at a low severity and have Flathub raise it (and only make AppStream raise it too after some time has passed).
Also the linter doesn't do tags now, it's deployed from commits of the master branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the expectation is that Flathub raise or lower new appstream checks as per our needs - that's not possible to do without patches sometimes.
Because you do not create your own libappstream validator with its API rather than patching their executables, I can understand that you don't have the bandwidth to do it for now…
But libappstream (including libappstream-compose) API were made to create appstream tooling more easily with less "reinventing the wheel" situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API too, doesn't allow lowering severity for most tags that we want to lower, afaik and it's out of the question right now because of maintainability reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine, we can build/bundle whatever version we need for flathub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine, we can build/bundle whatever version we need for flathub
It specifically requires the patches that live in org.flatpak.Builder package, not just a version of appstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea but we can match whatever the setup for that is, it's purpose built images basically for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the patches are included then it is fine from me, otherwise without them the linter won't work at all.
Note
The new yarn.lock and dist/index.js inflate the change number of approximately 7 500 lines.
This PR implements some of the idea from #170.
my only questioning is about if all the images (one per runtime and arch) can be stored on it ?flatpak-builder
is hold to version 1.3.3 since later version breaks the action on the screenshot part, switching to 1.4 can be done once the action is ready.update-binfmts
action needs to used. This replace the need to install docker in a container and ran the setup-qemu-action.The image is built, pushed and tested on my freedesktop_based_image_test branch