Ragnarok Development Notes
==========================

[2023-05-22]

* Work on the installer has begun. Ragnarok will have two installers: a
plain-text version, which will be the default, and a TUI version using
whiptail(1). It will also include standalone tools, mkconf[1] and mkdisk[2],
which are called by the installers and can be used on their own.

	* mkconf can be used to create an 'install.conf' file which will
	allow automatic/non-interactive installs.

	* mkdisk, with the -c option can create a 'disk.conf' file,
	again for the purpose of automatic installs, whereas using
	the -m option will partition the disk and mount the partitions
	automatically, using Ragnarok's defaults. This will also be
	useful for chroot installs (a.k.a. the classic Arch way, as
	some would say). This will allow chroot installs to use the
	default Ragnarok partitioning style and mount options without
	the need to type everything by hand.

* The install.conf and disk.conf files are also used by the installers
to set everything up properly. Copying user responses to config files
and using these files to fetch the right values is a surefire way of
making absolutely sure that everything is properly set.

* Now, the focus is on building the iso before finishing the installer,
because there isn't much of a point in having an installer if there's
no bootable Ragnarok image available. 

Honestly, creating an iso building infrastructure from scratch to replace
live-build may be worth the hassle. It doesn't seem like live-build supports
using a pre-made rootfs/chroot rather than debootstrap to build an iso, and
if it does, it's nowhere to be found in the docs. Considering Ragnarok
already creates pre-built chroots, everything that has to be done in order
to build an iso by using live-build could be simplified if starting from this
chroot tarball was possible. This iso building infrastructure could also use
mmdebstrap rather than debootstrap to create live images if starting without
a pre-made chroot.

Luckily, creating a live iso from scratch is pretty trivial. Ensuring it boots
on as many hardware setup as a live-build created image, on the other hand,
might not. So, tests will be made and we shall see how it goes. I will not
hesitate just going back to using live-build if creating Ragnarok's own
infrastructure proves too much of a hassle.

[2023-05-08]

* Shell aliases for mandoc are now handled through a '~/.aliases' file
instead of ~/.profile. The file is sourced via both ksh and bash's rc
files. This is the best solution.

* The ragnarok-files package now provides the /etc/logrotate.d/nftables
config which will rotate nftable's log to avoid it getting too big.

* New init script added: /etc/init.d/rm-machineid[3], which runs during
the halt or reboot phases only. This script deletes /var/lib/dbus/machine-id
and /etc/machine-id (if it exists) at shutdown time, prompting dbus to create
a new one at boot. This offers many advantages. For context and more details,
see the doc[4].

* Suckless' st was properly forked and named rt[5] to avoid having duplicate
binaries on a user's system (for those who wish to use their own st builds),
and because it adds some patches, so this is not standard st. Ragnarok's rt
is explicitly made to provide a minimal terminal for tmux, so it does not
have many features. The only extra features compared to st are:

	* The alpha patch is applied.
	* Config can be done through .Xresources. A slightly modified st-xresources
	patch was used for that. The modifications made are related to color values
	which were wrong in the original patch (probably due to being made for a
	prior version of st).

* Speaking of forking st, its manual page was rewritten using the mdoc[6] format.
Ragnarok's policy is that all manual page created or modified by the project
should use this format, without exception.

[1] https://raw.githubusercontent.com/RagnarokOS/src/master/etc/skel/.aliases
[2] https://raw.githubusercontent.com/RagnarokOS/src/master/etc/logrotate.d/nftables
[3] https://raw.githubusercontent.com/RagnarokOS/src/master/etc/init.d/rm-machineid
[4] https://ragnarokos.github.io/docs/machine-id.html
[5] https://github.com/RagnarokOS/rt
[6] https://mandoc.bsd.lv/man/mdoc.7.html