Commit Graph

2909 Commits

Author SHA1 Message Date
Michael Marineau
17c609192a fix(enter_chroot): Use .boto from the user's HOME
We don't have any private overlays but users will likely have their own
credentials in ~/.boto so make it available in the chroot.
2013-06-26 21:24:01 -04:00
Michael Marineau
82b7949c5f fix(bootstrap_sdk): Add option to upload built SDK and packages
This automates the process of uploading the fresh SDK release.
2013-06-26 17:25:55 -04:00
Michael Marineau
22de22b7ea fix(bootstrap_sdk): Use the latest SDK tarball as a fallback seed.
When running bootstrap_sdk for the first time on a host the default of
using a previous catalyst run as a seed won't work but this may be a
fresh SDK install so that tarball is probably around somewhere and will
work as a default seed for most things.
2013-06-26 16:18:43 -04:00
Michael Marineau
deb3824dee fix(update_distfiles): Set temporary directory
Provide an alternate directory for in-progress downloads to avoid
uploading any by accident.
2013-06-26 14:07:16 -04:00
Michael Marineau
a25f12bbc4 fix(update_distfiles): Add option to control gsutil's parallelism
gsutil can be hard to follow when parallel upload/downloads are enabled.
"I see it is transferring something, but what?" So this provides an
option to disable that for debugging purposes.
2013-06-26 11:44:16 -04:00
Michael Marineau
76ecff8169 fix(bootstrap_sdk): Rename final output tarball
The name "coreos-sdk-amd64-..." makes much more sense for general
distribution than "stage4..." so after catalyst is done rename the final
tarball and fixup the DIGESTS file to refer to the new name.
2013-06-26 11:32:09 -04:00
Michael Marineau
96186e3c47 fix(update_distfiles): Add --download option to for incremental updates
Temporary workaround until we have a version of emirrordist that can
operate directly on remote storage. Download the entire mirror (if it
isn't already local) so emirrordist can make an incremental update.

Not great but it will do for now.
2013-06-26 11:19:59 -04:00
Brandon Philips
663798c23d Merge pull request #7 from marineam/mirror
Mirror
2013-06-24 06:31:15 -07:00
Michael Marineau
133f2d3d8b add(update_distfiles): New script to build and upload a distfiles mirror
This script wraps emirrordist to scan all ebuilds and fetch every
SRC_URI to construct a distfiles mirror. It can then optionally upload
to storage.core-os.net via gsutil.

Note: This is a work-in-progress, emirrordist expects to operate on a
complete mirror on the local filesystem but maintaining a complete local
copy of everything is burdensome. Before this is truly practical a
modified version of emirrordist will be needed to either accept a list
of already-uploaded files it can assume are OK or operate on the cloud
storage system directly.
2013-06-24 02:00:01 -04:00
Michael Marineau
720b0c3def feat(update_ebuilds): Add option to immediately commit updates 2013-06-24 01:56:48 -04:00
Brandon Philips
711a83913f Merge pull request #6 from marineam/buildhost
cleanup(setup_board): Remove /etc/make.conf.board
2013-06-22 17:20:43 -07:00
Michael Marineau
e6b3c60836 cleanup(setup_board): Remove /etc/make.conf.board
This file mostly just defined BINHOSTs but I'd like to move that
completely into coreos-overlay as the SDK BINHOSTs have always been. It
also sourced src/overlays/overlay-amd64-generic/make.conf but I want to
move the few things it defined into coreos-overlay as well.

The one interesting thing this file did was to optionally define
ACCEPT_LICENSE but that can go into /etc/make.conf.board_setup instead.

Overall this takes a chunk out of the make.conf spaghetti. :)
2013-06-22 16:05:33 -04:00
Brandon Philips
bc7b9b75e6 Merge pull request #3 from marineam/getbinpkg
fix(scripts): Add --nogetbinpkg command line option
2013-06-22 11:45:16 -07:00
Brandon Philips
27ea8c25a8 Merge pull request #5 from marineam/bootstrap
Bootstrap
2013-06-22 09:15:17 -07:00
Michael Marineau
f5e61302f1 fix(make_chroot): Remove unnecessary package rebuilds/removals
These are not required when starting from the new sdk stage4 tarballs
instead of a stock gentoo stage3 tarball.
2013-06-22 00:30:09 -04:00
Michael Marineau
c77b595d66 fix(catalyst): Add --with-bdeps=y to stage4 upgrade
By default emerge will not install build dependencies if it doesn't need
them (i.e. installing a binary package) but we want to make sure
everything gets included in stage4 no matter how it was installed.
2013-06-22 00:30:09 -04:00
Michael Marineau
7bf839c6fb add(bootstrap_sdk): Add a script for bootstrapping the sdk tarball
This uses Gentoo's catalyst for very thoroughly building images from
scratch. Using images based on this will eliminate some of the hackery
in make_chroot.sh for building up the sdk from a stock stage3 tarball.

For reference the procedure it performs is this:

1. snapshot: Grab a snapshot of portage-stable. Note that overalys are
   not snapshotted.
