Commit Graph

1158 Commits

Author SHA1 Message Date
David Michael
5a50abc4ac check_root: silence the incorrect libperl warnings 2017-06-14 16:29:14 -07:00
Alexander Pavel
7298b0bf2a build_library: Change oem package for vagrant to oem-vagrant-virtualbox
This changes the oem-package for vagrant to vagrant-virtualbox,
which uses ignition instead of cloud-clonfig and sets the oem id
to "virtualbox" so that ignition can handle the machine correctly
2017-06-14 15:58:17 -07:00
Alexander Pavel
cab8e3ed37 build_library: Add virtualbox oem to vm_image_util
This commit adds support for the oem-virtualbox package for
virtualbox builds
2017-06-14 13:21:21 -07:00
David Michael
a707c1b597 Revert "catalyst: temporarily disable update_seed"
This reverts commit 43807d6763.
2017-06-14 13:04:09 -07:00
Benjamin Gilbert
40978865d2 Revert "A pile of goo to support a minimal secure boot demo"
This reverts commit 0c6adece3d.
2017-06-08 14:51:15 -07:00
Benjamin Gilbert
8b322c6556 test_oem_pkgs: Drop reference to oem-xendom0 2017-06-08 14:48:38 -07:00
Benjamin Gilbert
6878bd8f5f Revert "vm_image_util: add qemu_xen image type for testing"
This reverts commit fe9db4157b.
2017-06-08 14:47:23 -07:00
David Michael
a0bebcc38b build_image: copy torcx images into the vendor store
This adds the option --torcx_store to specify the path to a
directory containing torcx images to be baked into the OS image.  A
blank string can be given instead of a path to restore the previous
behavior and leave an empty vendor store.

The default value is the default path created by build_torcx_store,
which is used when build_packages updates torcx images.  This means
that the current pattern "./build_packages && ./build_image prod"
should result in a fully updated OS image with all torcx images
available in the vendor store.
2017-06-02 14:23:03 -07:00
Benjamin Gilbert
6cfb286748 grub: Update bug report URL 2017-05-25 11:38:14 -07:00
Benjamin Gilbert
5177c10191 Merge pull request #679 from bgilbert/format
image_to_vm: Default to qemu_uefi on ARM
2017-05-08 14:09:52 -07:00
Pan Luo
234ae23443
Change default value of dhcp for vmware template to no
When OVA template is not being used, the default dhcp value yes will
trigger cloud-init to generate a 00-.network file, which will break
network connectivity Intermittently. Please see the details here:
https://github.com/coreos/bugs/issues/1802#issuecomment-297847614
2017-05-04 09:30:55 -07:00
Benjamin Gilbert
c98788befc image_to_vm: Default to qemu_uefi on ARM
qemu makes no sense on that platform.
2017-05-02 15:02:09 -07:00
David Michael
d9bfa7e1ac build_image: do not use gs:// URLs in dev images
When building dev images, the PORTAGE_BINHOST value during build
time is written to the image's make.conf.  This breaks the default
binary package setup, since Jenkins is using gs:// URLs for signed
package verification and authenticated downloads, and the make.conf
doesn't inherit the GS_* variables to handle those schemes.

This should be reverted when signed packages are properly supported
by default in the dev images.
2017-04-25 11:29:44 -07:00
Benjamin Gilbert
329f4bd113 build_library: Run dd with status=none
Avoid dumping dd statistics to stderr.
2017-04-21 14:06:00 -07:00
David Michael
fdbb2d1bd6 check_root: silence the incorrect libperl warnings 2017-04-19 13:00:10 -07:00
Euan Kemp
3dec02768d Merge pull request #669 from euank/bug-url
lsb_release: update BUG_REPORT_URL
2017-04-14 12:56:12 -07:00
Euan Kemp
539723169b lsb_release: update BUG_REPORT_URL
See https://github.com/coreos/coreos-overlay/pull/2463 for the
reasoning.

This was missed in that sweep of changes.
2017-04-14 12:39:07 -07:00
Alex Crawford
287662c7e0 build_library: skip licenses for virtual packages 2017-04-12 13:54:11 -07:00
Alex Crawford
664eadff1b build_library: reformat the license file as json
This changes the format from:

    sys-apps/systemd-212-r8::coreos GPL-2 LGPL-2.1 MIT public-domain

to a JSON structure:

    [
      {
        "project": "sys-apps/systemd-212-r8::coreos",
        "license": ["GPL-2", "LGPL-2.1", "MIT", "public-domain"]
      }
    ]

We don't have to worry about the changing format because the previous
format was never published. This is designed to match the
bill-of-materials [1] format so that it can be consumed by the site.

[1]: https://github.com/coreos/license-bill-of-materials
2017-04-12 13:54:11 -07:00
Benjamin Gilbert
45dffca9b6 Merge pull request #661 from bgilbert/package-lists
build_image_util: Don't query the $BUILD_DIR vdb
2017-04-06 12:27:45 -07:00
David Michael
17e4ee2dcd release_util: allow signing uploaded packages 2017-03-30 16:53:15 -07:00
David Michael
e80eddd0c8 release_util: support signing directories 2017-03-30 16:53:10 -07:00
David Michael
6b86520bf4 release_util: store file signatures in their own directory
This allows signing files under paths owned by other users.
2017-03-30 16:52:44 -07:00
Benjamin Gilbert
d0e89d1752 build_image_util: Don't query the $BUILD_DIR vdb
Jenkins uses separate chroots for package and image builds, so
$BUILD_DIR may not have the relevant packages installed.
2017-03-30 15:43:56 -07:00
Benjamin Gilbert
d8fb403f69 build_image_util: Fix warnings when building OEM ACIs
INFO    build_oem_aci: Writing coreos_oem_gce_aci_stage_packages.txt
    awk: cmd. line:1: fatal: cannot open file `/build/amd64-usr/var/db/pkg//DEPEND' for reading (No such file or directory)
    INFO    build_oem_aci: Writing coreos_oem_gce_aci_stage_licenses.txt
    awk: cmd. line:1: fatal: cannot open file `/build/amd64-usr/var/db/pkg//DEPEND' for reading (No such file or directory)
2017-03-29 16:31:05 -07:00
David Michael
66dca6ab85 Merge pull request #657 from dm0-/perl-glsa
Update Perl to fix the last GLSA
2017-03-23 19:58:35 -07:00
Benjamin Gilbert
d234da9ffc Merge pull request #651 from bgilbert/firstboot-file
Set coreos.first_boot based on existence of file in ESP
2017-03-23 18:29:41 -07:00
David Michael
43807d6763 catalyst: temporarily disable update_seed
This can be reverted once there is a version of the SDK containing
the updated Perl 5.22 packages.
2017-03-21 21:12:40 -07:00
Alex Crawford
e304fb9557 Merge pull request #655 from glevand/for-merge-os-release
os-release: Add COREOS_BOARD variable
2017-03-15 17:30:24 -07:00
Alex Crawford
b924c5ce6c build_library: upload image licenses
We've always generated these license manifests (detailing which ebuilds
are covered by which license), but never published them. This adds these
manifests to the list of published files so that they are publicly
available.
2017-03-15 14:11:01 -07:00
Geoff Levand
3b8c558367 os-release: Add COREOS_BOARD variable
os-release is requested in bug reports, and knowing which board
the problem occurred on is often helpful.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2017-03-14 09:45:24 -07:00
Euan Kemp
b8589683b8 build_docker_aci: include 'extra' version number
This allows for multiple iterations with the same package version if
needed.
2017-03-06 16:07:26 -08:00
Benjamin Gilbert
9e1c23f3f4 grub: Set coreos.first_boot based on existence of file in ESP
Detect first boot based on the existence of a coreos/first_boot file
in the EFI partition, and set "coreos.first_boot=detected" command line
argument when found. We use "detected" rather than "1" so the initramfs
knows that it should mount the ESP and delete the file. This lets us
defer clearing the first-boot flag until Ignition has run successfully,
without having to change the disk GUID after filesystems are mounted.

Continue detecting the first-boot disk GUID and adding the command-line
argument to randomize it, since we still want unique disk GUIDs
regardless of Ignition.
2017-03-01 16:10:21 -08:00
Benjamin Gilbert
0b010279e0 build_image: Create /boot/coreos/first_boot 2017-03-01 15:54:05 -08:00
Euan Kemp
1186d2875a Initial checkin of docker-aci build script 2017-03-01 14:59:43 -08:00
Euan Kemp
20325a547f build_image_util: allow unchecked emerges too
This is useful for emerges that are meant for incomplete rootfs's, such
as ACI building emerges. There are cases where the #! check is expected
to fail while doing those.
2017-03-01 10:52:17 -08:00
Euan Kemp
18076b8bdb Merge pull request #642 from euank/symlink-checker
check_root: add check for broken symlinks
2017-02-17 16:18:45 -08:00
Euan Kemp
3eea9d2701 check_root: fix lint warnings
Per `flake8-3`'s recommendations
2017-02-17 16:00:33 -08:00
Euan Kemp
2596099207 check_root: add check for broken symlinks 2017-02-17 15:51:31 -08:00
David Michael
3d68362d02 toolchain: always run gcc-config 2017-02-16 17:54:06 -08:00
Benjamin Gilbert
7bab03e772 Merge pull request #638 from bgilbert/reinject
Add script to inject kernel/GRUB/shim
2017-02-02 17:39:08 -08:00
Benjamin Gilbert
5541e1521e Merge pull request #639 from bgilbert/other-boards
build_image: Correctly disable verity on unsupported boards
2017-02-02 17:18:22 -08:00
Benjamin Gilbert
b11d3a7c1d build_image: Correctly disable verity on unsupported boards
Fixes up missing bit from e630a36e50.
2017-02-02 17:08:01 -08:00
Benjamin Gilbert
e65d5101cf build_image: Extract and upload GRUB/shim EFI images for signing
On arm64, extract only GRUB, since there is no shim.  On dev builds,
extract neither.
2017-02-02 17:00:15 -08:00
Benjamin Gilbert
f16226acb5 grub_install: Install shim in official amd64 builds 2017-02-02 16:58:52 -08:00
Benjamin Gilbert
5443a101f7 build_image: Move one message to logging framework 2017-02-02 16:51:58 -08:00
David Michael
e630a36e50 Revert "build_image: Remove disable_read_write variable"
This reverts commit a7ffba9a9f.

The build_image script can build multiple formats.  When our
releases and automated builds are creating developer containers and
production images from the same command, the verity flag would be
disabled while building the container and remain disabled when building
the production image.  This resulted in no verity in all our builds.
2017-02-02 15:08:43 -08:00
Benjamin Gilbert
8751c85494 image_set_group: Move generic setup/teardown code into a library 2017-02-02 12:51:35 -08:00
Benjamin Gilbert
dcc3367164 Merge pull request #635 from bgilbert/vmware-bin
image_to_vm: Add vmware_raw image type
2017-02-01 15:46:36 -08:00
Alex Crawford
fd402748be Merge pull request #634 from jeanfabrice/jeanfabrice/guestinfo
Set ovf transport mode so guestinfo gets available to coreos-cloudinit
2017-02-01 15:46:23 -08:00
Michael Marineau
74edf63449 Merge pull request #611 from glevand/for-merge-arm64-verity
scripts: Add arm64 verity support
2017-01-30 11:07:21 -08:00
Benjamin Gilbert
b363484c3b image_to_vm: Add vmware_raw image type
Allow "coreos-install -o vmware_raw" to install Container Linux with
the vmware OEM.

Use base DISK_LAYOUT to reduce the minimum disk size.

Fixes coreos/bugs#359.
2017-01-19 14:34:53 -08:00
Benjamin Gilbert
60ef04a6a0 Merge pull request #633 from bgilbert/ignition-version
build_image: Include {ignition,bootengine} in {packages,licenses}.txt
2017-01-19 10:58:01 -08:00
jeanfabrice
fe7c43a794 Set ovf transport mode so guestinfo gets available to coreos-cloudinit 2017-01-19 19:34:28 +01:00
Benjamin Gilbert
e878dc51ea build_image: Include {ignition,bootengine} in {packages,licenses}.txt
They're not in the root fs, but they are in the initramfs.  Handle this
by augmenting the package list with packages that are both

- build dependencies of coreos-kernel, and
- configured to cause rebuilds of coreos-kernel when their sub-slot
  changes.
