30859 Commits

Author SHA1 Message Date
Michael Marineau
898ab93461 Merge pull request #33 from marineam/sdk-mounts
SDK script updates
2013-07-14 14:01:57 -07:00
Mike Frysinger
4bdab9f7fe enter_chroot: speed up entering by backgrounding locale generation
Half of the current time is spent on calling locale-gen even when there is
nothing to be done (all locales already generated).  Throw it into the bg
to unblock the main thread.

BUG=None
TEST=`cros_sdk` still works
TEST=`LANG=et_EE.UTF-8 cros_sdk` generates the new locale in the background

Change-Id: Ibe9a07bec60a59cab1cf4230358f7f8ff5b21c2e
Reviewed-on: https://gerrit.chromium.org/gerrit/58041
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-07-14 10:45:10 -07:00
Mike Frysinger
7f30c14bdc enter_chroot: bind mount /dev/pts
All devpts mounts are actually shared, even if you do:
	mount -t devpts none /dev/pts
	mount -t devpts none /mnt/foo
	mount -t devpts none /mnt/asdfasdf
These all provide the same data.

This is problematic because most distros mount their host devpts like so:
	mount -t devpts devpts /dev/pts -o mode=620,gid=5

But when cros_sdk runs, it uses:
	mount -t devpts none /dev/pts

We aren't specifying a mode/gid, so it ends up using the defaults, and
this resets the host devpts mount as well.

Since we've already assumed that the system has devpts available, it's
fine to also assume that the system has it mounted at /dev/pts and we
can simply bind mount it.

BUG=None
TEST=`cros_sdk` no longer messes up host perms on /dev/pts

Change-Id: Ib594fc5e47707f296d97ac1edce32659ed2b2273
Reviewed-on: https://gerrit.chromium.org/gerrit/48018
Reviewed-by: Steev Klimaszewski <threeway@gmail.com>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-07-14 10:45:10 -07:00
Michael Spang
a7627f70d9 Use rbind for ChromeOS source directory
I use a mount at src/build/images to stop image builds from repeatedly
filling up my SSD. The chroot needs to respect this.

TEST=cros_sdk
BUG=none

Change-Id: I5c7a26c3b4f263bd683d3a897e6edccb83187bda
Reviewed-on: https://gerrit.chromium.org/gerrit/47178
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Tested-by: Michael Spang <spang@chromium.org>
2013-07-14 10:45:10 -07:00
Mike Frysinger
0c0fea7b4d enter_chroot: handle /var/lock->/run/lock symlinks
Newer Gentoo builds have moved to /run which means /var/lock is a symlink
to /run/lock.  But since that is an absolute symlink, it points outside of
the chroot which doesn't work for us.  Use a stable path unrelated to the
chroot instead, but only with newer chroots.

We no longer have to worry about backwards compat because the code that
used to rely on this lock file (running sync processes) was punted a long
time ago.

BUG=chromium:218085
TEST=`cbuildbot chromiumos-sdk` passes

Change-Id: I38c6848dfb86386849050d7ccf3f90cbbe8e0e81
Reviewed-on: https://gerrit.chromium.org/gerrit/46231
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-07-14 10:45:10 -07:00
Paul Drews
b957c775ea Add capability to chroot to use proxies for git:// urls
This patch installs "socat" and a proxy gateway script into
the chroot so that git can use a proxy to access "git://"
protocol urls.  This is needed when performing builds from
behind a firewall that requires a proxy.  The script reads
the proxy environment variables all_proxy (SOCKS),
https_proxy (CONNECT), and http_proxy (CONNECT), in order of
preference, and supports no_proxy as a whitelist of target
hosts that must NOT go through the proxy.

This also updates enter_chroot.sh to automatically use this
script as GIT_PROXY_COMMAND when it sees the proxy
environment variables set.

The "socat" program is added to hard-host-depends as a
separate patch.  That handles socat installation in case of
building a chroot from scratch or upgrading.

