diff --git a/wiki/.build.yml b/wiki/.build.yml
new file mode 100644
index 0000000..d56f99e
--- /dev/null
+++ b/wiki/.build.yml
@@ -0,0 +1,19 @@
+image: alpine/edge
+oauth: pages.sr.ht/PAGES:RW
+packages:
+- hut
+- m4
+tasks:
+- build: |
+ cd wiki
+ make
+- package: |
+ cd wiki
+ tar cvz \
+ --exclude .git \
+ --exclude '*.m4' \
+ --exclude '*.mk' \
+ . >../site.tar.gz
+ ls -l ../site.tar.gz
+- upload: |
+ hut pages publish -d be.murderu.us site.tar.gz
diff --git a/wiki/.gitignore b/wiki/.gitignore
new file mode 100644
index 0000000..e5af9ee
--- /dev/null
+++ b/wiki/.gitignore
@@ -0,0 +1 @@
+/unix/index.html
diff --git a/wiki/LICENSE b/wiki/LICENSE
new file mode 100644
index 0000000..68a49da
--- /dev/null
+++ b/wiki/LICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to
+A game, The sole object of which is to not remember that you are playing it. As soon as you remember that it exists, you have lost and must start again. +
') + ++Played in the halls of schools and on the walls of BBSes, the Game is an early cognitovirus that has drawn ire for its unwinnable nature; +nobody who knows of the Game has won, yet nobody who's won has ever known of the Game. +
+ +include(`../tail.m4')dnl diff --git a/wiki/index.html b/wiki/index.html new file mode 100644 index 0000000..254fcf2 --- /dev/null +++ b/wiki/index.html @@ -0,0 +1,31 @@ + + + + + + + + + + ++The contents of this site are generated by the git repository at https://git.sr.ht/~trinity/wiki. +
+ + diff --git a/wiki/linux/a.out.m4 b/wiki/linux/a.out.m4 new file mode 100644 index 0000000..732694b --- /dev/null +++ b/wiki/linux/a.out.m4 @@ -0,0 +1,4 @@ +_header(`a.out') +_bibliography(` +_bentr(`_link(`Re: [PATCH] x86: Remove a.out support', `https://lwn.net/ml/linux-kernel/202203161523.857B469@keescook/')') +') diff --git a/wiki/linux/acpi.m4 b/wiki/linux/acpi.m4 new file mode 100644 index 0000000..8425c40 --- /dev/null +++ b/wiki/linux/acpi.m4 @@ -0,0 +1,14 @@ +_header(`ACPI') +_bibliography(` +_bentr(`_ref(`/unix/#ACPI')') +') ++logind (as part of SystemD), elogind, acpid, and many desktop environments can manage ACPI events automatically, and sometimes this is configured by default as part of a Linux software distribution. +
+_subheader(`acpid(8)') +_bibliography(` +_bentr(`_link(`acpid', `https://sourceforge.net/projects/acpid2/')') +') ++_man(`acpid(8)') is a daemon that can automatically manage ACPI events on Linux. +
diff --git a/wiki/linux/alpine.m4 b/wiki/linux/alpine.m4 new file mode 100644 index 0000000..f531149 --- /dev/null +++ b/wiki/linux/alpine.m4 @@ -0,0 +1,95 @@ +_header(`Alpine') ++Alpine Linux is a small Linux _ref(`#distribution') based on musl libc. +Its main purpose is to serve as a server distribution, however many have found use for it as a desktop distribution. +
+ +_subheader(`apk(8)') +_bibliography(` +_bentr(`_link(`Alpine Package Keeper', `https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper') (Alpine Wiki)') +_bentr(`Alpine repositories content search') +') +_subsubheader(`Adding software') +_man(`apk-add(8)') +_subsubheader(`Repositories') ++See _man(`apk-repositories(5)'). +
++Most Internet repositories use the URL scheme of _code(`https://[_italic(`server')]/alpine/[_italic(`release branch')]/[_italic(`repository branch')]'). +For example, the _italic(`main') repository branch on the _italic(`edge') release branch on the server _italic(`dl-cdn.alpinelinux.org') is _code(`http://dl-cdn.alpinelinux.org/alpine/edge/main'). +A repositories file could look like the following: +
++http://dl-cdn.alpinelinux.org/alpine/edge/main +http://dl-cdn.alpinelinux.org/alpine/edge/community +http://dl-cdn.alpinelinux.org/alpine/edge/testing ++
+Local directories like _file(`/media/cdrom/apks'), an example from the Alpine Wiki, are valid as well. +
+_subsubheader(`_code(`WARNING: Ignoring [_italic(`path')]: UNTRUSTED signature')') +_bibliography(` +_bentr(`_link(`ERROR: http://dl-4.alpinelinux.org/alpine/edge/testing: UNTRUSTED signature', `https://stackoverflow.com/questions/73374745/error-http-dl-4-alpinelinux-org-alpine-edge-testing-untrusted-signature')') +') ++If you are absolutely sure what you're doing is fine, _command(`apk [_italic(`command')] _em(`--allow-untrusted')'). +This ignores the error and allows the operation to proceed. +
+ +_subheader(`Always install manual pages') ++Alpine doesn't include man pages in program packages to save on space, instead keeping them in _code(`[package]-doc') sibling packages. +To always install doc packages with program packages, _code(`apk add docs'). +
+ +_subheader(`Bootstrapping') ++See _ref(`#bootstrapping'). +The Alpine setup scripts also exist to aid in the bootstrap process. +
++To bootstrap _man(`apk(8)') do the following: +
++Copy _man(`resolv.conf(5)') over (and bind _file(`/dev/'), _file(`/proc/'), and _file(`/sys/')) before _ref(`/unix/#posix#chroot(1)')ing. +
++In the chroot, make sure to install a kernel, which will put _ref(`#initramfs') creation in the _man(`apk(8)') build hooks and rebuild the initramfs whenever the kernel is upgraded. +
+ +_subsubheader(`Setup scripts') +_bibliography(` +_bentr(`_link(`Alpine setup scripts', `https://wiki.alpinelinux.org/wiki/Alpine_setup_scripts') (Alpine Wiki)') +') +_passage(`Eunakria on the Alpine Linux Discord server', +`setup-alpine
is jank.
+_program(`setup-hostname') validates a _man(`hostname(5)') before writing to the mounted volume. +
++_program(`setup-xorg-base') adds the packages _package_alpine(`xorg-server'), _package_alpine(`xf86-input-libinput'), _package_alpine(`eudev'), and _package_alpine(`mesa'), and then enables the _ref(`#initialization') services for udev. +
+ +_subheader(`postmarketOS') ++postmarketOS is an Alpine-based Linux software distribution that makes configuring and using Linux easy on mobile devices. +
++By default, postmarketOS will generate a random software MAC address when connecting to a new WLAN network. +You can disable this by adding a NetworkManager rule. +In _code(`/etc/NetworkManager/conf.d/') you can make a file with any name that has the following: +
++[device] +wifi.scan-rand-mac-address=no ++
+On a live system you can then _code(`rc-service networkmanager restart') to restart NetworkManager and have it load the new configuration. +
diff --git a/wiki/linux/arch.m4 b/wiki/linux/arch.m4 new file mode 100644 index 0000000..d87acdb --- /dev/null +++ b/wiki/linux/arch.m4 @@ -0,0 +1,72 @@ +_header(`Arch') ++Arch is a Linux software distribution that uses the _man(`pacman(8)') package manager. +Arch performs little in the way of modification of upstream versions of packages and offers only the latest (or last noticed) revisions of programs in its repositories, +which has given it a reputation for instability compared to other Linux software distributions that bug-test programs before offering them to users in standard release channels (for example, _ref(`#debian')). +
+ +_subheader(`AUR') ++You will need _package_arch(`base-devel'). +
+ +_subheader(`Bootstrapping') ++See _ref(`#bootstrapping'). +Use _man(`pacstrap(8)') on Arch and _man(`basestrap(8)') on Artix. +
++Arch's base package is _package_arch(`base'). +Additionally, a kernel such as _package_arch(`linux') or _package_arch(`linux-lts') will be necessary. +The Arch wiki says _package_arch(`linux-firmware') is necessary; it's not on many hardware configurations but it's recommended. +On Artix you also need to select the _ref(`#initialization') system: _package(`66'), _package(`dinit'), _package(`openrc'), _package(`runit'), or _package(`s6-base'). +The Artix wiki says the initialization-specific _ref(`#login#logind') package is necessary; it's not but it's recommended. +
++On the bootstrapped system, after chrooting in, uncomment a local mirror in _file(`/etc/pacman.d/mirrorlist-arch'). +Then configure _file(`/etc/pacman.conf') to use that mirror list. +
+_passage(`Config block conveyed to Leyla by an Arch package maintainer, shared to the Tebibyte Media Discord server 2021-06-04T1746+0500', +` ++# +# ARCHLINUX +# + +#[testing] +#Include = /etc/pacman.d/mirrorlist-arch + +[extra] +Include = /etc/pacman.d/mirrorlist-arch + +#[community-testing] +#Include = /etc/pacman.d/mirrorlist-arch + +[community] +Include = /etc/pacman.d/mirrorlist-arch + +#[multilib-testing] +#Include = /etc/pacman.d/mirrorlist-arch + +#[multilib] +#Include = /etc/pacman.d/mirrorlist-arch ++') + +_subheader(`Artix') +_bibliography(` +_bentr(`Artix Linux') +_bentr(`Artix Linux (Wikipedia)') +') +
+Artix is a Linux software distribution based on Arch that doesn't mandate SystemD as its initialization system. +
+ +_subheader(`makepkg(8)') +_bibliography(` +_bentr(`_link(`makepkg', `https://wiki.archlinux.org/title/Makepkg') (Arch Wiki)') +_bentr(`_link(`pacman', `https://gitlab.archlinux.org/pacman/pacman/')/_link(`scripts/makepkg.sh.in', `https://gitlab.archlinux.org/pacman/pacman/-/blob/master/scripts/makepkg.sh.in')') +') ++_man(`makepkg(8)') is a _man(`bash(1)') script provided by _package_arch(`pacman') that provides an interface through which to manage _man(``PKGBUILD'(5)')s. +
diff --git a/wiki/linux/audio.m4 b/wiki/linux/audio.m4 new file mode 100644 index 0000000..e5186d8 --- /dev/null +++ b/wiki/linux/audio.m4 @@ -0,0 +1,48 @@ +_header(`Audio') ++Most audio servers recommend that they be run in userspace with user privileges, with PulseAudio going so far as to exiting when run as root without additional configuration. +The Alpine wiki currently recommends _man(`pipewire(1)'), with postmarketOS, which is based on Alpine, coming pre-configured with PipeWire. +PipeWire is relatively new and the typical audio server used is PulseAudio; _ref(`#debian') and many popular Debian-based distributions come pre-configured with PulseAudio. +
+_subheader(`ALSA') +_bibliography(` +_bentr(`Adding sound (Alpine Linux Wiki)') +_bentr(`ALSA lib conf Evaluate error') +_bentr(`ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave') +') ++The Alpine wiki ("Adding sound") says to install _package_alpine(`alsa-conf'), _package_alpine(`alsa-lib'), and _package_alpine(`alsa-utils'), +add yourself to the _code(`audio') group, and then do some more configuration that I've never needed to do: +Use _man(`alsamixer(1)') to find a working sound card (press _code(`F6') from the first screen ALSAMixer presents) +and edit _code(`/usr/share/alsa/alsa.conf') and change _code(`defaults.ctl.card') and _code(`defaults.pcm.card') to the sound card that works. +
++The Alpine wiki doesn't mention this but you'll need to enable the _code(`alsa') OpenRC service and either start it or reboot. +I also installed _package_alpine(`gstreamer') but I don't know why. +
++ALSA is clunky, many people prefer to use a frontend such as Pipewire or PulseAudio that exposes its own interface while remaining compatible with ALSA. +
+_subheader(`OSS') ++Deprecated, unfortunately. +
+_subheader(`PipeWire') +_bibliography(` +_bentr(`PipeWire (Alpine Linux Wiki)') +_bentr(`PipeWire (FreeDesktop Wiki)') +') ++Provided by the _package_alpine(`pipewire') package on Alpine. +
++RTKit error: org.freedesktop.DBus.Error.ServiceUnknown ++
+This means you need _program(`rtkit') installed and running through your initialization system. +
+_subheader(`PulseAudio') ++On Alpine you'll need the _package_alpine(`pulseaudio'), _package_alpine(`pulseaudio-alsa'), and _package_alpine(`alsa-plugins-pulse') packages for PulseAudio with ALSA compatibility. +Start _man(`pulseaudio(1)') when you want audio, ideally in your _file(`.xinitrc'). +
diff --git a/wiki/linux/bootstrapping.m4 b/wiki/linux/bootstrapping.m4 new file mode 100644 index 0000000..ddf051a --- /dev/null +++ b/wiki/linux/bootstrapping.m4 @@ -0,0 +1,31 @@ +_header(`Bootstrapping') ++Usually the first program a computer will run is the _ref(`/unix/#bootloader'), +which loads the kernel and usually the _ref(`#initramfs') which will handle mounting the system storage. +Then the _ref(`#initialization') system is started, which handles daemons, some of which will handle login. +
++Bootstrapping Linux involves booting an operating system, usually off a temporary storage medium, mounting the intended system storage, +and installing the operating system on the intended storage. +Sometimes distributions come with software that mostly automates this. +
+_passage(`veronika on the Alpine Linux Discord server, 2022-12-04T1111+0400',` +bootstrapping things is only useful for rare cases where you actually don`'t want to use the base packages that the installer gets for you automatically, and the installer doesn`'t get in your way of making your own system, instead it suggests you install certain packages, and asks what packages you want installed. If you`'re installing a desktop environment, it will probably ask you which meta package you want (or at least that`'s how I remember it working).
+If you have an installer to do the same things with less steps for you, you should use it. Automation is progress, automation is the whole point of all this computer stuff. If you can automate it or make it easier, you probably should, unless you want some control over the process. For example, instead of checking the charge and running a command to put your laptop into battery saver mode, you make a program do it for you. Convenience is key to happy and painless computing
+') ++If running very thin installation media, for example, a _ref(`#debian') network install CD, or just need the most up-to-date software possible, +the first step will be to connect to the Internet. +
++Next, if your chosen Linux distribution has a package manager, configure it, use it to initialize the file system on the intended system storage, +and install the necessary system packages to the storage. +Usually distributions have a single base package, like _ref(`#arch')'s _package_arch(`base') or _ref(`#alpine')'s _package_alpine(`alpine-base'). +If it doesn't include any of them, install separately a kernel, initialization system, and userland. +
++Bind mount (_command(`mount -o bind')) _file(`/dev/'), _file(`/proc/'), and _file(`/sys/') to the corresponding locations on the volume to bootstrap +(_code(`for d in dev proc sys; do mount -o bind /$d /[mount]/$d; done')), +then _ref(`/unix/#posix#chroot(1)') in and complete the system setup. +Set up additional configuration necessary to boot (including _ref(`/unix/#fstab(5)'), _man(`hostname(5)'), _man(`hosts(5)'), and anything necessary for the kernel or initialization). +
diff --git a/wiki/linux/debian.m4 b/wiki/linux/debian.m4 new file mode 100644 index 0000000..c98e2fc --- /dev/null +++ b/wiki/linux/debian.m4 @@ -0,0 +1,22 @@ +_header(`Debian') +_bibliography(` +_bentr(`_link(`Debian', `https://www.debian.org/')') +_bentr(`_link(`Debian', `https://en.wikipedia.org/wiki/Debian') (Wikipedia)') +') ++Debian is a software _ref(`#distribution') that can use Linux or the GNU HURD as its kernel. +In the past, FreeBSD's kernel was also an option. +Debian is known for its stability and longevity. +Debian uses SystemD as its initialization system, the GNU core utilities, and dpkg and apt for package management. +
++The vast majority of support and attention is on the Debian GNU+Linux configuration. +
+ +_subheader(`Ubuntu') + ++Ubuntu is a derivative of Debian Linux. +
diff --git a/wiki/linux/devices.m4 b/wiki/linux/devices.m4 new file mode 100644 index 0000000..679a3bf --- /dev/null +++ b/wiki/linux/devices.m4 @@ -0,0 +1,4 @@ +_header(`Devices') +_bibliography(` +_bentr(`_link(`udev', `https://en.wikipedia.org/wiki/Udev') (Wikipedia)') +') diff --git a/wiki/linux/distribution.m4 b/wiki/linux/distribution.m4 new file mode 100644 index 0000000..777bb81 --- /dev/null +++ b/wiki/linux/distribution.m4 @@ -0,0 +1,8 @@ +_subheader(`Distribution') ++Linux is usually obtained as part of a software distribution put together to form a useable operating system. +
+ +_subsubheader(_ref(`#alpine')) +_subsubheader(_ref(`#arch')) +_subsubheader(_ref(`#debian')) diff --git a/wiki/linux/hostname.m4 b/wiki/linux/hostname.m4 new file mode 100644 index 0000000..060e343 --- /dev/null +++ b/wiki/linux/hostname.m4 @@ -0,0 +1,4 @@ +_header(`hostname') ++The special file _file(`/proc/sys/kernel/hostname') directly controls the system hostname in the kernel. +
diff --git a/wiki/linux/index.m4 b/wiki/linux/index.m4 new file mode 100644 index 0000000..91e79b8 --- /dev/null +++ b/wiki/linux/index.m4 @@ -0,0 +1,45 @@ +define(`_DESCRIPTION', `Linux is a Unix-workalike operating system kernel.')dnl +define(`_PAGE', `Linux')dnl +include(`../wiki.m4')dnl +include(`../unix/macros.m4')dnl +include(`macros.m4')dnl ++_file(`initramfs') is a _ref(`/unix/#archives#cpio') archive that contains a small Linux filesystem with just enough utility to mount the actual operating system's root filesystem. +
diff --git a/wiki/linux/login.m4 b/wiki/linux/login.m4 new file mode 100644 index 0000000..83ed3f6 --- /dev/null +++ b/wiki/linux/login.m4 @@ -0,0 +1,17 @@ +_header(`Login') + +_subheader(`logind') +_bibliography(` +_bentr(`elogind') +_bentr(`elogind (Gentoo Wiki)') +_bentr(`org.freedesktop.login1') +_bentr(`logind (NixOS Wiki)') +') ++logind (_code(`systemd-logind.service(8)')) is a component of SystemD that exposes information about active users on the system via the org.freedesktop.login1 D-Bus interface which is used by the popular desktop environments GNOME and KDE. +It also handles _ref(`#ACPI') events. +It can be configured in _code(`logind.conf(5)'). +
++On systems without SystemD and with conflicting software, _code(`elogind(8)') may be used. +
diff --git a/wiki/linux/macros.m4 b/wiki/linux/macros.m4 new file mode 100644 index 0000000..02142b3 --- /dev/null +++ b/wiki/linux/macros.m4 @@ -0,0 +1,4 @@ +dnl include(`../wiki.m4') +dnl include(`../unix/macros.m4') +define(`_package_alpine', `_link(`_package($1)', `https://pkgs.alpinelinux.org/packages?name=$1')')dnl +define(`_package_arch', `_link(`_package($1)', `https://archlinux.org/packages/?q=$1')')dnl diff --git a/wiki/linux/util-linux.m4 b/wiki/linux/util-linux.m4 new file mode 100644 index 0000000..f0bca6b --- /dev/null +++ b/wiki/linux/util-linux.m4 @@ -0,0 +1,7 @@ +_subheader(`util-linux') +_bibliography(` +_bentr(`_link(`util-linux', `https://en.wikipedia.org/wiki/Util-linux') (Wikipedia)') +') ++_code(`util-linux') is distributed on all popular Linux distributions and contains utilities users may expect to be already present on their systems, like _man(`more(1)') or _man(`hexdump(1)'). +
diff --git a/wiki/linux/volumes.m4 b/wiki/linux/volumes.m4 new file mode 100644 index 0000000..50c37b6 --- /dev/null +++ b/wiki/linux/volumes.m4 @@ -0,0 +1,15 @@ +_header(`File systems') ++Also see _ref(`/unix/#volumes'). +
+ +_subheader(`UFS') +_bibliography(` +_bentr(_link(`how to mount ffs partition under linux', `https://wiki.netbsd.org/tutorials/how_to_mount_ffs_partition_under_linux/') (NetBSD Wiki)) +') ++To mount a NetBSD FFSv2 partition in Linux use _cite(`mount(8)'); _code(`mount -o ufstype=ufs2 -t ufs'). +The NetBSD Wiki instead notes _code(`-o ufstype=44bsd') +but that specific snippet was _link(`imported', `https://wiki.netbsd.org/cgi-bin/cvsweb/wikisrc/tutorials/how_to_mount_ffs_partition_under_linux.mdwn') +from _link(`a NetBSD.se Wiki page at least as old as 2007', `http://web.archive.org/web/20071112075927/http://wiki.netbsd.se/How_to_mount_FFS_partition_under_Linux'). +
diff --git a/wiki/page.mk b/wiki/page.mk new file mode 100644 index 0000000..e0ce0de --- /dev/null +++ b/wiki/page.mk @@ -0,0 +1,9 @@ +RM = rm -f + +index.html: *.m4 + m4 index.m4 >index.html + +clean: + $(RM) index.html + +.PHONY: clean diff --git a/wiki/tail.m4 b/wiki/tail.m4 new file mode 100644 index 0000000..e04310f --- /dev/null +++ b/wiki/tail.m4 @@ -0,0 +1,2 @@ +