doc/*: add man pages

This commit is contained in:
fluorescent_haze 2022-05-06 11:59:47 +00:00 committed by illiliti
parent 2e4a13cc9d
commit 1314a27388
5 changed files with 460 additions and 1 deletions

View File

@ -2,22 +2,33 @@
PREFIX = /usr/local
BINDIR = ${PREFIX}/bin
MANDIR = ${PREFIX}/share/man
LIBDIR = ${PREFIX}/lib
install:
mkdir -p ${DESTDIR}${BINDIR}
mkdir -p ${DESTDIR}${LIBDIR}/tinyramfs
mkdir -p ${DESTDIR}${MANDIR}/man5
mkdir -p ${DESTDIR}${MANDIR}/man8
cp -f tinyramfs ${DESTDIR}${BINDIR}/
cp -f lib/init.sh ${DESTDIR}${LIBDIR}/tinyramfs/
cp -f lib/helper.sh ${DESTDIR}${LIBDIR}/tinyramfs/
cp -f lib/common.sh ${DESTDIR}${LIBDIR}/tinyramfs/
cp -f doc/tinyramfs.5 ${DESTDIR}${MANDIR}/man5/
cp -f doc/tinyramfs.8 ${DESTDIR}${MANDIR}/man8/
cp -R hook ${DESTDIR}${LIBDIR}/tinyramfs/hook.d
uninstall:
rm -f ${DESTDIR}${BINDIR}/tinyramfs
rm -f ${DESTDIR}${MANDIR}/man5/tinyramfs.5
rm -f ${DESTDIR}${MANDIR}/man8/tinyramfs.8
rm -rf ${DESTDIR}${LIBDIR}/tinyramfs
check:
(cd test && ${MAKE})
.PHONY: install uninstall check
doc:
scdoc < doc/tinyramfs.5.scd > doc/tinyramfs.5
scdoc < doc/tinyramfs.8.scd > doc/tinyramfs.8
.PHONY: install uninstall check doc

176
doc/tinyramfs.5 Normal file
View File

@ -0,0 +1,176 @@
.\" Generated by scdoc 1.11.2
.\" Complete documentation for this program is not available as a GNU info page
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.nh
.ad l
.\" Begin generated content:
.TH "tinyramfs" "5" "2022-05-10" "tinyramfs" "2022-05-09"
.P
.SH NAME
.P
tinyramfs - configuration file
.P
.SH DESCRIPTION
.P
A tinyramfs configuration file is written in POSIX sh.\& Configuration is done
via variable asignment (eg.\& \fBoption=value\fR).\& Special characters and whitespace
must be quoted or escaped, more info: \fBsh\fR(1).\& By default tinyramfs looks to
\fB/etc/tinyramfs/config\fR for a configuration file.\&
.P
.SH OPTIONS
.P
Option marked with \fB(bool)\fR can hold a value of true or false.\& False if the
variable is unset or empty, true otherwise.\&
.P
Some options only apply to certain hooks and have been categorized accordingly.\&
.P
Options which expect a device as a value can also refer to the device via
\fBUUID\fR, \fBLABEL\fR, and \fBPARTUUID\fR (eg.\& LABEL=<label>).\& This requires a blkid
utility which supports that identifier.\&
.P
root
.P
.RS 4
The device your root filesystem is located on.\&
.P
.RE
hooks
.P
.RS 4
A comma separated list of hooks to include in the initramfs.\& Hooks can
be found in /lib/tinyramfs/hook.\&d/.\&
.P
.RE
monolith
.P
.RS 4
(bool) Instructs tinyramfs whether or not to include kernel modules in
the initramfs.\&
.P
.RE
compress
.P
.RS 4
The utility to use for compressing the initramfs.\& The option accepts
arbitrary commands (eg.\& '\&gzip -9'\&).\& Use '\&cat'\& for an uncompressed
initramfs.\&
.P
.RE
hostonly
.P
.RS 4
(bool) Whether or not to only copy modules specific to your system.\&
.P
.RE
root_type
.P
.RS 4
The filesystem you'\&re using for your root device (eg.\& ext4).\&
.P
.RE
.SS KEYMAP
.P
keymap_path
.P
.RS 4
Path to your keymap.\&
.P
.RE
.SS LUKS
.P
luks_discard
.P
.RS 4
Allow the use of discard (TRIM) requests for your luks device.\&
.P
\fBWARNING\fR: This option may have a negative security impact.\& For more info
read \fBcryptsetup\fR(8).\&
.P
.RE
luks_header
.P
.RS 4
Path to your LUKS header.\&
.P
.RE
luks_root
.P
.RS 4
The device your LUKS volume is located on.\&
.P
.RE
luks_name
.P
.RS 4
The name to map your LUKS device to.\&
.P
.RE
luks_key
.P
.RS 4
Path to your LUKS keyfile.\&
.P
.RE
.SS LVM
.P
lvm_config
.P
.RS 4
Path to your LVM configuration file.\&
.P
.RE
lvm_discard
.P
.RS 4
Allow the use of discard (TRIM) requests for your LVM device.\&
.P
.RE
lvm_group
.P
.RS 4
The name of your LVM volume group.\&
.P
.RE
lvm_name
.P
.RS 4
The name of your LVM logical volume.\&
.P
.RE
lvm_tag
.P
.RS 4
The tag of your LVM logical volume.\&
.P
.RE
.SS ZFS
.P
zfs_key
.P
.RS 4
Path to your ZFS keyfile.\&
.P
.RE
zfs_root
.P
.RS 4
The device your ZFS volume is located on.\&
.P
.RE
.SH FILES
.P
/lib/tinyramfs/hook.\&d/
.RS 4
tinyramfs hooks
.P
.RE
.SH SEE ALSO
.P
\fBtinyramfs\fR(8)
.P
.SH AUTHORS
.P
tinyramfs by illiliti \fBhttps://github.\&com/illiliti\fR
.br
man page by fluorescent_haze \fBhttps://github.\&com/fluorescent-haze\fR

128
doc/tinyramfs.5.scd Normal file
View File

@ -0,0 +1,128 @@
tinyramfs(5) "tinyramfs" "2022-05-09"
# NAME
tinyramfs - configuration file
# DESCRIPTION
A tinyramfs configuration file is written in POSIX sh. Configuration is done
via variable asignment (eg. *option=value*). Special characters and whitespace
must be quoted or escaped, more info: *sh*(1). By default tinyramfs looks to
*/etc/tinyramfs/config* for a configuration file.
# OPTIONS
Option marked with *(bool)* can hold a value of true or false. False if the
variable is unset or empty, true otherwise.
Some options only apply to certain hooks and have been categorized accordingly.
Options which expect a device as a value can also refer to the device via
*UUID*, *LABEL*, and *PARTUUID* (eg. LABEL=<label>). This requires a blkid
utility which supports that identifier.
root
The device your root filesystem is located on.
hooks
A comma separated list of hooks to include in the initramfs. Hooks can
be found in /lib/tinyramfs/hook.d/.
monolith
(bool) Instructs tinyramfs whether or not to include kernel modules in
the initramfs.
compress
The utility to use for compressing the initramfs. The option accepts
arbitrary commands (eg. 'gzip -9'). Use 'cat' for an uncompressed
initramfs.
hostonly
(bool) Whether or not to only copy modules specific to your system.
root_type
The filesystem you're using for your root device (eg. ext4).
## KEYMAP
keymap_path
Path to your keymap.
## LUKS
luks_discard
Allow the use of discard (TRIM) requests for your luks device.
*WARNING*: This option may have a negative security impact. For more info
read *cryptsetup*(8).
luks_header
Path to your LUKS header.
luks_root
The device your LUKS volume is located on.
luks_name
The name to map your LUKS device to.
luks_key
Path to your LUKS keyfile.
## LVM
lvm_config
Path to your LVM configuration file.
lvm_discard
Allow the use of discard (TRIM) requests for your LVM device.
lvm_group
The name of your LVM volume group.
lvm_name
The name of your LVM logical volume.
lvm_tag
The tag of your LVM logical volume.
## ZFS
zfs_key
Path to your ZFS keyfile.
zfs_root
The device your ZFS volume is located on.
# FILES
/lib/tinyramfs/hook.d/
tinyramfs hooks
# SEE ALSO
*tinyramfs*(8)
# AUTHORS
tinyramfs by illiliti *https://github.com/illiliti*++
man page by fluorescent_haze *https://github.com/fluorescent-haze*

