diff options
-rw-r--r-- | distbuild.configure | 45 | ||||
-rw-r--r-- | distbuild/manifest | 28 |
2 files changed, 41 insertions, 32 deletions
diff --git a/distbuild.configure b/distbuild.configure index 062aaecc..1499c679 100644 --- a/distbuild.configure +++ b/distbuild.configure @@ -40,6 +40,44 @@ set -e +ROOT="$1" + +########################################################################## +# Copy Distbuild files into root filesystem +########################################################################## + +mkdir -p "$ROOT"/usr/share/distbuild-setup +for file in morph.conf morph-cache-server.conf morph-controller.conf \ + morph-controller-helper.conf morph-worker.conf morph-worker-helper.conf; do + + cp distbuild/usr/share/distbuild-setup/$file \ + "$ROOT"/usr/share/distbuild-setup/ +done + + +mkdir -p "$ROOT"/usr/lib/distbuild-setup/ansible +for file in hosts distbuild-setup; do + + cp distbuild/usr/lib/distbuild-setup/ansible/$file \ + "$ROOT"/usr/lib/distbuild-setup/ansible/ +done + + +mkdir -p "$ROOT"/usr/lib/systemd/system/ +for file in morph-cache-server.service morph-controller.service \ + morph-controller-helper.service morph-worker.service \ + morph-worker-helper.service distbuild-setup.service; do + + cp distbuild/usr/lib/systemd/system/$file \ + "$ROOT"/usr/lib/systemd/system/ +done + +ln -s ../distbuild-setup.service "$ROOT"/etc/systemd/system/multi-user.target.wants/distbuild-setup.service + +########################################################################## +# Check variables +########################################################################## + if [ -n "$DISTBUILD_GENERIC" ]; then echo "Not configuring the distbuild node, it will be generic" exit 0 @@ -95,20 +133,19 @@ if "$error_vars"; then fi -ROOT="$1" +########################################################################## +# Generate configuration for the distbuild node +########################################################################## DISTBUILD_DATA="$ROOT/etc/distbuild" mkdir -p "$DISTBUILD_DATA" -# If it's a worker, install the worker ssh key. if [ "$DISTBUILD_WORKER" = True ] then install -m 0644 "$WORKER_SSH_KEY" "$DISTBUILD_DATA/worker.key" fi - -# Create the configuration file python <<'EOF' >"$DISTBUILD_DATA/distbuild.conf" import os, sys, yaml diff --git a/distbuild/manifest b/distbuild/manifest deleted file mode 100644 index 35047028..00000000 --- a/distbuild/manifest +++ /dev/null @@ -1,28 +0,0 @@ -0040755 0 0 /lib -0040755 0 0 /lib/systemd -0040755 0 0 /lib/systemd/system-generators -0100755 0 0 /lib/systemd/system-generators/ccache-nfs-mount-generator -0040755 0 0 /usr -0040755 0 0 /usr/lib -0040755 0 0 /usr/lib/distbuild-setup -0040755 0 0 /usr/lib/distbuild-setup/ansible -0100644 0 0 /usr/lib/distbuild-setup/ansible/hosts -0100644 0 0 /usr/lib/distbuild-setup/ansible/distbuild-setup.yml -0040755 0 0 /usr/lib/systemd -0040755 0 0 /usr/lib/systemd/system -0100755 0 0 /usr/lib/systemd/system/morph-cache-server.service -0100755 0 0 /usr/lib/systemd/system/morph-controller.service -0100755 0 0 /usr/lib/systemd/system/morph-controller-helper.service -0100755 0 0 /usr/lib/systemd/system/morph-worker.service -0100755 0 0 /usr/lib/systemd/system/morph-worker-helper.service -0100755 0 0 /usr/lib/systemd/system/distbuild-setup.service -0040755 0 0 /usr/lib/systemd/system/multi-user.target.wants -0120755 0 0 /usr/lib/systemd/system/multi-user.target.wants/distbuild-setup.service -0040755 0 0 /usr/share -0040755 0 0 /usr/share/distbuild-setup -0100644 0 0 /usr/share/distbuild-setup/morph.conf -0100644 0 0 /usr/share/distbuild-setup/morph-cache-server.conf -0100644 0 0 /usr/share/distbuild-setup/morph-controller.conf -0100644 0 0 /usr/share/distbuild-setup/morph-controller-helper.conf -0100644 0 0 /usr/share/distbuild-setup/morph-worker.conf -0100644 0 0 /usr/share/distbuild-setup/morph-worker-helper.conf |