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

pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:gitian_osx_extractor changing 2 files +45 −1
  1. luke-jr commented at 8:18 PM on August 27, 2016: member

    No description provided.

  2. in doc/README_osx.md:None in b6246891be outdated
      48 | +Alternatively, you can use 7zip and SleuthKit to extract the files one by one.
      49 | +The script contrib/macdeploy/extract-osx-sdk.sh automates this. First ensure
      50 | +the dmg file is in the current directory, and then run the script. You may wish
      51 | +to delete the intermediate 5.hfs file and MacOSX10.11.sdk (the directory) when
      52 | +you've confirmed the extraction succeeded.
      53 | +
    


    btcdrak commented at 8:28 PM on August 27, 2016:

    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


    luke-jr commented at 8:37 PM on August 27, 2016:

    That's Debian/Ubuntu specific...?


    btcdrak commented at 9:00 PM on August 27, 2016:

    Yes.


    sipa commented at 11:07 AM on August 28, 2016:

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


    luke-jr commented at 1:19 AM on August 29, 2016:

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

  3. in contrib/macdeploy/extract-osx-sdk.sh:None in b6246891be outdated
       0 | @@ -0,0 +1,24 @@
       1 | +#!/bin/sh
       2 | +set -e
       3 | +
       4 | +7z x Xcode_7.3.1.dmg 5.hfs
       5 | +SDKNAME="MacOSX10.11.sdk"
       6 | +SDKDIRINODE=154283
       7 | +fls 5.hfs -rpF ${SDKDIRINODE} |
       8 | + while read type inode filename; do
    


    btcdrak commented at 8:39 PM on August 27, 2016:

    rogue space intent


    luke-jr commented at 9:15 PM on August 27, 2016:

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

  4. luke-jr force-pushed on Aug 27, 2016
  5. in contrib/macdeploy/extract-osx-sdk.sh:None in d3f5b4d60e outdated
      19 | +		icat 5.hfs $inode >"$filename"
      20 | +	fi
      21 | +done
      22 | +echo "Building ${SDKNAME}.tar.gz ..."
      23 | +tar -c MacOSX10.11.sdk | gzip -9 > "${SDKNAME}.tar.gz"
      24 | +echo 'All done!'
    


    btcdrak commented at 9:11 PM on August 27, 2016:

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


    luke-jr commented at 9:15 PM on August 27, 2016:

    rm -rf is scary? :)

  6. btcdrak commented at 9:31 PM on August 27, 2016: contributor

    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.

  7. in contrib/macdeploy/extract-osx-sdk.sh:None in d3f5b4d60e outdated
       0 | @@ -0,0 +1,24 @@
       1 | +#!/bin/bash
       2 | +set -e
       3 | +
       4 | +7z x Xcode_7.3.1.dmg 5.hfs
       5 | +SDKNAME="MacOSX10.11.sdk"
       6 | +SDKDIRINODE=154283
    


    sipa commented at 12:00 AM on August 28, 2016:

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


    luke-jr commented at 12:22 AM on August 28, 2016:

    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.


    sipa commented at 12:33 AM on August 28, 2016:
    $ ifind -n Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk 5.hfs 
    154283
    

    luke-jr commented at 2:54 AM on August 28, 2016:

    Thanks, adding this.

  8. in contrib/macdeploy/extract-osx-sdk.sh:None in d3f5b4d60e outdated
      18 | +	else
      19 | +		icat 5.hfs $inode >"$filename"
      20 | +	fi
      21 | +done
      22 | +echo "Building ${SDKNAME}.tar.gz ..."
      23 | +tar -c MacOSX10.11.sdk | gzip -9 > "${SDKNAME}.tar.gz"
    


    sipa commented at 12:06 AM on August 28, 2016:

    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?


    luke-jr commented at 2:54 AM on August 28, 2016:
    83c01f4e834e44a1b0f7208ed56fcf86c6d336290dbc4f4d625903b4bbbe9ece  1.tgz
    83c01f4e834e44a1b0f7208ed56fcf86c6d336290dbc4f4d625903b4bbbe9ece  MacOSX10.11.sdk.tar.gz
    
  9. luke-jr force-pushed on Aug 28, 2016
  10. sipa commented at 11:11 AM on August 28, 2016: member

    Concept ACK, nice!

  11. laanwj commented at 12:07 PM on August 28, 2016: member

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

  12. laanwj added the label Build system on Aug 28, 2016
  13. laanwj added the label Docs and Output on Aug 28, 2016
  14. luke-jr commented at 1:40 PM on August 28, 2016: member

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

  15. Include instructions to extract Mac OS X SDK on Linux using 7zip and SleuthKit b729fcdb84
  16. luke-jr force-pushed on Aug 29, 2016
  17. jonasschnelli commented at 6:39 AM on August 29, 2016: contributor

    Nice! ConceptACK / utACK

  18. paveljanik commented at 12:18 PM on August 29, 2016: contributor

    Concept ACK

  19. sipa merged this on Aug 29, 2016
  20. sipa closed this on Aug 29, 2016

  21. sipa referenced this in commit de07fdcf77 on Aug 29, 2016
  22. theuni commented at 8:03 PM on August 29, 2016: member

    Woohoo!

  23. codablock referenced this in commit 672bc363ea on Sep 19, 2017
  24. codablock referenced this in commit 4c6ed9d8d9 on Jan 9, 2018
  25. codablock referenced this in commit e7da915844 on Jan 9, 2018
  26. andvgal referenced this in commit d135e83eb5 on Jan 6, 2019
  27. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me