Gerard Braad
me@gbraad.nl
QXcbConnection: Could not connect to display
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
Aborted
$ dnf install -y flatpak
$ wget https://sdk.gnome.org/keys/gnome-sdk.gpg
$ flatpak remote-add --gpg-import=gnome-sdk.gpg gnome https://sdk.gnome.org/repo/
$ flatpak remote-add --gpg-import=gnome-sdk.gpg gnome-apps https://sdk.gnome.org/repo-apps/
$ flatpak install gnome org.gnome.Platform 3.20
9 delta parts, 71 loose fetched; 167139 KiB transferred in 130 seconds
Installing related: org.gnome.Platform.Locale
2 metadata, 0 content objects fetched; 13 KiB transferred in 2 seconds
$ flatpak install gnome-apps org.gnome.gedit stable
1 delta parts, 1 loose fetched; 1725 KiB transferred in 11 seconds
Installing related: org.gnome.gedit.Locale
2 metadata, 0 content objects fetched; 6 KiB transferred in 4 seconds
$ flatpak run org.gnome.gedit
** (gedit:2): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-ZoHXu4deCC: Connection refused
Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "pk-gtk-module"
(gedit:2): Gtk-WARNING **: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
$ wget http://download.documentfoundation.org/libreoffice/flatpak/latest/LibreOffice.flatpak
$ flatpak install --user gnome org.gnome.Platform.Locale 3.20
$ flatpak install --user --bundle LibreOffice.flatpak
$ flatpak run org.libreoffice.LibreOffice
[Application]
name=org.gnome.gedit
runtime=org.gnome.Platform/x86_64/3.20
sdk=org.gnome.Sdk/x86_64/3.20
command=gedit
$ flatpak install gnome org.gnome.Sdk 3.20
Receiving delta parts: 17/17 721.6 kB/s 33.2 MB/184.0 MB 3 minutes 28 seconds remaining Receiving delta parts: 17/17 708.0 kB/s 33.3 MB/184.0 MB 3 minutes 32 seconds remaining 17 delta parts, 16 loose fetched; 33118 KiB transferred in 55 seconds
Installing related: org.gnome.Sdk.Locale
2 metadata, 0 content objects fetched; 13 KiB transferred in 2 seconds
$ flatpak run --devel --command=bash org.gnome.gedit
bash-4.3$ ls -al
total 172
drwx------ 22 gbraad gbraad 4096 Jul 28 13:36 .
drwxr-xr-x 3 nfsnobody nfsnobody 4096 Jul 28 2016 ..
drwx------ 3 gbraad gbraad 4096 Jul 28 11:44 .ansible
-rw------- 1 gbraad gbraad 1301 Jul 28 11:54 .bash_history
-rw-r--r-- 1 gbraad gbraad 18 May 17 22:22 .bash_logout
-rw-r--r-- 1 gbraad gbraad 193 May 17 22:22 .bash_profile
-rw-r--r-- 1 gbraad gbraad 231 May 17 22:22 .bashrc
drwx------ 16 gbraad gbraad 4096 Jul 28 11:26 .cache
drwxr-xr-x 18 gbraad gbraad 4096 Jul 28 13:36 .config
drwxr-xr-x 2 gbraad gbraad 4096 Jul 28 13:36 Desktop
drwxr-xr-x 2 gbraad gbraad 4096 Jul 28 10:38 Documents
[...]
bash-4.3$ ls -al /
total 44
drwxr-xr-x 17 gbraad gbraad 420 Jul 28 13:37 .
drwxr-xr-x 17 gbraad gbraad 420 Jul 28 13:37 ..
drwxrwxr-x 6 nfsnobody nfsnobody 4096 Jul 28 11:07 app
lrwxrwxrwx 1 gbraad gbraad 7 Jul 28 13:37 bin -> usr/bin
drwxr-xr-x 4 gbraad gbraad 300 Jul 28 13:37 dev
drwxr-xr-x 24 gbraad gbraad 1140 Jul 28 13:37 etc
drwxr-xr-x 3 nfsnobody nfsnobody 4096 Jul 28 2016 home
lrwxrwxrwx 1 gbraad gbraad 7 Jul 28 13:37 lib -> usr/lib
lrwxrwxrwx 1 gbraad gbraad 9 Jul 28 13:37 lib64 -> usr/lib64
drwx------ 2 nfsnobody nfsnobody 16384 Jun 15 00:25 lost+found
drwxr-xr-x 2 nfsnobody nfsnobody 4096 Feb 4 06:10 media
drwxr-xr-x 2 nfsnobody nfsnobody 4096 Feb 4 06:10 mnt
drwxr-xr-x 2 nfsnobody nfsnobody 4096 Feb 4 06:10 opt
dr-xr-xr-x 243 nfsnobody nfsnobody 0 Jul 28 13:37 proc
drwxr-xr-x 6 gbraad gbraad 160 Jul 28 13:37 run
lrwxrwxrwx 1 gbraad gbraad 8 Jul 28 13:37 sbin -> usr/sbin
drwxr-xr-x 2 nfsnobody nfsnobody 4096 Feb 4 06:10 srv
drwxr-xr-x 7 gbraad gbraad 140 Jul 28 13:37 sys
drwxr-xr-x 3 gbraad gbraad 60 Jul 28 13:37 tmp
drwxrwxr-x 14 nfsnobody nfsnobody 4096 Jul 28 13:36 usr
drwxr-xr-x 6 gbraad gbraad 140 Jul 28 13:37 var
bash-4.3$ ls -al /app
total 28
drwxrwxr-x 6 nfsnobody nfsnobody 4096 Jul 28 11:07 .
drwxr-xr-x 17 gbraad gbraad 420 Jul 28 13:37 ..
drwxrwxr-x 2 nfsnobody nfsnobody 4096 Jan 1 1970 bin
drwxrwxr-x 7 nfsnobody nfsnobody 4096 Jan 1 1970 lib
drwxrwxr-x 3 nfsnobody nfsnobody 4096 Jan 1 1970 libexec
-rwxrw-r-- 2 nfsnobody nfsnobody 2223 Jan 1 1970 manifest.json
-rw-r--r-- 1 nfsnobody nfsnobody 0 Jul 28 11:07 .ref
drwxrwxr-x 15 nfsnobody nfsnobody 4096 Jan 1 1970 share
bash-4.3$ ls -al /usr/lib/ |wc -l
1287
bash-4.3$ exit
exit
[gbraad@yoga ~]$ ls -al /usr/lib/ |wc -l
406
/var/lib/flatpak/
~/.local/share/flatpak/
$ mkdir repo
$ alias ost="ostree --repo=`pwd`/repo"
$ ost init
$ ls repo
config objects refs remote-cache tmp
$ mkdir tree
$ cd tree
$ echo "x" > 1
$ echo "y" > 2
$ ost commit --branch=my-branch \
--subject="Initial commit" \
--body="My commit"
$ ost ls my-branch
d00755 1002 1002 0 /
-00644 1002 1002 2 /1
-00644 1002 1002 2 /2
$ ost checkout my-branch
$ ls my-branch/
1 2
$ mkdir -p hello/files/bin
$ mkdir hello/export
hello/files/bin/hello.sh
#!/bin/sh
echo "Hello world, from a sandbox"
hello/metadata
[Application]
name=org.test.Hello
runtime=org.gnome.Platform/x86_64/3.20
command=hello.sh
$ flatpak build-export repo hello
$ flatpak --user remote-add --no-gpg-verify tutorial-repo repo
$ flatpak --user install tutorial-repo org.test.Hello
$ flatpak run org.test.Hello
Hello world, from a sandbox.
$ flatpak --user update org.test.Hello
$ wget https://download.gnome.org/sources/gnome-dictionary/3.20/gnome-dictionary-3.20.0.tar.xz
$ tar xvf gnome-dictionary-3.20.0.tar.xz
$ cd gnome-dictionary-3.20.0/
$ flatpak build ../dictionary ./configure --prefix=/app
$ flatpak build ../dictionary make
$ flatpak build ../dictionary make install
{
"app-id": "org.gnome.Dictionary",
"runtime": "org.gnome.Platform",
"runtime-version": "3.20",
"sdk": "org.gnome.Sdk",
"command": "gnome-dictionary",
"finish-args": [
"--socket=x11",
"--share=network"
],
"modules": [
{
"name": "gnome-dictionary",
"sources": [
{
"type": "archive",
"url": "https://download.gnome.org/sources/gnome-dictionary/3.20/gnome-dictionary-3.20.0.tar.xz",
"sha256": "efb36377d46eff9291d3b8fec37baab2355f9dc8bc7edb791b6a625574716121"
}
]
}
]
}
$ flatpak-builder --repo=repo dictionary org.gnome.Dictionary.json
/dev/null
"finish-args": [
"--socket=x11",
"--share=network"
],
$ flatpak build-finish dictionary2 --socket=x11 --share=network --command=gnome-dictionary
[Application]
name=org.gnome.Dictionary
runtime=org.gnome.Platform/x86_64/3.20
sdk=org.gnome.Sdk/x86_64/3.20
command=gnome-dictionary
[Context]
shared=network;
sockets=x11;
$ flatpak run --filesystem=home --command=ls org.gnome.Dictionary ~/
Note: can also be enabled and disabled for an application
Download and verify the Dictionary source code
Export the resulting build to the repository
KDE
openSUSE
...