Linuxアプリのパッケージングにおける苦悩
原題: The Agony of Packaging Linux Apps
日本語訳
# Linuxアプリのパッケージングにおける苦悩
Linuxのエコシステムにおける素晴らしい点の一つは、選択肢が非常に豊富であることです。しかし、これは最大の弱点でもあります。MacOSやWindowsとは異なり、単純な問いに対して単純な答えが得られないことが多いためです。ソフトウェアの配布というトピックは、決して解決することのない厄介な問題の一つであり、Freshエディタの作者である[Noam Lewis]氏も、最近この件に関して不満を表明しています。
これは以前にも、主にクロスプラットフォーム・インストーラーの文脈で取り上げたことのある、お馴染みのトピックです。MacOSやWindowsでは、だいたい同じような動作をする数少ない標準的なインストーラー・フレームワークのいずれかを選べば済みますが、Linuxでは、ディストリビューション固有のもの、NPM、Homebrew、Rustのcrates、Arch LinuxのAURやDebianの野良APTリポジトリのようなサードパーティ製リポジトリ、そしてもちろんAppImageやFlatpakなど、目まぐるしいほど多くのパッケージマネージャーに対処しなければなりません。
Freshコミュニティの助けを借りてリストのすべてを確認した後、[Noam]氏は結局それらすべてに対してパッケージを作成することになり、多くの考えを持つようになりました。FreshはTUIベースのエディタであるため、Flatpakのようなものはあまり適しておらず、一方でAppImageはイメージのマウントにより動作が非常に遅く、それが煩わしいと感じています。
全体として、ディストリビューション固有のソリューションは、たとえ配布チャネルに乗せることができたとしても、同じ作業を何度も繰り返すことになるため、一般的に好ましいものではありません。最終的に[Noam]氏が辿り着いた解決策は、muslランタイムを使用した静的バイナリに、統合されたアップデーターを組み合わせるというものでした。これはWindowsユーザーにとっては非常に馴染みのある解決策でしょう。しかし、一部のLinuxユーザーにとって、それが一種の「純粋性テスト」に合格しないものだとしても、ソフトウェアのユーザーにとってうまく機能するのであれば、それは本当に悪い解決策なのでしょうか?
原文(英語)を表示
One of the great things of Linux as an ecosystem is that there is so much choice. Yet this is also its greatest weakness, as unlike on MacOS and Windows this means that simple questions often do not have a simple answer. The topic of distributing software is one of these vexing topics that never really goes away, with [Noam Lewis], as author of the Fresh editor, recently expressing their frustrations on this topic.
This is a familiar topic that we have covered before, mostly in the context of cross-platform installers. Whereas on MacOS and Windows you just pick any of a handful of standard installer frameworks that do roughly the same thing, on Linux you are dealing with a dizzying number of package managers, including distro-specific ones, NPM, Homebrew, Rust crates, third party repositories like Arch Linux’s AUR or stray APT repositories for Debian, and of course AppImage and Flatpak along with a host of other options.
After going through the entire list with help from the Fresh community, [Noam] ended up creating packages for all of them, and has a lot of thoughts. Since Fresh is a TUI-based editor, something like Flatpack is not a really good fit, while AppImage is just very slow due to mounting the image, which is annoying.
Overall, distro-specific solutions are just unpleasant in general, as they mean repeating the same work over and over, even if you can even get into a distribution channel. Ultimately the solution that [Noam] ended up at was to have a static binary with the musl runtime, along with an integrated updater, which is a solution that should be quite familiar for Windows users. Yet even if it fails some kind of purity test for certain Linux users, is it really a bad solution if it works for users of the software?