2017-01-18 16:37:37 -08:00
David Michael
08ed31d70d disk_util: differentiate between partition and FS labels 2017-01-18 16:21:19 -08:00
David Michael
eef53ab5b6 check_root: ignore scripts in documentation 2017-01-17 13:47:04 -08:00
Alex Crawford
4cb4904654 set_lsb_release: properly quote lsb-release 2017-01-06 10:23:00 -08:00
David Michael
80c1671a5e Merge pull request #619 from dm0-/bugs-1139
check_root: make #!/usr/bin/env a special case
2017-01-04 19:19:43 -08:00
David Michael
98718496a4 check_root: make #!/usr/bin/env a special case 2017-01-04 17:30:05 -08:00
Alex Crawford
ab60f519ec set_lsb_release: update name and color 2016-12-29 12:33:02 -08:00
Geoff Levand
2839b73177 build_image: Add arm64 rootfs verification
Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-12-13 13:46:05 -08:00
Geoff Levand
4ca0c5bc19 build_image: Cleanup enable_rootfs_verification
To clean things up and prepare for arrm64 support move
all the enable_rootfs_verification processing into one
location and add some comments.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-12-13 13:46:05 -08:00
Geoff Levand
0ef44633ef build_image: Remove enable_verity flag
To make verity work both enable_rootfs_verification and enable_verity
need to be set.  Without one verity just gets half enabled.  Remove
the enable_verity flag and do the full verity setup when
enable_rootfs_verification is set.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-12-13 13:46:05 -08:00
Geoff Levand
a7ffba9a9f build_image: Remove disable_read_write variable
The disable_read_write variable was just a copy of FLAGS_enable_rootfs_verification,
so to make things less confusing just use FLAGS_enable_rootfs_verification.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-12-13 13:46:05 -08:00
Alex Crawford
44a9f03df1 set_lsb_release: update codename 2016-12-12 13:57:44 -08:00
Geoff Levand
acd0566352 grub.cfg: Enable arm64 ACPI
Add a new grub variable extra_options, the contents of which is
added to the linux command line.  Use extra_options to set
the ACPI options needed for arm64.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-12-01 10:09:51 -08:00
Alex Crawford
f5345de53e Merge pull request #612 from crawford/ignition
build_library: support ignition in qemu template
2016-11-30 14:42:53 -08:00
Nick Owens
2b46ddc20c build_library: pass force_size when converting disks to vpc
this stops qemu-img info from choking on vpc-type images made with our
patched qemu.
2016-11-28 17:17:20 -08:00
Alex Crawford
c93416caf2 build_library: support ignition in qemu template 2016-11-22 19:17:42 -08:00
David Michael
2dfab3fd79 build_library: remove extract_docs()
Since coreos-doc was removed from coreos-overlay, there are no more
files in /usr/share/coreos/doc, causing this function to fail.
2016-11-09 11:44:11 -08:00
Michael Marineau
6b2267bc93 build_library: set parallels build scripts as executable 2016-10-27 13:27:30 -07:00
Bassam Tabbara
b0bf230433 add support for Parallels Desktop VM images
Two new image types have been added:

