flatcar-scripts/chroot_version_hooks.d
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
..
1_init chroot_upgrade: rename things before it's too late 2011-05-13 15:36:10 -07:00
2_path_update Add chroot version 2 upgrade script 2011-06-03 15:32:08 -07:00
3_libtool_update Fix *.pc files for folks who have /build/x86-mario.dev symlinked to /build/x86-mario 2011-06-10 00:24:20 -07:00
4_policykit_removal Upgrade script to handle policykit -> polkit migration. 2011-06-08 14:48:33 -07:00
5_symlink_pc_update Fix *.pc files for folks who have /build/x86-mario.dev symlinked to /build/x86-mario 2011-06-10 00:24:20 -07:00
6_mobile_broadband_removal Remove mobile-broadband-provider-info package, which has been replaced 2011-07-12 15:37:19 -07:00
7_host_gcc_upgrade gcc-update-hook: regenerate latest gcc prior to calling gcc-config 2011-09-02 16:30:23 -07:00
8_unmerge_gmp Remove old versions of dev-libs/gmp to ease chroot upgrades. 2011-09-12 10:45:18 -07:00
9_board_makeconf_setup Upgrade script to insert BOARD_USE into existing make.conf.board_setup files. 2011-09-13 18:03:48 -07:00
10_default_locales enter_chroot: restore auto locale generation 2011-09-19 21:57:14 -07:00
11_rm_bad_directory Actually rm -rf /does/not instead to fix metrics unit tests. 2011-10-06 00:19:03 -07:00
12_clean_old_config_files update hooks: 3c1d3d8be6, take two 2011-10-13 09:56:07 -07:00
13_enable_gold update hooks: drop useless +x perms on files 2011-10-19 16:48:55 -07:00
14_board_portage_env update hooks: add /etc/portage/env support 2011-10-20 11:06:39 -07:00
15_board_portage_env_undo update hooks: undo /etc/portage/env support 2011-11-03 16:13:22 -07:00
16_localtime update hooks: punt old localtime symlinks 2011-11-04 10:55:01 -07:00
17_sudo_90_cros update hooks: migrate sudoers tweaks with older chroots 2011-11-18 16:21:38 -08:00