[Scummvm-git-logs] scummvm master -> 4ed734757ea4449ebb9c4caa7f379924eebcaa1f
lotharsm
mail at serra.me
Sun Apr 11 19:47:26 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4ed734757e DISTS: Sync snapcraft build recipe
Commit: 4ed734757ea4449ebb9c4caa7f379924eebcaa1f
https://github.com/scummvm/scummvm/commit/4ed734757ea4449ebb9c4caa7f379924eebcaa1f
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-04-11T21:47:01+02:00
Commit Message:
DISTS: Sync snapcraft build recipe
Changed paths:
dists/snap/scripts/bin/daemon-start.sh
dists/snap/snap/hooks/configure
dists/snap/snap/hooks/install
dists/snap/snap/hooks/post-refresh
dists/snap/snap/snapcraft.yaml
diff --git a/dists/snap/scripts/bin/daemon-start.sh b/dists/snap/scripts/bin/daemon-start.sh
index 12f9d78587..36608f9a43 100755
--- a/dists/snap/scripts/bin/daemon-start.sh
+++ b/dists/snap/scripts/bin/daemon-start.sh
@@ -1,22 +1,25 @@
#!/bin/sh
-if [ "$(id -u)" = "0" ] && [ "$(snapctl get daemon)" = "false" ]
-then
- # If not configured to run as a daemon we have to stop here
- # (There's no "snapctl disable ...")
- snapctl stop $SNAP_NAME.daemon
- exit 0
-fi
-
-mkdir -p "$XDG_RUNTIME_DIR" -m 700
+real_xdg_runtime_dir=$(dirname "${XDG_RUNTIME_DIR}")
+real_wayland=${real_xdg_runtime_dir}/${WAYLAND_DISPLAY:-wayland-0}
-if [ -z "${WAYLAND_DISPLAY}" ]
-then WAYLAND_DISPLAY=wayland-0
-fi
+if [ ! -O "${real_wayland}" ]; then
+ # On core systems mir-kiosk may also need to create the host XDG_RUNTIME_DIR
+ if [ ! -O "${real_xdg_runtime_dir}" ]; then
+ echo waiting for host XDG_RUNTIME_DIR...
+ until [ -O "${real_xdg_runtime_dir}" ]
+ do
+ inotifywait --event create $(dirname "${real_xdg_runtime_dir}") || sleep 4
+ done
+ fi
-real_wayland=$(dirname "$XDG_RUNTIME_DIR")/${WAYLAND_DISPLAY}
-while [ ! -O "${real_wayland}" ]; do echo waiting for Wayland socket; sleep 4; done
+ echo waiting for Wayland socket...
+ until [ -O "${real_wayland}" ]
+ do
+ inotifywait --event create $(dirname "${real_wayland}") || sleep 4
+ done
-ln -sf "${real_wayland}" "$XDG_RUNTIME_DIR"
+ echo ...waiting done
+fi
-exec "$@"
\ No newline at end of file
+exec "$@"
diff --git a/dists/snap/snap/hooks/configure b/dists/snap/snap/hooks/configure
index ad46d7b9e2..4936b754cb 100755
--- a/dists/snap/snap/hooks/configure
+++ b/dists/snap/snap/hooks/configure
@@ -1,2 +1,15 @@
#!/bin/sh
-snapctl restart $SNAP_NAME
+
+if [ "$(snapctl get daemon)" = "" ]; then
+ # By default, we run as a daemon on core, otherwise configure the daemon to stop
+ if grep -q -e snap_core= -e snapd_recovery_mode= /proc/cmdline
+ then snapctl set daemon=true
+ else snapctl set daemon=false
+ fi
+fi
+
+if [ "$(snapctl get daemon)" = "true" ]; then
+ snapctl start --enable $SNAP_NAME.daemon 2>&1 || true
+else
+ snapctl stop --disable $SNAP_NAME.daemon 2>&1 || true
+fi
diff --git a/dists/snap/snap/hooks/install b/dists/snap/snap/hooks/install
index 6b2ad9108a..472a44ef5b 100755
--- a/dists/snap/snap/hooks/install
+++ b/dists/snap/snap/hooks/install
@@ -1,12 +1,6 @@
#!/bin/sh
set -x
-if [ "$(snapctl get daemon)" = "" ]
-then
- # We run as a daemon on core, otherwise configure the daemon to stop
- # (There's no "snapctl disable ...")
- if grep -q snap_core= /proc/cmdline
- then snapctl set daemon=true
- else snapctl set daemon=false
- fi
-fi
+# we install with the daemon disabled, the configure hook
+# will start it if appropriate
+snapctl stop --disable $SNAP_NAME.daemon
diff --git a/dists/snap/snap/hooks/post-refresh b/dists/snap/snap/hooks/post-refresh
index 6b2ad9108a..472a44ef5b 100755
--- a/dists/snap/snap/hooks/post-refresh
+++ b/dists/snap/snap/hooks/post-refresh
@@ -1,12 +1,6 @@
#!/bin/sh
set -x
-if [ "$(snapctl get daemon)" = "" ]
-then
- # We run as a daemon on core, otherwise configure the daemon to stop
- # (There's no "snapctl disable ...")
- if grep -q snap_core= /proc/cmdline
- then snapctl set daemon=true
- else snapctl set daemon=false
- fi
-fi
+# we install with the daemon disabled, the configure hook
+# will start it if appropriate
+snapctl stop --disable $SNAP_NAME.daemon
diff --git a/dists/snap/snap/snapcraft.yaml b/dists/snap/snap/snapcraft.yaml
index daf3f5dddc..25490b3406 100644
--- a/dists/snap/snap/snapcraft.yaml
+++ b/dists/snap/snap/snapcraft.yaml
@@ -20,6 +20,7 @@ description: |
you will find some really obscure adventures and truly hidden gems to explore.
confinement: strict
grade: stable
+compression: lzo
apps:
scummvm:
@@ -42,6 +43,7 @@ apps:
- mount-observe
- system-observe
- network-observe
+ - hardware-observe
- joystick
environment:
LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libunity/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/speech-dispatcher/"
@@ -49,7 +51,7 @@ apps:
DBUS_FATAL_WARNINGS: 0
daemon:
- command: bin/daemon-start.sh $SNAP/bin/scummvm-launch.sh -f
+ command: bin/daemon-start.sh $SNAP/snap/command-chain/desktop-launch $SNAP/bin/wayland-if-possible.sh $SNAP/bin/scummvm-launch.sh -f
daemon: simple
restart-condition: always
plugs:
@@ -62,9 +64,13 @@ apps:
- network-bind
- removable-media
- joystick
+ - mount-observe
+ - system-observe
+ - network-observe
+ - hardware-observe
environment:
SDL_VIDEODRIVER: wayland
- LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libunity/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/speech-dispatcher/"
+ LD_LIBRARY_PATH: "$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libunity/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/speech-dispatcher/"
ESPEAK_DATA_PATH: "$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/espeak-ng-data"
PULSE_SYSTEM: 1
PULSE_RUNTIME_PATH: /var/run/pulse
@@ -125,6 +131,7 @@ parts:
- libfluidsynth-dev
- libfreetype6-dev
- libfribidi-dev
+ - libgif-dev
- libglew-dev
- libgtk-3-dev
- libieee1284-3-dev
@@ -153,6 +160,7 @@ parts:
- libflac8
- libfluidsynth1
- libfribidi0
+ - libgif7
- libgl1-mesa-dri
- libgl1-mesa-glx
- libglew2.0
@@ -240,14 +248,15 @@ parts:
stage-packages:
- libasound2
- libasound2-plugins
-
+ - inotify-tools
+
scripts:
plugin: dump
source: scripts
games:
plugin: dump
- source: https://www.scummvm.org/frs/extras/storefront/games-bundle.zip
+ source: https://downloads.scummvm.org/frs/extras/storefront/games-bundle.zip
source-checksum: sha256/5c16f3db7fda3660d1bddb52e76aa27ada8eb8268872f5e045490f3eabb603e1
organize:
games-bundle: usr/share/scummvm/
More information about the Scummvm-git-logs
mailing list