make_chroot: do all the git bootstrapping before gcc [chromiumos/platform/crosutils : master]

41 views
Skip to first unread message

Mike Frysinger (Code Review)

unread,
Oct 30, 2012, 10:41:59 PM10/30/12
to asharif, paul drews, Ryan Cui, Brian Harring, Chris Sosa, Mike Frysinger
Hello asharif, paul drews, Anonymous Coward #1001735,

I'd like you to do a code review. Please visit

https://gerrit.chromium.org/gerrit/36995

to review the following change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................

make_chroot: do all the git bootstrapping before gcc

Explicitly build curl/openssl/git since the toolchain itself tries to
fetch over http with git.

BUG=None
TEST=`cros_sdk --bootstrap` works
TEST=`cbuildbot chromiumos-sdk` works

Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
---
M sdk_lib/make_chroot.sh
1 file changed, 9 insertions(+), 10 deletions(-)


git pull ssh://gerrit.chromium.org:29418/chromiumos/platform/crosutils refs/changes/95/36995/1
--
To view, visit https://gerrit.chromium.org/gerrit/36995
To unsubscribe, visit https://gerrit.chromium.org/gerrit/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Anonymous Coward #1001735
Gerrit-Reviewer: asharif <ash...@chromium.org>
Gerrit-Reviewer: paul drews <paul....@intel.com>

asharif (Code Review)

unread,
Oct 30, 2012, 11:04:04 PM10/30/12
to Mike Frysinger, Gerrit, Han Shen, paul drews
asharif has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 1: Looks good to me, approved
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>

Han Shen (Code Review)

unread,
Oct 30, 2012, 11:33:08 PM10/30/12
to Mike Frysinger, Gerrit, asharif, paul drews
Han Shen has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 1: Looks good to me, approved

Thanks for making this!
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>

Han Shen (Code Review)

unread,
Oct 31, 2012, 12:49:49 PM10/31/12
to Mike Frysinger, Gerrit, asharif, paul drews
Han Shen has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 1: I would prefer that you didn't submit this

Hi Mike, unfortunately, with your patch, I saw errors on both gPrecise and gLucid, at listed below -

