]> git.djapps.eu Git - pkg/ggml/commitdiff
Make build-pbuilder more portable
authorMathieu Baudier <redacted>
Sun, 16 Feb 2025 13:01:35 +0000 (14:01 +0100)
committerMathieu Baudier <redacted>
Sun, 16 Feb 2025 13:01:35 +0000 (14:01 +0100)
README.md
sources/build-pbuilder

index d6adbd5230c13a560caeff6c8eed371e85004869..dcaac927667c47b239d9c0d5c78f8edb1e123c99 100644 (file)
--- a/README.md
+++ b/README.md
@@ -78,26 +78,33 @@ Push to remote repositories:
         "refs/tags/upstream/*"
 
 ### Using locally built packages
-Except for `ggml` itself, pbuilder/cowbuilder needs to be configured appropriately
+Except for the `ggml` layer itself, pbuilder/cowbuilder needs to be configured appropriately
  in order to use either a local repository with the `ggml` packages you just built,
  or a remote repository with the required `ggml`-related packages.
 
-To configure a local repository, update `/etc/pbuilderrc`. For example:
+Below is a basic approach to configure a local repository, as an illustration
+ to be adapted to your own build infrastructure and procedures.
+
+Update `/etc/pbuilderrc`. For example:
 
        ...
        BINDMOUNTS="/srv/repo/deb/bullseye/ml/1.1 /srv/repo/deb/bookworm/ml/1.1 /srv/repo/deb/sid/ml/1.1"
        ...
 
-and create a `create-pbuilder.settings` file which will be sourced by the script:
+and create a `create-pbuilder.settings` file which will be sourced by the `create-pbuilder` script:
+
+       export GIT_PBUILDER_OPTIONS="--aptcache /var/cache/pbuilder/aptcache --othermirror 'deb [trusted=yes] file:/srv/repo/deb/$DIST/ml/1.1/ ./'"
+
+Apply the same procedure for the `build-pbuilder` script by editing build-pbuilder.settings:
 
-       export GIT_PBUILDER_OPTIONS="--aptcache /var/cache/pbuilder/aptcache --othermirror 'deb [trusted=yes] file:/srv/repo/deb/$1/ml/1.1/ ./'"
+       export GIT_PBUILDER_OPTIONS="--aptcache /var/cache/pbuilder/aptcache --buildresult /srv/repo/deb/$DIST/ml/1.1/"
 
-The `Packages` file needs to be generated after each build. For example:
+Please note that the `Packages` file needs to be generated after each build. For example:
 
        cd /srv/repo/deb/sid/ml/1.1
        apt-ftparchive packages . > Packages
 
-(Or [hooks](https://wiki.debian.org/PbuilderTricks#How_to_include_local_packages_in_the_build) can be used.)
+Or [pbuilder hooks](https://wiki.debian.org/PbuilderTricks#How_to_include_local_packages_in_the_build) can be used.
 
 ## Development ##
 When developing the packaging, cd to a layer directory and [use git-buildpackage as usual](https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/).
index 23c4e6c88f267396fb6f3172dbb9e8eb61175ac8..74e89d490aea95ea343622c5a9d99a19aa39e73c 100755 (executable)
@@ -14,11 +14,14 @@ else
     DEBIAN_BRANCH=$3
 fi
 
+if [ -f "$(dirname $0)/$(basename $0).settings" ]; then
+. $(dirname $0)/$(basename $0).settings
+fi
+
 gbp buildpackage \
 --git-submodules \
 --git-ignore-branch \
 --git-debian-branch="$DEBIAN_BRANCH" \
 --git-pbuilder \
 --git-arch="$ARCH" \
---git-dist="$DIST" \
---git-pbuilder-options="--aptcache /var/cache/pbuilder/aptcache --buildresult $HOME/qa/git/argeo-qa-unstable/build/repo/deb/$DIST/ml/1.1"
+--git-dist="$DIST"