01 - Introduction to PKGUPD

01 - Introduction to PKGUPD

A new package manager for rlxos

PKGUPD is a better package manager and successor of appctl in rlxos, PKGUPD aims to be a modular/extensible package manager whose functionality can be increase using the modules

Working

PKGUPD uses YAML configuration files named recipe file that contains a minimal set of information about the specific package or sub-packages. As per the information, PKGUPD performs the tasks and calls the specified modules.

PKGUPD support 2 types of extensions:

  • pack: This plugin provides a method to pack and unpack the binary packages that PKGUPD use to perform installations and package generation.
  • plugin: (I know bad naming) This provided methods to compile the source codes.

PKGUPD currently provided 4 plugins:

  • auto: Compilation plugin that can detect autogen.sh, configure, Makefile, CMakeLists.txt, meson.build and python setup.py
  • port: Another compilation plugin that uses appctl port (like PKGBUILD files in arch linux).
  • rlx: Packaging plugin that pack the binary packages in rlxos package format
  • app: Another packaging plugin for AppImages format.

Example Recipe file

id: example.package
version: 0.1.0
about: |
   Description about the package

pack: rlx
packages:
   - id: subpackage
     sources:
        - https://url.to/source/codes.tar.gz
        - custom-name.tar.xz::https://url.to/another/package.tar.gz
    dir: code
    plugin: auto
    flags:
        - id: configure
           value: >
               --enable-some-feature
NodeAbout
idName of recipe
versionVersion of recipe
aboutDescription about the recipe file
packplugin/module which is going the pack the output binary package
packagesList of packages the recipe file provides
sourcesList of source files require by all subpackages*
prescriptPrescript execute during precompilation*
postscriptPost Script execute during postcompilation*
preinstallScript execute during preinstallaton*
postinstallScript execute during post installation*
environList of strings to export environment variables*
usersList of users required by the package*
groupsList of groups required by the package*

Packages

NodeAbout
idName of package
dirDirectory name of source code
sourcesSource files url
pluginplugin that compile the source code into binary package
flagsflags that plugin intake to customize the compilation

Installation

sudo appctl sync
sudo appctl install pkgupd

Usage

pkgupd-0.1.0: an extensible package manager for rlxos

Usage: pkgupd [Sub] <pkgid> <Args>

Sub:
  install             install specified package from recipe dir
  depends             Resolve required dependencies
  remove              Remove specified application from system
  info                Print Information about pkgid
  require             Check which package require specified package
  sync                Synchronize local database with repositories

Args:
  --help              
  --debug             
  --compile           force pkgupd to compile package from source code
  --force             force task to do
  --no-depends        skip dependencies resolvement
  --all               Set ALL flag

File Hierarchy

DIR/FileDescription
/etc/pkgupd.ymlPKGUPD configuration file
/var/cache/pkgupd/recipesDefault path for recipe files
/var/cache/pkgupd/pkgsDefault path to store cache packages
/var/cache/pkgupd/srcDefault path to store source codes
/var/lib/pkgupd/dataDefault path to store information of installed packages
/usr/lib/pkgupdDefault path for PKGUPD plugins

Did you find this article valuable?

Support Manjeet Singh by becoming a sponsor. Any amount is appreciated!