Commit Graph

1496 Commits

Author SHA1 Message Date
Jenkins
010fef9843 Merge "Trigger SELinux autorelabel on first boot." 2013-05-15 22:32:42 +00:00
Jenkins
958badb36f Merge "An element for putting SELinux in permissive mode" 2013-05-15 22:19:04 +00:00
Jenkins
2e244fb720 Merge "install redhat-lsb before pre-install.d baseline-tools" 2013-05-15 22:13:17 +00:00
Jenkins
606f67643b Merge "install redhat-lsb-core instead of redhat-lsb" 2013-05-15 22:13:08 +00:00
Jenkins
2e3dbac7c1 Merge "Enable serial console for fedora" 2013-05-15 22:12:38 +00:00
Steve Baker
d36ecfb75c Trigger SELinux autorelabel on first boot.
This adds about 30 seconds to my local boot time.

Fixes bug #1179730

Change-Id: I519bb9289236abd43f8eb784768dcab10e2e5754
2013-05-14 12:03:24 +12:00
Steve Baker
3bf171b2b5 An element for putting SELinux in permissive mode
This is useful for selinux debugging, so is most useful in its own
optional element.

Change-Id: I83532242eacbe211d3bb13e00436f682ca6d7e76
2013-05-14 11:56:28 +12:00
Steve Baker
c6da246b73 Fix for running /etc/rc.local on Fedora
With systemd rc.local lives in /etc/rc.d and is only run
if the rc-local service is enabled.

This change creates a /etc/rc.d/rc.local symlink, and modifies img-functions
prepare_first_boot to tolerate an initially missing /etc/rc.local.

Fixes bug #1179674

Change-Id: I7e6102b62224950c1de5d48205dc4feff60f9389
2013-05-14 11:48:58 +12:00
Jenkins
ffdf0ba7ff Merge "Honor $DIB_IMAGE_SIZE." 2013-05-13 17:56:17 +00:00
Tim Miller
9983245249 Honor $DIB_IMAGE_SIZE.
The recent change to use loopdev instead of nbd stopped
honoring the DIB_IMAGE_SIZE setting.

This change adds it back, by resizing the image to
DIB_IMAGE_SIZE GB, if specified. If unspecified, it resizes
the image to (actual usage + 20%), as it did before this change.

Change-Id: I69afd9584e644ddacc948619100f153d3d8713a4
2013-05-13 10:20:53 -07:00
Steve Baker
04e8d1cc00 install redhat-lsb before pre-install.d baseline-tools
baseline-tools expects lsb_release (although tolerates it not being there)

Order needs to be 01-override-yum-arch, 02-lsb, 03-baseline-tools
hence the renames.

Possibly lsb_release isn't cared enough about to do this.

Change-Id: I03abffb1ab2f560e746ba4ffd407605de31f4930
2013-05-13 15:58:31 +12:00
Steve Baker
aea625d64d install redhat-lsb-core instead of redhat-lsb
The later pulls in most of a desktop. The former still pulls in a lot
but significantly less, and still provides lsb_release.

Change-Id: Ie27310f01c037b4a10feb5e380e6f5c4ecf21364
2013-05-13 15:55:51 +12:00
Steve Baker
3c3ee47e82 Enable serial console for fedora
Change-Id: Ic3695f643f3d00457fd97d18863793d60d3f211d
2013-05-13 11:15:59 +12:00
Clint Byrum
6b44b6d274 Fix fedora fstab so / is mounted rw properly.
Change-Id: I8001b3fdb3fecb70cda388450222c60a2bd0a58b
2013-05-10 00:05:56 -07:00
Jenkins
2536d3f28d Merge "Retry losetup -d for up to 10 seconds." 2013-05-09 23:08:29 +00:00
Robert Collins
a8707cc152 Add an element to configure a serial console.
With ILO and other remote machine management cards, a serial console is
actually useful.

Change-Id: I86f74d9dae3821b4682df813c5b52a83a29a138a
2013-05-10 07:38:31 +12:00
Clint Byrum
20661e8d80 Retry losetup -d for up to 10 seconds.
When partition tables are added to loopback devices, this can set off a
chain of udev hooks that may still be holding the loopback open. Failing
to detach loopback devices was the reason we were seeing leaked tmpfs
volumes.

Fixes bug #1178091

