Skip to content

Latest commit

 

History

History
99 lines (74 loc) · 3.27 KB

File metadata and controls

99 lines (74 loc) · 3.27 KB

amo

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.

Features

  • 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

Topic-update metadata is delivered through the PackageKit-style transaction flow rather than a direct JSON return:

  1. Call CreateTransaction on io.aosc.Amo1 to obtain a transaction object path (/io/aosc/Amo/Transaction/<id>), and subscribe to its TransactionEvent signal.
  2. Invoke Simulate or UpdatesList on that transaction object. The payload arrives as the Result variant of TransactionEvent (a JSON envelope tagged with "type": "result"), whose result field 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: true only when at least one matched TUM has security: true. Non-security TUM entries still appear in tum, but are not classified as important updates.

Dependencies

To build amo, the following are needed:

During runtime, D-Bus and systemd are required to launch it as a service.

Installation and Usage

  1. 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
  2. Build the binary:

    cargo build --release
  3. 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
  4. Enable and start amo.service:

    systemctl enable amo --now

License

oma is licensed under the GNU General Public License v3.0. See the COPYING file for details.