logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

README.md (6405B)


  1. # oasis
  2. [![builds.sr.ht status](https://builds.sr.ht/~mcf/oasis/commits/master/.build.yml.svg)](https://builds.sr.ht/~mcf/oasis/commits/master/.build.yml)
  3. oasis is a small linux system.
  4. It is probably quite a bit different from other Linux-based operating
  5. systems you might be familiar with, and is closer to a BSD.
  6. There are many features that distinguish it from other operating
  7. systems:
  8. * Completely **statically linked**.
  9. All software in the base system is linked statically, including the
  10. display server ([velox]) and web browser ([netsurf]). Compared to
  11. dynamic linking, this is a simpler mechanism which eliminates
  12. problems with upgrading libraries, and results in completely
  13. self-contained binaries that can easily be copied to other systems.
  14. [velox]: https://github.com/michaelforney/velox
  15. [netsurf]: https://www.netsurf-browser.org
  16. * **Fast builds** that are **100% reproducible**.
  17. All packages are built with [samurai], using build manifests generated
  18. by [Lua scripts]. This involves considerable up-front packaging
  19. cost, but minimal maintenance cost, and offers numerous advantages,
  20. including near optimal build times, predictable and reproducible
  21. builds, reduced build-time dependencies, and incremental builds
  22. even across package boundaries.
  23. [samurai]: https://github.com/michaelforney/samurai
  24. [Lua scripts]: https://github.com/oasislinux/oasis/blob/master/pkg/nasm/gen.lua
  25. * **Minimal bootstrap dependencies**.
  26. Any POSIX system with git, lua, curl, a sha256 utility, standard
  27. compression utilities, and an `x86_64-linux-musl` cross compiler
  28. can be used to bootstrap oasis. This makes it trivial to cross-compile,
  29. even from non-Linux systems such as macOS or OpenBSD.
  30. * **BearSSL** is the system TLS and crypto library.
  31. BearSSL is incredibly small and well written, but is not widely
  32. adopted. Through the use of libcurl, which now has native BearSSL
  33. support, and [libtls-bearssl], an alternative implementation of
  34. libtls based on BearSSL, oasis uses BearSSL throughout the system.
  35. Only a [few optional packages] still require LibreSSL.
  36. [libtls-bearssl]: https://sr.ht/~mcf/libtls-bearssl
  37. [few optional packages]: https://github.com/oasislinux/oasis/issues/14
  38. * **No package manager**.
  39. Instead, you configure a set of [specifications] of what files from
  40. which packages to include on your system, and the build system
  41. writes the resulting filesystem tree into a git repository. This
  42. can then be merged into `/`, or pulled from another machine.
  43. [specifications]: https://github.com/oasislinux/oasis/blob/master/config.def.lua#L12-L15
  44. * Integrates well with **OS-agnostic package systems**.
  45. Although the aim is to provide a complete system, there is a lot
  46. of free software out there, a lot of which does not match up well
  47. to our goals. Rather than trying to build and maintain yet another
  48. repository with thousands of packages, oasis works well with [pkgsrc]
  49. and [nix]. This makes it easy to extend your system with software
  50. you might need, while keeping the base system small and focused.
  51. [pkgsrc]: https://github.com/oasislinux/oasis/wiki/pkgsrc
  52. [nix]: https://nixos.org/nix
  53. * Extremely **simple system configuration**.
  54. A guiding principle is that the `/etc` directory should be simple
  55. enough for system administrators to understand completely and
  56. customize appropriately. The most complex file in the default
  57. configuration is the system initialization script, [`/etc/rc.init`],
  58. at only 16 lines.
  59. [`/etc/rc.init`]: https://github.com/oasislinux/etc/blob/master/rc.init
  60. * Mostly **ISO C conformant**.
  61. A major goal of oasis is to build with [cproc], a C compiler which
  62. is much stricter about the ISO C standard than gcc or clang, and
  63. orders of magnitude smaller. Although this is a [work-in-progress
  64. effort], all core packages, and most others, build successfully
  65. with cproc.
  66. [cproc]: https://sr.ht/~mcf/cproc
  67. [work-in-progress effort]: https://github.com/oasislinux/oasis/issues/13
  68. ## Principles
  69. * Software complexity should be measured by including all transitive
  70. dependencies.
  71. * Executables should be linked statically.
  72. * Software components should allow for easy customization and/or
  73. modification.
  74. * Package sources should be referenced through a URL or git submodule,
  75. but not included directly.
  76. * `/etc` should be simple enough to be understood in its entirety.
  77. * Patches should be well organized, have good descriptions, and
  78. should always apply cleanly.
  79. ## Install
  80. An install guide can be found on the [wiki].
  81. However, keep in mind that oasis is an ambitious project, and there
  82. is still a lot of work to do. Users should be comfortable building
  83. their own kernel and tinkering with their system when things go wrong.
  84. If you do run into trouble, I'm always happy to help you out.
  85. [wiki]: https://github.com/michaelforney/oasis/wiki
  86. ## QEMU
  87. If you'd like to give oasis a try without installing it yourself,
  88. there is a QEMU image available [here][qemu-image].
  89. Inside the archive are the root filesystem, a Linux kernel, and a
  90. script to launch qemu. There is also `README.md` with some information
  91. about how to use it. In short, use `./run` to launch in graphical
  92. mode, and `./run -s` to launch in serial mode.
  93. [qemu-image]: https://s3.sr.ht/builds.sr.ht/artifacts/~mcf/1138649/ff314f9e1f24ce4f/oasis-qemu.tar.xz
  94. ## Software
  95. oasis uses smaller and simpler implementations of libraries and
  96. tools whenever possible:
  97. - musl instead of glibc
  98. - sbase instead of coreutils
  99. - ubase instead of util-linux
  100. - pigz instead of gzip
  101. - mandoc instead of man-db
  102. - bearssl instead of openssl
  103. - oksh instead of bash
  104. - sdhcp instead of dhclient or dhcpcd
  105. - vis instead of vim or emacs
  106. - byacc instead of bison
  107. - perp and sinit instead of sysvinit or systemd
  108. - netsurf instead of chromium or firefox
  109. - samurai instead of ninja
  110. - velox instead of Xorg
  111. - netbsd-curses instead of ncurses
  112. These packages are grouped into logical [sets], and the full list
  113. is available in the [pkg] directory.
  114. If your favorite software is missing, keep in mind that you can
  115. likely still install it via pkgsrc or nix.
  116. [sets]: https://github.com/oasislinux/oasis/blob/master/sets.lua
  117. [pkg]: https://github.com/oasislinux/oasis/blob/master/pkg
  118. ## Contact
  119. There is a mailing list at
  120. [~mcf/oasis@lists.sr.ht](mailto:~mcf/oasis@lists.sr.ht), and an IRC
  121. channel at #oasis on [libera.chat](ircs://irc.libera.chat:6697).
  122. Feel free to use them for questions, patches, or general discussion.