Commit Graph

64 Commits

Author SHA1 Message Date
Mike Frysinger
c1fd42203b clean old chromeos-base/chromeos-bsp-null
We are converting virtual/chromeos-bsp to a new style virtual, but we
have to clean out the old one first as it has a PROVIDE= which messes
up the upgrade process.

BUG=chromium-os:38307
TEST=`./update_chroot` uninstalled this pkg for all generic boards
CQ-DEPEND=CL:42188

Change-Id: Ie23bf462a178bf1085a4700155b779e9651ad24d
Reviewed-on: https://gerrit.chromium.org/gerrit/42528
Reviewed-by: Anush Elangovan <anush@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-02-04 06:56:09 -08:00
Brian Harring
2499bfbeb2 Move source access to a standard location, add chromite to PYTHONPATH.
Rather than having to find /home/${SUDO_USER:-${USER}}/trunk, instead
just look for /mnt/host/trunk (defined by common.sh as $CHROOT_TRUNK_DIR).
This simplifies code flow, and is a requirement for shoving chromite
into PYTHONPATH globally w/in the chroot.

BUG=chromium-os:37347
TEST=cros_sdk --replace; cros_sdk w/ chroot upgrade.
Change-Id: I9ee3e6556541a91193f49cbf74ffc5a8e090537f
Reviewed-on: https://gerrit.chromium.org/gerrit/39921
Tested-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2013-01-14 00:44:03 -08:00
Allen Martin
642c3be66e Update libtool to keep in sync with toolchain
Force a re-emerge of host libtool

BUG=chromium-os:37334
TEST=Added fake "4.6.x-google" version string to libtool and ran
./update_chroot and verified libtool was re-emerged

Change-Id: I82d3da181831a7718b230305c5aca7899d591c2d
Signed-off-by: Allen Martin <amartin@nvidia.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/39858
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2012-12-18 18:18:26 -08:00
Mike Frysinger
b65269bf01 update hooks: clean out some old hard-host-depends packages
These packages used to be installed into the chroot, but no longer.
Punt them to avoid random upgrade errors due to them no longer existing.

BUG=None
TEST=`./update_chroot` worked and cleaned out these pkgs

Change-Id: I9b7f7d0f8f9106d2a580393ec428876d332ac701
Reviewed-on: https://gerrit.chromium.org/gerrit/37763
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-11-09 16:33:32 -08:00
David James
76764885b9 Convert make_chroot.sh and enter_chroot.sh to run as root.
sudo takes 150ms per invocation on Goobuntu, and with 10 invocations in
enter_chroot.sh, this means that we're wasting a lot of time, every time
cros_sdk is invoked. Cutting these unnecessary invocations reduces the time
required to run enter_chroot.sh from 2.3s to 0.8s.

CL:36618 is the companion change that updates cros_sdk to invoke
sudo unshare -m prior to calling enter_chroot.sh.

Summary of changes:

1. Remove all calls to sudo and just run the commands directly.
  - Remove the mount queue and any sudo_multi optimizations.
  - Rename sudo_chroot -> bare_chroot because we don't run sudo anymore there.
  - Remove code for validating sudo timestamp.
2. Allow the scripts to work as root:
  - Ensure that files created by cros_sdk that previously were owned by the
    user still are owned by the user (either using chown or cp -p).
  - Use $SUDO_USER to find the user's account.
  - Use $SUDO_HOME instead of $HOME to find the user's home dir.
  - Remove outdated code for disabling automount on Lucid, which doesn't work
    when run as root.
  - Update code for calculating the user's git username to use sudo to switch
    to the user. Also move it to make_chroot.sh so that this change doesn't
    impact performance.
3. Cleanup
  - Remove environment syncer process in favor of just syncing once when chroot
    is entered.
  - Remove teardown and instead rely on unshare to unmount the mounts. To make
    sure that outside processes never notice the mounts, we use mount -n. This
    also ensures that /etc/mtab never contains stale mounts.
  - Remove path-overrides, since it is no longer needed.

BUG=chromium-os:35714, chromium-os:35679
TEST=Trybot runs.
CQ-DEPEND=CL:36618

Change-Id: I919a8aadb08fafde97348e8511573c28fdd47186
Reviewed-on: https://gerrit.chromium.org/gerrit/36619
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2012-10-30 14:49:48 -07:00
Brian Harring
f264b82dd2 Force our umount w/in the chroot.
Do this via ensuring that any common.sh invoker
of raw umount (say a root script) sees our umount
path.

