why-alpine.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  5. <head>
  6. <!-- 2024-01-27 Sat 11:58 -->
  7. <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1" />
  9. <title>Why Alpine</title>
  10. <meta name="author" content="Joshua Branson" />
  11. <meta name="description" content="We want an Alpine based Hurd distribution, because
  12. Alpine is simple, secure, and uses the latest
  13. software releases." />
  14. <meta name="keywords" content="Alpine Hurd GNU Mach" />
  15. <meta name="generator" content="Org Mode" />
  16. <link rel="stylesheet" href="../css/normalize.css" type="text/css"/><link rel="stylesheet" href="../css/default-org-stylesheet.css" type="text/css"/><link rel="stylesheet" href="../css/stylesheet.css" type="text/css"/>
  17. </head>
  18. <body>
  19. <div id="preamble" class="status">
  20. <nav><a href="../index.html">Home</a><a href="../about.html">About</a><a href="../blog/index.html">Blog</a></nav>
  21. </div>
  22. <div id="content" class="content">
  23. <h1 class="title">Why Alpine</h1>
  24. <p>
  25. GNU/Linux has several different <i>distributions</i>: Ubuntu, Debian,
  26. Fedora, Suze, etc, and each distribution is slightly different from
  27. the others. Fedora usually uses the most recent software, while
  28. Debian offers stability. Each distribution helps the entire
  29. ecosystem, by ensuring various library versions play nicely together,
  30. each develops of different package managers, some use different
  31. compilers (<code>LLVM</code> instead of <code>GCC</code>) etc. Users are free to choose the
  32. distribution that they prefer. This has worked out well for
  33. GNU/Linux, but how many <b>active</b> Hurd distributions are there? <sup><a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup>
  34. </p>
  35. <p>
  36. Currently? Just two: <a href="https://www.debian.org/ports/hurd/">Debian GNU/Hurd</a> and <a href="https://guix.gnu.org">Guix System</a>. Of these two,
  37. Debian GNU/Hurd is more complete. Debian GNU/Hurd has more packages,
  38. more global mirrors, etc. People run Debian GNU/Hurd in <code>qemu</code>, <code>Xen</code>,
  39. and on real hardware (I use a T43). The Hurd Guix System is catching
  40. up to Debian GNU/Hurd, but is not quite there yet <sup><a id="fnr.2" class="footref" href="#fn.2" role="doc-backlink">2</a></sup>. What is nice about
  41. Guix System, is that they make it realy easy to run the Hurd in a
  42. virtual machine via this bit of <a href="https://guix.gnu.org/manual/en/html_node/Virtualization-Services.html#index-childhurd">guile code</a>:
  43. </p>
  44. <div class="org-src-container">
  45. <pre class="src src-scheme">(service hurd-vm-service-type
  46. (hurd-vm-configuration
  47. (disk-size (* 5000 (expt 2 20))) <span style="font-weight: bold; font-style: italic;">;</span><span style="font-weight: bold; font-style: italic;">5G</span>
  48. (memory-size 1024)))
  49. </pre>
  50. </div>
  51. <p>
  52. We want to add a third distribution based on <a href="https://www.alpinelinux.org/about/">Alpine Linux</a>. Please
  53. note that Alpine Linux is not directly involved in this project. We
  54. just like their design goals: small, simple, and secure.
  55. </p>
  56. <p>
  57. But why another distribution? Why not invest in the Hurd
  58. distributions that already exist? We believe that creating another
  59. distribution will uncover bugs (like the one Sergey found in glibc),
  60. test the Hurd in new environments, encourage more users to run the
  61. Hurd, generate good publicity for the Hurd, and it's fun!
  62. </p>
  63. <p>
  64. What makes Alpine Linux different from Guix and Debian? Debian is
  65. stable and uses somewhat older software (notable not the latest
  66. glibc), Guix is written entirely in guile scheme, breaks the <a href="https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard">FHS</a>, and
  67. has some <a href="https://guix.gnu.org/en/about/">exciting package management features</a>. Alpine Linux is not a
  68. GNU distribution, and it is also known for being light-weight, secure,
  69. and simple. Alpine also keeps all of its packages' build recipes in
  70. one git repo (<code>aports</code>). To contribute a change, one would fork
  71. <code>aports</code> and make a MR against the repo. If its accepted, then
  72. Alpine's continuous integration can rebuild the packages and within
  73. minutes make the new package available for download.
  74. </p>
  75. <div id="outline-container-orgea83716" class="outline-2">
  76. <h2 id="orgea83716">What is the current status?</h2>
  77. <div class="outline-text-2" id="text-orgea83716">
  78. <p>
  79. Sergey ported many Alpine packages to build with (i386, for now) GNU
  80. Mach, the Hurd, and glibc, replacing Linux and musl. Sergey built
  81. everything with GCC/binutils it uses gnumach, hurd, and glibc. But
  82. other than that, GNU software is not the default. He has 299
  83. installable packages; the number of source packages is of course
  84. several times less than that. Still, this includes things like curl,
  85. ncurses, nano, native binutils &amp; gcc &amp; mig, libffi, openrc, openssl,
  86. util-linux, busybox, apk-tools, &#x2026; and of course gnumach, hurd (with
  87. dependencies like libdaemon, parted, &#x2026;), and glibc. Importantly, all
  88. this cleanly bootstraps using the <code>scripts/bootstrap.sh</code> script that
  89. Alpine provides; this is too somewhat like Flávio's scripts, but it
  90. uses the real full Alpine package definitions for e.g. GCC (patched by
  91. Sergey for glibc / Hurd support).
  92. </p>
  93. <p>
  94. Above the kernel and libc, things remain much as they were in upstream
  95. Alpine: the system boots (Sergey hasn't tried booting it yet with
  96. busybox init &amp; OpenRC yet), and uses busybox as its basic
  97. userland. GNU software such as Bash is installable, too.
  98. </p>
  99. <p>
  100. There is no ABI compatibility with either Alpine Linux or other Hurd
  101. distributions implied: only binaries built targeting this system will
  102. run on it. So, Sergey bumped the minimum glibc symbol version for all
  103. architectures to GLIBC<sub>2.38</sub>. (And he will probably bump this further
  104. to GLIBC<sub>2.39</sub>) This drops code that only exists for supporting older
  105. binaries, and saves some disk space.
  106. </p>
  107. <p>
  108. The future of this project depends entirely on you. If there's no one
  109. interested in hacking on it and using it, it will go down in history
  110. as another attempt at making an alternative Hurd distro that failed to
  111. gain traction, much like Arch Hurd. This will be fine too; at least it
  112. was a fairly interesting hack.
  113. </p>
  114. <p>
  115. But if you are interested, speak up, join in, and spread the word! :)
  116. We need:
  117. </p>
  118. <ol class="org-ol">
  119. <li>Somewhere to keep our aports fork in. Depending on how serious we</li>
  120. </ol>
  121. <p>
  122. are about this (if at all), this may range from a personal repo on
  123. GitHub, to a GitHub/GitLab "organization", to a whole website of our
  124. own with our own Git hosting solution (whether GitLab or something
  125. else) running on it.
  126. </p>
  127. <ol class="org-ol">
  128. <li>Somewhere to host the built packages, so they can be downloaded by</li>
  129. </ol>
  130. <p>
  131. the package manager on users' machines.
  132. </p>
  133. <ol class="org-ol">
  134. <li>A CI setup that would build packages when their package definition</li>
  135. </ol>
  136. <p>
  137. changes, and upload the built result to the hosting solution from the
  138. previous point. Perhaps see the CI setup in the pmaports repo for some
  139. inspiration. There's also <a href="https://github.com/eburghar/reposerve">reposerve</a>, which appears to have been
  140. developed specifically to integrate with the workflow of packages
  141. being built on <a href="https://itsufficient.me/blog/alpine-container#packages-repository">GitLab CI</a>. Or we could use <a href="https://forgejo.org/">forgejo</a>, which supports
  142. <code>aports</code>.
  143. </p>
  144. </div>
  145. </div>
  146. <div id="footnotes">
  147. <h2 class="footnotes">Footnotes: </h2>
  148. <div id="text-footnotes">
  149. <div class="footdef"><sup><a id="fn.1" class="footnum" href="#fnr.1" role="doc-backlink">1</a></sup> <div class="footpara" role="doc-footnote"><p class="footpara">
  150. <a href="https://archhurd.org/">Arch Hurd</a> did exist at some point, but it does not seem to be
  151. active. Perhaps you are interested in Arch, and want to re-start the
  152. Arch Hurd project?
  153. </p></div></div>
  154. <div class="footdef"><sup><a id="fn.2" class="footnum" href="#fnr.2" role="doc-backlink">2</a></sup> <div class="footpara" role="doc-footnote"><p class="footpara">
  155. Please note that we like Guix System too! Guix System has
  156. plenty of active developers, lots of momentum, and is building lots of
  157. cool software tools like <code>guix shell</code>, <a href="https://issues.guix.gnu.org/">the guix issue tracker</a>, <a href="https://qa.guix.gnu.org/">Guix
  158. QA</a>, and they are working really hard to translate their <a href="https://guix.gnu.org/">website</a> and
  159. manual into numerous languages.
  160. </p></div></div>
  161. </div>
  162. </div></div>
  163. <div id="postamble" class="status">
  164. <p class="date">Date: 2024-01-25 Thu 13:31</p>
  165. <p class="author">Author: Joshua Branson</p>
  166. <p class="date">Created: 2024-01-27 Sat 11:58</p>
  167. <p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
  168. </div>
  169. </body>
  170. </html>