The proxy-gw script is installed in the src/scripts/bin
directory which can be stably referenced within the chroot
as /mnt/host/source/src/scripts/bin/.  The
"/mnt/host/source" portion of this path is obtained from the
CHROOT_TRUNK_DIR environment variable which is set to a
suitable value by preexisting logic in common.sh.

This change became necessary to unbreak builds behind
proxies with the recent addition of two ebuilds using
egit.eclass with repositories using git:// URLs.

Original patch by Paul Drews <paul.drews@intel.com>;
modified version by Josh Triplett <josh@joshtriplett.org>.

CQ-DEPENDS=I1b01bce6f3e6a562b87f748e61508d142af576d9
BUG=none
TEST=git clone git://nv-tegra.nvidia.com/tools/cbootimage.git

Change-Id: Ic7fc917d1aa24f408bef6f102b6458114dded694
Reviewed-on: https://gerrit.chromium.org/gerrit/41659
Tested-by: paul drews <paul.drews@intel.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: paul drews <paul.drews@intel.com>
2013-07-14 10:45:10 -07:00
David James
e01374dc4b Fix 'too many levels of symbolic links' error.
In an Ubuntu Precise chroot on the Chromebook Pixel, /run/shm is a
symbolic link to /dev/shm, so bind-mounting /run/shm to /dev/shm
is really bind-mounting /dev/shm to itself, which causes a 'too many
levels of symbolic links' error. To fix this, we check for a symbolic
link prior to running this command.

BUG=none
TEST=cros_sdk no longer prints errors on Chromebook Pixel
Change-Id: Ib46cde2b4a0e00b69bd187488967e445b228ae80
Reviewed-on: https://gerrit.chromium.org/gerrit/45048
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2013-07-14 10:45:10 -07:00
Marc MERLIN
a1f5ee388d Remove a warning when $HOME is on NFS
If ~/.subversion doesn't exist, the code didn't run, but if it existed
there is no reason to re-create it, nor is it necessary to change its
permissions since they are inherited by the bind mount source.
However user_mkdir was trying to run chown as root which does not work
over NFS with root_squash or krb-nfs.
Therefore, the un-needed call to user_mkdir is removed.
(this is an issue because cros_sdk  --replace does call this code path
multiple times).

BUG=None
TEST=Built the chroot, and the permission denied on 'install' went away.
Change-Id: I01e9a7baf51a99a96d790c9613e26e652379e6df
Reviewed-on: https://gerrit.chromium.org/gerrit/44880
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Marc MERLIN <merlin@chromium.org>
Tested-by: Marc MERLIN <merlin@chromium.org>
2013-07-14 10:45:10 -07:00
Mike Frysinger
99d8dde1d6 make_chroot: clobber existing /etc/mtab
If our sdk has an /etc/mtab file already, then clobber it.  This fixes
build problems where chromeos-base now installs /etc/mtab for us, but
the sdk build isn't expecting it leading to the error:

