Run oma as D-Bus service.
amo is a project similar to PackageKit - it runs as a D-Bus/systemd service and serves as a backend to oma.
This project currently aids in accelerating oma functions and will serve as backend for aoska (application store for AOSC OS) down the line.
- Cache for Package catalogues (
Contents,Packages, etc.), enabling accelerated queries for package names, descriptions, contents, and transaction history, etc. in oma. - Initiating metadata refresh and package installation/removal/upgrade via oma API.
- Matching transactions against AOSC OS Topic Update Manifests (TUM), including localized topic details and security-update classification.
Topic-update metadata is delivered through the PackageKit-style transaction flow rather than a direct JSON return:
- Call
CreateTransactiononio.aosc.Amo1to obtain a transaction object path (/io/aosc/Amo/Transaction/<id>), and subscribe to itsTransactionEventsignal. - Invoke
SimulateorUpdatesListon that transaction object. The payload arrives as theResultvariant ofTransactionEvent(a JSON envelope tagged with"type": "result"), whoseresultfield carries the response.
The result JSON keeps oma's existing transaction fields and adds:
tum: matched topic updates, including their ID, type, localized name and caution maps, affected packages/topics, package count, and security flag.has_important_updates:trueonly when at least one matched TUM hassecurity: true. Non-security TUM entries still appear intum, but are not classified as important updates.
To build amo, the following are needed:
- libapt-pkg (part of APT)
- LLVM and Clang
- Nettle (recommended) or OpenSSL
- Rustc and Cargo
- pkg-config or pkgconf
During runtime, D-Bus and systemd are required to launch it as a service.
-
Install build dependencies:
apt install build-essential zlib1g-dev libssl-dev pkgconf nettle-dev libapt-pkg-dev curl xz-utils clang libbz2-dev liblzma-dev curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin cargo install cargo-deb
-
Build the binary:
cargo build --release
-
Install the binary and configurations:
install -Dvm755 ./target/release/amo \ /usr/libexec/amo install -Dvm644 ./data/amo.service \ /etc/systemd/system/amo.service install -Dvm644 ./data/io.aosc.Amo.conf \ /usr/share/dbus-1/system.d/io.aosc.Amo.conf install -Dvm644 ./data/io.aosc.amo.apply.policy \ /usr/share/polkit-1/actions/io.aosc.amo.apply.policy install -Dvm644 ./data/20amo \ /etc/apt/apt.conf.d/20amo -
Enable and start
amo.service:systemctl enable amo --now
oma is licensed under the GNU General Public License v3.0. See the COPYING file for details.