Browse Source

added archbuild_chroots parameter for separating slaves

Andreas Baumann 3 months ago
parent
commit
c3b83eb598
3 changed files with 7 additions and 4 deletions
  1. 3
    3
      bin/build-packages
  2. 3
    0
      conf/slave.conf.example
  3. 1
    1
      lib/load-configuration

+ 3
- 3
bin/build-packages View File

@@ -469,9 +469,9 @@ while [ "${count}" -ne 0 ] && \
469 469
 
470 470
         if echo "${straw}" | \
471 471
           grep -qF ':clean_chroot:'; then
472
-          outerParameters='-c'
472
+          outerParameters="-c -r ${archbuild_chroots}"
473 473
         else
474
-          outerParameters=''
474
+          outerParameters="-r ${archbuild_chroots}"
475 475
         fi
476 476
 
477 477
         innerParameters='--nocolor'
@@ -538,7 +538,7 @@ while [ "${count}" -ne 0 ] && \
538 538
           # sometimes it is necessary to manually remove the root/ build
539 539
           # directory (due to leftover mounts of /run) - so we just do
540 540
           # it everytime '-c' is set
541
-          recursively_umount_and_rm '/var/lib/archbuild/'"${build_command%-build}"
541
+          recursively_umount_and_rm "${archbuild_chroots}/""${build_command%-build}"
542 542
         fi
543 543
 
544 544
         echo 'building' > "${tmp_dir}/.ping-build-master"

+ 3
- 0
conf/slave.conf.example View File

@@ -36,3 +36,6 @@
36 36
 # e.g. the one from /etc/pacman.d/mirrorlist32 (useful on build slaves which do not
37 37
 # have the master mirror in the mirrorlist32)
38 38
 #mirror_update_command=''
39
+
40
+# where are the archbuild chroots stored
41
+archbuild_chroots='/var/lib/archbuild/'

+ 1
- 1
lib/load-configuration View File

@@ -129,7 +129,7 @@ fi
129 129
 
130 130
 if ! ${i_am_the_master} && \
131 131
   [ -r "${base_dir}/conf/slave.conf" ]; then
132
-  # shellcheck source=/dev/null
132
+  # shellcheck source=../conf/slave.conf.example
133 133
   . "${base_dir}/conf/slave.conf"
134 134
 fi
135 135