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

Include instructions to extract Mac OS X SDK on Linux using 7zip and SleuthKit #8617

Merged
merged 1 commit into from Aug 29, 2016

Conversation

@luke-jr
Copy link
Member

commented Aug 27, 2016

No description provided.

the dmg file is in the current directory, and then run the script. You may wish
to delete the intermediate 5.hfs file and MacOSX10.11.sdk (the directory) when
you've confirmed the extraction succeeded.

This comment has been minimized.

Copy link
@btcdrak

btcdrak Aug 27, 2016

Member

Maybe it's worth mentioning the dependencies for the script here (or in the comments of the script)

sudo apt-get install sleuthkit p7zip-full

This comment has been minimized.

Copy link
@luke-jr

luke-jr Aug 27, 2016

Author Member

That's Debian/Ubuntu specific...?

This comment has been minimized.

Copy link
@btcdrak

This comment has been minimized.

Copy link
@sipa

sipa Aug 28, 2016

Member

Given that elsewhere we also list Debian-style package names for dependencies, I think that's acceptable.

This comment has been minimized.

Copy link
@luke-jr

luke-jr Aug 29, 2016

Author Member

Added to the doc, along with a rm command to cleanup.

@btcdrak

View changes

contrib/macdeploy/extract-osx-sdk.sh Outdated
SDKNAME="MacOSX10.11.sdk"
SDKDIRINODE=154283
fls 5.hfs -rpF ${SDKDIRINODE} |
while read type inode filename; do

This comment has been minimized.

Copy link
@btcdrak

btcdrak Aug 27, 2016

Member

rogue space intent

This comment has been minimized.

Copy link
@luke-jr

luke-jr Aug 27, 2016

Author Member

Not rogue: this is the target of the previous line's pipe.

@luke-jr luke-jr force-pushed the luke-jr:gitian_osx_extractor branch Aug 27, 2016

@btcdrak

View changes

contrib/macdeploy/extract-osx-sdk.sh Outdated
done
echo "Building ${SDKNAME}.tar.gz ..."
tar -c MacOSX10.11.sdk | gzip -9 > "${SDKNAME}.tar.gz"
echo 'All done!'

This comment has been minimized.

Copy link
@btcdrak

btcdrak Aug 27, 2016

Member

any reason not to rm -rf MacOSX10.11.sdk 5.hfs? it's not like we need them.

This comment has been minimized.

Copy link
@luke-jr

luke-jr Aug 27, 2016

Author Member

rm -rf is scary? :)

@btcdrak

This comment has been minimized.

Copy link
Member

commented Aug 27, 2016

nits aside, I tested and ran gitian build for 0.13.0 osx using the result and got the same matches as with my Mac extracted version as well as the 0.13.0 release.

@sipa

View changes

contrib/macdeploy/extract-osx-sdk.sh Outdated

7z x Xcode_7.3.1.dmg 5.hfs
SDKNAME="MacOSX10.11.sdk"
SDKDIRINODE=154283

This comment has been minimized.

Copy link
@sipa

sipa Aug 28, 2016

Member

Is it possible to specify this by name rather than by inode? That would make the script more future proof.

This comment has been minimized.

Copy link
@luke-jr

luke-jr Aug 28, 2016

Author Member

I didn't see an easy way to do so. We'd have to iterate through each subdirectory's inode manually I think. Either that or go recursive from the root and filter, but that'd be much slower.

This comment has been minimized.

Copy link
@sipa

sipa Aug 28, 2016

Member
$ ifind -n Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk 5.hfs 
154283

This comment has been minimized.

Copy link
@luke-jr

luke-jr Aug 28, 2016

Author Member

Thanks, adding this.

@sipa

View changes

contrib/macdeploy/extract-osx-sdk.sh Outdated
fi
done
echo "Building ${SDKNAME}.tar.gz ..."
tar -c MacOSX10.11.sdk | gzip -9 > "${SDKNAME}.tar.gz"

This comment has been minimized.

Copy link
@sipa

sipa Aug 28, 2016

Member

Using the tricks here: https://github.com/bitcoin/bitcoin/blob/v0.13.0/contrib/gitian-descriptors/gitian-linux.yml#L144
you could make the tar and tgz deterministic. That may be useful for people to compare their results?

This comment has been minimized.

Copy link
@luke-jr

luke-jr Aug 28, 2016

Author Member
83c01f4e834e44a1b0f7208ed56fcf86c6d336290dbc4f4d625903b4bbbe9ece  1.tgz
83c01f4e834e44a1b0f7208ed56fcf86c6d336290dbc4f4d625903b4bbbe9ece  MacOSX10.11.sdk.tar.gz

@luke-jr luke-jr force-pushed the luke-jr:gitian_osx_extractor branch Aug 28, 2016

@sipa

This comment has been minimized.

Copy link
Member

commented Aug 28, 2016

Concept ACK, nice!

@laanwj

This comment has been minimized.

Copy link
Member

commented Aug 28, 2016

Nice indeed!
utACK
Just out of curiosity: is the resulting file deterministic?

@luke-jr

This comment has been minimized.

Copy link
Member Author

commented Aug 28, 2016

@laanwj As of the changes made here the file is deterministic, yes.

@luke-jr luke-jr force-pushed the luke-jr:gitian_osx_extractor branch to b729fcd Aug 29, 2016

@jonasschnelli

This comment has been minimized.

Copy link
Member

commented Aug 29, 2016

Nice!
ConceptACK / utACK

@paveljanik

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2016

Concept ACK

@sipa sipa merged commit b729fcd into bitcoin:master Aug 29, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
sipa added a commit that referenced this pull request Aug 29, 2016
Merge #8617: Include instructions to extract Mac OS X SDK on Linux us…
…ing 7zip and SleuthKit

b729fcd Include instructions to extract Mac OS X SDK on Linux using 7zip and SleuthKit (Luke Dashjr)
@theuni

This comment has been minimized.

Copy link
Member

commented Aug 29, 2016

Woohoo!

codablock added a commit to codablock/dash that referenced this pull request Jan 9, 2018
Merge bitcoin#8617: Include instructions to extract Mac OS X SDK on L…
…inux using 7zip and SleuthKit

b729fcd Include instructions to extract Mac OS X SDK on Linux using 7zip and SleuthKit (Luke Dashjr)
codablock added a commit to codablock/dash that referenced this pull request Jan 9, 2018
Merge bitcoin#8617: Include instructions to extract Mac OS X SDK on L…
…inux using 7zip and SleuthKit

b729fcd Include instructions to extract Mac OS X SDK on Linux using 7zip and SleuthKit (Luke Dashjr)
andvgal added a commit to energicryptocurrency/energi that referenced this pull request Jan 6, 2019
Merge bitcoin#8617: Include instructions to extract Mac OS X SDK on L…
…inux using 7zip and SleuthKit

b729fcd Include instructions to extract Mac OS X SDK on Linux using 7zip and SleuthKit (Luke Dashjr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.