Top Menu

Jump to content
  • Package manager
    • View all projects
Home
    • Work packages
    • News
    • Getting started
    • Introduction video
    • Welcome to OpenProject

      Get an overview

      Get a quick overview of project management and team collaboration with OpenProject.
      You can restart this video from the help menu

    • Help and support
    • Upgrade to Enterprise Edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Professional support

    • Additional resources
    • Data privacy and security policy
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Create a new account
      Forgot your password?

Side Menu

  • Overview
  • Activity
  • Work packages
  • News
  • Forums
  • Repository
  • Wiki
    • Table of contents
      • Expanded. Click to collapseCollapsed. Click to showWiki
        • Hierarchy leafCaches and Metadata locations
        • Hierarchy leafConfiguring pkgmanager
        • Hierarchy leafHelp
        • Hierarchy leafInstalling new software
        • Expanded. Click to collapseCollapsed. Click to showPackaging new software
          • Hierarchy leafPackage structure and metadata
          • Hierarchy leaftxz format
        • Hierarchy leafRemoving software
        • Hierarchy leafUpgrading software
You are here:
  • Wiki
  • Configuring pkgmanager

Content

Configuring pkgmanager

  • More
    • Table of contents

Repository setup (Client side)

pkgmanager is shipped with default repository configs which refers to official TankOS repository.

cat /etc/pkgmanager/ftp.tankos.org.conf
[ftp.tankos.org]
URL=ftp://ftp.tankos.org
priority=0

[ftp.tankos.org] represents the name of the repository.

URL defines the path and protocol. FTP, FTPS, HTTP and HTTPS are supported

priority - priority of the repository while resolving package names. Low priority results in behavior when a package is only downloaded from the low priority repo if it's not present anywhere else.

Repository setup (Server side)

To set up a TankOS compatible repository it's needed that:

  • A folder with packages to be published is present
  • The folder is made available for anonymous read via FTP, FTPS, HTTP or HTTPS
  • A list of packages is generated as shown
-rw-rw-r-- ./path/package-1.2.1-x86_64-2_tank.txz
  • A sha256 sum is placed next to each package. It's necessary for final sum checks on client side
./path/package-1.2.1-x86_64-2_tank.SHA256

Postinstall execution hooks

Various updates and file changes require commands to be run when all new files are finally in place. This requires a mechanism that is triggered only at certain circumstances.

pkgmanager looks at hooks in /etc/pkgmanager/hooks as for the last step before an upgrade or an installation of a new software package can be considered as done. Each hook is a script that reads input from stdin and does some action. Pkgmanager gives the complete list of modified and new files as an input arguments.
Take a look at the example:

#!/bin/bash

if cat $1 | egrep -q '^/usr/share/glib-2.0/schemas'; then

	glib-compile-schemas /usr/share/glib-2.0/schemas

fi

This code will be executed only if we had any files changed in /usr/share/glib-2.0/schemas.

Loading...