HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog
wiki:HaikuPorterForPM

Context Navigation

  • ← Previous Version
  • View Latest Version
  • Next Version →


Version 2 (modified by zooey, 2 years ago) (diff)

--

HaikuPorter for Package Management

This page and its subpages describe the second version of HaikuPorter, which is intended to build packages for Haiku. Each reference to HaikuPorter here and on any of the subpages means that second incarnation, not the first version of HaikuPorter.

Introduction

HaikuPorter is a command line Python application that, using the information contained in a HaikuPort's build recipe file:

  • fetches one or more original source code archives
  • extracts these archives
  • patches the sources for compilation on Haiku
  • builds the software in a 'chroot()'-ed environment, which contains only packages required for building the port
  • creates one or more packages ('*.hpkg') for distribution

HaikuPorter can automatically resolve any dependencies on other HaikuPorts that have been declared in the recipe file, i.e. if any of the required packages are missing, the port that produces those packages will be built first.

HaikuPorter itself depends two things:

/etc/HaikuPorts.conf
Contains global HaikuPorter options
A ports tree
Contains recipe files for all the ports to be built

Build Recipe Files

For a particular version of a port a build recipe file specifies what packages shall be built for that port and the build recipe provides all required information for that purpose.

Ports and Packages

Each port will produce a set of packages, typically a base package containing the main binaries/libraries of the port plus a source and a debug package. Ports that provide libraries will usually provide an additional development package, too.

All the packages built by HaikuPorter are being collected in the 'packages'-folder of the ports tree.

The Package Repository

For each port, the most current version that has been marked as stable for the Haiku platform HaikuPorter is running on will be considered the active one. For all active ports, a .PackageInfo? file will be put into the 'repository'-folder of the ports tree. Only this set of active package-infos will be considered during dependency resolution.

The 'repository' folder defines which set of packages will finally be uploaded into the corresponding package repository (from where packages will be downloaded). Because of that, it is important that the set of packages in the repository folder is consistent with respect to declaration of provides, requires, conflicts, etc.

Packages for other versions of a port can be built, but only if their dependencies can be resolved by the repository. If that is not the case and you really need to build a specific version of a package, then you can do so by checking out a (git-)revision of the ports tree where that package version was the active one.

HaikuPorterForPM/HandlingRequirements

HaikuPorter

HaikuPorter is implemented in Python (dev-lang/python), so that is required. Only modules from Python's standard library are used, so no additional modules need to be installed.

Apart from Python, HaikuPorter itself requires the following programs/packages:

  • coreutils
  • git
  • tar
  • unzip
  • wget
  • XZ-utils (for a port that comes as a '*.xz' archive)
  • the sources of ports are only available as VCS-checkout, so any of these VCS might be required:
    • bzr
    • CVS
    • fossil
    • hg/Mercurial
    • svn/Subversion

Requirements defined by a recipe file

All packages listed as requirements in a port's RecipeFile? will be resolved automatically by HaikuPorter and the ports will be built in the correct order.

Usage

'haikuporter -h' will show usage info.

In order to build a port, just use 'haikuporter <portName>'

Download in other formats:

  • Plain Text

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/