descriptionarchnosh framagit.org mirror
repository URLhttp://framagit.org/taca/archnosh.git
ownertaca@kadisius.eu
last changeThu, 20 Apr 2017 19:26:38 +0000 (20 21:26 +0200)
last refreshSun, 25 Jun 2017 01:45:40 +0000 (25 03:45 +0200)
content tags
add:
README.md

Archnosh is nosh for Archlinux

This repository provides the build files necessary to integrate the nosh system and service manager with Archlinux package management.

The packaging here closely follows the Debian packaging provided by the author of nosh.

How do I use it?

With caution! Installing some of the nosh packages provided here can profoundly change the way your system bootstraps and runs services.

Furthermore, the packages have so far only been tested on virtual machines with bare minimum installs of early 2017 Archlinux releases, where they do work for the most part but tailoring to your system will be necessary.

N.B.: Automatic network configuration is not currently implemented for Archlinux, network interfaces may have to be brought up and configured manually.

Caveat emptor.

The packages

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.

Dependencies

The make dependencies are the following and require AUR access to be set up:

For package building in general, ensure the base-devel package is installed.

Build the packages

Put the files in a directory and run:

$ makepkg

You can then install the generated packages with:

$ pacman -U <package-name>

Running nosh

Read the timorous admin's installation how-to.

The following describes the two expected common setups. Both assume you are running a default systemd-managed install.

nosh service manager only: nosh-run-via-systemd

The current default system and service manager for Archlinux is systemd.

It is possible to run nosh as a service manager alongside systemd.

The following packages are necessary:

Due to Archlinux's default preset disable policy (/usr/lib/systemd/system-preset/99-default.preset), you need to enable the following unit:

# systemctl enable service-manager.socket

Then you should enable one or both of:

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.

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.

It's probably simpler to stick to just one of these methods.

Creating preset files for these units will also ensure their enabled/disabled status in case of package upgrades.

nosh system and service manager: nosh-run-system-manager

For a fully nosh-managed system i.e. nosh running as the init process and service manager, install the following packages:

udev

The above installation assumes udev is the device manager, which is provided by the systemd package on Archlinux.

The easiest method is to simply use the binaries and configuration files provided by this package to run udev. nosh-run-udev will symlink systemd-udevd to /usr/bin/udevd and everything should work transparently.

Alternatively you may wish to use the eudev implementation rather than keeping the systemd package for udev functionality.

We will detail the installation of eudev, libeudev, eudev-systemd and libeudev-systemd (available from the AUR) which should provide a drop-in replacement for systemd/udev.

  1. Install libeudev

    This conflicts with the libsystemd package, you should remove it but it will almost certainly be a dependency for other packages on your system so run:

    # pacman -dd -S libeudev
    

    The -dd (or --nodeps) repeated option skips dependency checking. You will be providing replacements for these dependencies.

    It might also fail to install due to the following pre-existing files: /usr/include/libudev.h and /usr/lib/pkgconfig/libudev.pc. Delete these manually.

  2. Install libeudev-systemd

    This will provide the libsystemd.so libraries.

  3. Install eudev

    This conflicts with the systemd package and, again, will doubtless bring up many dependency warnings so run:

    # pacman -dd -S eudev
    
  4. Install eudev-systemd

    This will provide some shim systemd binaries and libraries.

From there you should have a working udev and some systemd shims which should allow installing most packages without too much trouble.

Other device manager run-packages are provided: vdev, busybox-mdev and suckless-mdev. You will probably need to account for Archlinux's rather heavy systemd/udev integration with various other system packages in order to use them.

virtual terminals

Rather than kernel virtual terminals, user-space virtual terminals may be used by installing nosh-run-user-vt.

The nosh-execline-shims package is necessary if you do not have execline available.

base

nosh-run-debian-server-base has currently not been renamed...

It provides essential presets for booting your system. A more featureful nosh-run-debian-desktop-base is also available.

Non-root Xorg

Since we are not using systemd's logind, starting X as an unpriviledged user requires adding that user to the "input" and "video" groups.

See https://wiki.gentoo.org/wiki/Non_root_Xorg for further details.

shims

Various shim packages exist to provide the following:

  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...

  2. Utilities which may be provided by other packages, e.g. nosh-execline-shims, nosh-ucspi-tcp-shims, nosh-kbd-shims...

troubleshooting

https://jdebp.eu/Softwares/nosh/guide/troubleshooting.html

The link above may come in useful.

Some nosh guidelines

The online nosh guide, also available in the nosh-guide package, and command manpages provide comprehensive documentation.

The nosh toolset follows general daemontools design which includes:

To these features nosh adds:

For a general presentation you may read the following:

https://jdebp.eu/Softwares/nosh/guide/introduction.html

Service bundles

A standard bundle will look something like this:

/var/sv $ tree kamailio
kamailio
├── after
│   ├── basic -> /etc/service-bundles/targets/basic
│   └── log -> ../log
├── before
│   └── shutdown -> /etc/service-bundles/targets/shutdown
├── conflicts
├── log -> ../cyclog@kamailio
├── required-by
├── service
│   ├── env
│   ├── restart
│   ├── run
│   ├── start
│   └── stop
├── stopped-by
│   └── shutdown -> /etc/service-bundles/targets/shutdown
├── supervise
│   ├── control
│   ├── lock
│   ├── ok
│   └── status
├── wanted-by
│   └── server -> /etc/service-bundles/targets/server
└── wants
    └── basic -> /etc/service-bundles/targets/basic

The before and after directories allow for linking to other service bundles to set ordering constraints.

The conflicts, required-by, stopped-by, wanted-by and wants directories allow for linking to other service bundles to set dependency constraints.

The log directory points to a logging service.

The service directory contains the scripts used to run the service. service/env can be used to store configuration information.

The supervise directory contains the control/status API files.

system-control

system-control is the workhorse command for the system.

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.

Converting systemd unit files

system-control convert-systemd-units <unit-file> supports conversion for various types of systemd unit files to service bundles.

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.

In other words, one can benefit from existing systemd unit files through automatic conversion in many cases.

Repositories

This repository is publicly available at the following locations:

  1. https://framagit.org/taca/archnosh
  2. https://repo.or.cz/archnosh.git
  3. https://github.com/tacatac/archnosh

License

These packaging configuration files are distributed under the public domain Unlicense, see the UNLICENSE file provided.

The nosh software, however, is distributed under BSD/BSD-compatible licensing.

shortlog
2017-04-20 tacaDependency information updatedmasterv1.33-3
2017-04-17 tacaChanged package release version -> 2v1.33-2
2017-04-17 tacaFixed maintenance.sh for nosh-run-system-manager.instal...
2017-04-10 tacaUpdated checksums to actual frozen 1.33v1.33-1
2017-04-08 tacaUpdated checksums for final 1.33
2017-04-08 tacaMerge documentation branch
2017-04-08 tacaReintroduced systemd udev symlinking.
2017-04-08 tacaSystemd udev can now be used.
2017-04-06 tacaUpdated checksums
2017-04-01 tacaUpdated checksums.
2017-04-01 tacaEudev package updated.
2017-03-31 tacaNormalised patching and updated checksums
2017-03-31 tacaAdded patch for dbus service
2017-03-31 tacaAdded availability information
2017-03-29 tacaRemoved nosh-run-udev.post_install.extra
2017-03-29 tacaDocumentation changes included.
...
tags
2 months ago v1.33-3
2 months ago v1.33-2
2 months ago v1.33-1
heads
2 months ago master