Change-Id: I836d6e2bbce824951dd4786e3ef28273ea18ee73
2013-05-09 09:34:53 -07:00
Jenkins
bd0f73f4cc Merge "Use conditional GET to fetch latest ubuntu image." 2013-05-09 05:13:06 +00:00
Jenkins
4506d948ea Merge "Reinstate support for real hardware with Ubuntu." 2013-05-09 01:20:23 +00:00
Lucas Alvares Gomes
e537e046d1 Force the inclusion of /usr/local/bin in PATH.
Sudo compiled with the --with-secure-path option enabled (default on
Ubuntu, Fedora and potentially other distros) will cause sudo to ignore
any changes made to the PATH variable in the user's environment (even when
the -E option is used). Also, some distros might not have /usr/local/bin
set in their sudoers secure_path causing the diskimage-builder to fail
when building an image using such distros as host. This patch will force
the inclusion of the /usr/local/bin in the PATH enviroment variable
inside the chroot.

Change-Id: Idb7156d8ff124bfe685cc721337d9bb21f49dc9e
Fixes: bug #1175980
2013-05-08 23:32:47 +01:00
Robert Collins
d5d775e9b4 Tweak the moved cleanup_dirs to match the original.
Change-Id: I5cb240aa82a5d9ccea539927d355a1f07e728381
2013-05-09 08:32:36 +12:00
Jenkins
fe36ab5554 Merge "Extend mellanox support to disk images." 2013-05-08 19:54:15 +00:00
Jenkins
c26bd8d655 Merge "Remove img-functions from ramdisk-image-create." 2013-05-08 19:51:32 +00:00
Chris Krelle
76d8d98a60 Remove img-functions from ramdisk-image-create.
Ramdisk-image-create sources both img-functions and ramdisk-functions
causing duplicate functions. To correct this situation this patch
removes the import of img-functions from ramdisk-image-create.
It moves cleanup_dirs and run_d functions from img-functions to
common-functions to allow this.

fixes bug 1175427
Authored-by: Chris Krelle <nobodycam@gmail.com>

Change-Id: I971d019b0d92b06d9de661663b49c433e823ea42
2013-05-08 07:39:30 -07:00
Ghe Rivero
a72d3c1af5 Ignore errors when ldd'ing static binaries.
When trying to get the library dependencies from a static program
it fails and die.
This scapes the error and continue with the execution.

Change-Id: Id3463f2dd77a182ce4f9d9d28165d35f17806892
2013-05-08 14:30:22 +02:00
Chris Jones
dbe715e97b Extend mellanox support to disk images.
We need to support mellanox devices in disk images as well as ramdisks.
This adds the requisite element structure to provide that support.

Change-Id: Iaf383f5b32b84fbb69569ef42ec2460ab1b231e5
2013-05-08 11:07:12 +01:00
Jenkins
7893e23435 Merge "Remove tripleo PPA from base element." 2013-05-08 07:58:46 +00:00
Robert Collins
3052127ae0 Reinstate support for real hardware with Ubuntu.
Change-Id: Ibfdcd9c4b707a41258153c15a09d5976311080a0
2013-05-08 19:23:08 +12:00
Clint Byrum
b751213a24 Remove tripleo PPA from base element.
The PPA would have to be updated for each release we want to build for,
including raring. The PPA also gives the tripleo team root on every
built image, something we don't necessarily want.

A shallow review of the packages in the PPA and known elements shows
only one dependency in the tripleo-image-elements heat-cfntools element.

Change-Id: Ic514f929eba26014dd3a0d76d5bb3b8e9e0caf3c
2013-05-07 09:07:35 -07:00
Clint Byrum
d9a2211d14 Only use tmpfs if build machine has 4GB+ RAM.
For machines with low RAM (or no access to /proc/meminfo) the builder
will still run, but will just build inside the filesystem that is
hosting /tmp. This will result in a slower build (especially if there
are a lot of .deb packages installed).

Fixes bug #1175453

Change-Id: I79f2672058c11e377548820df0ab4fad8f47ffdc
2013-05-03 06:55:53 -07:00
Clint Byrum
60a1405eef Use conditional GET to fetch latest ubuntu image.
This also switches to using curl which some people may not have
installed. However, curl is far superior for this type of download.

Change-Id: I7ac5a84b30eb8daad320c082f976931c41a24669
2013-05-03 00:38:31 -07:00
Jenkins
f13570d322 Merge "Fix architecture filter." 2013-05-02 20:37:58 +00:00
Robert Collins
d119c28f49 Revert "Improve Fedora build host support."
This reverts commit 591059ffd3.

Change-Id: I8ad5bde2eabe12c6575d51e7443d9b46521c0928
2013-05-03 08:16:43 +12:00
Chris Jones
488c462dcd Fix architecture filter.
If we are using uname to collect the name of the architecture, we need
to filter its output to make it consistent with dpkg. This is now
happening in the right place to avoid a spurious warning on i386 builds.