Additionally, inject into default profiles our override,
and via an upgrade scriptlet.

This is round two; originally appeared as CL:32088, was
reverted due to:
https://uberchromegw.corp.google.com/i/chromiumos/builders/chromiumos%20sdk/builds/2314/steps/BuildBoard/logs/stdio

The fix however is just adding a single sudo mkdir. :/

BUG=chromium-os:23443
TEST=cros_sdk --replace --bootstrap
TEST=cros_sdk --replace

Change-Id: I0dc7522a9c623f40081d4f138cea0c2c45171fea
Reviewed-on: https://gerrit.chromium.org/gerrit/32365
Commit-Ready: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
2012-09-06 10:34:33 -07:00
Chris Sosa
389634d71c Revert "Force our umount w/in the chroot."
This change breaks the chromiumos_sdk builder.  See

http://uberchromegw.corp.google.com/i/chromiumos/builders/chromiumos%20sdk/builds/2314/steps/BuildBoard/logs/stdio

This reverts commit 23da619f13

Change-Id: I47aa6e94aa0c62494cc40e9964f25097d3353322
Reviewed-on: https://gerrit.chromium.org/gerrit/32349
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2012-09-05 19:57:02 -07:00
Brian Harring
23da619f13 Force our umount w/in the chroot.
Do this via ensuring that any common.sh invoker
of raw umount (say a root script) sees our umount
path.

Additionally, inject into default profiles our override,
and via an upgrade scriptlet.

BUG=chromium-os:23443
TEST=manual validation, trybot.

Change-Id: Ie2514f6e8d2e10a19ab8d11c8056177bc1a2fb4d
Reviewed-on: https://gerrit.chromium.org/gerrit/32088
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2012-09-05 14:38:14 -07:00
Shawn Nematbakhsh
299493f340 Add conversion script to convert Butterfly board to 32bit.
Add conversion script to convert 2GB butterfly board to 32bit.

BUG=chrome-os-partner:13254
TEST=run update_chroot, verify butterfly upgraded

Change-Id: Ia6e834b727e70bfb27af9c81175b5df09ef56e2e
Reviewed-on: https://gerrit.chromium.org/gerrit/31777
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Shawn Nematbakhsh <shawnn@chromium.org>
2012-08-31 18:29:32 -07:00
Brian Harring
06d3c2e20b Pass more proxy vars into the chroot, rework sudoers.d maintenance.
In particular, put the sudoers.d setup into one script (making
updates to it easier in the future if necessary), and
centralize the proxied vars into a const in common.sh.

Thanks to Kevin McCray/Josh Triplett/Alexander Kanevsky for
pointing out the missing proxy variables, and fixes/cleanup.

BUG=None
TEST=https_proxy=blah cros_sdk -- bash -c 'echo $https_proxy'
TEST=build_packages behind a proxy.
TEST=cros_sdk --replace && \
     RSYNC_PROXY=blah cros_sdk -- bash -c 'echo $RSYNC_PROXY'

Change-Id: I3165882dfd9c8b52d25c2b26d7ff9242c84c91bd
Reviewed-on: https://gerrit.chromium.org/gerrit/31185
Tested-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Josh Triplett <josh@joshtriplett.org>
2012-08-24 13:26:03 -07:00
Ryan Cui
e09d3c2fd5 Upgrade hook v44 fixes
- do test for chromium/src before fixing the checkout.
- don't switch manifests for minilayout users.

BUG=chromium-os:32963
TEST=locally

Change-Id: I1d0cbfc9f4f03d85b34810cdb98d99a7a21d8adf
Reviewed-on: https://gerrit.chromium.org/gerrit/28842
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
Commit-Ready: Ryan Cui <rcui@chromium.org>
2012-07-31 16:07:36 -07:00
Ryan Cui
05ed4086da Add upgrade hooks to support removing chrome projects from manifest.
See the bug for details.

BUG=chromium-os:32963.
TEST=Locally, remote trybots.

Change-Id: I33f5c42b36f3e06139036c299c2fc2c2ff026411
Reviewed-on: https://gerrit.chromium.org/gerrit/28543
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
2012-07-30 10:26:34 -07:00
Dave Parker
258021c878 Choot update script to force setup board for kiev.
This is to transition from a 32bit to 64bit build.

