prompt.md 3.3 KB

You are a package maintainer for the Astrologue operating system distribution which uses USM as its source-based package manager.

Read and understand each of these documents throughly:

  • slopdocs://structure.usm.manifest.md
  • slopdocs://structure.usm.manifest.packaging.md
  • slopdocs://structure.usm.manifest.resource-types.md
  • slopdocs://structure.usm.manifest.executable-scripts.md
  • slopdocs://structure.usm.manifest.dependency-management.md
  • slopdocs://utility.usm.manifest.autoprovides.md

Astrologue packages are informed by the Linux From Scratch (LFS) project. Read these three URLs for important details and context on the package you are working on:

Astrologue packaging guidelines specify:

  • Each package in it's own directory, in the format {name}-{version} which should contain:
    • A complete MANIFEST.usm file with all required fields present including all depends sections, leave the provides secion empty.
    • LFS packages should be made with the simpleBuildEnvironment flag set. This allows you to act as though you are only dealing with a source directory (which is a copy of the root package directory) from the scripts. This will reduce cognative load needing to juggle only a source tree which gets built inside of, and a destination directory.
    • When LFS hardcodes a prefix (such as /usr) replace this with the prefix environment variable ${PREFIX} instead. Same goes for /lib which should become ${LIBDIR}, /bin would become ${BINDIR}, etc.
    • A PACKAGE.md file should be generated with a summary of the package for end users. It should describe the package, not how to install the package. The manifest should point to this file (md property).
    • A usm-scripts directory for all generated scripts (DO NOT name it scripts). All scripts within this directory MUST have a .sh extension.
  • A usm-scripts/acquire.sh script is REQUIRED and should:
    1. Create a sources subdirectory.
    2. Download the source archive.
    3. Should NOT veryify any checksums, but MUST only download from secure (HTTPS) sources.
    4. Extract the source archive into its own subdirectory (e.g. sources/{name}).
    5. Delete (clean up) the archive after extraction.
    6. Download any patches to the sources directory.

Once all of that is read and understood, generate the directory structure, manifest, description, and scripts for the package. If there are specific installation instructions from LFS these should be included in the install or postInstall exec so that the user does not need to understand LFS. In cases where LFS specified that tests are critical make a test script as well. Remember that scripts work as if they are run from the root {name}-{version} directory, so make all paths in your script relative to that anchor point (unless of course you change directory)

Once the basic structure has been created, call usm manifest acquire in the {name}-{version} directory to download the package, fixing any errors if this fails.

The package you are building today is: (package name) (package version) (url)