1. parallels - this produces VM images with extension pvm.tgz that can be loaded directly into Parallels Desktop
2. vagrant_parallels - this produces a Vagrant box that works with parallels vagrant provider (http://parallels.github.io/vagrant-parallels/)

Just like vmdk and others we rely on qemu-img to convert raw images. Support for Parallels disk images was added to qemu-img in version 2.4.

I also removed the box files from the actual image since there are not needed in /usr/share/oem.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2016-10-26 09:25:45 +02:00
David Michael
5b640e79fd image_to_vm: build and install a GCE agent ACI 2016-10-18 11:37:45 -07:00
David Michael
e715a9ca3c image_to_vm: support generating and installing an OEM agent ACI
The ACI root is created by reusing the create_prod_image function
to install a base meta-package.  It then runs a script to customize
the file structure as required by agent software (if necessary),
writes a manifest file from a supplied template, and then packages
it all into a tar file.
2016-10-18 11:37:33 -07:00
Michael Marineau
4ed9a1a2a5 build_image: disable verity again
The Xen loader in GRUB never received support for our hacky scheme of
adding the verity hash to the kernel cmdline. Disable till that's fixed.

Partially reverts 2016567 and 533b1b9.
2016-10-10 14:08:05 -07:00
Michael Marineau
257121f734 Merge pull request #591 from marineam/utf-8
build_image: generate C.UTF-8 locale
2016-10-10 12:39:18 -07:00
Michael Marineau
533b1b9b02 build_image: always enable verity when /usr is read-only
Consolidates two very similar flags into one and fix an issue where
verity could get enabled in the GRUB config when rootfs verification was
turned off (e.g. on arm64 which cannot use verity yet).
2016-09-30 15:35:10 -07:00
Michael Marineau
9ed9ff7b45 build_image: generate C.UTF-8 locale 2016-09-30 15:24:32 -07:00
Michael Marineau
2016567d6f build_image: enable verity by default 2016-09-28 17:06:30 -07:00
Michael Marineau
ed3c8637f6 build_image: dev images/containers no longer have pcr data
Broken by 1092afd which missed that dev images and containers were also
uploading pcr data despite it not really being applicable to those.
2016-09-21 21:18:15 -07:00
Michael Marineau
1092afd240 build_image: clean up PCR policy generation
Pass as an argument to finish_image like most other things.
2016-09-19 12:09:47 -07:00
Michael Marineau
300722d7cb build_image: include kernel in --generate_update payloads 2016-09-19 11:41:41 -07:00
Michael Marineau
14eb89a5dc build_image: publish kernel along with base image for generating updates 2016-09-19 11:41:30 -07:00
Alex Crawford
9da4c52f8e grub: rename oem_id variable
It's confusing to overload the oem_id variable with both the OEM ID and
the full kernel parameter.
2016-09-14 15:36:55 -07:00
Bassam Tabbara
cbb4256a80 catalyst: workaround for bootstrap_sdk on Ubuntu
workaround for bootstrap_sdk on an Ubuntu host where /dev/shm is a
symlink to /run/shm. Since we mount the hosts /dev (for losetup) this
interferes with building python 2.7. The workaround is to disable the
/dev/shm during python builds. A longer term fix would be to not mount
the hosts /dev. Thanks for marineam for suggesting the fix on IRC.
2016-08-23 16:40:41 -07:00
Michael Marineau
7012375023 grub: abort boot if gptprio fails
If the gptprio.next command fails to give us something to boot we
shouldn't try! In order to diagnose why the failure happened halt
immediately so the user can see the error message.
2016-07-20 17:54:37 -07:00
Nick Owens
ff124fce3d build_library: add linux module to grub for arm64 2016-07-06 17:14:02 -07:00
Nick Owens
14e90df8d5 build_library: add tftp module to grub 2016-07-06 17:13:28 -07:00
Michael Marineau
c7818adf2f Merge pull request #561 from marineam/status
*: Fix PIPESTATUS checks for bash 4.3
2016-06-22 13:57:00 -07:00
Michael Marineau
7ccb981797 prod_image_util: move pam.d contents, not the directory
The baselayout package now creates and installs /usr/lib/pam.d, causing
mv to fail. Move the contents instead which is happy with both versions.
2016-06-13 14:49:41 -07:00
Michael Marineau
e3a24c3867 set_lsb_release: use an alternate app id for arm64
update_engine and CoreUpdate aren't quite ready, use an alternate id so
we can continue testing but not mistakenly serve amd64 updates to arm64.
2016-06-01 15:12:50 -07:00
Michael Marineau
8eceddd54f Revert "*: drop obsolete gentoo repo reference" 2016-05-24 14:20:43 -07:00
Michael Marineau
c535cd3bbb glsa-check: simplify and respect current root being tested 2016-05-19 10:22:31 -07:00
Matthew Garrett
9a3c5a9d2e Merge pull request #547 from mjg59/glsa
Verify GLSA status when building packages
2016-05-17 16:49:36 -07:00
Matthew Garrett
922554303b check_root: Verify that we don't have any applicable GLSA
Once we've built the packages, verify against the Gentoo Linux Security
Advisories to ensure that we're not shipping anything with known
vulnerabilities.
2016-05-17 16:39:40 -07:00
Nick Owens
d935a8aca0 build_library: make arm64 grub file name match x86_64 2016-05-12 13:09:46 -07:00
Nick Owens
1fd668ef0d build_library: fix grub loader copy for arm64 2016-05-12 12:05:11 -07:00
Michael Marineau
8bfd994f3f Merge pull request #534 from glevand/for-merge-build
build_image: Fix image type conditional
2016-05-10 12:20:07 -07:00
Michael Marineau
9a468bf37d vm_image_util: ensure UEFI firmware is installed before reading it 2016-05-10 12:02:56 -07:00
Michael Marineau
4d97d2752d grub_install: use GRUB installed to the board root instead of SDK
Follow up to https://github.com/coreos/coreos-overlay/pull/1950
2016-05-10 12:02:56 -07:00
Michael Marineau
d5cb907947 grub_install: drop old/unused esp_dir flag 2016-05-10 10:56:21 -07:00
Michael Marineau
632d578b56 *: drop obsolete gentoo repo reference
Instead of patching portage to support the `disabled` flag now we just
patch it to leave the `[gentoo]` section out of the default repos.conf.

Follow up to 585275b268
2016-05-08 19:31:02 -07:00
Michael Marineau
20541226bf prod_image_util: do not check update keys on arm64
arm64-usr doesn't have update_engine yet so this isn't valid.
2016-05-05 17:33:11 -07:00
Geoff Levand
c053521e37 build_image: Fix image type conditional
PROD_IMAGE is a flag that indicates a production image should be
built, and will be set for dev builds if the user specifies that
both dev and prod images should be built.  build_image was
incorrectly using the PROD_IMAGE variable to conditionaly do some
setup depending on the image type.

Add a new variable IMAGE_BUILD_TYPE that can be tested for the type
of image currently being built and replace the PROD_IMAGE usage.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-05-03 14:06:14 -07:00
Michael Marineau
582361b30c catalyst: allow GENTOO_MIRRORS to be passed in through the environment 2016-05-02 20:12:27 -07:00
Nick Owens
bbf737f9e6 Merge pull request #525 from mischief/grub-copy
build_library: copy grub.efi in pxe/cpio generation
2016-05-02 12:11:52 -07:00
Nick Owens
8c76ea6ea4 build_library: core_promote is gone, do not copy it 2016-04-28 16:46:22 -07:00
Nick Owens
a03cef558e build_library: copy grub.efi in pxe/cpio generation 2016-04-27 15:54:59 -07:00
Matthew Garrett
253590ab99 Merge pull request #526 from mjg59/increase_devsize
Increase the size of /usr on devel images
2016-04-27 13:53:48 -07:00
Matthew Garrett
9ae9ce8332 Increase the size of /usr on devel images
devel images contain significantly more code and we're overflowing the
filesystem. Increase this, but only for devel images.
2016-04-27 13:40:36 -07:00
Nick Owens
e0524264b9 build_library: generate pflash files for qemu_uefi from edk2-armvirt 2016-04-21 10:45:15 -07:00
Nick Owens
4ec33c5495 Merge pull request #519 from mischief/lib-path
build_library: use lib for tmpfiles rather than lib64
2016-04-14 15:47:44 -07:00
Nick Owens
12a9d94922 build_library: enable extra modules for arm64-efi 2016-04-14 14:46:01 -07:00
Nick Owens
704a480379 build_library: use lib for tmpfiles rather than lib64
in arm64-usr, lib is not yet a symlink to arm64, so trying to access
tmpfiles.d in lib64 will not work.
2016-04-14 13:26:02 -07:00
Matthew Garrett
0bd89d3381 Move PAM configuration to /usr at build time
A bunch of packages install PAM configuration fragments in /etc. Rather than
modify them all to install into /usr/lib, just move the entire directory at
image build time.
2016-04-11 11:34:57 -07:00
Matthew Garrett
56aa7e5a17 Add support for generating PCR configuration at image build time
We need to ship some PCR measurements alongside images in order to make it
easier for admins to provide an appropriate policy. Add some tooling to
generate the appropriate hashes during build, pack those into a zip file
and upload it.
2016-04-04 14:47:06 -07:00
Alex Crawford
c75583f2b8 Merge pull request #512 from crawford/name
set_lsb_release: a new name
2016-03-26 20:45:51 -07:00
Alex Crawford
d4103b08a6 set_lsb_release: a new name 2016-03-25 19:39:05 -07:00
Michael Marineau
9c529bb6fc check_root: add test for missing interpreters 2016-03-16 11:43:20 -07:00
Yann Hodique
2828c365da ovf: define variables accepted by coreos-cloudinit
OVF environment variables for VMware deployments, including cloud config
and network configuration
2016-03-05 15:15:45 -08:00
Michael Marineau
10fa4b5a0c prod_image_util: move profile.env to /usr
profile is already set up to source /usr/share/baselayout/profile.env
but it never has because I forgot to add this line during the migration
to amd64-usr images. Sure took us a while to notice that one... :(
2016-02-29 18:54:12 -08:00
Michael Marineau
66ea5974ce image_to_vm: add --getbinpkg option
Now image_to_vm can be used without first running build_packages.
2016-02-23 13:06:49 -08:00
Michael Marineau
744faa2df4 vm_image_util: oems are always from ebuild, others always from binary
This resolves two issues:
 - Large dependencies are *never* built during image_to_vm,
   build_packages must now handle that.
 - Since build_packages can't resonably do the oem-* packages (they all
   conflict with eachother) we do want to build them from the ebuild.
   This is now enforced so a old binpkg is never used. This resolves
   confusing issues people have always had while when editing oem
   ebuilds but getting a stale build instead.
2016-02-23 12:50:52 -08:00
Michael Marineau
65864a3a2d build_library: add a little script for checking oem packages 2016-02-23 12:23:40 -08:00
Michael Marineau
743d4bce37 build_image: Add support for --getbinpkg
Allows build_image to be used without first running build_packages.

Note: setup_board --force is required before build_packages will work
properly after doing this since baselayout won't be installed otherwise.
2016-02-20 14:26:50 -08:00
Michael Marineau
bc5de30442 board_options: new portageq wrappers
- May be sourced early, so explicitly die if source fails.
 - Add a function for getting the latest version of a package.
 - Read PROVIDES metadata using portageq, enabling data to be read from
   binary packages in addition to installed packages. The performance
   issue is not an issue here and needed to support empty build roots.
2016-02-20 14:17:45 -08:00
Michael Marineau
707c6c6f12 vm_image_util: add a small openstack image for wedging into tiny places
Most vm images have an expanded root partiton to make them practical to
use as-is. Some deployments may not want such a large root, putting most
storage on other volumes.
2016-02-16 11:22:59 -08:00
Michael Marineau
06d5ac79b1 set_lsb_release: a little cleanup, a new name
❤️
2016-02-15 14:17:37 -08:00
Michael Marineau
5ba4c7181d *: drop usage of COREOS_VERSION_STRING
This variable was semi-deprecated ages ago so `version.txt` could follow
a similar variable naming pattern to `os-release`. Finally drop usage of
it here in favor of `$COREOS_VERSION`.
2016-02-15 13:55:55 -08:00
Michael Marineau
9332cb697e release_util: use BOTO_PATH instead of searching for .boto
This simplifies the code a little and allows BOTO_PATH or BOTO_CONFIG to
be set in the environment. Now configs may be in arbitrary locations.
2016-01-28 13:10:01 -08:00
Michael Marineau
95d0bdaf72 *: Fix PIPESTATUS checks for bash 4.3
The one-liner `[[ -z ${PIPESTATUS[*]#0} ]]` no longer works because the
expansion still includes spaces even if all the values are zero. Somehow
that didn't matter in bash 4.2 but it does mater in 4.3 to be consistent
with the general behavior of variables in [[ tests.
2016-01-25 18:25:53 -08:00
Matthew Garrett
5fa4196501 Verify netboot config fragments if there's an available gpg key
If there's a gpg public key available in a system firmware variable, trust
it and use it to verify netboot configuration fragments.
2016-01-11 11:54:04 -08:00
Matthew Garrett
b6792a5609 Fix platform testing for suffix configuration
Grub doesn't seem happy with && tests in if statements, so replace it with
a two stage check.
2016-01-08 14:45:50 -08:00
Matthew Garrett
1f7c749b2d Add UEFI netboot support
If grub's been netbooted, pull the uuid and serial number out of smbios and
hit the API server to get the appropriate configuration.
2016-01-08 14:45:45 -08:00
Vito Caputo
0b9c8e5855 grub: disable console blanking
The console often contains very useful information in the event of a
hard crash, in such situations there's no ability to unblank the console
via keypress because the kernel won't handle the interrupt.

Since CoreOS is a server/cluster operating system, there won't generally
be monitors connected benefitting from a blanked console.  Disabling the
blanking altogether allows the frame buffer contents to always be
visible, even when the kernel can't handle keypresses.
2015-11-11 15:22:12 -08:00
Michael Marineau
b0c14f99b1 kernel_menuconfig: new script to simplify kernel config changes 2015-11-10 18:06:49 -08:00
Vito Caputo
f67fa9ce6c grub: supply disk guid to randomize in coreos.randomize_disk_guid 2015-11-06 14:58:00 -08:00
Vito Caputo
68f1b407c6 grub: add and set coreos.randomize_disk_guid kernel param
coreos.first_boot=1 will no longer trigger disk-guid randomization, so
manual ignition triggers in diskless/pxe scenarios may succeed.  Instead
we explicitly request the randomization when first_boot=1 was added by
grub finding the 00000000-0000-0000-0000-000000000001 disk-guid.
2015-11-05 21:04:31 -08:00
Alex Crawford
f7bcd4f547 grub: add oem_id variable to kernel parameters 2015-10-21 16:47:58 -07:00
Michael Marineau
01ae17dcc9 grub: move standard kernel options to grub
In order to boot properly we need `rootflags=rw mount.usrflags=ro` on
the command line. These have been build into the kernel directly but for
arm64 builds the built in options seem to be ignored.
2015-09-21 15:31:41 -07:00
Andrej Rosano
8ba400eca7 Add arm64 qemu image support
Allows image_to_vm.sh to build also arm64 qemu images.

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
2015-09-17 14:16:18 +02:00
Andrej Rosano
16feac5ef6 Add arm64 grub installation support
Add the necessary variables in grub.cfg and populate the EFI
partition with arm64 efi executable and modules.

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
2015-09-16 15:13:08 +02:00
Alex Crawford
32277dd006 build_library: fix comment 2015-09-08 16:15:50 -07:00
Michael Marineau
0ef030051c catalyst: re-enable ccache
Now that ccache is turned on by default in the profile portage complains
a lot if ccache isn't actually installed, sleeping 5 seconds for each
error message. Since pkgcache is in use ccache isn't going to make that
much of a difference but getting rid of those 5 second sleeps will. :)
2015-09-06 21:26:15 +00:00
Dong Xie
c04e2cb227 init commit of interoute oem build 2015-09-05 00:32:50 +01:00
Alex Crawford
9fb9442576 grub: add coreos.first_boot kernel param 2015-09-01 14:35:43 -07:00
Alex Crawford
b475cb2ea3 grub: run Ignition on first boot 2015-08-31 23:02:25 -07:00
Matthew Garrett
673f166013 Ensure that selinux policy is installed in correct location
Failing to explicitly set the selinux policy store to operate on may
result in semodule installing the policy in an incorrect location. Pass
it on the command line in order to avoid this.
2015-08-24 16:27:18 -07:00
Geoff Levand
3f3b2f2e8c build_image: Run ldconfig in qemu
ldconfig does not work for non-native arches.  Create a new
build_image routine run_ldconfig that uses qemu user emulation
to run the board ldconfig on the board rootfs when the board and
SDK arches are different.

See: http://code.google.com/p/chromium/issues/detail?id=378377

Prior to calling run_ldconfig the board rootfs must have ldconfig
installed.  To arrange this move the call of run_ldconfig to after
the base package install.

Fixes build_image errors like these when building for arm64:

  /sbin/ldconfig: /lib64/libXXX is for unknown machine 183.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2015-08-05 14:47:58 -07:00
Michael Marineau
cf26510ea7 check_root: update ignore list for arm64, make error non-fatal 2015-07-29 19:22:55 -07:00
Michael Marineau
0fbb1891e0 Merge pull request #435 from marineam/check
Improved/faster package checks
2015-07-22 20:46:50 -07:00
Michael Marineau
806d9ca313 grub_install: stash an exact copy of the MBR boot code.
Useful for repairing the MBR without needing GRUB's tools.
2015-07-16 18:06:35 -07:00
Michael Marineau
d27bc5aeb3 Revert "build_library: set osType to otherlinux-64"
This reverts commit 39bb800f16.

This change disabled a number of features so it isn't suitable for the
generic VMware templates. We need to re-trace our steps to list exactly
what tools/systems weren't accepting the linux26 type.
2015-07-16 12:34:33 -07:00
Alex Crawford
0b0aa88be3 Merge pull request #427 from crawford/disk_util
disk_util: use the dummy disk UUID
2015-07-15 00:03:12 -07:00
Michael Marineau
5985b1e3d6 build_library: replace package checking script
The new python script check_root uses data that portage already
maintains on what shared libraries packages need or provide instead of
re-scanning whatever ELF files that can be found. This is much more
comprehensive but there is a bit of a transition issue for folks with
long-lived SDKs: packages built with portage older than 2.2.18 do not
include this data. As such for now the check is non-fatal and provides a
command you can use to refresh locally installed packages.

The code checking for conflicts between top level directories and /usr
has also been rewritten. Both tests now are considerably faster.
2015-07-12 15:50:58 -07:00
Alex Crawford
93e5faebd1 Merge pull request #423 from stresler/patch-1
Adding packet to the list of img and oem types.
2015-07-10 08:39:45 -07:00
Michael Marineau
fcd55e0171 generate_au_zip: improve error reporting of missing files 2015-07-02 13:51:39 -07:00
Michael Marineau
9db6ac5ef7 build_image: make building selinux policy optional 2015-07-01 23:11:09 -07:00
George Tankersley
283452e883 verity: add verity plumbing and hash injection to build scripts 2015-07-01 17:34:11 -07:00
George Tankersley
aa879ddcce grub_install: add support for verity and non-verity grub.cfg 2015-07-01 17:32:37 -07:00
mjg59
28da405b75 Merge pull request #425 from mjg59/master
Build selinux policy
2015-07-01 11:37:11 -07:00
Alex Crawford
7232e74bcc disk_util: use the dummy disk UUID
This dummy UUID (00000000-0000-0000-0000-000000000001) is used to
signify to Ignition that the disk is uninitialized.
2015-06-30 20:04:41 -07:00
Alex Crawford
cf4b282482 disk_util: convert some tabs to spaces 2015-06-30 19:58:10 -07:00
Matthew Garrett
14163c3c0a Build selinux policy
Create an selinux policy at image build time - despite the -i flag, this
won't attempt to install it into the running kernel.
2015-06-30 14:46:51 -07:00
Sam Tresler
01176c2d96 adding packet to the available OEMs 2015-06-29 16:52:36 -04:00
Michael Marineau
5789c6bbbf bootstrap_sdk: add support for directly GPG signing SDK tarballs
SDK tarballs have a .DIGESTS file but it is created by catalyst instead
of the upload_image function. In order to support plain GPG signing but
not avoid re-generating .DIGESTS we need to move that code out of
upload_image to a new function. upload_files shouldn't do it itself
because it is also used for portage binary packages which shouldn't be
signed (there is no point, nothing would verify the signatures).
2015-06-28 17:02:23 -07:00
George Tankersley
abb99b560d Merge pull request #412 from gtank/verity
disk_util: dm-verity hash output
2015-06-12 16:14:39 -07:00
George Tankersley
93f033c59e verity: add support for root hash output to disk_util 2015-06-11 18:37:51 -07:00
Alex Crawford
8cd6d7f8da image_to_vm: fix OVF filename 2015-06-09 18:56:49 -07:00
Alex Crawford
ebb1ad586f build_library: add support for VMware OVF
This moves the functionality of mkova.sh (within the SDK) directly into
the build library.
2015-06-01 16:45:42 -07:00
Alex Crawford
39bb800f16 build_library: set osType to otherlinux-64 2015-05-26 18:35:27 -07:00
Matthew Garrett
9fe7952578 Don't read OEM config data if Secure Boot is enabled
We don't want untrusted configuration to be read if we're in Secure Boot
mode, so skip the OEM config when Secure Boot is enabled and in User Mode.
2015-05-11 15:39:03 -07:00
Michael Marineau
fed42e2d12 Merge pull request #382 from Cygnus-Labs/adding-base-dev-pkg-flag
Enhanced dev_image_util with equivalent to --base_pkg
2015-04-30 17:00:16 -07:00
mjg59
0ce635c1d1 Merge pull request #397 from mjg59/master
Add support for signed kernels
2015-04-23 16:10:25 -07:00
Matthew Garrett
9579f4d68a Update grub configuration to handle ESP kernels, build it into grub
The grub configuration needs some updates to handle dealing with booting
the kernel from the ESP rather than from inside the image. We also want to
be able to avoid dealing with signing the config file, so build it into the
binary. Finally, rather than having to cope with signing grub modules, build
the ones we need to boot into the grub image.
2015-04-22 11:37:15 -07:00
Michael Marineau
12c53080a4 vm_image_util: add support for VMDK images for EC2 AMIs
Lets us avoid larger data transfers when importing images.
2015-04-21 16:27:37 -07:00
Matthew Garrett
07e5220f60 Add the kernels to the ESP
Once we're signing the root filesystem, we're not going to be able to boot
the kernel from there. Copy the kernel out to the EFI System Partition and
sign it.
2015-04-16 15:55:02 -07:00
Matthew Garrett
4b8a64b70c Build shim into the image
grub requires that shim be available in order to call out to verify the
kernel. Sign it and stick it in the image alongside grub.
2015-04-15 11:24:17 -07:00
Matthew Garrett
707803ed43 Add support for Secure Boot images and sign unofficial builds with test keys
Add qemu_uefi_secure target for building Secure Boot images. These are
identical to qemu_uefi images with the exception that the test keys have
been installed into the flash image, enabling Secure Boot by default. In
addition, sign the grub binary with the test keys during build when
producing unofficial images.
2015-04-15 11:11:24 -07:00
Michael Marineau
dc88c752e9 Merge pull request #392 from glevand/for-merge
Add basic support for arm64
2015-04-08 13:42:29 -07:00
Geoff Levand
ec53361620 toolchain_util: Add arm64-usr support
Adds CROSS_PROFILES, BOARD_CHOSTS, and BOARD_PROFILES definitions to support a
generic arm64-usr board.

get_portage_arch() is updated to convert aarch64 correctly.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2015-04-08 13:30:38 -07:00
Michael Marineau
6e6a0a4967 toolchain_util: include repos.conf in bootstrap build environments
This is required for the eventual removal of `$PORTDIR` and
`$PORTDIR_OVERLAY` and ensures toolchain rebuilds/updates with
`./build_packages --nousepkg` don't erroniously try to use ebuilds from
`/usr/portage` inside of the SDK.

In order to fix up the build_toolchains script the crossdev overlay
needs to be setup properly, previously only setup_board did it.

Overall silences a lot of warnings and fixes an issue with crossdev:

    /usr/bin/emerge-wrapper: line 48: /eclass/toolchain-funcs.eclass: No such file or directory
    /usr/bin/emerge-wrapper: line 49: tc-arch: command not found
2015-04-01 16:30:37 -07:00
Geoff Levand
ea6cf50b8d toolchain_util.sh: Fix _configure_sysroot CBUILD
The portage CBUILD and HOSTCC variables need to be set to the SDK host to get
a proper cross build when building target binaries.

Change _configure_sysroot to use the CBUILD environment variable to set the
CBUILD and HOSTCC variables of ${ROOT}/etc/portage/make.conf.  Also, fix up all
calls to _configure_sysroot to set the CBUILD environment variable.

Fixes setup_board failure when the host and target architectures differ.

Signed-off-by: Geoff Levand <geoff@infradead.org>

[marineam: fixed a copy/paste error]
2015-04-01 15:54:43 -07:00
Michael Marineau
798d9087fb Merge pull request #386 from marineam/fsck
disk_util: include fsck output during resize operation
2015-03-25 14:31:29 -07:00
Michael Marineau
07fc135a12 disk_util: include fsck output during resize operation
Previously fsck output was suppressed to reduce the amount of noise in
build logs on the assumption that fsck really shouldn't have a reason to
fail. The filesystem is freshly created after all. However some users
have reported that fsck is failing but without error messages we don't
know why.
2015-03-25 14:16:15 -07:00
Michael Marineau
3b8cf7d1fb build_image_util: generate package license list for each image
There isn't a sane way for users to know the licenses of individual
packages in CoreOS images in built images. The information is hidden
away back in the original ebuilds. This extends our existing package
list with a new file that also includes licenses:

```
app-admin/flannel-0.3.0-r3::coreos Apache-2.0
app-admin/fleet-0.9.1::coreos Apache-2.0
app-admin/locksmith-0.2.3::coreos Apache-2.0
app-admin/sdnotify-proxy-0.1.0::coreos Apache-2.0
app-admin/sudo-1.8.10_p2::portage-stable ISC BSD
app-admin/toolbox-0.0.0-r4::coreos Apache-2.0
app-arch/bzip2-1.0.6-r6::portage-stable BZIP2
app-arch/gzip-1.5::portage-stable GPL-3
app-arch/tar-1.27.1-r2::portage-stable GPL-3+
...
```
2015-03-24 18:10:45 -07:00
mischief
7d2ee0e33c vm_image_util.sh: use correct group name in production images with no writeable /etc 2015-03-02 17:13:24 -08:00
techdragon
79ce0a3304 Enhanced dev_image_util with equivalent to --base_pkg
- "./build_image prod" already has the ability to specify which package will specify all the packages that should be pulled in and built into an image by specifying a package name using the --base_pkg command line flag. This creates an equivalent option for "./build_image dev" creating a --base_dev_pkg flag that passes a package name into the create_dev_img() function in dev_image_util.sh the same way that --base_pkg is passed into create_prod_image() inside prod_image_util.sh.
2015-03-02 13:21:56 +08:00
Alex Crawford
6013d8acc0 vm_image_util: add cloudsigma 2015-02-13 23:50:05 -08:00
Michael Marineau
d09aeb368c disk_util: allocate the maximum number of usable inodes
This change changes the default 'bytes-per-inode' ration from 16K to 4K,
the block size. To prevent this from wasting too much space change the
inode size from the default 256 to the minimum size, 128. Larger inodes
are used to store extended attributes more efficiently but since we do
not use SELinux the majority of files do not have security attributes.

These defaults may be modified via the new `bytes_per_inode` and
`inode_size` options.
2015-02-11 17:12:18 -08:00
Michael Marineau
d0da252d49 toolchain_util: fix parsing emerge --pretend output
Fix parsing the following output:

    [ebuild  N    ] dev-libs/gmp-5.1.3-r1 to /usr/x86_64-cros-linux-gnu/
    [ebuild     UD] sys-libs/timezone-data-2013d [2014i-r1] to /usr/x86_64-cros-linux-gnu/

The previous regex did not account for upgrades and got confused by the
`[2014i-r1]` listing and goobbled up too much of the string. I am not
sure *why* portage is reporting an upgrade when --emptytree is also used
but there it is. Match all not-] characters instead.
2015-01-28 16:37:52 -08:00
Alex Crawford
db1f826632 build_library: add extract_docs() 2015-01-16 13:12:21 -08:00
Michael Marineau
645181d044 Merge pull request #372 from marineam/ext4
disk_layout: switch to ext4 as the default root filesystem.
2015-01-12 14:12:46 -08:00
Michael Marineau
5c7a101bfe catalyst: disable ccache and autoresume
Disable ccache as it is causing issues in other builds so disable it
everywhere to be safe. Disable the autoresume feature because our build
process doesn't actually make use of it.
2015-01-08 16:17:26 -08:00
Michael Marineau
6b23aabcda disk_layout: switch to ext4 as the default root filesystem.
A brief summary: https://lwn.net/Articles/627232/ ;-)
2015-01-08 12:54:54 -08:00
Alex Polvi
1854bc2028 build_image: add ability to pick different base package 2015-01-02 15:07:52 -05:00
Yuya Kusakabe
95f7c37a9d vm_image_util: changed niftycloud format to ovf 2014-12-18 17:22:51 +09:00
Michael Marineau
9ae2e1397f Merge pull request #364 from vmware/open-vmdk
add vmware_ova to image formats
2014-12-17 14:58:37 -08:00
Oliver Kurth
bf90db1301 remove autogenerated comment 2014-12-17 14:52:04 -08:00
Michael Marineau
3b40989d52 catalyst: make sure the 'portage' user can write to distfiles and ccache
Adding the update step appears to break permissions on the distfiles
directory. Ensure the portage user is correct and set the permissions on
directories it needs to write to in advance.
2014-12-17 12:46:18 -08:00
Michael Marineau
4debbfc257 catalyst: update GCC dependencies before building stage1
When bootstrapping a SDK we need to update GCC dependencies to ensure
the GCC built for stage1 is linked against the same library versions as
those that are included in the stage1. Without this updating the mpc
library just results in a broken stage1.
2014-12-17 12:44:10 -08:00
Michael Marineau
ebf77d4fdd grub: search for OEM by partition label instead of filesystem label
Probing all filesystem types on all block devices appears to hang
booting Amazon EC2 HVM instances. The console output is unreliably
buffered so there is no information on what the failure actually is. On
the up side we can work around it easily by only searching the GPT which
appears to be safe.
2014-12-15 02:22:42 +00:00
Yuya Kusakabe
44adc99dc6 vm_image_util: add niftycloud 2014-12-13 12:14:19 +09:00
Michael Marineau
a45ba5dc5e grub: use new mount.usr kernel command line args 2014-12-08 18:14:10 -08:00
Michael Marineau
ac169700a9 vm_image_util: remove kexec/boot_kernel configuration
No longer applicable with the new bootloader setup.
2014-12-05 16:52:21 -08:00
Michael Marineau
fe9db4157b vm_image_util: add qemu_xen image type for testing
To aid testing things under Xen it helps to have a machine locally that
actually runs Xen! This isn't a particularly great setup but it works
well enough to simplify my own testing. Must be used with a developer
image and packages built with `USE=vm-testing` set to include the Xen
userspace tools.
2014-12-05 16:51:11 -08:00
Michael Marineau
d443daa168 grub: the one bootloader to rule them all
This uses our new GRUB2 features to handle GPT priority partition
selection, terminal selection, OEM tweaks, etc. The old SYSLINUX and
PV-GRUB configs are now unused except for maintaining compatibility
with older installs. Of the old configs only the ones that
coreos-postinst copies are needed. The new setup supports using GRUB2
under Xen, giving us automatic fallback support on all of our platforms
for the very first time!

Since grub.cfg is copied into place instead of generated, build_image's
--boot_args option is no longer supported. It could be re-added later
with some sed goo but for now it is easy enough to just edit grub.cfg.
2014-12-05 16:51:11 -08:00
Oliver Kurth
735e811a31 add vmware_ova to image formats 2014-12-04 16:19:23 -08:00
Alex Crawford
4d6a8aaf08 vm_image_util: use only ttyS0 for the console on Azure instances 2014-12-01 14:54:57 -08:00
Michael Marineau
3587784bc4 disk_util: Add support for computing verity hashes 2014-11-15 18:58:10 -08:00
Michael Marineau
931610d5bb disk_util: Set priority and successful attributes in new images
Mark the initial copy of CoreOS as 'successful' and with a non-zero
priority. Required to boot with a stricter interpretation of the
partition selection scheme which ignores partitions that have a priority
of zero. The new grub implementation follows this rule and is what the
original ChromeOS spec used too.

For the sake of completeness if multiple partitions are configured in
the json file with this feature they will be prioritized in disk-order.
2014-11-15 16:01:25 -08:00
Michael Marineau
96d11eb03b Merge pull request #351 from marineam/secure
A pile of goo to support a minimal secure boot demo
2014-11-07 17:43:06 -08:00
Matt Boersma
1d34b98dff virtualbox_ovf.sh: use virtio network interfaces 2014-11-07 16:16:03 -07:00
Michael Marineau
0c6adece3d A pile of goo to support a minimal secure boot demo 2014-11-07 13:53:46 -08:00
Michael Marineau
810ba021b7 vm_image_util: add qemu_uefi image type for easier testing 2014-11-05 15:53:17 -08:00
Michael Marineau
95c45cbc1e Merge pull request #343 from vmware/vmx-devices
use devices vmxnet3 and pvscsi
2014-11-03 15:42:39 -08:00
Michael Marineau
d2da1b9081 Merge pull request #346 from marineam/qcow2
vm_image_util: generate qcow2 images compatible with QEMU < 1.1
2014-11-03 14:23:59 -08:00
Michael Marineau
7ba6381f38 disk_layout: align partitions and disk sizes to 2MB
The VHD format actually uses 2MB blocks internally so the 1MB alignment
used in e77e4e54 wasn't sufficent to prevent other tools from further
adjusting the image size to align it. Additionally a 1MB alignment may
be triggering a bug in OpenStack or XenServer disk resizing that renders
that partial block at the end of the old image size unmapped/unavailabe.
2014-11-03 13:19:58 -08:00
Michael Marineau
2f081e91c8 disk_util: ensure partitions are layed out on disk in order
So far the default iteration order of python dicts has mostly matched
the order that we want the partitions on disk but this is not always the
case. I caught the BIOS-BOOT partition being ordered on disk after the
USR-A partition. Nothing bad came of this but consistancy is good.
2014-11-03 13:07:29 -08:00
Michael Marineau
ea898ea3f6 vm_image_util: generate qcow2 images compatible with QEMU < 1.1 2014-11-03 11:12:09 -08:00
Oliver Kurth
67ad41fd22 use vmxnet3 device 2014-10-23 13:52:56 -07:00
Oliver Kurth
431a0b4ec0 use pvscsi device 2014-10-23 13:50:05 -07:00
Oliver Kurth
39eb776b8d add pcie configuration to vmware vmx file 2014-10-23 13:49:50 -07:00
Alex Crawford
f0618ab541 build_library: use jq to parse JSON 2014-10-22 15:19:27 -07:00
Alex Crawford
a204e434c6 grub_install: use sudo when reprobing 2014-10-22 15:19:04 -07:00
Alex Crawford
c226ac1c12 azure: finalize azure image
Increase the root partition to ~28 GiB.
2014-10-13 12:19:41 -07:00
Alex Crawford
44520881c7 build_image, image_to_vm: add disk-size assertions
Assert that the image is a multiple of 1 MiB
2014-10-08 21:09:54 -07:00
Michael Marineau
0d3a849e2b disk_layout: adjust ROOT partition sizes to fill new alignment
The new disk size alignment left too much extra space at the end of the
disk which would lead to pointless resizing on first boot. Fill in the
extra space so that no more than 1MB is left unused.
2014-10-08 20:40:54 -07:00
Michael Marineau
e77e4e5499 disk_layout: Align disk sizes to both 1MB and cylinder boundaries.
The VHD disk format internally includes CHS addressing and qemu-img
respectfully aligns disk images to the common 16 heads 63 sectors
geometry when possible. This is unfortunate since images uploaded to
Azure must also be aligned to 1MB we normally do.

Since qemu-img doesn't have a way to handle this well right now adjust
our existing alignment logic to create disk images aligned to both.
2014-10-08 20:40:45 -07:00
Michael Marineau
e361e9170e vm_image_util: Enable new VMware OEM package. 2014-10-08 20:40:45 -07:00
Michael Marineau
bb1c2559fb grub_install: work around intermittent missing loopback partitions
I am unsure exactly what situation is causing the loopback partition
device node to not exist when it is being mounted but this should help
work around the situation and log loudly about it so we can hopefully
figure out where to dig further.
2014-10-08 12:24:01 -07:00
Camilo Aguilar
7729258fda Upgrades virtual hardware version
Version 4 is too low. Some VMware products even crash trying to
upgrade it to a greater version (VMware Fusion 6 Pro). Having at
least 7 will allow us to use some modern features in most VMware
products, such as enabling vmxnet3 virtual network adapters or adding
much more memory and cpu cores to virtual machines.
2014-09-29 16:00:03 -05:00
Michael Marineau
da86c34d75 prod_image_util: clean up /etc cleanup code
Pruning files via INSTALL_MASK in the profile is a bit more apropriate
since it allows us to keep most of that info in one place. The only
parts that need to be deleted or adjusted here are inputs and outputs of
`env-update` which has to be run after everything is installed.

Previously we didn't actually clean up `env.d` at all which lead at
least one user to think they should edit those files and run
`env-update` themselves but we don't ship that tool on prod images.
2014-09-25 16:13:29 -07:00
Vito Caputo
454e4c1ad4 Added --oem_pkg oem override option to image_to_vm.sh
This sets the IMG_FORCE_OEM_PACKAGE variable to the supplied string.  If a
':' is present, what follows it gets put in the IMG_FORCE_OEM_USE variable
and what precedes in the former.

_get_vm_opt() has been modified to generally support forced overrides such
as this one, simply set variables named IMG_FORCE_$opt.

Now you can do things like:

for fmt in cloudstack \
		digitalocean \
		ec2-compat:ec2 \
		ec2-compat:openstack \
		ec2-compat:brightbox \
		exoscale \
		gce \
		hyperv \
		rackspace \
		rackspace-onmetal; do
	./image_to_vm.sh --format=qemu --oem_pkg=$fmt
	../build/images/amd64-usr/latest/coreos_developer_qemu.sh -curses
done

rather than having to modify build_library/vm_image_util.sh to test oem
builds in qemu.
2014-09-24 14:28:56 -04:00
Michael Marineau
a1a86ac731 vm_image_util: use new azure and hyperv oem packages 2014-09-22 15:21:20 -07:00
Stephen A. Zarkos
3b2c54fe5e Hyper-V & Azure build support
Add Hyper-V and Azure as build targets for development images.
2014-09-18 14:27:31 -07:00
Michael Marineau
09e720e821 cleanup: remove a couple references to chrome-bot 2014-09-14 14:54:35 -07:00
Michael Marineau
81fb3e12a0 Merge pull request #330 from exoscale/build-exoscale
exoscale builder
2014-09-08 19:23:35 -07:00
Antoine Coetsier
b9dc44da2e remove boot_kernel option for KVM in exoscale 2014-09-08 23:23:13 +02:00
Michael Marineau
1a8b197659 qemu: adjust the meaning of the -s (simple) flag
My primary use case for this flag is to fix booting with UEFI firmware
which can have problems when mixed with KVM, adding kexec into the mix
doesn't help matters either. The current version of OVMF can boot from
virtio drives just fine so that is now enabled and KVM is disabled.

So the -s option can also mean sloooooooow but boots!
2014-09-07 09:58:51 -07:00
Michael Marineau
5bfa0c8d20 build: switch from SYSLINUX to GRUB2
The new grub install script must be called after the image is unmounted
and the old bootloaders script doesn't need to touch grub at all. For
now we will continue to use the existing syslinux configs but
interpreted by grub. Beyond the grub menu flashing by during boot
everything should still be functionally equivalent.
2014-09-07 09:58:51 -07:00
Michael Marineau
12a9900e02 grub_install: new install script for grub, add UEFI bootloader
This script replaces the standard grub-install tool to give us some more
control over what is going and ensure grub-install's auto-detection
magic doesn't make any incorrect choices. Also this script sets up a
loopback device and mounts the EFI partition in just the right way for
grub-bios-setup's auto-detection magic to work correctly.

I've chosen not to adapt disk_util to use partitioned loop devices to
make grub happy because ensuring loop devices get cleaned up properly
for the general case gets tricky and less robust.
2014-09-07 09:57:39 -07:00
retrack
ddccb5072b exoscale builder 2014-09-05 09:56:48 +02:00
Michael Marineau
9580ea4086 build_image_util: fix generation of packages.txt
The passing ROOT= as an environment variable to board wrapper scripts
doesn't work, the script unconditionally overrides it. This means so far
our packages.txt files have listed the contents of /build/amd64-usr
instead of the image. Fix this by calling equery directly instead.
2014-09-04 15:12:20 -07:00
Alex Crawford
b2b70c8624 Merge pull request #325 from crawford/digitalocean
digitalocean: Add image format for digitalocean
2014-09-02 13:52:30 -07:00
Michael Marineau
3de1613a99 Merge pull request #324 from marineam/grub
Grub2 preview
2014-09-02 10:22:27 -07:00
Michael Marineau
680730cc1a configure_bootloaders: add grub install stub code
Not currently used, this configuration which sets up grub to re-use the
syslinux configuration only works with recent git versions, not any
releases. Compatibility is also limited because the serial configuration
in syslinux must be duplicated in the grub config.
2014-08-30 17:46:38 -07:00
Michael Marineau
0cc06c9c5c build_image_util: pass the disk image through to configure_bootloaders
Required so that configure_bootloaders can now handle installing the
bootloaders as well.
2014-08-30 16:39:05 -07:00
Michael Marineau
25b20b420c disk_util: support exposing a hybrid partition without syslinux
We don't need to do anything like manually install the MBR boot code
for grub but we do need to continue to expose the ESP partition as a
hybrid partition to support pvgrub.
2014-08-30 16:26:26 -07:00
Michael Marineau
fd8618336d disk_util: do not zero MBR and GPT when resizing disk
Calling cgpt create when resizing zeros the MBR boot code. This worked
with the syslinux setup because the boot code was re-written. When not
using syslinux it is easier to just preserve the existing MBR instead.
2014-08-30 16:00:07 -07:00
Michael Marineau
cb97931478 disk_layout: replace unused "BOOT-B" with Grub's BIOS Boot Partition
Unlike SYSLINUX, GRUB2 does not recommend embedding itself in a FAT
filesystem. Instead GRUB2 prefers embedding in the space between the MBR
and first partition or using a dedicated partition that is safe from
tampering by fs utilities. In our case the space after the MBR is where
the GPT lives so we need to use the extra partition scheme instead.

The 64MB "BOOT-B" partition has never been used so we can replace it
with a 2MB partition which is more than enough for GRUB.
2014-08-29 14:05:22 -07:00
Michael Marineau
4228c591a8 disk_layout: mount ESP to /boot instead of /boot/efi
We have long since stopped installing anything to the /boot directory of
the root filesystem. Mount the ESP partition to /boot for consistancy
with the discoverable partition spec.
2014-08-29 13:57:42 -07:00
Michael Marineau
70051bf6ef prod_image_util: install GCC libraries to /usr/lib
Normally GCC is installed in a way that allows installing multiple
versions and switching between them. Our production images do not need
this and additionally the only things from the GCC package that are
needed are the shared libraries. To ensure these libraries are *always*
locatable regardless of the presence of /etc/ld.so.conf and
/etc/ld.so.cache we can install those libraries to plain old /usr/lib.
The GCC packages don't have a built in way to do this but we can get
away with extracting the libraries directly from the binary package.

This is actually similar to what ChromeOS did with a few exceptions:
 - We use a native GCC build instead of the cross toolchain
 - The archive is properly extracted from the package instead of feeding
   the package directly to tar and ignoring the resulting warnings.

As an added benefit switching from a blacklist to a whitelist ensures
that extra cruft does not slip through the cracks, saving 5-10MB.
2014-08-27 20:23:39 -07:00
Michael Marineau
8a3a5e1c51 build_image_util: do not symlink etc/portage/profile
Create profile as a real directory instead of a symlink to the board
root's configuration. Normally the board root does not modify this but
it is useful for build_image to use it to modify package.provided.
2014-08-27 19:55:27 -07:00
Michael Marineau
5377e7870d prod_image_util: update /etc/ld.so.conf on every boot
Early images created this as a file instead of a symlink, these systems
will not be able to find the new GCC libraries using the older config.
2014-08-26 18:28:07 -07:00
Alex Crawford
f835e1e0fd digitalocean: Add image format for digitalocean 2014-08-26 17:30:00 -07:00
Michael Marineau
1de8eb3b11 toolchain: always switch to latest GCC version
Normally Gentoo expects moving between major GCC releases to be a manual
step. In our case we want this to always be automatic, otherwise the GCC
version won't be switched at all.
2014-08-26 16:31:46 -07:00
Michael Marineau
d97f6e7332 Merge pull request #318 from marineam/gce
vm_image_util: use only ttyS0 for the console on GCE instances
2014-08-24 16:55:58 -07:00
Michael Marineau
f6bc2908d4 rename references to updatectl, it is now updateservicectl 2014-08-20 16:27:44 -07:00
Michael Marineau
5c590f2a6d vm_image_util: use only ttyS0 for the console on GCE instances 2014-08-18 16:09:24 -07:00
Michael Marineau
b3ecb2c550 toolchain_util: fix bash syntax when running as root
Apparently expanding an empty string before a variable assignment forces
that assignment to be interpreted as a command instead. Instead of an
empty string use env as our sudo alternative when running as root.
2014-08-18 14:41:53 -07:00
Michael Marineau
319879609e toolchain_util: build stable cross gdb, misc cleanups 2014-08-15 16:17:04 -07:00
Alex Crawford
5d13999fbb onmetal: Up the TOTALTIMEOUT setting
Bump TOTALTIMEOUT to 5 minutes
2014-08-06 19:22:15 -07:00
Alex Crawford
3740cc0504 onmetal: Up the TIMEOUT and TOTALTIMEOUT settings
Bump TIMEOUT to 15 seconds and TOTALTIMEOUT to 2 minutes
2014-08-06 18:45:05 -07:00
Petr Hosek
95e5912b14 feat(vm_image_util): CloudStack support
Provide initial support for CloudStack.
2014-07-24 17:47:57 -07:00
Michael Marineau
3ee48fac14 onmetal: Replace boot_kernel's args
The console should be on ttyS4 and just in case blacklist mei.
2014-07-24 11:57:57 -07:00
Michael Marineau
4ca4b65dba Merge pull request #303 from marineam/fixes
Toolchain build fixes
2014-07-22 12:44:41 -07:00
Alex Crawford
abf24663a2 Merge pull request #305 from crawford/fillings
Pull teeth. Replace with onmetal.
2014-07-21 20:44:36 -05:00
Alex Crawford
712c1a3d9b Pull teeth. Replace with onmetal. 2014-07-21 18:40:36 -07:00
Michael Marineau
2a004f0081 qemu: set DHCP hostname based on image name and version
Provides an easy way to test this setting hostname from DHCP, most other
systems rely on it.
2014-07-21 16:43:48 -07:00
Michael Marineau
859cea0306 build_library: fix compatibility with latest crossdev version 2014-07-20 21:32:53 -07:00
Michael Marineau
f9e03a8e6f build_image: add repos.conf and binpkgs url to dev images
Needed for portage 2.2. Sync URIs are included but not very useful yet
because portage only can do `git pull` but not `git clone`. An extra
helper script will be required to do the initial clone it seems.

Binary packages may be useful for re-installing a package with a
different INSTALL_MASK. Can be used to install debug symbols.
2014-07-19 19:20:51 -07:00
Michael Marineau
07cb281d6a build_image: install the complete system package set in dev images
dev images, now with fancy tools like `make`!
2014-07-19 17:29:05 -07:00
Michael Marineau
a28a8966e4 build_image: use dev and prod profile variants
Instead of gluing in a special PROD_INSTALL_MASK for all images use
profiles to configure the differences between the base build root,
production images, and developer images. This offers much more
flexibility and is needed for providing a full dev environment in
developer images.
2014-07-19 17:17:28 -07:00
Michael Marineau
4d3c198161 tools: remove support for parallel_emerge
Using parallel_emerge has been disabled by default for all commands
except build_image for quite a while now, build_image kept it just
because it was still a bit faster than normal emerge. Keeping
parallel_emerge complicates future changes to build_image so it needs to
drop it entirely. Since that means nothing uses it by default we might
as well just rip out support for it entirely.
2014-07-19 16:38:17 -07:00
Michael Marineau
1016bb323b bootstrap_sdk: setup /usr/lib correctly before calling set_lsb_release
os-release is now written to /usr/lib but that is likely a symlink to
/usr/lib64 so a little extra logic is required to avoid clobbering the
symlink.
2014-07-14 17:41:18 -07:00
Michael Marineau
19a4ae59d0 build_library: enable remount-usr later in the boot process. 2014-07-14 15:55:03 -07:00
Michael Marineau
0326b5f57f build_library: move os-release to new location for systemd 215 2014-07-14 15:55:00 -07:00
Michael Marineau
eeec7e1c65 vm_image: switch xen disk format back to raw
VHD was just for testing, raw is more useful for published images.
coreos-install will now be able to install working xen instances:

    coreos-install -d /dev/xvda -o xen -c cloud-config.yml
2014-07-10 17:23:20 -07:00
Michael Marineau
eebe8d5fe9 build_library: long overdue for a code name change 2014-06-30 15:42:16 -07:00
Michael Marineau
27e00285d5 updates: include updatectl in update tools zip 2014-06-30 15:40:42 -07:00
Michael Marineau
048ee51e6f build_image: when generating update payload don't generate metadata
This feature was removed from delta_generator.
2014-06-25 12:37:36 -07:00
Michael Marineau
51c78a4685 build_image: generate update tools zip by default
Missed this in 7231b95a, the update zip should still be built when the
usr partition is extracted for generating updates but build_image itself
is not generating and signing the update.
2014-06-24 14:01:09 -07:00
Michael Marineau
82e2461ddf build_image: refresh scripts bundled into the update zip. 2014-06-24 13:34:54 -07:00
Michael Marineau
7231b95af1 updates: extract usr partition when building images
The current generate_update function is now less useful, the important
part that we need is just the partition image now. Also by defaulting to
extracting the partition the old cors_generate_update which is still in
use by devserver can be removed entirely, devserver will just expect the
extracted partition image instead.
2014-06-23 12:26:17 -07:00
Michael Marineau
eb605751cd build_image: check that set_official wasn't forgotten in official builds 2014-06-20 18:45:20 -07:00
Alex Crawford
ef14f6449e configure_bootloaders: only add a single serial console boot arg
Only one console of each type (virtual, serial, etc.) is supported
in the boot args. Only add ttyS0 if no other serial consoles have
been provided.
2014-06-19 13:56:24 -07:00
Michael Marineau
919ba5a3b9 fix(disk_util): Install syslinux with extlinux
Attempting to work around an apparent race in mtools, the command
'extlinux' these days is just the install tool for mounted partitions
while 'syslinux' is for unmounted devices.
2014-06-18 14:20:29 -07:00
Michael Marineau
0b052bc756 Merge pull request #276 from marineam/conf
make.conf cleanup
2014-06-16 13:57:50 -07:00
Michael Marineau
9d2774af3b fix(build_image): Use developer_data as a system config.
Evaluating this as a user config causes it to block on
coreos-environment-setup.service which will wait on networking. This
makes it hard to add extra tricks for testing/debugging situations where
networking is failing. For example, to trigger dhcpcd if networkd dies:

    #cloud-config

    write_files:
      - path: /etc/systemd/system/systemd-networkd.service.d/dhcpcd.conf
        content: |
          [Unit]
          OnFailure=dhcpcd.service

          [Service]
          Restart=no
2014-06-15 15:41:53 -07:00
Michael Marineau
99ed29d218 fix(board_setup): Remove old make.conf symlinks
Just use the single auto-generated make.conf, it covers everything now.
2014-06-12 16:53:27 -07:00
Michael Marineau
0d29e73534 fix(*): Use binary package for baselayout
It is no longer necessary to use the build USE flag or avoid binary
packages when installing baselayout for the first time.
2014-06-10 14:45:56 -04:00
Michael Marineau
93b0ec304a fix(build_library): Remove reference to old SDK profile
The SDK's profile changed to coreos:coreos/amd64/sdk quite a long time
ago. Remove this last reference to it so the alias can be forgotten.
2014-06-10 14:45:56 -04:00
Michael Marineau
9a4ec472ce fix(build_library): Update amd64-usr's portage profile
The usr profile is just an alias to generic now so drop the old name.
2014-06-10 14:45:56 -04:00
Michael Marineau
5b476734a1 Merge pull request #267 from marineam/containers
fix(disk_util): don't run blkid on empty partitions
2014-06-09 11:38:06 -07:00
Michael Marineau
bb3d751e6f feat(build_image): Generate lists of image contents
Index contents by file and package.
2014-06-08 16:38:54 -04:00
Michael Marineau
388220cfad fix(build_image): move upload calls to build_library
This will let the image building code upload extra data without the
wrapper script having to know about it.
2014-06-08 16:37:48 -04:00
Michael Marineau
02bd7351dd fix(disk_util): don't run blkid on empty partitions 2014-06-06 16:12:37 -07:00
Michael Marineau
57ebeef297 fix(release_util): Generate correct download path for official releases
This fixes the vagrant metadata json files that we create.
2014-06-02 12:38:01 -07:00
Alex Crawford
17835eeb79 Merge pull request #263 from crawford/teeth
feat(teeth): Add new OEM and disk layout for teeth
2014-05-29 17:06:37 -07:00
Alex Crawford
d9afc85b0e feat(teeth): Add new OEM and disk layout for teeth 2014-05-29 16:46:27 -07:00
Alex Crawford
ed50f5fe0b feat(disk_util): Replace Resize() with Update()
The new Update() performs the same tasks as the old Resize()
in addition to formatting previously-unformatted partitions. This
allows children disk-layouts to repartition the base layout in
addition to resizing.
2014-05-29 16:46:27 -07:00
Michael Marineau
d408e3c1f5 fix(build_library): Finish conversion to new bucket layout.
I started to move board files under a boards/ directory similar to how
the SDK is under sdk/ but didn't do so everywhere. This should finish
the job so everything is consistent now.

Note: This prefix is only used in developer and buildbot uploads. When
final releases are copied to $channel.release.core-os.net it doesn't use
the prefix since a) I already published urls without the prefix and b)
no sdk files are ever posted to the public release locations.
2014-05-28 14:47:30 -07:00
Michael Marineau
d11815a68d fix(disk_layout): Bump up default ROOT volume sizes for btrfs.
btrfs isn't designed for small volumes and can run out of space sooner
than one would expect in our current setup, particularly with docker.
To try to improve the situation always create the filesystem initially
as 2GB instead of 512MB using the default settings: metadata is
duplicated, data is single, not mixed. The mixed setting may have been
partly why our performance can be so poor. For the default vm layout
use 6GB instead of 3GB, about what we use for EC2.
2014-05-23 18:22:02 -07:00
Michael Marineau
0ec871b203 fix(build_image_util): Reorder when set_lsb_release is called
dev_image_util needs to be able to append to update.conf so move
set_lsb_release to start_image instead of finish_image.
2014-05-22 22:41:54 -07:00
Michael Marineau
ff2d216142 fix(release_util): Add options to configure download path.
Since the new bucket scheme uploads images to a private staging area
first we need to configure the final location to generate vagrant json
metadata correctly.
2014-05-21 13:39:56 -07:00
Michael Marineau
2e9911b978 fix(*): Migrate image storage to new buckets
- Automated builds drop SDK and binary packages into
  gs://builds.developer.core-os.net/ and the new download URL is
  http://builds.developer.core-os.net/ (COREOS_DEV_BUILDS)
