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
83
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
24
OpenStack Swift
barthalion
0
62
Reproducible builds
barthalion
0
280
Alpine Linux
barthalion
0
410
Wprowadzenie do tworzenia pakietów w Arch Linuksie
barthalion
0
400
Arch Linux
barthalion
0
62
Other Decks in Programming
See All in Programming
Java 22 Overview
kishida
1
190
try! Swift Tokyo 初参加報告LT
hinakko2
0
230
禅の心を手に入れよ
eltociear
1
280
GitHub Actionsで泣かないためにやっておきたい設定 / Recommended GHA settings to avoid crying
pinkumohikan
3
560
Fragment Composition of GraphQL
quramy
13
1.4k
From Spring Boot 2 to Spring Boot 3 with Java 21 and Jakarta EE
ivargrimstad
0
440
CA.swift19 恋するAIアプリ開発の裏側
oskmr
0
380
Go製Webアプリケーションのエラーとの向き合い方大全、あるいはやっぱりスタックトレース欲しいやん / Kyoto.go #50
utgwkk
6
1.7k
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
3
670
try! Swift Tokyo 2024 参加報告 / try! Swift Tokyo 2024 Report
hironytic
0
220
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
440
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
2
200
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
176
21k
Designing for Performance
lara
602
67k
A better future with KSS
kneath
231
16k
Teambox: Starting and Learning
jrom
128
8.4k
Product Roadmaps are Hard
iamctodd
45
9.7k
Rails Girls Zürich Keynote
gr2m
91
13k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
117
18k
Happy Clients
brianwarren
92
6.4k
Six Lessons from altMBA
skipperchong
22
3k
Statistics for Hackers
jakevdp
790
220k
Producing Creativity
orderedlist
PRO
338
39k
Building Flexible Design Systems
yeseniaperezcruz
320
37k
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