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

Add a Freedesktop SDK based image #173

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions buildstream/elements/components/binfmt-support.bst
Copy link

@alatiera alatiera Feb 13, 2024

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.

https://www.man7.org/linux/man-pages/man5/binfmt.d.5.html

Copy link
Contributor Author

@tytan652 tytan652 Feb 13, 2024

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

Copy link
Contributor Author

@tytan652 tytan652 Feb 13, 2024

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
kind: autotools

build-depends:
- freedesktop-sdk.bst:public-stacks/buildsystem-autotools.bst

depends:
- freedesktop-sdk.bst:components/libpipeline.bst

variables:
conf-local: >-
--disable-upstart

sources:
- kind: tar
url: https://download.savannah.nongnu.org/releases/binfmt-support/binfmt-support-2.2.2.tar.gz
ref: cce14163f9b526283e6f0d00f3be1cfe239fa2c7574e5e0ba8ad3db74166a4a5
30 changes: 30 additions & 0 deletions buildstream/elements/components/qemu-user.bst

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 😆

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
kind: manual

build-depends:
- freedesktop-sdk.bst:components/util-linux.bst

config:
configure-commands:
- |
sed -i 's|${qemu_target_list}|"aarch64"|g' src/scripts/qemu-binfmt-conf.sh

install-commands:
- |
install -Dm755 -t "%{install-root}%{bindir}" qemu-aarch64
- |
mkdir -p %{install-root}%{datadir}/binfmts
src/scripts/qemu-binfmt-conf.sh --debian --exportdir "%{install-root}%{datadir}/binfmts" --qemu-path "%{bindir}" --persistent yes --preserve-argv0 yes

strip-commands:
- true

sources:
- kind: tar
base-dir: ''
url:
github_files:tonistiigi/binfmt/releases/download/deploy%2Fv8.0.4-33/qemu_v8.0.4_linux-amd64.tar.gz
ref: 924cd873807a87d800ea914a7d4b1d81973e935839e9596cf4ff7183290b4572
- kind: tar
directory: src
url: qemu:qemu-8.0.4.tar.xz
ref: 81c817dda38af958be5bef1a6cf55b658bb2d3fb87c1e6a571de6b7b2c44516c
2 changes: 2 additions & 0 deletions buildstream/elements/tooling.bst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ depends:
- freedesktop-sdk.bst:components/appstream-glib.bst
- gnome-build-meta.bst:vm/git-lfs.bst
- gnome-build-meta.bst:core-deps/xvfb.bst
- components/binfmt-support.bst
- components/flatpak-builder-lint.bst
- components/gh-cli.bst
- components/qemu-user.bst
- gnome-build-meta.bst:vm/flathub-config.bst
- flatpakrepo/flathub-beta.bst
- gnome-build-meta.bst:vm/gnome-nightly-config.bst
1 change: 1 addition & 0 deletions buildstream/include/aliases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ aliases:
github_files: https://github.com/
gnome_nightly: https://nightly.gnome.org/
pypi: https://files.pythonhosted.org/packages/
qemu: https://download.qemu.org/

# git aliases go here
github: https://github.com/
Expand Down
1 change: 1 addition & 0 deletions buildstream/project.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ plugins:
- origin: junction
junction: plugins/buildstream-plugins.bst
elements:
- autotools
- meson
sources:
- cargo
Expand Down