From 9dd3fa192a4653427ad8f017a513e57159ba0121 Mon Sep 17 00:00:00 2001 From: patrick brisbin Date: Wed, 23 Sep 2026 09:42:49 -0400 Subject: [PATCH] fix: rewrite man-pages in mdoc, author by hand * Content was improved * Ronn machinery was removed --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/pages.yml | 15 +- .github/workflows/release.yml | 7 - .gitignore | 4 +- doc/downgrade.8 | 248 +++++++++++++++++++ doc/downgrade.8.ronn | 190 --------------- doc/downgrade.conf.5 | 46 ++++ doc/downgrade.conf.5.ronn | 34 --- doc/index.txt | 11 - doc/pacignore.8 | 77 ++++++ doc/pacignore.8.ronn | 61 ----- doc/style.css | 394 +++++++++++++++++++++++++++++++ justfile | 14 +- 13 files changed, 785 insertions(+), 318 deletions(-) create mode 100644 doc/downgrade.8 delete mode 100644 doc/downgrade.8.ronn create mode 100644 doc/downgrade.conf.5 delete mode 100644 doc/downgrade.conf.5.ronn delete mode 100644 doc/index.txt create mode 100644 doc/pacignore.8 delete mode 100644 doc/pacignore.8.ronn create mode 100644 doc/style.css diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e66de6b1..8b3a84b5 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -7,7 +7,7 @@ - [ ] If adding new options, update `dist/completion/*` - [ ] If adding new options, update `dist/conf/downgrade.conf` * Documentation: - - [ ] If adding new options, update usage and `doc/*.ronn` + - [ ] If adding new options, update usage and `doc/` - [ ] If adding new strings, update `locale/*.po` - [ ] If necessary, update `README.md` diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 1cd0e74d..0af67b58 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -20,20 +20,19 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - run: gem install --user ronn-ng - - run: | - for bin in "$HOME"/.local/share/gem/ruby/*/bin; do - echo "$bin" - done >>"$GITHUB_PATH" - - uses: actions/checkout@v4 + - name: Install just as task-runner + uses: extractions/setup-just@v3 + + - name: Install mandoc for HTML conversion + run: sudo apt-get install -y mandoc - name: Generate HTML man-pages - run: ronn --style toc --html doc/*.ronn + run: just docs-html - name: Copy HTML sources to _site run: | mkdir -p _site - cp -v doc/*.html _site/ + cp -v doc/*.css doc/*.html _site/ cp -v _site/downgrade.8.html _site/index.html - uses: actions/configure-pages@v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c52aaf5..744c839e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,13 +18,6 @@ jobs: run: | sudo apt-get install -y gettext - - name: Install ronn-ng for manpages - run: | - gem install --user ronn-ng - for bin in "$HOME"/.local/share/gem/ruby/*/bin; do - echo "$bin" - done >>"$GITHUB_PATH" - - uses: actions/checkout@v4 with: persist-credentials: false diff --git a/.gitignore b/.gitignore index 2898d39b..08f49e3c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,7 @@ dist/bin dist/doc dist/locale -doc/* -!doc/index.txt -!doc/*.ronn +doc/*.html locale/* !locale/*.po diff --git a/doc/downgrade.8 b/doc/downgrade.8 new file mode 100644 index 00000000..46c2d0ab --- /dev/null +++ b/doc/downgrade.8 @@ -0,0 +1,248 @@ +.Dd $Mdocdate: September 9 2026 $ +.Dt DOWNGRADE 8 +.Os +.Sh NAME +.Nm downgrade +.Nd downgrade arch linux packages +.Sh SYNOPSIS +.Nm +.Bk -words +.Op Fl h +.Op Fl Fl ala\-only +.Op Fl Fl ala\-url= Ns Ar url +.Op Fl Fl cached\-only +.Op Fl Fl ignore= Ns Ar prompt Ns | Ns Ar always Ns | Ns Ar never +.Op Fl Fl latest | Fl Fl oldest +.Op Fl Fl maxdepth= Ns Ar num +.Op Fl Fl pacman\-cache= Ns Ar file +.Op Fl Fl pacman\-conf= Ns Ar file +.Op Fl Fl pacman\-log= Ns Ar file +.Op Fl Fl pacman= Ns Ar command +.Op Fl Fl prefer\-cache +.Op Fl Fl unignore Ar name Op Ar name ... +.Op Fl Fl version +.Op Ar name ... +.Op Ar \-\- pacman\-option ... +.Ek +.Sh DESCRIPTION +The +.Nm +utility is a terminal user interface +.Pq Qq TUI +for downgrading arch linux packages. +.Pp +Packages can be located and installed from the local +.Xr pacman 8 +cache or the remote Arch Linux Archive +.Pq Qq ALA . +.Pp +Calling +.Nm +for the +.Ar terraform +package, for example, might show: +.Bd -literal -offset indent +\- 1) terraform 0.11.11 2 remote +\- 2) terraform 0.11.12 1 /var/cache/pacman/pkg ++ 3) terraform 0.11.13 1 remote ++ 4) terraform 0.11.13 1 /var/cache/pacman/pkg +\- 5) terraform 0.12.0 1 remote +\- 6) terraform 0.12.0 1 /var/cache/pacman/pkg + 7) terraform 0.12.1 1 remote + +Available packages (community): +7/7 +> + +.Ed +The columns have the following meaning: +.Bl -tag -width indent +.It Cm indicator : Ar \- Ns | Ns Ar + +An indication that the package was previously installed +.Pq Qq Ar \- , +or is currently installed +.Pq Qq Ar + . +.It Cm enumeration +An enumeration of the entries for selection. +.It Cm package\-name +The name of the package. +.It Cm package\-epoch +The epoch of the package in cache or ALA. +.It Cm package\-version +The version of the package in cache or ALA. +.It Cm package\-release +The release of the package in cache or ALA. +.It Cm location : Pa /path/to/cache/dir Ns | Ns Ar remote +If you have aleady downloaded this package, this will show the cache directory +where the package is located, or +.Qq Ar remote +if it is available in the ALA. +.El +.Ss OPTIONS +.Bl -tag -width indent +.It Fl Fl pacman= Ns Ar command +Pacman command, default is +.Cm pacman . +.It Fl Fl pacman\-conf= Ns Ar file +Pacman configuration file, default is /etc/pacman.conf. +.It Fl Fl pacman\-cache= Ns Ar file +Pacman cache directory, default value(s) taken from pacman configuration file, or otherwise defaults to +.Pa /var/cache/pacman/pkg . +This option can be specified multiple times to indicate multiple cache directories. +.It Fl Fl pacman\-log= Ns Ar file +Pacman log file, default value is extracted from pacman configuration file, or otherwise defaults to +.Pa /var/log/pacman.log . +.It Fl Fl maxdepth= Ns Ar num +Maximum depth to search for cached packages, defaults to +.Cm 2 . +.It Fl Fl ala\-url= Ns Ar url +Location of an ALA server, default is +.Cm Lk https://archive.archlinux.org. +.It Fl Fl ala\-only +Search ALA only. +.It Fl Fl cached\-only +Search local cache only. +.It Fl Fl ignore= Ns Ar prompt Ns | Ns Ar always Ns | Ns Ar never +Whether to add packages to IgnorePkg, default is prompt. +.It Fl Fl unignore Ar package Op Ar package ... +Remove packages from IgnorePkg. This is a pass\-through to +.Xr pacignore 8 +.It Fl Fl latest | Fl Fl oldest +Never prompt for version or location, automatically pick the most up to +date/most out of date version. Allows for noninteractive downgrades when used in +conjunction with +.Fl Fl ignore . +.It Fl Fl prefer\-cache +If a package matching the version filter is found in the cache, skip querying +the ALA. Unlike +.Fl Fl cached\-only , +.Fl Fl prefer\-cache +does query the ALA if no package could be matched in cache. +.It Fl Fl version +Show downgrade version. +.It Fl h , Fl Fl help +Show help script. +.It Ar name +Name of the package to downgrade. +.Pp +If multiple names are given, each is presented for version selection first, and +remote packages are downloaded, before all selections are installed together via +a single +.Cm pacman \-U +invocation. This allows for a coherent set of dependent packages to be dowgraded +together. +.El +.Ss PACMAN OPTIONS +As per the usage syntax, any options supplied after the +.Cm \-\- +character sequence will be treated as pacman options. +.Ss DEFAULT BEHAVIORS +By default, downgrade will search both local caches and the ALA. +.Pp +AUR helper +cache directories +.Pq Pa ~/.cache/yay , Pa ~/.cache/paru/clone +are automatically included if present, so AUR packages are found without extra +configuration. +.Pp +If only one package with its corresponding location matches, the package will be +installed without further prompt from the user. +.Ss VERSION FILTERING +downgrade allows the use of the following version\-filtering operators: +.Cm = , +.Cm == , +.Cm =~ , +.Cm <= , +.Cm >= , +.Cm < +and +.Cm > . +.Pp +Note that +.Cm =~ +represents a regex match operator and +.Cm = Ns / Ns Cm == +are aliases. +.Sh EXIT STATUS +.Ex -std +.Pp +Common errors are: +.Bl -bullet -width indent +.It +Execution from non\-root user +.It +No argument value(s) supplied where necessary +.It +No package(s) found +.It +Package(s) found, but an invalid selection was made +.It +.Cm pacman \-U +returned non\-zero +.It +Unexpected error when handling +.Cm IgnorePkg +additions +.El +.Sh FILES +.Bl -tag -width indent +.It Pa /etc/xdg/downgrade/downgrade.conf +Command\-line options can be set persistently in this file. +.Pp +See +.Xr downgrade.conf 5 . +.El +.Sh EXAMPLES +Downgrade packages checking both local cache and the A.L.A, which is the default +behavior: +.Bd -literal -offset indent +.Nm Ar foo Ar bar +.Pp +.Ed +Downgrade packages, specifying multiple cache directories: +.Bd -literal -offset indent +.Nm Fl Fl pacman\-cache Pa /path/to/cache Fl Fl pacman\-cache Pa /path/to/other/cache Ar foo Ar bar +.Pp +.Ed +Downgrade a package with version\-filtering: +.Bd -literal -offset indent +.Nm Ar 'foo=1.0.0\-1' Ar 'bar>=1.2.1\-1' Ar 'baz=~^1.2' +.Pp +.Ed +Downgrade a package, looking in only local cache: +.Bd -literal -offset indent +.Nm Fl Fl cached\-only Ar foo +.Pp +.Ed +Downgrade a package, looking in only the A.L.A.: +.Bd -literal -offset indent +.Nm Fl Fl ala\-only Ar foo +.Pp +.Ed +Non\-interactively downgrade foo to 1.0.0\-1 +.Bd -literal -offset indent +.Nm Fl Fl latest Fl Fl prefer\-cache Fl Fl ignore never Ar 'foo=1.0.0\-1' +.Pp +.Ed +Downgrade an AUR package with version\-filtering (git versions are shown +automatically when a git repo is found in the cache): +.Bd -literal -offset indent +.Nm Ar 'downgrade>9.0.0' +.Pp +.Ed +.Sh AUTHORS +.An Patrick Brisbin Aq Mt pbrisbin@gmail.com +.An Atreya Shankar Aq Mt shankar.atreya@gmail.com +.El +.Sh REPORTING BUGS +Open a GitHub issue on +.Lk https://github.com/archlinux\-downgrade/downgrade . +.Sh SEE ALSO +.Xr find 1 , +.Xr fzf 1 , +.Xr su 1 , +.Xr downgrade.conf 5 , +.Xr pacman.conf 5 , +.Xr pacman 8 , +.Xr sudo 8 , +.Xr vercmp 8 . diff --git a/doc/downgrade.8.ronn b/doc/downgrade.8.ronn deleted file mode 100644 index 93faa348..00000000 --- a/doc/downgrade.8.ronn +++ /dev/null @@ -1,190 +0,0 @@ -downgrade(8) - downgrade arch linux packages -============================================ - -## SYNOPSIS - -**downgrade** [OPTIONS] [PKG...] [**\--** PACMAN OPTION...] - -## DESCRIPTION - -Downgrade Arch Linux packages. - -## OUTPUT - -Calling **downgrade** on a package will lead to the following output: - -_Example:_ - - - 1) terraform 0.11.11 2 remote - - 2) terraform 0.11.12 1 /var/cache/pacman/pkg - + 3) terraform 0.11.13 1 remote - + 4) terraform 0.11.13 1 /var/cache/pacman/pkg - - 5) terraform 0.12.0 1 remote - - 6) terraform 0.12.0 1 /var/cache/pacman/pkg - 7) terraform 0.12.1 1 remote - - Available packages (community): - 7/7 - > - -The columns have the following meaning: - - * _indicator_: - \- indicates that the version was previously installed.\ - \+ indicates the currently installed version. - - * _enumeration_: - An enumeration of the entries for selection. - - * _package-name_: - The name of the package. - - * _package-epoch_: - The epoch of the package in cache or ALA. - - * _package-version_: - The version of the package in cache or ALA. - - * _package-release_: - The release of the package in cache or ALA. - - * _location_: - Possible values: {remote|/path/to/cache/dir} - -If you have already downloaded this version, it will show the cache directory -where the package is located. _remote_ indicates that the version is available -on the ALA. - -## OPTIONS - - * `--pacman`=: - Pacman command, default is _pacman_. - - * `--pacman-conf`=: - Pacman configuration file, default is _/etc/pacman.conf_. - - * `--pacman-cache`=: - Pacman cache directory, default value(s) taken from pacman configuration file, - or otherwise defaults to _/var/cache/pacman/pkg_. This option can be specified - multiple times to indicate multiple cache directories. - - * `--pacman-log`=: - Pacman log file, default value is extracted from pacman configuration file, or - otherwise defaults to _/var/log/pacman.log_. - - * `--maxdepth`=: - Maximum depth to search for cached packages, defaults to _2_. - - * `--ala-url`=: - Location of an ALA server, default is *https://archive.archlinux.org*. - - * `--ala-only`: - Search ALA only. - - * `--cached-only`: - Search local cache only. - - * `--ignore`=: - Whether to add packages to IgnorePkg, default is _prompt_. - - * `--unignore` [PKG...]: - Remove packages from IgnorePkg. This is a pass-through to **pacignore(8)**. - - * `--latest` | `--oldest`: - Never prompt for version or location, automatically pick the most up to - date/most out of date version. Allows for noninteractive downgrades when used - in conjunction with `--ignore`. - - * `--prefer-cache`: - If a package matching the version filter is found in the cache, skip querying - ala. Unlike `--cached-only`, `--prefer-cache` does query ala if no package - could be matched in cache. - - * `--version`: - Show downgrade version. - - * `-h`, `--help`: - Show help script. - -## PACMAN OPTIONS - -As per the usage syntax, any options supplied after the **\--** character -sequence will be treated as pacman options. - -## DEFAULT BEHAVIORS - -By default, **downgrade** will search both local caches and the ALA. AUR helper -cache directories (_~/.cache/yay_, _~/.cache/paru/clone_) are automatically -included if present, so AUR packages are found without extra configuration. - -If only one package with its corresponding location matches, the package will be -installed without further prompt from the user. - -## VERSION FILTERING - -**downgrade** allows the use of the following version-filtering operators: -**=**, **==**, **=~**, **\<=**, **>=**, **\<** and **>**. Note that **=~** -represents a regex match operator and **=**/**==** are aliases. - -## EXIT STATUS - -**downgrade** will stop further processing and exit non-zero if it encounters -any of the following scenarios for any of its arguments: - -* Execution from non-root user -* No argument value(s) supplied where necessary -* No package(s) found -* Package(s) found, but an invalid selection was made -* `pacman -U` returned non-zero -* Unexpected error when handling `IgnorePkg` additions - -## FILES - -Command-line options can be set persistently in -**/etc/xdg/downgrade/downgrade.conf**. See **downgrade.conf(5)**. - -## EXAMPLES - -Downgrade packages checking both local cache and the A.L.A, which is the default -behavior: - - # downgrade foo bar - -Downgrade packages, specifying multiple cache directories: - - # downgrade --pacman-cache /path/to/cache --pacman-cache /path/to/other/cache foo bar - -Downgrade a package with version-filtering: - - # downgrade 'foo=1.0.0-1' 'bar>=1.2.1-1' 'baz=~^1.2' - -Downgrade a package, looking in only local cache: - - # downgrade --cached-only foo - -Downgrade a package, looking in only the A.L.A.: - - # downgrade --ala-only foo - -Non-interactively downgrade `foo` to `1.0.0-1` - - # downgrade --latest --prefer-cache --ignore never 'foo=1.0.0-1' - -Downgrade an AUR package with version-filtering (git versions are shown -automatically when a git repo is found in the cache): - - # downgrade 'downgrade>9.0.0' - -## AUTHORS - -* Patrick Brisbin \ -* Atreya Shankar \ - -## REPORTING BUGS - -Open a GitHub issue on *https://github.com/archlinux-downgrade/downgrade*. - -## SEE ALSO - -**downgrade.conf(5)**, **pacman.conf(5)**, **find(1)**, **fzf(1)**, **su(1)**, -**pacman(8)**, **sudo(8)**, **vercmp(8)**. diff --git a/doc/downgrade.conf.5 b/doc/downgrade.conf.5 new file mode 100644 index 00000000..275a9912 --- /dev/null +++ b/doc/downgrade.conf.5 @@ -0,0 +1,46 @@ +.Dd $Mdocdate: September 9 2026 $ +.Dt DOWNGRADE.CONF 5 +.Os +.Sh NAME +.Nm downgrade.conf +.Nd configuration file for downgrade +.Sh SYNOPSIS +.Pa /etc/xdg/downgrade/downgrade\.conf +.Sh DESCRIPTION +Command\-line options to use for all invocations of +.Cm downgrade +may be persisted in the file +.Pa /etc/xdg/downgrade/downgrade\.conf . +.Pp +These options are applied first, before options passed on the actual +command\-line\. +.Pp +Options (and their argument(s)) should be placed one per line. Empty lines, or +those prefixed by +.Cm # +are ignored. +.Sh EXAMPLES +To use an alternative package cache, e.g. the +.Xr yay 1 +cache: +.Bd -literal -offset indent +# /etc/xdg/downgrade/downgrade.conf +\-\-pacman\-cache /home/me/.cache/yay +\-\-maxdepth 2 + +.Ed +To use an alternative source, e.g. for 32\-bit packages: +.Bd -literal -offset indent +# /etc/xdg/downgrade/downgrade.conf +\-\-ala\-url https://archive.archlinux32.org + +.Ed +.Sh AUTHORS +.An Patrick Brisbin Aq Mt pbrisbin@gmail.com +.An Atreya Shankar Aq Mt shankar.atreya@gmail.com +.El +.Sh REPORTING BUGS +Open a GitHub issue on +.Lk https://github.com/archlinux\-downgrade/downgrade . +.Sh SEE ALSO +.Xr downgrade 8 diff --git a/doc/downgrade.conf.5.ronn b/doc/downgrade.conf.5.ronn deleted file mode 100644 index d6c04e8d..00000000 --- a/doc/downgrade.conf.5.ronn +++ /dev/null @@ -1,34 +0,0 @@ -downgrade.conf(5) - configuration file for downgrade -==================================================== - -## SYNOPSIS - -`/etc/xdg/downgrade/downgrade.conf` - -## DESCRIPTION - -Command-line options to use for all invocations of `downgrade` may be persisted -in the file `/etc/xdg/downgrade/downgrade.conf`. These options are applied -first, before options passed on the actual command-line. - -## FORMAT - -Options (and their argument(s)) should be placed one per line. Empty lines, or -those prefixed by `#` are ignored. - -## EXAMPLES - -To use an alternative package cache, e.g. **yay(1)**'s cache: - - # /etc/xdg/downgrade/downgrade.conf - --pacman-cache /home/me/.cache/yay - --maxdepth 2 - -To use an alternative source, e.g. for 32-bit packages: - - # /etc/xdg/downgrade/downgrade.conf - --ala-url https://archive.archlinux32.org - -## SEE ALSO - -**downgrade(8)** diff --git a/doc/index.txt b/doc/index.txt deleted file mode 100644 index 3ca6cf87..00000000 --- a/doc/index.txt +++ /dev/null @@ -1,11 +0,0 @@ -# manuals included in this project: - -# external manuals -pacman(8) https://man.archlinux.org/man/pacman.8 -vercmp(8) https://man.archlinux.org/man/vercmp.8 -sudo(8) https://man.archlinux.org/man/sudo.8 -pacman.conf(5) https://man.archlinux.org/man/pacman.conf.5 -find(1) https://man.archlinux.org/man/find.1 -su(1) https://man.archlinux.org/man/su.1 -fzf(1) https://man.archlinux.org/man/fzf.1 -yay(1) https://linuxcommandlibrary.com/man/yay diff --git a/doc/pacignore.8 b/doc/pacignore.8 new file mode 100644 index 00000000..038e1548 --- /dev/null +++ b/doc/pacignore.8 @@ -0,0 +1,77 @@ +.Dd $Mdocdate: September 9 2026 $ +.Dt PACIGNORE 8 +.Os +.Sh NAME +.Nm pacignore +.Nd manage pacman IgnorePkg values +.Sh SYNOPSIS +.Nm +.Cm ls +.Op Fl c +.Op Ar name ... +.Nm +.Cm check Ns | Ns Cm add Ns | Ns Cm rm +.Op Fl c +.Ar name +.Op Ar name ... +.Sh DESCRIPTION +The +.Nm +utility lists, checks, adds, or removes values from the +.Ar IgnorePkg +setting in +.Xr pacman.conf 5 . +.Pp +The options are as follows: +.Bl -tag -width "-c PATH" +.It Fl c Ar PATH +Pacman configuration file, default is +.Pa /etc/pacman.conf +.It Fl h +Show this help. +.It Ar name +The package to operate on. May be specified multiple times. Optional for +.Cm ls , +which will list all ignored packages when omitted. +.El +.Sh EXIT STATUS +.Ex -std +.Pp +Common errors are: +.Bl -bullet -width indent +.It +Execution from non\-root user for +.Cm add +and +.Cm rm +subcommands +.It +If any packages supplied to the +.Cm check +subcommand are not included in the +.Cm IgnorePkg +directive +.It +If any packages supplied to +.Cm rm +subcommand are not included in the +.Cm IgnorePkg +directive +.It +If any packages supplied to +.Cm add +subcommand are already included in the +.Cm IgnorePkg +directive +.El +.Sh AUTHORS +.An Patrick Brisbin Aq Mt pbrisbin@gmail.com +.An Atreya Shankar Aq Mt shankar.atreya@gmail.com +.El +.Sh REPORTING BUGS +Open a GitHub issue on +.Lk https://github.com/archlinux\-downgrade/downgrade . +.Sh SEE ALSO +.Xr su 1 , +.Xr pacman.conf 5 , +.Xr sudo 8 , diff --git a/doc/pacignore.8.ronn b/doc/pacignore.8.ronn deleted file mode 100644 index 36725add..00000000 --- a/doc/pacignore.8.ronn +++ /dev/null @@ -1,61 +0,0 @@ -pacignore(8) - ignore arch linux packages -============================================ - -## SYNOPSIS - -**pacignore** ls [OPTIONS]\ -**pacignore** [OPTIONS] [PKG...] - -## DESCRIPTION - -Ignore Arch Linux packages. - -## SUBCOMMANDS - -* `ls` [PKG...]: - List package(s) in the `IgnorePkg` directive. - -* `check` [PKG...]: - Check if package(s) are included in the `IgnorePkg` directive. - -* `add` [PKG...]: - Add package(s) to the `IgnorePkg` directive. - -* `rm` [PKG...]: - Remove package(s) from the `IgnorePkg` directive. - -## OPTIONS - -* `-c` : - Pacman configuration file, default is _/etc/pacman.conf_. - -* `-h`: - Show help script. - -## EXIT CODES - -**pacignore** will return non-zero if it encounters any of the following -scenarios: - -* No argument value(s) supplied where necessary -* No package(s) supplied for **check**, **add** or **rm** subcommands -* Execution from non-root user for **add** and **rm** subcommands -* If any packages supplied to **check** subcommand are not included in the - `IgnorePkg` directive -* If any packages supplied to **rm** subcommand are not included in the - `IgnorePkg` directive -* If any packages supplied to **add** subcommand are already included in the - `IgnorePkg` directive - -## SEE ALSO - -**sudo(8)**, **pacman.conf(5)**, **su(1)**. - -## BUGS - -Open a GitHub issue on *https://github.com/archlinux-downgrade/downgrade*. - -## AUTHORS - -* Patrick Brisbin \ -* Atreya Shankar \ diff --git a/doc/style.css b/doc/style.css new file mode 100644 index 00000000..ad5a65b2 --- /dev/null +++ b/doc/style.css @@ -0,0 +1,394 @@ +/* https://mandoc.bsd.lv/mandoc.css */ +/* $Id: mandoc.css,v 1.48 2021/03/30 19:26:20 schwarze Exp $ */ +/* + * Standard style sheet for mandoc(1) -Thtml and man.cgi(8). + * + * Written by Ingo Schwarze . + * I place this file into the public domain. + * Permission to use, copy, modify, and distribute it for any purpose + * with or without fee is hereby granted, without any conditions. + */ + +/* Global defaults. */ + +html { max-width: 65em; + --bg: #FFFFFF; + --fg: #000000; } +body { background: var(--bg); + color: var(--fg); + font-family: Helvetica,Arial,sans-serif; } +h1 { font-size: 110%; } +table { margin-top: 0em; + margin-bottom: 0em; + border-collapse: collapse; } +/* Some browsers set border-color in a browser style for tbody, + * but not for table, resulting in inconsistent border styling. */ +tbody { border-color: inherit; } +tr { border-color: inherit; } +td { vertical-align: top; + padding-left: 0.2em; + padding-right: 0.2em; + border-color: inherit; } +ul, ol, dl { margin-top: 0em; + margin-bottom: 0em; } +li, dt { margin-top: 1em; } +pre { font-family: inherit; } + +.permalink { border-bottom: thin dotted; + color: inherit; + font: inherit; + text-decoration: inherit; } +* { clear: both } + +/* Search form and search results. */ + +fieldset { border: thin solid silver; + border-radius: 1em; + text-align: center; } +input[name=expr] { + width: 25%; } + +table.results { margin-top: 1em; + margin-left: 2em; + font-size: smaller; } + +/* Header and footer lines. */ + +table.head { width: 100%; + border-bottom: 1px dotted #808080; + margin-bottom: 1em; + font-size: smaller; } +td.head-vol { text-align: center; } +td.head-rtitle { + text-align: right; } + +table.foot { width: 100%; + border-top: 1px dotted #808080; + margin-top: 1em; + font-size: smaller; } +td.foot-os { text-align: right; } + +/* Sections and paragraphs. */ + +.manual-text { + margin-left: 3.8em; } +.Nd { } +section.Sh { } +h1.Sh { margin-top: 1.2em; + margin-bottom: 0.6em; + margin-left: -3.2em; } +section.Ss { } +h2.Ss { margin-top: 1.2em; + margin-bottom: 0.6em; + margin-left: -1.2em; + font-size: 105%; } +.Pp { margin: 0.6em 0em; } +.Sx { } +.Xr { } + +/* Displays and lists. */ + +.Bd { } +.Bd-indent { margin-left: 3.8em; } + +.Bl-bullet { list-style-type: disc; + padding-left: 1em; } +.Bl-bullet > li { } +.Bl-dash { list-style-type: none; + padding-left: 0em; } +.Bl-dash > li:before { + content: "\2014 "; } +.Bl-item { list-style-type: none; + padding-left: 0em; } +.Bl-item > li { } +.Bl-compact > li { + margin-top: 0em; } + +.Bl-enum { padding-left: 2em; } +.Bl-enum > li { } +.Bl-compact > li { + margin-top: 0em; } + +.Bl-diag { } +.Bl-diag > dt { + font-style: normal; + font-weight: bold; } +.Bl-diag > dd { + margin-left: 0em; } +.Bl-hang { } +.Bl-hang > dt { } +.Bl-hang > dd { + margin-left: 5.5em; } +.Bl-inset { } +.Bl-inset > dt { } +.Bl-inset > dd { + margin-left: 0em; } +.Bl-ohang { } +.Bl-ohang > dt { } +.Bl-ohang > dd { + margin-left: 0em; } +.Bl-tag { margin-top: 0.6em; + margin-left: 5.5em; } +.Bl-tag > dt { + float: left; + margin-top: 0em; + margin-left: -5.5em; + padding-right: 0.5em; + vertical-align: top; } +.Bl-tag > dd { + clear: right; + column-count: 1; /* Force block formatting context. */ + width: 100%; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0.6em; + vertical-align: top; } +.Bl-compact { margin-top: 0em; } +.Bl-compact > dd { + margin-bottom: 0em; } +.Bl-compact > dt { + margin-top: 0em; } + +.Bl-column { } +.Bl-column > tbody > tr { } +.Bl-column > tbody > tr > td { + margin-top: 1em; } +.Bl-compact > tbody > tr > td { + margin-top: 0em; } + +.Rs { font-style: normal; + font-weight: normal; } +.RsA { } +.RsB { font-style: italic; + font-weight: normal; } +.RsC { } +.RsD { } +.RsI { font-style: italic; + font-weight: normal; } +.RsJ { font-style: italic; + font-weight: normal; } +.RsN { } +.RsO { } +.RsP { } +.RsQ { } +.RsR { } +.RsT { text-decoration: underline; } +.RsU { } +.RsV { } + +.eqn { } +.tbl td { vertical-align: middle; } + +.HP { margin-left: 3.8em; + text-indent: -3.8em; } + +/* Semantic markup for command line utilities. */ + +table.Nm { } +code.Nm { font-style: normal; + font-weight: bold; + font-family: inherit; } +.Fl { font-style: normal; + font-weight: bold; + font-family: inherit; } +.Cm { font-style: normal; + font-weight: bold; + font-family: inherit; } +.Ar { font-style: italic; + font-weight: normal; } +.Op { display: inline; } +.Ic { font-style: normal; + font-weight: bold; + font-family: inherit; } +.Ev { font-style: normal; + font-weight: normal; + font-family: monospace; } +.Pa { font-style: italic; + font-weight: normal; } + +/* Semantic markup for function libraries. */ + +.Lb { } +code.In { font-style: normal; + font-weight: bold; + font-family: inherit; } +a.In { } +.Fd { font-style: normal; + font-weight: bold; + font-family: inherit; } +.Ft { font-style: italic; + font-weight: normal; } +.Fn { font-style: normal; + font-weight: bold; + font-family: inherit; } +.Fa { font-style: italic; + font-weight: normal; } +.Vt { font-style: italic; + font-weight: normal; } +.Va { font-style: italic; + font-weight: normal; } +.Dv { font-style: normal; + font-weight: normal; + font-family: monospace; } +.Er { font-style: normal; + font-weight: normal; + font-family: monospace; } + +/* Various semantic markup. */ + +.An { } +.Lk { } +.Mt { } +.Cd { font-style: normal; + font-weight: bold; + font-family: inherit; } +.Ad { font-style: italic; + font-weight: normal; } +.Ms { font-style: normal; + font-weight: bold; } +.St { } +.Ux { } + +/* Physical markup. */ + +.Bf { display: inline; } +.No { font-style: normal; + font-weight: normal; } +.Em { font-style: italic; + font-weight: normal; } +.Sy { font-style: normal; + font-weight: bold; } +.Li { font-style: normal; + font-weight: normal; + font-family: monospace; } + +/* Tooltip support. */ + +h1.Sh, h2.Ss { position: relative; } +.An, .Ar, .Cd, .Cm, .Dv, .Em, .Er, .Ev, .Fa, .Fd, .Fl, .Fn, .Ft, +.Ic, code.In, .Lb, .Lk, .Ms, .Mt, .Nd, code.Nm, .Pa, .Rs, +.St, .Sx, .Sy, .Va, .Vt, .Xr { + display: inline-block; + position: relative; } + + /* +.An::before { content: "An"; } +.Ar::before { content: "Ar"; } +.Cd::before { content: "Cd"; } +.Cm::before { content: "Cm"; } +.Dv::before { content: "Dv"; } +.Em::before { content: "Em"; } +.Er::before { content: "Er"; } +.Ev::before { content: "Ev"; } +.Fa::before { content: "Fa"; } +.Fd::before { content: "Fd"; } +.Fl::before { content: "Fl"; } +.Fn::before { content: "Fn"; } +.Ft::before { content: "Ft"; } +.Ic::before { content: "Ic"; } +code.In::before { content: "In"; } +.Lb::before { content: "Lb"; } +.Lk::before { content: "Lk"; } +.Ms::before { content: "Ms"; } +.Mt::before { content: "Mt"; } +.Nd::before { content: "Nd"; } +code.Nm::before { content: "Nm"; } +.Pa::before { content: "Pa"; } +.Rs::before { content: "Rs"; } +h1.Sh::before { content: "Sh"; } +h2.Ss::before { content: "Ss"; } +.St::before { content: "St"; } +.Sx::before { content: "Sx"; } +.Sy::before { content: "Sy"; } +.Va::before { content: "Va"; } +.Vt::before { content: "Vt"; } +.Xr::before { content: "Xr"; } + +.An::before, .Ar::before, .Cd::before, .Cm::before, +.Dv::before, .Em::before, .Er::before, .Ev::before, +.Fa::before, .Fd::before, .Fl::before, .Fn::before, .Ft::before, +.Ic::before, code.In::before, .Lb::before, .Lk::before, +.Ms::before, .Mt::before, .Nd::before, code.Nm::before, +.Pa::before, .Rs::before, +h1.Sh::before, h2.Ss::before, .St::before, .Sx::before, .Sy::before, +.Va::before, .Vt::before, .Xr::before { + opacity: 0; + transition: .15s ease opacity; + pointer-events: none; + position: absolute; + bottom: 100%; + box-shadow: 0 0 .35em var(--fg); + padding: .15em .25em; + white-space: nowrap; + font-family: Helvetica,Arial,sans-serif; + font-style: normal; + font-weight: bold; + background: var(--bg); + color: var(--fg); } +.An:hover::before, .Ar:hover::before, .Cd:hover::before, .Cm:hover::before, +.Dv:hover::before, .Em:hover::before, .Er:hover::before, .Ev:hover::before, +.Fa:hover::before, .Fd:hover::before, .Fl:hover::before, .Fn:hover::before, +.Ft:hover::before, .Ic:hover::before, code.In:hover::before, +.Lb:hover::before, .Lk:hover::before, .Ms:hover::before, .Mt:hover::before, +.Nd:hover::before, code.Nm:hover::before, .Pa:hover::before, +.Rs:hover::before, h1.Sh:hover::before, h2.Ss:hover::before, .St:hover::before, +.Sx:hover::before, .Sy:hover::before, .Va:hover::before, .Vt:hover::before, +.Xr:hover::before { + opacity: 1; + pointer-events: inherit; } + */ + +/* Overrides to avoid excessive margins on small devices. */ + +@media (max-width: 37.5em) { +.manual-text { + margin-left: 0.5em; } +h1.Sh, h2.Ss { margin-left: 0em; } +.Bd-indent { margin-left: 2em; } +.Bl-hang > dd { + margin-left: 2em; } +.Bl-tag { margin-left: 2em; } +.Bl-tag > dt { + margin-left: -2em; } +.HP { margin-left: 2em; + text-indent: -2em; } +} + +/* Overrides for a dark color scheme for accessibility. */ + +@media (prefers-color-scheme: dark) { +html { --bg: #1E1F21; + --fg: #EEEFF1; } +:link { color: #BAD7FF; } +:visited { color: #F6BAFF; } +} + +/** Customizations **/ +html { + max-width: 100%; +} + +body { + font-family: monospace; + font-size: 14px; + margin-left: 4ex; + max-width: 100ex; + line-height: 1.4; +} + +table.head, table.foot { + border-bottom: none; + border-top: none; + color: #999; + font-size: inherit; + margin: 3px 0 10px 0; + text-transform: uppercase; +} + +.Ev { + font-style: italic; +} + +.permalink { + border-bottom: none; +} diff --git a/justfile b/justfile index 8767bde7..b6b04b69 100644 --- a/justfile +++ b/justfile @@ -31,12 +31,11 @@ dist-locale-one exec: # Create dist/doc/ from doc/ dist-manpages: - ronn --roff doc/*.ronn mkdir -p dist/doc find doc \ -type f \ - -not -name '*.ronn' \ - -not -name 'index.txt' \ + -not -name '*.css' \ + -not -name '*.html' \ -exec cp -v {} dist/doc \; # Clean up from building dist @@ -49,3 +48,12 @@ update-locales exec: xgettext --from-code=utf-8 -L shell -o 'locale/{{exec}}.pot' 'src/{{exec}}' find 'locale/{{exec}}' -name "*.po" -exec \ msgmerge --update {} 'locale/{{exec}}.pot' \; + +mandoc-options := 'man=./%N.%S.html;https://man.archlinux.org/man/%N.%S,style=./style.css' + +# Generate html docs from mandoc sources +[working-directory: 'doc'] +docs-html: + mandoc -T html -O '{{mandoc-options}}' < downgrade.8 > downgrade.8.html + mandoc -T html -O '{{mandoc-options}}' < downgrade.conf.5 > downgrade.conf.5.html + mandoc -T html -O '{{mandoc-options}}' < pacignore.8 > pacignore.8.html