Skip to content

The tool that builds HaikuPorts recipes.

License

Notifications You must be signed in to change notification settings

X547/haikuporter

This branch is 1 commit ahead of, 8 commits behind haikuports/haikuporter:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1031eac · Jan 26, 2025
Oct 9, 2023
Jan 26, 2025
Jan 10, 2025
Aug 10, 2024
Oct 26, 2024
Oct 9, 2023
Jan 19, 2024
Jan 24, 2022
Jun 30, 2015
Jul 21, 2023
Jan 23, 2022
Jul 21, 2023
Jan 8, 2025
Jul 21, 2023
Jul 26, 2023
Jul 21, 2023
Jul 26, 2023
Jul 21, 2023
Sep 11, 2024
Oct 9, 2023

Repository files navigation

HaikuPorter

The HaikuPorter tool is provided to ease the fetching, patching and building of source code. It can be compared to a slim version of Gentoo Portage. Each port contains the Haiku specific patches to the original source code. It fetches the original source code, applies the Haiku-specific patches, builds the software, and packages it.

Detailed information available on the wiki.

Quick start

Single Machine (Haiku)

A single machine installation is for building individual packages.

Installation (Haiku)

HaikuPorts installation can be done via the following command sequence:

 $ git clone https://github.com/haikuports/haikuporter.git
 $ git clone https://github.com/haikuports/haikuports.git --depth=10
 $ cd haikuporter
 $ cp haikuports-sample.conf /boot/home/config/settings/haikuports.conf # Copy the config file
 $ lpe ~/config/settings/haikuports.conf # and edit it

Build port

  • ./haikuporter mesa -j4

Build port and all outdated dependency ports

  • ./haikuporter mesa --all-dependencies -j4

Multi-node cluster (Linux + Haiku)

A multi-node cluster is for mass building large numbers of packages.

Running buildmaster in a container with docker

  • docker pull ghcr.io/haikuports/haikuporter/buildmaster
  • mkdir ~/buildmaster.x86
  • docker run -v ~/buildmaster.x86:/data -it -e ARCH=x86 ghcr.io/haikuports/haikuporter/buildmaster
  • Provision builders
    • createbuilder -n test01 -H 127.0.0.1
    • copy generated public key to builder
    • builderctl health
  • (builders can also use a jumphost by adding jumpHost, jumpUser, jumpPort, jumpPrivateKeyFile to the builder config)
  • exit
  • Copy the packages from a nightly to ports/packages on the buildmaster
  • docker run -v ~/buildmaster.x86:/data -it -e ARCH=x86 ghcr.io/haikuports/haikuporter/buildmaster
  • buildmaster everything

buildmaster.x86 will persist between build runs. Feel free to exit, update, or erase the container without losing your work.

Manually Deploy buildmaster (Linux)

  • Install requirements
    • pip install paramiko or dnf install python-paramiko
    • buildtools dependencies: autoconf, flex, bison, texinfo, zlib-devel
    • Haiku host tools dependencies: libstdc++-static, libcurl-devel
  • Bootstrap the buildmaster instance
    • git clone https://github.com/haikuports/haikuporter.git
    • ./haikuporter/buildmaster/bin/bootstrap_buildmaster.sh ...
  • Configure your builders within instance ports tree with createbuilder
    • cd buildmaster_<arch>/haikuports
    • example: ../haikuporter/buildmaster/bin/createbuilder -n mybuilder01 -H 127.0.0.1
  • Validate and provision your builders
    • ../haikuporter/buildmaster/bin/builderctl health
    • ../haikuporter/buildmaster/bin/builderctl provision
  • ../haikuporter/buildmaster/bin/buildmaster everything

Deploy builder (Haiku)

  • Checkout Haikuporter and Haikuports, matching the paths specified in createbuilder on buildmaster side
  • Add the public key from the buildmaster to authorized_keys
  • useradd sshd ; ssh-keygen -A
  • Enable PermitRootLogin in /system/settings/ssh/sshd_config and make sure the path to the sftp server is correct
  • install xz_utils_x86, lzip_x86 (required for extracting packages), patch, dos2unix (required for PATCH() function in some packages)

Making a release of haikuporter

  • Be sure version.py , pyproject.toml is set to the next version of haikuporter and changes are pushed
  • Draft a new release version matching what's in version.py, pyproject.toml
  • Once a new release is made in github, bump the versions in version.py , pyproject.toml to the NEXT version
  • The buildmaster containers are generally updated out-of-band as they receive updates less often
    • Version numbers in buildmaster/*/Makefile should follow the same process as above ideally
    • Ideally, we would rebuild the buildmaster containers every release, but not a requirement

About

The tool that builds HaikuPorts recipes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 83.6%
  • Shell 8.4%
  • JavaScript 4.0%
  • HTML 1.8%
  • CSS 1.6%
  • Dockerfile 0.5%
  • Makefile 0.1%