diff --git a/bin/dib-lint b/bin/dib-lint index c30e928c..1755270f 100755 --- a/bin/dib-lint +++ b/bin/dib-lint @@ -158,11 +158,24 @@ for i in $(find $ELEMENTS_DIR -type f \ fi fi - # check that environment files don't "set -x" + # check that environment files don't "set -x" and they have no executable + # bits set if [[ "$i" =~ (environment.d) ]]; then if grep -q "set -x" $i; then error "Environment file $i should not set tracing" fi + if [[ -x $i ]]; then + error "Environment file $i should not be marked as executable" + fi + fi + + # check for + # export FOO=$(bar) + # calls. These are dangerous, because the export hides the return + # code of the $(bar) call. Split this into 2 lines and -e will + # fail on the assignment + if grep -q 'export .*\$(' $i; then + error "Split export and assignments in $i" fi # check that sudo calls in phases run outside the chroot look diff --git a/diskimage_builder/elements/apt-sources/test-elements/test-sources/environment.d/00-set-apt-sources b/diskimage_builder/elements/apt-sources/test-elements/test-sources/environment.d/00-set-apt-sources index 8442fc17..8034daf6 100644 --- a/diskimage_builder/elements/apt-sources/test-elements/test-sources/environment.d/00-set-apt-sources +++ b/diskimage_builder/elements/apt-sources/test-elements/test-sources/environment.d/00-set-apt-sources @@ -1 +1,2 @@ -export DIB_APT_SOURCES=$(mktemp) +DIB_APT_SOURCES=$(mktemp) +export DIB_APT_SOURCES diff --git a/diskimage_builder/elements/centos/environment.d/00-bootloader.bash b/diskimage_builder/elements/centos/environment.d/00-bootloader.bash old mode 100755 new mode 100644 diff --git a/diskimage_builder/elements/cloud-init/README.rst b/diskimage_builder/elements/cloud-init/README.rst index 3a1c8fef..e76e956b 100644 --- a/diskimage_builder/elements/cloud-init/README.rst +++ b/diskimage_builder/elements/cloud-init/README.rst @@ -6,3 +6,12 @@ Install's and enables cloud-init for systems that don't come with it pre-installed Currently only supports Gentoo. + +Environment Variables +--------------------- + +DIB_CLOUD_INIT_ALLOW_PASS_AUTH + :Required: No + :Default: password authentication disabled when cloud-init installed + :Description: customize cloud-init to allow ssh password + authentication. diff --git a/diskimage_builder/elements/cloud-init/post-install.d/21-cloud-init-allow-password-auth b/diskimage_builder/elements/cloud-init/post-install.d/21-cloud-init-allow-password-auth new file mode 100755 index 00000000..643653e2 --- /dev/null +++ b/diskimage_builder/elements/cloud-init/post-install.d/21-cloud-init-allow-password-auth @@ -0,0 +1,22 @@ +#!/bin/bash + +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +# Set cloud-init to allow password authentication +if [ -n "${DIB_CLOUD_INIT_ALLOW_SSH_PWAUTH:-}" ]; then + if [ -f "/etc/cloud/cloud.cfg" ]; then + if [ -z "$(cat /etc/cloud/cloud.cfg | grep ssh_pwauth)" ]; then + echo "ssh_pwauth not exist. append to EOF" + sudo sh -c 'echo "ssh_pwauth: 1" >> /etc/cloud/cloud.cfg' + else + echo "ssh_pwauth exist. make sure ssh_pwauth enabled" + sed -i -e 's/ssh_pwauth: *0/ssh_pwauth: 1/g' /etc/cloud/cloud.cfg + sed -i -e 's/ssh_pwauth: *False/ssh_pwauth: True/g' /etc/cloud/cloud.cfg + sed -i -e 's/ssh_pwauth: *false/ssh_pwauth: true/g' /etc/cloud/cloud.cfg + fi + fi +fi diff --git a/diskimage_builder/elements/debian-minimal/element-deps b/diskimage_builder/elements/debian-minimal/element-deps index 4867362b..158afb10 100644 --- a/diskimage_builder/elements/debian-minimal/element-deps +++ b/diskimage_builder/elements/debian-minimal/element-deps @@ -1,2 +1,3 @@ debootstrap +dib-python pkg-map diff --git a/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall b/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall index f12774d1..7c967e69 100755 --- a/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall +++ b/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall @@ -54,4 +54,13 @@ $apt_get update $apt_get clean $apt_get dist-upgrade -y -$apt_get install -y busybox python sudo +$apt_get install -y busybox sudo + +if [ "$DIB_PYTHON_VERSION" == "2" ]; then + $apt_get install -y python +elif [ "$DIB_PYTHON_VERSION" == "3" ]; then + $apt_get install -y python3 +else + echo "ERROR: DIB_PYTHON_VERSION is '$DIB_PYTHON_VERSION' but needs to be 2 or 3" + exit 1 +fi diff --git a/diskimage_builder/elements/debian-minimal/test-elements/stable-build-succeeds/environment.d/10-set-distro.bash b/diskimage_builder/elements/debian-minimal/test-elements/stable-build-succeeds/environment.d/10-set-distro.bash old mode 100755 new mode 100644 diff --git a/diskimage_builder/elements/debian-minimal/test-elements/testing-build-succeeds/environment.d/10-set-distro.bash b/diskimage_builder/elements/debian-minimal/test-elements/testing-build-succeeds/environment.d/10-set-distro.bash old mode 100755 new mode 100644 diff --git a/diskimage_builder/elements/debian/test-elements/build-succeeds/environment.d/09-debian-stable b/diskimage_builder/elements/debian/test-elements/build-succeeds/environment.d/09-debian-stable old mode 100755 new mode 100644 diff --git a/diskimage_builder/elements/devuser/environment.d/50-devuser b/diskimage_builder/elements/devuser/environment.d/50-devuser old mode 100755 new mode 100644 diff --git a/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces b/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces index 24c109eb..972645a7 100755 --- a/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces +++ b/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces @@ -13,7 +13,6 @@ if [ "$DISTRO_NAME" != "gentoo" ]; then install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.sh /usr/local/sbin/dhcp-all-interfaces.sh fi -DIB_INIT_SYSTEM=$(dib-init-system) if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then if [ -e "/etc/redhat-release" ] ; then # the init system is upstart but networking is using sysv compatabiliy (i.e. Centos/RHEL 6) @@ -23,7 +22,7 @@ if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.conf /etc/init/dhcp-all-interfaces.conf fi elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then - install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-interface@.service /usr/lib/systemd/system/dhcp-interface@.service + install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-interface@.service /usr/lib/systemd/system/dhcp-interface@.service install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-all-interfaces-udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules elif [ "$DIB_INIT_SYSTEM" == "sysv" ]; then install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.init /etc/init.d/dhcp-all-interfaces diff --git a/diskimage_builder/elements/dib-init-system/environment.d/10-dib-init-system.bash b/diskimage_builder/elements/dib-init-system/environment.d/10-dib-init-system.bash index db640993..d683ce89 100644 --- a/diskimage_builder/elements/dib-init-system/environment.d/10-dib-init-system.bash +++ b/diskimage_builder/elements/dib-init-system/environment.d/10-dib-init-system.bash @@ -1 +1,2 @@ -export DIB_INIT_SYSTEM=$(PATH="$PATH:$(dirname $BASH_SOURCE)/.." dib-init-system) +DIB_INIT_SYSTEM=$(PATH="$PATH:$(dirname $BASH_SOURCE)/.." dib-init-system) +export DIB_INIT_SYSTEM diff --git a/diskimage_builder/elements/dib-python/README.rst b/diskimage_builder/elements/dib-python/README.rst index 980f146d..974a8559 100644 --- a/diskimage_builder/elements/dib-python/README.rst +++ b/diskimage_builder/elements/dib-python/README.rst @@ -7,3 +7,6 @@ or python3 executable. This is useful for creating #! lines for scripts that are compatible with both python2 and python3. This does not install a python if one does not exist, and instead fails. + +This also exports a variable DIB_PYTHON_VERSION which will either be '2' or +'3' depending on the python version which dib-python points to. diff --git a/diskimage_builder/elements/dib-python/environment.d/50-dib-python-version b/diskimage_builder/elements/dib-python/environment.d/50-dib-python-version new file mode 100644 index 00000000..27331dbd --- /dev/null +++ b/diskimage_builder/elements/dib-python/environment.d/50-dib-python-version @@ -0,0 +1,28 @@ +# Pick which distros we need to force python2 +if [ -z "${DIB_PYTHON_VERSION:-}" ]; then + if [ "$DISTRO_NAME" == "ubuntu" ]; then + if [ "$DIB_RELEASE" == "precise" ]; then + DIB_PYTHON_VERSION=2 + elif [ "$DIB_RELEASE" == "trusty" ]; then + DIB_PYTHON_VERSION=2 + fi + elif [ "$DISTRO_NAME" == "debian" ]; then + DIB_PYTHON_VERSION=2 + elif [ "$DISTRO_NAME" == "fedora" ]; then + if [ "$DIB_RELEASE" -le 22 ]; then + DIB_PYTHON_VERSION=2 + fi + elif [ "$DISTRO_NAME" == "centos" ]; then + DIB_PYTHON_VERSION=2 + elif [ "$DISTRO_NAME" == "centos7" ]; then + DIB_PYTHON_VERSION=2 + elif [ "$DISTRO_NAME" == "opensuse" ]; then + DIB_PYTHON_VERSION=2 + fi +fi + +if [ -z "${DIB_PYTHON_VERSION:-}" ]; then + DIB_PYTHON_VERSION=3 +fi + +export DIB_PYTHON_VERSION diff --git a/diskimage_builder/elements/dib-python/pre-install.d/01-dib-python b/diskimage_builder/elements/dib-python/pre-install.d/01-dib-python index 2b3f7638..bf4d1c81 100755 --- a/diskimage_builder/elements/dib-python/pre-install.d/01-dib-python +++ b/diskimage_builder/elements/dib-python/pre-install.d/01-dib-python @@ -6,9 +6,9 @@ fi set -eu set -o pipefail -python_path=$(command -v python2 || command -v python3) +python_path=$(command -v python${DIB_PYTHON_VERSION}) if [ -z "$python_path" ]; then - echo "Could not find python2 or python3 executable." + echo "Could not find python${DIB_PYTHON_VERSION} executable." exit 1 fi diff --git a/diskimage_builder/elements/dynamic-login/init-scripts/upstart/dynamic-login.conf b/diskimage_builder/elements/dynamic-login/init-scripts/upstart/dynamic-login.conf old mode 100755 new mode 100644 diff --git a/diskimage_builder/elements/enable-serial-console/install.d/20-stty b/diskimage_builder/elements/enable-serial-console/install.d/20-stty index 8e20b403..6dd695c7 100755 --- a/diskimage_builder/elements/enable-serial-console/install.d/20-stty +++ b/diskimage_builder/elements/enable-serial-console/install.d/20-stty @@ -8,7 +8,6 @@ set -o pipefail SCRIPTDIR=$(dirname $0) -DIB_INIT_SYSTEM=$(dib-init-system) if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then install -m 0644 -o root -g root ${SCRIPTDIR}/ttySx.conf /etc/init/ttySx.conf elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then diff --git a/diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash b/diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash old mode 100755 new mode 100644 diff --git a/diskimage_builder/elements/manifests/environment.d/14-manifests b/diskimage_builder/elements/manifests/environment.d/14-manifests old mode 100755 new mode 100644 diff --git a/diskimage_builder/elements/package-installs/README.rst b/diskimage_builder/elements/package-installs/README.rst index 8d102736..9b453c7c 100644 --- a/diskimage_builder/elements/package-installs/README.rst +++ b/diskimage_builder/elements/package-installs/README.rst @@ -26,6 +26,10 @@ example ``package-installs.yaml`` not-arch: ppc64, ppc64le lshw: arch: ppc64, ppc64le + python-dev: + dib_python_version: 2 + python3-dev: + dib_python_version: 3 example package-installs.json @@ -46,6 +50,7 @@ the following default values:: uninstall: False installtype: * (Install package for all installtypes) arch: * (Install package for all architectures) + dib_python_version: (2 or 3 depending on DIB_PYTHON_VERSION, see dib-python) Setting the installtype property causes the package only to be installed if the specified installtype would be used for the element. See the diff --git a/diskimage_builder/elements/package-installs/bin/package-installs-squash b/diskimage_builder/elements/package-installs/bin/package-installs-squash index 49cc7648..eafdd9f4 100755 --- a/diskimage_builder/elements/package-installs/bin/package-installs-squash +++ b/diskimage_builder/elements/package-installs/bin/package-installs-squash @@ -75,8 +75,12 @@ def collect_data(data, filename, element_name): installtype == elem_installtype) valid_arch = _valid_for_arch(pkg_name, params.get('arch', None), params.get('not-arch', None)) + dib_py_version = str(params.get('dib_python_version', '')) + dib_py_version_env = os.environ.get('DIB_PYTHON_VERSION', '') + valid_dib_python_version = (dib_py_version == '' or + dib_py_version == dib_py_version_env) - if valid_installtype and valid_arch: + if valid_installtype and valid_arch and valid_dib_python_version: data[phase][install].append((pkg_name, element_name)) return data diff --git a/diskimage_builder/elements/pip-and-virtualenv/README.rst b/diskimage_builder/elements/pip-and-virtualenv/README.rst index 5516ed0d..db8f4acb 100644 --- a/diskimage_builder/elements/pip-and-virtualenv/README.rst +++ b/diskimage_builder/elements/pip-and-virtualenv/README.rst @@ -10,3 +10,6 @@ from get-pip.py and pip (respectively). To install pip and virtualenv from package: export DIB_INSTALLTYPE_pip_and_virtualenv=package + +Any element that uses these commands must be designated as +05-* or higher to ensure that they are first installed. diff --git a/diskimage_builder/elements/pip-and-virtualenv/element-deps b/diskimage_builder/elements/pip-and-virtualenv/element-deps index 73d637d4..cb38be3c 100644 --- a/diskimage_builder/elements/pip-and-virtualenv/element-deps +++ b/diskimage_builder/elements/pip-and-virtualenv/element-deps @@ -1,2 +1,4 @@ +dib-python +install-types package-installs source-repositories diff --git a/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/01-install-pip b/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip similarity index 100% rename from diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/01-install-pip rename to diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip diff --git a/diskimage_builder/elements/pip-and-virtualenv/package-installs.yaml b/diskimage_builder/elements/pip-and-virtualenv/package-installs.yaml index 6d38d160..6b62929c 100644 --- a/diskimage_builder/elements/pip-and-virtualenv/package-installs.yaml +++ b/diskimage_builder/elements/pip-and-virtualenv/package-installs.yaml @@ -2,7 +2,22 @@ # early enough because pip depends on it. python-xml: phase: pre-install.d + dib_python_version: 2 python-pip: installtype: package + dib_python_version: 2 +python3-pip: + installtype: package + dib_python_version: 3 python-virtualenv: installtype: package + dib_python_version: 2 +python3-virtualenv: + installtype: package + dib_python_version: 3 +python-dev: + installtype: source + dib_python_version: 2 +python3-dev: + installtype: source + dib_python_version: 3 diff --git a/diskimage_builder/elements/pip-and-virtualenv/pkg-map b/diskimage_builder/elements/pip-and-virtualenv/pkg-map index 508fd004..09e1529f 100644 --- a/diskimage_builder/elements/pip-and-virtualenv/pkg-map +++ b/diskimage_builder/elements/pip-and-virtualenv/pkg-map @@ -2,10 +2,17 @@ "family": { "gentoo": { "python-pip": "dev-python/pip", - "python-virtualenv": "dev-python/virtualenv" + "python-virtualenv": "dev-python/virtualenv", + "python3-dev": "dev-lang/python" }, - "suse" : { - "python-xml": "python-xml" + "suse": { + "python-xml": "python-xml", + "python2-dev": "python2-devel", + "python3-dev": "python3-devel" + }, + "redhat": { + "python2-dev": "python2-devel", + "python3-dev": "python3-devel" } }, "default": { diff --git a/diskimage_builder/elements/pip-cache/environment.d/10-pip-cache b/diskimage_builder/elements/pip-cache/environment.d/10-pip-cache old mode 100755 new mode 100644 diff --git a/diskimage_builder/elements/python-brickclient/README.rst b/diskimage_builder/elements/python-brickclient/README.rst new file mode 100644 index 00000000..24612815 --- /dev/null +++ b/diskimage_builder/elements/python-brickclient/README.rst @@ -0,0 +1,34 @@ +python-brickclient +================== + +* This element is aimed for providing cinder local attach/detach functionality. +* Currently the feature has a dependency on a known bug + "https://launchpad.net/bugs/1623549", which has been resolved and will be part + of the upstream with the next release of python-brick-cinderclient-ext. + Note: Current version of python-brick-cinderclient-ext i.e. 0.2.0 requires and update + to be made in Line32 fo below script. + /usr/share/python-brickclient/venv/lib/python2.7/site-packages/brick_cinderclient_ext/__init__.py + update "brick-python-cinderclient-ext" to "python-brick-cinderclient-ext". + +* Usage: + Pass the below shell script to parameter 'user-data' and set 'config-drive=true' + at the time of provisioning the node via nova-boot to make cinder local + attach/detach commands talk to your cloud controller. + [Example of Config Drive Script] + #!/bin/bash + FILE="/etc/bash.bashrc" + [ ! -f "$FILE" ] && touch "$FILE" + echo 'export OS_AUTH_URL="http://:5000/v2.0"' >> "$FILE" + echo 'export OS_PASSWORD="password"' >> "$FILE" + echo 'export OS_USERNAME="demo"' >> "$FILE" + echo 'export OS_TENANT_NAME="demo"' >> "$FILE" + echo 'export OS_PROJECT_NAME="demo"' >> "$FILE" + exec bash + To attach: /usr/share/python-brickclient/venv/bin/cinder local-attach + To detach: /usr/share/python-brickclient/venv/bin/cinder local-detach + +* Alternatively, the same action can be completed manually at the node which does + not require setting up of config drive such as: + /usr/share/python-brickclient/venv/bin/cinder --os-username demo --os-password \ + password --os-tenant-name demo --os-project-name demo \ + --os-auth-url=http://:5000/v2.0 local-attach diff --git a/diskimage_builder/elements/python-brickclient/element-deps b/diskimage_builder/elements/python-brickclient/element-deps new file mode 100644 index 00000000..d397eed2 --- /dev/null +++ b/diskimage_builder/elements/python-brickclient/element-deps @@ -0,0 +1,2 @@ +package-installs +pip-and-virtualenv diff --git a/diskimage_builder/elements/python-brickclient/package-installs.yaml b/diskimage_builder/elements/python-brickclient/package-installs.yaml new file mode 100644 index 00000000..7e371d23 --- /dev/null +++ b/diskimage_builder/elements/python-brickclient/package-installs.yaml @@ -0,0 +1,3 @@ +libssl-dev: +libffi-dev: +python-dev: diff --git a/diskimage_builder/elements/python-brickclient/pkg-map b/diskimage_builder/elements/python-brickclient/pkg-map new file mode 100644 index 00000000..9f9058e1 --- /dev/null +++ b/diskimage_builder/elements/python-brickclient/pkg-map @@ -0,0 +1,14 @@ +{ + "family": { + "redhat": { + "python-dev": "python2-devel", + "libssl-dev": "openssl-devel", + "libffi-dev": "libffi-devel" + } + }, + "default": { + "python-dev": "python-dev", + "libssl-dev": "libssl-dev", + "libffi-dev": "libffi-dev" + } +} diff --git a/diskimage_builder/elements/python-brickclient/post-install.d/55-brick-client-install b/diskimage_builder/elements/python-brickclient/post-install.d/55-brick-client-install new file mode 100755 index 00000000..8e8a19fc --- /dev/null +++ b/diskimage_builder/elements/python-brickclient/post-install.d/55-brick-client-install @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Copyright 2016 Hewlett Packard Enterprise Company, L.P. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then + set -x +fi + +set -eu +set -o pipefail + +PBCDIR=/usr/share/python-brickclient +mkdir $PBCDIR + +# create the virtual environment +virtualenv $PBCDIR/venv + +# Install the required packages inside virtual env +$PBCDIR/venv/bin/pip install python-brick-cinderclient-ext + +ln -s $PBCDIR/venv/bin/python-brickclient /usr/local/bin/python-brickclient diff --git a/diskimage_builder/elements/ramdisk-base/extra-data.d/scripts/d/init-func b/diskimage_builder/elements/ramdisk-base/extra-data.d/scripts/d/init-func old mode 100755 new mode 100644 diff --git a/diskimage_builder/elements/redhat-common/environment.d/50-redhat-common b/diskimage_builder/elements/redhat-common/environment.d/50-redhat-common old mode 100755 new mode 100644 diff --git a/diskimage_builder/elements/svc-map/extra-data.d/10-merge-svc-map-files b/diskimage_builder/elements/svc-map/extra-data.d/10-merge-svc-map-files index 25b3ff56..cd026007 100755 --- a/diskimage_builder/elements/svc-map/extra-data.d/10-merge-svc-map-files +++ b/diskimage_builder/elements/svc-map/extra-data.d/10-merge-svc-map-files @@ -15,7 +15,6 @@ import os import sys -import six import yaml @@ -39,7 +38,7 @@ def merge_data(source, destination, distro): result = dict() result.update(destination) family = os_family(distro) - for servicename, mapping in six.iteritems(source): + for servicename, mapping in source.items(): if servicename in result: raise Exception("%s already found in services list" % servicename) if distro in mapping: diff --git a/diskimage_builder/elements/sysctl/bin/sysctl-write-value b/diskimage_builder/elements/sysctl/bin/sysctl-write-value index e60f5535..b12297f7 100755 --- a/diskimage_builder/elements/sysctl/bin/sysctl-write-value +++ b/diskimage_builder/elements/sysctl/bin/sysctl-write-value @@ -26,7 +26,18 @@ fi FILENAME="/etc/sysctl.d/${NAME}.conf" +if [ -f $FILENAME ]; then + # check to make sure the settings match... otherwise fail + if ! grep -q "^$NAME = $VALUE" $FILENAME; then + echo "Conflicting sysctl.conf setting for $NAME == $VALUE. Found:" + grep "^$NAME" $FILENAME + exit 1 + fi +else + cat > $FILENAME < vm +You can also select a different filesystem by setting the ``FS_TYPE`` +environment variable. + +Note ``--mkfs-options`` are options passed to the mfks *driver*, +rather than ``mkfs`` itself (i.e. after the initial `-t` argument). + Speedups -------- If you have 4GB of available physical RAM (as reported by /proc/meminfo diff --git a/setup.cfg b/setup.cfg index 80ac6fc2..cbc487c7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,8 +3,8 @@ name = diskimage-builder summary = Golden Disk Image builder. description-file = README.rst -author = HP Cloud Services -author_email = openstack-dev@lists.openstack.org +author = OpenStack +author-email = openstack-dev@lists.openstack.org license: Apache License (2.0) home-page = http://docs.openstack.org/developer/diskimage-builder/ classifier = diff --git a/tests/run_functests.sh b/tests/run_functests.sh index 1999d60c..a07a0811 100755 --- a/tests/run_functests.sh +++ b/tests/run_functests.sh @@ -32,6 +32,8 @@ DEFAULT_SKIP_TESTS=( debian-minimal/testing-build-succeeds # Currently failing due to bug in locale generation centos-minimal/build-succeeds + # No longer reasonable to test upstream (lacks a mirror in infra) + centos/build-succeeds ) function log_with_prefix { diff --git a/tox.ini b/tox.ini index b474a8af..c9ad4159 100644 --- a/tox.ini +++ b/tox.ini @@ -39,5 +39,5 @@ commands = python setup.py build_sphinx commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [flake8] -ignore = E126,E127,E125,H202,H302,H803 +ignore = E125,E126,E127,H202,H803 exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,conf.py