chroot?

Juan Manuel Palacios jmpp at macports.org
Tue Feb 27 08:13:47 PST 2007


	This script seems interesting, I'll give it a look and also try to 
recover the old Wiki chrooting doc to make up for a new one. In any 
case, port(1) supports "trace mode" operation through its -t flag, by 
which all accesses outside the destrooting sandbox are caught and 
warned about, deprecating on many aspects the need to build the port in 
a clean chroot to assert its reliability.

	Regards,....


-jmpp


On Feb 27, 2007, at 1:37 AM, Christophe Vandeplas wrote:

> Bob Zimmermann wrote:
>> Hi-
>>
>> I'm a new porter.  I want to submit some ports but also want to test 
>> my
>> ports on a clean machine first.  There is mention on the wiki about
>> chrooting the OS to do this, however, the link which describes it is
>> dead (from the old opendarwin page).  Can anyone let me know how this 
>> is
>> done?
>
> Hi Bob,
>
> have a look at the scripts I attached.
> Edit them (variables) and run it from your shell.
>
> There are still some things missing as I couldn't compile java-stuff.
>
>
> Hope this helps
>
>
> greets
> #!/bin/bash
>
> #IMG_PATH="/Volumes/10-4-chroot-hfs"
> IMG_PATH="/Volumes/JfsDisc"
>
> echo "-- Mounting required stuff"
> sudo mount -t devfs devfs ${IMG_PATH}/dev
> sudo mount -t fdesc -o union stdin ${IMG_PATH}/dev
> sudo mount_volfs ${IMG_PATH}/.vol
> #echo "-- Please enter the smb password"
> #mount_smbfs //chri at 192.168.1.10/macports  ${IMG_PATH}/MacPorts
> echo "-- Entering chroot";
> sudo chroot ${IMG_PATH}/
> echo "-- Unmounting mounted stuff";
> #umount ${IMG_PATH}/MacPorts
> sudo umount ${IMG_PATH}/.vol
> sudo umount ${IMG_PATH}/dev
> sudo umount ${IMG_PATH}/dev
> echo "-- Finished";
> #!/bin/bash
> # Hail to http://gene-hacker.info/darwinports/osx_darwin_chroot/
> # Copyleft Christophe Vandeplas <christophe at vandeplas.com>
>
> #IMG_NAME="10-4-chroot-hfs"
> IMG_NAME="JfsDisc"
> IMG_PATH="/Volumes/${IMG_NAME}"
> DVD_PATH="/Volumes/Mac OS X Install Disc 1"
> CHROOT_SIZE="5g"
>
> hdiutil create -fs HFS+ -volname ${IMG_NAME} -size ${CHROOT_SIZE} 
> chroot
>
> export CM_BUILD=CM_BUILD
>
> echo "Please mount the created image (30 sec left)"
> sleep 30s;
>
>
> cd ${IMG_PATH}
> sudo installer -pkg 
> "${DVD_PATH}/System/Installation/Packages/BaseSystem.pkg" -target 
> "${IMG_PATH}"
> sudo installer -pkg 
> "${DVD_PATH}/System/Installation/Packages/Essentials.pkg" -target 
> "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/System/Installation/Packages/BSD.pkg" 
> -target "${IMG_PATH}"
> sudo installer -pkg 
> "${DVD_PATH}/System/Installation/Packages/X11User.pkg" -target 
> "${IMG_PATH}"
> sudo installer -pkg 
> "${DVD_PATH}/System/Installation/Packages/Java.pkg" -target 
> "${IMG_PATH}"
>
> sudo installer -pkg "${DVD_PATH}/Xcode 
> Tools/Packages/DeveloperTools.pkg" -target "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/Xcode 
> Tools/Packages/MacOSX10.4.Universal.pkg" -target "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/Xcode Tools/Packages/gcc3.3.pkg" 
> -target "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/Xcode Tools/Packages/gcc4.0.pkg" 
> -target "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/Xcode Tools/Packages/X11SDK.pkg" 
> -target "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/Xcode Tools/Packages/BSDSDK.pkg" 
> -target "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/Xcode Tools/Packages/DevSDK.pkg" 
> -target "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/Xcode 
> Tools/Packages/WebObjectsDevelopment.pkg" -target "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/Xcode 
> Tools/Packages/WebObjectsRuntime.pkg" -target "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/Xcode Tools/Packages/WebKitSDK.pkg" 
> -target "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/Xcode 
> Tools/Packages/QuickTimeSDK.pkg" -target "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/Xcode Tools/Packages/OpenGLSDK.pkg" 
> -target "${IMG_PATH}"
> sudo installer -pkg "${DVD_PATH}/Xcode 
> Tools/Packages/CoreAudioSDK.pkg" -target "${IMG_PATH}"
>
>
> #mkdir -p ${IMG_PATH}/MacPorts
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/macports-dev




More information about the macports-dev mailing list