2. stage1: Using a "seed" tarball as a build environment, build a
   minimal root file system into a clean directory using ROOT=...
   and USE=-* The restricted USE flags are key be small and avoid
   circular dependencies.
3. stage2: Run portage-stable/scripts/bootstrap.sh
   This rebuilds the toolchain. Probably not strictly necessary most of
   the time but does super-duper-promise that the toolchain isn't linked
   to or otherwise influenced by whatever was in the "seed" tarball.
4. stage3: Run emerge -e system to rebuild everything using the fresh
   toolchain using the normal USE flags provided by the profile. This
   will also pull in assorted base system packages that weren't included
   in the minimal environment stage1 created.
5. stage4: Install any extra packages or other desired tweaks. For the
   sdk we just install all the packages normally make_chroot.sh does.
2013-06-22 00:30:09 -04:00
Brandon Philips
77882c7653 Merge pull request #4 from marineam/update_ebuilds
add(update_ebuilds): A little script for fetching upstream ebuilds.
2013-06-20 21:06:50 -07:00
Michael Marineau
38f81b7b4e add(update_ebuilds): A little script for fetching upstream ebuilds.
Meant to add this last week... It can either pull from Gentoo CVS or a
local directory (in case you rsynced the whole portage tree). Just name
a package by pkg-cat/name and it will update portage-stable.
2013-06-20 23:27:25 -04:00
Michael Marineau
19a993be96 fix(scripts): Add --nogetbinpkg command line option
As-is all of the various emerge wrapping scripts default to using
--getbinpkg whenever --usepkg is enabled. This means every single emerge
command made makes multiple synchronous HTTP requests to the upstream
binary package repository to get the latest package list. This gets
really frustrating when working remotely with limited network
connectivity. Using --usepkg with --nogetbinpkg will use locally cached
packages without making remote requests.
2013-06-18 14:49:59 -04:00
Brandon Philips
c8ab4dde26 Merge pull request #2 from marineam/nspawn
feat(boot_nspawn): Add wrapper script for booting via systemd-nspawn
2013-06-08 19:39:38 -07:00
Michael Marineau
18da78bdf9 feat(boot_nspawn): Add wrapper script for booting via systemd-nspawn
This script will boot the build target root via systemd-nspawn which is
a mighty bit faster than building and booting vm images. :)

Note: systemd-nspwan doesn't do anything special for networking so port
conflicts for things like sshd are to be expected. Works though. :)
2013-06-08 21:48:47 -04:00
Brandon Philips
e549c05dc3 Merge pull request #1 from marineam/boot-cleanup
feat(build_image): Record directories installed in stateful_partition
2013-06-06 13:39:56 -07:00
Michael Marineau
dcd7b8e990 fix(gen_tmpfiles): Add trailing newline 2013-06-06 14:22:40 -04:00
Michael Marineau
31dbe34f10 feat(build_image): Record directories installed in stateful_partition
During builds var_overlay is always mounted over /var. We want to do the
same at run time but we also want to ensure everything expected to be
there always does. After emerge completes gen_tmpfiles.py will scan /var
for any .keep files that were installed and records their parent
directories' permissions and ownership to /usr/lib/tmpfiles.d. On each
boot systemd will automatically recreate anything that goes missing.

This also means that going forward any ebuild that needs a directory in
/var (or anywhere else the stateful partition is bound) can simply rely
on the 'keepdir' ebuild function instead of adding things to
coreos_startup.
2013-06-06 14:18:52 -04:00
Brandon Philips
2378e0294f fix(core_update_dev_track): make the transaction the right way
the transaction was backwards meaning the update hit the db before the
upload was complete. Just swap it around.
2013-05-30 04:22:04 -07:00
Brandon Philips
37953e039b fix(core_update_developer_track): fix docs and a bug
The UUID changed for CoreOS. Make sure we use our own shiny UUID.

Add a doc note that the update should be generated from the "template
image" not from one of the vm images.
2013-05-29 21:59:03 -07:00
Brandon Philips
75fff35514 fix(mount_gpt_image): fixup mount options
mount was getting upset about the additional -o flag. Fix it up so that
ro gets appended to the other mount options.
2013-05-19 17:25:49 -07:00
Brandon Philips
a6df1edaea fix(cros_image_to_target): don't patch_kernel
CoreOS doesn't have a Kernel partition, don't try to run with
patch_kernel
2013-05-19 17:23:40 -07:00
Brandon Philips
4057d5590d feat(disk_layout): follow new CoreOS partition layout
As outlined here we need a new partition layout, this patch makes the
necessary changes:
https://groups.google.com/forum/#!topic/coreos-dev/bA7gwGGoTng

The first big change is making all of the scripts obey partition numbers
based on labels in the disk_layout.json. This makes it much easier to
change later on.

The second big change is in the layout itself. The json file was updated
to reflect the document above.

And finally the grub boot configuration needed for pv-grub and pygrub
were added to the create_legacy_bootloader_templates.sh library utlity.

