Changeset 79836
- Timestamp:
- 06/27/11 15:22:56 (4 years ago)
- Location:
- contrib/mpab
- Files:
-
- 7 edited
-
chroot-scripts/buildports (modified) (1 diff)
-
chroot-scripts/genportlist.tcl (modified) (1 diff)
-
chroot-scripts/installmacports (modified) (1 diff)
-
chroot-scripts/recreateportindex (modified) (1 diff)
-
mpab (modified) (2 diffs)
-
mpab-functions (modified) (5 diffs)
-
mpsync.sh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
contrib/mpab/chroot-scripts/buildports
r79811 r79836 31 31 # 32 32 33 PREFIX="/opt/local" 33 if [[ -z "$PREFIX" ]]; then 34 PREFIX=/opt/local 35 fi 34 36 ARCHIVE_TYPE=".tbz2" 35 37 -
contrib/mpab/chroot-scripts/genportlist.tcl
r71395 r79836 32 32 # 33 33 34 set prefix /opt/local 34 if {[info exists env(PREFIX)]} { 35 set prefix $env(PREFIX) 36 } else { 37 set prefix /opt/local 38 } 35 39 36 catch {source \ 37 [file join ${prefix} share macports Tcl macports1.0 macports_fastload.tcl]} 40 source ${prefix}/share/macports/Tcl/macports1.0/macports_fastload.tcl 38 41 package require macports 39 42 -
contrib/mpab/chroot-scripts/installmacports
r46085 r79836 4 4 # 5 5 6 cd /opt/mports/base 7 ./configure && make all && make install && make distclean 8 if [[ $? == 0 ]]; then 9 echo "file:///opt/mports/dports [default]" > /opt/local/etc/macports/sources.conf 6 if [[ -z "$PREFIX" ]]; then 7 PREFIX=/opt/local 8 fi 9 if [[ -z "$SRC_PREFIX" ]]; then 10 SRC_PREFIX=/opt/mports 10 11 fi 11 12 13 cd ${SRC_PREFIX}/base 14 ./configure --prefix=${PREFIX} && make -j2 all && make install && make distclean 15 if [[ $? == 0 ]]; then 16 echo "file://${SRC_PREFIX}/dports [default]" > ${PREFIX}/etc/macports/sources.conf 17 fi -
contrib/mpab/chroot-scripts/recreateportindex
r46089 r79836 4 4 # 5 5 6 cd /opt/mports/dports 7 /opt/local/bin/portindex > /dev/null 6 if [[ -z "$PREFIX" ]]; then 7 PREFIX=/opt/local 8 fi 9 if [[ -z "$SRC_PREFIX" ]]; then 10 SRC_PREFIX=/opt/mports 11 fi 12 13 cd ${SRC_PREFIX}/dports 14 ${PREFIX}/bin/portindex > /dev/null -
contrib/mpab/mpab
r71442 r79836 30 30 31 31 export PATH=/bin:/usr/bin:/sbin:/usr/sbin 32 33 if [[ -z "$PREFIX" ]]; then 34 PREFIX=/opt/local 35 fi 36 export PREFIX 37 # location to store base and dports sources 38 if [[ -z "$SRC_PREFIX" ]]; then 39 SRC_PREFIX=/opt/mports 40 fi 41 export SRC_PREFIX 32 42 33 43 # Base filename for the disk image … … 123 133 exitMessage="Stopping..." 124 134 if [[ ${command} == "rebuildmp" ]]; then 125 rm -rf ${chrootPath} /opt/mports135 rm -rf ${chrootPath}${SRC_PREFIX} 126 136 if [[ -n "$chrootPath" ]]; then 127 rm -f ${chrootPath} /opt/local/bin/port137 rm -f ${chrootPath}${PREFIX}/bin/port 128 138 fi 129 139 fi -
contrib/mpab/mpab-functions
r79811 r79836 216 216 local mpExport=$4 217 217 218 if [[ ! -d ${chrootPath} /opt/mports]]; then218 if [[ ! -d ${chrootPath}${SRC_PREFIX} ]]; then 219 219 if [[ -f ${dataDir}/${mpExport} ]]; then 220 mkdir -p ${chrootPath} /opt/mports220 mkdir -p ${chrootPath}${SRC_PREFIX} 221 221 echo ${mpExport} | grep -q "MacPorts-......tar.gz" 222 222 if [[ $? == 0 ]]; then 223 cp ${mpExport} ${chrootPath} /opt/mports224 cd ${chrootPath} /opt/mports223 cp ${mpExport} ${chrootPath}${SRC_PREFIX} 224 cd ${chrootPath}${SRC_PREFIX} 225 225 tar xzf ${mpExport} || return 1 226 226 rm -rf base 2>/dev/null 227 227 mv $(ls -d MacPorts-?.?.?) base || return 1 228 228 else 229 cd ${chrootPath} /opt/mports229 cd ${chrootPath}${SRC_PREFIX} 230 230 bunzip2 -c ${dataDir}/${mpExport} | tar xf - 231 231 fi 232 232 cd - > /dev/null 233 233 elif [[ -d ${dataDir}/${mpExport} ]]; then 234 mkdir -p ${chrootPath} /opt/mports234 mkdir -p ${chrootPath}${SRC_PREFIX} 235 235 cd ${dataDir}/${mpExport} && \ 236 rsync -r --del --exclude '*~' --exclude '.svn' . ${chrootPath} /opt/mports236 rsync -r --del --exclude '*~' --exclude '.svn' . ${chrootPath}${SRC_PREFIX} 237 237 cd - > /dev/null 238 238 else … … 242 242 fi 243 243 244 if [[ ! -f ${chrootPath} /opt/local/bin/port ]]; then244 if [[ ! -f ${chrootPath}${PREFIX}/bin/port ]]; then 245 245 chrootExec installmacports 246 246 fi … … 345 345 mount_fdesc -o union fdesc ${chrootPath}/dev 346 346 347 mkdir -p ${chrootPath} /opt/local/var/macports/distfiles348 hdiutil attach ${baseDir}/${imgBaseName}_distcache.sparseimage -mountpoint ${chrootPath} /opt/local/var/macports/distfiles -noverify -owners on -nobrowse -noautofsck ${HDIUTILDEBUG}347 mkdir -p ${chrootPath}${PREFIX}/var/macports/distfiles 348 hdiutil attach ${baseDir}/${imgBaseName}_distcache.sparseimage -mountpoint ${chrootPath}${PREFIX}/var/macports/distfiles -noverify -owners on -nobrowse -noautofsck ${HDIUTILDEBUG} 349 349 returnValue=$? 350 350 if [[ ${returnValue} != 0 ]]; then … … 375 375 umount -f ${chrootPath}/dev 376 376 fi 377 if [[ -d ${chrootPath} /opt/local/var/macports/distfiles ]]; then377 if [[ -d ${chrootPath}${PREFIX}/var/macports/distfiles ]]; then 378 378 # Now the cache image for the dist files 379 hdiutil detach ${chrootPath} /opt/local/var/macports/distfiles ${HDIUTILDEBUG}379 hdiutil detach ${chrootPath}${PREFIX}/var/macports/distfiles ${HDIUTILDEBUG} 380 380 fi 381 381 if [[ -d ${chrootPath} ]]; then … … 399 399 # errors to syslog/console log like: 400 400 # com.apple.launchd[1] (com.apple.dyld): Throttling respawn: Will start in 10 seconds 401 env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin HOME=/var/root DYLD_NO_FIX_PREBINDING=1 /usr/sbin/chroot ${chrootPath} /bin/sh /var/tmp/$1401 env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin HOME=/var/root DYLD_NO_FIX_PREBINDING=1 PREFIX=${PREFIX} SRC_PREFIX=${SRC_PREFIX} /usr/sbin/chroot ${chrootPath} /bin/sh /var/tmp/$1 402 402 else 403 env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin HOME=/var/root /bin/sh /var/tmp/$1403 env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin HOME=/var/root PREFIX=${PREFIX} SRC_PREFIX=${SRC_PREFIX} /bin/sh /var/tmp/$1 404 404 fi 405 405 rm ${chrootPath}/var/tmp/$1 -
contrib/mpab/mpsync.sh
r79811 r79836 8 8 9 9 dataDir=$(pwd) 10 if [[ $MPAB_DATA]]; then10 if [[ -n "$MPAB_DATA" ]]; then 11 11 dataDir=$MPAB_DATA 12 fi 13 if [[ -z "$SRC_PREFIX" ]]; then 14 SRC_PREFIX=/opt/mports 12 15 fi 13 16 … … 35 38 fi 36 39 37 if [[ ! -d ${ dataDir}/mpchroot]] ; then40 if [[ ! -d ${chrootPath} ]] ; then 38 41 sudo ${baseDir}/mpab mount || exit 1 39 42 umount=yes … … 42 45 rsync -r --del --exclude '*~' --exclude '.svn' \ 43 46 ${dataDir}/${exportDir}/dports \ 44 ${ dataDir}/mpchroot/opt/mports|| exit 147 ${chrootPath}${SRC_PREFIX} || exit 1 45 48 46 49 echo "Re-creating portindex in chroot"
Note: See TracChangeset
for help on using the changeset viewer.