- Change default upload path to gs://users.developer.core-os.net/ for
  misc developer builds. Official builds go elsewhere and will just be
  configured in buildbot/jenkins so some COREOS_OFFICIAL stuff is gone.
- Automated builds of images go to a private bucket,
  gs://builds.release.core-os.net which later gets copied to
  gs://alpha.release.core-os.net and friends by core_promote.
2014-05-21 13:21:07 -07:00
Michael Marineau
7372f9f6e6 Merge pull request #254 from marineam/dev-config
Build-time dev cloud configs
2014-05-18 20:46:07 -07:00
Michael Marineau
822644fc54 feat(build_image): Add support for injecting a cloud config
The new --developer_data option can be used to specify a path to a cloud
config to bundle into the image. If none is provided but a shared user
password (for core) is set then generate a config to set that password.
This lets us use the same mechanism for setting the default password for
both disk and PXE images.
2014-05-17 16:23:18 -07:00
Michael Marineau
a93cb921d8 refactor(build_library): Add a function for enabling systemd units. 2014-05-17 16:23:16 -07:00
Michael Marineau
b24df04465 feat(build_image): Add 'container' image type.
This image type is the same as the developer image except that it is a
single root filesystem and is bootable via systemd-nspawn. This may
become obsolete eventually when it becomes possible to boot the normal
disk images under nspawn but it is useful for testing until then.

