Changeset 13662 in hybrid


Ignore:
Timestamp:
Dec 18, 2016, 11:54:40 AM (8 years ago)
Author:
rick
Message:

Migrate poudriere conf into repository layout, allowing edits of config parameters to be committed.

While here add option to edit config file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-11/nanobsd/tools/package-build.sh

    r13657 r13662  
    99
    1010cfg_dir=`dirname $0`/../cfg
     11abs_cfg_dir=`cd $cfg_dir; pwd -P`
    1112poudriere_pkglist_file=${cfg_dir}/wlpkgbuild11_0-default-node-pkglist
    1213
     
    3233        poudriere ports -c -F -f none -p default -M /usr/local/poudriere/ports/default
    3334
    34         # Build options
     35        # Configure new build options
    3536        poudriere options -j wlpkgbuild11_0 -p default -z node -f ${poudriere_pkglist_file}
    3637}
    3738
     39packages_config() {
     40        # Configure all build options
     41        poudriere options -j wlpkgbuild11_0 -p default -z node -c ${*:- -f ${poudriere_pkglist_file}}
     42}
     43
     44
    3845packages_refresh() {
    39         # Install new package options
     46        # Install new package (symlink) options
    4047        POUDRIERE_MAKE_CONF_FILE=wlpkgbuild11_0-node-make.conf
    4148        POUDRIERE_OPTIONS=wlpkgbuild11_0-node-options
     49
     50        # Clean old stuff
     51        if [ -d "/usr/local/etc/poudriere.d/$POUDRIERE_MAKE_CONF_FILE" ]; then
     52          rm -Rf /usr/local/etc/poudriere.d/$POUDRIERE_MAKE_CONF_FILE
     53        fi
    4254
    4355        if [ -d "/usr/local/etc/poudriere.d/$POUDRIERE_OPTIONS" ]; then
     
    4557        fi
    4658
    47         cp ${cfg_dir}/$POUDRIERE_MAKE_CONF_FILE /usr/local/etc/poudriere.d
    48         cp -R ${cfg_dir}/$POUDRIERE_OPTIONS /usr/local/etc/poudriere.d
     59
     60        ln -s ${abs_cfg_dir}/$POUDRIERE_MAKE_CONF_FILE /usr/local/etc/poudriere.d/$POUDRIERE_MAKE_CONF_FILE
     61        ln -s ${abs_cfg_dir}/$POUDRIERE_OPTIONS /usr/local/etc/poudriere.d/$POUDRIERE_OPTIONS
    4962}
    5063
     
    6275        packages_initenv
    6376        packages_refresh
     77elif [ "x$1" = "xrefresh" ]; then
     78        packages_refresh
     79elif [ "x$1" = "xconfig" ]; then
     80        shift; packages_config $*
    6481elif [ "x$1" = "xrebuild" ]; then
    6582        packages_refresh
     
    6885        packages_build
    6986else
    70         echo "Usage $0 <initenv|rebuild|build>"
     87        echo "Usage $0 <initenv|config|rebuild|build>"
    7188        exit 128
    7289fi
Note: See TracChangeset for help on using the changeset viewer.