84
doc/tinyramfs.8 Normal file
View File

@ -0,0 +1,84 @@
.\" Generated by scdoc 1.11.2
.\" Complete documentation for this program is not available as a GNU info page
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.nh
.ad l
.\" Begin generated content:
.TH "tinyramfs" "8" "2022-05-10" "tinyramfs" "2022-05-09"
.P
.SH NAME
.P
tinyramfs - create an initramfs
.P
.SH SYNOPSIS
.P
\fBtinyramfs\fR [\fB-dfhl\fR] [\fB-c\fR file] [\fB-k\fR kern] [\fB-m\fR path] <output>
.P
.SH DESCRIPTION
.P
The tinyramfs utility generates an initramfs image for loading kernel modules,
unlocking encrypted drives, mounting needed filesystems, etc.\&
.P
.SH OPTIONS
.P
\fB-c\fR <file>
.P
.RS 4
Use <file> as configuration, instead of /etc/tinyramfs/config.\&
.P
.RE
\fB-d\fR
.P
.RS 4
Enable debug mode; print every command tinyramfs executes to standard
error.\&
.P
.RE
\fB-f\fR
.P
.RS 4
Overwrite the output file if it already exists.\&
.P
.RE
\fB-h\fR
.P
.RS 4
Show a summary of options accepted by tinyramfs.\&
.P
.RE
\fB-k\fR <kern>
.P
.RS 4
Set the kernel version to <kern>.\& This way tinyramfs knows which kernel
modules to use.\&
.P
.RE
\fB-l\fR
.P
.RS 4
Use helper scripts in $PWD/lib/, instead of /lib/tinyramfs/.\&
.P
.RE
\fB-m\fR <path>
.P
.RS 4
Look for kernel modules in <path>, instead of /lib/modules/.\&
.P
.RE
.SH FILES
.P
/lib/tinyramfs/hook.\&d/
.RS 4
tinyramfs hooks
.P
.RE
.SH SEE ALSO
.P
\fBtinyramfs\fR(8)
.P
.SH AUTHORS
.P
tinyramfs by illiliti \fBhttps://github.\&com/illiliti\fR
.br
man page by fluorescent_haze \fBhttps://github.\&com/fluorescent-haze\fR

