Skip to content

lodosgroup/lpm


This is the main source code repository for Lod Package Manager.

Quickstart

Package install and delete demonstration in docker

lpm-demo

Install with Cargo

To install LPM from a specific branch, run the following command:

cargo install --git https://github.com/lodosgroup/lpm --branch main

Alternatively, you can install it from tags:

cargo install --git https://github.com/lodosgroup/lpm --branch <tag>

To confirm a successful LPM installation, simply execute the lpm -v or lpm --version command.

Build LPM from Source

If you prefer building LPM from its source code (usually preferred for development), follow these steps:

  1. Clone the lpm repository from GitHub:

    git clone https://github.com/lodosgroup/lpm
  2. Change into the cloned repository directory:

    cd lpm
  3. Build the lpm executable:

    cargo build --release # exclude the `--release` flag for debugging

After the building, you will be able to use the lpm executable undertarget/{debug/release} directory.

Try in Docker

You don't need to install LPM on your host system just to play with it. You can use the docker image instead:

docker run -it ozkanonur/lpm:alpha

If you want to do some benchmarking with perf tool, you may need to add --privileged flag:

docker run -it --privileged ozkanonur/lpm:alpha

Now, you can play with LPM as you like in the container without touching your host system.

Database and Repository Setup (ignore this step if using docker):

  1. Migrate LPM database:

    The first step is to migrate the LPM database. This process initializes the core database files required for LPM to function effectively.

    sudo lpm --update --db
  2. Add repository:

    Adding a repository is essential for LPM to access and manage packages. A repository acts as the source of packages for your system. Let's add the linux-amd64-default repository as an example.

    # args: <repository-name> <repository-url>
    sudo lpm --repository --add linux-amd64-default linux-amd64-default.lpm.lodosgroup.org

    Once you've added the repository, LPM will synchronize with the package indexes sourced from the added repository. This indicates that you are all set to install packages.

Basic Usage

  1. Install a package:

    Installing packages using LPM is straightforward. Simply use the following command, replacing with the name of the package you want to install.

    # args: <package-name>
    sudo lpm --install lzip

    To confirm the successful completion of the installation, you can check by running the command lzip --version.

  2. Delete the installed package:

    If you want to delete a package from your system, use the delete command followed by the package name.

    # args: <package-name>
    sudo lpm --delete lzip

These steps cover the basic operations to quickly start using the LOD Package Manager. You can explore the advanced features of LPM from the docs at https://lpm.lodosgroup.org.