The partition type is defined by the Discoverable Partitions Spec.
http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/
2014-05-16 21:11:01 -07:00
Michael Marineau
54f774d931 fix(build_library): Skip modifying non-existent partitions.
To make it possible to plop a CoreOS install into a simple
single-filesystem image for use as a container some things like
configuring bootloaders need to be skipped.
2014-05-16 20:52:21 -07:00
Michael Marineau
ee6b9ee1f9 fix(disk_util): Set btrfs default subvolume
This avoids needing to always pass the subvol=root mount option.
2014-05-16 19:09:23 -07:00
Michael Marineau
acb9800259 fix(disk_util): Don't try to format blank partitions. 2014-05-16 17:40:35 -07:00
Michael Marineau
68a8a67081 fix(update_chroot): Consolidate more portage configuration
To behave more like setup_board/build_packages update_chroot should
fully configure portage to make sure everything is accurate.

Now binhosts are defined in make.conf.host_setup so the static config in
coreos-overlays doesn't need to refer to version.txt. setup_board
already made this change in 7a43a07f.

Define path locations to reduce dependency between static configs in
coreos-overlays and the behavior of the scripts repo. Spreading
configuration across two repos makes everything harder to understand.
Eventually everything should either be defined in profiles in
coreos-overlays or minimal auto-generated config files here in scripts.
2014-05-14 19:15:30 -07:00
Michael Marineau
57992324ba Merge pull request #250 from marineam/refactor
Refactor image building
2014-05-13 17:38:52 -07:00
Michael Marineau
5417bd7ae3 fix(vm_image_util): Set correct group in Vagrant metadata. 2014-05-09 11:52:11 -07:00
Michael Marineau
17bde8aa12 refactor(build_image_util): Move prod specific code to prod_image_util 2014-05-09 11:18:20 -07:00
Michael Marineau
56b550dc21 cleanup(build_image_util): Delete unused code 2014-05-09 11:18:19 -07:00
Michael Marineau
1c5393b78e refactor(build_image_util): Merge with base_image_util
There isn't a base image now, and less file clutter is nice.
2014-05-09 11:16:48 -07:00
Michael Marineau
1836d5998d refactor(base_image_util): Split into two functions.
Use what was the base image build function as setup/finalize steps in
the dev and prod build functions. This eliminates duplicate code
that mounted and unmounted the filesystem images.
2014-05-09 11:13:54 -07:00
Michael Marineau
39086358bf refactor(build_image): Build dev and prod images independently
We need some more control over exactly what lands in dev vs prod images
which will require letting them diverge in what is currently the common
base image step. There isn't any real need for the base image in the
first place other than to speed up building both dev and prod images at
the same time but that isn't common enough to worry about.

