diff --git a/config.toml b/config.toml index 99f6d93..33fd5e6 100644 --- a/config.toml +++ b/config.toml @@ -23,13 +23,20 @@ languages = [ ] [extra] + +header = "header" +menu = "menu" + +# .scss are automatically compiled in .css +stylesheets = [ "custom.css" ] + # The common part of the title (appended to page/section titles) title = " | baguette" color = "dark" max_width_for = "body" [extra.forge] # The baseURL for files tracked on the forge -browse = "https://git.baguette.netlib.re/Baguette/website" +browse = "https://git.baguette.netlib.re/Baguette/website/src/branch/master/" # Homepage of the forge home = "https://git.baguette.netlib.re/" # Name of the forge diff --git a/content/_common/menu.fr.md b/content/_common/menu.fr.md index 0de16e0..0fd99a4 100644 --- a/content/_common/menu.fr.md +++ b/content/_common/menu.fr.md @@ -1,7 +1,7 @@ +++ +++ -[Baguette OS](@/_index.fr.md) +[BaguetteOS](@/_index.fr.md) --- diff --git a/content/_common/menu.md b/content/_common/menu.md index 53da75f..0127473 100644 --- a/content/_common/menu.md +++ b/content/_common/menu.md @@ -1,7 +1,7 @@ +++ +++ -[Baguette OS](@/_index.md) +[BaguetteOS](@/_index.md) --- diff --git a/content/_index.md b/content/_index.md index 1c07d90..d17b585 100644 --- a/content/_index.md +++ b/content/_index.md @@ -2,10 +2,11 @@ title = "Baguette - OS, tools and stuff" +++ -# Baguette OS - concise overview +# BaguetteOS - concise overview + +BaguetteOS status: Work In Progress. +A beta will be available circa mid-2020 for advanced users. -Baguette OS status: Work In Progress. -A beta will be available circa mid-2020. ## Objectives, for simple users @@ -36,7 +37,8 @@ Minimal hardware requirement should be around 100 MB RAM, 50 MB disk. **Documentation.** *simple, reliable, useful, all-in-one-place*
Similar to the OpenBSD FAQ: updated, complete, concise and well-written. -## Objectives, for advanced users and contributors + +## Objectives, for advanced users **A knowable OS.** *simplicity at (almost) all cost*
Any interested user should be able understand the role of every part of the base system: no compromise. @@ -47,16 +49,12 @@ We provide a web interface that should handle basic system and network configura CLI tools are available to manage your services, they are design to be simple, consistent and reliable. **Robust system.** *for real*
-Static compilation for system tools *(at least)*: there is almost no way to get a borked system with an update (yes, almost, people are creative these days). +Static compilation for system tools *(at least)*: there is almost no way to get a borked system with an update (yes, *almost*, people are creative these days). **Officially supported and documented services.** *so you are sure to get them working*
We use some services for our own personal usage, so we will provide support for them. For instance: gitea, postgresql, a building plateform and a continuous integration tool, etc. -**Simple to contribute to.** -We want fewer and simpler tools as possible: Baguette OS has very few requirements, and automatic verifications. -Baguette OS do not suffer from any cumbersome historical decisions: no overly engineered package format, no stupidly complex tooling, etc. - **One need, one tool.** *this time for real*
Installing an application or a library is done by [package][package]. Other methods are not supported **and the base system will never require them**. @@ -69,78 +67,216 @@ Users should not be required to manually configure each software; instead, most Users should be able to change the default configuration through command-line options. Manual configuration is the last option. -**Slotting.** -[Slotting](#slotting) by default helps to install many programs with peculiar library version requirements. -No difference between stable and development versions. +**Slotting.** *any software can be installed on any machine at any time, no extra tooling*
+[Slotting](#slotting) by default helps to install many programs, even with peculiar library version requirements. +The same program can be installed in several versions without conflicts. -**Easy to write documentation.** +**Constrained devices use case.** *wanna try what small systems can do?*
+By default, we try to provide the smallest memory footprint: we do not ship manuals, nor runtime libraries when not required. +Our programs will never require you to download development libraries, nor alternative package managers. +The kernel is compiled with size in mind, as our choice of tools. +As a result, our system can be installed quickly even on slow machines. + + +## Objectives, for contributors + +**Simple to contribute to.** *you can focus on providing recipes for packages, we handle the tooling*
+We want fewer and simpler tools as possible, even for packaging applications and libraries. +BaguetteOS ships [a simple tool to package applications][packaging] and it only requires you to create a very simple recipe for your package. +It handles [slotting](#slotting), compiling, stripping binaries and libraries, splitting the result into different packages (`-man`, `-lib`, `-doc`, etc.) then authenticate them and finally recreate the index. +All that, just by typing `packaging app`, nothing more. + +meanie meanie dev + +**No Makefile?** *no problem*
+Your application or your library lacks a build system? Here a [tool to create makefiles][build.zsh]. +It works on any language, yes, even that one. + +**Stable and development versions: same thing.** *slotting, again and again*
+One of the coolest aspect of slotting is: you don't need to change your system *at all* to be on the developement version of the OS. +The developement of the newest version of the OS is just slotted in `/usr/baguette-dev` and that's it. +At any point in time you can execute programs from your stable OS, or if you will, change a few environment variables and be in dev. + +**New OS, open to explore**
+BaguetteOS do not suffer from cumbersome historical decisions: no overly engineered package format, no stupidly complex patchwork of mismatch tools. +BaguetteOS is easy enough to understand then even try to surpass it. + +**Easy to write documentation.** *easy to write, hopefully less procrastination*
Online documentation is written in Markdown (thanks Zola), and man pages too thanks to `scdoc`. Every tool is shipped with a man page: no man page, no integration in base. -## OS content - -- kernel: linux + headers (but most of the system should be kernel-agnostic) -- libc: musl, but any other libc can be easily added -- init: sysv init -- /etc/rc: CRUX-like -- coreutils: `toybox` (or `busybox`) -- shadow (todo: check if not already included in busybox) -- building tools: - - LLVM + Clang - - autotools (for sysv init and libarchive) - - libarchive - - `m4` (required at least for bootstrapping) - - make: `gnu-make` for compatibility reasons -- shells: - - `zsh` for users (not root by default) - - `ash` (because of busybox) or `ksh` -- documentation: - - a full hand-book like the OpenBSD FAQ - - manpages, written mostly with `scdoc` so anyone can contribute -- our tools - - services: [service][service] - - package management: [package][package] - - packaging: `packaging` ## Inspiration -- OpenBSD: security, therefore simplicity, no compromise -- PFSense: system and (even advanced) networking administration, yet through a simple website -- Plan9: everything is a file *no seriously guys* -- suckless and cat-v: simplicity, code readability and reusability -- morpheus: static compilation for the OS, demystified +- [CRUX][crux], [alpine][alpine]: simple to understand Linux systems +- [OpenBSD][openbsd]: security, therefore simplicity, no compromise +- [PFSense][pfsense]: system and (even advanced) networking administration, yet through a simple website +- [Plan9][plan9] and [Inferno][inferno]: everything is a file *no seriously guys* +- [suckless][suckless] and [cat-v][cat-v]: simplicity, code readability and reusability +- [morpheus][morpheus]: static compilation for the OS, demystified -# Baguette OS - detailed explanation +## Why not use another system? -## Features and objectives +This section could be expanded. + +**A few reasons why any of the candidate covers it all.**
+ +1. **we want slotting**
+So we could change the way we install and maintain packages. +2. **we want fast install and start-up on dumb devices**
+Coreutils will be shrinked to bare minimum, thanks to `toybox`. +We won't require a full-feature system with several hundred megabytes of used disk-space. +3. **documentation is important, but not for all installations**
+Your 42nd test install on a virtual machine doesn't need to provide manual for CLI tools you won't use since you do everything through the web interface. +Software and its documentation will be splited: manual pages won't be provided by default. +4. **we want automatic tests, and to allow people to test our system**
+We want easy chroot installs, on any system. +5. **we want to run on tiny ARM boxes, old laptops, top-notch servers**
+So we need to run on any available kernel. +6. **we want to control software distribution releases**
+We don't accept to follow updates from an upstream OS that could break our system at any time. -## custom tools +--- + +**Now, let's take a look at each candidate.** + +**OpenBSD.** *we will get there quick, but focus on linux a bit before*
+We definitevely want to use OpenBSD, currently we just focused on Linux for hardware compatibility reasons (and out of habits) but it's not set in stone. +We love OpenBSD big time, some of us use it daily. +We aim at providing rootfs for running our system under an OpenBSD kernel and environment.
+*(also, snapshots could be great, guys)* + +**PFSense.** *network focused*
+Way too focused on networking. +Great system, does the job very well, but won't fit our objectives. + +**CRUX and Alpine.** *great source of inspiration*
+We **do** use the CRUX's `rc` script, and as Alpine it is a source of inspiration for package recipes. +However, since we have to change all packages to get slotting, the service manager to have tokenized services, the packaging software to get declarative recipes (...), why even bother use those systems? + +**GUIX and coe.** *not simple enough*
+This approach of package management is interesting, having to learn a language to make recipes isn't. +And that sums a lot about this technology. +It's great to have, not to put everywhere. +Every part of BaguetteOS is simple to understand, GUIX is not *enough*. +But keep it up guys, it's still awesome. + +**Plan9, Inferno, morpheus, etc.** *kinda abandoned systems*
+That's it. + + +# Technical choices + +## Base system + +**Linux kernel**, but we are lurking on the OpenBSD one.
+Linux is compatible with most hardware and software, it is fast and we can easily compile a custom version to remove most of the bloat for server usage. +Still, we don't want to rely on Linux-specific components. +At some point, our system will be kernel-agnostic and will be able to run on any BSD as well. +OpenBSD has `pledge` and `unveil` syscalls, which is an elegant way to provide a guarantee on the software behavior. + +**Musl.** *reasonable libc for Linux*
+It has a reasonable amount of features, it is efficient, provides reasonable binary sizes and static compilation. +Musl is simple, reliable and remove all glibc-specific functions. +Others can be added easily, which is useful for compatibility and comparisons, through [slotting](#slotting). + +**Bootable system and rootfs available.**
+A bootable system to install in virtual machines or bare metal, a rootfs to use BaguetteOS from any other OS, including non-Linux ones. + +**SysV-style init + [CRUX-like /etc/{rc,mdev.conf,...}][baguette-rc]**. *easy to read, easy to adapt*
+The init could come from toybox or another minimalist project. +The [rc script from CRUX][cruxinit] is simple to understand and to adapt to any requirement, so we used it. +We also added some other scripts, like [for profile][baguette-profile] so we can easily manage slotting. +No systemd BS. + +**Toybox.** *the megabyte coreutils*
+[Toybox][toybox] combines common unix command line utilities together into a single BSD-licensed executable. +It is designed to be simple even to read, and is standards-compliant. +For the base system, that's all we need. + +**ksh and zsh**. *the first for scripts and root, the other for users*
+[Ksh][ksh] is a very stable and reliable shell from AT&T, trusted by the paranoid people of OpenBSD. +That's a safe choice for a base system and the root account. +On the other hand, we do use [zsh][zsh] daily, as for many users, so we may use it for development or build scripts but not in base. + +**[Service][service] for service management** *tokenized service description, templating and dumb cli tools for the win*
+[See custom tools.](#custom-tools) + +**[Package][package] for package management** *simple, efficient, dead simple code*
+[See custom tools.](#custom-tools) + +**OpenSSH.** *as we all know and love*
+This is required for almost all usages, and for debug. +Let's try not to shoot ourselves in the foot. + +That's all you need for starters. Web administrative interface will be added to the base when ready. + +## Development, build tools, contribution + +**Default building tools** *every tool needed to bootstrap*
+Clang (+LLVM) is the default C (and C++) compiler. +[Libarchive][libarchive] is required for tarballs, packages, webhooks from `packaging`, and both [bsdcpio][bsdcpio] and [bsdtar][bsdtar] (sane implementations of `cpio` and `tar`). +autotools are also required (for sysv init and libarchive). +[m4][m4] and [gnu-make][gmake] are required for compatibility reasons. + +**Documentation.**
+A full hand-book like the OpenBSD FAQ. +Our software manpages are written with `scdoc` so anyone can contribute. + +**[Packaging][packaging] for packaging software and libraries.** *dead simple, intuitive*
+[See custom tools.](#custom-tools) + +**Crystal language for system tools.** *syntax and productivity of Ruby, the speed of C*
+It is as simple to learn as a dynamic (oriented object) language, while at the same time being almost as fast as C. +Technically, Crystal is strongly typed which catches errors at compile-time, but with type inference so it is not cumbersome to use. +Applications are compiled in a simple binary, easy to deploy. +There is a good documentation, we used it for long enough to tell. +Technical choices are reasonable and documented. +Finally, Crystal has a large library with all we need for our system components. + +There is not much of a drawback here. +Yes, this is a language you have to learn to work with us on a couple of projects (the web interface backend, the service manager, the package manager and packaging) but it increases our productivity like crazy. +We heard about `nim` and a ton of other languages, but this is the one which reach the sweet spot between these parameters: + +- productivity (the package manager was mostly done in a few days, [and is just a few hundred lines long][package]) +- easy learning (a developper with basic notions of oriented-object can read our code, no black magic here) +- good documentation +- reasonably deployable (no host dependencies) +- execution speed + + +**Slotting.** *custom file system hierarchy*
+Our FS is not FHS-compliant, partially because of the origin-based slotting. +There is a strict separation between core system and third party software.
+[More information on slotting.](#slotting) +- `/usr/baguette` for core system programs +- `/usr/bad` for unslottable software +- `/usr/third-party` for other software + +# BaguetteOS - custom tools + +**[Package][package]: our package manager.**
+Package covers the basics: install, remove, search and provide informations about a package, and it creates rootfs. +It is used by `packaging` to create low-cost build environments. +Package knows the minimal set of binaries and configuration required to build the target, so it only installs the minimal environment to perform compilation. +This environment is low-cost since we hardlink binaries into the building rootfs, which is inspired by the [proot][proot] tool on OpenBSD. + +Package provides slotting by default: no need for custom environments for each software. + +Packages format ar simple `tar` archives containing a `meta.spec` file describing all meta-data about the package, and `files.tar.xz` with the files to install. +The database format contains `world`, `installed`, `[package-name]/[slot]/manifest` and `[package-name]/[slot]/meta.spec`. + +Package's configuration is a list of repositories, authorized package signing keys and packaging variables (cflags, makeflags, and so on). + +**[Packaging][packaging]: to create packages**
+Packaging uses simple, declarative recipe files, here some examples: [hello][recipe-hello], [dhcpcd][recipe-dhcpcd], [alsa-utils][recipe-alsautils]. +The only required parameters are `name` and `sources`. + +Packaging creates build environments to test packages before validation. + +Packaging currently creates -- [package][package]: package manager - - basics: install, remove, search and provide informations about a package - - rootfs creation - - used by `packaging` to create low-cost build environments
- [package][package] knows the minimal set of binaries and configuration required to build the target, so it only installs the minimal environment to perform compilation.
- This environment is low-cost since we hardlink binaries into the building rootfs.
- Inspired by the *proot* tool on OpenBSD. - - slotting by default: no need for custom environments for each software - - packages format: - - .tar - - meta.spec - - files.tar.xz - - db format: - - world - - installed - - [package-name]/[slot]/manifest - - [package-name]/[slot]/meta.spec - - configuration: - - list of repositories - - authorized package signing keys - - packaging variables (cflags, makeflags, and so on) -- `packaging`: create packages - - uses simple, declarative recipe files - - create build environments to test packages before validation - [service][service]: service management - add an init script for a service, for a specified domain - example: `service add wordpress example.com` @@ -178,56 +314,6 @@ Every tool is shipped with a man page: no man page, no integration in base. Therefore, languages are irrelevant: you can use any *library* in any language. -## Technical choices - -**Linux kernel**, but we are lurking on the OpenBSD one.
-Linux is compatible with most hardware and software, it is fast and we can easily compile a custom version to remove most of the bloat for server usage. -Still, we don't want to rely on Linux-specific components. -At some point, our system will be kernel-agnostic and will be able to run on any BSD as well. - -**Musl libc.**
-It has a reasonable amount of features, it is efficient, provides reasonable binary sizes and static compilation. -Musl is simple, reliable and remove all glibc-specific functions. -Others can be added easily, which is useful for compatibility and comparisons, through [slotting](#slotting). - -**Bootable system and rootfs available.**
-A bootable system to install in virtual machines or bare metal, a rootFS to use BaguetteOS from any other OS, including non-Linux ones. - -**SysV-style init + CRUX rc**.
-The init could come from toybox or another minimalist project. -No systemd BS. - - -**Slotting.**
- -**Custom file system hierarchy.**
-Our FS is not FHS-compliant, partially because of the origin-based slotting. -There is a strict separation between core system and third party software. -- */usr/baguette* for core system programs -- */usr/bad* for unslottable software -- */usr/third-party* for other software - -**Crystal language for system tools.** *Syntax and productivity of Ruby, the speed of C*
-It is as simple to learn as a dynamic language, while at the same time being almost as fast as C. -Technically, Crystal is strongly typed which catches errors at compile-time, but with type inference so it is not cumbersome to use. -Applications are compiled in a simple (static) binary, easy to deploy. -There is a good documentation, we used it for long enough to tell. -Technical choices are reasonable and documented. -Finally, Crystal has a large library with all we need for our system components. - -- coreutils: busybox
-- */etc/rc/*: forked from CRUX
-- Building tools
- - LLVM + Clang - - tar -> bsdtar - - webhooks (libarchive), cpio -> bsdcpio (libarchive) - - autotools (for SySV init and libarchive) - - m4 - - make: gnu-make (since it is required for many projects) - - `crystal` since we use this language for our tools in the base system -- shells
- - sh -> zsh - ## Still in discussion For the simple users, we want to provide an unified web interface to manage the system and online services. @@ -249,19 +335,17 @@ So, we need a language for both administration dashboard and online services, he - seems to be a very young tech, with no real good language or documentation - Zig has wasm as a Tier 1 support, we should investigate -# Providing software: the right way +# Slotting: providing software the right way The usual way to provide software is to maintain a version of a software or a library, package it into a distribution, then provide it as *the* OS version of the software. In the long run, software and libraries change, which is no big deal since maintainers verify the consistency of the different versions provided by the OS. TODO -**Problem:** what happens when two programs need a different version of a library? - -**Problem:** what happens when two libraries are compatible but you want both on your system (see libressl and openssl)? - +**Problem:** what happens when two programs need a different version of a library?
+**Problem:** what happens when two libraries are compatible but you want both on your system (see libressl and openssl)?
**Problem:** what happens when you want to provide a **very** long term support for your users (see companies running decade-old databases)? -Baguette OS has a simple and safe way to let users and maintainers provide packages: `slotting`. +BaguetteOS has a simple and safe way to let users and maintainers provide packages: `slotting`. Official OS packages are installed under `/usr/baguette/`, for non-essential programs. Here, the slot is `baguette`. Any package outside the official ones are in another named slot. @@ -306,4 +390,35 @@ We currently aim at providing a rootfs with our tools, when we will have enough [service]: https://git.baguette.netlib.re/Baguette/service [package]: https://git.baguette.netlib.re/Baguette/package [packaging]: https://git.baguette.netlib.re/Baguette/packaging +[build.zsh]: https://git.baguette.netlib.re/Baguette/build.zsh + +[baguette-rc]: https://git.baguette.netlib.re/Baguette/recipes/src/branch/master/rc +[baguette-profile]: https://git.baguette.netlib.re/Baguette/recipes/src/branch/master/rc/profile + +[recipe-hello]: https://git.baguette.netlib.re/Baguette/recipes/src/branch/master/hello/recipe.spec +[recipe-dhcpcd]: https://git.baguette.netlib.re/Baguette/recipes/src/branch/master/dhcpcd/recipe.spec +[recipe-alsautils]: https://git.baguette.netlib.re/Baguette/recipes/src/branch/master/alsa-utils/recipe.spec + +[toybox]: http://www.landley.net/toybox/ + +[cruxinit]: https://crux.nu/gitweb/?p=ports/core.git;a=blob;f=rc/rc;h=26b8ca08d67208ceda4d4004c8333d362bcdc689;hb=HEAD +[ksh]: https://github.com/att/ast +[zsh]: https://www.zsh.org/ +[libarchive]: https://libarchive.org/ +[bsdcpio]: https://libarchive.org/ +[bsdtar]: https://libarchive.org/ +[m4]: https://www.gnu.org/software/m4/m4.html +[gmake]: https://www.gnu.org/software/make/ + +[proot]: https://man.openbsd.org/proot + +[openbsd]: https://openbsd.org/ +[pfsense]: https://www.pfsense.org/ +[alpine]: https://alpinelinux.org/ +[crux]: https://crux.nu/ +[inferno]: http://www.vitanuova.com/inferno/index.html +[plan9]: https://9p.io/plan9/index.html +[morpheus]: https://morpheus.2f30.org/ +[suckless]: https://suckless.org/ +[cat-v]: http://cat-v.org/ diff --git a/sass/custom.scss b/sass/custom.scss new file mode 100644 index 0000000..c618234 --- /dev/null +++ b/sass/custom.scss @@ -0,0 +1,26 @@ + +.banner { + margin-top: 0.5cm; + float: left; + height: 5cm; + // margin-bottom: -1cm; +} + +.meanie-img { + // margin-top: 5cm; + // float: left; + height: 7cm; + // margin-bottom: -1cm; +} + + +// less spacing in lists +li > p { + padding: -1px; + padding-top: -1px; + padding-bottom: -1px; + margin: -1px; + margin-top: -1px; + margin-bottom: -1px; +} + diff --git a/sass/style.scss b/sass/style.scss deleted file mode 100644 index e780d43..0000000 --- a/sass/style.scss +++ /dev/null @@ -1,72 +0,0 @@ -@import 'mobile'; -@import 'widgets'; - -.banner { - margin-top: 0.5cm; - float: left; - height: 5cm; - // margin-bottom: -1cm; -} - -.nav-menu { - font-weight: bold; - > a { margin: 0 1rem; } // Spacing entries - color: black; - padding: 0.5rem; // Leaving background space around entries -} - -header { - text-align: center; - font-weight: bold; - background-color: rgb(239, 239, 239); -} - -// less spacing in lists -li > p { - padding: -1px; - padding-top: -1px; - padding-bottom: -1px; - margin: -1px; - margin-top: -1px; - margin-bottom: -1px; -} - -article > div:first-child > h1, section > h1:first-child { - text-align: center; - font-size: 2.6em; -} - -article > div:first-child { - text-align: center; -} - -.read-more { - text-align: center; - display: block; - font-weight: bold; -} - -.pagination { - background-color: rgb(239, 239, 239); - margin-top: 1rem; - text-align: center; - > a { - font-weight: bolder; - font-variant: small-caps; - padding: 0 2rem; - } -} - -main { - margin: 1rem 0; -} - -.source { - background-color: rgb(239, 239, 239); - text-align: center; - font-weight: bold; -} - -.widget-bubble { - max-width: 30%; -} diff --git a/static/meanie-makefile.png b/static/meanie-makefile.png new file mode 100644 index 0000000..363ac10 Binary files /dev/null and b/static/meanie-makefile.png differ