Change-Id: Iae80dbfb757fc068155730686841c742acb7a6a2
2013-05-02 20:58:48 +01:00
Jenkins
55993863fc Merge "Improve Fedora build host support." 2013-05-02 19:30:43 +00:00
Jenkins
999296272c Merge "Add few other packages to the map list for fedora." 2013-05-02 19:16:54 +00:00
Jenkins
90a64d745b Merge "Fix up the conflict between audit and glibc packages." 2013-05-02 19:16:11 +00:00
Robert Collins
f725be5dd1 Unbreak grub for precise.
Change-Id: I5739b95e08c25d732223ad36d00aa1a46f67ff28
2013-05-02 16:30:03 +12:00
justin-hopper
6dae56c452 Fix GRUB command quote escape for VM element
Quotes were being eaten by bash

Change-Id: Ib33be02eeb703df5b23fc8d0b312f480c69f1b1b
Fixes: bug #1175374
2013-05-01 15:47:27 -07:00
Jenkins
9e9f5fecb8 Merge "Fix missing export of $ARCH" 2013-05-01 20:47:39 +00:00
justin-hopper
b7bcbe6215 Fix GRUB for for precise
--target param is not supported in precise

Change-Id: Ie369ed9d53dbb462cf253144251da4d5c463107c
Fixes: bug #1175275
2013-05-01 12:40:23 -07:00
Lucas Alvares Gomes
2cd44bd77c Fix missing export of $ARCH
So that elements can have access to the variable.

Change-Id: I9a63160ef891e3a3a3c6c90856e2539250c8b807
2013-05-01 15:13:24 +01:00
Lucas Alvares Gomes
591059ffd3 Improve Fedora build host support.
Sudo command (even using -E) resets $PATH for security reasons, Fedora
and other distos might have to explicitly add /usr/local/bin to $PATH
in order to run the commands in the chroot environment.

Change-Id: I95068ecf1e7437152e11c6d6789f59bcfd6ae9cc
2013-05-01 09:40:15 +01:00
Robert Collins
e27ac025fc Use a different approach to solving the ramdisk-image-create failure.
Change-Id: I2861927d1989bde1137c253c8b3a48b245c65f19
2013-05-01 15:03:44 +12:00
Tim Miller
7ef33c51db Source img-functions into common-functions.
A recent commit added a call to function cleanup_dirs to
the common-functions file, but this function is not in scope
for all code paths.

The problem can be reproduced like so:
  bin/ramdisk-image-create deploy -o /tmp/foo

Which results in the error:
  bin/../lib/common-functions: line 35: cleanup_dirs: command not found

This change causes cleanup_dirs to be in scope when calling ramdisk-image-create.

Change-Id: Iaf01beb9dd42a9d810d8aed1aa4ce19a5854c09b
2013-04-30 19:36:37 -07:00
Jenkins
39152c1b30 Merge "Improve Fedora build host support: architectures." 2013-05-01 01:52:10 +00:00
Robert Collins
cb62bae9b8 Build images using loopdev instead of qemu-nbd.
Qemu-nbd does not perform well with older versions of qemu due to
the lack of writeback caching mode. It also only builds qcow2 images
and there is a desire for raw image support. Finally, qemu-nbd makes
it very difficult to build images concurrently due to the somewhat
opaque nature of how it selects a /dev/nbd# device. losetup, on
the other hand, makes this process very straight forward.

Change-Id: I309fad8af4fd1e8d1720c17b65e1897a76d5e897
Co-Author: Clint Byrum <clint@fewbar.com>
2013-04-30 08:56:12 -07:00
Lucas Alvares Gomes
5bb6b362d4 Add few other packages to the map list for fedora.
Needed to build some modules with pip.

Change-Id: If6e210bbd68ffe7454069c4b0880ba787733aa7a
2013-04-29 16:03:43 +01:00
Lucas Alvares Gomes
da7e5b837c Fix up the conflict between audit and glibc packages.
Update audit in order to fix up a conflict with a file from the glibc
package on a fresh Fedora 18 install.

Change-Id: Ib44c8415bce4ec47e21626a697cf426b96a9061a
2013-04-26 11:55:10 +01:00
Chris Jones
be48317fc3 Improve Fedora build host support: architectures.
Instead of blindly calling dpkg, we will now perform an appropriate test
and fall back on uname with some subsequent massaging of uname's output
on amd64 and ARM build hosts.

Based on a patch from Lucas Alvares Gomes

Change-Id: I363addd9f8b4d748d50b69f4509ce627aa5676aa
2013-04-25 11:04:02 +01:00