As part of this cleanup also remove references to CHROMEOS_* variables
and the recovery image that never actually existed in CoreOS.
2014-05-09 10:55:09 -07:00
Michael Marineau
9dd0a9d87f Merge pull request #245 from marineam/set-group
add(image_set_group): New script to set the update group in prod images.
2014-05-07 16:58:24 -07:00
Michael Marineau
a7e1e5a177 add(image_set_group): New script to set the update group in prod images.
For generating images for groups other than the one given to build_image
run this script along with the usual image_to_vm.sh commands. To avoid
ambiguity with the 'latest' symlink, this script creates $group-latest
symlinks instead. build_image creates the new symlink too.
2014-05-07 15:07:14 -07:00
Michael Marineau
b4d6fb9597 fix(set_lsb_release): Set default GROUP= from arg again.
This makes sure developer builds stick to the developer group. After
commit c3d07e94 developer PXE/ISO images would report as 'alpha'.
2014-05-07 12:52:05 -07:00
Michael Marineau
af8e6da2da Merge pull request #242 from marineam/c10n
maint(generate_au_zip): Drop old update service uploader
2014-05-07 11:31:17 -07:00
Michael Marineau
c3d07e942c feat(set_lsb_release): Write configured group to /etc instead of /usr
The /usr images must be identical across groups so that information is
static. Eventually the default will be 'stable'
2014-05-06 13:21:10 -07:00
Michael Marineau
6d165f8a7c maint(generate_au_zip): Drop old update service uploader 2014-05-05 15:14:46 -07:00
Michael Marineau
33858859fb Merge pull request #238 from marineam/insecure
fix(vm_image_util): Don't use the full vagrant OEM on vmware_insecure
2014-05-03 14:19:20 -07:00
Michael Marineau
fccefb278e Merge pull request #236 from marineam/vagrant
Vagrant related script updates
2014-05-03 14:18:39 -07:00
Michael Marineau
c4984b3c7c fix(vm_image_util): Don't use the full vagrant OEM on vmware_insecure
Only the key is needed, and currently the vagrant OEM is completely
broken outside of vagrant. This gets vmware_insecure images back into
the state that they were before cloud config came along. :)
2014-05-02 15:30:49 -07:00
Michael Marineau
75999b5e2a fix(build_image): Add group prefix to image output directories. 2014-05-01 10:21:51 -07:00
Michael Marineau
4e85b172df feat(build_image): Optionally generate update payload with prod images. 2014-05-01 09:59:58 -07:00
Michael Marineau
e1d7b29436 feat(disk_util): Add support for extracting partitions.
This will simplify the process of generating update payloads.
2014-04-30 19:04:42 -07:00
Michael Marineau
7a7494e999 fix(prod_image_util): Do not install update test key anymore.
Leave this to the ebuild, no reason for it to be done here.
2014-04-30 17:12:59 -07:00
Michael Marineau
3fdfe92b5d fix(vm_image_util): Fix building vagrant vmware fusion images. 2014-04-29 03:48:56 -04:00
Michael Marineau
20f191a804 maint(set_lsb_release): Remove gentoo-release (again)
We now require Vagrant 1.5.0 both in documentation and in code which
uses os-release instead of gentoo-release.
2014-04-29 01:44:47 -04:00
Michael Marineau
8183430f6c feat(vm_image_util): Add Vagrant metadata file
This is required for Vagrant to recognize box versions:
http://docs.vagrantup.com/v2/boxes/versioning.html
2014-04-29 01:44:47 -04:00
Michael Marineau
39951946ca feat(vm_image_util): Add new build steps, update vagrant builds
This adds two new optional build steps.  The first user of these is the
vagrant images but many of the targets can be simplified now.