Started dev-libs/openssl-1.0.1c-r7 (logged in /tmp/openssl-1.0.1c-r7-dkmC6E)
=== Start output for job openssl-1.0.1c-r7 (0m1.5s) ===
openssl-1.0.1c-r7: >>> Emerging (1 of 1) dev-libs/openssl-1.0.1c-r7 from chromiumos
openssl-1.0.1c-r7: * Running stacked hooks for pre_pkg_setup
openssl-1.0.1c-r7: * sysroot_build_bin_dir ...
openssl-1.0.1c-r7: [ ok ]
openssl-1.0.1c-r7: * Running stacked hooks for pre_src_unpack
openssl-1.0.1c-r7: * python_multilib_setup ...
openssl-1.0.1c-r7: [ ok ]
openssl-1.0.1c-r7: >>> Unpacking source...
openssl-1.0.1c-r7: fatal: Unable to find remote helper for 'http'
openssl-1.0.1c-r7: * ERROR: dev-libs/openssl-1.0.1c-r7 failed (unpack phase):
openssl-1.0.1c-r7: * git-2_update_repo: can't update from http://git.chromium.org/chromiumos/third_party/openssl.git
openssl-1.0.1c-r7: *
openssl-1.0.1c-r7: * Call stack:
openssl-1.0.1c-r7: * ebuild.sh, line 56: Called src_unpack
openssl-1.0.1c-r7: * environment, line 3326: Called cros-workon_src_unpack
openssl-1.0.1c-r7: * environment, line 779: Called git-2_src_unpack
openssl-1.0.1c-r7: * environment, line 2280: Called git-2_fetch
openssl-1.0.1c-r7: * environment, line 2111: Called git-2_update_repo
openssl-1.0.1c-r7: * environment, line 2340: Called die
openssl-1.0.1c-r7: * The specific snippet of code:
openssl-1.0.1c-r7: * die "${FUNCNAME}: can't update from ${EGIT_REPO_URI}";
openssl-1.0.1c-r7: *
openssl-1.0.1c-r7: * If you need support, post the output of 'emerge --info =dev-libs/openssl-1.0.1c-r7',
openssl-1.0.1c-r7: * the complete build log and the output of 'emerge -pqv =dev-libs/openssl-1.0.1c-r7'.
openssl-1.0.1c-r7: * This ebuild used the following eclasses from overlays:
openssl-1.0.1c-r7: * /home/shenhan/trunk/src/third_party/chromiumos-overlay/eclass/toolchain-funcs.eclass
openssl-1.0.1c-r7: * /home/shenhan/trunk/src/third_party/chromiumos-overlay/eclass/cros-workon.eclass
openssl-1.0.1c-r7: * /home/shenhan/trunk/src/third_party/chromiumos-overlay/eclass/git-2.eclass
openssl-1.0.1c-r7: * This ebuild is from an overlay named 'chromiumos': '/home/shenhan/trunk/src/third_party/chromiumos-overlay/'
openssl-1.0.1c-r7: * The complete build log is located at '/var/log/portage/dev-libs:openssl-1.0.1c-r7:20121031-161850.log'.
openssl-1.0.1c-r7: * The ebuild environment file is located at '/var/tmp/portage/dev-libs/openssl-1.0.1c-r7/temp/environment'.
openssl-1.0.1c-r7: * S: '/var/tmp/portage/dev-libs/openssl-1.0.1c-r7/work/openssl-1.0.1c'
openssl-1.0.1c-r7: >>> Failed to emerge dev-libs/openssl-1.0.1c-r7, Log file:
openssl-1.0.1c-r7: >>> '/var/log/portage/dev-libs:openssl-1.0.1c-r7:20121031-161850.log'
openssl-1.0.1c-r7:
openssl-1.0.1c-r7: * Messages for package dev-libs/openssl-1.0.1c-r7:
openssl-1.0.1c-r7: * ERROR: dev-libs/openssl-1.0.1c-r7 failed (unpack phase):
openssl-1.0.1c-r7: * git-2_update_repo: can't update from http://git.chromium.org/chromiumos/third_party/openssl.git
openssl-1.0.1c-r7: *
openssl-1.0.1c-r7: * Call stack:
openssl-1.0.1c-r7: * ebuild.sh, line 56: Called src_unpack
openssl-1.0.1c-r7: * environment, line 3326: Called cros-workon_src_unpack
openssl-1.0.1c-r7: * environment, line 779: Called git-2_src_unpack
openssl-1.0.1c-r7: * environment, line 2280: Called git-2_fetch
openssl-1.0.1c-r7: * environment, line 2111: Called git-2_update_repo
openssl-1.0.1c-r7: * environment, line 2340: Called die
openssl-1.0.1c-r7: * The specific snippet of code:
openssl-1.0.1c-r7: * die "${FUNCNAME}: can't update from ${EGIT_REPO_URI}";
openssl-1.0.1c-r7: *
openssl-1.0.1c-r7: * If you need support, post the output of 'emerge --info =dev-libs/openssl-1.0.1c-r7',
openssl-1.0.1c-r7: * the complete build log and the output of 'emerge -pqv =dev-libs/openssl-1.0.1c-r7'.
openssl-1.0.1c-r7: * This ebuild used the following eclasses from overlays:
openssl-1.0.1c-r7: * /home/shenhan/trunk/src/third_party/chromiumos-overlay/eclass/toolchain-funcs.eclass
openssl-1.0.1c-r7: * /home/shenhan/trunk/src/third_party/chromiumos-overlay/eclass/cros-workon.eclass
openssl-1.0.1c-r7: * /home/shenhan/trunk/src/third_party/chromiumos-overlay/eclass/git-2.eclass
openssl-1.0.1c-r7: * This ebuild is from an overlay named 'chromiumos': '/home/shenhan/trunk/src/third_party/chromiumos-overlay/'
openssl-1.0.1c-r7: * The complete build log is located at '/var/log/portage/dev-libs:openssl-1.0.1c-r7:20121031-161850.log'.
openssl-1.0.1c-r7: * The ebuild environment file is located at '/var/tmp/portage/dev-libs/openssl-1.0.1c-r7/temp/environment'.
openssl-1.0.1c-r7: * S: '/var/tmp/portage/dev-libs/openssl-1.0.1c-r7/work/openssl-1.0.1c'
openssl-1.0.1c-r7:
=== Complete: job openssl-1.0.1c-r7 (0m1.5s) ===
Failed dev-libs/openssl-1.0.1c-r7 (in 0m1.5s). Your build has failed.
Pending 2/7, [Time 1m9.3s Load 0.3 0.26 0.19]
Packages failed: dev-libs/openssl-1.0.1c-r7
Running ['/usr/local/google/home/shenhan/ssd/live/src/scripts/sdk_lib/make_chroot.sh', '--stage3_path', '/usr/local/google/home/shenhan/ssd/live/.cache/sdks/stage3-amd64-2010.03.09.tar.xz', '--chroot', '/usr/local/google/home/shenhan/ssd/live/chroot', '--cache_dir', '/usr/local/google/home/shenhan/ssd/live/.cache', '--nousepkg'] failed!


Comments?
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>

Brian Harring (Code Review)

unread,
Oct 31, 2012, 12:54:01 PM10/31/12
to Mike Frysinger, Gerrit, asharif, Brian Harring, Han Shen, paul drews
Brian Harring has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(2 inline comments)

