kiss-flatpak

Flatpak for KISS Linux.
git clone https://git.stjo.hn/kiss-flatpak
Log | Files | Refs | README | LICENSE

commit f1a6d7fbc862d853f91128b4a14ee5510075f38b
parent 31921836a67d3a697c1d11d638ee8ece4495d900
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Sun, 26 Apr 2020 18:08:54 +0300

docs: update

Diffstat:
MREADME.md | 23++---------------------
Aflatpak/alsa-oss/build | 9+++++++++
Aflatpak/alsa-oss/checksums | 2++
Aflatpak/alsa-oss/depends | 1+
Aflatpak/alsa-oss/patches/libio.patch | 24++++++++++++++++++++++++
Aflatpak/alsa-oss/sources | 2++
Aflatpak/alsa-oss/version | 1+
Mflatpak/flatpak/checksums | 3++-
Aflatpak/flatpak/patches/flatpak-alsa.patch | 165+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mflatpak/flatpak/sources | 3++-
10 files changed, 210 insertions(+), 23 deletions(-)

diff --git a/README.md b/README.md @@ -1,21 +1,5 @@ # flatpak for kiss -TODO - -- [x] Clean up builds. -- [x] Document needed changes to community packages. -- [ ] Remove as many dependencies as possible. - - Bye bye `fuse2`, `mozjs`, `polkit`, `libuuid`, etc. - - [x] libcap? - - [ ] ??????? -- [x] Finalize dependencies. - -ISSUES - -- [ ] No audio in flatpaks expecting pulse. - - Try apulse?? - - ??? - INSTRUCTIONS ``` @@ -33,9 +17,6 @@ INSTRUCTIONS -> flatpak run --user org.gimp.GIMP ``` -TIPS +ISSUES -``` -# This may need to be set for applications using pulseaudio. -export XDG_RUNTIME_DIR=/run/user/$(id -u) -``` +- [ ] No audio in flatpaks expecting a running PulseAudio server on the host. diff --git a/flatpak/alsa-oss/build b/flatpak/alsa-oss/build @@ -0,0 +1,9 @@ +#!/bin/sh -e + +sh >/dev/tty +./configure \ + --prefix=/usr \ + --disable-static + +make +make DESTDIR="$1" install diff --git a/flatpak/alsa-oss/checksums b/flatpak/alsa-oss/checksums @@ -0,0 +1,2 @@ +64adcef5927e848d2e024e64c4bf85b6f395964d9974ec61905ae4cb8d35d68e alsa-oss-1.1.8.tar.bz2 +bf40ed8ab085084bfe487777703595c6a452f57f2b0cc7285170bee4b7d10666 libio.patch diff --git a/flatpak/alsa-oss/depends b/flatpak/alsa-oss/depends @@ -0,0 +1 @@ +alsa-lib diff --git a/flatpak/alsa-oss/patches/libio.patch b/flatpak/alsa-oss/patches/libio.patch @@ -0,0 +1,24 @@ +--- a/alsa/stdioemu.c ++++ b/alsa/stdioemu.c +@@ -37,7 +37,9 @@ + #endif + + #include <stdio.h> ++#ifdef HAVE_LIBIO_H + #include <libio.h> ++#endif + + struct fd_cookie { + int fd; +@@ -99,7 +101,11 @@ static FILE *fake_fopen(const char *path + + if (open_mode && fdc->fd > 0) { + result = fopencookie (fdc,"w", fns); ++#ifdef HAVE_FILENO + result->_fileno = fdc->fd; /* ugly patchy slimy kludgy hack */ ++#else ++ result->__filedes = fdc->fd; ++#endif + } + return result; + } diff --git a/flatpak/alsa-oss/sources b/flatpak/alsa-oss/sources @@ -0,0 +1,2 @@ +https://www.alsa-project.org/files/pub/oss-lib/alsa-oss-1.1.8.tar.bz2 +patches/libio.patch diff --git a/flatpak/alsa-oss/version b/flatpak/alsa-oss/version @@ -0,0 +1 @@ +1.1.8 1 diff --git a/flatpak/flatpak/checksums b/flatpak/flatpak/checksums @@ -1,5 +1,6 @@ 84ca5b06ef56ffe282a2603b157080bc242723f69731926a6593020a75ce2895 flatpak-1.7.2.tar.xz c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1 pyparsing-2.4.7.tar.gz -c2e8b0430715aa8d1a43be79d8279e1cd088a925ba6d375b0707aeda3f5408d2 fix-musl.patch 1f9f2f55965041953ce0ed4e436e181d73f8decc36457a923c6bc42442718da1 bubblewrap-musl.patch +c2e8b0430715aa8d1a43be79d8279e1cd088a925ba6d375b0707aeda3f5408d2 fix-musl.patch +f3e72d0994f3f2ef678e90c14de652fc44e10bdc0dd2d0d7da7d9bab580aa288 flatpak-alsa.patch f5c88cbb5597f70f1bad07f6f50332850e8c37aceb7a3d8e5e735b1ae4a40418 no-libcap.patch diff --git a/flatpak/flatpak/patches/flatpak-alsa.patch b/flatpak/flatpak/patches/flatpak-alsa.patch @@ -0,0 +1,165 @@ +From 4b28611ab6e4c144af0599c39c5aedfb15a25a4c Mon Sep 17 00:00:00 2001 +From: Forest <forestcode@ixio.org> +Date: Mon, 27 Jan 2020 17:03:37 -0800 +Subject: [PATCH] Support --device=snd, for ALSA-only systems. + +This allows sound on non-PulseAudio systems, without requiring --device=all. +--- + common/flatpak-context-private.h | 1 + + common/flatpak-context.c | 1 + + common/flatpak-run.c | 7 +++++++ + doc/flatpak-build-finish.xml | 4 ++-- + doc/flatpak-build.xml | 4 ++-- + doc/flatpak-metadata.xml | 7 +++++++ + doc/flatpak-override.xml | 4 ++-- + doc/flatpak-run.xml | 4 ++-- + 8 files changed, 24 insertions(+), 8 deletions(-) + +diff --git a/common/flatpak-context-private.h b/common/flatpak-context-private.h +index 48995b497..41b5f952d 100644 +--- a/common/flatpak-context-private.h ++++ b/common/flatpak-context-private.h +@@ -50,6 +50,7 @@ typedef enum { + FLATPAK_CONTEXT_DEVICE_ALL = 1 << 1, + FLATPAK_CONTEXT_DEVICE_KVM = 1 << 2, + FLATPAK_CONTEXT_DEVICE_SHM = 1 << 3, ++ FLATPAK_CONTEXT_DEVICE_SND = 1 << 4, + } FlatpakContextDevices; + + typedef enum { +diff --git a/common/flatpak-context.c b/common/flatpak-context.c +index 58cee2a74..3c227f86e 100644 +--- a/common/flatpak-context.c ++++ b/common/flatpak-context.c +@@ -70,6 +70,7 @@ const char *flatpak_context_devices[] = { + "all", + "kvm", + "shm", ++ "snd", + NULL + }; + +diff --git a/common/flatpak-run.c b/common/flatpak-run.c +index 24ec48e43..1108cf62e 100644 +--- a/common/flatpak-run.c ++++ b/common/flatpak-run.c +@@ -1272,6 +1272,13 @@ flatpak_run_add_environment_args (FlatpakBwrap *bwrap, + if (real_dev_shm != NULL) + flatpak_bwrap_add_args (bwrap, "--bind", real_dev_shm, "/dev/shm", NULL); + } ++ ++ if (context->devices & FLATPAK_CONTEXT_DEVICE_SND) ++ { ++ g_debug ("Allowing snd access"); ++ if (g_file_test ("/dev/snd", G_FILE_TEST_IS_DIR)) ++ flatpak_bwrap_add_args (bwrap, "--dev-bind", "/dev/snd", "/dev/snd", NULL); ++ } + } + + flatpak_context_append_bwrap_filesystem (context, bwrap, app_id, app_id_dir, previous_app_id_dirs, &exports); +diff --git a/doc/flatpak-build-finish.xml b/doc/flatpak-build-finish.xml +index d92eeb4de..2c8f64ba2 100644 +--- a/doc/flatpak-build-finish.xml ++++ b/doc/flatpak-build-finish.xml +@@ -162,7 +162,7 @@ + <listitem><para> + Expose a device to the application. This updates + the [Context] group in the metadata. +- DEVICE must be one of: dri, kvm, shm, all. ++ DEVICE must be one of: dri, kvm, shm, snd, all. + This option can be used multiple times. + </para></listitem> + </varlistentry> +@@ -173,7 +173,7 @@ + <listitem><para> + Don't expose a device to the application. This updates + the [Context] group in the metadata. +- DEVICE must be one of: dri, kvm, shm, all. ++ DEVICE must be one of: dri, kvm, shm, snd, all. + This option can be used multiple times. + </para></listitem> + </varlistentry> +diff --git a/doc/flatpak-build.xml b/doc/flatpak-build.xml +index 55e3ec89e..51ffb007b 100644 +--- a/doc/flatpak-build.xml ++++ b/doc/flatpak-build.xml +@@ -172,7 +172,7 @@ + <listitem><para> + Expose a device to the application. This overrides to + the Context section from the application metadata. +- <arg choice="plain">DEVICE</arg> must be one of: dri, kvm, shm, all. ++ <arg choice="plain">DEVICE</arg> must be one of: dri, kvm, shm, snd, all. + This option can be used multiple times. + </para></listitem> + </varlistentry> +@@ -183,7 +183,7 @@ + <listitem><para> + Don't expose a device to the application. This overrides to + the Context section from the application metadata. +- <arg choice="plain">DEVICE</arg> must be one of: dri, kvm, shm, all. ++ <arg choice="plain">DEVICE</arg> must be one of: dri, kvm, shm, snd, all. + This option can be used multiple times. + </para></listitem> + </varlistentry> +diff --git a/doc/flatpak-metadata.xml b/doc/flatpak-metadata.xml +index 7e445ac1d..a1610a6ba 100644 +--- a/doc/flatpak-metadata.xml ++++ b/doc/flatpak-metadata.xml +@@ -180,6 +180,13 @@ + Available since 0.6.12. + </para></listitem></varlistentry> + ++ <varlistentry><term><option>snd</option></term> ++ <listitem><para> ++ Sound ++ (<filename>/dev/snd</filename>). ++ Available since 1.6.2. ++ </para></listitem></varlistentry> ++ + <varlistentry><term><option>all</option></term> + <listitem><para> + All device nodes in <filename>/dev</filename>, but not /dev/shm (which is separately specified). +diff --git a/doc/flatpak-override.xml b/doc/flatpak-override.xml +index 8f1315756..7826456c0 100644 +--- a/doc/flatpak-override.xml ++++ b/doc/flatpak-override.xml +@@ -154,7 +154,7 @@ + <listitem><para> + Expose a device to the application. This overrides to + the Context section from the application metadata. +- <arg choice="plain">DEVICE</arg> must be one of: dri, kvm, shm, all. ++ <arg choice="plain">DEVICE</arg> must be one of: dri, kvm, shm, snd, all. + This option can be used multiple times. + </para></listitem> + </varlistentry> +@@ -165,7 +165,7 @@ + <listitem><para> + Don't expose a device to the application. This overrides to + the Context section from the application metadata. +- <arg choice="plain">DEVICE</arg> must be one of: dri, kvm, shm, all. ++ <arg choice="plain">DEVICE</arg> must be one of: dri, kvm, shm, snd, all. + This option can be used multiple times. + </para></listitem> + </varlistentry> +diff --git a/doc/flatpak-run.xml b/doc/flatpak-run.xml +index 5077c1a9c..828c176a8 100644 +--- a/doc/flatpak-run.xml ++++ b/doc/flatpak-run.xml +@@ -294,7 +294,7 @@ + <listitem><para> + Expose a device to the application. This overrides to + the Context section from the application metadata. +- <arg choice="plain">DEVICE</arg> must be one of: dri, kvm, shm, all. ++ <arg choice="plain">DEVICE</arg> must be one of: dri, kvm, shm, snd, all. + This option can be used multiple times. + </para></listitem> + </varlistentry> +@@ -305,7 +305,7 @@ + <listitem><para> + Don't expose a device to the application. This overrides to + the Context section from the application metadata. +- <arg choice="plain">DEVICE</arg> must be one of: dri, kvm, shm, all. ++ <arg choice="plain">DEVICE</arg> must be one of: dri, kvm, shm, snd, all. + This option can be used multiple times. + </para></listitem> + </varlistentry> diff --git a/flatpak/flatpak/sources b/flatpak/flatpak/sources @@ -1,5 +1,6 @@ https://github.com/flatpak/flatpak/releases/download/1.7.2/flatpak-1.7.2.tar.xz https://github.com/pyparsing/pyparsing/releases/download/pyparsing_2.4.7/pyparsing-2.4.7.tar.gz pyparsing -patches/fix-musl.patch patches/bubblewrap-musl.patch +patches/fix-musl.patch +patches/flatpak-alsa.patch patches/no-libcap.patch