| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ | | 1 | $NetBSD: patch-aa,v 1.5 2011/12/04 21:55:01 marino Exp $ |
2 | | | 2 | |
3 | --- ../FreeBSD/lib/tc_command.sh 2011-11-20 13:11:37.088510000 +0000 | | 3 | --- ../FreeBSD/lib/tc_command.sh 2011-11-20 13:11:37.088510000 +0000 |
4 | +++ lib/tc_command.sh | | 4 | +++ lib/tc_command.sh |
5 | @@ -27,21 +27,46 @@ | | 5 | @@ -27,21 +27,46 @@ |
6 | # $MCom: portstools/tinderbox/lib/tc_command.sh,v 1.101.2.48 2011/11/15 07:04:35 marcus Exp $ | | 6 | # $MCom: portstools/tinderbox/lib/tc_command.sh,v 1.101.2.48 2011/11/15 07:04:35 marcus Exp $ |
7 | # | | 7 | # |
8 | | | 8 | |
9 | -export _defaultUpdateHost="cvsup18.FreeBSD.org" | | 9 | -export _defaultUpdateHost="cvsup18.FreeBSD.org" |
10 | +export _defaultUpdateHost="cvsup.netbsd.se" | | 10 | +export _defaultUpdateHost="cvsup.netbsd.se" |
11 | export _defaultUpdateType="CSUP" | | 11 | export _defaultUpdateType="CSUP" |
12 | +export _defaultDragonHost="http://mirror.physik-pool.tu-berlin.de/DragonFlyBSD/dflysnap" | | 12 | +export _defaultDragonHost="http://mirror.physik-pool.tu-berlin.de/DragonFlyBSD/dflysnap" |
13 | +export _defaultDragonType="RELEASE" | | 13 | +export _defaultDragonType="RELEASE" |
14 | +export _defaultGitSrcHost="koan.bondconsult.net" | | 14 | +export _defaultGitSrcHost="koan.bondconsult.net" |
| @@ -253,31 +253,31 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 | | | @@ -253,31 +253,31 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 |
253 | + echo " cd ${treeDir}/src" | | 253 | + echo " cd ${treeDir}/src" |
254 | echo "else" | | 254 | echo "else" |
255 | - echo "cd ${treeDir}/${treeSubDir}" | | 255 | - echo "cd ${treeDir}/${treeSubDir}" |
256 | - echo "${updateCmd} up" | | 256 | - echo "${updateCmd} up" |
257 | + echo " echo 'Creating shallow source repository.'" | | 257 | + echo " echo 'Creating shallow source repository.'" |
258 | + echo " mkdir ${treeDir}/src" | | 258 | + echo " mkdir ${treeDir}/src" |
259 | + echo " cd ${treeDir}/src" | | 259 | + echo " cd ${treeDir}/src" |
260 | + echo " mkdir ../tmp ../obj" | | 260 | + echo " mkdir ../tmp ../obj" |
261 | + echo " ${updateCmd} init" | | 261 | + echo " ${updateCmd} init" |
262 | + echo " ${updateCmd} remote add origin git://${4}/dragonfly.git" | | 262 | + echo " ${updateCmd} remote add origin git://${4}/dragonfly.git" |
263 | + echo " ${updateCmd} fetch --depth=1 origin" | | 263 | + echo " ${updateCmd} fetch --depth=1 origin" |
264 | + echo " ${updateCmd} branch master origin/master" | | 264 | + echo " ${updateCmd} branch master origin/master" |
265 | + echo " echo 'Repository creation complete.'" | | 265 | + echo " echo 'Repository creation complete.'" |
266 | echo "fi" | | 266 | + echo "fi" |
267 | + echo "BRANCH=\`${updateCmd} branch | /usr/bin/grep -w ${5}\`" | | 267 | + echo "BRANCH=\`${updateCmd} branch | /usr/bin/grep -w ${5}\`" |
268 | + echo "if [ \"\${BRANCH}\" = \"\" ]; then" | | 268 | + echo "if [ \"\${BRANCH}\" = \"\" ]; then" |
269 | + echo " ${updateCmd} branch ${5} origin/${5}" | | 269 | + echo " ${updateCmd} branch ${5} origin/${5}" |
270 | + echo "fi" | | 270 | echo "fi" |
271 | + echo "echo 'Ready to pull updates from branch.'" | | 271 | + echo "echo 'Ready to pull updates from branch.'" |
272 | + echo "${updateCmd} checkout ${5}" | | 272 | + echo "${updateCmd} checkout ${5}" |
273 | + echo "${updateCmd} pull" | | 273 | + echo "${updateCmd} pull" |
274 | ) > ${treeDir}/update.sh | | 274 | ) > ${treeDir}/update.sh |
275 | chmod +x ${treeDir}/update.sh | | 275 | chmod +x ${treeDir}/update.sh |
276 | ;; | | 276 | ;; |
277 | @@ -223,6 +246,15 @@ setupDefaults () { | | 277 | @@ -223,6 +246,15 @@ setupDefaults () { |
278 | if [ -z "${defaultUpdateType}" ]; then | | 278 | if [ -z "${defaultUpdateType}" ]; then |
279 | export defaultUpdateType=${_defaultUpdateType} | | 279 | export defaultUpdateType=${_defaultUpdateType} |
280 | fi | | 280 | fi |
281 | + if [ -z "${defaultDragonHost}" ]; then | | 281 | + if [ -z "${defaultDragonHost}" ]; then |
282 | + export defaultDragonHost=${_defaultDragonHost} | | 282 | + export defaultDragonHost=${_defaultDragonHost} |
283 | + fi | | 283 | + fi |
| @@ -387,35 +387,35 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 | | | @@ -387,35 +387,35 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 |
387 | - export DESTDIR=${J_TMPDIR} | | 387 | - export DESTDIR=${J_TMPDIR} |
388 | - cd ${jailBase}/sets/base && yes | sh ./install.sh > ${jailBase}/world.tmp 2>&1 | | 388 | - cd ${jailBase}/sets/base && yes | sh ./install.sh > ${jailBase}/world.tmp 2>&1 |
389 | + if [ "${updateCmd}" = "RELEASE" -o "${updateCmd}" = "SNAPSHOT" ]; then | | 389 | + if [ "${updateCmd}" = "RELEASE" -o "${updateCmd}" = "SNAPSHOT" ]; then |
390 | + iso_image=`ls ${jailBase}/sets` | | 390 | + iso_image=`ls ${jailBase}/sets` |
391 | + /usr/bin/tar -xf ${jailBase}/sets/${iso_image} -C ${J_TMPDIR} > ${jailBase}/world.tmp 2>&1 | | 391 | + /usr/bin/tar -xf ${jailBase}/sets/${iso_image} -C ${J_TMPDIR} > ${jailBase}/world.tmp 2>&1 |
392 | rc=$? | | 392 | rc=$? |
393 | - if [ ${rc} -eq 0 -a -d "${jailBase}/sets/lib32" ]; then | | 393 | - if [ ${rc} -eq 0 -a -d "${jailBase}/sets/lib32" ]; then |
394 | - cd ${jailBase}/sets/lib32 && yes | sh ./install.sh >> ${jailBase}/world.tmp 2>&1 | | 394 | - cd ${jailBase}/sets/lib32 && yes | sh ./install.sh >> ${jailBase}/world.tmp 2>&1 |
395 | - rc=$? | | 395 | - rc=$? |
396 | + if [ ${rc} -ne 0 ]; then | | 396 | + if [ ${rc} -ne 0 ]; then |
397 | + echo "ERROR: extract world failed - see ${jailBase}/world.tmp" | | 397 | + echo "ERROR: extract world failed - see ${jailBase}/world.tmp" |
398 | + buildJailCleanup 1 ${jailName} ${J_SRCDIR} | | 398 | + buildJailCleanup 1 ${jailName} ${J_SRCDIR} |
399 | + return 1 | | 399 | + return 1 |
400 | + fi | | 400 | fi |
401 | + DFVERS=`awk '/^#define __DragonFly_version/ {print $3}' < ${J_TMPDIR}/usr/include/sys/param.h` | | 401 | + DFVERS=`awk '/^#define __DragonFly_version/ {print $3}' < ${J_TMPDIR}/usr/include/sys/param.h` |
402 | + MAJOR=`echo $DFVERS | awk '{print substr($0,1,1)}'` | | 402 | + MAJOR=`echo $DFVERS | awk '{print substr($0,1,1)}'` |
403 | + MINOR=`echo $DFVERS | awk '{print substr($0,2,3)}' | sed 's/0*//'` | | 403 | + MINOR=`echo $DFVERS | awk '{print substr($0,2,3)}' | sed 's/0*//'` |
404 | + if [ `expr $MINOR % 2` -eq 0 ]; then | | 404 | + if [ `expr $MINOR % 2` -eq 0 ]; then |
405 | + fakebranch="BRANCH=\"RELEASE_${MAJOR}_${MINOR}\"" | | 405 | + fakebranch="BRANCH=\"RELEASE_${MAJOR}_${MINOR}\"" |
406 | + else | | 406 | + else |
407 | + fakebranch="BRANCH=\"DEVELOPMENT_${MAJOR}_${MINOR}\"" | | 407 | + fakebranch="BRANCH=\"DEVELOPMENT_${MAJOR}_${MINOR}\"" |
408 | fi | | 408 | + fi |
409 | + mkdir -p ${jailBase}/src/sys/sys ${jailBase}/src/sys/conf | | 409 | + mkdir -p ${jailBase}/src/sys/sys ${jailBase}/src/sys/conf |
410 | + echo ${fakebranch} > ${jailBase}/src/sys/conf/newvers.sh | | 410 | + echo ${fakebranch} > ${jailBase}/src/sys/conf/newvers.sh |
411 | + cp ${J_TMPDIR}/usr/include/sys/param.h ${jailBase}/src/sys/sys | | 411 | + cp ${J_TMPDIR}/usr/include/sys/param.h ${jailBase}/src/sys/sys |
412 | + rm -rf ${J_TMPDIR}/usr/src | | 412 | + rm -rf ${J_TMPDIR}/usr/src |
413 | + cp -R ${jailBase}/src ${J_TMPDIR}/usr | | 413 | + cp -R ${jailBase}/src ${J_TMPDIR}/usr |
414 | + mkdir ${J_TMPDIR}/usr/4bootstrap | | 414 | + mkdir ${J_TMPDIR}/usr/4bootstrap |
415 | + mv ${J_TMPDIR}/usr/pkg/bin/bmake ${J_TMPDIR}/usr/4bootstrap | | 415 | + mv ${J_TMPDIR}/usr/pkg/bin/bmake ${J_TMPDIR}/usr/4bootstrap |
416 | + mv ${J_TMPDIR}/usr/pkg/etc/mk.conf ${J_TMPDIR}/usr/4bootstrap | | 416 | + mv ${J_TMPDIR}/usr/pkg/etc/mk.conf ${J_TMPDIR}/usr/4bootstrap |
417 | + mv ${J_TMPDIR}/usr/pkg/share/mk ${J_TMPDIR}/usr/4bootstrap | | 417 | + mv ${J_TMPDIR}/usr/pkg/share/mk ${J_TMPDIR}/usr/4bootstrap |
418 | + mv ${J_TMPDIR}/usr/pkg/sbin/pkg_* ${J_TMPDIR}/usr/4bootstrap | | 418 | + mv ${J_TMPDIR}/usr/pkg/sbin/pkg_* ${J_TMPDIR}/usr/4bootstrap |
419 | + rm -rf ${J_TMPDIR}/usr/pkg ${J_TMPDIR}/usr/src-sys.tar.bz2 | | 419 | + rm -rf ${J_TMPDIR}/usr/pkg ${J_TMPDIR}/usr/src-sys.tar.bz2 |
420 | + rm -rf ${J_TMPDIR}/var/db/pkg | | 420 | + rm -rf ${J_TMPDIR}/var/db/pkg |
421 | execute_hook "postJailBuild" "JAIL=${jailName} DESTDIR=${J_TMPDIR} JAIL_ARCH=${jailArch} MY_ARCH=${myArch} JAIL_OBJDIR=${JAIL_OBJDIR} SRCBASE=${SRCBASE} PB=${pb} RC=${rc}" | | 421 | execute_hook "postJailBuild" "JAIL=${jailName} DESTDIR=${J_TMPDIR} JAIL_ARCH=${jailArch} MY_ARCH=${myArch} JAIL_OBJDIR=${JAIL_OBJDIR} SRCBASE=${SRCBASE} PB=${pb} RC=${rc}" |
| @@ -681,61 +681,71 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 | | | @@ -681,61 +681,71 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 |
681 | + echo "createPortsTree: The defaultUpdateType variable in env was changed to ${updateType}" | | 681 | + echo "createPortsTree: The defaultUpdateType variable in env was changed to ${updateType}" |
682 | + echo "Please change it back to 'CSUP', which is the only method supported to get pkgsrc" | | 682 | + echo "Please change it back to 'CSUP', which is the only method supported to get pkgsrc" |
683 | + return 1 | | 683 | + return 1 |
684 | + fi | | 684 | + fi |
685 | + | | 685 | + |
686 | echo "${portsTreeName}: initializing tree" | | 686 | echo "${portsTreeName}: initializing tree" |
687 | generateUpdateCode portstree ${portsTreeName} ${updateType} \ | | 687 | generateUpdateCode portstree ${portsTreeName} ${updateType} \ |
688 | - ${updateHost} "." ${updateCompress} "" \ | | 688 | - ${updateHost} "." ${updateCompress} "" \ |
689 | - ${protocol} ${updateHostDirectory} | | 689 | - ${protocol} ${updateHostDirectory} |
690 | + ${updateHost} ${cvsTag} ${updateCompress} | | 690 | + ${updateHost} ${cvsTag} ${updateCompress} |
691 | | | 691 | |
692 | # add portstree to datastore | | 692 | # add portstree to datastore |
693 | echo -n "${portsTreeName}: adding to datastore... " | | 693 | echo -n "${portsTreeName}: adding to datastore... " |
694 | @@ -1214,7 +1337,7 @@ enterBuild () { | | 694 | @@ -1192,6 +1315,9 @@ enterBuild () { |
| | | 695 | esac |
| | | 696 | done |
| | | 697 | |
| | | 698 | + tc=$(tinderLoc scripts tc) |
| | | 699 | + HOST_WORKDIR=$(${tc} configGet | awk -F= '/^HOST_WORKDIR/ {print $2}') |
| | | 700 | + |
| | | 701 | if [ -z "${portDir}" ]; then |
| | | 702 | echo "enterBuild: no port specified" |
| | | 703 | return 1 |
| | | 704 | @@ -1214,7 +1340,7 @@ enterBuild () { |
695 | fi | | 705 | fi |
696 | | | 706 | |
697 | sleepName=$(echo ${portDir} | sed -e 'y/\//_/') | | 707 | sleepName=$(echo ${portDir} | sed -e 'y/\//_/') |
698 | - portFullDir=${buildRoot}/usr/ports/${portDir} | | 708 | - portFullDir=${buildRoot}/usr/ports/${portDir} |
699 | + portFullDir=${buildRoot}/usr/pkgsrc/${portDir} | | 709 | + portFullDir=${buildRoot}/usr/pkgsrc/${portDir} |
700 | | | 710 | |
701 | if [ ! -d ${portFullDir} ]; then | | 711 | if [ ! -d ${portFullDir} ]; then |
702 | echo "enterBuild: Build environment does not exist yet, sleeping." | | 712 | echo "enterBuild: Build environment does not exist yet, sleeping." |
703 | @@ -1238,7 +1361,7 @@ enterBuild () { | | 713 | @@ -1238,7 +1364,7 @@ enterBuild () { |
704 | sleep 15 | | 714 | sleep 15 |
705 | done | | 715 | done |
706 | | | 716 | |
707 | - echo | | 717 | - echo |
708 | + echo | | 718 | + echo |
709 | cp $(tinderLoc scripts lib/enterbuild) ${buildRoot}/root | | 719 | cp $(tinderLoc scripts lib/enterbuild) ${buildRoot}/root |
710 | chroot ${buildRoot} /root/enterbuild ${portDir} | | 720 | chroot ${buildRoot} /root/enterbuild ${portDir} |
711 | rm -f ${buildRoot}/tmp/.sleep_${sleepName} | | 721 | rm -f ${buildRoot}/tmp/.sleep_${sleepName} |
712 | @@ -1325,7 +1448,6 @@ makeBuild () { | | 722 | @@ -1325,7 +1451,6 @@ makeBuild () { |
713 | resetBuild () { | | 723 | resetBuild () { |
714 | # set up defaults | | 724 | # set up defaults |
715 | build="" | | 725 | build="" |
716 | - nullfs="" | | 726 | - nullfs="" |
717 | cleandistfiles="0" | | 727 | cleandistfiles="0" |
718 | | | 728 | |
719 | # argument handling | | 729 | # argument handling |
720 | @@ -1334,7 +1456,6 @@ resetBuild () { | | 730 | @@ -1334,7 +1459,6 @@ resetBuild () { |
721 | case "${arg}" in | | 731 | case "${arg}" in |
722 | | | 732 | |
723 | b) build="${OPTARG}";; | | 733 | b) build="${OPTARG}";; |
724 | - n) nullfs="-n";; | | 734 | - n) nullfs="-n";; |
725 | ?) exit 1;; | | 735 | ?) exit 1;; |
726 | | | 736 | |
727 | esac | | 737 | esac |
728 | @@ -1490,22 +1611,23 @@ tinderbuild_setup () { | | 738 | @@ -1490,22 +1614,23 @@ tinderbuild_setup () { |
729 | echo "tinderbuild: Finalizing chroot environment" | | 739 | echo "tinderbuild: Finalizing chroot environment" |
730 | | | 740 | |
731 | # Mount ports/ | | 741 | # Mount ports/ |
732 | - if ! requestMount -t buildports -b ${build} -r ${nullfs}; then | | 742 | - if ! requestMount -t buildports -b ${build} -r ${nullfs}; then |
733 | + if ! requestMount -t buildports -b ${build} -r ; then | | 743 | + if ! requestMount -t buildports -b ${build} -r ; then |
734 | echo "tinderbuild: cannot mount ports source" | | 744 | echo "tinderbuild: cannot mount ports source" |
735 | tinderbuild_cleanup 1 | | 745 | tinderbuild_cleanup 1 |
736 | fi | | 746 | fi |
737 | - ln -sf ../a/ports ${buildRoot}/usr/ports | | 747 | - ln -sf ../a/ports ${buildRoot}/usr/ports |
738 | + rm -rf ${buildRoot}/usr/pkgsrc | | 748 | + rm -rf ${buildRoot}/usr/pkgsrc |
739 | + ln -s ../a/pkgsrc ${buildRoot}/usr/pkgsrc | | 749 | + ln -s ../a/pkgsrc ${buildRoot}/usr/pkgsrc |
740 | | | 750 | |
741 | # Mount src/ | | 751 | # Mount src/ |
| @@ -744,112 +754,112 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 | | | @@ -744,112 +754,112 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 |
744 | echo "tinderbuild: cannot mount jail source" | | 754 | echo "tinderbuild: cannot mount jail source" |
745 | tinderbuild_cleanup 1 | | 755 | tinderbuild_cleanup 1 |
746 | fi | | 756 | fi |
747 | | | 757 | |
748 | # For use by pnohang | | 758 | # For use by pnohang |
749 | # XXX: though killall may not work since it's a dynamic executable | | 759 | # XXX: though killall may not work since it's a dynamic executable |
750 | - cp -p /rescue/mount /rescue/umount ${buildRoot}/sbin | | 760 | - cp -p /rescue/mount /rescue/umount ${buildRoot}/sbin |
751 | - cp -p /rescue/ps ${buildRoot}/bin | | 761 | - cp -p /rescue/ps ${buildRoot}/bin |
752 | + cp -p /sbin/mount /sbin/umount ${buildRoot}/sbin | | 762 | + cp -p /sbin/mount /sbin/umount ${buildRoot}/sbin |
753 | + cp -p /bin/ps ${buildRoot}/bin | | 763 | + cp -p /bin/ps ${buildRoot}/bin |
754 | | | 764 | |
755 | # Mount /dev, since we're going to be chrooting shortly | | 765 | # Mount /dev, since we're going to be chrooting shortly |
756 | mount -t devfs devfs ${buildRoot}/dev >/dev/null 2>&1 | | 766 | mount -t devfs devfs ${buildRoot}/dev >/dev/null 2>&1 |
757 | @@ -1522,12 +1644,6 @@ tinderbuild_setup () { | | 767 | @@ -1522,12 +1647,6 @@ tinderbuild_setup () { |
758 | tinderbuild_cleanup 1 | | 768 | tinderbuild_cleanup 1 |
759 | fi | | 769 | fi |
760 | | | 770 | |
761 | - # Hack to fix some recent pkg_add problems in some releases | | 771 | - # Hack to fix some recent pkg_add problems in some releases |
762 | - pitar=$(tinderLoc jail ${jail})/pkg_install.tar | | 772 | - pitar=$(tinderLoc jail ${jail})/pkg_install.tar |
763 | - if [ -f ${pitar} ]; then | | 773 | - if [ -f ${pitar} ]; then |
764 | - tar -C ${buildRoot} -xf ${pitar} | | 774 | - tar -C ${buildRoot} -xf ${pitar} |
765 | - fi | | 775 | - fi |
766 | - | | 776 | - |
767 | # Handle the distfile cache | | 777 | # Handle the distfile cache |
768 | if [ -n "${DISTFILE_CACHE}" ]; then | | 778 | if [ -n "${DISTFILE_CACHE}" ]; then |
769 | if ! requestMount -t builddistcache -b ${build} \ | | 779 | if ! requestMount -t builddistcache -b ${build} \ |
770 | @@ -1557,7 +1673,7 @@ tinderbuild_setup () { | | 780 | @@ -1557,7 +1676,7 @@ tinderbuild_setup () { |
771 | mkdir -p ${ccacheDir} $(tinderLoc buildccache ${build}) | | 781 | mkdir -p ${ccacheDir} $(tinderLoc buildccache ${build}) |
772 | | | 782 | |
773 | if ! requestMount -t buildccache -b ${build} \ | | 783 | if ! requestMount -t buildccache -b ${build} \ |
774 | - -s ${ccacheDir} ${nullfs}; then | | 784 | - -s ${ccacheDir} ${nullfs}; then |
775 | + -s ${ccacheDir} ; then | | 785 | + -s ${ccacheDir} ; then |
776 | echo "tinderbuild: cannot mount ccache" | | 786 | echo "tinderbuild: cannot mount ccache" |
777 | tinderbuild_cleanup 1 | | 787 | tinderbuild_cleanup 1 |
778 | fi | | 788 | fi |
779 | @@ -1574,8 +1690,7 @@ tinderbuild_setup () { | | 789 | @@ -1574,8 +1693,7 @@ tinderbuild_setup () { |
780 | | | 790 | |
781 | mkdir -p ${optionsDir} $(tinderLoc buildoptions ${build}) | | 791 | mkdir -p ${optionsDir} $(tinderLoc buildoptions ${build}) |
782 | | | 792 | |
783 | - if ! requestMount -t buildoptions -b ${build} \ | | 793 | - if ! requestMount -t buildoptions -b ${build} \ |
784 | - -s ${optionsDir} ${nullfs}; then | | 794 | - -s ${optionsDir} ${nullfs}; then |
785 | + if ! requestMount -t buildoptions -b ${build} -s ${optionsDir} ; then | | 795 | + if ! requestMount -t buildoptions -b ${build} -s ${optionsDir} ; then |
786 | echo "tinderbuild: cannot mount options" | | 796 | echo "tinderbuild: cannot mount options" |
787 | tinderbuild_cleanup 1 | | 797 | tinderbuild_cleanup 1 |
788 | fi | | 798 | fi |
789 | @@ -1658,10 +1773,9 @@ tinderbuild () { | | 799 | @@ -1658,10 +1776,9 @@ tinderbuild () { |
790 | cleanpackages=0 | | 800 | cleanpackages=0 |
791 | init=0 | | 801 | init=0 |
792 | jobs=1 | | 802 | jobs=1 |
793 | - onceonly=0 | | 803 | - onceonly=0 |
794 | + twice=0 | | 804 | + twice=0 |
795 | onlymake=0 | | 805 | onlymake=0 |
796 | noduds="" | | 806 | noduds="" |
797 | - nullfs="" | | 807 | - nullfs="" |
798 | pbargs="" | | 808 | pbargs="" |
799 | skipmake=0 | | 809 | skipmake=0 |
800 | updateports=0 | | 810 | updateports=0 |
801 | @@ -1708,9 +1822,8 @@ tinderbuild () { | | 811 | @@ -1708,9 +1825,8 @@ tinderbuild () { |
802 | x-fetch-original) pbargs="${pbargs} -fetch-original";; | | 812 | x-fetch-original) pbargs="${pbargs} -fetch-original";; |
803 | x-noclean) pbargs="${pbargs} -noclean";; | | 813 | x-noclean) pbargs="${pbargs} -noclean";; |
804 | x-nolog) pbargs="${pbargs} -nolog";; | | 814 | x-nolog) pbargs="${pbargs} -nolog";; |
805 | - x-nullfs) pbargs="${pbargs} -nullfs"; nullfs="-n";; | | 815 | - x-nullfs) pbargs="${pbargs} -nullfs"; nullfs="-n";; |
806 | x-plistcheck) pbargs="${pbargs} -plistcheck";; | | 816 | x-plistcheck) pbargs="${pbargs} -plistcheck";; |
807 | - x-onceonly) onceonly=1;; | | 817 | - x-onceonly) onceonly=1;; |
808 | + x-twice) twice=1;; | | 818 | + x-twice) twice=1;; |
809 | | | 819 | |
810 | -*) return 1;; | | 820 | -*) return 1;; |
811 | *) ports="${ports} $1";; | | 821 | *) ports="${ports} $1";; |
812 | @@ -1836,7 +1949,8 @@ tinderbuild () { | | 822 | @@ -1836,7 +1952,8 @@ tinderbuild () { |
813 | echo "tinderbuild: cannot mount portstree: ${portstree}" | | 823 | echo "tinderbuild: cannot mount portstree: ${portstree}" |
814 | exit 1 | | 824 | exit 1 |
815 | fi | | 825 | fi |
816 | - env PORTSDIR=$(tinderLoc portstree ${portstree})/ports \ | | 826 | - env PORTSDIR=$(tinderLoc portstree ${portstree})/ports \ |
817 | + env PORTSDIR=$(tinderLoc portstree ${portstree})/pkgsrc \ | | 827 | + env PORTSDIR=$(tinderLoc portstree ${portstree})/pkgsrc \ |
818 | + OPTNFILE=$(tinderLoc options $build)/pkg_options \ | | 828 | + OPTNFILE=$(tinderLoc options $build)/pkg_options \ |
819 | $(tinderLoc scripts lib/makemake) ${noduds} ${build} ${ports} | | 829 | $(tinderLoc scripts lib/makemake) ${noduds} ${build} ${ports} |
820 | ) | | 830 | ) |
821 | if [ $? -ne 0 ]; then | | 831 | if [ $? -ne 0 ]; then |
822 | @@ -1855,10 +1969,6 @@ tinderbuild () { | | 832 | @@ -1855,10 +1972,6 @@ tinderbuild () { |
823 | | | 833 | |
824 | # Set up the chrooted environment | | 834 | # Set up the chrooted environment |
825 | osmajor=$(echo ${jail} | sed -E -e 's|(^[[:digit:]]+).*$|\1|') | | 835 | osmajor=$(echo ${jail} | sed -E -e 's|(^[[:digit:]]+).*$|\1|') |
826 | - if [ ${osmajor} -lt 6 ]; then | | 836 | - if [ ${osmajor} -lt 6 ]; then |
827 | - echo "tinderbuild: unhandled OS version: ${osmajor}" | | 837 | - echo "tinderbuild: unhandled OS version: ${osmajor}" |
828 | - tinderbuild_cleanup 1 | | 838 | - tinderbuild_cleanup 1 |
829 | - fi | | 839 | - fi |
830 | | | 840 | |
831 | tinderbuild_setup | | 841 | tinderbuild_setup |
832 | | | 842 | |
833 | @@ -1866,7 +1976,7 @@ tinderbuild () { | | 843 | @@ -1866,7 +1979,7 @@ tinderbuild () { |
834 | ${tc} updateBuildStatus -b ${build} -s PORTBUILD | | 844 | ${tc} updateBuildStatus -b ${build} -s PORTBUILD |
835 | tinderbuild_phase 0 ${jobs} ${pkgDir} | | 845 | tinderbuild_phase 0 ${jobs} ${pkgDir} |
836 | error=$? | | 846 | error=$? |
837 | - if [ ${onceonly} -ne 1 ]; then | | 847 | - if [ ${onceonly} -ne 1 ]; then |
838 | + if [ ${twice} -eq 1 ]; then | | 848 | + if [ ${twice} -eq 1 ]; then |
839 | if [ ${error} -ne 0 ] ; then | | 849 | if [ ${error} -ne 0 ] ; then |
840 | tinderbuild_setup | | 850 | tinderbuild_setup |
841 | fi | | 851 | fi |
842 | @@ -1885,21 +1995,46 @@ init () { | | 852 | @@ -1885,21 +1998,46 @@ init () { |
843 | mkdir -p ${pb}/${dir} | | 853 | mkdir -p ${pb}/${dir} |
844 | done | | 854 | done |
845 | | | 855 | |
846 | - read -p "Enter a default cvsup host [${_defaultUpdateHost}]: " host | | 856 | - read -p "Enter a default cvsup host [${_defaultUpdateHost}]: " host |
847 | + read -p "Enter a default cvsup server for pkgsrc [${_defaultUpdateHost}]: " host | | 857 | + read -p "Enter a default cvsup server for pkgsrc [${_defaultUpdateHost}]: " host |
848 | if [ -z "${host}" ]; then | | 858 | if [ -z "${host}" ]; then |
849 | host=${_defaultUpdateHost} | | 859 | host=${_defaultUpdateHost} |
850 | fi | | 860 | fi |
851 | | | 861 | |
852 | - read -p "Enter a default update type or command [${_defaultUpdateType}]: " type | | 862 | - read -p "Enter a default update type or command [${_defaultUpdateType}]: " type |
853 | - if [ -z "${type}" ]; then | | 863 | - if [ -z "${type}" ]; then |
854 | - type=${_defaultUpdateType} | | 864 | - type=${_defaultUpdateType} |
855 | + # Update type is not optional, it's CSUP only, so we won't ask. | | 865 | + # Update type is not optional, it's CSUP only, so we won't ask. |
| @@ -882,37 +892,37 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 | | | @@ -882,37 +892,37 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 |
882 | globalenv=$(tinderLoc scripts etc/env)/GLOBAL | | 892 | globalenv=$(tinderLoc scripts etc/env)/GLOBAL |
883 | echo "export defaultUpdateHost=${host}" >> ${globalenv} | | 893 | echo "export defaultUpdateHost=${host}" >> ${globalenv} |
884 | - echo "export defaultUpdateType=${type}" >> ${globalenv} | | 894 | - echo "export defaultUpdateType=${type}" >> ${globalenv} |
885 | + echo "export defaultUpdateType=${_defaultUpdateType}" >> ${globalenv} | | 895 | + echo "export defaultUpdateType=${_defaultUpdateType}" >> ${globalenv} |
886 | + echo "export defaultDragonHost=${dragonhost}" >> ${globalenv} | | 896 | + echo "export defaultDragonHost=${dragonhost}" >> ${globalenv} |
887 | + echo "export defaultDragonType=${_defaultDragonType}" >> ${globalenv} | | 897 | + echo "export defaultDragonType=${_defaultDragonType}" >> ${globalenv} |
888 | + echo "export defaultGitSrcHost=${gitsrchost}" >> ${globalenv} | | 898 | + echo "export defaultGitSrcHost=${gitsrchost}" >> ${globalenv} |
889 | | | 899 | |
890 | - tinderEcho "Default update host and type have been set. These can be changed later by modifying ${globalenv}." | | 900 | - tinderEcho "Default update host and type have been set. These can be changed later by modifying ${globalenv}." |
891 | + tinderEcho "The defaults have been set. These can be changed later by modifying ${globalenv}." | | 901 | + tinderEcho "The defaults have been set. These can be changed later by modifying ${globalenv}." |
892 | | | 902 | |
893 | return 0 | | 903 | return 0 |
894 | } | | 904 | } |
895 | @@ -1948,7 +2083,8 @@ addPortToBuild () { | | 905 | @@ -1948,7 +2086,8 @@ addPortToBuild () { |
896 | buildenv ${jail} ${portsTree} ${build} | | 906 | buildenv ${jail} ${portsTree} ${build} |
897 | buildenvNoHost ${build} | | 907 | buildenvNoHost ${build} |
898 | | | 908 | |
899 | - export PORTSDIR=$(tinderLoc portstree ${portsTree})/ports | | 909 | - export PORTSDIR=$(tinderLoc portstree ${portsTree})/ports |
900 | + export PORTSDIR=$(tinderLoc portstree ${portsTree})/pkgsrc | | 910 | + export PORTSDIR=$(tinderLoc portstree ${portsTree})/pkgsrc |
901 | + export OPTNFILE=$(tinderLoc options $build)/pkg_options | | 911 | + export OPTNFILE=$(tinderLoc options $build)/pkg_options |
902 | if [ -z "${portDir}" ]; then | | 912 | if [ -z "${portDir}" ]; then |
903 | ${tc} addPortToOneBuild -b ${build} ${norecurse} | | 913 | ${tc} addPortToOneBuild -b ${build} ${norecurse} |
904 | else | | 914 | else |
905 | @@ -1958,36 +2094,7 @@ addPortToBuild () { | | 915 | @@ -1958,36 +2097,7 @@ addPortToBuild () { |
906 | fi | | 916 | fi |
907 | ${tc} addPortToOneBuild -b ${build} -d ${portDir} ${norecurse} | | 917 | ${tc} addPortToOneBuild -b ${build} -d ${portDir} ${norecurse} |
908 | fi | | 918 | fi |
909 | - if [ ${options} -eq 1 -a ${OPTIONS_ENABLED} -eq 1 ]; then | | 919 | - if [ ${options} -eq 1 -a ${OPTIONS_ENABLED} -eq 1 ]; then |
910 | - pdirs="" | | 920 | - pdirs="" |
911 | - if [ -z "${portDir}" ]; then | | 921 | - if [ -z "${portDir}" ]; then |
912 | - pdirs=$(${tc} getPortsForBuild -b ${build} 2>/dev/null) | | 922 | - pdirs=$(${tc} getPortsForBuild -b ${build} 2>/dev/null) |
913 | - else | | 923 | - else |
914 | - pdirs="${PORTSDIR}/${portDir}" | | 924 | - pdirs="${PORTSDIR}/${portDir}" |
915 | - fi | | 925 | - fi |
916 | - rmconfig=true | | 926 | - rmconfig=true |
917 | - if [ ${cleanOptions} -eq 1 ]; then | | 927 | - if [ ${cleanOptions} -eq 1 ]; then |
918 | - if [ -z "${norecurse}" ]; then | | 928 | - if [ -z "${norecurse}" ]; then |
| @@ -930,51 +940,51 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 | | | @@ -930,51 +940,51 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 |
930 | - ( cd ${pdir} && ${rmconfig} \ | | 940 | - ( cd ${pdir} && ${rmconfig} \ |
931 | - && make -k config-recursive ) | | 941 | - && make -k config-recursive ) |
932 | - else | | 942 | - else |
933 | - ( cd ${pdir} && ${rmconfig} \ | | 943 | - ( cd ${pdir} && ${rmconfig} \ |
934 | - && make config ) | | 944 | - && make config ) |
935 | - fi | | 945 | - fi |
936 | - fi | | 946 | - fi |
937 | - done | | 947 | - done |
938 | - fi | | 948 | - fi |
939 | + # FreeBSD-style interactive option entering not supported yet | | 949 | + # FreeBSD-style interactive option entering not supported yet |
940 | | | 950 | |
941 | if [ -n "${save_SRCBASE}" ]; then | | 951 | if [ -n "${save_SRCBASE}" ]; then |
942 | export SRCBASE=${save_SRCBASE} | | 952 | export SRCBASE=${save_SRCBASE} |
943 | @@ -2174,10 +2281,7 @@ copyBuild () { | | 953 | @@ -2174,10 +2284,7 @@ copyBuild () { |
944 | if [ ! -d ${destOptionsDir} ]; then | | 954 | if [ ! -d ${destOptionsDir} ]; then |
945 | mkdir -p ${destOptionsDir} | | 955 | mkdir -p ${destOptionsDir} |
946 | fi | | 956 | fi |
947 | - ( | | 957 | - ( |
948 | - cd ${srcOptionsDir} | | 958 | - cd ${srcOptionsDir} |
949 | - tar -cpf - . | tar -C ${destOptionsDir} -xpf - | | 959 | - tar -cpf - . | tar -C ${destOptionsDir} -xpf - |
950 | - ) | | 960 | - ) |
951 | + cp ${srcOptionsDir}/pkg_options ${destOptionsDir} | | 961 | + cp ${srcOptionsDir}/pkg_options ${destOptionsDir} |
952 | else | | 962 | else |
953 | echo "copyBuild: not copying OPTIONS to ${dest} since it has no OPTIONS directory" | | 963 | echo "copyBuild: not copying OPTIONS to ${dest} since it has no OPTIONS directory" |
954 | fi | | 964 | fi |
955 | @@ -2293,13 +2397,13 @@ tbcleanup () { | | 965 | @@ -2293,13 +2400,13 @@ tbcleanup () { |
956 | pathFound=0 | | 966 | pathFound=0 |
957 | for portstree in ${portstrees} ; do | | 967 | for portstree in ${portstrees} ; do |
958 | path=$(tinderLoc portstree ${portstree}) | | 968 | path=$(tinderLoc portstree ${portstree}) |
959 | - path="${path}/ports/${port}/Makefile" | | 969 | - path="${path}/ports/${port}/Makefile" |
960 | + path="${path}/pkgsrc/${port}/Makefile" | | 970 | + path="${path}/pkgsrc/${port}/Makefile" |
961 | if [ -e ${path} ]; then | | 971 | if [ -e ${path} ]; then |
962 | if [ ${cleanDistfiles} = 1 ]; then | | 972 | if [ ${cleanDistfiles} = 1 ]; then |
963 | oldcwd=${PWD} | | 973 | oldcwd=${PWD} |
964 | path=$(tinderLoc portstree ${portstree}) | | 974 | path=$(tinderLoc portstree ${portstree}) |
965 | - cd "${path}/ports/${port}" | | 975 | - cd "${path}/ports/${port}" |
966 | - distinfo=$(env PORTSDIR="${path}/ports" make -V MD5_FILE) | | 976 | - distinfo=$(env PORTSDIR="${path}/ports" make -V MD5_FILE) |
967 | + cd "${path}/pkgsrc/${port}" | | 977 | + cd "${path}/pkgsrc/${port}" |
968 | + distinfo=$(env PORTSDIR="${path}/pkgsrc" bmake -V MD5_FILE) | | 978 | + distinfo=$(env PORTSDIR="${path}/pkgsrc" bmake -V MD5_FILE) |
969 | if [ -f "${distinfo}" ]; then | | 979 | if [ -f "${distinfo}" ]; then |
970 | for df in $(grep '^MD5' ${distinfo} | awk -F '[\(\)]' '{print $2}'); do | | 980 | for df in $(grep '^MD5' ${distinfo} | awk -F '[\(\)]' '{print $2}'); do |
971 | if ! grep -q "^${df}\$" ${disttmp}; then | | 981 | if ! grep -q "^${df}\$" ${disttmp}; then |
972 | @@ -2383,7 +2487,7 @@ tbcleanup () { | | 982 | @@ -2383,7 +2490,7 @@ tbcleanup () { |
973 | fi | | 983 | fi |
974 | | | 984 | |
975 | path=$(tinderLoc portstree ${portstree}) | | 985 | path=$(tinderLoc portstree ${portstree}) |
976 | - path="${path}/ports/${port}/Makefile" | | 986 | - path="${path}/ports/${port}/Makefile" |
977 | + path="${path}/pkgsrc/${port}/Makefile" | | 987 | + path="${path}/pkgsrc/${port}/Makefile" |
978 | | | 988 | |
979 | if [ ! -e ${path} ]; then | | 989 | if [ ! -e ${path} ]; then |
980 | echo "Removing build port database entry for nonexistent port ${build}/${port}" | | 990 | echo "Removing build port database entry for nonexistent port ${build}/${port}" |