Hacking Thursday
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 2023-11-28 主題分享 -- Flatpak(Linux軟體套件格式)介紹 ## 活動資訊 - 日期: 2023-11-28 (二) 19:00 ~ 22:00 - 地點: 台北市中正區八德路一段94號3樓(摩茲工寮) - <https://moztw.org/space/> - Google Map: <https://g.page/MozTW?share> - 講者: 潘建宏 StarNight - About: <https://about.me/StarNight> - Github: <https://github.com/starnight> - 注意事項 - 場地無供餐,請自行帶晚餐飲食前來 - 有 WiFi 及電源插座 - 該場地有門禁,活動開始前會有志工到場開門。 - 視情況可聯絡志工遠端開門 - 費用: 無 - 主辦單位 - Hacking Thursday(H4), <https://www.hackingthursday.org> - TOSSUG, <https://tossug.net/> ## 報名資訊 場地可容納人數約 15 ~ 25 人。目前活動設定 15 人座位,候位 3 人。報名活動請至下方網頁(kktix): <https://hackingthursday.kktix.cc/events/2bfe702b> 也歡迎現場直接參加,若人數超過上限,以有填表報名者優先。 ## 活動形式 於 19:00 ~ 20:00 大家各自下班後,由大家自行攜帶餐點及飲料至摩茲工寮邊吃邊聊、敘敘舊。待茶餘飯飽之後,約於 20:00 前後,由主持人簡短介紹當天的主題及講者後,由講者開始跟大家分享他的經驗跟見聞。 分享的時間長短不限,可以是 7 分鐘的 lightening talk, 也可以是 20~30 分鐘的侃侃而談。由講者自由發揮。 講者介紹完內容之後,後續即進入提問回答及自由閒聊時間。由於能和講者跟其他與會者第一手的接觸與交流,後半段的自由交流時間常常是能認識新朋友和意外收獲的好時光。 不論是老朋友、新朋友,都歡迎帶著一個輕鬆交流的心情前來參加。 ## 講題簡介 Flatpak (a Linux App Package) Introduction 在現今 Linux 生態系中,導入 Sandbox 概念的 Flatpak \[1\] 技術,已逐漸成為桌面程式的主流封裝格式。使用 Flatpak 封裝的應用程式,可以上架到 Flathub (The Linux App Store) \[2\],各 Linux distribution 使用者就可透過一致且方便的方法下載、安裝與使用該應用程式。本次將分享 Flatpak 的基礎概念、封裝的步驟,與一些實際案例。 The Flatpak \[1\] with Sandbox concept has been becoming the major desktop application packaging format. The Flatpak applications can be uploaded to Flathub (The Linux App Store) \[2\]. Then, users of all Linux distributions can download, install and use the applications with the same tool / consistent way. Will introduce the basic concept of Flatpak, how to package as a flatpak application, and explore some real cases this time. \[1\]: https://flatpak.org/ \[2\]: https://flathub.org/ ## 投影片 [Package Applications as Flatpaks - HackMD](https://hackmd.io/@starnight/Package-Applications-as-Flatpaks) (Author: 潘建宏 StarNight) ## 錄影 [Flatpak (a Linux App Package) Introduction - YouTube](https://www.youtube.com/watch?v=7eOBC5neqks) (感謝 DreamerC 協助錄影與上傳) ## 來賓 - [x] Mat - from H4 - [x] 果凍 - [x] 張oo誠 - [x] jeffery - 家裏開咖啡廳 - 後來接觸個技術社群 - 軟體、資安 - [x] eric (哲佑) - firmware, backend - [x] dreamerc - 負責錄影 - debian, ubuntu - [x] 吳oo佑 - [x] Pellaeon - [x] Ben Lau - from HK - AI - [x] Kait Wang - Web, rails, vue, rust, nvim - [x] RJ - 遠傳, IoT, ubuntu 社羣 - [x] StarNight (speaker) - [ ] 王oo中 - [ ] kkyo - [ ] jelly NOTE: 歡迎自行補充個人自介資訊,方便大家交流跟聯絡。若有匿名需求者,也歡迎自行 mask/unmask 。 ## 活動照片 [Photo album - 2023-11-28_主題分享_StarNight_Flatpak](https://photos.hackingthursday.org/%E6%B4%BB%E5%8B%95-2023-11-28_%E4%B8%BB%E9%A1%8C%E5%88%86%E4%BA%AB_StarNight_Flatpak.html) ![](https://photos.hackingthursday.org/media/large/%E6%B4%BB%E5%8B%95/2023-11-28_%E4%B8%BB%E9%A1%8C%E5%88%86%E4%BA%AB_StarNight_Flatpak/IMG_20231128_193750.jpg) (逆時針左起: StarNight, RJ, Kait, Ben Lau, DreamerC, Eric哲佑, Jeffery, 張oo誠, 果凍) ![](https://photos.hackingthursday.org/media/large/%E6%B4%BB%E5%8B%95/2023-11-28_%E4%B8%BB%E9%A1%8C%E5%88%86%E4%BA%AB_StarNight_Flatpak/IMG_20231128_212334.jpg) (逆時針左起: StarNight, RJ, Kait, DreamerC, Eric哲佑, Jeffery, 張oo誠, Mat) ## 活動筆記 - endless fundation - https://hackmd.io/@starnight/Package-Applications-as-Flatpaks - sandbox - `flatpak-builder` - `org.freedesktop.Sdk//23.08` 的 `//` 是指本機的 ARCH - `flatpak run --command=sh` (about xcode 封裝) pkg 吧? Ben Lau: 蘋果不是自動的,還是要設定 - MSIX - 若是像 systemd 的話, 就不能用。 目前還是主要是以桌面程式爲主。 ``` --share=network --socket=fallback-x11 --socket=wayland ``` - share 的權限去哪裏看? - [Sandbox Permissions — Flatpak documentation](https://docs.flatpak.org/en/latest/sandbox-permissions.html) - 中文輸入的話,有些問題,例如 Chromium 在某些情況下會有 X11/Wayland 之間的問題 - 推薦的 Flathub 上架參考範例: [flathub/org.gnome.gedit](https://github.com/flathub/org.gnome.gedit) - 自動更新 dependencies 的案例: [flathub/org.endlessos.Key](https://github.com/flathub/org.endlessos.Key) `x-checker-data` [org.endlessos.Key/org.endlessos.Key.yaml at master · flathub/org.endlessos.Key](https://github.com/flathub/org.endlessos.Key/blob/master/org.endlessos.Key.yaml): ``` x-checker-data: type: git tag-pattern: ^v([\d.]+)$ ``` - 打包的推薦的入門文件: [Building your first Flatpak — Flatpak documentation](https://docs.flatpak.org/en/latest/first-build.html) ### 常用指令 #### list - `flatpak list` 列出目前安裝的 flatpak - `flatpak list --app` 只列出 app 類別的 flatpak #### run - `flatpak run <id>` 執行 flatpak ,預設會執行 manifest 裡定義的 command,後面可接權限參數讓這次執行時,暫時複寫 manifest 裡 first-args 定義的權限 - `flatpak run --command=<cmd> <id>` 執行時不執行 flatpak 內預設指令,而是執行 `<cmd>` #### info - `flatpak info <id>` 查看 flatpak 資訊 - `flatpak info -l <id>` 列出 flatpak 安裝的路徑 - `flatpak info -v <id>` / `flatpak info -vv <id>` 列出更多資訊 ## FAQ ### Question Eric哲佑: > Q: 如何全機裸奔? > 主要是測試時或是找問題時,沒辦法一一測。 > 而會想先把權限全開,看能不能排除/確定是不是權限的問題 StarNight: - 目前沒有 `ALL` 的選項,要按文件列的一一打開。 - 但有些權限在文件上沒有寫(?!) ### Question Kait: > Q: 版本問題 > Q: branch 問題 StarNight: 通常會是 tag https://github.com/flathub/org.endlessos.Key/blob/master/org.endlessos.Key.yaml ``` - name: kolibri-gnome buildsystem: meson builddir: true sources: - type: git url: https://github.com/endlessm/endless-key-flatpak.git tag: v0.8 commit: 36394a83686ac93318639a1f45ea660ced0579b6 x-checker-data: type: git tag-pattern: ^v([\d.]+)$ ``` 根據 source 的 upstream 去定的版本 看上面列的是 stable , 但自己 build 的是 master - 跟 flatpak 的 repo 有關 ### Question Mat: > Q: reproducible build by Mat > - 參考 [H4 聚會筆記 線上共筆 - HackMD](https://hackmd.io/3Rg6ERYgSqi1-Gx_1EUBJA?both#2023-11-16) 於 2023-11-16 有提到 Deterministic Build 的部分 > > Q: 預設設定檔(ex: `/etc/...`) 跟封裝的預設設定檔之間是否有交互影響? > - 例如: 有個程式(記爲: A-original) 原本讀取 `/etc/` 或 `/usr/share/` 下的預設設定檔。 > - 後來該程式推出了 Flatpak (記爲: A-flatpak) 也封裝了自己的預設設定檔 > - 在同時有舊設定檔跟新的封裝設定檔之下,是否會有互相干擾的問題? > > Q: security library 例如 `libssl` 資安修補會一直出,那該 pak 如何 update ? > - 因爲 security fix 會一直出,那已封裝的舊 libssl ,夾帶有 security hole 的 pak 該如何處置? StarNight: - reproducible build - 因爲有 timestamp 的關係, 所以每次 checksum 都會不一樣 補充資料: - [Reproducible build support · Issue #251 · flatpak/flatpak-builder](https://github.com/flatpak/flatpak-builder/issues/251) ### Question 吳oo佑: > Q: dependency 問題 > (註: 這一段沒聽清楚) StarNight: - Flatpak 不相依於 flatpak, 但 flatpak 相依於 flatpak runtime ### Share - Feedback by pellaeon [Flatseal | Flathub](https://flathub.org/apps/com.github.tchx84.Flatseal) - 用來管理 Flatpak 權限的方便工具

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully