Giter Site home page Giter Site logo

autodmg's People

Contributors

magervalp avatar timgates42 avatar timsutton avatar yesthatallen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autodmg's Issues

Alternate volume name

Is there a way to create a system image with a volume name other than the default "Macintosh HD"? We have been using volume name as a final check to make sure NetInstalls only occur on a volume name "Managed HD".

AutoDMG does not complete ASR steps in CLI nor GUI

AutoDMG 1.3b220 doesn't finish ASR finalize step (log below)
Built on iMac 13,2 10.9.2C64
Occurred both on CLI and GUI (image completes but haven't tested imaging w/ it)

Starting phase: Finalizing disk image
phase: Finalizing disk image
Finalize task running
message: Scanning disk image for restore
Launching finalize with arguments:
'/Applications/AutoDMG.app/Contents/Resources/progresswatcher.py'
'--socket'
'/tmp/se.gu.it.IEDSocketListener.076a9c3ccd226021'
'imagescan'
'/Volumes/Data_Drive/AutoDMG Builds/DCL_Mavericks_140321-10.9.2-13C64.hfs.dmg'
Script phase: asr1
Starting phase: Finalizing disk image
phase: Finalizing disk image
Task exited with status 1
Workflow failed: Build failed (Task exited with status 1)
Build failed: Build failed
Task exited with status 1
2014-03-21 08:37:10.593 AutoDMG[88112:4307] PyObjC: Converting exception to Objective-C:
sys.excepthook is missing
lost sys.stderr

CLI build crashes if there is no UpdateProfiles.plist in Application Support.

sudo build/Release/AutoDMG.app/Contents/MacOS/AutoDMG -r build --updates --output imagebuild/cda-base-10.9.2-13C64.dmg /Users/Shared/Jenkins-Slave/workspace/CDA-Base-Image/scratch/InstallESD.dmg Running as root, using /var/root/Library/Application Support/AutoDMG Installer: /Users/Shared/Jenkins-Slave/workspace/CDA-Base-Image/scratch/InstallESD.dmg Output Path: imagebuild/cda-base-10.9.2-13C64.dmg Volume Name: Macintosh HD Accepted source /Users/Shared/Jenkins-Slave/workspace/CDA-Base-Image/scratch/InstallESD.dmg: Mac OS X 10.9.2 13C64 Found installer: Mac OS X 10.9.2 13C64 No update profile for 10.9.2 13C64 Traceback (most recent call last): File "main.py", line 166, in <module> sys.exit(cli_main(decoded_argv)) File "main.py", line 138, in cli_main return args.func(args) File "/Users/Shared/Jenkins-Slave/workspace/CDA-Base-Image/build/Release/AutoDMG.app/Contents/Resources/IEDCLIController.py", line 137, in cmdBuild_ self.failWithMessage_(self.profileController.whyNoProfileForVersion_build_(version, build)) NameError: global name 'version' is not defined 2014-03-22 15:17:32.905 AutoDMG[36670:507] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '/Users/Shared/Jenkins-Slave/workspace/CDA-Base-Image/AutoDMG/main.m:46 main() PyRun_SimpleFile failed with file '/Users/Shared/Jenkins-Slave/workspace/CDA-Base-Image/build/Release/AutoDMG.app/Contents/Resources/main.py'. See console for errors.' *** First throw call stack: ( 0 CoreFoundation 0x00007fff906c125c __exceptionPreprocess + 172 1 libobjc.A.dylib 0x00007fff90ef1e75 objc_exception_throw + 43 2 CoreFoundation 0x00007fff906c110c +[NSException raise:format:] + 204 3 AutoDMG 0x0000000104d70c3a main + 848 4 libdyld.dylib 0x00007fff8d6105fd start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException

Enhancement: Allow pkg installers wrapped in a dmg

Many (arguably most) package installers come wrapped in a disk image. Tools like InstaDMG and Munki support using the dmg in the catalogue/manifest rather than needing to extract the package installer from its wrapper. It would be an excellent addition to AutoDMG to support dragging such disk images in to the workflow.

Not Able To Start AutoDMG

I get the following when running AutoDMG 1.2.1. I'm using the binary that is on the releases page.

pip install pyobj fixed my problem.

Not sure if this is something can be bundled with the program or have it listed as a requirement.

gii1303aardvark:MacOS jonathan.chan$ ./AutoDMG 
Traceback (most recent call last):
  File "main.py", line 11, in <module>
    import objc
ImportError: No module named objc
2014-02-27 11:44:11.681 AutoDMG[955:507] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '/Users/pelle/Dropbox/prog/AutoDMG/AutoDMG/main.m:46 main() PyRun_SimpleFile failed with file '/Applications/AutoDMG.app/Contents/Resources/main.py'.  See console for errors.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff8a05225c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff8c71ce75 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8a05210c +[NSException raise:format:] + 204
    3   AutoDMG                             0x000000010654dc4e AutoDMG + 3150
    4   libdyld.dylib                       0x00007fff8ed9c5fd start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

10.9.2 13C64 and crash of AutoDMG 1.2.1

I've tried to build a Vanilla-DMG from the latest version 1.3.40 of the Mavericks Installer, but AutoDMG crashes.

Here is the report:

Process: AutoDMG [23170]
Path: /Applications/AutoDMG.app/Contents/MacOS/AutoDMG
Identifier: se.gu.it.AutoDMG
Version: 1.2.1 (194)
Code Type: X86-64 (Native)
Parent Process: launchd [485]
Responsible: AutoDMG [23170]
User ID: 1818105622

Date/Time: 2014-02-26 15:29:43.775 +0100
OS Version: Mac OS X 10.9.2 (13C64)
Report Version: 11
Anonymous UUID: C595D9E2-2948-1688-B795-DEBE0F2FFFC6

Sleep/Wake UUID: D8A3E48B-A6D3-4D9E-B0C2-5355A6293708

Crashed Thread: 13

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
*** Terminating app due to uncaught exception 'OC_PythonException', reason: '<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)'
abort() called
terminating with uncaught exception of type NSException

Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff8de4525c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff8caa0e75 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8de44e09 -[NSException raise] + 9
3 _objc.so 0x00000001065f2626 PyObjCFFI_MakeClosure + 2197
4 libffi.dylib 0x00007fff93ffea1f ffi_closure_unix64_inner + 509
5 libffi.dylib 0x00007fff93ffe11e ffi_closure_unix64 + 70
6 libsystem_pthread.dylib 0x00007fff98176899 _pthread_body + 138
7 libsystem_pthread.dylib 0x00007fff9817672a _pthread_struct_init + 0
8 libsystem_pthread.dylib 0x00007fff9817afc9 thread_start + 13

Thread 0:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x00007fff8dd01ae7 CFBasicHashFindBucket + 3463
1 com.apple.CoreFoundation 0x00007fff8dd00d2f CFDictionaryGetValue + 111
2 com.apple.AppKit 0x00007fff8e35e450 -[NSView _removeNextPointersToMe] + 432
3 com.apple.AppKit 0x00007fff8e35dff4 -[NSView _removeFromKeyViewLoop] + 204
4 com.apple.AppKit 0x00007fff8e35d8cc -[NSView _finalizeWithReferenceCounting] + 980
5 com.apple.AppKit 0x00007fff8e35d4d0 -[NSView dealloc] + 151
6 com.apple.AppKit 0x00007fff8e3fabe7 -[NSControl dealloc] + 134
7 com.apple.AppKit 0x00007fff8e3fab5a -[NSTextField dealloc] + 58
8 com.apple.FinderKit 0x00007fff95b785d2 -[FI_TNameTextField dealloc] + 56
9 libobjc.A.dylib 0x00007fff8ca9a65a (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 502
10 com.apple.CoreFoundation 0x00007fff8dd2fb72 _CFAutoreleasePoolPop + 50
11 com.apple.Foundation 0x00007fff9434be17 -[NSAutoreleasePool drain] + 147
12 com.apple.AppKit 0x00007fff8e303bd8 -[NSApplication run] + 725
13 com.apple.AppKit 0x00007fff8e2ee913 NSApplicationMain + 940
14 _AppKit.so 0x0000000106f9cf91 0x106f9a000 + 12177
15 org.python.python 0x0000000104bd914d PyEval_EvalFrameEx + 8080
16 org.python.python 0x0000000104bd7093 PyEval_EvalCodeEx + 1641
17 org.python.python 0x0000000104bdd8c8 0x104b57000 + 551112
18 org.python.python 0x0000000104bda4d4 PyEval_EvalFrameEx + 13079
19 org.python.python 0x0000000104bd7093 PyEval_EvalCodeEx + 1641
20 org.python.python 0x0000000104bd6a24 PyEval_EvalCode + 54
21 org.python.python 0x0000000104bf5c2c 0x104b57000 + 650284
22 org.python.python 0x0000000104bf5cd3 PyRun_FileExFlags + 137
23 org.python.python 0x0000000104bf5821 PyRun_SimpleFileExFlags + 718
24 se.gu.it.AutoDMG 0x0000000104b52c05 0x104b52000 + 3077
25 libdyld.dylib 0x00007fff8a6935fd start + 1

Thread 1:
0 libsystem_kernel.dylib 0x00007fff923c2e6a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff98177f08 _pthread_wqthread + 330
2 libsystem_pthread.dylib 0x00007fff9817afb9 start_wqthread + 13

Thread 2:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff923c3662 kevent64 + 10
1 libdispatch.dylib 0x00007fff946ce43d _dispatch_mgr_invoke + 239
2 libdispatch.dylib 0x00007fff946ce152 _dispatch_mgr_thread + 52

.
.
.

and so on ...

Any idea?

Thanks in advance,
Marcel

enhancement - download updates during CLI run

Currently(AFAICT) updates must be manually fetched and cached in advance of a CLI run, even if ApplyUpdates is set to true. I'd think it's reasonable to expect folks would want to 1. fetch most recent profile(assuming we're still on the same, most-current OS build) and 2. cache and apply the updates.
Also, documentation for the CLI download option in the help/on the wiki could be expanded with an example, e.g. download 10.9.2 13C64

Packages on network volumes

Using AutoDMG 1.3: Won't install packages on a network volume. Log shows failure on "installer -pkginfo" command. As a command-line test, installer -pkginfo will not verify packages stored on network volumes.

installer: Error verifying package contents: The package can’t be installed from a network volume. Copy the package to a local volume and try again.

But AutoDMG 1.2.1 works with packages on network volumes. No verifying done in this version?

Not pulling updates for new 10.9.1

Ran autodmg 1.2 (182) on the new builds of 10.9.1 (the late2013 version and the standard version), and neither one picked up itunes 11.1.3, iBooks 1.01, or ARD3.7.1

EDIT:
Disregard. I tried it again today and it picked everything up. Sorry! This can be closed.

Enhancement: support InstallESD.dmg without .app wrappers

The use case for this would be building images based off hardware-specific builds. For example, certain 2013 iMacs cannot take a the generic 10.8.5 12F45 build, so it would be useful to be able to support dropping in an InstallESD.dmg that's captured from a re-downloaded install on this type of Mac.

Working support exists in #2, so as mentioned there I can re-merge this on top of the code once it's reached 1.0.

10.7 support

Re-enable 10.7 and merge the UpdateProfiles from FireAllianceNX.

Failed to Mount

Hi,

Getting errors on build for Mavericks - error:

Failed to mount /Users/admin/Library/Application Support/AutoDMG/Updates/63e61678caa50dd41720751f362897195ce732b1

hdiutil attach failed with return code 1: hdiutil: attach failed - No such file or directory

And after ok'ing them build dialog just sit and idles

Runs forever

On certain builds of OS X, the process never completes, even after having run for days.

Build stop with .pkg on external volume and/or • in file path

I just try a first simple build with 10.9 vanilla, iTunes 11.1.2 and a custom Office2011SP3.pkg

Build stop just after the admin prompt. The Office custom package was on a firewire drive, in a sub folder with • for first letter name.

No problem with the same pkg copy on the desktop.

Option to Save a Template.adtmpl in the GUI

Add an option to save the current GUI configuration as a .adtmpl file. This would help a user transition to the command line version. Also, if the GUI could also load a previous Template, the user could load the Template, make pkg changes and run a new build.

Updated Profiles do not re-enable Download button

When you manually check for updates to profiles and one is found that needs to be downloaded, the download box remains disabled. You need to relaunch the AutoDMG app in order to download the new updates.

On a related note, are old cached updates purged at any time?

Program crash when user's primary GID has no corresponding group

Upon trying to create an image, I dragged the Mavericks installer to AutoDMG, then cached the updates as per the instructions. I then added some packages to the "Additional Packages" box.

I attempted to create the file, but after "Preparing", the program gets stuck at "Starting Install".

Debug Snippet:
"2013-12-08 22:15:24 Debug: (IEDWorkflow:304) nextTask
2013-12-08 22:15:24 Notice: Starting task with 20 phases
2013-12-08 22:15:24 Debug: (IEDWorkflow:322) nextPhase
2013-12-08 22:15:24 Notice: Starting phase: Starting install
2013-12-08 22:15:24 Notice: Install task running"

I then attempted to create the DMG without any packages (thinking maybe they were the culprit), but the software still would not budge. I even blasted the entire Application Support/AutoDMG folder to get rid of the cache, but no luck.

I've waited for the program for a couple hours each time, and then ran the program last night for 9 hours, no success.

I can send you the entire debug log (I did add a number of packages, granted, but this happened even without them), if you'd like.

(Forgive me if this isn't the correct format for an issue report)

Thanks!

Doesn't work with 12E55

Dragging "Install Mountain Lion 10.8.4 .app" onto AutoDMG results in all buttons disabled.

Screenshot:
autodmg

Enhancement: optional creation of modified Installer-Image instead of System-Image

Add a Printer - cant see local printer

Can't add a printer via Sys Prefs, doesn't show, but can see the printer using Safari local bonjour devices.

Tested on 2 clean built images, how do I re-enable that functionality?
screen shot 2014-03-08 at 12 16 12 pm

Adding network settings with package

Hi,

I have created a package that adds the network proxy settings to the image. When building the image it adds the network locations to the machine i am booted from and runs all of the commands in the script to the booted machine.

The package is a payload free postinstall script that adds network locations, interfaces and proxy settings to the machine.

Update packages need unique names to avoid version conflicts

Trying with OS X 10.8.5 and AutoDMG 1.3.1 I get the following error:

Failed to determine installed size

Unable to determine installation size requirements for /Users/uclara/Library/Application Support/AutoDMG/Updates/AppStoreUpdate.pkg

Ulli

Enhancement: Pre-index (Spotlight) new image

When deploying an AutoDMG-built image through DeployStudio, the ds_finalize script takes forever and a day to complete due to resources being busy.

Running the top command, it seems the culprit is mdworker, indicating that the volume is busy indexing (on first boot).

Would adding the ability to index an AutoDMG-built image negate the need to index the volume on first boot, and in turn result in a faster deployment via DeployStudio?

Enhancement: Allow saving of sets

I build two distinct Mavericks builds for different purposes with AutoDMG. For example, one has a package that auto-logs in a particular user vs. the other creates that user but doesn't auto-log in. Every time I go to update one of them, I have to manually put the proper packages back into it in the exact correct order, without any mistakes. Can you allow the saving of "sets" so AutoDMG can do this work?

AutoDMG issue in 10.8.5 Mountain Lion Installer 12F35

Hello,
first, many thanks for this app, great job !!!!!
I have a problem with the Installer version 12F35 ML.app, AutoDMG not start with this version, display a message " Version mismatch, the major versions of the installer and the current OS must match"
with 10.9.0 to 92 work with 0 problems, I working in 10.92, not sure if this is the problem that don't work ML.app 10.8.5 from my system 10 92.

Thanks!!!!

CLI: --output does not work with relative paths

Since installesdtodmg.sh is called via progresswatcher.py with a current working directory of AutoDMG's bundle Resources directory, if an --output path is given that's a relative directory like "myoutputdir/myimage.dmg", hdiutil will fail to find the destination directory and complain:

hdiutil: convert failed - Invalid argument

I'm guessing that without a leading directory, the output image might have wound up in the bundle Resources directory..

Currently os.path.expanduser() is being called on this path (

self.outputPath = os.path.expanduser(path)
), so perhaps it would be possible to detect if it's a relative path and substitute the current working directory?

No scroll bars in Additional packages

Allister is not the only one who has had scrolling issues with the Additional Packages list (Issue #12). I can move around the list with up/down arrow keys, but scroll bars do not appear, nor does scrolling via mouse work. Note that all packages dragged into the Additional Packages list were symlinks (created by InstaUp2Date). I did drag over 100 symlinks in; it seems to be receiving the packages and resolving them properly to the original package source. As Allister said, low priority bug, since there is a workaround and it does not seem to affect the actual creation of the image.

10.8.5 (no server)
Mac mini Server (Late 2009)
RAID 0 boot/package source volume
Apple Mouse (wired, scrollball)

Unable to delete multiple items in Additional Packages list

In the Additional Packages list, it is possible to select multiple packages using standard OS conventions (Shift-click and/or Command-click). However, when the minus sign is clicked to remove the selected packages from the list, only the last-clicked item is deleted. As well, a selection (full or partial) will persist after the one file is deleted, generally on the same lines (as opposed to the same packages). For example:

There are 5 packages in the list: A, B, C, D and E (in that order).
The user clicks on package D, then shift-clicks on package B. Packages B, C and D are now selected (as expected).
The user clicks on the minus sign. Only Package B is deleted. Lines 2, 3 and 4 (now packages C, D and E) remain selected.
Without taking any other action, the user clicks on the minus sign again. Package C is deleted. Lines 2 and 3 (now packages D and E) remain selected.

OS X 10.8.5
Mac mini (Late 2009), RAID 0 boot volume

Enhancement: Allow Configuration Profiles

It would be extremely helpful to allow installation of configuration profiles with AutoDMG. This will allow setting login window settings, join 10.9 clients to join AD (http://support.apple.com/kb/HT5981) and enrolling to MDM for MCX setting management.

OS X versions 10.7, 10.8 and 10.9 automatically install any *.mobileconfig file located in /var/db/ConfigurationProfiles/Setup/ during the boot process.

If AutoDMG were able to place the dragged *.mobileconfig to that folder then the profiles will be installed on the first boot.

Two minor things to look at are that on versions <10.9 the Setup folder needs to be created, and also on all versions the file /var/db/ConfigurationProfiles/Setup/.profileSetupDone needs to be deleted if found.

2013 Mac Pro 10.9.1 "Unknown build 13B4116" error

Brand new 2013 Mac Pro, used the usual Internet Recovery trick to get the "OS X Install Data" install source files. I confirmed "/Volumes/OS X Install ESD/BaseSystem.dmg" is "10.9.1 (13B4116)".

I am using the latest AutoDMG 1.2.1 (194), and I triggered "Update Profiles..." and "Check For AutoDMG Releases..." before posting here. :)

I checked https://github.com/MagerValp/AutoDMG/blob/master/AutoDMG/UpdateProfiles.plist and it doesn't seem to list this build. Is it safe to proceed despite the error?

PS, 3 updates showed up in MAS and I was able to download RemoteDesktopClient.pkg (3.7.1) and iTunes11.1.4.pkg, but still wrestling with iBooks update 1.0.1, if you guys have a tip for getting that one, it's worth an ether-beer. :)

Don

CLI usage: changing ownership of output file to sudo user

Given that most times a CLI invocation would be done using sudo, might it make sense to chown the output disk image to the user who ran it with sudo, if it was? One way might be to simply detect for the presense of $SUDO_USER or $SUDO_UID, and if so chown it to $SUDO_UID and $SUDO_GID.

If so, could we simply do this as a condition within the build shell script? ie. here:

# Change ownership.
echo "IED:MSG:Changing owner"
if ! chown "${user}:$group" "$compresseddmg"; then
echo "IED:FAILURE:Ownership change failed"
exit 105
fi

Check if these vars are non-empty and if so, chown to this user rather than $user:$group.

If you think this would make sense I can put together and test a patch.

Could the size of the dmg be bigger than 32 GB ?

I have tried to make an image with the pkgs used with InstaDMG, and when i arrived to 80 %, the disk Macintosh HD is full.

It would be very useful for us to have the possibility to have an image bigger than 32 GB.

Almost all pkgs done for instaDMG were accepted by AutoDMG :-))

GUI error report inaccurate when corrupted pkg found

In the feature added to 1.3 where AutoDMG calculates the projected size of the image needed, it will (correctly) abort if it finds a package that is corrupted. However, the GUI erroneously reports that it cannot determine the size of the subsequent package in the list. For example:

2014-03-25 10:55:03 Info:     /path/to/Corrupted.pkg
2014-03-25 10:55:04 Error: Error decoding plist: Error Domain=NSCocoaErrorDomain Code=3840 "The data couldn’t be read because it has been corrupted." (Unexpected character B at line 1) UserInfo=0x7fcbc441d620 {NSDebugDescription=Unexpected character B at line 1, kCFPropertyListOldStyleParsingError=The data couldn’t be read because it has been corrupted.}
2014-03-25 10:55:11 Debug: (IEDWorkflow:378) Workflow stopping

The GUI reports:

Failed to determine installed size
Unable to determine installation size requirements for /path/to/package-after-corrupted-one-in-list.pkg

Ideally, the GUI should report that there is a corrupted package. (The logs do expose the true source of the problem.)

Certain poorly created packages crash the size calculation code

Hello,

First of all, I’m LOVING AutoDMG - Thank you so much for creating it!!

I’ve come across a small glitch in the newest 1.3.2 version that is preventing me from building my image. It seems to come from the code that calculates the installed size of packages, so I didn’t have this problem in earlier versions.

Basically, I’m trying to add an PKG for Print drivers for the Canon ImageRunner 1025if downloaded from the following site:

http://www.usa.canon.com/cusa/support/office/b_w_imagerunner_copiers/imageRUNNER_1025_1025n_1025if/imagerunner_1025if#DriversAndSoftware

Unfortunately, when I take a closer look at this Package, it literally contains about 225 small sub-packages (WTF), which causes the installer command to fail, which in turn causes AutoDMG to fail... The error I get is as follows:

28 mars 2014 11:29:37 AM UTC−7      /Volumes/Passport/AutoDMG/Packages/Printing/Printing-Canon-UFRII_LT_LIPS_LX_Installer.mpkg
28 mars 2014 11:29:43 AM UTC−7  installer -pkginfo -pkg '/Volumes/Passport/AutoDMG/Packages/Printing/Printing-Canon-UFRII_LT_LIPS_LX_Installer.mpkg' failed with exit code -11
28 mars 2014 11:29:43 AM UTC−7  Build failed: Failed to determine installed size
28 mars 2014 11:29:43 AM UTC−7      Unable to determine installation size requirements for /Volumes/Passport/AutoDMG/Packages/Printing/Printing-Canon-UFRII_LT_LIPS_LX_Installer.mpkg

Interestingly, Greg Neagle has dealt with the exact same issue with Munki, with the exact same Installer Package — I found that conversation and his resolution here: https://groups.google.com/forum/#!topic/munki-dev/mfash_Bu0Pc

After some tracking down, the affected code seems to be in IEDUtil.py, under the getInstalledPkgSize_(cos, pkgPath): section…

The command to use installer to get the size (/usr/sbin/installer pkginfo -verbose -plist -pkg /path/to/package) literally causes a segmentation fault, even when run directly from Terminal, like so:

1   0x7fff8de82bae JSGlobalContextCreateInGroup
2   0x10524396e IFJS_GlobalContextCreate
3   0x105215ea9 -[IFDJavaScriptEngine initWithScript:allowInsecure:]
4   0x10521ee42 -[IFDCustomizationController(Private) _createItemsFromDistribution]
5   0x10521eb4e -[IFDCustomizationController reset]
6   0x10521ea1c -[IFDCustomizationController(DistributionPrivate) initWithInstallController:andTarget:]
7   0x1052704f7 -[IFDInstallController(Private) customizationControllerForTarget:ignoringContents:]
8   0x105201fc0
9   0x1052020fb
10  0x105200edd
11  0x1051ff2d9
12  0x10520485c
13  0x105204a73
14  0x7fff9025a5fd start
Segmentation fault: 11

Normally I'd probably just rebuild the installer package, but with 225 sub-packages and some logic it's way more complex then it should be.

Instead, for now I’ve managed to bypass the issue by tweaking the error handling in the code where it deals with the return code of the subprocess.Popen command. I’ve never really done any coding in Python, so I’m sure this could be done much more gracefully - for now I’ve basically commented out the part that logs the error, instead I'm directly calling your getPackageSize_ code, as seen below:

        if p.returncode != 0:
            mountPoints = IEDMountInfo.getMountPoints()
            fsInfo = mountPoints[cls.findMountPoint_(pkgPath)]
            if not fsInfo[u"islocal"]:
                LogWarning(u"Estimating package size since installer -pkginfo " \
                           u"failed and '%@' is on a remote (%@) filesystem",
                           pkgPath, fsInfo[u"fstypename"])
                return cls.getPackageSize_(pkgPath) * 2
            else:
                #LogError(u"installer -pkginfo -pkg '%@' failed with exit code %d", pkgPath, p.returncode)
                #return None
                LogWarning(u"Estimating package size since installer -pkginfo " \
                           u"crashed trying to calculate '%@'",
                           pkgPath)
                return cls.getPackageSize_(pkgPath) * 2

I’d love to see a fix in the main stream of AutoDMG, as I really don’t want to have to port this fix back to every updated version ;).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.