gitian: Add OSX build descriptors #4185

pull theuni wants to merge 7 commits into bitcoin:master from theuni:deterministic-dmg-gitian changing 6 files +699 −17
  1. theuni commented at 11:40 PM on May 13, 2014: member

    This is a set of descriptors for building an OSX DMG without the need for OSX. The descriptors are quite large and unruly, but this seemed like the most reasonable first step towards releasing builds created this way.

    These have been ported to monolithic descriptors from the work done in my repo here: https://github.com/theuni/osx-cross-depends/

    I've included a Readme that attempts to cover the most obvious questions. After some major changes in the last week, the process is actually rather clean now and contains very few nasty hacks. The exception to that is cctools, which is... gross. See the readme for details.

    Unfortunately my macbook completely died yesterday (new one is on the way), so I'm unable to help with testing until next week. Though I've made no major functional changes since then (worked fine as of yesterday), so I'm confident that the resulting installer is in good shape. Much testing is needed, of course.

    There are still plenty of warts in the process, and I have plans for addressing them. As discussed with @laanwj, this is intended to be only the first step.

  2. gitian: Add OSX build descriptors bb5da27dc8
  3. luke-jr commented at 11:50 PM on May 13, 2014: member

    As I said before, this should be split up more (but need not block this "first step"):

    • Ideally, the step requiring non-free inputs should be split from the rest of the process.
    • Each dependency should produce its own binary tarball (and eventually use its own yml file).
  4. theuni commented at 12:01 AM on May 14, 2014: member

    Sidestepping the splitting discussion for now since we discussed it somewhat on IRC last night.

    As for the non-free input, there's no way to split it from the rest of the process because every build requires it. If its contents were packaged into the resulting builds, that would mean that every output tarball would end up tainted. Instead, I chose to add it as an input requirement for each step so that there's no risk of output contamination.

    With the understanding that it's needed for each dependency (except for dmg/genisoimage i suppose), do you have a way in mind to wall it off further?

  5. squashme: gitian: fix determinism problem with native descriptor
    Thanks to warren for testing.
    2288206b19
  6. in contrib/gitian-descriptors/README.osx:None in 2288206b19 outdated
       0 | @@ -0,0 +1,99 @@
       1 | +Deterministic OSX Dmg Notes.
       2 | +
       3 | +tldr;
       4 | + - Fetch the sources and move them to Gitian's input dir:
       5 | +  $ wget https://github.com/mingwandroid/toolchain4/archive/10cc648683617cca8bcbeae507888099b41b530c.tar.gz
    


    laanwj commented at 6:43 AM on May 14, 2014:

    Inputs should be in the release process only; otherwise they go out of sync very soon.

  7. in contrib/gitian-descriptors/README.osx:None in 2288206b19 outdated
      16 | +  $ wget http://cdrkit.org/releases/cdrkit-1.1.11.tar.gz
      17 | +  $ wget https://github.com/theuni/libdmg-hfsplus/archive/libdmg-hfsplus-v0.1.tar.gz
      18 | +  $ wget -O clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz http://llvm.org/releases/3.2/clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
      19 | +  $ wget -O cdrkit-deterministic.patch https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff
      20 | +
      21 | + - Fetch and extract the .pkg from Apple's SDK (see below) and move it to Gitian's input dir
    


    laanwj commented at 6:44 AM on May 14, 2014:

    Maybe mention the extract_sdk script here: https://github.com/theuni/osx-cross-depends/blob/master/extract_sdk.sh It automates this step as far as possible.

  8. in contrib/gitian-descriptors/README.osx:None in 2288206b19 outdated
      19 | +  $ wget -O cdrkit-deterministic.patch https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff
      20 | +
      21 | + - Fetch and extract the .pkg from Apple's SDK (see below) and move it to Gitian's input dir
      22 | +
      23 | + - Use gitian to build the descriptors in order (remembering to save the outputs):
      24 | +  $ gbuild gitian-osx-native.yml
    


    laanwj commented at 7:13 AM on May 14, 2014:

    Mention the command to copy the outputs from outputs to inputs explicitly, like in the release process. Too easy to forget otherwise.

  9. laanwj commented at 7:14 AM on May 14, 2014: member

    Looks good to me, haven't tested yet.

  10. laanwj added this to the milestone 0.9.2 on May 14, 2014
  11. wtogami commented at 8:18 AM on May 14, 2014: contributor

    One of the intermediate deps is non-deterministic. He's getting back to this tomorrow.

  12. laanwj commented at 9:00 AM on May 14, 2014: member

    Note that it isn't of utmost importance that the intermediate deps are deterministic. Requirement for 0.9.2 is just that the end product is deterministic. The rest can be done later.

  13. theuni commented at 2:40 PM on May 14, 2014: member

    @laanwj Ack on your comments, will do.

    As for the intermediate deps: I agree it's not critical (for .9.2) that they're deterministic. But I'd like to make sure they are eventually. If at some point the resulting dmg isn't deterministic, it's a huge help to be able to compare the intermediates to begin tracking down the reason.

  14. squashme: gitian: fix qt determinism
    Fixes the 'date' wrapper which wasn't actually functional. Sequential builds
    would be the same, but builds crossing a date threshold would not.
    7fe8fe6580
  15. squashme: gitian: move osx qt to 5.2.0 to match windows
    TODO: Bump them both to 5.2.1 simultaneously
    f76db78be4
  16. squashme: docs: shuffle around the osx documentation a bit
    Added the OSX gitian steps to the release process docs.
    The checksums and signing info has not been added because these are likely
    to change a few more times before merge.
    
    TODO: fill in checksums and signing info post-merge
    ebcf375e84
  17. theuni commented at 6:21 PM on May 14, 2014: member

    I've addressed @laanwj's comments, I believe. I updated some of the docs to reflect the OSX process, but some of it will need to wait until after merge (checksums likely won't be the same by the time it's merged).

    Also fixed the last of (I believe) the determinism issues.

  18. Michagogo commented at 6:36 PM on May 14, 2014: contributor

    A few comments:

    • Could we possibly rename 10cc648683617cca8bcbeae507888099b41b530 c.tar.gz to give an indication of what it is?
    • Some of the indentations are off.
    • You added mkdir -p inputs; cd inputs/ after pushd ./gitian-builder, but it already appears at the top of the deps section. Following exactly, you'd get gitian-builder/inputs/inputs/.
    • The actual mac build part is missing from release-process.md.
    • How come this uses tarballs for the intermediate inputs (deps) and not zips like the rest of them? I mean, I assume it doesn't matter in theory, but a) consistency is nice, and b) it gives an easy way to distinguish at a glance between sources (tarballs) and built deps (zips).
    • How come protobuf and boost aren't their own descriptors like they are for Windows?
    • It would probably be preferable to name the descriptors and intermediate files similar to the current ones: deps-osx.yml, qt-osx.yml, bitcoin-deps-*, etc.
      • Maybe using "osx32" in the file names to match linux/win?
  19. Michagogo commented at 6:56 PM on May 14, 2014: contributor

    Right now, as of ebcf375e84a90c22ff00de28697eaf32a60ddc43, I'm getting these hashes: (will update as more builds finish)

    bfbf001582145b5af296f61dd1e7aa79128309a5239e35c068cc766f0a1d4bef  osx-native-depends-r2.tar.gz
    0b8f9d25eb3a38f07fcbd0ed98596443961e97a5cd5ba891b3d968cd07b3fd31  osx-depends-r2.tar.gz
    deba5750b02b6f1677b9c0749b25b7ec2b7bb5851ae03b277f5b22c06bbbb3bc  osx-depends-qt-5.2.0-r2.tar.gz
    
  20. theuni commented at 9:32 PM on May 14, 2014: member

    Thanks. I'm headed out of town until Monday. I'll address your notes then. Fwiw: 4ed5663bfcfd1e9525616242c878128069e0a3280ff5245b6be5a2bc5d4e69a6 Bitcoin-Qt.dmg

  21. wtogami commented at 11:23 PM on May 14, 2014: contributor

    gitian-osx-qt.yml creates

    osx-depends-qt-5.2.0-r2.tar.gz

    gitian-osx-bitcoin.yml wants

    osx-depends-qt-5.2.1-r2.tar.gz

  22. wtogami commented at 10:40 AM on May 15, 2014: contributor

    qt-5.2.0 has a strange character glitch where the decimal point within numbers should be. Building with qt-5.2.1 fixes this issue.

    Weird character

  23. wtogami commented at 8:46 PM on May 17, 2014: contributor

    Please see #4189 which makes this PR buildable. For the most part it works except there is a remaining determinism issue and on rare occasions it gets stuck in a configure loop.

  24. laanwj commented at 10:17 AM on May 18, 2014: member

    @wtogami is the configure loop perhaps related to building Qt? I remember having the same issue in Windows. For Qt, FAKE_TIME interferes with the build process and causes the same to be done time after time, so I had to do without it and create determinism in other ways.

  25. wtogami commented at 3:10 PM on May 18, 2014: contributor

    It is intermittently during the Bitcoin-Qt.dmg build, not of qt, if that's what you are asking.

  26. squash me: build qt-5.2.1 for mac fa1ed7ccd6
  27. squashme: fixup release-process instructions 397e9b88ef
  28. wtogami commented at 12:19 AM on May 21, 2014: contributor

    ACK, although folks need to be aware of two issues discovered in #4189.

    • Your gitian base image must be clean. Cory decided for 0.9.2 it will not support a build root containing other tools.
    • Occasionally the build may get stuck in a perpetual configure loop due to a race. If that happens just try again.
  29. theuni commented at 12:30 AM on May 21, 2014: member

    I've bumped qt to 5.2.1 here to fix the build issue and the font issue that @wtogami pointed out. I've asked him to create a separate PR for bumping the win32 version to match. @Michagogo I addressed some of your comments, but have left some alone in the interest of saving time. It's going to take a release process to get the real instructions nailed down, so I'd rather not focus on that just yet. It'd be great if you could PR any fixups you think are necessary after the bulk of these changes go in.

    The determinism issues that warren pointed out in #4189 were related to mixing osx/win32/linux environments, which is beyond this scope of this PR. These descriptors work and supplements to address that can come later.

    The configure loop is caused by a rare race, and it can be fixed as @laanwj suggested by moving the faketime to a more narrow scope. I'm aware of the issue and will address it soon. It doesn't affect the end-result though, so I don't think it's necessary to hold on the fix.

    The last piece in the puzzle is codesigning. We discussed a few possibilities at the conference and I'm working on that now.

  30. BitcoinPullTester commented at 12:54 AM on May 21, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/397e9b88ef06db54d905c5bcac7bc081e2a6e9c1 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  31. wtogami commented at 7:20 AM on May 21, 2014: contributor

    This should be ready for merge after squash.

  32. in doc/release-process.md:None in 397e9b88ef
      61 | +	wget 'http://www.opensource.apple.com/tarballs/cctools/cctools-809.tar.gz'
      62 | +	wget 'http://www.opensource.apple.com/tarballs/dyld/dyld-195.5.tar.gz'
      63 | +	wget 'http://www.opensource.apple.com/tarballs/ld64/ld64-127.2.tar.gz'
      64 | +	wget 'http://cdrkit.org/releases/cdrkit-1.1.11.tar.gz'
      65 | +	wget 'https://github.com/theuni/libdmg-hfsplus/archive/libdmg-hfsplus-v0.1.tar.gz'
      66 | +	wget 'http://llvm.org/releases/3.2/clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz' -O \
    


    laanwj commented at 8:40 AM on May 21, 2014:

    Qt 5.2.1 download is missing here


    theuni commented at 8:42 AM on May 21, 2014:

    That was skipped in order to avoid conflict with win32 PR, which adds 5.2.1.


    laanwj commented at 8:45 AM on May 21, 2014:

    Ok, just letting you know as I got an error there (I'm just following the steps here literally)

  33. laanwj commented at 9:17 AM on May 21, 2014: member

    Successfully built commit a99f9be (the commit on master which this was branched from) using this instructions and descriptor:

    adabfb6fdb41bc4757f0ff67e06665519989acc35740e18caed74228d220ac82  Bitcoin-Qt.dmg
    0fd3a204a1f0629f5edae842159133bcf12d2558a60d7b0a2611cfaee2f8cba8  bitcoin-res.yml
    
  34. laanwj referenced this in commit 1a97b22b9c on May 21, 2014
  35. laanwj commented at 9:22 AM on May 21, 2014: member

    Merged through 1a97b22

  36. laanwj closed this on May 21, 2014

  37. laanwj referenced this in commit f72b475324 on May 21, 2014
  38. Michagogo referenced this in commit 1256e4f40d on Jun 2, 2014
  39. Michagogo referenced this in commit 755be6cb9a on Jun 2, 2014
  40. Michagogo referenced this in commit 11f560ca0c on Jun 2, 2014
  41. Michagogo referenced this in commit a0f5951502 on Jun 2, 2014
  42. Michagogo referenced this in commit 8105245ae3 on Jun 26, 2014
  43. MarcoFalke referenced this in commit faf87aff16 on Sep 21, 2016
  44. michelvankessel referenced this in commit 6a0ab18954 on Dec 23, 2018
  45. michelvankessel referenced this in commit 821f76d27a on Dec 23, 2018
  46. 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-17 09:15 UTC

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