60
doc/tinyramfs.8.scd Normal file
View File

@ -0,0 +1,60 @@
tinyramfs(8) "tinyramfs" "2022-05-09"
# NAME
tinyramfs - create an initramfs
# SYNOPSIS
*tinyramfs* [*-dfhl*] [*-c* file] [*-k* kern] [*-m* path] <output>
# DESCRIPTION
The tinyramfs utility generates an initramfs image for loading kernel modules,
unlocking encrypted drives, mounting needed filesystems, etc.
# OPTIONS
*-c* <file>
Use <file> as configuration, instead of /etc/tinyramfs/config.
*-d*
Enable debug mode; print every command tinyramfs executes to standard
error.
*-f*
Overwrite the output file if it already exists.
*-h*
Show a summary of options accepted by tinyramfs.
*-k* <kern>
Set the kernel version to <kern>. This way tinyramfs knows which kernel
modules to use.
*-l*
Use helper scripts in $PWD/lib/, instead of /lib/tinyramfs/.
*-m* <path>
Look for kernel modules in <path>, instead of /lib/modules/.
# FILES
/lib/tinyramfs/hook.d/
tinyramfs hooks
# SEE ALSO
*tinyramfs*(8)
# AUTHORS
tinyramfs by illiliti *https://github.com/illiliti*++
man page by fluorescent_haze *https://github.com/fluorescent-haze*