Browse Source

docs: update package creation workflow and add validation step

- Add manifest validation step before compliance verification
- Update `acquire.sh` guidance to change directory early on
- Add reference to validate.md documentation in USM Documentation
- Reorder workflow steps to ensure manifest validation happens before
  final compliance check
clanker 1 month ago
parent
commit
6a17dfe550

+ 76 - 0
bzip2-1.0.8/MANIFEST.usm

@@ -0,0 +1,76 @@
+{
+  "provides" : {
+    "bin:bzgrep" : "as-expected",
+    "rootpath:usr/man/man1/bzgrep.1" : "as-expected",
+    "bin:bzip2recover" : "as-expected",
+    "bin:bzip2" : "as-expected",
+    "bin:bunzip2" : "as-expected",
+    "inc:bzlib.h" : "as-expected",
+    "rootpath:usr/man/man1/bzip2.1" : "as-expected",
+    "bin:bzegrep" : {
+      "dest" : "/tmp/df00c532-3f5c-4c1d-98ec-8a236149b0bc//usr//bin/bzgrep",
+      "type" : "lnk",
+      "pathBase" : "as-expected"
+    },
+    "bin:bzfgrep" : {
+      "dest" : "/tmp/df00c532-3f5c-4c1d-98ec-8a236149b0bc//usr//bin/bzgrep",
+      "type" : "lnk",
+      "pathBase" : "as-expected"
+    },
+    "bin:bzmore" : "as-expected",
+    "bin:bzless" : {
+      "dest" : "/tmp/df00c532-3f5c-4c1d-98ec-8a236149b0bc//usr//bin/bzmore",
+      "type" : "lnk",
+      "pathBase" : "as-expected"
+    },
+    "bin:bzcat" : "as-expected",
+    "bin:bzdiff" : "as-expected",
+    "rootpath:usr/man/man1/bzmore.1" : "as-expected",
+    "rootpath:usr/man/man1/bzegrep.1" : "as-expected",
+    "rootpath:usr/man/man1/bzfgrep.1" : "as-expected",
+    "rootpath:usr/man/man1/bzless.1" : "as-expected",
+    "bin:bzcmp" : {
+      "dest" : "/tmp/df00c532-3f5c-4c1d-98ec-8a236149b0bc//usr//bin/bzdiff",
+      "type" : "lnk",
+      "pathBase" : "as-expected"
+    },
+    "rootpath:usr/man/man1/bzdiff.1" : "as-expected",
+    "canonlib:libbz2.a" : "as-expected",
+    "rootpath:usr/man/man1/bzcmp.1" : "as-expected"
+  },
+  "flags" : [
+    "simpleBuildEnvironment"
+  ],
+  "summary" : "High-quality data compression program",
+  "name" : "bzip2",
+  "md" : "PACKAGE.md",
+  "depends" : {
+    "build" : [
+      "bin:gcc",
+      "bin:make"
+    ],
+    "runtime" : [
+      "lib:libc.so.6"
+    ],
+    "manage" : [
+      "bin:gzip",
+      "bin:wget",
+      "bin:tar"
+    ]
+  },
+  "url" : "https://sourceware.org/bzip2/",
+  "version" : "1.0.8",
+  "licences" : [
+    {
+      "category" : "open-source",
+      "name" : "bzip2 License",
+      "text" : "sources/bzip2-1.0.8/LICENSE"
+    }
+  ],
+  "execs" : {
+    "build" : "usm-scripts/build.sh",
+    "test" : "usm-scripts/test.sh",
+    "install" : "usm-scripts/install.sh",
+    "acquire" : "usm-scripts/acquire.sh"
+  }
+}

+ 36 - 0
bzip2-1.0.8/PACKAGE.md

@@ -0,0 +1,36 @@
+# bzip2
+
+bzip2 is a high-quality data compression program that provides excellent compression ratios and is widely used for compressing large files. It uses the Burrows-Wheeler block sorting text compression algorithm and Huffman coding.
+
+## Features
+
+- Excellent compression ratios (typically 10-15% better than gzip)
+- Fast compression and decompression speeds
+- Small memory footprint
+- Cross-platform compatibility
+- Robust error recovery with bzip2recover utility
+
+## Included Programs
+
+- **bzip2**: Main compression/decompression utility
+- **bunzip2**: Decompression utility (symlink to bzip2)
+- **bzcat**: Decompression to stdout utility (symlink to bzip2)
+- **bzip2recover**: Data recovery utility for damaged files
+- **bzgrep**: Grep utility for bzip2 compressed files
+- **bzmore**: More utility for viewing bzip2 compressed files
+- **bzless**: Less utility for viewing bzip2 compressed files
+- **bzdiff**: Diff utility for bzip2 compressed files
+- **bzcmp**: Compare utility for bzip2 compressed files
+
+## Library
+
+- **libbz2.a**: Static library for developing applications with bzip2 support
+- **bzlib.h**: Header file for libbz2 library
+
+## Manual Pages
+
+Comprehensive manual pages are included for all utilities, providing detailed usage instructions and examples.
+
+## License
+
+bzip2 is released under a permissive BSD-style license that allows for free use, modification, and distribution while requiring preservation of copyright notices.

