blue-build / website

Website that hosts BlueBuild documentation.
https://blue-build.org/
Apache License 2.0
6 stars 4 forks source link

feat: create a starlight plugin that fetches module reference pages (#3) #26

Closed xynydev closed 5 months ago

xynydev commented 5 months ago

This approach works really surprisingly well.

Here's the reference page for rpm-ostree:

image

And here's the module.yml it was generated from:

name: rpm-ostree
shortdesc: The rpm-ostree module offers pseudo-declarative package and repository management using rpm-ostree.
description: |
  The [`rpm-ostree`](https://coreos.github.io/rpm-ostree/) module offers pseudo-declarative package and repository management using `rpm-ostree`.

  The module first downloads the repository files from repositories declared under `repos:` into `/etc/yum.repos.d/`. The magic string `%OS_VERSION%` is substituted with the current VERSION_ID (major Fedora version), which can be used, for example, for pulling correct versions of repositories from [Fedora's Copr](https://copr.fedorainfracloud.org/).

  Then the module installs the packages declared under `install:` using `rpm-ostree install`, it removes the packages declared under `remove:` using `rpm-ostree override remove`. If there are packages declared under both `install:` and `remove:` a hybrid command `rpm-ostree remove <packages> --install <packages>` is used, which should allow you to switch required packages for other ones.

  Note that [removed packages are still present in the underlying ostree repository](https://coreos.github.io/rpm-ostree/administrator-handbook/#removing-a-base-package), what `remove` does is kind of like hiding them from the system, it doesn't free up storage space.

  Additionally, the `rpm-ostree` module supports a temporary (waiting for `rpm-ostree` issue [#233](https://github.com/coreos/rpm-ostree/issues/233)) fix for packages that install into `/opt/`. Installation for packages that install into folder names declared under `optfix:` are fixed using some symlinks.

  ## Known issues

  When removing certain packages, some problem probably in upstream `rpm-ostree` causes a `depsolve` issue similar to below.
  \```
  Resolving dependencies...done
  error: Could not depsolve transaction; 1 problem detected:
  Problem: conflicting requests
  \```
example: |
  type: rpm-ostree
  repos:
    - https://copr.fedorainfracloud.org/coprs/atim/starship/repo/fedora-%OS_VERSION%/atim-starship-fedora-%OS_VERSION%.repo # when including COPR repos, use the %OS_VERSION% magic string
    - https://pkgs.tailscale.com/stable/fedora/tailscale.repo
  install:
    - python3-pip
    - libadwaita
  remove:
    - firefox
    - firefox-langpacks
netlify[bot] commented 5 months ago

Deploy Preview for cozy-cascaron-6c7990 ready!

Name Link
Latest commit 17c58663e7c50fefd360eac66be3f437b2bc4ca5
Latest deploy log https://app.netlify.com/sites/cozy-cascaron-6c7990/deploys/65bf6859023cc30009d549e4
Deploy Preview https://deploy-preview-26--cozy-cascaron-6c7990.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.