1 # Archnosh is nosh for Archlinux
3 This repository provides the build files necessary to integrate the [nosh](https://jdebp.eu/Softwares/nosh/) system and service manager with Archlinux package management.
5 The packaging here closely follows the [Debian packaging](https://jdebp.eu/Softwares/nosh/debian-binary-packages.html) provided by the author of nosh.
11 This is a split-package PKGBUILD which will generate several packages, covering the toolset aswell as a service bundle collection which together can provide a complete working system.
15 The make dependencies are the following and require [AUR](https://wiki.archlinux.org/index.php/Aur) access to be set up:
17 * [pax](https://aur.archlinux.org/packages/pax/) (AUR)
18 * [redo-jdebp](https://aur.archlinux.org/packages/redo-jdebp/) (AUR)
19 * [libtinfo](https://aur.archlinux.org/packages/libtinfo/) (AUR)
20 * [xmlto](https://www.archlinux.org/packages/extra/x86_64/xmlto/) (Extra)
21 * [docbook-xml](https://www.archlinux.org/packages/extra/any/docbook-xml/) (Extra)
22 * [docbook-xsl](https://www.archlinux.org/packages/extra/any/docbook-xsl/) (Extra)
24 For package building in general, ensure the [base-devel](https://www.archlinux.org/groups/x86_64/base-devel/) package is installed.
26 #### Build the packages
28 Put the files in a directory and run:
32 You can then install the generated packages with:
34 $ pacman -U <package-name>
38 Read the [timorous admin's installation how-to](https://jdebp.eu/Softwares/nosh/timorous-admin-installation-how-to.html).
40 The following describes the two expected common setups.
42 #### nosh service manager only: nosh-run-via-systemd
44 The current default system and service manager for Archlinux is [systemd](https://wiki.archlinux.org/index.php/Systemd).
46 It is possible to run nosh as a service manager alongside systemd.
48 The following packages are necessary:
52 * nosh-service-management
53 * nosh-terminal-management
55 * nosh-run-via-systemd
56 * nosh-run-debian-server-base
58 Due to Archlinux's default preset *disable* policy (/usr/lib/systemd/system-preset/99-default.preset), you need to enable the following unit:
60 # systemctl enable service-manager.socket
62 Then you should enable one or both of:
64 * system-control-normal.service
65 * service-manager-svscan.path
67 `system-control-normal.service` uses nosh targets to bring up enabled services. Simply run `system-control enable <service>` and `systemctl disable <service>` for its equivalent in order to switch management of the service over to nosh.
69 `service-manager-svscan.path` will scan and bring up any service bundle you place in the /service directory (which you will have to create), effectively enabling it. This is the more typical daemontools [approach](https://cr.yp.to/daemontools/faq/create.html#why).
71 It's probably simpler to stick to just one of these methods.
73 Creating preset files for these units will also ensure their enabled/disabled status in case of package upgrades.
75 #### nosh system and service manager: nosh-run-system-manager
77 For a fully nosh-managed system i.e. nosh running as the init process and service manager, install the following packages:
82 * nosh-service-management
83 * nosh-terminal-management
85 * nosh-run-system-manager
88 * nosh-run-debian-server-base
89 * nosh-run-local-syslog
94 The above installation assumes udev is the device manager, which requires the [systemd](https://www.archlinux.org/packages/core/x86_64/systemd/) package to be installed on Archlinux.
96 In order to allow this, archnosh packages do not conflict, for the most part, with the systemd packages. Alternative device manager run packages are provided (vdev, busybox-mdev, suckless-mdev) but you will have to account for Archlinux systemd/udev integration with various other system packages.
98 ##### virtual terminals
100 Rather than kernel virtual terminals, [user-space virtual terminals](https://jdebp.eu/Softwares/nosh/user-vt-screenshots.html) may be used by installing `nosh-run-user-vt`.
102 The `nosh-execline-shims` package is necessary if you do not have [execline](https://skarnet.org/software/execline/) available.
106 `nosh-run-debian-server-base` has currently not been renamed...
108 It provides essential presets for booting your system. A more featureful `nosh-run-debian-desktop-base` is also available.
112 Various shim packages exist to provide the following:
114 1. Commands from other service or system managers that will invoke the corresponding nosh management actions, e.g. nosh-debian-shims, nosh-systemd-shims, nosh-upstart-shims...
116 2. Utilities which may be provided by other packages, e.g. nosh-execline-shims, nosh-ucspi-tcp-shims, nosh-kbd-shims...
118 ##### troubleshooting
120 https://jdebp.eu/Softwares/nosh/guide/troubleshooting.html
122 The link above may come in useful.
124 ## Some nosh guidelines
126 The online [nosh guide](https://jdebp.eu/Softwares/nosh/guide/), also available in the `nosh-guide` package, and command [manpages](https://jdebp.eu/Softwares/nosh/guide/commands.html) provide comprehensive documentation.
128 The nosh toolset follows general [daemontools design](https://jdebp.eu/FGA/daemontools-family.html) which includes:
130 * using the filesystem as database and API: the system can be inspected and modified using standard filesystem commands
131 * logging as an ordinary --"first-class citizen"-- service
132 * chain-loading of simple utilities to build a controlled final running state
133 * composability: utilities from other toolsets in this family can be used in conjunction with nosh
135 To these features nosh [adds](https://jdebp.eu/Softwares/nosh/guide/new-interfaces.html):
137 * explicit separation of *service* and *system* management
138 * terminal management
139 * service ordering and interdependency through "service bundles" which allows for system "targets" similar to systemd
142 For a general presentation you may read the following:
144 https://jdebp.eu/Softwares/nosh/guide/introduction.html
148 A standard bundle will look something like this:
150 /var/sv $ tree kamailio
153 │ ├── basic -> /etc/service-bundles/targets/basic
156 │ └── shutdown -> /etc/service-bundles/targets/shutdown
158 ├── log -> ../cyclog@kamailio
167 │ └── shutdown -> /etc/service-bundles/targets/shutdown
174 │ └── server -> /etc/service-bundles/targets/server
176 └── basic -> /etc/service-bundles/targets/basic
178 The `before` and `after` directories allow for linking to other service bundles to set *ordering constraints*.
180 The `conflicts`, `required-by`, `stopped-by`, `wanted-by` and `wants` directories allow for linking to other service bundles to set *dependency constraints*.
182 The `log` directory points to a logging service.
184 The `service` directory contains the scripts used to manage the service. `service/env` can be used to store configuration information.
186 The `supervise` directory contains the control/status API files.
190 [system-control](https://jdebp.eu/Softwares/nosh/guide/system-control.html) is the workhorse command for the system.
192 It provides general service management (start/stop, enable/disable etc.) aswell as system management (reboot, poweroff etc.) and various other specialised commands for e.g. converting systemd-style unit files to service bundles.
194 ### Converting systemd unit files
196 `system-control convert-systemd-units <unit-file>` supports conversion for [various types](https://jdebp.eu/Softwares/nosh/guide/converting-systemd-units.html) of systemd unit files to service bundles.
198 It also understands extended syntax to express service-bundle specific functionality in a systemd-like unit file, which can be used for easy distribution for example.
200 In other words, one can benefit from existing systemd unit files through automatic conversion in many cases.
204 These packaging configuration files are distributed under the public domain [Unlicense](https://unlicense.org/), see the UNLICENSE file provided.
206 The nosh software, however, is distributed under BSD/BSD-compatible licensing.