Message ID | 157784176718.1372453.6932244685934321782.stgit@magnolia (mailing list archive) |
---|---|
State | Deferred, archived |
Headers | show |
Series | xfsprogs: packaging cleanups | expand |
On Tue, Dec 31, 2019 at 05:22:47PM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@oracle.com> > > Poke the system until it supports building flatpaks. Maybe. Why would we want to support such a fucked up package delivery mechanism?
On Tue, Jan 07, 2020 at 06:20:35AM -0800, Christoph Hellwig wrote: > On Tue, Dec 31, 2019 at 05:22:47PM -0800, Darrick J. Wong wrote: > > From: Darrick J. Wong <darrick.wong@oracle.com> > > > > Poke the system until it supports building flatpaks. Maybe. > > Why would we want to support such a fucked up package delivery > mechanism? In theory we could use it as a means to distribute uptodate xfs_repair so that anyone with a problem that their distro's copy of xfs_repair can't or won't fix can try upstream without having to build xfsprogs themselves. Though I wonder how many people in that situation are running some colorful linux distribution but are too stingy to pay for a support contract.... :) Also, can you elaborate on 'fucked up package delivery mechanism'? Admittedly I'm /not/ volunteering to maintain a xfs_repair flatpak, so perhaps I should just drop this whole thing. --D
On Tue, Jan 07, 2020 at 11:35:37AM -0800, Darrick J. Wong wrote: > In theory we could use it as a means to distribute uptodate xfs_repair > so that anyone with a problem that their distro's copy of xfs_repair > can't or won't fix can try upstream without having to build xfsprogs > themselves. And someone would allow a random weirdo package format access to their disks? > Also, can you elaborate on 'fucked up package delivery mechanism'? It completely messes up how the system is supposed to work, and not your are in a maze of unssuportable package versions just like npm.
diff --git a/bootstrap b/bootstrap new file mode 100755 index 00000000..d403cf58 --- /dev/null +++ b/bootstrap @@ -0,0 +1,12 @@ +#!/bin/bash -x + +libtoolize +automake --add-missing +aclocal -I m4 +autoconf +make configure +libtoolize +automake --add-missing +aclocal -I m4 +autoconf +make configure diff --git a/flatpak.sh b/flatpak.sh new file mode 100755 index 00000000..a1ec916e --- /dev/null +++ b/flatpak.sh @@ -0,0 +1,55 @@ +#!/bin/bash -xe + +if [ "$1" = "--help" ]; then + echo "Usage: $0 [branch] [build]" + echo "Build xfsprogs flatpak from the given branch." +fi + +branch="$1" +test -z "${branch}" && branch=master +build="$2" +test -z "${build}" && build=release + +if [ "${build}" = "debug" ]; then + config_opts=', "--disable-lto"' +fi + +cat > flatpak.ini << ENDL +[Application] +name=org.xfs.progs +runtime=org.freedesktop.Platform/$(uname -m)/18.08 + +[Context] +devices=all; +ENDL + +cat > org.xfs.progs.json << ENDL +{ + "app-id": "org.xfs.progs", + "runtime": "org.freedesktop.Platform", + "runtime-version": "18.08", + "sdk": "org.freedesktop.Sdk", + "command": "/app/sbin/xfs_repair", + "metadata": "flatpak.ini", + "modules": [ + { + "name": "xfsprogs", + "buildsystem": "autotools", + "config-opts": ["--enable-shared=no" ${config_opts} ], + "sources": [ + { + "type": "git", + "path": "${PWD}/", + "branch": "${branch}" + } + ] + } + ] +} +ENDL + +flatpak-builder --repo=repo build-dir org.xfs.progs.json --force-clean +flatpak build-bundle repo xfsprogs.flatpak org.xfs.progs +echo build done, run: +echo flatpak install xfsprogs.flatpak +echo flatpak run org.xfs.progs