💾 Archived View for lofi.haiku-os.org › docs › develop › build › repositories › README.gmi captured on 2023-09-28 at 15:48:51. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
The "build/jam/repositories/HaikuPorts" directory contains RemotePackageRepository files which detail packages and repositories leveraged during Haiku’s build process. While in the standard Haiku/HaikuPorts package repositories, older package builds are purged at intervals, the build package repositories have a stable set of packages required during the building and running of Haiku. This makes sure that non-recent source trees can be continued to build and run.
Warning: The URL packages are obtained from are determined by the sha256sum of the repository file. This means that when the *hardlink_packages.py* script is used to generate a new RemotePackageRepository jam file, it must not be modified in any way when committing it to the Haiku repository.
The actions require server access to Haiku’s kubernetes environment by a Haiku system administrator. Please contact the Haiku system administrators when it is necessary to create a new set of build packages.
Each RemotePackageRepository jam file in this directory is processed by src/tools/hardlink_packages.py on the HaikuPorts package server.
1. Latest RemotePackageRepository jam file in git is downloaded on package server.
2. Packages are added to HaikuPorts by automatic or manual means.
3. hardlink_packages is provided all the relevant directories and RemotePackageRepository file
4. hardlink_packages performs additional modification of the RemotePackageRepository and creates build repositories (
https://eu.hpkg.haiku-os.org/haikuports/master/build-packages/
)
5. The modified RemotePackageRepository file is copied back to the developers system and checked in to git.
Here is the fastest way to update this as of today. Improvements are needed. Replace (BUILDMASTER) and (ARCH) with the architecture you are creating the build-packages packages for.
(BUILDMASTER) is one of:
(ARCH) corresponds with the architectures. Note that where an ARCH like x86_64 might use an underscore, the BUILDMASTER will use dashes.
Run the following steps from the shell.
1. Log into the remote haikuporter buildmaster for the target architecture.
kubectl exec -it deployment/haikuporter -c buildmaster-(BUILDMASTER) -- sh
2. Get the current repository jam file for the platform that you want to update
wget https://git.haiku-os.org/haiku/plain/build/jam/repositories/HaikuPorts/(ARCH)
3. If it is necessary to add or remove packages, then make changes to the downloaded package file.
4. Make sure that all the scripts and tools can find the libraries.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
5. Run the *hardlink_packages.py* script to create a new build-packages repository and to update the package file.
/var/sources/haiku/src/tools/hardlink_packages.py \ (ARCH) \ /var/packages/repository/master/(ARCH)/current/packages/ \ /var/packages/build-packages/master/
6. Exit the container and return to your local machine.
exit
When the build-packages repository is created, and the RemotePackageRepository file is updated, it can be pulled to the local machine and be committed to the Haiku repository.
Run the following steps from the shell.
1. Fetch the remote file generated in the previous stage and copy it to the local machine.
kubectl cp -c buildmaster-(BUILDMASTER) \ $(kubectl get pods | grep haikuporter | awk ‘{ print $1 }’):./(ARCH) \ (ARCH)
2. Commit the updated repostory define *without modifying it* in any way.