Universal Source Manifest

Billy Barrow 9c4ecd8e2d Broken 6 tháng trước cách đây
scripts 180529cbea Fix acquire script 10 tháng trước cách đây
src 9c4ecd8e2d Broken 6 tháng trước cách đây
.gitignore 2aa0c9dcbb Initial commit 10 tháng trước cách đây
MANIFEST.usm 449925f716 More features 10 tháng trước cách đây
README.md 66f405e522 Add ability to read manifest from USMC packages. Add usm info command 7 tháng trước cách đây

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

  • "rootpath": Generic resource: file on root filesystem without leading "/"
  • "path": Generic resource: file name locatable /usr directory
  • "opt": Optional software: file name locatable /opt directory
  • "res": Generic resource: resource under /usr/share directory
  • "cfg": Configuration file: file name locatable /etc directory
  • "bin": Binary executable: file name locatable in $PATH
  • "sbin": Binary executable: file name locatable in /usr/sbin or /sbin
  • "lib": Shared library: file name locatable by LD
  • "libexec": Binary executable: file name locatable in /usr/libexec
  • "libres": Generic resource: file name locatable /usr/lib, /usr/lib64, /lib, or /lib64 directories
  • "info": Information page: file name locatable /usr/share/info
  • "man": Manual page: file name locatable /usr/share/man
  • "locale": Locale: file name locatable /usr/share/locale
  • "app": Desktop entry: file name locatable in /usr/share/applications
  • "inc": Include: file name in /usr/include
  • "pc": Package config: file name locatable in $PKG_CONFIG_PATH
  • "vapi": Vala API: file name in /
  • "gir": GObject introspection: file name locatable in /usr/share/gir
  • "typelib": GObject typelib: file name locatable in /usr/lib64/girepository-1.0, /usr/lib/girepository-1.0, /lib64/girepository-1.0, or /lib/girepository-1.0

Source Repositories (Repo.usmr)

{
  "name": "my-repo",
  "summary": "My software repository",
  "uris": [
    "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 ..