Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--CHANGELOG.rst2
-rw-r--r--Makefile11
-rw-r--r--README.rst4
-rw-r--r--man/mkarchiso.1.rst60
-rw-r--r--man/variables.rst5
7 files changed, 48 insertions, 37 deletions
diff --git a/.gitignore b/.gitignore
index 74a0a52..05ae886 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ out/
*.pem
user-data
meta-data
+man/version.rst
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d2f601d..0e7f709 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,7 +25,7 @@ check:
metrics: output/metrics.txt
before_script:
- pacman -Sy --needed --noconfirm archlinux-keyring
- - pacman -Syu --needed --noconfirm arch-install-scripts bash dosfstools e2fsprogs erofs-utils gnupg grub jq libarchive libisoburn mtools openssl squashfs-tools zsync
+ - pacman -Syu --needed --noconfirm arch-install-scripts bash dosfstools e2fsprogs erofs-utils gnupg grub jq libarchive libisoburn mtools openssl python-docutils squashfs-tools zsync
script:
- ./.gitlab/ci/build_archiso.sh ${BUILD_SCRIPT_ARGS}
stage: build
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index d524190..148a9df 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -8,6 +8,8 @@ Changelog
Added
-----
+- Add a man page for ``mkarchiso``.
+
Changed
-------
diff --git a/Makefile b/Makefile
index c4ceb2f..1a6bf6f 100644
--- a/Makefile
+++ b/Makefile
@@ -4,11 +4,13 @@
PREFIX ?= /usr/local
BIN_DIR=$(DESTDIR)$(PREFIX)/bin
DOC_DIR=$(DESTDIR)$(PREFIX)/share/doc/archiso
+MAN_DIR?=$(DESTDIR)$(PREFIX)/share/man
PROFILE_DIR=$(DESTDIR)$(PREFIX)/share/archiso
DOC_FILES=$(wildcard docs/*) $(wildcard *.rst)
SCRIPT_FILES=$(wildcard archiso/*) $(wildcard scripts/*.sh) $(wildcard .gitlab/ci/*.sh) \
$(wildcard configs/*/profiledef.sh) $(wildcard configs/*/airootfs/usr/local/bin/*)
+VERSION?=$(shell git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g;s/\.r0\.g.*//')
all:
@@ -17,7 +19,7 @@ check: shellcheck
shellcheck:
shellcheck -s bash $(SCRIPT_FILES)
-install: install-scripts install-profiles install-doc
+install: install-scripts install-profiles install-doc install-man
install-scripts:
install -vDm 755 archiso/mkarchiso -t "$(BIN_DIR)/"
@@ -30,4 +32,9 @@ install-profiles:
install-doc:
install -vDm 644 $(DOC_FILES) -t $(DOC_DIR)
-.PHONY: check install install-doc install-profiles install-scripts shellcheck
+install-man:
+ @printf '.. |version| replace:: %s\n' '$(VERSION)' > man/version.rst
+ install -d -m 755 $(MAN_DIR)/man1
+ rst2man man/mkarchiso.1.rst $(MAN_DIR)/man1/mkarchiso.1
+
+.PHONY: check install install-doc install-man install-profiles install-scripts shellcheck
diff --git a/README.rst b/README.rst
index 5a544c5..fff961d 100644
--- a/README.rst
+++ b/README.rst
@@ -36,6 +36,10 @@ For linting the shell scripts the following package is required:
* shellcheck
+For generating the man pages:
+
+* python-docutils
+
Profiles
========
diff --git a/man/mkarchiso.1.rst b/man/mkarchiso.1.rst
index 22d4c1b..c54d2bb 100644
--- a/man/mkarchiso.1.rst
+++ b/man/mkarchiso.1.rst
@@ -12,46 +12,42 @@ Arch Linux ISO generator
Synopsis
========
-mkarchiso *[options]* *profile_directory*
+**mkarchiso** [options] *profile_directory*
Description
===========
-mkarchiso create an ISO, netboot artifacts and a bootstrap tarball and optionally signs them.
+**mkarchiso** creates an ISO, netboot artifacts and a bootstrap tarball and optionally signs them.
Options
=======
--A application Set an application name for the ISO.
- Default: |iso_application|.
--C file pacman configuration file.
- Default: |pacman_conf|.
--D install_dir Set an install_dir. All files will be located here.
- Default: |install_dir|.
- NOTE: Max 8 characters, use only *a-z0-9*.
--L label Set the ISO volume label.
- Default: |iso_label|.
--P publisher Set the ISO publisher.
- Default: |iso_publisher|.
--c cert_and_key Provide certificates for codesigning of netboot artifacts as well as the rootfs artifact.
- Multiple files are provided as quoted, space delimited list.
- The first file is considered as the signing certificate,
- the second as the key and the third as the optional certificate authority.
--g gpg_key Set the PGP key ID to be used for signing the rootfs image.
- Passed to gpg as the value for **--default-key**.
--G mbox Set the PGP signer (must include an email address).
- Passed to gpg as the value for **--sender**.
--h Help message.
--m mode Build mode(s) to use (valid modes are: *bootstrap*, *iso* and *netboot*).
- Multiple build modes are provided as quoted, space delimited list.
--o out_dir Set the output directory.
- Default: |out_dir|.
--p packages Package(s) to install.
- Multiple packages are provided as quoted, space delimited list.
--r Delete the working directory at the end.
--v Enable verbose output.
--w work_dir Set the working directory.
- Default: |work_dir|.
+-A application | Set an application name for the ISO.
+ | Default: |iso_application|.
+-C file | pacman configuration file.
+ | Default: |pacman_conf|.
+-D install_dir | Set an install_dir. All files will be located here.
+ | Default: |install_dir|.
+ | NOTE: Max 8 characters, use only *a-z0-9*.
+-L label | Set the ISO volume label.
+ | Default: |iso_label|.
+-P publisher | Set the ISO publisher.
+ | Default: |iso_publisher|.
+-c cert_and_key | Provide certificates for codesigning of netboot artifacts as well as the rootfs artifact.
+ | Multiple files are provided as quoted, space delimited list.
+ | The first file is considered as the signing certificate, the second as the key and the third as the optional certificate authority.
+-g gpg_key | Set the PGP key ID to be used for signing the rootfs image. Passed to gpg as the value for **--default-key**.
+-G mbox | Set the PGP signer (must include an email address). Passed to gpg as the value for **--sender**.
+-h | Help message.
+-m mode | Build mode(s) to use (valid modes are: *bootstrap*, *iso* and *netboot*). Multiple build modes are provided as quoted, space delimited list.
+-o out_dir | Set the output directory.
+ | Default: |out_dir|.
+-p packages | Package(s) to install.
+ | Multiple packages are provided as quoted, space delimited list.
+-r | Delete the working directory at the end.
+-v | Enable verbose output.
+-w work_dir | Set the working directory.
+ | Default: |work_dir|.
Examples
========
diff --git a/man/variables.rst b/man/variables.rst
index 084c94d..152f154 100644
--- a/man/variables.rst
+++ b/man/variables.rst
@@ -1,9 +1,10 @@
-.. |iso_application| replace:: *mkarchiso iso*
+.. |iso_application| replace:: '*mkarchiso iso*'
.. |pacman_conf| replace:: */etc/pacman.conf*
.. |install_dir| replace:: *arch*
.. |iso_label| replace:: *MKARCHISO*
.. |iso_publisher| replace:: *mkarchiso*
.. |out_dir| replace:: *./out*
.. |work_dir| replace:: *./work*
-.. |version| replace:: insert.version.here
.. |profile_dir| replace:: /usr/share/archiso
+
+.. include:: version.rst