Revision c497ae1d
Added by Renato Botelho almost 9 years ago
tools/builder_common.sh | ||
---|---|---|
1273 | 1273 |
# Make sure pkg is present |
1274 | 1274 |
pkg_bootstrap ${STAGE_CHROOT_DIR} |
1275 | 1275 |
|
1276 |
# Make sure correct repo is available on tmp dir |
|
1277 |
mkdir -p ${STAGE_CHROOT_DIR}/tmp/pkg-repos |
|
1278 |
setup_pkg_repo \ |
|
1279 |
${PKG_REPO_DEFAULT} \ |
|
1280 |
${STAGE_CHROOT_DIR}/tmp/pkg-repos/repo.conf \ |
|
1281 |
${TARGET} \ |
|
1282 |
${TARGET_ARCH} \ |
|
1283 |
staging |
|
1284 |
|
|
1276 | 1285 |
echo "Done!" |
1277 | 1286 |
} |
1278 | 1287 |
|
... | ... | |
1374 | 1383 |
${BUILDER_TOOLS}/templates/custom_logos/${_image_variant}/*.png \ |
1375 | 1384 |
${FINAL_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME}/custom_logos |
1376 | 1385 |
fi |
1386 |
|
|
1387 |
# Remove temporary repo conf |
|
1388 |
rm -rf ${FINAL_CHROOT_DIR}/tmp/pkg-repos |
|
1377 | 1389 |
} |
1378 | 1390 |
|
1379 | 1391 |
create_distribution_tarball() { |
... | ... | |
1734 | 1746 |
/sbin/mount -t devfs devfs ${_root}/dev |
1735 | 1747 |
cp -f /etc/resolv.conf ${_root}/etc/resolv.conf |
1736 | 1748 |
touch ${BUILDER_LOGS}/install_pkg_install_ports.txt |
1737 |
script -aq ${BUILDER_LOGS}/install_pkg_install_ports.txt pkg -c ${_root} $@ >/dev/null 2>&1 |
|
1749 |
local _params="" |
|
1750 |
if [ -f "${_root}/tmp/pkg-repos/repo.conf" ]; then |
|
1751 |
_params="--repo-conf-dir /tmp/pkg-repos " |
|
1752 |
fi |
|
1753 |
script -aq ${BUILDER_LOGS}/install_pkg_install_ports.txt \ |
|
1754 |
pkg -c ${_root} ${_params}$@ >/dev/null 2>&1 |
|
1738 | 1755 |
local result=$? |
1739 | 1756 |
rm -f ${_root}/etc/resolv.conf |
1740 | 1757 |
/sbin/umount -f ${_root}/dev |
... | ... | |
1816 | 1833 |
install_bsdinstaller() { |
1817 | 1834 |
local _params="" |
1818 | 1835 |
|
1819 |
# Use staging repo on RELEASE |
|
1820 |
if [ -n "${_IS_RELEASE}" ]; then |
|
1821 |
mkdir -p ${FINAL_CHROOT_DIR}/tmp/pkg-repo |
|
1822 |
cp -f ${STAGE_CHROOT_DIR}${PKG_REPO_PATH} \ |
|
1823 |
${FINAL_CHROOT_DIR}/tmp/pkg-repo |
|
1824 |
_params="--repo-conf-dir /tmp/pkg-repo " |
|
1825 |
fi |
|
1826 |
|
|
1827 | 1836 |
echo ">>> Installing BSDInstaller in chroot (${FINAL_CHROOT_DIR})... (starting)" |
1828 |
pkg_chroot ${FINAL_CHROOT_DIR} ${_params}install -f bsdinstaller
|
|
1837 |
pkg_chroot ${FINAL_CHROOT_DIR} install -f bsdinstaller |
|
1829 | 1838 |
sed -i '' -e "s,%%PRODUCT_NAME%%,${PRODUCT_NAME}," \ |
1830 | 1839 |
-e "s,%%PRODUCT_VERSION%%,${PRODUCT_VERSION}," \ |
1831 | 1840 |
-e "s,%%ARCH%%,${TARGET}," \ |
1832 | 1841 |
${FINAL_CHROOT_DIR}/usr/local/share/dfuibe_lua/conf/pfSense.lua \ |
1833 | 1842 |
${FINAL_CHROOT_DIR}/usr/local/share/dfuibe_lua/conf/pfSense_rescue.lua |
1834 |
if [ -n "${_IS_RELEASE}" ]; then |
|
1835 |
rm -rf ${FINAL_CHROOT_DIR}/tmp/pkg-repo |
|
1836 |
fi |
|
1837 | 1843 |
echo ">>> Installing BSDInstaller in chroot (${FINAL_CHROOT_DIR})... (finished)" |
1838 | 1844 |
} |
1839 | 1845 |
|
Also available in: Unified diff
Make sure we consume staging packages on build process after pfSense-repo became a package