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
95
0
Share
Creating Flatpak packages without flatpak-builder
Bartłomiej Piotrowski
November 09, 2021
More Decks by Bartłomiej Piotrowski
See All by Bartłomiej Piotrowski
Flathub: The State of the Union
barthalion
0
33
OpenStack Swift
barthalion
0
71
Reproducible builds
barthalion
0
300
Alpine Linux
barthalion
0
420
Wprowadzenie do tworzenia pakietów w Arch Linuksie
barthalion
0
450
Arch Linux
barthalion
0
77
Other Decks in Programming
See All in Programming
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
180
横断組織出身のQAEがインプロセスQAEでつまずいたこと・活かせたこと
ty89
0
300
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
2.6k
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
400
分析エージェント精度向上における データアナリストの役割
oura_shoya
0
120
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
200
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
980
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
6
6.3k
Are We Really Coding 10× Faster with AI?
kohzas
0
230
ふつうのFeature Flag実践入門
irof
6
2.9k
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
150
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
290
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
The World Runs on Bad Software
bkeepers
PRO
72
12k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
370
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
200
The untapped power of vector embeddings
frankvandijk
2
1.7k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
120
Joys of Absence: A Defence of Solitary Play
codingconduct
1
380
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Bash Introduction
62gerente
615
210k
Tell your own story through comics
letsgokoyo
1
930
The Language of Interfaces
destraynor
162
26k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
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