flatcar-scripts/install_packages.sh
Bill Richardson d26b8abee2 Here's the upgrade-everything-to-Karmic change. As promised, some fairly
important things break.

Here are some of the more noticable problems:

* The Karmic xscreensaver is newer than ours, so we're pulling and invoking
  the upstream version instead. It will prompt you for the "chronos"
  password but it really wants the password you used to log in. Or hit
  CTRL-ALT-F2, log in with chronos and "killall xscreensaver".

* I had to bump the rootfs size from 950M to 1024M to make room for
  everything (most likely xscreensaver).

* WiFi isn't working. No clue why not.

* The list of packages installed on the run-time image are different, almost
  certainly due to changes in the upstream dependencies. That may or may not
  have anything to do with the known failures.

That said, if you use a wired internet connection, you can log in and browse
the web, suspend, etc. and it doesn't crash.

FWIW, upgrading to Karmic causes these packages to be removed from the
run-time image:

  acpi
  cron
  gcj-4.4-jre-lib
  gob2
  icedtea-6-jre-cacao
  libcloog-ppl0
  libclutter-0.9-0
  libgmpxx4ldbl
  libmysqlclient15off
  libpcsclite1
  libpolkit-gobject-1-0
  libppl-c2
  libppl7
  libreadline5
  python-pkg-resources
  python-setuptools
  swig
  wpasupplicant

These packages are added:

  arora
  dictionaries-common
  hdparm
  ibus
  ibus-anthy
  ibus-chewing
  ibus-gtk
  insserv
  libbsd0
  libc-bin
  libclutter-1.0-0
  libcroco3
  libdrm-radeon1
  libgsf-1-114
  libgsf-1-common
  libibus1
  libjpeg-progs
  libmysqlclient16
  libpolkit-gobject-1-0
  libreadline6
  librsvg2-2
  librsvg2-common
  libx86-1
  miscfiles
  mountall
  pm-utils
  powermgmt-base
  python-ibus
  python-rsvg
  radeontool
  sash
  vbetool
  xscreensaver
  xscreensaver-data
  xserver-xorg-core
  xserver-xorg-input-vmmouse
  xserver-xorg-video-intel

Review URL: http://codereview.chromium.org/501071
2009-12-17 11:15:41 -08:00

83 lines
2.8 KiB
Bash
Executable File

#!/bin/sh
# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Sets up the chromium-based os from inside a chroot of the root fs.
# NOTE: This script should be called by build_image.sh. Do not run this
# on your own unless you know what you are doing.
set -e
# Read options from the config file created by build_image.sh.
echo "Reading options..."
cat "$(dirname $0)/customize_opts.sh"
. "$(dirname $0)/customize_opts.sh"
PACKAGE_LIST_FILE="${SETUP_DIR}/package-list-prod.txt"
PACKAGE_LIST_FILE2="${SETUP_DIR}/package-list-2.txt"
COMPONENTS=`cat $PACKAGE_LIST_FILE | grep -v ' *#' | grep -v '^ *$' | sed '/$/{N;s/\n/ /;}'`
# Create the temporary apt source.list used to install packages.
cat <<EOF > /etc/apt/sources.list
deb file:"$SETUP_DIR" local_packages/
deb $SERVER $SUITE main restricted multiverse universe
EOF
# Install prod packages
apt-get update
apt-get --yes --force-yes install $COMPONENTS
# Create kernel installation configuration to suppress warnings,
# install the kernel in /boot, and manage symlinks.
cat <<EOF > /etc/kernel-img.conf
link_in_boot = yes
do_symlinks = yes
minimal_swap = yes
clobber_modules = yes
warn_reboot = no
do_bootloader = no
do_initrd = yes
warn_initrd = no
EOF
# NB: KERNEL_VERSION comes from customize_opts.sh
apt-get --yes --force-yes --no-install-recommends \
install "linux-image-${KERNEL_VERSION}"
# Setup bootchart. Due to dependencies, this adds about 180MB!
apt-get --yes --force-yes --no-install-recommends install bootchart
# TODO: add pybootchartgui to create pretty picture.
# Install additional packages from a second mirror, if necessary. This must
# be done after all packages from the first repository are installed; after
# the apt-get update, apt-get and debootstrap will prefer the newest package
# versions (which are probably on this second mirror).
if [ -f "$PACKAGE_LIST_FILE2" ]
then
COMPONENTS2=`cat $PACKAGE_LIST_FILE2 | grep -v ' *#' | grep -v '^ *$' | sed '/$/{N;s/\n/ /;}'`
echo "deb $SERVER2 $SUITE2 main restricted multiverse universe" \
>> /etc/apt/sources.list
apt-get update
apt-get --yes --force-yes --no-install-recommends \
install $COMPONENTS2
fi
# List all packages installed so far, since these are what the local
# repository needs to contain.
# TODO: better place to put the list. Must still exist after the chroot
# is dismounted, so build_image.sh can get it. That rules out /tmp and
# $SETUP_DIR (which is under /tmp).
sudo sh -c "/trunk/src/scripts/list_installed_packages.sh \
> /etc/package_list_installed.txt"
# Clean up other useless stuff created as part of the install process.
rm -f /var/cache/apt/archives/*.deb
# List all packages still installed post-pruning
sudo sh -c "/trunk/src/scripts/list_installed_packages.sh \
> /etc/package_list_pruned.txt"