Changeset 13427 in hybrid


Ignore:
Timestamp:
Oct 4, 2015, 10:56:58 PM (7 years ago)
Author:
rick
Message:

PoC Poudriere generated local repository

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-10/nanobsd/cfg/nanobsd.wleiden

    r13426 r13427  
    3131NANO_PACKAGE_DIR=$NANO_CONF_DIR/../pkg/All
    3232NANO_PACKAGE_LIST="*"
     33
     34NANO_PACKAGE_REPOS="/usr/local/poudriere/data/packages/wlpkgbuild10_2-default-node/"
    3335
    3436
     
    338340)
    339341
     342
     343cust_pkgng () (
     344
     345        # If the package directory doesn't exist, we're done.
     346        if [ ! -d ${NANO_PACKAGE_REPOS} ]; then
     347                echo "DONE 0 packages"
     348                return 0
     349        fi
     350
     351        # Find a pkg-* package
     352        if [ -z "${NANO_PACKAGE_REPOS}/Latest/pkg.txz" ]; then
     353                echo "FAILED: need a pkg/ package for bootstrapping"
     354                exit 2
     355        fi
     356
     357        # Replicate the packages into the NanoBSD world (as hard links) so we can
     358        # access them from the chroot in which pkg is being run.
     359        cp -lpR ${NANO_PACKAGE_REPOS} ${NANO_WORLDDIR}/Repos
     360
     361        #Bootstrap pkg
     362        CR env ASSUME_ALWAYS_YES=YES SIGNATURE_TYPE=none /usr/sbin/pkg add /Repos/Latest/pkg.txz
     363        CR pkg -N >/dev/null 2>&1
     364        if [ "$?" -ne "0" ]; then
     365                echo "FAILED: pkg bootstrapping faied"
     366                exit 2
     367        fi
     368
     369        mkdir -p ${NANO_WORLDDIR}/usr/local/etc/pkg/repos
     370        echo "FreeBSD: { enabled: no }" > ${NANO_WORLDDIR}/usr/local/etc/pkg/repos/FreeBSD.conf
     371
     372        # Generate a reference to our local repository
     373        cat > ${NANO_WORLDDIR}/usr/local/etc/pkg/repos/LOCAL.conf <<-EOF
     374        LOCAL: {
     375                url             : file:///Repos
     376                enabled         : yes
     377                mirror_type     : none
     378                signature_type  : none
     379        }
     380        EOF
     381       
     382
     383        # Count & report how many we have to install
     384        todo=`echo ${PACKAGE_LIST} | /usr/bin/wc -l`
     385        todo=$(expr $todo + 1) # add one for pkg since it is installed already
     386        echo "=== TODO: $todo"
     387        echo "${PACKAGE_LIST}"
     388        echo "==="
     389        for PKG in ${PACKAGE_LIST}
     390        do
     391                CR env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg install $PKG
     392        done
     393        nano_rm -rf ${NANO_WORLDDIR}/Repos
     394)
     395
    340396last_orders () (
    341397        last_nano_fill_cfg
Note: See TracChangeset for help on using the changeset viewer.