Commit Graph

1091 Commits

Author SHA1 Message Date
Margarita Manterola
cf7f4bd4a4 Add GCE Pro OEM type 2020-12-22 13:52:52 +01:00
Vincent Batts
d46b95ba29
Merge pull request #91 from kinvolk/vbatts/arm
qemu_template: use more cpus for ARM if available
2020-12-15 08:29:10 -05:00
Kai Lüke
ef631cd7af
Merge pull request #106 from kinvolk/kai/aws-pro
Add AWS Pro OEM type
2020-12-15 11:14:25 +01:00
Sayan Chowdhury
95f05a9ad6
dev_container_util.sh: Use the shflags group instead of the default flag
The build_image script invokes the create_dev_container function, and
passes the `FLAGS_group` as param. Use the param, to generate the
binhost URL instead of using the DEFAULT_GROUP which stays as developer
always.

Fixes: kinvolk/Flatcar#298
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-12-14 19:30:08 +05:30
Kai Lüke
f84ca169e5 Add AWS Pro OEM type
This is the initial creation of an AWS Pro image coming with support,
and features added on top of it.
2020-12-09 16:38:28 +01:00
Sayan Chowdhury
9e2098bfff
Update the azure pro package reference to the oem-azure-pro
This commit also fixes the BINHOST URL for the for the developer
container portage

Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-11-25 14:42:56 +05:30
Thilo Fromm
81d4ed8940
Merge pull request #102 from kinvolk/t-lo/build_packages-fix-symlink-run-gcc-config
build_packages, build_image_util.sh: fix up liblto symlink
2020-11-18 14:42:21 +01:00
Thilo Fromm
22b08b0ae4 build_packages, build_image_util.sh: fix up liblto symlink
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2020-11-16 19:06:59 +01:00
Dongsu Park
6eae505f16 build_library: Ignore broken symlink in Kernel source tree
Kernel source tree started to have a broken link
`tools/testing/selftests/powerpc/copyloops/memcpy_mcsafe_64.S`.
Especially in case of Kernel 5.8.18, like:

```
broken link: /usr/src/linux-5.8.18-coreos/tools/testing/selftests/powerpc/copyloops/memcpy_mcsafe_64.S
ERROR   build_packages: test_image_content: Failed symlink check
```

Ignore the symlink when checking broken symlinks.
2020-11-13 17:27:49 +01:00
Dongsu Park
829cec45e8 jenkins: do not configure ccache variables
Setting the invalid CCACHE_ variables resulted in strange failure
in projects depending on meson, newer version like 0.55.3. For example
systemd build fails like the following errors:

```
 * ACCESS DENIED:  utimes:       /mnt/host/source/ccache
 * ACCESS DENIED:  utimes:       /mnt/host/source/ccache

F: utimes
S: deny
P: /mnt/host/source/ccache
A: /mnt/host/source/ccache
R: /mnt/host/source/ccache
C: ccache cc /build/amd64-usr/var/tmp/portage/sys-apps/systemd-246/work/systemd-246-abi_x86_64.amd64/meson-private/sanitycheckc.c -o /build/amd64-usr/var/tmp/portage/sys-apps/systemd-246/work/systemd-246-abi_x86_64.amd64/meson-private/sanitycheckc.exe -O1 -pipe -pipe -D_FILE_OFFSET_BITS=64
```

We should not set up ccache at all, as it has been already disabled in
coreos-overlay repo.
2020-10-26 15:38:57 +01:00
Sayan Chowdhury
8799028007
Add OEM package for QEMU
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-10-08 11:51:24 +05:30
Sayan Chowdhury
9953cc8c8f
build_library: Rename the images to use pro instead of premium
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-09-21 20:31:41 +05:30
Sayan Chowdhury
e66c89ef31
Merge pull request #93 from flatcar-linux/sayan/azure-seperate-build
Add Azure OEM and selective private upload
2020-09-21 19:55:23 +05:30
Sayan Chowdhury
cc147a1255
Add the new OEM type, and selective upload azure as private
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-09-19 18:58:12 +05:30
Vincent Batts
ed7de96c1f
qemu_template: shell lint and update
Signed-off-by: Vincent Batts <vbatts@kinvolk.io>
2020-09-16 10:30:07 -04:00
Vincent Batts
a97df50696
qemu_template: use more cpus for ARM if available
But don't hog all `VM_NCPUS`, as we are still emulating them

Signed-off-by: Vincent Batts <vbatts@kinvolk.io>
2020-09-15 17:39:35 -04:00
Marga Manterola
c832af024e grub.cfg: Stop probing for UUID 0x01 2020-08-04 11:45:29 +02:00
Kai Lüke
cfdb7b0ab7
build_library/toolchain_util.sh: Remove old download code for Rust
The SDK now includes a Rust version with the aarch64 cross-compilation
libraries and the toolchain job doesn't build it anymore. Yet it was
still recompiled because the path had changed.
Remove the adjustment of the download URL and any automatic building
of Rust. Just issue a warning so that any problem can be spotted easily.
This change does not affect the SDK bootstrapping (full or just stage4)
but affects ./build_packages and the toolchains job. For the toolchains
job the crossdev setup is missing anyway and rebuilding wouldn't help
but only downloading, yet since in stage4 there are no binary package
URLs at all, it's best to remove this step and if it is needed later,
the warning will help.
2020-07-31 22:54:53 +02:00
Kai Lüke
c016b581b4
build_library/catalyst.sh: Specify which gcc package to rebuild
The default update seed command does only specify gcc which leads to
an error because »The short ebuild name "gcc" is ambiguous«.
Choose the standard package name instead of the cross compiler packages
which are only known to emerge because we build them as part of an SDK
release now.
2020-07-27 20:31:17 +02:00
Kai Lüke
6754d2d979
build_library/template_vmware.ovf: Newer OS type and hardware version
The VM hardware and OS type versions were outdated and resulted in
features not being available by default.
Choose a newer ESXi host version (requires 6.5) and set the guest
OS type to Linux 3.x 64 bit.
2020-07-09 12:19:23 +02:00
Marga Manterola
e04156a0f1
bootstrap_sdk: build and upload SDK toolchain pkgs
Before, we were relying on the toolchains job to build and upload
packages that were part of the SDK. With this change, all packages that
should be part of the SDK are built and uploaded by the SDK job. The
toolchains job only builds toolchain packages specific for the release.

This change includes several adjustments done to both the SDK and the
toolchains jobs to make this work:
 * Make the SDK job build all cross toolchains, including Rust
 * Stop building Rust in the toolchains job and use the one in the SDK
   instead.
 * In toolchain_util.sh: detect when the symlink folder for crossdev
   packages is missing and run crossdev to create it during
   update_chroot setup.
 * Make it possible to build the SDK starting from stage 4 instead of
   stage 1, to make the SDK building faster for PR branches / nightlies
   (full build should still be done for releases / weeklies).
2020-06-29 15:18:55 +05:30
Dongsu Park
4e109a49cf
Merge pull request #72 from flatcar-linux/dongsu/catalyst-rust-alpha
build_library/catalyst: Update virtual/rust during catalyst stage1 for alpha
2020-06-18 12:06:50 +02:00
Kai Lüke
3dadf125c8
Filter out unicode characters in package content list
For some unicode characters in ca-certificates file names "rev" complains
about an "invalid or incomplete multibyte or wide character"
and gives no output.
Filter out any unexpected characters for "rev" and replace them with "?"
so that "ls some?name" will still resolve the original name.
2020-06-11 18:00:12 +02:00
Dongsu Park
b13976285e build_library: deal with both virtual/rust and dev-lang/rust
Toolchain utils have installed only `dev-lang/rust`. It could result
in version mismatch between `virtual/rust` and `dev-lang/rust`, because
`dev-lang/rust` does not automatically pull in `virtual/rust`.

So install `virtual/rust` instead of `dev-lang/rust`.
2020-06-10 20:30:22 +02:00
Dongsu Park
8047522874 build_library/catalyst: Update virtual/rust during catalyst stage1
Install `virtual/rust` to avoid version conflicts that happen in case of
rust versions in the SDK being different from those in the new ebuilds.

`/usr/share/catalyst/targets/stage1/stage1-chroot.sh` installs gcc and
its dependencies, including `dev-lang/rust`, while `virtual/rust` does
not get updated. That results in version conflicts between
`virtual/rust` and `dev-lang/rust`. To avoid such an issue, we should
update also `virtual/rust` when building stage1. Since `virtual/rust`
automatically pulls in `dev-lang/rust`, we do not need to explicitly
specify `dev-lang/rust` here.
2020-06-10 20:28:40 +02:00
Kai Lüke
c7ad59e28c
build_library: Enhance license info and store it on the image
The license JSON file did only include the package names but not
any other metadata. Also since the file was not on the image itself,
it had to be downloaded.
Add more metadata to the license JSON and store it on the image.
2020-06-09 21:09:44 +02:00
Benjamin Gilbert
1c0da3c910
test_image_content: whitelist OpenSSL GLSA
We updated to 1.0.2u instead of 1.1.1g.
2020-05-22 15:30:54 +02:00
Benjamin Gilbert
42a45ac727
test_image_content: whitelist some GLSAs
Git was fixed by updating to 2.23.3, not 2.26.2.  Python and QEMU are
only in the SDK.
2020-05-22 15:30:48 +02:00
Benjamin Gilbert
df718abc57
test_image_content: whitelist some GLSAs
systemd and sudo are already fixed.  Git was fixed by updating to 2.23.2,
not 2.24.1.  Samba is 2 years old and customized, thus difficult to update.
file, Python, and gdb are only in the SDK.
2020-05-22 15:30:30 +02:00
Kai Lüke
15681e1d77
Support the /boot/coreos/first_boot flag file
If a user or old software creates the flag file on the old CoreOS location,
nothing would happen.
Check the old location, too, so that Ignition is rerun.
2020-05-22 15:22:46 +02:00
Kai Lüke
76abe2e8c5
set_lsb_release: update codename 2020-05-18 12:22:51 +02:00
Thilo Fromm
56341ea725 qemu_template.sh: update naming CoreOS -> Flatcar 2020-05-15 15:25:27 +02:00
Kai Lüke
06c4894f71
SDK: Take environment variable to specify SDK location
The dev build SDKs are not in $FLATCAR_DEV_BUILDS/sdk but published under
$FLATCAR_DEV_BUILDS/developer/sdk.
Add an environment variable to specify where the SDK is to be found
but default to $FLATCAR_DEV_BUILDS/sdk if it is not specified.
From Jenkins this variable is exported as DOWNLOAD_ROOT_SDK.
2020-05-14 16:03:15 +02:00
Kai Lüke
74f04c59f7
Reuse correct binary packages for a Flatcar version
Two Flatcar versions were used in /etc/portage/make.conf both in the SDK
and in the boards.
Use only a single version by default to get the expected results and not
something else when using binary packages.

