Consider adding support for FreeBSD
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 28/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- c, github-actions
調査の方向性
参照されている type2-runtime のビルドセクションと FreeBSD のランタイムパッチから始め、続いてリポジトリの Makefile とランタイムのエントリーポイントを確認します。FreeBSD のワークフローを既存の Linux ビルドと比較し、FreeBSD 向けのネイティブな AppImageTool ビルドとランタイムビルドに何が必要かを判断します。完了とは、FreeBSD の x86-64 および aarch64 ランタイムが、文書化されたワークフローを通じて正しくビルドされ、実行されることを意味します。
索引モデルが issue の本文から書いたものです。
説明
I recently experimented with custom built AppImage runtimes for my fre:ac project and managed to build AppImages for FreeBSD x86-64 and aarch64 with GitHub Actions.
I'm using vmactions/freebsd-vm for the build. Here is my workflow file for setting up the VMs.
I'm only building the runtimes and use the Linux AppImageTool for packaging. It would be great if a native AppImageTool and runtimes would be available for FreeBSD.
Here is the relevant part of my build script for building the runtime: type2-runtime build
I'm using libfuse 3.17.2 for this which has lots of fixes for BSDs over 3.16.2. I'm also patching the runtime with this patch for FreeBSD support. Main changes:
- Use the
KERN_PROC_PATHNAMEsysctl to get the AppImage path as /proc might not be available on FreeBSD - Don't search for a FUSE usermount prog; this should always be mount_fusefs on FreeBSD
- Wait for image to become available after mount
As for the last one, I'm not sure why this is necessary, but without it, the AppImage contents are not found when trying to execute AppRun. In my tests, waiting for an additional 10-20ms usually was enough for the files to become available. Maybe there are better ways to solve this.
Also, the aarch64 runtime is built with the ELF OS ABI set to GNU/Linux. I suspect this is a bug in the GNU binutils for FreeBSD aarch64 triggered by the presence of IFUNCs (which are imported from libmd.a). I'm calling elfedit --output-osabi FreeBSD $@ in the makefile to fix this.
x86-64 FreeBSD build times are only slightly longer than for Linux builds, mainly due to the time taken to setup the VM. aarch64 builds unfortunately are ~12x slower due to emulation and while GitHub Actions now has native aarch64 runners, those don't support nested virtualization.
Latest fre:ac AppImages for FreeBSD are available here.
It may also be possible to support other BSDs with a similar approach. @vmactions also has VMs for NetBSD, OpenBSD and DragonflyBSD. I'm not planning to try this anytime soon though.
- 主要言語
- C
- スター
- 75
- フォーク
- 38
- 平均マージ
- 3時間 31分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AppImage/type2-runtime のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
AppImage/type2-runtime#153 ·
-
fusermount3 get's skipped if not setuid, which breaks new fuse implementations対応中かも @probonopd が 27 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
AppImage/type2-runtime#150 · コメント 4 件 ·
-
Some apps can break unless it is run extracted対応中かも @probonopd が 15 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
AppImage/type2-runtime#144 · コメント 2 件 ·
-
Tagged Releasesオープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
AppImage/type2-runtime#140 · コメント 17 件 · リアクション 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
AppImage/type2-runtime#133 · コメント 11 件 · リアクション 1 件 ·
AppImage/type2-runtime の issue をすべて見る
似ている issue
-
backlog bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
EchoTools/nevr-runtime#653 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
InfiniTimeOrg/InfiniTime#2492 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
system: coco
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
FujiNetWIFI/fujinet-config#274 ·
メンテナーはふだん 1 日以内に返信
-
base-files: 82_config_generate: regenerate /etc/board.json if 0-bytes / truncated after power cutオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
openwrt/openwrt#25940 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信