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
87
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
64
Reproducible builds
barthalion
0
290
Alpine Linux
barthalion
0
410
Wprowadzenie do tworzenia pakietów w Arch Linuksie
barthalion
0
420
Arch Linux
barthalion
0
69
Other Decks in Programming
See All in Programming
CloudflareStack でRAGに入門
asahiiwm
0
140
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
1.1k
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
370
iOS開発におけるCopilot For XcodeとCode Completion / copilot for xcode
fuyan777
1
770
Оптимизируем производительность блока Казначейство
lamodatech
0
790
Beyond ORM
77web
10
1.4k
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
250
Jakarta EE meets AI
ivargrimstad
0
350
103 Early Hints
sugi_0000
1
280
Spatial Rendering for Apple Vision Pro
warrenm
0
280
為你自己學 Python
eddie
0
480
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
370
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
41
7.2k
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
Documentation Writing (for coders)
carmenintech
67
4.5k
How GitHub (no longer) Works
holman
311
140k
BBQ
matthewcrist
85
9.4k
GitHub's CSS Performance
jonrohan
1031
460k
What's in a price? How to price your products and services
michaelherold
244
12k
RailsConf 2023
tenderlove
29
950
Faster Mobile Websites
deanohume
305
30k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Optimizing for Happiness
mojombo
376
70k
Keith and Marios Guide to Fast Websites
keithpitt
410
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