Turn the Wiki into a knowledge database and decouple the device database
Idea: Turn the Wiki into a knowledge database and decouple the device database
Summary
The postmarketOS Wiki is currently in a weird state where a lot of low-quality, low-effort device pages exist that are just stubs or pages without a postmarketOS port that they would help describe. In my opinion, a Wiki should serve as a knowledge base, not as a device database. By decoupling the device database (i.e. the device wiki pages) from the Wiki and moving them to a Git-Repository (pmaports), we enjoy multiple benefits:
- Device feature table status mirrors pmaports
- Non-booting, non-packaged devices won't have device pages (as opposed to currently, where making matters worse, a lot of pages don't specify
booting = no
andpackaged = no
) - Quality control is easy to maintain and changes can be discussed beforehand (GitLab MR reviews as opposed to people patroling recent Wiki changes and feeling permitted to revert changes)
- We can validate structured data with a schema (as opposed to Infobox changes silently breaking hundreds of device pages)
- A statically generated devices website that people can browse through in a design of our choice (not limited by MediaWiki)
- The Wiki can actually focus on being a source of information on things like UIs, App recommendations, specific configurations like the firewall, etc. rather than being a database of infoboxes
Specification
I propose the following:
- Create a subdirectory
devices/
in pmaports, inside which for every supported device we have a directory[vendor]-[codename]
with 4 files:-
data.yaml
ordata.toml
(any structured data format that can be validated against a schema, really, I'd prefer TOML) containing the information we currently keep in infoboxes -
flashing.md
for installation instructions specific to the device, like unlocking the bootloader, flashing U-Boot or an EDL loader that is required -
quirks.md
for device-specific quirks (like "5GHz WiFi requires running the followingnmcli
command", etc.) -
image.jpg
for a picture of the device
-
- Issues should reside in GitLab issues now and be tagged for each device and assigned to the maintainers
- When a device is updated (e.g. its kernel or device package change feature support), the information in the
devices/
directory is also updated in the same MR - We set up a static site generator of choice that generates a
devices.postmarketos.org
page with the information in the directory and deploys on every pmaports commit that touches the directory- We could even do funky things like having the generator parse our kernel packages for the devices and look up the kernel versions from there instead of hardcoding it in the
data.toml
!
- We could even do funky things like having the generator parse our kernel packages for the devices and look up the kernel versions from there instead of hardcoding it in the
- Migration would happen as follows:
- Parse the devices cargo table in the wiki
- Filter for devices currently in pmaports
- Generate
data.toml
from the infobox contents, download the device image as needed - Parse the Wiki page, find a section matching
Installation
orInstall
and put that inflashing.md
(with manual review) - Keep
quirks.md
empty / not have one at all (this should be equivalent) - Maintainers would perform a proper update of this info next time their device is updated in pmaports
- This way migration can be done mostly automated initially and will be up to date quite soon for devices that are maintained
Drawbacks
- The bar for changing info for a device is higher - you need to go through the pmaports MR workflow now
- I would argue that this is a benefit, since it encourages higher quality changes
- Information wouldn't need to be updated often, known issues are bug reports on GitLab instead and not a MR to edit a markdown file
- We would probably lose out on some info in the migration process, but I think having a much cleaner Wiki and all the other benefits heavily outweigh this downside