# Universal Source Manifest ## Manifest format (MANIFEST.usm) ```json { "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 ```json { "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) ```json { "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: ```json { "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 ```json { "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 .`. ## USM Directory /var/usm - /packages - /packagename-0.1.1 - /origin-info - /package.usmc - /build-log (when built) - /build.tar.xz (when built) - /build (when building) - /installed - /packagename-0.1.1 (symlink to /var/usm/packages/packagename-0.1.1) - /lists - /repositoryname - /2020-03-20T14:28:23.382748.usml - /2020-03-20T14:34:42.382748.usml - /transactions - 2020-03-21T14:28:23.382748 - 2020-03-23T14:23:43.382748 ### Origin info format ```json { "repository": "repositoryname", "listfile": "2020-03-20T14:34:42.382748.usml", "original_path": "packagename-0.1.1.usmc", "signature_verified": true } ``` ### Transaction format ```json { "complete": true, // False when in progress "snapshot": "snapshot path", // For later when BTRFS snapshotting implemented, for rollbacks "operations": [ { "operation": "install", // or "remove" "package": { "name": "packagename", "version": "0.1.1" }, "origin" { "repository": "repositoryname", "listfile": "2020-03-20T14:34:42.382748.usml", "original_path": "packagename-0.1.1.usmc", "signature_verified": true } } ] } ```