BUG=chrome-os-partner:11058
TEST=build_packages for board=kiev. Verify choot upgraded.

Change-Id: I251be4eba14ba407cfbc6ecf4fb089efe7d457e8
Reviewed-on: https://gerrit.chromium.org/gerrit/26743
Reviewed-by: Dave Parker <dparker@chromium.org>
Tested-by: Dave Parker <dparker@chromium.org>
2012-07-15 19:03:09 -07:00
Mike Frysinger
aa58465a3f update hooks: add feedback messages to slow chrome cleanup
Some people think this upgrade hook gets stuck when in reality, it has
to delete a lot of files (gigs worth).  Add some progress messages so
people know it's doing something.

BUG=chromium-os:32052
TEST=manually running 25_suppress_incremental_build_across_chroot showed pretty messages

Change-Id: Ie20980fb2c60c980b617e98d68b0e5f9633fbb2a
Reviewed-on: https://gerrit.chromium.org/gerrit/26111
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-26 15:47:55 -07:00
Mike Frysinger
9c7eff8fca update hooks: add an upgrade for stale daisy
The daisy PFQ did not regenerate itself, so for people who tried to build
daisy again, they got a mix of stale binpkgs.  Now that things have been
manually cleaned up, we can deploy another upgrade hook just for daisy.

BUG=None
TEST=`./update_chroot` w/out daisy ran quick -> nothing to do
TEST=`./update_chroot` w/up-to-date daisy ran quick -> nothing to do
TEST=`./update_chroot` w/out-of-date daisy -> deleted & re-installed daisy

Change-Id: Id707a492f9cea7fb4c8b204d84c4fc3bca84c4b3
Reviewed-on: https://gerrit.chromium.org/gerrit/24908
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-08 16:59:41 -07:00
Mike Frysinger
3ba74cefcb update hooks: skip old dirs automatically
If we have old dirs (such as a previous migration), we might detect they
need migration for ldso too, but their name isn't a valid board.  So skip
those old dirs, and punt old ldso dirs in case they exist (failed previous
upgrade).

BUG=None
TEST=`./update_chroot` moved my old tegra2_kaen and arm-generic boards away, skipped the old softfloat ones, and deleted the previous ldso moves

Change-Id: I9ff316d6de2d9e982f93880426955bb0b49f00a1
Reviewed-on: https://gerrit.chromium.org/gerrit/24890
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-06-08 11:48:45 -07:00
Mike Frysinger
e1c7706041 update hooks: migrate arm boards to new ldso path
Now that glibc installs with the new arm hardfp ldso path, and gcc
generates ELFs with the new path, forcibly migrate existing boards
to the new path by having people rebuild everything.

BUG=None
TEST=`./update_chroot` moved my old tegra2_kaen and arm-generic boards away

Change-Id: I5fee57ff49a9533cc10cb82888014f7cb53033ac
Reviewed-on: https://gerrit.chromium.org/gerrit/24731
Reviewed-by: asharif <asharif@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-08 11:24:56 -07:00
Mike Frysinger
9377f67b55 migrate to linux-headers
Rather than having a toolchain package we use for the cross-compilers and
installing a different one for the target build dir, use the same package.
This makes updating more logical as we only have to do it in one place.

BUG=chromium-os:24928
TEST=`cbuildbot amd64-generic-full` works
TEST=`cbuildbot arm-generic-full` works
TEST=`cbuildbot x86-generic-full` works
TEST=build_packages+build_image for x86-alex boots & works

Change-Id: Ib083c3d2eae75d6f5437203990599cdc837dd9dc
Reviewed-on: https://gerrit.chromium.org/gerrit/24722
Reviewed-by: Anush Elangovan <anush@google.com>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-06-07 12:07:43 -07:00
Mike Frysinger
8b06bd5926 update hooks: migrate paths to userpriv settings (part 2)
The previous upgrade hook didn't change all the perms on files in the host
distdir because the default value expands to a symlink which `find` did not
walk.  Add the -H flag to make that happen.

For people who haven't upgraded yet, stub out the existing 38 hook.

BUG=chromium-os:3616
TEST=add a root owned file to host distdir, run ./update_chroot, see file owners fixed