- fs_hook: Anything that needs to happen before unmounting the image.
  This happens after the OEM is installed but before disk images are
  made. It can be used to copy any data out of the image.
- bundle_format: Many VM types ship as some sort of archive format
  rather than plain disk images as this script originally assumed.
  Adding this final step lets us stop using the conf step awkwardly.

Vagrant now ships with a Vagrantfile and related code included in the
OEM package. This lets us version our vagrant-side code along with the
images themselves as well making the coreos-vagrant repo optional again.
The coreos-vagrant code will still be useful for handling the fancier
cluster configuration stuff but no longer has to carry the plugin code.
2014-04-28 19:52:24 -04:00
Michael Marineau
7f5b5baf22 maint(build_library): Remove special case code for -usr disk layouts
More cleanup now that amd64-generic is gone.
2014-04-26 14:45:28 -07:00
Michael Marineau
1c328d7c0d Merge pull request #233 from marineam/mbr
fix(disk_util): Switch back to gptmbr.bin for our MBR boot code.
2014-04-25 16:35:38 -07:00
Michael Marineau
d5c5544cca fix(syslinux): Display boot: prompt for a half second.
This should make it less difficult for people to add kernel options for
debugging. Without a prompt/timeout the user must be holding down space
or some other key while syslinux loads but it may not be possible for
the user to do so provide input quite that fast. Only a half second to
avoid needlessly increasing boot times in the common case.
2014-04-25 14:45:21 -07:00
Michael Marineau
476bae747e fix(disk_util): Switch back to gptmbr.bin for our MBR boot code.
Using the classic mbr.bin was only needed during the transition from
syslinux 3 to 6 because the behavior of gptmbr.bin changed after 3.
Now that the transition is done and cgpt supports the new scheme now it
is time we switched back. This avoids depending on using a hybrid MBR.
2014-04-25 11:15:17 -07:00
Michael Marineau
2f8f0159f8 maint(*): Delete special case code for amd64-generic 2014-04-23 16:14:50 -07:00
Michael Marineau
46e2e17697 maint(toolchain_util): Drop amd64-generic from list of valid boards.
The cleanup begins...
2014-04-23 16:02:39 -07:00
Michael Marineau
e02f49b410 feat(release_util): Add support for signing individual file uploads.
The .DIGESTS format is clunky and annoying. It also requires uses to
perform two steps to verify images using GPG. Instead support signing
all files directly so there is no need for .DIGESTS.

The old DIGESTS code will remain in place for now but after a few
releases I plan on deleting it.
2014-04-18 16:56:50 -07:00
Brandon Philips
e9896acc29 Merge pull request #218 from philips/new-update-url
fix(build_library): use https://public.update.core-os.net now
2014-04-18 10:58:33 -07:00
Alex Crawford
7d0c08971e Merge pull request #228 from crawford/ld.so
feat(prod_image_util): Adding support for ld.so configs on tmpfs roots
2014-04-17 13:08:17 -07:00
Alex Crawford
ba45a2bfb2 feat(prod_image_util): Moving ld.so configs to /usr
Moving the ld.so configs to /usr and symlinking them to /. This allows
images with a tmpfiles root (e.g. PXE) to have ld.so config support.
2014-04-17 12:48:25 -07:00
Alex Crawford
2662d0c784 Merge pull request #229 from crawford/master
fix(vm_image_util): Minor comment fix
2014-04-16 18:41:23 -07:00
Alex Crawford
9e72f6d187 fix(vm_image_util): Minor comment fix 2014-04-16 18:16:26 -07:00
Michael Marineau
b9c72ecda1 fix(vm_image_util): Fix DIGESTS path for compressed vhd images.
Missed this in eb72b6e5
2014-04-16 17:32:11 -07:00
Michael Marineau
71f005f9dc Merge pull request #214 from marineam/units
Config drive for QEMU
2014-04-16 10:17:02 -07:00
Michael Marineau
eb72b6e570 fix(release_util): Compress vhd images. 2014-04-12 14:13:35 -07:00
Michael Marineau
12c0008ad9 feat(qemu_template): Add support for user-provided configs.
A custom cloud config can be provided directly via -u or as an existing
config drive image via -c.
2014-04-11 18:06:18 -07:00
Michael Marineau
150ab005e0 feat(qemu_template): Provide SSH keys via config drive
Moving away from our old behavior of loading 'authorized_keys' on virtfs
volumes. Still using virtfs to avoid depending on mkisofs or similar.
2014-04-11 18:06:18 -07:00
Michael Marineau
0d0c7c7578 fix(qemu_template): Replace getopts with simple pattern matching.
The use of getopts was leading to conflicts between this script's short
options and qemu's long options. For example -serial was getting
interpreted as -s -- erial which is not very helpful.
2014-04-11 18:06:18 -07:00
Alex Crawford
c50e68f9d3 Merge pull request #224 from crawford/oems
feat(vm_image_util): Adding support for openstack and brightbox
2014-04-11 17:47:43 -07:00
Alex Crawford
9095908ca1 feat(vm_image_util): Adding support for openstack and brightbox
Added USE flags for specifying the provider (ec2, openstack, or brightbox).
2014-04-11 16:12:50 -07:00
Michael Marineau
331c194003 fix(set_lsb_release): Set bug report url. 2014-04-11 12:35:43 -07:00
Michael Marineau
add4519021 fix(build_image): Only use 'alpha' group in official builds. 2014-04-09 18:46:07 -07:00
Brandon Philips
bd7d4f4aaa fix(build_library): use https://public.update.core-os.net now
We added a new https certificate on the new update service and changed
the hostname to be consistent with all of the other endpoints. Update
the new images to use this.

The old URL http://public.roller.core-os.net will remain working until
all of the old client have been updated.
2014-04-08 10:54:45 -07:00
Michael Marineau
58bac50d91 fix(vm_image_util): Remove fstab from PXE initrd
Using fstab made overriding it with kernel command line options like
root=/some/disk not work properly. A generator handles it now.
2014-04-04 16:58:43 -07:00
Michael Marineau
06e03e912e fix(set_lsb_release): Code name was not epic enough. 2014-04-04 11:32:31 -07:00
Alex Polvi
e3156672ce refactor to use _write_cpio_common 2014-03-31 16:08:29 -07:00
Alex Polvi
0d3cd4b417 feat(iso): add iso image format to image_to_vm 2014-03-31 15:49:57 -07:00
Michael Marineau
e2aaed1619 Merge pull request #209 from marineam/pxe
feat(vm_image_util): Add /usr/.noupdate flag file in PXE images.
2014-03-31 14:01:44 -07:00
Michael Marineau
cd00e6eafe Merge pull request #212 from marineam/gce
fix(vm_image_util): Default to larger vm (8GB) disk layout for GCE
2014-03-29 14:41:14 -07:00
Michael Marineau
17d22228f8 fix(vm_image_util): Default to larger vm (8GB) disk layout for GCE
GCE was using the base 3GB layout which isn't very useful for actual
machines.
2014-03-29 14:22:01 -07:00
Michael Marineau
e0cfea50fb fix(vm_image_util): Require OEM packages to be aware of /usr/share/oem
Installing to a temporary directory and then copying over the final
contents of /usr/share/oem allows more complicated OEM packages such as
python to be configured with --prefix=/usr/share/oem while previously
the atypical use of ROOT=/usr/share/oem would have complicated things.
2014-03-27 22:17:32 -07:00
Michael Marineau
a78c5fb665 fix(vm_image_util): Keep most partitions mounted read-only.
This ensures that the only partition being modified is OEM.
2014-03-27 21:52:40 -07:00
Michael Marineau
a6328f7c2b feat(vm_image_util): Add /usr/.noupdate flag file in PXE images.
This can be used by update_engine as a quick test to determine if it is
running on a system that it can handle. This avoids needing something
like the 'coreos.diskless' kernel command line flag.
2014-03-27 15:41:41 -07:00
Brandon Philips
7b6e547751 Merge pull request #206 from philips/fixup_core_upload_update
feat(core_roller_upload): initial commit
2014-03-26 05:56:20 -07:00
Brandon Philips
42770b6c00 feat(core_roller_upload): initial commit
TODO: get rollerctl releases installed in here too.
2014-03-26 05:55:26 -07:00
Michael Marineau
11aabd7bd0 fix(vm_image_util): Do not generate a machine UUID.
If QEMU is given a uuid systemd will detect that and in turn use it for
the machine-id. This made the bug causing the machine-id to be always
re-generated on boot harder to notice since it didn't happen on QEMU.
2014-03-25 14:23:23 -07:00
Michael Marineau
c489d2f7c8 Merge pull request #196 from marineam/no_kexec
feat(vm_image_util): Add qemu_no_kexec image type
2014-03-24 14:48:55 -07:00
Michael Marineau
dc1b3e32e9 fix(toolchain_util): Correct default binhost ordering.
Later hosts in the list override earlier hosts so the current version
must be listed after the older sdk version.
2014-03-24 11:17:26 -07:00
Michael Marineau
7c0e821953 Merge pull request #202 from marineam/pxe
PXE images
2014-03-23 20:19:41 -07:00
Michael Marineau
0a8f178002 feat(vm_image_util): Support other disk formats with Xen, such as vhd. 2014-03-23 17:15:36 -07:00
Michael Marineau
d4d06cfe57 feat(vm_image_util): Add new Rackspace target with VHD disk images. 2014-03-23 16:31:09 -07:00
Michael Marineau
5ab320d317 fix(vm_image_util): Fix typo in README 2014-03-23 11:43:36 -07:00
Michael Marineau
066bd23df8 feat(vm_image_util): Rework the qemu wrapper script to work for PXE
Now the script can be used with a disk image or a kernel/initrd.
Using a disk with the PXE kernel should work too but haven't tried it.
2014-03-22 22:28:10 -07:00
Michael Marineau
e151a33cee fix(vm_image_util): Fix building squashfs for /usr
Taking a bit of a new approach to booting PXE images here for both
amd64-generic and amd64-usr. Instead of requiring the user to specify
squashfs and tmpfs on the kernel command line we can simply provide
defaults in the initrd's fstab.
2014-03-22 22:23:40 -07:00
Michael Marineau
441a982a39 fix(vm_image_util): Disable installing oem-pxe
It only installed /usr/share/oem/oem-release which we no longer use.
2014-03-22 14:27:48 -07:00
Michael Marineau
81367903bf fix(vm_image_util): Package up /usr for pxe images. 2014-03-22 14:27:48 -07:00
Michael Marineau
26b5865b73 Merge pull request #199 from marineam/syslinux
fix(build_image): Switch to SYSLINUX for our EFI bootloader.
2014-03-19 20:39:35 -07:00
Michael Marineau
e59e366770 Merge pull request #197 from marineam/release-files
cleanup(set_lsb_release): Rework release config setup
2014-03-19 20:39:08 -07:00
Michael Marineau
9d073452ed fix(build_image): Switch to SYSLINUX for our EFI bootloader.
Now with SYSLINUX 6 we can use the same bootloader on EFI and BIOS
systems. This replaces our previous reliance on building default kernel
options into the kernel image itself.
2014-03-19 17:53:00 -07:00
Brian Waldon
899e7ddebe fix(vagrant): pad vagrant mac to six characters 2014-03-19 17:03:24 -07:00
Michael Marineau
8244c7a260 cleanup(set_lsb_release): Rework release config setup
- Remove custom COREOS_* attributes from /etc/lsb-release
- Move dev image logic to dev_image_util
  For extra fun fix detection of local host URL for devserver.
- Remove weirdly verbose "DESCRIPTION" format.
- Add COREOS_RELEASE_BOARD back to /usr/share/coreos/release
  This is mostly just so update_engine and gmerge report the correct
  board name to devserver, informative-only on prod images.