INFO    cros_sdk:make_chroot: Running init_setup()...
ln: creating symbolic link `/b/cbuild/new-sdk-chroot/etc/mtab': File exists
Running ['/b/cbuild/src/scripts/sdk_lib/make_chroot.sh', '--stage3_path',
	'/b/cbuild/built-sdk.tar.xz', '--chroot', '/b/cbuild/new-sdk-chroot',
	'--cache_dir', '/b/cbuild/.cache', '--nousepkg'] failed!

BUG=None
TEST=`cros_sdk --chroot foo` still works

Change-Id: I539cf329e93e28534e6ff00577ce415d76918b85
Reviewed-on: https://gerrit.chromium.org/gerrit/43641
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-07-14 10:45:10 -07:00
Michael Marineau
1531cc5ea5 Merge pull request #73 from marineam/updates
fix(profiles): Add xz-utils to the system package set.
2013-07-14 10:24:30 -07:00
Michael Marineau
1acb28b696 Merge pull request #19 from marineam/updates
bump(sys-apps/flashrom): sync with upstream
2013-07-14 10:24:01 -07:00
Michael Marineau
13fa774728 bump(sys-apps/flashrom): sync with upstream 2013-07-14 13:17:35 -04:00
Michael Marineau
507aa7be69 Merge pull request #18 from marineam/updates
bump(dev-libs/libusb): Sync libusb packages from upstream.
2013-07-14 10:15:39 -07:00
Michael Marineau
2060c2e161 fix(profiles): Add xz-utils to the system package set.
It is included in system in upstream Gentoo so we should too, otherwise
there is a chance builds will fail if xz isn't installed early enough.
2013-07-14 13:13:06 -04:00
Michael Marineau
bb3130578d bump(dev-libs/libusb): Sync libusb packages from upstream.
coreos/coreos-overlay@2b3dd492af removed
libusb-0.* but we need that version in addition to libusb-1.*
2013-07-14 01:25:15 -04:00
Michael Marineau
b83d04877e Merge pull request #72 from marineam/sdk-version
Sdk version
2013-07-13 18:36:20 -07:00
Michael Marineau
e03e9dbfdc Merge pull request #32 from marineam/sdk-version
fix(catalyst): Use new COREOS_SDK_VERSION var from version.txt
2013-07-13 18:35:35 -07:00
Michael Marineau
f731726aff clean(binhost): All references to these files have been removed. 2013-07-13 21:12:47 -04:00
Michael Marineau
f24a02e034 fix(catalyst): Use new COREOS_SDK_VERSION var from version.txt
The current SDK version is now provided by the manifest's version.txt
file which is already sourced by common.sh.
2013-07-13 21:06:29 -04:00
Michael Marineau
481f9f7901 fix(config): Include binary packages from current SDK version.
Currently building new releases can fail during the 'update_chroot' step
because the release it is building doesn't have any binary packages yet.
To avoid this add the current built SDK version as a second source for
chroot binary packages.
2013-07-13 20:55:28 -04:00
Brandon Philips
742af4433c Merge pull request #71 from gregkh/remove_deps
Remove a bunch of packages that have newer versions in portage-stable
2013-07-12 11:57:44 -07:00
Brandon Philips
c8870575a8 Merge pull request #17 from gregkh/remove_deps
feat(sys-libs) remove zlib files that should not be here
2013-07-12 08:28:24 -07:00
Greg Kroah-Hartman
c3077b6a19 feat(sys-libs) remove zlib files that should not be here
Somehow they got checked into this directory, and not sys-libs/zlib,
which is where they really exist, and belong.
2013-07-11 22:27:49 -07:00
Greg Kroah-Hartman
f639711cdd feat(net-misc/curl) remove as portage-stable has newer version 2013-07-11 22:27:24 -07:00
Greg Kroah-Hartman
b04112adcd feat(net-libs/neon) remove as portage-stable has newer versions 2013-07-11 22:27:05 -07:00
Greg Kroah-Hartman
519a0e0512 feat(net-firewall/iptables) remove as portage-stable has newer version 2013-07-11 22:26:41 -07:00
Greg Kroah-Hartman
8087daaa3e feat(sys-apps/pv) remove as portage-stable has newer version 2013-07-11 22:26:21 -07:00
Greg Kroah-Hartman
e130f9eea7 feat(media-libs/libpng) remove as portage-stable has new version 2013-07-11 22:25:54 -07:00
Greg Kroah-Hartman
881cc03569 feat(sys-fs/udev) remove package as portage-stable has newer version 2013-07-11 22:25:17 -07:00
Greg Kroah-Hartman
07066716ba feat(dev-libs/protobuf) remove as newer versions are in portage-stable 2013-07-11 21:42:43 -07:00
Greg Kroah-Hartman
b0e075a09a feat(dev-libs/libffi) remove as newer versions are in portage-stable 2013-07-11 21:42:18 -07:00
Greg Kroah-Hartman
a89d45253d feat(dev-libs/libusb) remove as portage-stable has newer versions 2013-07-11 21:41:14 -07:00
Greg Kroah-Hartman
52b4d3e02c feat(dev-python/pygobject) remove as portage-stable has newer versions 2013-07-11 21:40:23 -07:00
Greg Kroah-Hartman
5d960bbbc4 feat(app-editors/vim) remove package as portage-stable has newer versions 2013-07-11 21:38:26 -07:00
Greg Kroah-Hartman
7af9d70a2c feat(dev-vcs/subversion) remove packages as portage-stable has newer versions 2013-07-11 21:37:20 -07:00
Greg Kroah-Hartman
8a6295db5e feat(dev-vcs/git) remove, as portage-stable has a newer version 2013-07-11 21:36:35 -07:00
Michael Marineau
a84de1b277 Merge pull request #70 from marineam/gcc46
fix(coreos-base/verity): Fix use of gcc flag not available in 4.6
2013-07-11 12:32:58 -07:00
Michael Marineau
54dd7da6fe fix(coreos-base/verity): Fix use of gcc flag not available in 4.6
Verity uses -fstack-protector-strong which was added in 4.7, use -all
instead which is available in 4.6. Dunno what impact this has but we
don't actually use it yet so *shrug*. Only a temporary fix since we
would probably want to fork verity if we use it or drop support entirely
if we decide we never will.
2013-07-11 10:55:35 -07:00
Greg Kroah-Hartman
e8b1eaf864 Merge pull request #16 from gregkh/remove_deps
Remove unneeded ebuilds from sys-apps/
2013-07-11 09:43:20 -07:00
Greg Kroah-Hartman
5e3df11447 Merge pull request #69 from marineam/eclass-fixes
fix(app-editors/qemacs): Fix malformed patch.
2013-07-11 09:42:47 -07:00
Greg Kroah-Hartman
3bce59c522 Merge pull request #68 from gregkh/remove_deps
Remove some sys-apps/ ebuilds that are not needed.
2013-07-11 09:41:23 -07:00
Greg Kroah-Hartman
e9d3422bb5 Merge pull request #67 from gregkh/baselayout
baselayout changes to update etc/os-release
2013-07-11 09:41:00 -07:00
Michael Marineau
326e9bb802 fix(app-editors/qemacs): Fix malformed patch.
This patch uses relative paths that are rejected by newer and stricter
eclass versions. Pulled from current portage but I'm purposefully *not*
updating the ebuild as the latest texi2html which in turn pulls in a lot
of new perl dependencies and we don't even care about texi2html or the
html docs it is used to produce in the first place so bleh.
2013-07-11 08:51:36 -07:00
Greg Kroah-Hartman
9edddf13ed feat(sys-apps/debianutils) delete
The ebuilds in portage-stable are newer, if we are even still using this
package (I wasn't able to tell for some odd reason...)
2013-07-10 23:14:29 -07:00
Greg Kroah-Hartman
b6cf6aa395 feat(sys-apps/module-init-tools) delete
We are using kmod instead, so just delete module-init-tools entirely,
it's not needed.
2013-07-10 23:13:29 -07:00
Greg Kroah-Hartman
d60806c465 feat(sys-apps/shadow) delete ebuilds
We are using the newer one in portage-overlay, these are here for no
reason, so delete them.
2013-07-10 23:12:54 -07:00
Greg Kroah-Hartman
23f9640417 feat(sys-apps/busybox) delete ebuilds
We are using the ebuilds in coreos-overlay/sys-apps/busybox instead
already, so this one is just duplicated for no reason.
2013-07-10 23:11:00 -07:00
Greg Kroah-Hartman
20ecb6b6b4 feat(sys-apps/module-init-tools) delete the ebuilds as kmod is being used
No more need for this ebuild to even hang around anymore, kmod handles
it all now.
2013-07-10 23:10:00 -07:00
Greg Kroah-Hartman
35a6c85f5b feat(sys-apps/baselayout) remove old baselayout ebuild
It wasn't being used, portage-stable was more up to date anyway.
2013-07-10 22:47:36 -07:00
Greg Kroah-Hartman
dbca7fb617 feat(sys-apps/baselayout) CoreOS deserves it's own etc/os-release
Also modifies /etc/gentoo-release because python hasn't been updated to
use os-release, it still wants the old distro-specific files.
2013-07-10 22:45:43 -07:00