1HaikuPorts build-packages repository 2==================================== 3 4The ``build/jam/repositories/HaikuPorts`` directory contains 5RemotePackageRepository files which detail packages and repositories 6leveraged during Haiku’s build process. While in the standard Haiku/HaikuPorts 7package repositories, older package builds are purged at intervals, the build 8package repositories have a stable set of packages required during the building 9and running of Haiku. This makes sure that non-recent source trees can be 10continued to build and run. 11 12 Warning: The URL packages are obtained from are determined by the 13 sha256sum of the repository file. This means that when the 14 `hardlink_packages.py` script is used to generate a new 15 RemotePackageRepository jam file, it must not be modified in any way when 16 committing it to the Haiku repository. 17 18Prerequisites 19------------- 20 21The actions require server access to Haiku's kubernetes environment by a Haiku 22system administrator. Please contact the Haiku system administrators when it is 23necessary to create a new set of build packages. 24 25Updating 26-------- 27 28Each RemotePackageRepository jam file in this directory is processed by 29src/tools/hardlink_packages.py on the HaikuPorts package server. 30 311) Latest RemotePackageRepository jam file in git is downloaded on 32 package server. 332) Packages are added to HaikuPorts by automatic or manual means. 343) hardlink_packages is provided all the relevant directories and 35 RemotePackageRepository file 364) hardlink_packages performs additional modification of the 37 RemotePackageRepository and creates build repositories 38 (https://eu.hpkg.haiku-os.org/haikuports/master/build-packages/) 395) The modified RemotePackageRepository file is copied back to the 40 developers system and checked in to git. 41 42Container Process 43----------------- 44 45Here is the fastest way to update this as of today. Improvements are 46needed. Replace (BUILDMASTER) and (ARCH) with the architecture you are creating 47the build-packages packages for. 48 49(BUILDMASTER) is one of: 50 51* x86-64 52* x86 53 54(ARCH) corresponds with the architectures. Note that where an ARCH like x86_64 55might use an underscore, the BUILDMASTER will use dashes. 56 57 58Prepare the build-packages repository 59------------------------------------- 60 61Run the following steps from the shell. 62 63#. Log into the remote haikuporter buildmaster for the target architecture. 64 65 .. code-block:: bash 66 67 kubectl exec -it deployment/haikuporter -c buildmaster-(BUILDMASTER) -- sh 68 69#. Get the current repository jam file for the platform that you want to update 70 71 .. code-block:: bash 72 73 wget https://git.haiku-os.org/haiku/plain/build/jam/repositories/HaikuPorts/(ARCH) 74 75#. If it is necessary to add or remove packages, then make changes to the 76 downloaded package file. 77#. Make sure that all the scripts and tools can find the libraries. 78 79 .. code-block:: bash 80 81 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 82 83#. Run the `hardlink_packages.py` script to create a new build-packages 84 repository and to update the package file. 85 86 .. code-block:: bash 87 88 /var/sources/haiku/src/tools/hardlink_packages.py \ 89 (ARCH) \ 90 /var/packages/repository/master/(ARCH)/current/packages/ \ 91 /var/packages/build-packages/master/ 92 93#. Exit the container and return to your local machine. 94 95 .. code-block:: bash 96 97 exit 98 99 100Pull the repostory file and commit it 101------------------------------------- 102 103When the build-packages repository is created, and the RemotePackageRepository 104file is updated, it can be pulled to the local machine and be committed to the 105Haiku repository. 106 107Run the following steps from the shell. 108 109#. Fetch the remote file generated in the previous stage and copy it to the 110 local machine. 111 112 .. code-block:: bash 113 114 kubectl cp -c buildmaster-(BUILDMASTER) \ 115 $(kubectl get pods | grep haikuporter | awk ‘{ print $1 }’):./(ARCH) \ 116 (ARCH) 117 118#. Commit the updated repostory define *without modifying it* in any way. 119