Commit 511086fd authored by Sophie Herold's avatar Sophie Herold

Switch to .json for flatpak devel manifest

Closes #56
parent b70e57a3
Pipeline #224340 failed with stage
in 6 minutes and 56 seconds
......@@ -5,7 +5,7 @@ test:
- flatpak
variables:
FLATPAK_MODULE: pika-backup
MANIFEST_PATH: build-aux/ci.manifest.yml
MANIFEST_PATH: build-aux/devel.manifest.json
script:
- flatpak-builder --user --disable-rofiles-fuse --keep-build-dirs --stop-at=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH}
- flatpak build-finish --socket=x11 --share=network flatpak_app
......
---
app-id: org.gnome.World.PikaBackup
command: pika-backup
runtime: org.gnome.Platform
runtime-version: "3.38"
sdk: org.gnome.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
build-options:
append-path: /usr/lib/sdk/rust-stable/bin
finish-args:
- --filesystem=host
# flatpak puts a tmpfs here to hide other apps
- --filesystem=~/.var/app/
- --share=network
- --socket=wayland
# X11
- --share=ipc
- --socket=fallback-x11
# SSH-keys etc
- --socket=ssh-auth
# secrete service (keyring)
- --talk-name=org.freedesktop.secrets
# gio::Device etc
- --talk-name=org.gtk.vfs.*
# fusermount
- --device=all
- --talk-name=org.freedesktop.Flatpak.*
# inhibit shutdown and sleep
- --system-talk-name=org.freedesktop.login1
# open folder in filebrowser, work around buggy OpenURI portal
# https://gitlab.gnome.org/World/pika-backup/-/issues/19
- --talk-name=org.freedesktop.FileManager1
modules:
- name: borg
buildsystem: simple
build-commands:
- pip3 install --no-index --find-links=. --prefix=/app setuptools_scm
- pip3 install --no-index --find-links=. --prefix=/app borgbackup
sources:
- type: file
url: https://files.pythonhosted.org/packages/54/85/514ba3ca2a022bddd68819f187ae826986051d130ec5b972076e4f58a9f3/setuptools_scm-3.2.0.tar.gz
sha256: 52ab47715fa0fc7d8e6cd15168d1a69ba995feb1505131c3e814eb7087b57358
- type: file
url: https://files.pythonhosted.org/packages/dd/13/5313ccad7f76cd3d13b207e31ca6e3072ca00c0bf7d605f7e8e6bc409b0d/borgbackup-1.1.14.tar.gz
sha256: 7dbb0747cc948673f695cd6de284af215f810fed2eb2a615ef26ddc7c691edba
- name: fusermout
config-opts:
- MOUNT_FUSE_PATH=/app/bin
post-install:
- install fusermount-wrapper.sh /app/bin/fusermount
sources:
- type: archive
url: https://github.com/libfuse/libfuse/releases/download/fuse-2.9.9/fuse-2.9.9.tar.gz
sha256: d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5
- type: patch
path: fuse-2.9.2-namespace-conflict-fix.patch
-
type: file
path: fusermount-wrapper.sh
- name: llfuse
buildsystem: simple
build-commands:
- pip3 install --no-index --find-links=. --prefix=/app llfuse
sources:
- type: file
url: https://files.pythonhosted.org/packages/75/b4/5248459ec0e7e1608814915479cb13e5baf89034b572e3d74d5c9219dd31/llfuse-1.3.6.tar.bz2
sha256: 31a267f7ec542b0cd62e0f1268e1880fdabf3f418ec9447def99acfa6eff2ec9
- name: libhandy
buildsystem: meson
config-opts:
- -Dvapi=false
- -Dtests=false
- -Dexamples=false
sources:
- type: git
url: https://gitlab.gnome.org/GNOME/libhandy.git
tag: 1.0.0
commit: 94313c206258860b2428712e7ece1d02c5177857
- name: pika-backup
buildsystem: meson
config-opts:
- "-Dprofile=dev"
sources:
- type: dir
path: ../
- type: file
path: cargo-config.toml
dest: .cargo
dest-filename: config
# generated via flatpak-builder-tools
- generated-sources.json
{
"app-id": "org.gnome.World.PikaBackup",
  • You might want to rename the app-id to something like org.gnome.World.PikaBackup.Devel so the artifact can be installed alongside the flatpak from flathub 😊

  • #58 (closed) will do it when refactoring some of the build stuff

Please register or sign in to reply
"command": "pika-backup",
"runtime": "org.gnome.Platform",
"runtime-version": "3.38",
"sdk": "org.gnome.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.rust-stable"
],
"build-options": {
"append-path": "/usr/lib/sdk/rust-stable/bin"
},
"finish-args": [
"--filesystem=host",
"--filesystem=~/.var/app/",
"--share=network",
"--socket=wayland",
"--share=ipc",
"--socket=fallback-x11",
"--socket=ssh-auth",
"--talk-name=org.freedesktop.secrets",
"--talk-name=org.gtk.vfs.*",
"--device=all",
"--talk-name=org.freedesktop.Flatpak.*",
"--system-talk-name=org.freedesktop.login1",
"--talk-name=org.freedesktop.FileManager1"
],
"modules": [
{
"name": "borg",
"buildsystem": "simple",
"build-commands": [
"pip3 install --no-index --find-links=. --prefix=/app setuptools_scm",
"pip3 install --no-index --find-links=. --prefix=/app borgbackup"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/54/85/514ba3ca2a022bddd68819f187ae826986051d130ec5b972076e4f58a9f3/setuptools_scm-3.2.0.tar.gz",
"sha256": "52ab47715fa0fc7d8e6cd15168d1a69ba995feb1505131c3e814eb7087b57358"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/dd/13/5313ccad7f76cd3d13b207e31ca6e3072ca00c0bf7d605f7e8e6bc409b0d/borgbackup-1.1.14.tar.gz",
"sha256": "7dbb0747cc948673f695cd6de284af215f810fed2eb2a615ef26ddc7c691edba"
}
]
},
{
"name": "fusermout",
"config-opts": [
"MOUNT_FUSE_PATH=/app/bin"
],
"post-install": [
"install fusermount-wrapper.sh /app/bin/fusermount"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/libfuse/libfuse/releases/download/fuse-2.9.9/fuse-2.9.9.tar.gz",
"sha256": "d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5"
},
{
"type": "patch",
"path": "fuse-2.9.2-namespace-conflict-fix.patch"
},
{
"type": "file",
"path": "fusermount-wrapper.sh"
}
]
},
{
"name": "llfuse",
"buildsystem": "simple",
"build-commands": [
"pip3 install --no-index --find-links=. --prefix=/app llfuse"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/75/b4/5248459ec0e7e1608814915479cb13e5baf89034b572e3d74d5c9219dd31/llfuse-1.3.6.tar.bz2",
"sha256": "31a267f7ec542b0cd62e0f1268e1880fdabf3f418ec9447def99acfa6eff2ec9"
}
]
},
{
"name": "libhandy",
"buildsystem": "meson",
"config-opts": [
"-Dvapi=false",
"-Dtests=false",
"-Dexamples=false"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/GNOME/libhandy.git",
"tag": "1.0.0",
"commit": "94313c206258860b2428712e7ece1d02c5177857"
}
]
},
{
"name": "pika-backup",
"buildsystem": "meson",
"config-opts": [
"-Dprofile=dev"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/World/pika-backup.git",
"tag": "v0.2.0-alpha"
},
{
"type": "file",
"path": "cargo-config.toml",
"dest": ".cargo",
"dest-filename": "config"
},
{
"type": "dir",
"path": ".."
}
]
}
]
}
#!/bin/sh
URL=https://gitlab.gnome.org/World/pika-backup.git
VERSION="$(build-aux/meson-cargo-manifest.py package version)"
cat build-aux/ci.manifest.yml\
| sed 's/-Dprofile=dev/-Dprofile=release/' \
| sed 's/type: dir/type: git/' \
| sed "s|path: ../|url: $URL\n tag: v$VERSION|" \
> build-aux/org.gnome.World.PikaBackup.yml
......@@ -4,7 +4,7 @@ APP_ID=$(cat data/APPLICATION_ID)
REPO_DIR=flatpak_repo
flatpak-builder --install-deps-from=flathub \
--user --verbose --force-clean -y --repo=$REPO_DIR flatpak_out build-aux/ci.manifest.yml
--user --verbose --force-clean -y --repo=$REPO_DIR flatpak_out build-aux/devel.manifest.json
flatpak build-bundle $REPO_DIR $APP_ID.flatpak $APP_ID
flatpak --user install -y $APP_ID.flatpak
flatpak run $APP_ID
#!/bin/sh
./flatpak-builder-tools/cargo/flatpak-cargo-generator.py -o build-aux/generated-sources.json Cargo.lock
#!/bin/sh
cd "$(dirname "$0")/.."
yq '
.modules[-1].sources[-1] = {type: "dir", path: ".."} |
.modules[-1]["config-opts"] = ["-Dprofile=dev"]' \
build-aux/org.gnome.World.PikaBackup.yml > build-aux/devel.manifest.json
./flatpak-builder-tools/cargo/flatpak-cargo-generator.py \
-o build-aux/generated-sources.json Cargo.lock
......@@ -71,6 +71,18 @@ modules:
url: https://files.pythonhosted.org/packages/75/b4/5248459ec0e7e1608814915479cb13e5baf89034b572e3d74d5c9219dd31/llfuse-1.3.6.tar.bz2
sha256: 31a267f7ec542b0cd62e0f1268e1880fdabf3f418ec9447def99acfa6eff2ec9
- name: libhandy
buildsystem: meson
config-opts:
- -Dvapi=false
- -Dtests=false
- -Dexamples=false
sources:
- type: git
url: https://gitlab.gnome.org/GNOME/libhandy.git
tag: 1.0.0
commit: 94313c206258860b2428712e7ece1d02c5177857
- name: pika-backup
buildsystem: meson
config-opts:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment