From 3639ab34c1f4adde040c62cf41d3f91df3eaf1df Mon Sep 17 00:00:00 2001 From: Alan Pevec Date: Dec 03 2015 22:21:47 +0000 Subject: Update to upstream 1.4.0 (Paul Belanger) --- diff --git a/.gitignore b/.gitignore index 1e4e6ad..2f9db28 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /diskimage-builder-0.1.33.tar.gz /diskimage-builder-0.1.34.tar.gz /diskimage-builder-0.1.42.tar.gz +/diskimage-builder-1.4.0.tar.gz diff --git a/0001-Open-MKFS_OPTS-for-extension-in-disk-image-create.patch b/0001-Open-MKFS_OPTS-for-extension-in-disk-image-create.patch deleted file mode 100644 index 76be240..0000000 --- a/0001-Open-MKFS_OPTS-for-extension-in-disk-image-create.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 5a957602cbb1d916fd28b64514a1ec83767b641a Mon Sep 17 00:00:00 2001 -From: Ethan Gafford -Date: Tue, 17 Mar 2015 13:06:38 -0400 -Subject: [PATCH] Open MKFS_OPTS for extension in disk-image-create - -At present, MKFS_OPTS is closed for modification. The ability -to extend the set of MKFS_OPTS adds a great deal of power for -knowledgeable end-users. (And in some specific circumstances, -it is vital to success, as in the case of building RHEL/CentOS -6 images from RHEL/CentOS 7 hosts, in which case -O ^64bit is -required in order for the image to boot.) - -Change-Id: I714e86a5a413779e63f598fbbb5a79d23cf6d8c3 ---- - bin/disk-image-create | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/bin/disk-image-create b/bin/disk-image-create -index 67928ab..ecc3f49 100755 ---- a/bin/disk-image-create -+++ b/bin/disk-image-create -@@ -59,6 +59,8 @@ function show_options () { - echo " Making this value unnecessarily large will consume extra disk space " - echo " on the root partition with extra file system inodes." - echo " --min-tmpfs size -- minimum size in GB needed in tmpfs to build the image" -+ echo " --mkfs-options -- option flags to be passed directly to mkfs." -+ echo " Options should be passed as a single string value." - echo " --no-tmpfs -- do not use tmpfs to speed image build" - echo " --offline -- do not update cached resources" - echo " --qemu-img-options -- option flags to be passed directly to qemu-img." -@@ -94,7 +96,8 @@ IMAGE_TYPES=("qcow2") - COMPRESS_IMAGE="true" - export DIB_ROOT_LABEL="" - DIB_DEFAULT_INSTALLTYPE=${DIB_DEFAULT_INSTALLTYPE:-"source"} --TEMP=`getopt -o a:ho:t:xucnp: -l no-tmpfs,offline,help,min-tmpfs:,image-size:,image-cache:,max-online-resize:,qemu-img-options:,ramdisk-element:,root-label:,install-type: -n $SCRIPTNAME -- "$@"` -+MKFS_OPTS="" -+TEMP=`getopt -o a:ho:t:xucnp: -l no-tmpfs,offline,help,min-tmpfs:,image-size:,image-cache:,max-online-resize:,mkfs-options:,qemu-img-options:,ramdisk-element:,root-label:,install-type: -n $SCRIPTNAME -- "$@"` - if [ $? -ne 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi - - # Note the quotes around `$TEMP': they are essential! -@@ -114,6 +117,7 @@ while true ; do - --image-size) export DIB_IMAGE_SIZE=$2; shift 2;; - --image-cache) export DIB_IMAGE_CACHE=$2; shift 2;; - --max-online-resize) export MAX_ONLINE_RESIZE=$2; shift 2;; -+ --mkfs-options) MKFS_OPTS=$2; shift 2;; - --min-tmpfs) export DIB_MIN_TMPFS=$2; shift 2;; - --no-tmpfs) shift; export DIB_NO_TMPFS=1;; - --offline) shift; export DIB_OFFLINE=1;; -@@ -196,8 +200,6 @@ fi - unmount_image - mv $TMP_BUILD_DIR/mnt $TMP_BUILD_DIR/built - --MKFS_OPTS="" -- - if [ -n "$DIB_IMAGE_SIZE" ]; then - truncate -s${DIB_IMAGE_SIZE}G $TMP_IMAGE_PATH - else -@@ -212,12 +214,12 @@ else - # Very conservative to handle images being resized a lot - # Without -J option specified, default journal size will be set to 32M - # and online resize will be failed with error of needs too many credits. -- MKFS_OPTS="-i 4096 -J size=64" -+ MKFS_OPTS="-i 4096 -J size=64 $MKFS_OPTS" - fi - fi - - if [ -n "$MAX_ONLINE_RESIZE" ]; then -- MKFS_OPTS="$MKFS_OPTS -E resize=$MAX_ONLINE_RESIZE" -+ MKFS_OPTS="-E resize=$MAX_ONLINE_RESIZE $MKFS_OPTS" - fi - - LOOPDEV=$(sudo losetup --show -f $TMP_IMAGE_PATH) diff --git a/0002-Try-5-times-for-rmdir-command-call-after-umount.patch b/0002-Try-5-times-for-rmdir-command-call-after-umount.patch deleted file mode 100644 index dda59ab..0000000 --- a/0002-Try-5-times-for-rmdir-command-call-after-umount.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 61f6cf694c59e0b56d6170701ffdee7e2d4e1d8f Mon Sep 17 00:00:00 2001 -From: "Haomeng, Wang" -Date: Mon, 23 Mar 2015 08:35:41 +0000 -Subject: [PATCH] Try 5 times for rmdir command call after umount - -Sometime, we will get "Device or resource busy" during the mount point -deleting, umount return 0, but the resouce is busy for a while, so need -to add sleep interval to wait resource free, then we can delete it. -Change-Id: Idaa219d12e847824960eec8907739add5d619d1a -Closes-Bug: 1332521 ---- - lib/img-functions | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/lib/img-functions b/lib/img-functions -index 6e94423..852f575 100644 ---- a/lib/img-functions -+++ b/lib/img-functions -@@ -86,7 +86,10 @@ function run_d_in_target () { - trap - ERR - check_break after-$1 run_in_target bash - sudo umount -f $TMP_MOUNT_PATH/tmp/in_target.d -- sudo rmdir $TMP_MOUNT_PATH/tmp/in_target.d -+ if ! timeout 5 sh -c " while ! sudo rmdir $TMP_MOUNT_PATH/tmp/in_target.d; do sleep 1; done"; then -+ echo "ERROR: unable to cleanly remove $TMP_MOUNT_PATH/tmp/in_target.d" -+ exit 1 -+ fi - fi - } - diff --git a/0003-Don-t-trace-RHEL-Registration-scripts.patch b/0003-Don-t-trace-RHEL-Registration-scripts.patch deleted file mode 100644 index 48cdffd..0000000 --- a/0003-Don-t-trace-RHEL-Registration-scripts.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 73c77dfe41622d21b45032c705d713a2af7aaa54 Mon Sep 17 00:00:00 2001 -From: Ben Nemec -Date: Tue, 31 Mar 2015 11:17:00 -0500 -Subject: [PATCH] Don't trace RHEL Registration scripts - -We don't want to trace the RHEL registration scripts because that -is likely to log things like passwords and activation keys. To -still allow for debugging failed runs, add sanitized logging of -the arguments passed to the registration commands, since that is -the part of the process where problems are most likely to manifest. - -Change-Id: I0f661e9c152f43b814fda61211bd56ba93e3b9dc ---- - .../pre-configure.d/06-rhel-registration | 15 ++++++++++++++- - .../rhel-common/pre-install.d/00-rhel-registration | 19 ++++++++++++++++--- - 2 files changed, 30 insertions(+), 4 deletions(-) - -diff --git a/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration b/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration -index 2211a28..79144ee 100755 ---- a/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration -+++ b/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration -@@ -1,6 +1,6 @@ - #!/bin/bash - --# dib-lint: disable=setu sete setpipefail dibdebugtrace -+# dib-lint: disable=dibdebugtrace - - set -eu - set -o pipefail -@@ -109,21 +109,34 @@ if [ -n "${REG_TYPE:-}" ]; then - opts="$opts --type=$REG_TYPE" - fi - -+sanitized_opts=$(echo "$opts" | sed 's/--password \([^ ]*\)/--password ***/g') -+sanitized_opts=$(echo "$sanitized_opts" | sed 's/--activationkey=\([^ ]*\)/--activationkey=***/g') -+ - case "${REG_METHOD:-}" in - portal) -+ echo "Registering with options: $sanitized_opts" - subscription-manager register $opts - if [ -z "${REG_AUTO_ATTACH:-}" ]; then -+ echo "Attaching with options: $attach_opts" - subscription-manager attach $attach_opts - fi -+ echo "Enabling repos: $repos" - subscription-manager $repos - ;; - satellite) -+ # Save an unmodified copy of the repo list for logging -+ user_repos=$repos - repos="$repos --enable ${satellite_repo}" -+ echo "Installing satellite dependencies" - rpm -Uvh "$REG_SAT_URL/pub/katello-ca-consumer-latest.noarch.rpm" || true -+ echo "Registering with options: $sanitized_opts" - subscription-manager register $opts -+ echo "Enabling repos: $user_repos" - subscription-manager $repos -+ echo "Installing katello-agent" - yum install -y katello-agent || true # needed for errata reporting to satellite6 - katello-package-upload -+ echo "Disabling satellite repo because it is no longer needed" - subscription-manager repos --disable ${satellite_repo} - ;; - disable) -diff --git a/elements/rhel-common/pre-install.d/00-rhel-registration b/elements/rhel-common/pre-install.d/00-rhel-registration -index a5ed2d5..305c3ed 100755 ---- a/elements/rhel-common/pre-install.d/00-rhel-registration -+++ b/elements/rhel-common/pre-install.d/00-rhel-registration -@@ -1,8 +1,9 @@ - #!/bin/bash - --if [ "${DIB_DEBUG_TRACE:-1}" -gt 0 ]; then -- set -x --fi -+# This script deals quite a bit with passwords, which we don't ever want -+# included in trace output -+# dib-lint: disable=dibdebugtrace -+ - set -eu - set -o pipefail - -@@ -85,19 +86,31 @@ if [ -n "${REG_TYPE:-}" ]; then - opts="$opts --type=$REG_TYPE" - fi - -+sanitized_opts=$(echo "$opts" | sed 's/--password \([^ ]*\)/--password ***/g') -+sanitized_opts=$(echo "$sanitized_opts" | sed 's/--activationkey=\([^ ]*\)/--activationkey=***/g') -+ - case "${REG_METHOD:-}" in - portal) -+ echo "Registering with options: $sanitized_opts" - subscription-manager register $opts - if [ -z "${REG_AUTO_ATTACH:-}" ]; then -+ echo "Attaching with options: $attach_opts" - subscription-manager attach $attach_opts - fi -+ echo "Enabling repos: $repos" - subscription-manager $repos - ;; - satellite) -+ # Save an unmodified copy of the repo list for logging -+ user_repos=$repos - repos="$repos --enable ${satellite_repo}" -+ echo "Installing satellite dependencies" - rpm -Uvh "$REG_SAT_URL/pub/katello-ca-consumer-latest.noarch.rpm" || true -+ echo "Registering with options: $sanitized_opts" - subscription-manager register $opts -+ echo "Enabling repos: $user_repos" - subscription-manager $repos -+ echo "Disabling satellite repo because it is no longer needed" - subscription-manager repos --disable ${satellite_repo} - ;; - disable) diff --git a/0004-Do-not-export-REG_HALT_UNREGISTER-between-hook-scrip.patch b/0004-Do-not-export-REG_HALT_UNREGISTER-between-hook-scrip.patch deleted file mode 100644 index 7348db1..0000000 --- a/0004-Do-not-export-REG_HALT_UNREGISTER-between-hook-scrip.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 31d5a7d4c99a73596bc2b46ac8cc58556d55b858 Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Wed, 8 Apr 2015 09:28:47 +0200 -Subject: [PATCH] Do not export REG_HALT_UNREGISTER between hook scripts - -Do not rely on environment changes (like exporting REG_HALT_UNREGISTER) -to persist between different hooks run. This helps when the hooks are -run in different new environments every time. - -Instead, in 99-unregister redo the same checks on REG_METHOD as done in -00-rhel-registration, still respecting REG_HALT_UNREGISTER in case the -user does not want to unregister the image generated. - -Change-Id: Id594dcd72334f38a2fa96da21206da77a83d7a1a -Closes-Bug: #1434431 ---- - elements/rhel-common/finalise.d/99-unregister | 12 +++++++++--- - elements/rhel-common/pre-install.d/00-rhel-registration | 1 - - 2 files changed, 9 insertions(+), 4 deletions(-) - -diff --git a/elements/rhel-common/finalise.d/99-unregister b/elements/rhel-common/finalise.d/99-unregister -index 7c56fc3..fbf247f 100755 ---- a/elements/rhel-common/finalise.d/99-unregister -+++ b/elements/rhel-common/finalise.d/99-unregister -@@ -15,6 +15,12 @@ set -o pipefail - # debugging purposes so you can check the portal or satellite to see what was - # registered. Set REG_HALT_UNREGISTER to any non-null value to enable this - # functionality. --if [ -z "${REG_HALT_UNREGISTER:-}" ]; then -- subscription-manager unregister --fi -+case "${REG_METHOD:-}" in -+ portal | satellite) -+ if [ -z "${REG_HALT_UNREGISTER:-}" ]; then -+ subscription-manager unregister -+ fi -+ ;; -+ disable) -+ ;; -+esac -diff --git a/elements/rhel-common/pre-install.d/00-rhel-registration b/elements/rhel-common/pre-install.d/00-rhel-registration -index 305c3ed..4bfb1a2 100755 ---- a/elements/rhel-common/pre-install.d/00-rhel-registration -+++ b/elements/rhel-common/pre-install.d/00-rhel-registration -@@ -115,7 +115,6 @@ case "${REG_METHOD:-}" in - ;; - disable) - echo "Disabling RHEL registration" -- export REG_HALT_UNREGISTER=1 # stops attempt to unregister - ;; - *) - echo "WARNING: only 'portal', 'satellite', and 'disable' are valid values for REG_METHOD." diff --git a/0005-Switch-default-Fedora-image-to-F21.patch b/0005-Switch-default-Fedora-image-to-F21.patch deleted file mode 100644 index b925249..0000000 --- a/0005-Switch-default-Fedora-image-to-F21.patch +++ /dev/null @@ -1,26 +0,0 @@ -From c2dd2d9ac1531a5b8c46def41446ed3e96e1aa9b Mon Sep 17 00:00:00 2001 -From: Derek Higgins -Date: Fri, 10 Apr 2015 16:17:40 +0100 -Subject: [PATCH] Switch default Fedora image to F21 - -Fedora 21 was release 4 months ago, we should switch to use it as default -before it goes EOL. - -Change-Id: I72686911cc21aeb75d61430878dd36c54edb6904 ---- - elements/fedora/root.d/10-fedora-cloud-image | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/elements/fedora/root.d/10-fedora-cloud-image b/elements/fedora/root.d/10-fedora-cloud-image -index 0a2a8a2..ed459ce 100755 ---- a/elements/fedora/root.d/10-fedora-cloud-image -+++ b/elements/fedora/root.d/10-fedora-cloud-image -@@ -23,7 +23,7 @@ if [ -n "$DIB_LOCAL_IMAGE" ]; then - BASE_IMAGE_FILE=`basename $DIB_LOCAL_IMAGE` - BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz - else -- DIB_RELEASE=${DIB_RELEASE:-20} -+ DIB_RELEASE=${DIB_RELEASE:-21} - DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud.fedoraproject.org} - BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-fedora-$DIB_RELEASE.$ARCH.qcow2} - BASE_IMAGE_TAR=$DIB_RELEASE-Cloud-$ARCH-$DIB_RELEASE.tgz diff --git a/0006-Update-packages-earlier.patch b/0006-Update-packages-earlier.patch deleted file mode 100644 index 2eb6e0f..0000000 --- a/0006-Update-packages-earlier.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 9ef539533879b145c33a7241aa4fbc908d515822 Mon Sep 17 00:00:00 2001 -From: Dan Prince -Date: Mon, 13 Apr 2015 13:51:51 -0400 -Subject: [PATCH] Update packages earlier - -Turns out that updating packages last causes some pretty -non-intuitive behaviour if you are trying to pin a package -to a specific version. Lets just update the base RPMs first... -subsequent installations should install the most updated version -anyways (unless they are pinned). - -Also moves the package-installs script from the 00 step to 01 so -we can do the update first. - -Co-Authored-By: Ben Nemec - -Change-Id: I962046cc6048e852e6582fbc579f88bb73e23fdd ---- - elements/base/install.d/00-up-to-date | 11 +++++++++++ - elements/base/install.d/99-up-to-date | 11 ----------- - elements/package-installs/install.d/00-package-installs | 10 ---------- - elements/package-installs/install.d/01-package-installs | 10 ++++++++++ - 4 files changed, 21 insertions(+), 21 deletions(-) - create mode 100755 elements/base/install.d/00-up-to-date - delete mode 100755 elements/base/install.d/99-up-to-date - delete mode 100755 elements/package-installs/install.d/00-package-installs - create mode 100755 elements/package-installs/install.d/01-package-installs - -diff --git a/elements/base/install.d/00-up-to-date b/elements/base/install.d/00-up-to-date -new file mode 100755 -index 0000000..d2b45d7 ---- /dev/null -+++ b/elements/base/install.d/00-up-to-date -@@ -0,0 +1,11 @@ -+#!/bin/bash -+# Fully upgrade everything on the system (if the package manager knows how to -+# do it). -+ -+if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then -+ set -x -+fi -+set -eu -+set -o pipefail -+ -+install-packages -u -diff --git a/elements/base/install.d/99-up-to-date b/elements/base/install.d/99-up-to-date -deleted file mode 100755 -index d2b45d7..0000000 ---- a/elements/base/install.d/99-up-to-date -+++ /dev/null -@@ -1,11 +0,0 @@ --#!/bin/bash --# Fully upgrade everything on the system (if the package manager knows how to --# do it). -- --if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then -- set -x --fi --set -eu --set -o pipefail -- --install-packages -u -diff --git a/elements/package-installs/install.d/00-package-installs b/elements/package-installs/install.d/00-package-installs -deleted file mode 100755 -index e64cbc7..0000000 ---- a/elements/package-installs/install.d/00-package-installs -+++ /dev/null -@@ -1,10 +0,0 @@ --#!/bin/bash -- --if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then -- set -x --fi --set -eu --set -o pipefail -- --package-installs -d $(dirname $0) --package-installs-v2 --phase install.d /tmp/package-installs.json -diff --git a/elements/package-installs/install.d/01-package-installs b/elements/package-installs/install.d/01-package-installs -new file mode 100755 -index 0000000..e64cbc7 ---- /dev/null -+++ b/elements/package-installs/install.d/01-package-installs -@@ -0,0 +1,10 @@ -+#!/bin/bash -+ -+if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then -+ set -x -+fi -+set -eu -+set -o pipefail -+ -+package-installs -d $(dirname $0) -+package-installs-v2 --phase install.d /tmp/package-installs.json diff --git a/0007-Support-VHD-output-format.patch b/0007-Support-VHD-output-format.patch deleted file mode 100644 index 908e855..0000000 --- a/0007-Support-VHD-output-format.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 7b6cf246d62acb380659dde07c56f7072fd01795 Mon Sep 17 00:00:00 2001 -From: Gregory Haynes -Date: Mon, 16 Feb 2015 17:20:01 -0800 -Subject: [PATCH] Support VHD output format - -This useful for building images for xen. - -Change-Id: Ib716bd7fc1ed979968ea92f46f1644038e40df66 ---- - bin/disk-image-create | 27 +++++++++++++++++++++++++-- - lib/img-functions | 7 +++++++ - 2 files changed, 32 insertions(+), 2 deletions(-) - -diff --git a/bin/disk-image-create b/bin/disk-image-create -index ecc3f49..c96edec 100755 ---- a/bin/disk-image-create -+++ b/bin/disk-image-create -@@ -45,8 +45,9 @@ function show_options () { - echo "Options:" - echo " -a i386|amd64|armhf -- set the architecture of the image(default amd64)" - echo " -o imagename -- set the imagename of the output image file(default image)" -- echo " -t qcow2,tar,raw -- set the image types of the output image files (default qcow2)" -- echo " File types should be comma separated" -+ echo " -t qcow2,tar,vhd,raw -- set the image types of the output image files (default qcow2)" -+ echo " File types should be comma separated. VHD outputting requires the vhd-util" -+ echo " executable be in your PATH." - echo " -x -- turn on tracing" - echo " -u -- uncompressed; do not compress the image - larger but faster" - echo " -c -- clear environment before starting work" -@@ -80,6 +81,10 @@ function show_options () { - echo - echo "NOTE: At least one distribution root element must be specified." - echo -+ echo "NOTE: If using the VHD output format you need to have a patched version of vhd-util installed for the image" -+ echo " to be bootable. The patch is available here: https://github.com/emonty/vhd-util/blob/master/debian/patches/citrix" -+ echo " and a PPA with the patched tool is available here: https://launchpad.net/~openstack-ci-core/+archive/ubuntu/vhd-util" -+ echo - echo "Examples:" - if [ "$IS_RAMDISK" == "0" ]; then - echo " ${SCRIPTNAME} -a amd64 -o ubuntu-amd64 vm ubuntu" -@@ -159,6 +164,24 @@ if [ "${#IMAGE_TYPES[@]}" = "1" ]; then - export IMAGE_NAME=${IMAGE_NAME%%\.${IMAGE_TYPES[0]}} - fi - -+# Check for required tools early on -+for X in ${!IMAGE_TYPES[@]}; do -+ case "${IMAGE_TYPES[$X]}" in -+ qcow2) -+ if [ -z "$(which qemu-img)" ]; then -+ echo "qcow2 output format specified but qemu-img executable not found." -+ exit 1 -+ fi -+ ;; -+ vhd) -+ if [ -z "$(which vhd-util)" ]; then -+ echo "vhd output format specified but no vhd-util executable found." -+ exit 1 -+ fi -+ ;; -+ esac -+done -+ - # NOTE: Tuning the rootfs uuid works only for ext filesystems. - # Rely on the below environment variable only for ext filesystems. - export DIB_IMAGE_ROOT_FS_UUID=$(uuidgen -r) -diff --git a/lib/img-functions b/lib/img-functions -index 852f575..0f3b82c 100644 ---- a/lib/img-functions -+++ b/lib/img-functions -@@ -120,6 +120,13 @@ function compress_and_save_image () { - fi - if [ "$IMAGE_TYPE" = "raw" ]; then - mv $TMP_IMAGE_PATH $1-new -+ elif [ "$IMAGE_TYPE" == "vhd" ]; then -+ cp $TMP_IMAGE_PATH $1-intermediate -+ vhd-util convert -s 0 -t 1 -i $1-intermediate -o $1-intermediate -+ vhd-util convert -s 1 -t 2 -i $1-intermediate -o $1-new -+ # The previous command creates a .bak file -+ rm $1-intermediate.bak -+ OUT_IMAGE_PATH=$1-new - else - echo "Converting image using qemu-img convert" - qemu-img convert ${COMPRESS_IMAGE:+-c} -f raw $TMP_IMAGE_PATH -O $IMAGE_TYPE $EXTRA_OPTIONS $1-new diff --git a/0008-openSUSE-update.patch b/0008-openSUSE-update.patch deleted file mode 100644 index 08690ed..0000000 --- a/0008-openSUSE-update.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 370e547c27c5eeb0ee9ca64e5ce1589a38bea753 Mon Sep 17 00:00:00 2001 -From: Thomas Bechtold -Date: Tue, 14 Apr 2015 21:53:38 +0200 -Subject: [PATCH] openSUSE update - -Commit b4a1f1c190 wrongly changed the format of the available -images. There was a missconfiguration on the buildservice which produces -the images so no static links were available. That's fixed now so use -the correct names again. - -Change-Id: Iac4cbc8672da67f5a89ac2f1be8bb9530215ea19 ---- - elements/opensuse/root.d/10-opensuse-cloud-image | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/elements/opensuse/root.d/10-opensuse-cloud-image b/elements/opensuse/root.d/10-opensuse-cloud-image -index 6cbc586..a6734b9 100755 ---- a/elements/opensuse/root.d/10-opensuse-cloud-image -+++ b/elements/opensuse/root.d/10-opensuse-cloud-image -@@ -19,8 +19,10 @@ if ! [ 'x86_64' = "$ARCH" ] ; then - fi - - DIB_RELEASE=${DIB_RELEASE:-13.1} -+# NOTE(toabctl): if something changes here on the buildservice side, please -+# first ask in #opensuse-cloud on freenode before you change the format here! - DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://download.opensuse.org/repositories/Cloud:/Images:/openSUSE_${DIB_RELEASE}/images/} --BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-openSUSE-${DIB_RELEASE}-OS-rootfs.${ARCH}-0.1.0-Build2.36.tbz} -+BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-openSUSE-${DIB_RELEASE}-OS-rootfs.${ARCH}.tbz} - SHA256SUMS_FILE=${SHA256SUMS_FILE:-${BASE_IMAGE_FILE}.sha256} - - CACHED_FILE=$DIB_IMAGE_CACHE/$BASE_IMAGE_FILE diff --git a/0009-update-the-dib-centos7-baseurl-to-use-a-mirrorlist.patch b/0009-update-the-dib-centos7-baseurl-to-use-a-mirrorlist.patch deleted file mode 100644 index 270c739..0000000 --- a/0009-update-the-dib-centos7-baseurl-to-use-a-mirrorlist.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 9c8bc6b5b92acac0c9593131d67df27b16954887 Mon Sep 17 00:00:00 2001 -From: Wesley Hayutin -Date: Fri, 10 Apr 2015 21:30:42 -0400 -Subject: [PATCH] update the dib centos7 baseurl to use a mirrorlist - -* replace baseurl with a centos mirrorlist -* fix typo in repoid - -Change-Id: I028d1d7e9bf0b180ad73f750630adfbe41424512 ---- - elements/centos7/pre-install.d/01-yum-repos | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/elements/centos7/pre-install.d/01-yum-repos b/elements/centos7/pre-install.d/01-yum-repos -index 4b0ab4f..1ec03dd 100755 ---- a/elements/centos7/pre-install.d/01-yum-repos -+++ b/elements/centos7/pre-install.d/01-yum-repos -@@ -7,9 +7,9 @@ set -eu - set -o pipefail - - cat << EOF > /etc/yum.repos.d/centos7-latest.repo --[rhel7] -+[centos7] - name=centos7 --baseurl=http://buildlogs.centos.org/centos/7/os/x86_64-latest/ -+mirrorlist=http://mirrorlist.centos.org/?release=7&arch=\$basearch&repo=os&infra=\$infra - enabled=1 - metadata_expire=7d - gpgcheck=0 diff --git a/0010-Updated-from-global-requirements.patch b/0010-Updated-from-global-requirements.patch deleted file mode 100644 index a7632c2..0000000 --- a/0010-Updated-from-global-requirements.patch +++ /dev/null @@ -1,26 +0,0 @@ -From f8518545aad21fc820e3e37d555aefe5d75abda5 Mon Sep 17 00:00:00 2001 -From: OpenStack Proposal Bot -Date: Thu, 16 Apr 2015 18:18:19 +0000 -Subject: [PATCH] Updated from global requirements - -Change-Id: I18582517f6a917be1884ae6b20769419c95c473e ---- - test-requirements.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test-requirements.txt b/test-requirements.txt -index cae29a4..222ced8 100644 ---- a/test-requirements.txt -+++ b/test-requirements.txt -@@ -4,9 +4,9 @@ - hacking>=0.10.0,<0.11 - - discover --oslotest>=1.2.0 # Apache-2.0 -+oslotest>=1.5.1,<1.6.0 # Apache-2.0 - testrepository>=0.0.18 - - # Doc requirements - sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 --oslosphinx>=2.2.0 # Apache-2.0 -+oslosphinx>=2.5.0,<2.6.0 # Apache-2.0 diff --git a/0011-Fix-image-size-to-fit-filesystem-journal.patch b/0011-Fix-image-size-to-fit-filesystem-journal.patch deleted file mode 100644 index 6216b9b..0000000 --- a/0011-Fix-image-size-to-fit-filesystem-journal.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 1f029607434e389697f7c70f077bef820fd308b1 Mon Sep 17 00:00:00 2001 -From: Gregory Haynes -Date: Tue, 31 Mar 2015 04:52:08 +0000 -Subject: [PATCH] Fix image size to fit filesystem journal - -Our logic to determine needed image size doesnt fully account for the -in-filesystem journal. This only shows up when creating images that are -very small relative to the FS journal size. - -Change-Id: Ic3c2bcd31ec4fee6bcd9f67767842eb3fbe20d3a ---- - bin/disk-image-create | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/bin/disk-image-create b/bin/disk-image-create -index c96edec..8a9ee7f 100755 ---- a/bin/disk-image-create -+++ b/bin/disk-image-create -@@ -230,15 +230,18 @@ else - # Rounding down size so that is is a multiple of 64, works around a bug in - # qemu-img that may occur when compressing raw images that aren't a multiple - # of 64k. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1180021 -- _NEEDED_SIZE=$(sudo du --block-size=600 -x -s ${TMP_BUILD_DIR}/built | \ -- awk ' { print $1 - ( $1 % 64) } ') -- truncate -s${_NEEDED_SIZE}K $TMP_IMAGE_PATH -+ du_size=$(sudo du --block-size=600 -x -s ${TMP_BUILD_DIR}/built |\ -+ awk ' { print $1 }') - if [ "$FS_TYPE" = "ext4" ] ; then - # Very conservative to handle images being resized a lot -- # Without -J option specified, default journal size will be set to 32M -- # and online resize will be failed with error of needs too many credits. -+ # We set journal size to 64M so our journal is large enough when we -+ # perform an FS resize. - MKFS_OPTS="-i 4096 -J size=64 $MKFS_OPTS" -+ du_size=$(( $du_size + 65536 )) - fi -+ -+ _NEEDED_SIZE=$(echo "$du_size" | awk ' { print $1 + 64 - ( $1 % 64) } ') -+ truncate -s${_NEEDED_SIZE}K $TMP_IMAGE_PATH - fi - - if [ -n "$MAX_ONLINE_RESIZE" ]; then diff --git a/0012-Remove-install-of-vlan-vconfig-from-base.patch b/0012-Remove-install-of-vlan-vconfig-from-base.patch deleted file mode 100644 index 9057578..0000000 --- a/0012-Remove-install-of-vlan-vconfig-from-base.patch +++ /dev/null @@ -1,51 +0,0 @@ -From f15f5ca6635dec82182bb17cd17a1c659f711697 Mon Sep 17 00:00:00 2001 -From: James Slagle -Date: Fri, 8 May 2015 15:42:37 -0400 -Subject: [PATCH] Remove install of vlan/vconfig from base - -vconfig is actually deprecated in favor of the ip command, and is not -available on some newer distros (RHEL 7 at least). I'm not honestly sure -why it needs to be installed in all images anyway. I traced the origins -of installing the vlan package here all the way back to the first dib -git import from some other repo...so, I don't see any obvious reason why -it needs to be installed. - -Change-Id: I272667cf29f5e41c217a26f70937b2842a04f748 ---- - elements/base/install.d/00-baseline-environment | 2 +- - elements/base/pkg-map | 2 -- - 2 files changed, 1 insertion(+), 3 deletions(-) - -diff --git a/elements/base/install.d/00-baseline-environment b/elements/base/install.d/00-baseline-environment -index 9a02dbe..e84c84b 100755 ---- a/elements/base/install.d/00-baseline-environment -+++ b/elements/base/install.d/00-baseline-environment -@@ -7,4 +7,4 @@ fi - set -eu - set -o pipefail - --install-packages -m base vlan_package iscsi_package -+install-packages -m base iscsi_package -diff --git a/elements/base/pkg-map b/elements/base/pkg-map -index 9c3a93d..b09852d 100644 ---- a/elements/base/pkg-map -+++ b/elements/base/pkg-map -@@ -1,7 +1,6 @@ - { - "family": { - "redhat": { -- "vlan_package": "vconfig", - "iscsi_package": "iscsi-initiator-utils" - }, - "suse": { -@@ -11,7 +10,6 @@ - "default": { - "ccache_package": "ccache", - "dkms_package": "dkms", -- "vlan_package": "vlan", - "iscsi_package": "open-iscsi" - } - } --- -2.1.0 - diff --git a/diskimage-builder.spec b/diskimage-builder.spec index 91beb6b..519f5cf 100644 --- a/diskimage-builder.spec +++ b/diskimage-builder.spec @@ -1,25 +1,12 @@ Name: diskimage-builder Summary: Image building tools for OpenStack -Version: 0.1.42 -Release: 4%{?dist} +Version: 1.4.0 +Release: 1%{?dist} License: ASL 2.0 Group: System Environment/Base URL: https://launchpad.net/diskimage-builder Source0: http://tarballs.openstack.org/diskimage-builder/%{name}-%{version}.tar.gz -Patch0001: 0001-Open-MKFS_OPTS-for-extension-in-disk-image-create.patch -Patch0002: 0002-Try-5-times-for-rmdir-command-call-after-umount.patch -Patch0003: 0003-Don-t-trace-RHEL-Registration-scripts.patch -Patch0004: 0004-Do-not-export-REG_HALT_UNREGISTER-between-hook-scrip.patch -Patch0005: 0005-Switch-default-Fedora-image-to-F21.patch -Patch0006: 0006-Update-packages-earlier.patch -Patch0007: 0007-Support-VHD-output-format.patch -Patch0008: 0008-openSUSE-update.patch -Patch0009: 0009-update-the-dib-centos7-baseurl-to-use-a-mirrorlist.patch -Patch0010: 0010-Updated-from-global-requirements.patch -Patch0011: 0011-Fix-image-size-to-fit-filesystem-journal.patch -Patch0012: 0012-Remove-install-of-vlan-vconfig-from-base.patch - BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools @@ -37,19 +24,6 @@ Requires: dib-utils %prep %setup -q -n %{name}-%{version} -%patch0001 -p1 -%patch0002 -p1 -%patch0003 -p1 -%patch0004 -p1 -%patch0005 -p1 -%patch0006 -p1 -%patch0007 -p1 -%patch0008 -p1 -%patch0009 -p1 -%patch0010 -p1 -%patch0011 -p1 -%patch0012 -p1 - %build %{__python} setup.py build @@ -81,6 +55,10 @@ Components of TripleO that are responsible for building disk images. %{_datadir}/%{name}/elements %changelog +* Thu Dec 03 2015 Paul Belanger - 1.4.0-1 +- Update to upstream 1.4.0 +- Drop patches merged upstream + * Wed Jun 17 2015 Fedora Release Engineering - 0.1.42-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild @@ -181,7 +159,7 @@ Components of TripleO that are responsible for building disk images. * Tue Dec 09 2014 James Slagle 0.1.34-18 - Allow for disabling rhel registration -* Tue Dec 08 2014 James Slagle 0.1.34-17 +* Mon Dec 08 2014 James Slagle 0.1.34-17 - Make files created by patch 0012-Allow-injecting-arbitrary-yum-repo-configuration.patch +x * Sun Dec 07 2014 James Slagle 0.1.34-16 diff --git a/sources b/sources index fb6613f..781d5c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -154397a0905b025793e593a25d5fade8 diskimage-builder-0.1.42.tar.gz +22ca6a476d67d0dd1a137261f28c518d diskimage-builder-1.4.0.tar.gz