diff options
-rwxr-xr-x | build | 5 | ||||
-rwxr-xr-x | libexec/build-make | 6 | ||||
-rwxr-xr-x | libexec/build-make-compile | 4 | ||||
-rwxr-xr-x | libexec/build-make-export | 6 | ||||
-rwxr-xr-x | libexec/build-make-install | 10 | ||||
-rwxr-xr-x | libexec/build-make-uninstall | 6 | ||||
-rwxr-xr-x | libexec/build-makedeps | 10 | ||||
-rwxr-xr-x | libexec/build-query | 2 |
8 files changed, 25 insertions, 24 deletions
@@ -300,12 +300,13 @@ BUILDER_CFGDIR="${TOPDIR}/.builder" BUILDER_PKGDIR="${TOPDIR}/packages" BUILDER_SRCDIR="${TOPDIR}/sources" BUILDER_ATFDIR="${TOPDIR}/artifacts" +BUILDER_SYSDIR="${TOPDIR}/sysroot" BUILDER_LIBDIR="${TOPDIR}/scripts/libexec" BUILDER_TMPDIR="${TOPDIR}/tmp" export BUILDER_CFGDIR BUILDER_PKGDIR BUILDER_SRCDIR -export BUILDER_ATFDIR BUILDER_LIBDIR BUILDER_TOPDIR -export BUILDER_TMPDIR +export BUILDER_ATFDIR BUILDER_SYSDIR BUILDER_LIBDIR +export BUILDER_TMPDIR BUILDER_TOPDIR # The default SYSROOT .. Much of the toolchain already obeys SYSROOT .. we # aren't setting a policy so much as obeying one. diff --git a/libexec/build-make b/libexec/build-make index 725f6d1..f39fd50 100755 --- a/libexec/build-make +++ b/libexec/build-make @@ -91,14 +91,14 @@ build_make() export BUILDER_MAKEFILE "${BUILDER_LIBDIR}/build-makedeps" || die "failed to generate build dependencies" - for package in $(cd "${SYSROOT}/var/db/binpkgs" 2> /dev/null && + for package in $(cd "${BUILDER_SYSDIR}/var/db/binpkgs" 2> /dev/null && echo */*); do - test -e "${SYSROOT}/var/db/binpkgs/${package}" || continue + test -e "${BUILDER_SYSDIR}/var/db/binpkgs/${package}" || continue name="${package##*/}" category="${package%%/*}" if ! build-query --exists "${category}/${name}"; then echo "${category}/${name}: removing bad package" - (cd "${SYSROOT}" && + (cd "${BUILDER_SYSDIR}" && cat "var/db/binpkgs/${category}/${name}" | xargs -0 rm -f rm "var/db/binpkgs/${category}/${name}") fi diff --git a/libexec/build-make-compile b/libexec/build-make-compile index 8a41e2a..7f8352b 100755 --- a/libexec/build-make-compile +++ b/libexec/build-make-compile @@ -21,8 +21,8 @@ build_compile() --mandir=/usr/share/man \ --docdir=/usr/share/doc \ --disable-dependency-tracking \ - --with-sysroot="${SYSROOT}" \ - --with-libtool-sysroot="${SYSROOT}" \ + --with-sysroot="${BUILDER_SYSDIR}" \ + --with-libtool-sysroot="${BUILDER_SYSDIR}" \ ${CONFIG_OPTS} fi diff --git a/libexec/build-make-export b/libexec/build-make-export index c4183f3..5e8693f 100755 --- a/libexec/build-make-export +++ b/libexec/build-make-export @@ -56,7 +56,7 @@ build_make_export() License: ${LICENSE} Group: ${CATEGORY} Source: ${NAME}-${VERSION}.builder.tar.gz - Buildroot: ${SYSROOT} + Buildroot: ${BUILDER_SYSDIR} %description ${DESCRIPTION} @@ -73,7 +73,7 @@ build_make_export() EOF # FIXME In the long run we should see about producing -dbg and -dev rpms - tr '\000' '\n' < "${SYSROOT}/var/db/binpkgs/${CATEGORY}/${NAME}" \ + tr '\000' '\n' < "${BUILDER_SYSDIR}/var/db/binpkgs/${CATEGORY}/${NAME}" \ | sed -e 's,^,/,' \ | grep -v '^/usr/include' | grep -v 'pkgconfig' | grep -v '^*\.a$' \ >> "${S}/SPECS/${NAME}-${VERSION}.spec" @@ -84,7 +84,7 @@ build_make_export() rpmbuild --quiet --target "${CHOST}" \ --define "_topdir ${S}" \ - --define "buildroot ${SYSROOT}" \ + --define "buildroot ${BUILDER_SYSDIR}" \ --define '_unpackaged_files_terminate_build 0' \ --define '_missing_doc_files_terminate_build 0' \ --define "arch ${CHOST%%-*}" \ diff --git a/libexec/build-make-install b/libexec/build-make-install index ed52e36..daf60fb 100755 --- a/libexec/build-make-install +++ b/libexec/build-make-install @@ -10,8 +10,8 @@ build_make_install() if [ ! -f "${BUILDER_ATFDIR}/${CATEGORY}/${NAME}-${VERSION}-${RELEASE}.${ARCHIVE_FORMAT}" ]; then die "archive does not exist for package '${NAME}'" fi - if [ ! -d "${SYSROOT}" ]; then - mkdir -p "${SYSROOT}" || die "failed to create system root @ '${SYSROOT}'" + if [ ! -d "${BUILDER_SYSDIR}" ]; then + mkdir -p "${BUILDER_SYSDIR}" || die "failed to create system root @ '${BUILDER_SYSDIR}'" fi # FIXME the builder configs should decide the binpkg archive format. @@ -21,16 +21,16 @@ build_make_install() (*) die "unsupported archive format '${ARCHIVE_FORMAT}'";; esac - cd "${SYSROOT}" + cd "${BUILDER_SYSDIR}" - if [ -f "${SYSROOT}/var/db/binpkgs/${CATEGORY}/${NAME}" ]; then + if [ -f "${BUILDER_SYSDIR}/var/db/binpkgs/${CATEGORY}/${NAME}" ]; then echo "${NAME}: removing previous version" cat "var/db/binpkgs/${CATEGORY}/${NAME}" | xargs -0 rm -f rm "var/db/binpkgs/${CATEGORY}/${NAME}" fi ${ARCHIVE_DECOMPRESSOR} "${BUILDER_ATFDIR}/${CATEGORY}/${NAME}-${VERSION}-${RELEASE}.${ARCHIVE_FORMAT}" | tar x - touch "${SYSROOT}/var/db/binpkgs/${CATEGORY}/${NAME}" + touch "${BUILDER_SYSDIR}/var/db/binpkgs/${CATEGORY}/${NAME}" pkg_post_install )} diff --git a/libexec/build-make-uninstall b/libexec/build-make-uninstall index b07da59..7e4c07a 100755 --- a/libexec/build-make-uninstall +++ b/libexec/build-make-uninstall @@ -4,16 +4,16 @@ build_make_uninstall() {( load_rules "${1}" - if [ -f "${SYSROOT}/var/db/binpkgs/${CATEGORY}/${NAME}" ]; then + if [ -f "${BUILDER_SYSDIR}/var/db/binpkgs/${CATEGORY}/${NAME}" ]; then echo "uninstalling: ${1}" - cd "${SYSROOT}" + cd "${BUILDER_SYSDIR}" # FIXME: we are failing to handle file collisions produce in # this file. cat "var/db/binpkgs/${CATEGORY}/${NAME}" | xargs -0 rm -f # Clobber our package marker. - rm "${SYSROOT}/var/db/binpkgs/${CATEGORY}/${NAME}" + rm "${BUILDER_SYSDIR}/var/db/binpkgs/${CATEGORY}/${NAME}" fi )} diff --git a/libexec/build-makedeps b/libexec/build-makedeps index e15f491..e916528 100755 --- a/libexec/build-makedeps +++ b/libexec/build-makedeps @@ -10,9 +10,9 @@ all_all_clean: exports_clean all_all_distclean: sysroot_clean artifacts_clean tmpdir_clean exports_clean sysroot_clean: - @if test -d "${SYSROOT}"; then \\ + @if test -d "${BUILDER_SYSDIR}"; then \\ echo "cleaning: sysroot" ; \\ - (cd "${SYSROOT}" && find . -delete) ; \\ + (cd "${BUILDER_SYSDIR}" && find . -delete) ; \\ fi artifacts_clean: @if test -d "${BUILDER_ATFDIR}"; then \\ @@ -54,7 +54,7 @@ for package; do makedep_source="${BUILDER_PKGDIR}/${package}/source" makedep_package="${BUILDER_ATFDIR}/${package}-${VERSION}-${RELEASE}.${ARCHIVE_FORMAT}" makedep_export="${BUILDER_TOPDIR}/exports/${package}-${VERSION}-${RELEASE}.${CHOST%%-*}.rpm" - makedep_install="${SYSROOT}/var/db/binpkgs/${package}" + makedep_install="${BUILDER_SYSDIR}/var/db/binpkgs/${package}" # Our entry header with simple rules cat<<-END_OF_RULES @@ -84,7 +84,7 @@ for package; do echo "${target}_uninstall: ${makedep_target}_uninstall" echo "${target}_clean: ${makedep_target}_clean" echo "${target}_distclean: ${makedep_target}_distclean" - echo "${makedep_prep}: ${SYSROOT}/var/db/binpkgs/${dep}" + echo "${makedep_prep}: ${BUILDER_SYSDIR}/var/db/binpkgs/${dep}" done unset target unset dep @@ -95,7 +95,7 @@ for package; do elif ! test -f "${BUILDER_PKGDIR}/${dep}/Buildrules"; then die "no Buildrules for '${dep}'" fi - echo "${makedep_install}: ${SYSROOT}/var/db/binpkgs/${dep}" + echo "${makedep_install}: ${BUILDER_SYSDIR}/var/db/binpkgs/${dep}" echo "${makedep_test}: ${BUILDER_TMPDIR}/${dep}/.tested" done unset dep diff --git a/libexec/build-query b/libexec/build-query index 2edcae9..a2767a2 100755 --- a/libexec/build-query +++ b/libexec/build-query @@ -259,7 +259,7 @@ case "${QUERY_ACTION}" in cat<<-EOF TARGET="${TARGET}" TOPDIR="${BUILDER_TOPDIR}" - SYSROOT="${SYSROOT}" + SYSROOT="${BUILDER_SYSDIR}" CBUILD="${CBUILD}" CHOST="${CHOST}" ARCH="${ARCH}" |