@@ -88,6 +88,23 @@ install_mission_portal_deps() (
8888 find " $BASEDIR /mission-portal" " $BASEDIR /nova/api/http" -type d -name .git -path ' */vendor/*' -exec rm -rf {} +
8989)
9090
91+ # Build the masterfiles tarballs, mirroring build-scripts/bootstrap-tarballs.
92+ # Produces both the source tarball ("make dist") and the package tarball
93+ # ("make tar-package", files laid out as installed under prefix) and drops
94+ # them in /output alongside the platform packages.
95+ build_masterfiles_tarballs () (
96+ set -e
97+
98+ cd " $BASEDIR /masterfiles"
99+ rm -f cfengine-masterfiles* .tar.gz
100+ # Configure so the dist targets work, matching bootstrap-tarballs (no args).
101+ ./configure
102+ make dist # source tarball: cfengine-masterfiles-<version>.tar.gz
103+ make tar-package # package tarball: cfengine-masterfiles-<version>.pkg.tar.gz
104+ mv cfengine-masterfiles* .tar.gz /output/
105+ make distclean
106+ )
107+
91108# === Step runner with failure reporting ===
92109# Disable set -e so we can capture exit codes and report which step failed.
93110set +e
@@ -107,12 +124,15 @@ run_step() {
107124# === Build steps ===
108125run_step " 01-autogen" " $BASEDIR /buildscripts/build-scripts/autogen"
109126run_step " 02-install-dependencies" " $BASEDIR /buildscripts/build-scripts/install-dependencies"
110- if [ " $EXPLICIT_ROLE " = " hub" ]; then
127+ # Mission Portal is an Enterprise/nova-only component; its sources are only
128+ # synced when PROJECT=nova. Skip this step for community hubs.
129+ if [ " $PROJECT " = " nova" ] && [ " $EXPLICIT_ROLE " = " hub" ]; then
111130 run_step " 03-mission-portal-deps" install_mission_portal_deps
112131fi
113132run_step " 04-configure" " $BASEDIR /buildscripts/build-scripts/configure"
114133run_step " 05-compile" " $BASEDIR /buildscripts/build-scripts/compile"
115134run_step " 06-package" " $BASEDIR /buildscripts/build-scripts/package"
135+ run_step " 07-masterfiles-tarballs" build_masterfiles_tarballs
116136
117137# === Copy output packages ===
118138# Packages are created under $BASEDIR/<project>/ by dpkg-buildpackage / rpmbuild.
0 commit comments