Changeset 10612 in hybrid for branches/releng-9.0/nanobsd
- Timestamp:
- Apr 29, 2012, 6:02:29 PM (13 years ago)
- Location:
- branches/releng-9.0/nanobsd
- Files:
-
- 37 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/releng-9.0/nanobsd
- Property svn:externals
-
old new 1 ports http://svn.wirelessleiden.nl/svn/code/ports 1
-
- Property svn:externals
-
branches/releng-9.0/nanobsd/cfg/nanobsd.wleiden
r10605 r10612 28 28 NANO_PACKAGE_DIR=$NANO_CONF_DIR/../pkg/All 29 29 30 # Wireless Leiden ports from $WL_PORTSDIR are copied OVER $PORTSDIR 30 31 PORTSDIR='/usr/ports' 31 32 WL_PORTSDIR="$NANO_CONF_DIR/../ports/" 33 32 34 # Dirty quirk to allow comments in part below 33 PACKAGE_LIST=`cat <<EOF | sed 's/#.*$//g' 34 $PORTSDIR/benchmarks/iperf 35 $PORTSDIR/devel/py-Jinja2 36 $PORTSDIR/devel/py-yaml 37 $PORTSDIR/dns/dnsmasq 38 $PORTSDIR/editors/vim-lite 39 $PORTSDIR/ftp/curl 40 $PORTSDIR/lang/python 41 $PORTSDIR/net-mgmt/net-snmp 42 $PORTSDIR/net/isc-dhcp42-server 43 $PORTSDIR/net/pen 44 $PORTSDIR/net/sixxs-aiccu 45 $PORTSDIR/security/nmap 46 $PORTSDIR/security/openvpn 47 $PORTSDIR/security/sudo 48 $PORTSDIR/shells/bash-static 49 $PORTSDIR/sysutils/screen 50 $PORTSDIR/sysutils/ucspi-tcp 51 $PORTSDIR/www/thttpd 52 $PORTSDIR/www/tinyproxy 53 54 55 # Wireless Leiden ports at $WL_PORTSDIR 56 $WL_PORTSDIR/net/lvrouted 35 PACKAGE_LIST=`cat <<EOF | sed -e 's/#.*$//g' | xargs 36 benchmarks/iperf 37 devel/py-Jinja2 38 devel/py-yaml 39 dns/dnsmasq 40 editors/vim-lite 41 ftp/curl 42 lang/python 43 net-mgmt/net-snmp 44 net/isc-dhcp42-server 45 net/pen 46 net/sixxs-aiccu 47 security/nmap 48 security/openvpn 49 security/sudo 50 shells/bash-static 51 sysutils/screen 52 sysutils/ucspi-tcp 53 www/thttpd 54 www/tinyproxy 55 56 # Extra WL ports 57 net/lvrouted 57 58 ` 58 59 # Package target 59 60 # Dirty quirk to allow comments in part below 60 PKG_MAKE_ARGS=`cat <<EOF | sed 's/#.*$//g' 61 PKG_MAKE_ARGS=`cat <<EOF | sed 's/#.*$//g' | xargs 61 62 PACKAGES=$(dirname $NANO_PACKAGE_DIR) 62 63 BATCH=yes PACKAGE_BUILDING=yes -
branches/releng-9.0/nanobsd/tools/image
r10593 r10612 22 22 # rebuild - Rebuild NanoBSD (aka force rebuilding all) 23 23 # deploy on <node> [and reboot] - Deploy the image on node and reboot if needed 24 # ports update - Update the packages from ports 25 # ports force rebuild - Forcefully rebuilding all required packages 24 26 EOF 25 27 } … … 110 112 } 111 113 112 113 114 # 114 115 # Argument parsing … … 150 151 fi 151 152 deploy_image 153 elif [ "$1" = "ports" ]; then 154 if [ "$2" = "update" ]; then 155 # Fetch the latest details and provide listing of packages to be updated 156 portsnap fetch update || exit 1 157 158 # HACK: install our own ports _inside_ the normal ports dir 159 cp -fR $WL_PORTSDIR/* $PORTSDIR 160 161 # Make sure portmaster is present to update all ports 162 portmaster --version 1>/dev/null 2>/dev/null || make -C /usr/ports/ports-mgmt/portmaster BATCH=yes install clean || exit 1 163 164 # Update via portmaster 165 portmaster --no-confirm --update-if-newer -y -d -G `echo $PKG_MAKE_ARGS | xargs -n1 echo -m ` $PACKAGE_LIST || exit 1 166 167 . ${BASEDIR}/package-build.sh 168 elif [ "$2" = "force" -a "$3" = "rebuild" ]; then 169 export FORCE_REBUILD=1 170 . ${BASEDIR}/package-build.sh 171 else 172 shift 1 173 echo "Arguments Error - '$*'"; exit 128 174 fi 152 175 else 153 176 echo "Argument Error - '$1'"; exit 128 -
branches/releng-9.0/nanobsd/tools/package-build.sh
r10272 r10612 1 1 #!/bin/sh 2 2 # Install all required packages 3 # 3 4 # XXX: Welcome to port hell, if /usr/ports has been updated, you actually want 4 5 # to delete all installed packages and start over again, hence why people used 5 6 # to run this stuff in jails, etc. 7 # 8 # Rick van der Zwet <rick@wirelessleiden.nl> 9 # 6 10 7 . $(dirname $0)/package-build.inc.sh11 . `dirname $0`/package-build.inc.sh 8 12 9 DEBUG=${DEBUG:- 0}10 DEP_CHECK_ONLY=${DEP_CHECK_ONLY:- 0}13 DEBUG=${DEBUG:-'0'} 14 DEP_CHECK_ONLY=${DEP_CHECK_ONLY:-'0'} 11 15 12 16 # make options, for package building 13 LOGDIR=`mktemp -d "/tmp/$(basename $0 .sh)-$(date +%Y%m%d-%H:%M:%S).X"`17 LOGDIR=`mktemp -d /tmp/$(basename $0 .sh)-$(date '+%Y%m%d-%H:%M:%S')X` 14 18 15 19 p_info Log directory ${LOGDIR} 16 20 p_info Make options are: 17 p_info $(p_list ${PKG_MAKE_ARGS})21 p_info `p_list ${PKG_MAKE_ARGS}` 18 22 23 # HACK: install our own ports _inside_ the normal ports dir 24 cp -fR $WL_PORTSDIR/* $PORTSDIR 25 26 # Pre-req dependency fixing 19 27 p_info Checking whether there are currently unmet dependencies 20 28 RETVAL=0 … … 30 38 if [ -n "${PKG_DEP_FAIL}" ]; then 31 39 p_err Unmet dependencies found at $PKG, please fix manually: 32 p_err $(p_list ${PKG_DEP_FAIL})40 p_err `p_list ${PKG_DEP_FAIL}` 33 41 RETVAL=1 34 42 fi … … 45 53 46 54 55 # Cleanup of old packages 47 56 if [ -d "${NANO_PACKAGE_DIR}" ]; then 48 57 p_warn "Deleted all (old) packages at ${NANO_PACKAGE_DIR}" … … 52 61 mkdir -p ${NANO_PACKAGE_DIR} 53 62 63 64 # Build required packages 54 65 MAKE="make ${PKG_MAKE_ARGS}" 55 56 66 BUILD_LIST='' 57 # Build required packages58 67 set ${PACKAGE_LIST} 59 68 while [ "$1" ]; do … … 62 71 63 72 # Build new one 64 LOGFILE="$LOGDIR/build $(echo $PACKAGE | tr '/' '_').log"73 LOGFILE="$LOGDIR/build_`echo $PACKAGE | tr '/' '_'`.log" 65 74 echo "" 66 75 p_info Packaging $PACKAGE 67 cd $ {PACKAGE}76 cd $PORTSDIR/$PACKAGE 68 77 69 70 78 # Check for build dependencies 71 79 BUILDDEP_PKG=`${MAKE} build-depends-list | awk -F: '{print $2}'` 72 80 if [ -n "${BUILDDEP_PKG}" ]; then 73 81 p_info Build dependencies needed are: 74 p_info $(p_list ${BUILDDEP_PKG})82 p_info `p_list ${BUILDDEP_PKG}` 75 83 fi 76 84 … … 79 87 if [ -n "${PKGDEP_PKGS}" ]; then 80 88 p_info Package dependencies also packaged are: 81 p_info $(p_list ${PKGDEP_PKGS})89 p_info `p_list ${PKGDEP_PKGS}` 82 90 fi 83 91 84 92 # Check if package is already installed 85 93 VERSION=`${MAKE} clean generate-plist check-already-installed | awk '/is already/ {print $2}'` 86 if [ -n "${VERSION}" ]; then 94 if [ -n "$FORCE_REBUILD" ]; then 95 p_warn "${PACKAGE} forcefullly rebuilding..." 96 MAKE_OPTION='deinstall reinstall' 97 elif [ "${VERSION}" = "An" ]; then 98 #XXX: Better way to detect whether a package needs updating 99 # An older version of lang/python26 is already installed (python26-2.6.2) 100 p_warn "${PACKAGE} outdated, updating..." 101 p_warn "re-run package-build.sh to check for unmet ones done using:" 102 p_warn "$0" 103 MAKE_OPTION='deinstall reinstall' 104 elif [ -n "${VERSION}" ]; then 87 105 VERSION=`echo ${VERSION} | sed 's/^.*-//g'` 88 106 p_info ${PACKAGE} already installed at ${VERSION} 89 107 MAKE_OPTION='' 90 elif [ "${VERSION}" = "An" ]; then91 #XXX: Better way to detect whether a package needs updating92 # An older version of lang/python26 is already installed (python26-2.6.2)93 p_warn ${PACKAGE} outdated, updating...94 p_warn re-run package-build.sh to check for unmet ones done using:95 p_warn $096 MAKE_OPTION='deinstall reinstall'97 108 else 98 109 p_info ${PACKAGE} not installed, installing... … … 130 141 done 131 142 132 p_info $(echo ${BUILD_LIST} | wc -w)packages build succesfully143 p_info `echo ${BUILD_LIST} | wc -w` packages build succesfully 133 144 134 145 if [ ${DEBUG} -eq 0 ]; then
Note:
See TracChangeset
for help on using the changeset viewer.