Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Creating Flatpak packages without flatpak-builder
Search
Bartłomiej Piotrowski
November 09, 2021
Programming
0
89
Creating Flatpak packages without flatpak-builder
Bartłomiej Piotrowski
November 09, 2021
Tweet
Share
More Decks by Bartłomiej Piotrowski
See All by Bartłomiej Piotrowski
Flathub: The State of the Union
barthalion
0
28
OpenStack Swift
barthalion
0
67
Reproducible builds
barthalion
0
290
Alpine Linux
barthalion
0
410
Wprowadzenie do tworzenia pakietów w Arch Linuksie
barthalion
0
440
Arch Linux
barthalion
0
72
Other Decks in Programming
See All in Programming
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
3
240
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
460
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
320
RDoc meets YARD
okuramasafumi
4
170
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
1.6k
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
120
Improving my own Ruby thereafter
sisshiki1969
1
160
今から始めるClaude Code入門〜AIコーディングエージェントの歴史と導入〜
nokomoro3
0
190
JSONataを使ってみよう Step Functionsが楽しくなる実践テクニック #devio2025
dafujii
1
530
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
240
請來的 AI Agent 同事們在寫程式時,怎麼用 pytest 去除各種幻想與盲點
keitheis
0
120
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Into the Great Unknown - MozCon
thekraken
40
2k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.4k
Scaling GitHub
holman
463
140k
A designer walks into a library…
pauljervisheath
207
24k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
What's in a price? How to price your products and services
michaelherold
246
12k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
113
20k
Site-Speed That Sticks
csswizardry
10
820
Gamification - CAS2011
davidbonilla
81
5.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Transcript
Building Flatpak apps without flatpak-builder Bartłomiej Piotrowski PackagingCon 2021
What is Flatpak?
app-id: org.flatpak.Hello runtime: org.freedesktop.Platform runtime-version: '21.08' sdk: org.freedesktop.Sdk command: hello
modules: - name: hello buildsystem: autotools sources: - type: archive url: https://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz sha256: 31e066137(..)
CI is hard (and gotta go fast)
Let’s build a somewhat portable binary!
None
$ cat builddir/metadata [Application] name=org.flatpak.ncdu runtime=org.freedesktop.Platform/x86_64/21.08 sdk=org.freedesktop.Sdk/x86_64/21.08 command=ncdu
$ tree builddir builddir ├── export ├── files │ ├──
bin │ │ └── ncdu │ ├── lib │ │ ├── libncurses.so.5 │ │ └── libtinfo.so.5 │ └── share │ ├── locale -> /app/share/runtime/locale │ └── runtime │ └── locale │ └── en │ └── batman
$ tree builddir builddir ├── export ├── files │ ├──
bin │ │ └── ncdu │ ├── lib │ │ ├── libncurses.so.5 │ │ └── libtinfo.so.5 │ └── share │ ├── locale -> /app/share/runtime/locale │ └── runtime │ └── locale │ └── en │ └── batman
$ tree builddir builddir ├── export ├── files │ ├──
bin │ │ └── ncdu │ ├── lib │ │ ├── libncurses.so.5 │ │ └── libtinfo.so.5 │ └── share │ ├── locale -> /app/share/runtime/locale │ └── runtime │ └── locale │ └── en │ └── batman
$ cat << EOF > metadata [Extension org.flatpak.ncdu.Locale] directory=share/runtime/locale autodelete=true
locale-subset=true EOF
$ cat builddir/metadata.locale [Runtime] name=org.flatpak.ncdu.Locale [ExtensionOf] ref=app/org.flatpak.ncdu/x86_64/master
$ flatpak build-finish \ --filesystem=home \ builddir $ cat builddir/metadata
(...) [Context] filesystems=home;
$ flatpak build-export \ --exclude='/share/runtime/locale/*/*' \ repo build master $
flatpak build-export \ --metadata=metadata.locale \ --files=files/share/runtime/locale \ repo build master
$ flatpak build-export \ --exclude='/share/runtime/locale/*/*' \ repo build master $
flatpak build-export \ --metadata=metadata.locale \ --files=files/share/runtime/locale \ repo build master
$ flatpak build-export \ --exclude='/share/runtime/locale/*/*' \ repo build master $
flatpak build-export \ --metadata=metadata.locale \ --files=files/share/runtime/locale \ repo build master
https://hg.mozilla.org/mozilla-central/file/tip/ taskcluster/docker/firefox-flatpak/runme.sh
https://buildstream.build/ https://pagure.io/flatpak-module-tools
Demo
Thank you!
[email protected]
https://barthalion.blog Twitter: @barthalion https://flatpak.org https://flathub.org