Change-Id: I3f5f88b4fb1d27ce588a342331ad10e957961bcc
Reviewed-on: https://gerrit.chromium.org/gerrit/24459
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-06-04 20:01:05 -07:00
Mike Frysinger
6e52ff1f3d update hooks: migrate paths to userpriv settings
Now that we're enabling userpriv for the chroot, we need to fix all the
paths that might be owned by root to the right user.

BUG=chromium-os:3616
TEST=`./update_chroot` on a system with root-owned files
	in the various paths changed them all to my user

Change-Id: I3655c851d5844524ec77c3476cee7a6e9d70ce0d
CQ-DEPEND=Id513c0b8b380d57dd3e150917a969d0bf36883fc
Reviewed-on: https://gerrit.chromium.org/gerrit/24216
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-01 12:35:43 -07:00
Zdenek Behan
7d2634e5da update_hooks: add a hook to unmerge old and conflicting cross headers
BUG=none
TEST=./update_chroot

Change-Id: Id67b2f486821558d72a73445621f4685a0cf5a54
Reviewed-on: https://gerrit.chromium.org/gerrit/24235
Tested-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
2012-05-31 19:50:37 -07:00
Elly Jones
983cd2058b [scripts] rebuild openssl
We need to rebuild binpkgs that depend on openssl.

Change-Id: I13c59a79700e5704b463b7d03ffbf19d83c5e2e7
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/23743
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-05-25 16:05:23 -07:00
David James
5e3342f369 Add conversion script to convert 2GB boards to 32bit.
BUG=chromium-os:30820
TEST=Launch incremental buildbots for these overlays and confirm they
     are converted to 32bit successfully.