The Rust crossdev package was never uploaded to /sdk/ and always
had to be compiled again.
Upload it in a separate toolchain-arm64 directory because /Packages in /crossdev/
doesn't refer to the Rust package and its use flags.
2020-05-11 15:45:21 +02:00
Kai Lüke
d1fb202fe2
build_library/dev_container_util.sh: Use correct BINHOST URLs
The BINHOST was still configured to be the CoreOS CL upstream location
which does not work for independent Flatcar CL releases. This broke
binary package installation in the development container.
Use the correct BINHOST to fix installation of binary packages in the
development container.
2020-05-04 13:17:59 +02:00
Kai Lüke
aebba12996
build_library/template_vmware.ovf: Document and add cloud-init OVF vars
The configuration variables for the Ignition configuration also serve as
data source for coreos-cloudinit config data (which includes plain scripts).
Document them properly and also call out that the networking variables only
work if coreos-cloudinit data is used.
For some use cases, too few networking variables were available. Add secondary
routing variables for the main network interface and add a second interface.
2020-04-27 13:48:10 +02:00
Kai Lüke
42cf3423d4
build_library/template_vmware.ovf: Remove old CoreOS OVF variables
There was a logical mistake in Ignition that caused ignition.config.*
only to work when it was part of the ovfenv. Thus they were added but
the old CoreOS variables marked deprecated and kept. With both as OVF
variables each of them worked but directly specifying ignition.config.*
as guest variable still didn't because of the logical mistake.
Now there is a fix and both work well when specified directly as guest
variable (https://github.com/flatcar-linux/ignition/pull/11).
Delete the old CoreOS OVF variables because they just clutter the UI
and only the Ignition variables should be used in the UI.
2020-04-17 17:05:02 +02:00
Kai Lüke
687bbefad8
build_library/vm_image_util.sh: Generate iPXE script
Write out an iPXE script file for Packet.
The script uses relative URLs to refer to
the other PXE files and thus can be copied
along with the files to any server.
This is useful because it saves the creation
of an iPXE script for a release/channel on a
third-party service. For CI testing it is
also helpful because the script does not only
end up on the release server but also already
on the Google buckets, refering to unpublished
PXE payloads.
2020-03-18 16:09:40 +01:00
Kai Lüke
f9c8feb09c
build_library/template_vmware.ovf: Use Ignition OVF vars
For the Ignition variables to be usable they need to be
specified in the OVF.
Call out that the CoreOS variables are deprecated to
reduce confusion when both are displayed besides each other.
2020-03-10 13:18:36 +01:00
Kai Lüke
1bf2bba4bf
build_library/dev_container_util.sh: Correct repo URLs
Same content as in flatcar-build-2387.
2020-02-19 14:12:02 +01:00
Kai Lüke
42068f1cbc
build_image: Add prodtar command to build a tar ball
Create a tar ball with the contents of the / and /usr partitions
to be used as follows with systemd-nspawn (via machinectl):
  machinectl import-tar flatcar-container.tar.gz flatcar-container
  machinectl start flatcar-container
  machinectl shell flatcar-container
or with docker by converting it to an OCI image:
  docker import -c "CMD /bin/bash" flatcar-container.tar.gz flatcar-container

Since the new "prodtar" command relies on the results of the "prod" command,
it bundles it so that "prod prodtar" and "prodtar" is the same.
2020-02-07 17:33:37 +01:00
Kai Lüke
1a1fcadf0a
Use same APPID for arm64 and amd64
Nebraska supports an additional arch
variable to distinguish both boards.
2020-01-22 10:50:25 +01:00
Andrew Jeddeloh
15745d520e
disk_util: retry loopback mounts if they fail
This fails frequently but should succeed if retried. This should reduce
failed builds.
2020-01-21 13:29:45 +01:00
Andrew Jeddeloh
00d77d199a
build_library/disk_util: work around losetup bug
Retry losetup if it fails, up to 5 times with 5 seconds between retries.
2020-01-21 13:29:30 +01:00
Flatcar Buildbot
8ac3182bc3 2345.0.1 2019-12-05 09:01:56 +01:00
Flatcar Buildbot
c7bbb2b1e2 2345.0.0 2019-12-04 14:59:11 +01:00
Flatcar Buildbot
7ee9c9c033 2331.0.0 2019-11-22 14:34:26 +01:00
Flatcar Buildbot
1dad511f69 2317.0.1 2019-11-07 19:40:01 +01:00
Benjamin Gilbert
bd79eaf9d1 test_image_content: whitelist Perl and dbus GLSAs
Backported the dbus GLSA.  Ignoring the Perl one.
2019-09-10 21:47:55 -04:00
Benjamin Gilbert
97e61a164b test_image_content: whitelist polkit GLSA
Both CVE fixes were backported.
2019-08-24 01:28:29 -04:00
David Michael
9b863fa7ae Revert "build_library: Add temporary workaround for binutils update"
This reverts commit faf07f1b8f.
2019-08-08 15:53:06 +00:00
David Michael
faf07f1b8f build_library: Add temporary workaround for binutils update
Revert this after the new binutils is built into the SDK.
2019-08-03 16:24:27 +00:00
Andrew Jeddeloh
006fe8765d disk_layout: bump dev container from 3 to 4GB
Builds are beginning to run out of space with 3GB. Bump to 4GB.
2019-06-11 21:39:02 +00:00
David Michael
2791e33eb5 Revert "catalyst: Temporarily disable update_seed again"
This reverts commit a85cb08443.
2019-05-02 03:23:07 +00:00
David Michael
a85cb08443 catalyst: Temporarily disable update_seed again
The glib security update blocks itself.  Disable this until a new
SDK is generated, then it can be reverted again.
2019-04-23 03:29:09 +00:00
David Michael
3254c63690 build_library: Drop whitelisted systemd GLSA
This no longer matches since upgrading to 241.
2019-03-12 16:29:48 +00:00
David Michael
4bd4cd5a8e disk_util: Add -I for mkfs.vfat
When loop device partition nodes aren't cleaned up, building images
will fail with:

mkfs.vfat: Partitions or virtual mappings on device '/dev/loop0', not making filesystem (use -I to override)

Just add the flag unconditionally to work around it.
2019-02-10 02:44:01 +00:00
David Michael
cea88d9c52 Revert "catalyst: Temporarily disable update_seed again"
This reverts commit 7d99b4dbdd.
2019-01-28 15:58:47 +00:00
David Michael
06cbc02e0c check_root: Silence libperl warnings 2019-01-25 21:52:27 +00:00
David Michael
7d99b4dbdd catalyst: Temporarily disable update_seed again
The Perl update will break SDK bootstrapping during seed update, so
disable it again.  This can be reverted after bumping the SDK to a
version that includes the new Perl.
2019-01-25 18:12:55 +00:00
David Michael
7b7c78b592 build_library: Drop old workarounds for toolchain binpkgs 2019-01-24 23:25:51 +00:00
David Michael
45c9ef7867 build_library: Drop whitelisted Go GLSAs
Since Go is no longer cross-compiled, it won't hit the boards' GLSA
tests anymore.
2018-12-21 16:27:55 +00:00
David Michael
e1761bee54 Revert "catalyst: Temporarily disable update_seed again"
This reverts commit 373d5a814b.
2018-11-16 14:11:00 +00:00
David Michael
103c7425fe build_library: Whitelist the systemd GLSA until we have 239 2018-11-01 14:45:21 +00:00
David Michael
373d5a814b catalyst: Temporarily disable update_seed again
This works around the edk2 rename breaking SDK bootstrapping.  It
can be reverted when an SDK has the new version built into it.
2018-10-25 17:08:02 -04:00
David Michael
f9432f6702 vm_image_util: Switch back to edk2-ovmf paths
The custom sys-firmware/edk2 package has been replaced by Gentoo's
sys-firmware/edk2-ovmf package now that only amd64 is supported.

This partially reverts 1761d9d071 .
2018-10-25 17:15:03 +00:00
David Michael
2467923d56 Remove arm64 from supported board operations 2018-10-25 16:00:09 +00:00
David Michael
a598864413 catalyst: Update sharedir for catalyst 3 2018-10-19 12:12:46 -04:00
David Michael
23c5b018c6 prod_image_util: Drop /usr/include
This should be covered by INSTALL_MASK, but it apparently gets
confused by a symlink loop installed by json-c.  Remove it here.
2018-10-18 16:32:32 +00:00
David Michael
9adb659106 prod_image_util: Drop the portage cache database 2018-10-18 15:58:27 +00:00
David Michael
729575c22e update_chroot: Allow upgrading glibc and binutils 2018-10-12 17:58:09 +00:00
David Michael
c887cfdce6 bootstrap_sdk: Explicitly set the Python version to 2.7
It has recently started picking Python 3 for /usr/bin/python.
2018-09-28 13:53:13 +00:00
David Michael
5ffb938934 image_to_vm: Fix OEM install roots for new portage 2018-08-30 00:53:17 +00:00
David Michael
afff45366a build_toolchains: Update sysroot settings for newer portage
Since EAPI=7 was supported, portage can no longer use different
ROOT and SYSROOT values.  This adjusts the paths so that the first
phase builds cross-toolchains under /usr/${CHOST}, then the native
toolchains are built under /build/${BOARD} (as was being done
previously).  Now that the cross-toolchain development files can't
be used when building the native toolchain, the headers and libs
are stupidly copied into the board root to be used used and then
overwritten by the board packages as they are built.  Since this is
all done in a chroot, these changes shouldn't affect the SDK host.
2018-08-29 21:40:21 +00:00
David Michael
ecc6d6bd3e build_toolchains: Stop building arm64 toolchains 2018-08-29 18:04:55 +00:00
Andrew Jeddeloh
16d5f05275 build_image: rename dev_image to dev_container 2018-07-25 13:11:17 -07:00
Andrew Jeddeloh
1718adb22a *: remove dev image
The dev image has been broken for some time. Some bits are left because
the dev container (not broken) still uses them. They should be renamed.
2018-07-25 13:11:17 -07:00
David Michael
be1344f12d Revert "catalyst: Temporarily disable update_seed"
This reverts commit efbc542c59.
2018-06-29 13:38:08 +00:00
David Michael
efbc542c59 catalyst: Temporarily disable update_seed
This can be reverted after switching to an SDK with Python 3.6
built into it.
2018-06-25 09:28:37 -04:00
Benjamin Gilbert
25fffe839d build_library: update VMware virtual hardware version to 11
This will run on ESXi 6.0 and above, and all non-EOL versions of Fusion
and Workstation.

Also enable a few useful VMX features (HPET; CPU and memory hotplug) that
are added by VMware Workstation 14.1.1's Change Hardware Compatibility
wizard. Correspondingly, enable CPU/memory hotplug in the OVF; omit
HPET because there's no obvious way to enable it.
2018-05-18 16:23:32 -04:00
Benjamin Gilbert
e9d1fd1d10
Merge pull request #815 from bgilbert/unrestricted
build_library: add --unrestricted to default GRUB menuentry
2018-05-17 17:37:21 -04:00
Benjamin Gilbert
819c0803dd build_library: add --unrestricted to default GRUB menuentry
This allows booting the default entry even if GRUB authentication is
configured in /usr/share/oem/grub.cfg.
2018-05-17 16:57:22 -04:00
Benjamin Gilbert
1717709dbf build_library: avoid obsolete QEMU -net syntax
It's been deprecated since QEMU 0.12. Fixes warning on QEMU startup:

    qemu-system-x86_64: -net nic,vlan=0,model=virtio: 'vlan' is deprecated. Please use 'netdev' instead.
2018-05-15 17:33:27 -04:00
Benjamin Gilbert
72bd0b175b build_library: attach virtio-rng-pci device to QEMU VMs
Pass /dev/urandom through to QEMU VMs. (Not /dev/random, to avoid
draining the host's entropy.) This speeds initialization of VM entropy.
2018-05-15 17:22:24 -04:00
Benjamin Gilbert
0e83301d8c build_library: drop oracle_oci_qcow image format
Images have been published to the release buckets, but never to OCI.
2018-04-25 22:40:29 -04:00
David Michael
a9f4311f86 build_library: Whitelist the new Go 1.10 GLSA
This is the same story as the others: our images will fail the GLSA
checks as long as we build old Go versions.  However, this one will
fail for any version less than 1.10.1 now.
2018-04-16 13:21:21 -04:00
Benjamin Gilbert
fdf8cc2cda Revert "Revert "disk_util: use FAT32 on ESP""
FAT32 seemed to aggravate https://github.com/coreos/bugs/issues/2284, but
now that that issue has been addressed, we can return to the correct
filesystem type.

This reverts commit 299f8fb3d1.
2018-04-12 17:00:28 -04:00
David Michael
d2f2e11225 update_chroot: Allow upgrading glibc 2018-04-06 18:30:38 -04:00
Benjamin Gilbert
9665a5e6fb
Merge pull request #799 from dongsupark/dongsu/fix-qemu-template
Fix a bug when setting VM_CDROM in qemu template
2018-03-12 17:01:05 -04:00
Dongsu Park
52214f533b build_library: fix a bug when setting a CDROM image
Setting `$VM_CDROM` in the qemu script does not work as expected when
installing Container Linux from the given bootable CDROM image. That's
probably because qemu-system-x86_64 expects another boot option `-boot
order=d` to be able to boot from the given CDROM drive. Let's specify
specify a `-boot` as well as `-drive` option for the given CDROM drive.
2018-03-12 21:38:42 +01:00
David Michael
3383790d28 build_library: Whitelist the new Go 1.9 GLSA
This is the same case as the previous one.  Our Go 1.8 package has
the fix, but none of the older unsupported versions do.  Since we
have multiple installed versions and this says anything less than
Go 1.9 is vulnerable, we have to whitelist it until all older
versions of Go are removed from the OS.
2018-03-07 18:54:15 -05:00
David Michael
09e3c49811 catalyst: Disable ccache
It provides no value when it works, and it's randomly causing
failures to build toolchains due to permissions problems after
certain releases.  This also requires taking it out of FEATURES in
the portage profile (which is the SDK profile by default).

Test Jenkins runs of SDK and toolchains jobs both ran in the same
time as with ccache enabled.
2018-03-05 17:58:25 -05:00
Benjamin Gilbert
086b708c2f set_lsb_release: update codename 2018-01-31 09:37:02 -08:00
David Michael
e9a61e9333
Merge pull request #783 from dm0-/gcc
Upgrade to GCC 6.4.0
2018-01-08 19:35:37 -05:00
Andrew Jeddeloh
5dfe3897b9
Merge pull request #778 from ajeddeloh/prod-default
*: make prod images default
2018-01-05 12:50:39 -08:00
David Michael
73dc0c971c build_library: Drop the binutils GLSA from the whitelist 2018-01-04 17:41:13 -05:00
David Michael
ac8402c1aa update_chroot: Allow upgrading binutils and GCC
Normally toolchains packages are prevented from upgrading.  This
drops that restriction and explicitly removes old versions so that
conflicting tool profiles are not accidentally used.

This reverts commit 20975049b3.
2018-01-04 14:27:47 -05:00
Andrew Jeddeloh
be16e7ce3f *: remove --prod_image in other scripts 2017-12-21 14:44:23 -08:00
Andrew Jeddeloh
299f8fb3d1 Revert "disk_util: use FAT32 on ESP"
This reverts commit 7f058d61a1.

Reverting because of bug 2284 [1] where grub will sometimes fail due to
memory corruption. This is _not_ the cause of the bug, and the bug can
even be reproduced with this reversion, but it seems to occur less when
not using fat32.

[1] https://github.com/coreos/bugs/issues/2284
2017-12-18 13:36:56 -08:00
Benjamin Gilbert
7f058d61a1 disk_util: use FAT32 on ESP
mkfs.vfat was defaulting to FAT16 based on the size of the partition.
The UEFI spec (2.7 errata A, section 13.3) implies that only FAT32 is
necessarily supported on the ESP, and we've received a report of
hardware that doesn't recognize FAT16.
2017-11-13 11:27:31 -08:00
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