+ 20 - 0
bzip2-1.0.8/usm-scripts/acquire.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+set -e
+
+# Create sources directory if it doesn't exist
+mkdir -p sources
+
+# Download the source archive
+echo "Downloading bzip2 source..."
+wget -O sources/bzip2-1.0.8.tar.gz https://www.sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz
+
+# Extract the archive
+echo "Extracting bzip2 source..."
+cd sources
+tar -xzf bzip2-1.0.8.tar.gz
+
+# Clean up the archive
+echo "Cleaning up..."
+rm bzip2-1.0.8.tar.gz
+
+echo "Source acquisition complete."

+ 19 - 0
bzip2-1.0.8/usm-scripts/build.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+set -e
+
+# With simpleBuildEnvironment flag, we're already in build directory
+# which is a copy of the source tree
+build_dir=$1
+
+# Change to the bzip2 source directory
+cd sources/bzip2-1.0.8
+
+# Build bzip2 using make
+echo "Building bzip2..."
+make -f Makefile -j$(nproc)
+
+# Run tests to ensure the build is working
+echo "Running tests..."
+make -f Makefile test
+
+echo "Build and tests complete."

+ 19 - 0
bzip2-1.0.8/usm-scripts/install.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+set -e
+
+build_dir=$1
+install_dir=$2
+install_type=$3
+
+# With simpleBuildEnvironment flag, we're already in build directory
+# which is a copy of the source tree
+
+# Change to the bzip2 source directory
+cd sources/bzip2-1.0.8
+
+echo "Installing bzip2..."
+
+# Install using the Makefile with proper variables
+make -f Makefile PREFIX=${DESTDIR}${PREFIX} install
+
+echo "Installation complete."

+ 16 - 0
bzip2-1.0.8/usm-scripts/test.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+set -e
+
+# With simpleBuildEnvironment flag, we're already in build directory
+# which is a copy of the source tree
+build_dir=$1
+
+# Change to the bzip2 source directory
+cd sources/bzip2-1.0.8
+
+echo "Running bzip2 tests..."
+
+# Run the test suite that's included in the Makefile
+make -f Makefile test
+
+echo "All tests passed successfully."

+ 4 - 2
prompt.md

@@ -10,6 +10,7 @@ USM Documentation:
 - slopdocs://structure.usm.manifest.executable-scripts.md
 - slopdocs://structure.usm.manifest.executable-scripts.md
 - slopdocs://structure.usm.manifest.dependency-management.md
 - slopdocs://structure.usm.manifest.dependency-management.md
 - slopdocs://utility.usm.manifest.autoprovides.md
 - slopdocs://utility.usm.manifest.autoprovides.md
+- slopdocs://utility.usm.manifest.validate.md
 
 
 Package Specific Resources:
 Package Specific Resources:
 - Package Homepage (see below)
 - Package Homepage (see below)
@@ -39,7 +40,7 @@ Package Specific Resources:
    - Use relative paths from `{name}-{version}` root
    - Use relative paths from `{name}-{version}` root
    - Include proper error handling
    - Include proper error handling
    - `acquire.sh` must download via HTTPS only, extract to `sources/{name}`, clean up
    - `acquire.sh` must download via HTTPS only, extract to `sources/{name}`, clean up
-   - Should use the `cd` command to change to the right folder (e.g. `cd sources/{name}`)
+   - Should use the `cd` command to change to the right folder (e.g. `cd sources/{name}`) early on
    - Use all threads to build when possible
    - Use all threads to build when possible
    - Should stay as true as possible to the installation instructions
    - Should stay as true as possible to the installation instructions
 
 
@@ -67,7 +68,8 @@ Package Specific Resources:
 8. Verify `provides` was populated correctly. Missing entries indicate a problem with the `install` script.
 8. Verify `provides` was populated correctly. Missing entries indicate a problem with the `install` script.
 9. Fix any errors
 9. Fix any errors
 10. Write a friendly `PACKAGE.md`
 10. Write a friendly `PACKAGE.md`
-11. Verify compliance with Astrologue standards
+11. Validate the manifest with `usm manifest validate`
+12. Verify compliance with Astrologue standards
 
 
 **PACKAGE SPECIFICATION:**
 **PACKAGE SPECIFICATION:**