naggles. sane beyond that.

....................................................
File sdk_lib/make_chroot.sh
Line 429: # (Re-)emerge the full version of git, without preventing curl.
without preventing curl really doesn't make any sense here... dump it if it imo...

Line 430: info "Updating full verison of git"
is verison something like venison?
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Brian Harring <ferr...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>

Mike Frysinger (Code Review)

unread,
Oct 31, 2012, 1:22:37 PM10/31/12
to Mike Frysinger, Gerrit, asharif, Brian Harring, Han Shen, paul drews
Mike Frysinger has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 1: (1 inline comment)

hanshen: well, yet another reason why toolchain developers using minilayout makes absolutely no sense

....................................................
File sdk_lib/make_chroot.sh
Line 430: info "Updating full verison of git"
i didn't write any of these comments/messages. you can see that i just moved the code around.
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Brian Harring <ferr...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>

Mike Frysinger (Code Review)

unread,
Oct 31, 2012, 4:54:41 PM10/31/12
to Mike Frysinger, Gerrit, asharif, Brian Harring, Han Shen, paul drews
Mike Frysinger has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 1: (2 inline comments)

....................................................
File sdk_lib/make_chroot.sh
Line 429: # (Re-)emerge the full version of git, without preventing curl.
Done

Line 430: info "Updating full verison of git"
Done
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Brian Harring <ferr...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>

Mike Frysinger (Code Review)

unread,
Oct 31, 2012, 4:55:40 PM10/31/12
to Mike Frysinger, Gerrit, asharif, Brian Harring, Han Shen, paul drews
Mike Frysinger has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 2: Verified

this version now rejects people trying to bootstrap with minilayout
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Brian Harring <ferr...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>

Han Shen (Code Review)

unread,
Oct 31, 2012, 6:55:21 PM10/31/12
to Mike Frysinger, Gerrit, asharif, Brian Harring, paul drews
Han Shen has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 2: Verified; Looks good to me, approved

Hi Mike, ha, good point! I'll never go mini again.

I tested your scripts (but without your check about minilayout), it fixed both of my problems (git http and the certificate problem.) I just had a successful bootstrap!

Thanks!
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Brian Harring <ferr...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>

Mike Frysinger (Code Review)

unread,
Oct 31, 2012, 6:59:39 PM10/31/12
to Mike Frysinger, Gerrit, asharif, Brian Harring, Han Shen, paul drews
Mike Frysinger has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 2: Ready

i ran remote trybots with the toolchain minor/major and they worked too (well, they got past the fetching issue and died on something unrelated)
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Brian Harring <ferr...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>

asharif (Code Review)

unread,
Nov 1, 2012, 12:23:33 PM11/1/12
to Mike Frysinger, Gerrit, Brian Harring, Han Shen, paul drews
asharif has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 3:

vapier, should it be a bug that we can't do bootstrap with a full layout? Or should we include whatever files are needed for bootstrap in the minilayout?

Or should we just regard this as a feature and apply a workaround in our (toolchain team's) setup and build wrappers?

Thanks,
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 3
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Brian Harring <ferr...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>

asharif (Code Review)

unread,
Nov 1, 2012, 12:23:59 PM11/1/12
to Mike Frysinger, Gerrit, Brian Harring, Han Shen, paul drews
asharif has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 3:

I meant can't do bootstrap with a mini layout*.
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 3
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Brian Harring <ferr...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>

asharif (Code Review)

unread,
Nov 1, 2012, 12:27:35 PM11/1/12
to Mike Frysinger, Gerrit, Brian Harring, Han Shen, paul drews
asharif has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 3:

It's worth noting that on the developer's guide here:

http://www.chromium.org/chromium-os/developer-guide#TOC-Decide-if-you-want-the-minilayout

There is no mention of the minilayout not being able to bootstrap the chroot. Either we should put it there, or this is a bug. I think it is a bug and should be fixed (by either including whatever is required in the minilayout, or not requiring it in the first place).
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 3
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Brian Harring <ferr...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>

Mike Frysinger (Code Review)

unread,
Nov 1, 2012, 1:03:00 PM11/1/12
to Mike Frysinger, Gerrit, asharif, Brian Harring, Han Shen, paul drews
Mike Frysinger has posted comments on this change.

Change subject: make_chroot: do all the git bootstrapping before gcc
......................................................................


Patch Set 3:

i've updated the documentation to tell people to use the full manifest to bootstrap
Gerrit-MessageType: comment
Gerrit-Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Gerrit-PatchSet: 3
Gerrit-Project: chromiumos/platform/crosutils
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Brian Harring <ferr...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>
Reply all
Reply to author
Forward
0 new messages