Universal Source Manifest

Billy Barrow 574fbef674 Draft up new specification for repositories and complete packages. Add basic models (unused) for these specifications пре 7 месеци
scripts 180529cbea Fix acquire script пре 10 месеци
src 574fbef674 Draft up new specification for repositories and complete packages. Add basic models (unused) for these specifications пре 7 месеци
.gitignore 2aa0c9dcbb Initial commit пре 10 месеци
MANIFEST.usm 449925f716 More features пре 10 месеци
README.md 574fbef674 Draft up new specification for repositories and complete packages. Add basic models (unused) for these specifications пре 7 месеци

README.md

Universal Source Manifest

Manifest format (MANIFEST.usm)

{
  "name": "my-package",
  "version": "1.0.5+2",
  "summary": "A sample package",
  "licences": [ {"name": "GPLv3", "category": "libre", "text": "src/LICENSE"} ],
  "provides": {
    "bin:hello-world": "hello-world",
    "app:hello-world.desktop": "hello-world.desktop",
    "res:usr/share/icons/hicolor/scalable/hello-world.svg": "icons/hello-world.svg"
  },
  "depends": {
    "runtime": [
      "lib:libgtk-4.so.1",
    ],
    "build": [
      "bin:valac",
      "bin:meson",
      "inc:gtk-4.0"
    ],
    "manage": [
      "bin:bash"
    ]
  },
  "execs": {
    "install": "usp-exec/install",
    "remove": "usp-exec/remove",
    "build": "usp-exec/build",
    "rebuild": "usp-exec/rebuild"
  }
}

Optional extended properties

{
  "md": "src/DESCRIPTION.md",
  "url": "https://my.package.com",
  "screenshots": [ "hello-world-screenshot.png" ],
  "icon": "hello-world.svg",
  "git": { "origin": "https://git.my.package.com/hello-world", "commit": "8d9f3b198e3a767d41f3c33fac2fbd8496f23ed2" },
  "metainfo": "hello-world.appdata.xml",
  "extras": { "customData": "whatever" }
}

Resource types

  • "res": Generic resource: file path without leading "/"
  • "bin": Binary executable: file name locatable in $PATH
  • "lib": Shared library: file name locatable by LD
  • "app": Desktop entry: file name in /usr/share/applications
  • "inc": Include: file name in /usr/include

Source Repositories (Repo.usmr)

{
  "name": "my-repo",
  "summary": "My software repository",
  "url": "https://my.software/repository",
  "key": "EDXLsUvOZEne+xcv+huvSaqNBs8TTldCv6hd69GdmYw="
}

Source Repository listing (PACKAGES.usml)

Entries in JSON lines format:

{
  "type": "usmc",
  "manifest": {}, // Manifest object from MANIFEST.usm
  "path": "my-package.usmc", // Relative path to the package
  "sha512": "0+6QpQ5Wst2bPmAPYKO/RKrFYuq93rcaRs7tqt9lCo9zu8v6jpJsDqd7yPIqCWDt0KpOQ3uLK64Tmn9FYNw3eQ=="
}

Last line consists of the signatures for the repository

{
  "type": "signatures",
  "signatures": [
    {
      "key": "EDXLsUvOZEne+xcv+huvSaqNBs8TTldCv6hd69GdmYw=",
      "signature": "0rHQiDGKgumMK2S3B6D9jjU3NLnLLjijYJRvaB5vLbp4zxzjlixfyX8yfvvJUCCd34CC1STzyzawDtb9ZammCTE4zFHFdpnO8eseDS5OY+aKgAyL13oBGizvy/V0zGHVCdv83GQ7QUtgSWje0RKKk1zPGDAIF/prkurlFDgd3Vg="
    }
  ]
}

Complete package (package.usmc)

Complete package is simply a tar.xz file containing a MANIFEST.usm file and all the requisite files that would be acquired if the acquire script was run. That is to say, a USMC file could be created by simply running usm manifest acquire followed by tar -cJf ../package.usmc ..