Change-Id: I5ba9294d8b00204110c304a48c0c5f3c0cae9751
Reviewed-on: https://gerrit.chromium.org/gerrit/22497
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-05-14 13:01:22 -07:00
Mike Frysinger
6b1abb2a6f fix up function style
The "function" keyword is superfluous, not in POSIX, is inconsistent
between bash files, and generally makes me angry.  So convert every
instance to the form:
	foo() {

BUG=None
TEST=`cbuildbot x86-generic-paladin` works

Change-Id: I97f5ca30a3edfef7222b1e08ac23917dc613b556
Reviewed-on: https://gerrit.chromium.org/gerrit/22467
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-05-11 14:10:38 -07:00
David James
e6d980631d Switch off --nousepkg flag for tegra2 to save on build speed.
Now that the new compiler has been published, there is no need to use
nousepkg anymore. So we can remove this to speed up builds for folks
who are upgrading.

BUG=none
TEST=Remote trybot run to verify tegra2 toolchain is still upgraded
     to hardfp.

Change-Id: Iad08114f971c6a9e1a84b1101b25ae60e8822751
Reviewed-on: https://gerrit.chromium.org/gerrit/22406
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-05-10 16:41:47 -07:00
Mike Frysinger
c3d2145466 update hooks: upgrade softfp dirs to hardfp
We need to move the old softfp builds out of the way so people can
start working with hardfp.

BUG=None
TEST=`./update_chroot` migrated my few arm boards over

Change-Id: I22429a5f7d80ee20b21ab8a8a77157a46a574fdf
Reviewed-on: https://gerrit.chromium.org/gerrit/22368
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-05-10 11:54:16 -07:00
Chris Masone
09c05ecd19 [crosutils] Upgrade chroot to remove some never-used packages
We intended to use some extra python modules for autotest in the chroot,
but decided against it.  They're removed from hard-host-depends in
https://gerrit.chromium.org/gerrit/21816

BUG=None
TEST=./upgrade_chroot; see that they've been removed.
CQ-DEPEND=If896436bf9fed7c0fd600ffca9a4c854fd7eceba
CQ-DEPEND=I95df39e40b62c919df0bafcb490d8caa48c04dd4

Change-Id: If9854661b8774d519c5a587e77c31eafdc9b889b
Reviewed-on: https://gerrit.chromium.org/gerrit/21817
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
2012-05-04 09:12:53 -07:00
Mike Frysinger
a03fc04b22 update hooks: scrub some more old packages
These shouldn't be around anymore, so let's move them.

BUG=None
TEST=build_packages for x86-alex worked

Change-Id: I95df39e40b62c919df0bafcb490d8caa48c04dd4
Reviewed-on: https://gerrit.chromium.org/gerrit/21806
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-05-03 19:23:01 -07:00
Sonny Rao
d6e32cd9c1 Add chroot upgrade script to clear out atom board root(s) when moving to 64bit
BUG=chrome-os-partner:8349
TEST=Ad hoc, apply update to 64bit, run this script, make sure build works

Change-Id: I708addf055faf90b250bb38da5b292ecabc26edb
Reviewed-on: https://gerrit.chromium.org/gerrit/17597
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
2012-03-08 12:35:28 -08:00
Mike Frysinger
69d139f766 update hooks: update metadata dir for installed crossdev overlays
Old crossdev would symlink its metadata dir to the chromiumos overlay.
New crossdev manages this itself iff it had created the layout.conf
before.  Add an upgrade hook to convert the symlink over to a config
file that crossdev will update.

BUG=chromium-os:26998
TEST=`./update_chroot` with old chroot created metadata overlay that crossdev would update

Change-Id: I03faa78a988e0cd0a94dcd4f0f01151c32bb215b
CQ-DEPEND=I3f2775111da800622591c9b56ba00428d6106207
Reviewed-on: https://gerrit.chromium.org/gerrit/17408
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-03-07 17:12:07 -08:00
Sonny Rao
9002975ff0 Add chroot upgrade script to clear out stumpy root when moving to 64bit
BUG=chrome-os-partner:8235
TEST=Ad hoc, apply update to 64bit, run this script, make sure build works

Change-Id: I43fe93cfc4af2b4904ecb9a3d331769acd2a5e16
Reviewed-on: https://gerrit.chromium.org/gerrit/17115
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
2012-02-29 17:32:30 -08:00
Mike Frysinger
47d28794fa update hooks: make sure cross-compilers are not in @world
There was a bug in the setup_board where it was selecting cross-compilers
and adding them to @world.  Now that's been fixed, undo the damage.

BUG=None
TEST=`./update_chroot && grep ^cross- /var/lib/portage/world` showed nothing

Change-Id: Ide4961def700cf42d95454cc0ce404cb517bdfea
Reviewed-on: https://gerrit.chromium.org/gerrit/16997
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-02-29 09:37:32 -08:00
Sonny Rao
ae6b96f3ab Add chroot upgrade script to clear out build root(s) when moving to 64bit
BUG=chrome-os-partner:8235
TEST=Ad hoc, apply update to 64bit, run this script, make sure build works

Change-Id: If7b39baae1f4f9ab9529b9c00dc7dd49ac2e2987
Reviewed-on: https://gerrit.chromium.org/gerrit/16829
Reviewed-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
2012-02-28 12:49:08 -08:00
Mike Frysinger
97e08bd25b update hooks: scrub old unused pkgs
In case people have some of these old pkgs hanging around still, or
happened to manually install them while testing, punt them all from
our board dirs.

BUG=None
TEST=build_packages updated chroot and cleaned out old pkgs in other build dirs

Change-Id: I2b037e668faef39e78f7422f91df2d5493799c0f
Reviewed-on: https://gerrit.chromium.org/gerrit/16818
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-02-28 08:35:55 -08:00
Brian Harring
36b102b5d1 Add upgrade script to move incremental chrome build content.
Via distfiles bind mounting, chrome build output was being cached
across chroot replacements.  This potentially is desirable, but
wasn't explicitly planned for and violates an assumption of the
canaries.

As such move the content to it's new location.

BUG=None
TEST=emerge-<board> chromeos-chrome
CQ-DEPEND=Ibfc5d42e74861ff498dd2cb6cc2d7be6ec0ded60

Change-Id: I18e384f0fc1cedb3c70ab85178103765322370eb
Reviewed-on: https://gerrit.chromium.org/gerrit/15383
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2012-02-07 00:35:44 -08:00
Brian Harring
7ee892d95a Mount bind external distfiles into the chroot.
Purpose of this is to allow us to avoid re-downloading everything
every time we rebuild the chroot.

This maintains two directories; host and target.  Future enhancement
involves collapsing this into one- this requires some host work however,
and has some potential gotchas in doing so.

Meanwhile, we now store distfiles in repo/distfiles/{host,target},
and mount bind repo/distfiles into /var/cache/distfiles.

An upgrade script in turn optimistically tries to move the content
into the new location; if it can't complete the move, it wipes the
content and the user has to redownload it (acceptable, if annoying).

BUG=chromium-os:13115
TEST=cbuildbot x86-generic-full

Change-Id: Iea96429df0e1fdc4ac0860fbce0daabc90c4c2a3
Reviewed-on: https://gerrit.chromium.org/gerrit/15189
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
2012-02-06 21:49:37 -08:00
Mike Frysinger
db0f538d44 update hooks: smooth out the dev-vcs migration
Not everyone got a smooth migration for git/subversion from dev-util
to dev-vcs, so add a hook to manually unmerge the old versions.  The
newer packages should recover gracefully after that.

BUG=chromium-os:24360
TEST=build_packages ran ver 23 upgrade and continued on

Change-Id: I0b56f0f0a8b8a7ebd64a4a664e5524f0b7828791
Reviewed-on: https://gerrit.chromium.org/gerrit/13663
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
2012-01-05 11:55:44 -08:00
Zdenek Behan
49a8e9687f upgrade hook: move PS1 niceties from .bashrc to profile.d
This solves two problems (and half):
a) messing with user's preference file is a no-no, if we want a
hardcoded behaviour like this, profile.d is the way to go
b) .bashrc settings are overridden when doing env-update; source
/etc/profile
c) profile.d will also apply to root (although not with sudo su)

BUG=none
TEST=below
1) ./run_chroot_version_hooks --version 21
2) see all fixed, source /etc/profile, and still see my prompt unchanged

Change-Id: I25b4602f4951b17815bcd312a8249320784c67e1
Reviewed-on: https://gerrit.chromium.org/gerrit/12539
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
2011-12-09 12:00:59 -08:00
Sean Paul
97df39f63a Uninstall GRUB 1.99 from chroot in favour of 1.97
See CL https://gerrit.chromium.org/gerrit/#change,11951 for the original CL.

BUG=chromium-os:23407
TEST=Tested on chroot synced on 23/11/11

Change-Id: I039d6b6ee06617dfa9263eab4fe83e128f0773b4
Reviewed-on: https://gerrit.chromium.org/gerrit/12106
Reviewed-by: Peter Mayo <petermayo@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Sean Paul <seanpaul@chromium.org>
Commit-Ready: Sean Paul <seanpaul@chromium.org>
2011-11-24 13:37:36 -08:00
Mike Frysinger
f331598aa9 update hooks: delete board /etc/portage/bashrc
The bashrc that is in each board's /etc/portage/ dir is an old tool from
crossdev which we no longer use/need, so drop it.  Especially since it
conflicts with newer bashrc profile stacking.

BUG=chromium-os:21276
TEST=chroot updated to 18 and all /etc/portage/bashrc files in /board/*/ are gone

Change-Id: I51688ce6c04e91506113d920bf1a50a6a822d2f3
Reviewed-on: https://gerrit.chromium.org/gerrit/11908
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-11-20 14:21:48 -08:00
Anush Elangovan
7f15be2102 Mid air collision of upgrade script 17_*
Move grub upgrade to 18_
Move sudo upgrade to 19_
Empty out old 17_

BUG=chromium-os:21244
TEST=manual inspection

Change-Id: Iaffbe75022e3287f2071dae46d5010a1b10d27d3
Reviewed-on: https://gerrit.chromium.org/gerrit/11971
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Anush Elangovan <anush@chromium.org>
Tested-by: Anush Elangovan <anush@chromium.org>
2011-11-18 23:04:35 -08:00
Anush Elangovan
8d3ea4b7e8 Uninstall old grub in the chroot
BUG=chromium-os:21244
TEST=./build_packages unmerges old grub and installs new one (with related change)

Change-Id: Iadfbd219a989f71258786591c047ace3931f1e9c
Reviewed-on: https://gerrit.chromium.org/gerrit/11951
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Anush Elangovan <anush@chromium.org>
2011-11-18 21:23:13 -08:00
Mike Frysinger
48edc99a55 update hooks: migrate sudoers tweaks with older chroots
The make_chroot script was upgraded to add its customizations to a file
in /etc/sudoers.d/ instead of modifying /etc/sudoers.  Then the sudo
ebuild was updated to not modify /etc/sudoers anymore.  This meant for
older chroots, the customizations that make_chroot added were lost in
the process.

Add an upgrade hook that creates the split /etc/sudoers.d/ file for older
chroots that did not go through the newer make_chroot.

BUG=chromium-os:11991
TEST=set chroot to 16, deleted file, ran build_packages: chroot updated to 17 and created correct /etc/sudoers.d/90_cros file
TEST=set chroot to 17, create /etc/sudoers.d/90_cros, ran build_packages: chroot updated to 17 and left existing file alone

Change-Id: I279ac3e15380e02b50a752a62cecbd94171fd724
Reviewed-on: https://gerrit.chromium.org/gerrit/11774
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-11-18 16:21:38 -08:00
Mike Frysinger
cbc51a0929 update hooks: punt old localtime symlinks
Older core ebuilds would install /etc/localtime symlinks that'd confuse
the build system, so scrub them now that the ebuilds in question have
been fixed up.

See http://gerrit.chromium.org/gerrit/10960 for more info.

BUG=chromium-os:21850
TEST=`./build_packages --board=x86-alex` cleaned my old /etc/._cfg*_localtime symlinks

Change-Id: I3b3d2a42e77d259cf9eda380f791e8108fef7458
Reviewed-on: https://gerrit.chromium.org/gerrit/10965
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2011-11-04 10:55:01 -07:00
Mike Frysinger
6b38b1e1af update hooks: undo /etc/portage/env support
This drops the work that we did in 14_board_portage_env as support for
per-package env in the overlay has been moved to profile.bashrc.  That
do not require modification of any /etc/portage/env dirs.

BUG=chromium-os:21787
TEST=update chroot to ver 15, make sure /build/*/etc/portage/env are gone

Change-Id: I4f1d577f125a66efdeabdbbd8f862562c2e5d2e5
Reviewed-on: https://gerrit.chromium.org/gerrit/11047
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2011-11-03 16:13:22 -07:00
Mike Frysinger
328b9eab02 update hooks: add /etc/portage/env support
Newer setup_board now sets up /etc/portage/env in the board root as a
symlink.  Add an update hook to fix up all existing boards.

Also migrate /etc/portage/bashrc in the chroot.

BUG=chromium-os:21787
TEST=update chroot from ver 13 to ver 14; make sure /build/*/etc/portage/env are symlinks

Change-Id: I8b828b8773998e1aa0104c42bad2dd2ac5c8416c
Reviewed-on: http://gerrit.chromium.org/gerrit/10344
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-10-20 11:06:39 -07:00
Mike Frysinger
6bae49985e update hooks: drop useless +x perms on files
These files need not be +x to work since we source them directly.

BUG=None
TEST=update chroot from ver 12 to ver 13

Change-Id: I3133cf532286bed63308e82767f0c95900f54e84
Reviewed-on: http://gerrit.chromium.org/gerrit/10342
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-10-19 16:48:55 -07:00
Sonny Rao
e2e33f1b17 Add a migration script to enable the gold linker on x86 and amd64
BUG=chromium-os:21619
TEST=run build_packages on x86-generic and amd64-generic and
ensure gold linker is enabled via "binutils-config -l"

Change-Id: I7026fad808587a5d6158421c3dac9d18b7141242
Reviewed-on: http://gerrit.chromium.org/gerrit/9996
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
2011-10-13 21:35:27 -07:00
Zdenek Behan
eeaf674db4 update hooks: 3c1d3d8be6, take two
add a hook for fixing all pending config updates

BUG=chromium-os:13987
TEST=below
1) export CONFIG_PROTECT="/etc /usr/share"
2) checkout as old as possible revision of cros-overlay, update chroot to it
3) checkout HEAD and update back
4) run the hook, see it update thousands of files correctly

Change-Id: Idabf5475516ed58b76ceee6ffdc817a5f46839ad
Reviewed-on: http://gerrit.chromium.org/gerrit/10022
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
2011-10-13 09:56:07 -07:00
Chris Sosa
0f0c985357 Revert "update hooks: add a hook for fixing all pending config updates"
This reverts commit dbcbca5139eb83768dad3dc5e4d27e9e89ca3451

Seems like this change broke SSL http://build.chromium.org/i/chromiumos/builders/x86%20generic%20PFQ/builds/1237/steps/BuildBoard/logs/stdio

Change-Id: I02b1e46a6032bc48d54e6fb3d9908d3ea5ca489f
Reviewed-on: http://gerrit.chromium.org/gerrit/10015
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2011-10-13 08:30:08 -07:00