Commit Graph

23 Commits

Author SHA1 Message Date
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
Zdenek Behan
3c1d3d8be6 update hooks: 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: I4213de8ccba6e573541e96591ea0d033a10218a5
Reviewed-on: http://gerrit.chromium.org/gerrit/8938
Tested-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
2011-10-12 20:52:44 -07:00
David James
c801b10af3 Actually rm -rf /does/not instead to fix metrics unit tests.
Metrics unit tests fail if /does/not directory is present, so we need to
clean this up as a followup to a build_packages fix that stopped
creating that directory.

BUG=none
TEST=Metrics unit tests actually work now.

Change-Id: I7c470e8225e4c5c7a77f6decc4c4bcadb72cd246
Reviewed-on: http://gerrit.chromium.org/gerrit/8848
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-10-06 00:19:03 -07:00
David James
dd7e5cf244 rm -rf /does/not/exist to fix metrics unit tests.
BUG=none
TEST=Metrics unit tests work now.

Change-Id: If5830c17bbd2f389df3c390fb0de7057b05aa9aa
Reviewed-on: http://gerrit.chromium.org/gerrit/8845
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-10-05 23:22:32 -07:00
Mike Frysinger
4d258cdf9d enter_chroot: restore auto locale generation
First let's add a chroot upgrade hook that'll declare a small list of
locales to speed up glibc upgrades.

The other blocker was that `cros_sdk --enter` took an inordinate amount
of time to execute (`locale-gen -u` specifically) when the number of
existing locales is huge.  This seems to be a bug in the bash/glibc
stack which is resolved in newer versions, but we can workaround the
issue by forcing locale-gen to run in a C locale.  The tool itself does
not care about its locale and we silence its output.

BUG=chromium-os:20378
TEST=`cros_sdk --enter`; see no locales in /etc/locale.gen; run `./build_packages` and see upgrade hook work
TEST=generate all 400 locales; `cros_sdk --enter`; see that it was quick

Change-Id: I8fcc5e26bd8e1bcfd52b6a6c7ef3cacf0a252081
Reviewed-on: http://gerrit.chromium.org/gerrit/7806
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-09-19 21:57:14 -07:00
Matt Tennant
feb896d363 Upgrade script to insert BOARD_USE into existing make.conf.board_setup files.
The setup_board script now inserts a BOARD_USE value into
/build/<board>/etc/make.conf.board_setup.  This only happens the first
time the board is setup, so this upgrade script inserts that value
for boards that were previously set up.

BUG=chromium-os:20341
TEST=Ran run_chroot_version_hooks in chroot, inspected make.conf.board_setup
files for boards that did and did not have BOARD_USE already set.

Change-Id: I333198a0434076a5e8e50db6affc81ea2076d301
Reviewed-on: http://gerrit.chromium.org/gerrit/7653
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Matt Tennant <mtennant@chromium.org>
2011-09-13 18:03:48 -07:00
David James
83848ede89 Remove old versions of dev-libs/gmp to ease chroot upgrades.
BUG=none
TEST=Run it, make sure old versions are unmerged.

Change-Id: I2a281284fc17e221985c9c2b184a5a23ba90d773
2011-09-12 10:45:18 -07:00
Zdenek Behan
9a995bb37c gcc-update-hook: regenerate latest gcc prior to calling gcc-config
BUG=chromium-os:19613
TEST=below
1) Manually create a chroot with old gcc
2) Let the script update&select new one, unmerge old

Change-Id: I71732da315ed4effc6df48afab797718e44d7a06
Reviewed-on: http://gerrit.chromium.org/gerrit/7117
Tested-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2011-09-02 16:30:23 -07:00
Zdenek Behan
00626700a8 version_hooks: add a version hook for host gcc upgrade
Recently, a gcc-4.4.6 has been unmasked in the host, but no effort
has been made to make sure the developers select it with gcc-config.

BUG=chromium-os:19613
TEST=ran the tests below with set -x and observed
1) manually set the MINIMUM version to 4.4.7, see it fail
2) two gccs, current + old, set to old, observed the switch and unmerge
3) above, but set to new, same result
4) only one gcc, the current, observed nothing happening
5) only have old gcc, let the script update&select new one, unmerge old

Change-Id: Id2a285a13f5b27d7531eae4db35e36f6b8cc5f4f
Reviewed-on: http://gerrit.chromium.org/gerrit/6694
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
2011-08-31 11:40:56 -07:00
Nathan Williams
2f2b9031bc Remove mobile-broadband-provider-info package, which has been replaced
by mobile-providers.

BUG=none
TEST=./build_packages

Change-Id: I07a2fc91f0782d6a03f535333a8925f9fe6283c1
Reviewed-on: http://gerrit.chromium.org/gerrit/3973
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2011-07-12 15:37:19 -07:00
David James
f2ab143716 Fix *.pc files for folks who have /build/x86-mario.dev symlinked to /build/x86-mario
BUG=chromium-os:16364
TEST=Ran with symlinked directories

Change-Id: I374eced27f1b0b3147b9632d5f9dd2637b0d7d28
Reviewed-on: http://gerrit.chromium.org/gerrit/2390
Reviewed-by: Daniel Erat <derat@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-06-10 00:24:20 -07:00
David James
232cb578ed Upgrade script to handle policykit -> polkit migration.
This script also helps out with chromeos-u-boot-next -> chromeos-u-boot
migration.

BUG=chromium-os:16310
TEST=Run the script and verify right packages are uninstalled.

Change-Id: I4ebaa0a0b3e1eea32005b4d2a47f4581e44d825c
Reviewed-on: http://gerrit.chromium.org/gerrit/2309
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2011-06-08 14:48:33 -07:00
David James
0ec519a924 Upgrade chroots to remove references to ROOT from *.pc files.
TEST=Test incremental build_packages after libtool upgrade,
     verify all packages still work.
BUG=chromium-os:15595

Change-Id: I7cf130a4b537eb0b02f52681801346c62fc9fd69
Reviewed-on: http://gerrit.chromium.org/gerrit/2161
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-06-08 08:47:54 -07:00
Ryan Cui
780933db56 Add chroot version 2 upgrade script
Add script that adds depot_tools and chromite/bin to the PATH globally using /etc/env.d

BUG=16093
TEST=Ran make_chroot and run_chroot_version_hooks

Change-Id: I6011d7436f18ce46dfe215f01068e862d2567273
Reviewed-on: http://gerrit.chromium.org/gerrit/2022
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
2011-06-03 15:32:08 -07:00
Zdenek Behan
25b6f07b7c chroot_upgrade: rename things before it's too late
The name chroot_upgrade is rather confusing since we already have
"chroot_update" and those two scripts will be chained. It was the
original name before update_chroot existed.

BUG=none
TEST=run the new one, see it work the same

Change-Id: I851fc4a0f28e32a9bbd01b2e4ddedbaffc6abf1c
Reviewed-on: http://gerrit.chromium.org/gerrit/876
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
2011-05-13 15:36:10 -07:00