Everything seems to work and boot now.
2013-05-12 12:31:03 -07:00
Brandon Philips
be7a09d64d feat(image_to_vm): setup grub/menu.lst for xen
xen requires a /boot/grub/menu.lst for pygrub and pvgrub on partition 1.
Put it on the stateful partition for now and come back around and fix
this up when we redo the partition layout.
2013-05-03 18:34:45 -07:00
Brandon Philips
edf40e1863 fix(build_library/legacy_bootloader): add menu.lst entries
these entries are needed for pvgrub, pygrub. Add them!
2013-05-03 18:17:21 -07:00
Brandon Philips
386ac79bd6 feat(build_library/container): more fixes
this sets up the container to a reasonable level. I stopped using this
container tool after I the dev server got up and running so YMMV.
2013-04-30 18:39:09 -07:00
Brandon Philips
1af100bc04 feat(core_update_developer_track): upload developer track build
a utility to make uploading the developer-track from an SDK easier.
Usage can be found by simply running the command with no arguments.
2013-04-30 18:30:32 -07:00
Brandon Philips
b274a41f11 fix(image_to_vm): cleanup qemu-kvm output
- have the command use -curses to save people hassle on ssh sessions
- forward ssh too
- clean formatting up a bit
2013-04-25 08:47:59 -07:00
Brandon Philips
6bb635d51c hack(build_container): add a script to build containers
this is a bit of a hack but I wanted to see if it had any utility during
development before making it all pretty. Essentially this is a copy of
build_image but instead of building up an entire image it simply puts
the files into directories on disk to be ran with systemd-nspawn/lxc/etc
2013-03-11 18:55:27 -07:00
Brandon Philips
7d9acd0de1 Revert "fix(dev_util): restore removed code from dev_util"
so it is a bit complicated but essentially gtest pulls in python which
pulls in pyton-updater which wants portage so portage gets installed in
teh real root not the dev one. Just leave it for now.
2013-03-07 11:32:19 -08:00
Brandon Philips
2f5399b103 fix(sdk_lib/make_chroot): make using prebuilt sdk work
fix a couple of buglets related to using a prebuilt sdk chroot
2013-03-06 17:04:40 -08:00
Brandon Philips
81e546cb0b fix(setup_board): copy /etc/make.conf.host_setup from /etc/portage
this stuff lives in etc/portage. Cp from there.
2013-03-06 14:02:43 -08:00
Brandon Philips
ffbe6a1a66 fix(image_to_vm): add correct ports for kvm instructions 2013-02-28 10:47:06 -08:00
Brandon Philips
8a60480ff2 fix(dev_util): restore removed code from dev_util
93ed764 accidently removed some code, restore it.
2013-02-27 18:50:29 -08:00
Brandon Philips
93ed76460b feat(build_library): let python into root image
python allows systemd-analyze to work and gives a full portage stack.
Just let it in.
2013-02-26 08:00:40 -08:00
Brandon Philips
95798bbf33 fix(sdk_lib/make_chroot): fix git bash completion
Move this code to after we emerge git and bashcomp. Fixes 6df18385
2013-02-24 14:53:53 -08:00
Brandon Philips
728dfdae01 fix(sdk_lib/make_chroot.sh): use efunctions functions.sh
use the efunctions package for the /etc/init.d/functions.sh script
instead of backing up the old function.sh which doesn't work with the
new baselayout
2013-02-24 14:52:21 -08:00
Brandon Philips
6df1838526 fix(sdk_lib/make_chroot): enable git-prompt
shutup the errors about git_ps1 not existing

Change-Id: Ie157e4322a770efe7536aefaf34ea7d62c472f68
2013-02-22 07:40:08 -08:00
Brandon Philips
9f544e77a2 fix(build_library): cleanup kernel cmdline
don't be quiet, talk on tty0, and remove unneeded args

Change-Id: I6d49d0b119528ecb8082d38e77066691039092cb
2013-02-20 09:32:07 -08:00
Brandon Philips
5ff06e1bfd chore(sdk_lib): chromeos -> coreos renames
Change-Id: I803a9670f87093088ec693fabd64585ee83bfb6a
2013-02-16 11:45:51 -08:00
Brandon Philips
0516fa7771 fix(sdk_lib/make_chroot): remove early git
emerging git seems to work fine, remove this early git hack

Change-Id: I1ec6a45724be292ce00d803e9161413c67804469
2013-02-16 11:44:48 -08:00
Brandon Philips
27a45c57c1 hack(sdk_lib/make_chroot.sh): save functions.sh
we remove openrc which provides /etc/init.d/functions.sh. Unfortunatly
other things rely on this file. Stash it away in /tmp/ then restore it
for now.

Change-Id: I18a59e05ecdf08cc8a560b29049c8d25ac1bf5a3
2013-02-16 11:31:14 -08:00
Brandon Philips
f40133ceac hack(build_library/base_image_util.sh): don't zero fs
the math is wrong here as a build will often fail with "disk full". Fix
this.

Change-Id: Ib812991b584816862f0c72aeec79bebf37e214ba
2013-02-16 11:29:40 -08:00