Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making it work on OSX 10.7.4, where tar fails silently to extract the iso #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dcosson
Copy link

@dcosson dcosson commented Jun 8, 2012

First of all, great script - it's annoying that the default vagrant box is an old version.

I tried to run it this morning, and ran into a couple of issues - first with brew installing cdrtools (using a slightly outdated version of XCode). I updated XCode and got that working, but then tar was failing silently on extracting from the ISO file.

I solved the problem by updating to a more recent "homebrew-dupes" version of libarchive as recommended in this thread: http://forums.macrumors.com/showthread.php?t=1377464

This pull request updated the README to outline those two potential issues and their fixes, and I updated build.sh to try using the homebrew installed bsdtar if the tar output is empty.

Googling for the first cdrtools problem, I saw it was a common problem with smake and OSX Lion. And there is an open Github issue on the project for the empty tar output problem, so it seems like other people are having the same problem with tar 2.8.3.

@@ -59,6 +59,25 @@ if [ ! -e "${FOLDER_ISO}/custom.iso" ]; then
echo "Untarring downloaded ISO ..."
tar -C "${FOLDER_ISO_CUSTOM}" -xf "${ISO_FILENAME}"

# in osx lion 10.7.4, tar won't extract anything and will fail silently. If that happens, look for a newer version of bsd tar
if [ ! `ls $FOLDER_ISO_CUSTOM` ]; then
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if there's a better way to check if a folder is empty, but this works

@cmer
Copy link

cmer commented Aug 8, 2012

+1 -- Installing a more recent libarchive with Homebrew and this patch made it work for me. It should be merged.

@miagao
Copy link

miagao commented Aug 10, 2012

+1

@ccollicutt
Copy link

oof this is good to know. I hit this as well...used p7zip from brew but if bsdtar is in osx already...

@manifestinteractive
Copy link

+! - Tested and works great.

@jcowhigjr
Copy link

This fixed my problem as well. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants