Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "shared-modules"]
path = shared-modules
url = https://github.com/flathub/shared-modules/
[submodule "flatpak-builder-tools"]
path = flatpak-builder-tools
url = https://github.com/flatpak/flatpak-builder-tools/
1 change: 1 addition & 0 deletions flatpak-builder-tools
Submodule flatpak-builder-tools added at aac65c
40 changes: 40 additions & 0 deletions org.virt_manager.virt_manager.Extension.Qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ app-id: org.virt_manager.virt_manager.Extension.Qemu
runtime: org.virt_manager.virt-manager
runtime-version: stable
sdk: org.freedesktop.Sdk//24.08
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
build-extension: true
separate-locales: false
build-options:
append-path: /usr/lib/sdk/rust-stable/bin
prefix: /app/lib/extensions/Qemu
cflags: -I/app/lib/extensions/Qemu/include
cxxflags: -I/app/lib/extensions/Qemu/include
Expand Down Expand Up @@ -48,6 +51,43 @@ modules:
project-id: 13607
url-template: https://download.qemu.org/qemu-9.2.0.tar.xz
modules:
- name: virtiofsd
buildsystem: simple
build-commands:
# Updating the dependencies should be done via `update-deps.sh`
- install -Dm0644 ./virtiofsd-cargo-config.toml .cargo/config
- cargo --offline fetch --manifest-path Cargo.toml --verbose
- cargo --offline build --release --verbose
- install -Dm0755 ./target/release/virtiofsd ${FLATPAK_DEST}/bin/virtiofsd
sources:
- virtiofsd-cargo-sources.json
- type: file
path: virtiofsd-cargo-config.toml
- type: archive
url: https://gitlab.com/virtio-fs/virtiofsd/-/archive/v1.13.0/virtiofsd-v1.13.0.tar.gz
sha256: a45f4b3661322587a06b6aa29e5353e0a7047e755e8a7f55dbae308b778eb41c
x-checker-data:
type: anitya
project-id: 347345
url-template: https://gitlab.com/virtio-fs/virtiofsd/-/archive/v$version/virtiofsd-v$version.tar.gz
modules:
- name: libcap-ng
buildsystem: autotools
config-opts:
- --without-python3
- --enable-static=no
sources:
- type: archive
url: https://github.com/stevegrubb/libcap-ng/archive/v0.8.5.tar.gz
sha256: e4be07fdd234f10b866433f224d183626003c65634ed0552b02e654a380244c2
x-checker-data:
type: anitya
project-id: 1570
stable-only: true
url-template: https://github.com/stevegrubb/libcap-ng/archive/v$version.tar.gz
cleanup:
- /bin
- /share/aclocal
- name: slirp
buildsystem: meson
sources:
Expand Down
18 changes: 18 additions & 0 deletions update-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -euo pipefail

TARGET_VERSION="${1:-1.13.0}"

LOCK_FILE_DIR=$(mktemp -d)
cleanup() {
rm -r "$LOCK_FILE_DIR"
}
trap cleanup EXIT
set -x
curl -s -L "https://gitlab.com/virtio-fs/virtiofsd/-/archive/v${TARGET_VERSION}/virtiofsd-v${TARGET_VERSION}.tar.gz" | tar xzf - -C "$LOCK_FILE_DIR"
podman run --rm -it \
-v .:/tmp/build:Z \
-v "$LOCK_FILE_DIR:$LOCK_FILE_DIR:Z" \
docker.io/library/python:3.12.8 \
sh -c "pip install aiohttp toml && /tmp/build/flatpak-builder-tools/cargo/flatpak-cargo-generator.py ${LOCK_FILE_DIR}/virtiofsd-v${TARGET_VERSION}/Cargo.lock -o /tmp/build/virtiofsd-cargo-sources.json"
8 changes: 8 additions & 0 deletions virtiofsd-cargo-config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[source.crates-io]
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "cargo/vendor"

[build]
rustflags = ["-L", "/app/lib/extensions/Qemu/lib"]
Loading