Several elements were using almost similar code to
get the current kernel and initrd inside an image.
After factoring out this code into a common element,
modify the elements to make use of it.
Change-Id: Ib547cd96b2b354b1c97342cacf5f0d0a3f70a3da
Encapsulate the new select-boot-kernel-initrd common function
into an element so other elements can make use of it.
Change-Id: Ie587bd5dae1afebfd5646190dfa951a7949938cd
Ensure cache mount directory exists before its used. The zypper element
would error when attempting to mount the cache directory because the
mount point did not exist. This patch corrects that.
Change-Id: Iaa3c2a0254b12bd847643a61a99f5a234097fd21
Scripts in pre-install.d run as root so there is no need to sudo commands.
This patch also helps avoid an error when sudo is not installed in the
default image.
Change-Id: Iab20edfb161189f8c4e0cfa7d6946f63163d6413
The DIB_CLOUD_IMAGES variable in ubuntu's root.d is already used
everywhere with a /, so we can safely drop it from the default
value.
Change-Id: I39dbd3f4004052fcccb4131dc838759f4c82312a
With this change package name to distro mappings used
within the base element are now stored in the top
level pkg-map file.
Additionally, all bin/install-packages commands are updated
to use the -m option so that the base element pkg-map
namespace is used by default.
Change-Id: I3bdbf987c8525f9ef67ca0c263651d6613f29ef0
Updates the opensuse element's bin/install-packages script
so that if supports using pkg-map instead of map-packages
for package mapping. To make use of the new change
simply add the -m <element name> to allow install-packages
to know which element namespace to use when installing packages.
Use of the new -m option is off by default.
As part of this change we also updated install-packages
to use getopt for in script argument parsing.
Change-Id: I56da8adf6c445c50c7642e221c6c11ba59330404
Updates the dpkg element's bin/install-packages script
so that if supports using pkg-map for package mapping.
To make use of the new change simply add the -m <element name>
to allow install-packages to know which element namespace to use
when installing packages.
Use of the new -m option is off by default.
As part of this change we also updated install-packages
to use getopt for in script argument parsing.
Change-Id: Idfc40f2d75828a0f09d227f0332ccef8f0183efc
export $SYSTEMD_SYSTEM_UNIT_DIR to know where .service files should be
moved.
So far those files are moved directly in /usr/lib/systemd/system whereas
Debian use /lib/systemd/system.
We load the value from the systemd pkg-config file.
The patch don't use pkg-config directly for three reasons:
- environment.d files are run before install.d and the other similar
targets, making hard to install an additional dependency
- the .pc file can easily be parsed using awk
- pkg-config package name is not standard across the different
supported distributions
$SYSTEMD_SYSTEM_UNIT_DIR default value is /lib because, as pointed by James
Slagle, /lib is actually a symlink to /usr/lib/ on Fedora and will work
for Debian and Fedora.
See: https://bugs.debian.org/719634
Change-Id: I413a92284e6a79e7fcdde99c5138bc3ce8e85e80
The 'None' Datasource does not exist in precise 12.04 (which uses
cloud-init 0.6.3), so conditionally ensure that we are not including
this in the datasource_list in case we're building a precise image.
Partial-bug: 1329068
Change-Id: I6efb91e17bf896bbf7d67c31c4eb5098d5d61a71
source-directory ifupdown directive has been introduced in version
0.7.44. Wheezy comes with version 0.7.8.
Without this change, the eth0 interface will never get an IP address on
Wheezy.
Change-Id: If40ed3b82ca78280190b66c06a0a77bb71270d7d
The script to find best kernel from image (used by vm
and baremetal element) is duplicated and is not in sync
with each other. Moving the code to img-functions as a
function will reduce duplicated code and make it reusable
in future.
Since img-functions is not accessible in chroot env,
kernel selection is being moved from finalise.d to
cleanup.d in the vm element.
Change-Id: I8fbccc13a2c61a5191ef9ea5d2a8302a3e43b000
Updates the 51-install-tgt and 52-install-busybox files
in both the deploy-ironic and deploy-baremetal elements
so that they have unique names.
While an end user would never use these elements at the same time we
should always use unique names for things per DIB conventions.
Change-Id: I8926870e45849341c10b2d479ddee45f9b625e2b
While an end user would never use these elements at the same time we
should always use unique names for things per DIB conventions.
Change-Id: I53b10522183e8566c62922b91878e5cf767fe2c6
Both the rpm-distro and redhat-common elements had the
same exact 00-usr-local-bin-secure-path. This commit
deletes the one in redhat-common and leaves the one
in rpm-distro (which is also required by the same
elements).
Change-Id: Ie9ef29d268b3737a6741fce016ef335db6651b59
While an end user would never use both redhat-common and ubuntu
elements at the same time we should always use unique names
for things per DIB conventions.
Change-Id: I2cabc583a1fd41d4fe7fbf8cf93127d49e26aff4
Updates the yum element's bin/install-packages script
so that if supports using pkg-map instead of map-packages
for package mapping. To make use of the new change
simply add the -m <element name> to allow install-packages
to know which element namespace to use when installing packages.
Use of the new -m option is off by default.
As part of this change we also updated install-packages
to use getopt for in script argument parsing.
Change-Id: I19240e74b69859f7faf9cd80440633234a677d63
With this patch, /var/cache/apt/archives directory content is preserved.
The directory is actually a bind mount of the
~/.cache/image-create/apt/$DISTRO_NAME directory, much like what we do
for ccache.
You can use DIB_APT_LOCAL_CACHE=0 to disable this behavior.
This trivial change improve performance A LOT (>30%), even if a local
HTTP proxy because:
- there is no need to copy again and again the same files
- we avoid network latency
The patch has been tested with Debian and Ubuntu with every elements
from the tripleo-image-elements repository, the final size of the cache
directory is about 700MB per distribution subdirectory.
Change-Id: I4fab499493f734c7c546d4d23b1a98f0e7523a39
OVS service is called:
- openvswitch-switch on Debian/Ubuntu
- openvswitch on RHEL/Fedora
This changes is needed to get the neutron element to work
on Debian/Ubuntu with systemd:
I6e3df30dc3a6918f3a949a7dac47289ede5c3d1f
Change-Id: I2748a9db7f8ee456698187a9646bc7cda2256fe7