- Remove version info from /etc/gentoo-release
- Switch from 'track' to 'group' terminology.
2014-03-19 15:56:21 -07:00
Michael Marineau
e2536ad76f feat(vm_image_util): Add qemu_no_kexec image type
This makes it easy to test booting without kexec on qemu/kvm similar to
how images are booted on Xen.
2014-03-18 15:07:09 -07:00
Michael Marineau
ee207599af fix(set_lsb_release): Bear Creek Manor 2014-03-14 10:53:59 -07:00
Brandon Philips
87de0fa5df Merge pull request #192 from philips/no-https-on-roller-yet
fix(build_library): use http until we get certs on roller
2014-03-13 14:13:50 -07:00
Brandon Philips
d71aab28df fix(build_library): use http until we get certs on roller 2014-03-13 14:08:37 -07:00
Brandon Philips
98393b7a21 fix(build_library): mkdir /usr/share/coreos in the right order
This is important otherwise things fail to create files because the
directoreis don't exist.
2014-03-13 12:18:33 -07:00
Brandon Philips
6620d7a5a7 fix(build_library): put lsb-release in usr too 2014-03-13 12:08:50 -07:00
Brandon Philips
ed19e9f559 fix(build_library): use ln -sf instead of if
we don't need an if statement when we can force.
2014-03-13 12:05:33 -07:00
Brandon Philips
9ce005cf88 fix(build_library): make the usr link relative
Fix the problem of: "pecified switch root path %s does not seem to be an
OS tree. /etc/os-release is missing" because dracut doesn't have an
/usr/share/coreos/os-release file.
2014-03-13 12:04:10 -07:00
Greg Kroah-Hartman
1d6d1f7539 feat(build_library) move os-release to /usr/share/coreos/ 2014-03-13 03:14:02 +00:00
Greg Kroah-Hartman
9ee59adf6f fix(build_library) fix the build breakage from previous amd64-user change 2014-03-13 03:13:12 +00:00
Brandon Philips
03c152a519 hack(build_library): support amd64-usr
Make special defaults for amd64-usr
2014-03-12 19:28:46 -07:00
Brandon Philips
b8fe368087 fix(build_library): create /usr/share/coreos files
create the basic files in /usr/share/coreos that should exist
2014-03-12 18:45:51 -07:00
Michael Marineau
0c1198c3bb feat(disk_util): Switch from SYSLINUX's gptmbr.bin to mbr.bin
cgpt now supports generating hybrid MBRs and the classic style mbr.bin
from any version of SYSLINUX should work the same with the hybrid MBR.
The other code, gptmbr.bin, changes after SYSLINUX 3. Switching lets me
play with different versions of SYSLINUX without breaking everything.

With this change all images feature a hybrid MBR so the special case for
some VM platforms has been removed.
2014-03-12 15:38:34 -07:00
Michael Marineau
88820b12d3 fix(build_image): The kernel is now in /usr/boot in /usr images 2014-03-12 14:36:07 -07:00
Michael Marineau
c90ea5f504 fix(vm_image_util): Skip kexec when booting on Xen HVM
This is buggy, instead we will need to handle Xen HVM similar to PV
except this requires SYSLINUX config tweaking instead of grub's menu.lst
2014-03-11 11:38:46 -07:00
Michael Marineau
87c0814006 fix(disk_util): Fix undefined variable introduce in 4dbdb391 2014-03-06 12:41:07 -08:00
Michael Marineau
4dbdb391a4 feat(disk_util): Switch to btrfs for root filesystem in /usr images
This is all that is required to swap out ext4 for btrfs.
No btrfs user space tools or auto-resize support yet.
2014-03-05 18:52:23 -08:00
Michael Marineau
2aa3571e45 rename(configure_bootloaders): Remove the legacy use of "legacy" 2014-03-05 16:00:24 -08:00
Michael Marineau
a022642e54 rename(disk_layout): Remove the legacy use of "legacy" 2014-03-05 15:57:22 -08:00
Michael Marineau
695ff028b3 fix(catalyst): Don't disable ebuild-locks
This doesn't make things go faster and I am suspicious that it makes
things worse. For example /etc/xml/catalog winds up empty from time to
time and I wonder if this locking is related to that.
2014-03-04 23:08:37 -08:00
Michael Marineau
ae03aaf368 fix(build_image): Switch STATE/ROOT partitions to coreos-resize type.
This is used by the new resize implementation to identify which
partition to resize during boot.
2014-03-03 13:08:31 -08:00
Michael Marineau
1177d198da fix(release_util): Fix DIGESTS regression from feb59db9f
While attempting to fix the easy to mix up DIGESTS names in feb59db9f I
stumbled across yet another way that the DIGESTS names were a bit
unpredictable: previously a .bz2 got stuck into the file name when
upload_images automatically compressed some file types. The new code
missed this and never added the .bz2. Correct this now, both for
image_to_vm which has a pile of glue to keep the legacy names in place
for now and build_image which I never intended to change.
2014-02-19 17:50:40 -08:00
Michael Marineau
930260ab9e fix(prod_image_util): restore /etc/gentoo-release
Vagrant reads this file to determine that we are CoreOS... so lets not
break that just yet. A PR to switch to os-release has been posted:
https://github.com/mitchellh/vagrant/pull/2985

Some day gentoo-release will be dropped but that day is not today.
2014-02-14 20:28:20 -08:00
Michael Marineau
7dd8d95b45 fix(build_image): Drop long unused overlays/usr/local bind mount
This was used by the old ChromeOS "dev image" scheme and does not get
mounted by default so stop shipping it.
2014-02-14 16:14:39 -08:00
Michael Marineau
438478f0cf fix(base_image_util): Do not auto-generate conflicting tmpfiles entries
Many directories are now handled by the new baselayout instead.
2014-02-14 16:13:31 -08:00
Michael Marineau
821d718a74 fix(vm_image_util): assert qemu wrapper is sh friendly 2014-02-09 18:22:34 -08:00
Michael Marineau
5abb561e19 Merge pull request #170 from marineam/catalyst
fix(catalyst): Recreate portage snapshot with --rebuild
2014-02-09 18:06:58 -08:00
Michael Marineau
a1026792aa fix(catalyst): Recreate portage snapshot with --rebuild 2014-02-09 17:37:53 -08:00
Michael Marineau
30b72754ff fix(setup_board): Remove note about annoying eselect warning
Silenced in eselect 1.4
2014-02-09 14:48:45 -08:00
Michael Marineau
7a43a07fef feat(setup_board): Configure binary package sources on the fly.
Generate list of board binhosts based on the new $COREOS_DOWNLOAD_ROOT
variable and optionally use packages only from a specific version
2014-02-09 14:24:01 -08:00
Michael Marineau
5524a7ce9a fix(common): Define VERSION_ID and BUILD_ID
Scripts can now use COREOS_VERSION_ID to get the base version instead of
having to strip off the BUILD_ID that is appended for unofficial builds.
2014-02-09 13:59:42 -08:00
Michael Marineau
50e54cea85 fix(release_util): Move default upload root to common, add --upload_root
Make it possible for other scripts to share the same value for our
release repository and equally easy to override with a custom value.
Also allow setting the root from the command line in addition to the
environment. Usually --upload_root is better to use than --upload_path.
2014-02-07 10:37:45 -08:00
Jeremiah Orem
84b94c97f7 qemu_template: == is a bashism, change to =. 2014-02-07 00:17:14 -08:00
Michael Marineau
1f84df1388 fix(base_image_util): Prune old reference to platform/dev 2014-01-31 15:46:29 -08:00
Michael Marineau
bf6ee33244 fix(vm_image_util): If DIGESTS wasn't generated don't copy it.
Failed to test my last change with uploads disabled :(

Also, it needs to be return 0, not return.
2014-01-30 13:31:36 -08:00
Michael Marineau
8a15840d6a fix(vm_image_util): Use more consistent names for vm .DIGESTS
Switch from naming DIGESTS based in disk image name to a common prefix.

old: coreos_production_qemu_image.img.DIGESTS ->
new: coreos_production_qemu.DIGESTS

The old behavior wasn't very consistent since plain disk images aren't
used by all types and the code implementing that was easy to brake,
namely by mistake coreos_production_pxe_image.cpio.gz.DIGESTS became
coreos_production_pxe.vmlinuz.DIGESTS a couple releases ago.

The old names will continue to exist as well for the time being to avoid
breaking existing install/download scripts and the original pxe DIGESTS
name is back.
2014-01-29 17:23:10 -08:00
Michael Marineau
feb59db9f5 fix(release_util): Add argument to specify the name to use for .DIGESTS
For multi-file uploads we should explicitly declare what the name of the
.DIGESTS file should be instead of using the first file name. Relying on
the ordering was subtle and easy to break.
2014-01-29 16:30:03 -08:00
Michael Marineau
b3e81f22e4 fix(image_to_vm): Wrap upload_image in vm_upload.
This keeps all references to VM_GENERATED_FILES inside of
build_library/vm_image_util.sh so changes that impact it more obvious.
2014-01-29 14:01:33 -08:00
Alex Polvi
abd1c40b3d usr(locale): delete local and lvm stuff that is not needed 2014-01-23 16:14:14 -08:00
Michael Marineau
b06c7896f9 fix(build_image): Properly configure portage in dev images.
This replaces the hack in the gmerge ebuild of just copying over a
single package.provided file to create a profile that sorta works.
2014-01-23 14:13:21 -08:00
Michael Marineau
13413947ad Merge pull request #150 from marineam/smp
fix(qemu): Enable all available CPU features and SMP by default
2014-01-22 16:09:40 -08:00
Michael Marineau
fdfe2c2e6e fix(tmpfiles): auto-generate tmpfiles based on .keep
To avoid having to sync directory creation and tmpfiles installed by
ebuilds just require ebuilds to do `keepdir /etc/path` and this script
will handle the rest. A possible extension would be to update to handle
symlinks in addition to directories in gen_tmpfiles.py
2014-01-22 12:16:35 -08:00
polvi
20f8ae73a8 Merge pull request #154 from polvi/usr-rm-from-prod
usr(build-artifacts): remove some things that portage automatically crea...
2014-01-21 16:47:36 -08:00
Alex Polvi
3647ecb1cc use rmdir 2014-01-21 16:43:16 -08:00
Michael Marineau
b95f4eb0fc fix(test_image_content): Remove check for localtime symlink
We no longer provide this symlink, it was always broken anyway.
2014-01-21 16:40:01 -08:00
Alex Polvi
98d9fdb925 usr(build-artifacts): remove some things that portage automatically creates 2014-01-21 13:01:09 -08:00
Michael Marineau
b5ebd7e32e Merge pull request #152 from marineam/remount
Some -usr updates
2014-01-20 11:17:11 -08:00
Michael Marineau
453c784779 fix(build_image): Only clear UUID on rootfs/usr filesystems.
The funky UUID and other special settings should only be applied to
coreos-rootfs and coreos-usr partitions which will never be fscked. When
STATE becomes ROOT in -usr images it gets fsked while mounted read-only
and fsck updates the filesystem's UUID if it is blank. Turns out this
causes disagreement between the kernel and the disk leading to bad
things. A related issue was fixed in a newer version of tune2fs but
unless I missed it the same bugfix didn't make it into e2fsck so
updating wouldn't resolve the issue.

http://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.42.9
2014-01-17 21:41:18 -08:00
Michael Marineau
7e3dd619d1 fix(build_image): Add fstrim commands for -usr images. 2014-01-17 21:09:31 -08:00
Michael Marineau
825dfd63ee fix(build_image): Remount via new stand-alone units.
Replaces the old dev-mode script that sorta took a shotgun "remount and
hope for the best" approach. New units provided by coreos-init.
2014-01-17 21:09:31 -08:00
Michael Marineau
12e0f8dddd fix(qemu): Enable all available CPU features and SMP by default 2014-01-17 00:23:24 -08:00
Michael Marineau
b312044172 fix(build_image): Set read-only hack on correct filesystem.
Check if the disk layout is a /usr layout and if so hack the USR-A
partition, not whatever is mounted to /. Also use the new functionality
in disk_util for this as it can look up partitions by label.
2014-01-16 23:23:41 -08:00
Michael Marineau
8418179ff4 fix(build_library): Add amd64-usr board and disk layouts.
The basic infrastructure to support this is now in place. Add a new
board that uses the experimental coreos/amd64/usr profile /usr based
disk layouts. This is just enough to successfully build images, they
aren't bootable yet.
2014-01-05 18:39:47 -08:00
Michael Marineau
96da63e87e fix(create_legacy_bootloader_templates.sh): Support -usr layouts
The boot kernel parameters change depending on whether the new /usr
scheme is in use. Pass the disk layout to the bootloader config script
and adjust generated configs accordingly.
2014-01-05 18:39:47 -08:00
Michael Marineau
bfe47817e4 fix(build_image): Add support for COREOS_DISK_LAYOUT_SUFFIX
Append COREOS_DISK_LAYOUT_SUFFIX from the portage profile to disk layout
names. Allows switching from "base" to "base-usr" and similar.
2014-01-05 18:39:47 -08:00
Michael Marineau
e84f922ba5 fix(build_library): remove references to chromeos-common.sh
Nothing from chromeos-common.sh is needed for image building now. Also
kill off build_common.sh which was just a weird way of sourcing
common.sh. The two piddly functions it provided fit better in
build_image_util.sh
2014-01-05 18:39:47 -08:00
Michael Marineau
19ecd4572f fix(disk_util): Sort mount order instead of special casing /
Now that /usr is a mount point we need to make sure it gets mounted
before /usr/share/oem. Simply sorting by path length works well enough.
2014-01-05 18:39:47 -08:00
Michael Marineau
ba532952b1 fix(disk_util): Fix layout inheritance in config verification. 2014-01-05 13:55:52 -08:00
Michael Marineau
3546256597 fix(vm_image_util): Unmount STATE before making squashfs 2014-01-04 21:39:31 -08:00