Commit Graph

1091 Commits

Author SHA1 Message Date
Benjamin Gilbert
b091c2d0c2 disk_util: drop support for syslinux partition feature
It hasn't been used since 5bfa0c8d20.
2017-11-11 14:39:02 -08:00
Benjamin Gilbert
b1beff7462 build_library: upload kernel config as release artifact
It's useful to have this information available without starting an
image or digging up a binpkg.
2017-11-09 01:28:03 -08:00
Euan Kemp
706e4d588d Merge pull request #766 from euank/board-binhost
dev_image_util: hardcode correct portage binhost
2017-10-25 18:17:34 -07:00
David Michael
e0f6100de8 build_library: Whitelist the Go 1.9 GLSA
We handle Go differently than Gentoo, so our 1.8.4 package includes
the same security fixes.  When all packages are built with Go 1.9,
the older Go packages shouldn't be installed anymore, so this line
can be dropped.
2017-10-23 14:35:52 -07:00
Euan Kemp
dcbc6a8686 dev_image_util: hardcode correct portage binhost
We already hardcode similar urls a bit below (the sync-uri).

Not hardcoding the binhost results in an incorrect value during
embargoed build uploads.
2017-10-23 14:14:58 -07:00
David Michael
20975049b3 Revert "update_chroot: Avoid a portage crash while upgrading binutils"
The binutils update prevents Linux from uncompressing during boot,
so this is being put off until it's fixed.

This reverts commit 5e659964d0.
2017-10-19 08:43:41 -07:00
David Michael
059a21701b build_library: Whitelist the binutils GLSA 2017-10-19 08:42:57 -07:00
David Michael
5e659964d0 update_chroot: Avoid a portage crash while upgrading binutils
This omits the toolchain packages' version-pinning flag for the
binutils package while it is being upgraded.  It also removes older
versions installed in parallel that cause unwanted rebuilds.

When stable has the upgraded version, this can be reverted.
2017-09-29 14:10:58 -07:00
David Michael
5e6604c85b Merge pull request #754 from dm0-/rust
check_root: Ignore missing Rust libraries
2017-09-22 16:51:55 -07:00
Benjamin Gilbert
fcbc7c3219 vm_image_util: bump PXE and ISO scripts to 2 GiB RAM
Now that we're shipping multiple docker packages in the image, 1 GiB
is not enough to boot successfully.
2017-09-22 15:52:19 -07:00
David Michael
abc99cc29e check_root: Ignore missing Rust libraries 2017-09-21 14:37:09 -07:00
David Michael
1742e8ce18 build_library: Filter out null paths in torcx manifests
This avoids odd "null" lines appearing in torcx image names.
2017-09-15 12:17:52 -07:00
David Michael
8fde256e45 build_library: Add torcx source packages to the package list
This includes the source package of all torcx packages that are
installed on disk, including cases where multiple versions of the
same package are available.
2017-09-11 15:32:11 -07:00
Euan Kemp
83a16990d1 Merge pull request #737 from euank/torcx-cas
rework torcx uploading to include a manifest
2017-09-08 17:09:54 -07:00
Euan Kemp
d3867403ed build_image: populate torcx store from manifest
This moves the default symlinking logic into build image as well.

This assumes that a torcx store is available locally with all images
referenced in the torcx manifest.

This is accomplished with a highly-indented double-for-loop, but I think
it's still decently readable.
2017-09-08 16:58:51 -07:00
Euan Kemp
31d7b40af3 build_library: add more torcx_manifest helpers
These are useful for the build_image_util code soon to come.
2017-09-08 16:58:51 -07:00
Euan Kemp
8f712b2af1 build_library: add torcx upload/download roots
Torcx is special in that it wishes to be uploaded under a prefixed
directory (torcx), typically wishes to be downloaded from there, but
ultimately wants to be downloaded from a location without that prefix.

In fact, I expect during a normal release process, it will be uploaded
with that prefix to the build bucket, copied without that prefix to the
final bucket (during pre-release), and then finally downloaded without
the prefix.

I think this set of variables ends up being the cleanest way to
represent this complexity.
2017-09-08 16:42:47 -07:00
Euan Kemp
0604b5c40a build_library: add torcx_manifest helper
This implements some basic functionality around working with torcx
manifests.
2017-09-07 12:21:36 -07:00
Benjamin Gilbert
2024326789 build_library: rename oracle_oci image to oracle_oci_qcow
Reserve the unsuffixed name for a raw image, in case we ever want to
support installing to disk using "coreos-install -o" on a PXE-booted
system.
2017-09-06 17:46:07 -07:00
Benjamin Gilbert
51c5345c0d build_library: Add Oracle OCI OEM and format 2017-08-30 03:10:33 -07:00
Geoff Levand
e76030e0e9 build_library: Update qemu script to run on arm64 machines
Signed-off-by: Geoff Levand <geoff@infradead.org>
2017-07-28 14:39:53 -07:00
Geoff Levand
5e94a55069 build_library: Add missing die function
Signed-off-by: Geoff Levand <geoff@infradead.org>
2017-07-28 14:39:53 -07:00
David Michael
71ebc66065 build_library: avoid a SIGPIPE while building arm64 UEFI firmware
This just sets the code file size to the var file size, so it gets
zero-padding without having to pipe commands together.

From: David Michael <david.michael@coreos.com>
[Rebased]
Signed-off-by: Geoff Levand <geoff@infradead.org>
2017-07-27 15:03:58 -07:00
Geoff Levand
1761d9d071 vm_image_util: Update to use edk2 package
Signed-off-by: Geoff Levand <geoff@infradead.org>
2017-07-27 14:51:32 -07:00
David Michael
963fc72f0e check_root: ignore cgi.py in any Python version 2017-07-26 13:04:55 -07:00
David Michael
336ac28026 Merge pull request #695 from dm0-/perl
Add workarounds for upgrading to Perl 5.24
2017-06-26 16:50:23 -07:00
Benjamin Gilbert
e98efe074d build_library: Add vagrant_virtualbox image type 2017-06-22 13:41:15 -07:00
Alex Crawford
65986e02bc build_library: split vagrant and vagrant vbox
This reverts the vagrant image back to using oem-vagrant because we
don't want to break the existing images. It moves the new,
Ignition-powered virtualbox flavor of vagrant into a new image.
2017-06-22 13:23:50 -07:00
Benjamin Gilbert
ab4705f9dc Merge pull request #697 from bgilbert/generic
Drop ISO/PXE support for amd64-generic, and an unused variable
2017-06-21 13:28:55 -07:00
Benjamin Gilbert
1ef4609ef2 scripts: Drop unused BOARD_USE assignments 2017-06-16 19:22:51 -07:00
Benjamin Gilbert
cb8b8f34ca build_library: Drop ISO/PXE support for amd64-generic 2017-06-16 19:05:07 -07:00
Euan Kemp
849af767a6 Merge pull request #692 from AlexNPavel/vagrant-virtualbox
Use new oem packages for virtualbox and vagrant
2017-06-16 17:00:39 -07:00
David Michael
18d89accde Merge pull request #685 from dm0-/torcx
Populate the torcx vendor store in OS images
2017-06-16 15:57:04 -07:00
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