Hello community, here is the log from the commit of package diskimage-builder for openSUSE:Factory checked in at 2018-07-21 10:24:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/diskimage-builder (Old) and /work/SRC/openSUSE:Factory/.diskimage-builder.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "diskimage-builder" Sat Jul 21 10:24:53 2018 rev:17 rq:624031 version:2.16.0 Changes: -------- --- /work/SRC/openSUSE:Factory/diskimage-builder/diskimage-builder.changes 2018-06-19 11:55:57.075212843 +0200 +++ /work/SRC/openSUSE:Factory/.diskimage-builder.new/diskimage-builder.changes 2018-07-21 10:24:54.902961917 +0200 @@ -1,0 +2,26 @@ +Wed Jul 18 14:52:24 UTC 2018 - mchand...@suse.de + +- Version bump to 2.16.0 + * Update pylint to 1.7.6, uncap networkx + * Add expected semicolons for dhclient.conf + * Add keyring if supplied + * Add new modprobe element + * Add iscsi-boot element for CentOS images + * Fix /etc/network/interfaces file contents + * Convert labels to upper case + * Fix bootloader for efi on rhel systems + * Don't run setfiles on /boot/efi + * Add iscsi-boot element + * Fix bootloader packages for rhel + * Don't install zypper on bionic + * Rename output log files + * Save and close stdout on exit + * Reduce path length in PS4 for debug + * Use surrogateescape with outfilter.py + * Fix encoding issue during processing output +- Package improvements + * convert to python3 + * Improve description + * spec-cleaner fixes + +------------------------------------------------------------------- Old: ---- diskimage-builder-2.15.1.tar.gz New: ---- diskimage-builder-2.16.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ diskimage-builder.spec ++++++ --- /var/tmp/diff_new_pack.qm7IFD/_old 2018-07-21 10:24:55.490961775 +0200 +++ /var/tmp/diff_new_pack.qm7IFD/_new 2018-07-21 10:24:55.494961774 +0200 @@ -18,10 +18,9 @@ # Prevent shebangs of element scripts from being added as a requirement (they # are only ever run inside the disk image build chroot). - -%global __requires_exclude_from ^%{python_sitelib}/diskimage_builder/elements/.*$ +%global __requires_exclude_from ^%{python3_sitelib}/diskimage_builder/elements/.*$ Name: diskimage-builder -Version: 2.15.1 +Version: 2.16.0 Release: 0 Summary: Image Building Tools for OpenStack License: Apache-2.0 @@ -31,58 +30,59 @@ Source99: diskimage-builder-rpmlintrc BuildRequires: fdupes BuildRequires: findutils -BuildRequires: python-PyYAML >= 3.10.0 -BuildRequires: python-devel +BuildRequires: python3-PyYAML >= 3.10.0 +BuildRequires: python3-networkx >= 1.10 +BuildRequires: python3-pbr >= 2.0.0 +BuildRequires: python3-setuptools +# Test requirements (python2 only) +BuildRequires: python2-PyYAML >= 3.10.0 +BuildRequires: python2-fixtures BuildRequires: python2-networkx >= 1.10 -# Test requirements: -BuildRequires: python-fixtures -BuildRequires: python-oslotest -BuildRequires: python-pbr >= 2.0.0 -BuildRequires: python-setuptools -BuildRequires: python-stevedore >= 1.20.0 -BuildRequires: python-testrepository -BuildRequires: python-testtools +BuildRequires: python2-oslotest +BuildRequires: python2-stevedore >= 1.20.0 +BuildRequires: python2-testrepository +BuildRequires: python2-testtools BuildRequires: sed # No stuff in python_sitelib, thus autoreqprov won't work: Requires: kpartx -Requires: python-Babel >= 2.3.4 -Requires: python-PyYAML >= 3.10.0 -Requires: python-six >= 1.10.0 -Requires: python-stevedore >= 1.20.0 -Requires: python2-networkx >= 1.10 +Requires: python3-Babel >= 2.3.4 +Requires: python3-PyYAML >= 3.10.0 +Requires: python3-networkx >= 1.10 +Requires: python3-six >= 1.10.0 +Requires: python3-stevedore >= 1.20.0 Requires: qemu-tools -Requires: python(abi) = %{py_ver} -# diskimage-builder-2.0.0 was merged with python-dib-utils -Provides: python-dib-utils = %version -Obsoletes: python-dib-utils < %version -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %description -These tools are the components of TripleO -(https://wiki.openstack.org/wiki/TripleO) that are responsible for -building disk images. +diskimage-builder is a tool for automatically building customized +operating-system images for use in clouds and other environments. + +It includes support for building images based on many major +distributions and can produce cloud-images in all common formats +(qcow2, vhd, raw, etc), bare metal file-system images and ram-disk +images. These images are composed from the many included elements; +diskimage-builder acts as a framework to easily add your own elements +for even further customization. %prep %setup -q # Fix env-script-interpreter rpmlint warning find diskimage_builder/elements -type f -perm /a+x \ - -exec sh -c "sed -E -i s@^#\!/usr/bin/env[[:space:]]+python@#\!/usr/bin/python@ {}" \; + -exec sh -c "sed -E -i s@^#\!%{_bindir}/env[[:space:]]+python@#\!%{_bindir}/python@ {}" \; %build -%{__python2} setup.py build +%python3_build %install -%{__python2} setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python3_install +%py3_compile %{buildroot} %fdupes %{buildroot} -%py_compile %{buildroot} %check if [ ! -d ./.testrepository ] ; then testr init ; fi testr run %{?_smp_mflags:--parallel %{_smp_flags}} #; RET=$? echo "Slowest Tests" ; testr slowest && exit $RET %files -%defattr(-,root,root,-) %doc ChangeLog README.rst AUTHORS %license LICENSE %{_bindir}/dib-block-device @@ -90,7 +90,7 @@ %{_bindir}/dib-lint %{_bindir}/element-info %{_bindir}/ramdisk-image-create -%{python_sitelib}/diskimage_builder/ -%{python_sitelib}/diskimage_builder*.egg-info/ +%{python3_sitelib}/diskimage_builder/ +%{python3_sitelib}/diskimage_builder*.egg-info/ %changelog ++++++ diskimage-builder-2.15.1.tar.gz -> diskimage-builder-2.16.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/AUTHORS new/diskimage-builder-2.16.0/AUTHORS --- old/diskimage-builder-2.15.1/AUTHORS 2018-06-01 09:16:43.000000000 +0200 +++ new/diskimage-builder-2.16.0/AUTHORS 2018-07-18 07:12:21.000000000 +0200 @@ -16,6 +16,7 @@ Antoine Musso <has...@free.fr> Aparna <aparnav...@gmail.com> Arata Notsu <no...@virtualtech.jp> +Arx Cruz <arxc...@redhat.com> Atsushi SAKAI <sak...@jp.fujitsu.com> Augustina Ragwitz <aragwitz...@pobox.com> AzherKhan <azher-ullah.k...@hp.com> @@ -79,6 +80,7 @@ Gregory Haynes <g...@greghaynes.net> Haomeng, Wang <wh...@cn.ibm.com> Hironori Shiina <shiina.hiron...@jp.fujitsu.com> +Hoang Trung Hieu <hie...@vn.fujitsu.com> Ian Wienand <iwien...@redhat.com> Igor Belikov <ibeli...@mirantis.com> Isaac Beckman <isa...@il.ibm.com> @@ -139,6 +141,7 @@ Michael Johnson <johnso...@gmail.com> Michael Kerrin <michael.ker...@hp.com> Michael McCune <mimcc...@redhat.com> +Michael Turek <mjtu...@linux.vnet.ibm.com> Michael Turek <mjtu...@us.ibm.com> Mikhail S Medvedev <mmedv...@us.ibm.com> Monty Taylor <mord...@inaugust.com> @@ -147,6 +150,7 @@ NTTdocomo-openstack <openstack-contributor...@nttdocomo.com> Nam Nguyen Hoai <na...@vn.fujitsu.com> Newell Jensen <newell.jen...@gmail.com> +Nguyen Van Trung <trun...@vn.fujitsu.com> Nicholas Randon <nicholas.ran...@hp.com> Nikhil Manchanda <slick...@gmail.com> Nisha Agarwal <agarwalnisha1...@gmail.com> @@ -154,6 +158,7 @@ Noam Angel <no...@mellanox.com> Oded Le'Sage <ol7...@att.com> Oliver Walsh <owa...@redhat.com> +Olivier Bourdon <obour...@opennext.io> Om Kumar <om.ku...@hp.com> Ondřej Nový <ondrej.n...@firma.seznam.cz> Paul Belanger <pabelan...@redhat.com> @@ -179,6 +184,7 @@ Ryan Hallisey <rhall...@redhat.com> Sagi Shnaidman <sshna...@redhat.com> Sam Betts <s...@code-smash.net> +Sam Yaple <sam+...@yaple.net> SamYaple <s...@yaple.net> Sandhya Ganapathy <sandhya.ganapa...@hp.com> Sascha Peilicke <speili...@suse.com> @@ -203,6 +209,7 @@ Tim Miller <tim.mille...@gmail.com> Tim Potter <t...@hp.com> Tim Serong <tser...@suse.com> +Tobias Henkel <tobias.hen...@bmw.de> Tomas Hancock <tom.hanc...@hp.com> Tomas Sedovic <tsedo...@redhat.com> Tony Breeds <t...@bakeyournoodle.com> @@ -230,6 +237,7 @@ Zhiguo Deng <bjzgd...@linux.vnet.ibm.com> Zuul <z...@review.openstack.org> aweiteka <aweit...@redhat.com> +chenxiangui <chenxian...@inspur.com> chenxing <chen.x...@99cloud.net> chriskrelle <chriskrelle@tooltester.(none)> d.marlin <dmar...@redhat.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/ChangeLog new/diskimage-builder-2.16.0/ChangeLog --- old/diskimage-builder-2.15.1/ChangeLog 2018-06-01 09:16:43.000000000 +0200 +++ new/diskimage-builder-2.16.0/ChangeLog 2018-07-18 07:12:21.000000000 +0200 @@ -1,14 +1,38 @@ CHANGES ======= +2.16.0 +------ + +* Update pylint to 1.7.6, uncap networkx +* Update developing\_elements +* Add expected semicolons for dhclient.conf +* Add keyring if supplied +* Add new modprobe element +* Add iscsi-boot element for CentOS images +* Remove redundant word +* Fix /etc/network/interfaces file contents +* Convert labels to upper case +* Fix bootloader for efi on rhel systems +* Don't run setfiles on /boot/efi +* Add iscsi-boot element +* Fix bootloader packages for rhel + 2.15.1 ------ * elements: pip-and-virtualenv: Handle openSUSE Leap 15 +* Added release notes for Change 568697 2.15.0 ------ +* Don't install zypper on bionic +* Rename output log files +* Add log directory option to functional tests +* Save and close stdout on exit +* Reduce path length in PS4 for debug +* Use surrogateescape with outfilter.py * Allow to rebuild arbitrary images * Replace the ubuntu-minimal trusty test with a bionic one * Remove non-maintained ubuntu-core element @@ -66,6 +90,7 @@ * Make the build reproducible * Updated from global requirements * secondary architectures use different url +* Fix encoding issue during processing output * Fix for rhel7 iso image creation * Fix for passing user defined value for satellite cert for rhel-common * arm64: use HWE kernel and fix console diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/PKG-INFO new/diskimage-builder-2.16.0/PKG-INFO --- old/diskimage-builder-2.15.1/PKG-INFO 2018-06-01 09:16:47.000000000 +0200 +++ new/diskimage-builder-2.16.0/PKG-INFO 2018-07-18 07:12:25.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: diskimage-builder -Version: 2.15.1 +Version: 2.16.0 Summary: Golden Disk Image builder. Home-page: https://docs.openstack.org/diskimage-builder/latest/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/RELEASENOTES.rst new/diskimage-builder-2.16.0/RELEASENOTES.rst --- old/diskimage-builder-2.15.1/RELEASENOTES.rst 2018-06-01 09:16:47.000000000 +0200 +++ new/diskimage-builder-2.16.0/RELEASENOTES.rst 2018-07-18 07:12:25.000000000 +0200 @@ -2,6 +2,35 @@ diskimage-builder ================= +.. _diskimage-builder_2.16.0: + +2.16.0 +====== + +.. _diskimage-builder_2.16.0_New Features: + +New Features +------------ + +.. releasenotes/notes/add-modprobe-element-8e3b0287ebb11920.yaml @ 31383970c72cd96e9b69c7e4a9e5a92bf9f72529 + +- Add new modprobe element. This element will replace modprobe-blacklist element. It wil still have the blacklist functionality, but it also adds the feature of passing a complete file with settings to the modprobe.d directory. Adding this functionality, that will allow elements that depends on this module, to just copy the specified files to the final directory. + + +.. _diskimage-builder_2.16.0_Upgrade Notes: + +Upgrade Notes +------------- + +.. releasenotes/notes/ubuntu-arbitrary-images-c796f5c6dbd40679.yaml @ fde82c1f192d346ac3992b1ba30935d29f29818b + +- You would need to modify your ``DIB_CLOUD_IMAGES`` and possibly + ``SHA256SUMS`` variables if you were using them to build Ubuntu with + elements/ubuntu: ``DIB_CLOUD_IMAGES`` would need to contain URL with + path, and ``SHA256SUMS`` would not now neccesarily point to + ``$DIB_RELEASE/current/`` directory. + + .. _diskimage-builder_2.12.0: 2.12.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/bindep.txt new/diskimage-builder-2.16.0/bindep.txt --- old/diskimage-builder-2.15.1/bindep.txt 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/bindep.txt 2018-07-18 07:10:39.000000000 +0200 @@ -2,5 +2,5 @@ # see https://docs.openstack.org/infra/bindep/ for additional information. squashfs-tools [!platform:suse] squashfs [platform:suse] -zypper [!platform:redhat !platform:ubuntu-trusty] +zypper [!platform:redhat !platform:ubuntu-trusty !platform:ubuntu-bionic] gnupg2 [!platform:redhat !platform:ubuntu-trusty !platform:suse] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/block_device/config.py new/diskimage-builder-2.16.0/diskimage_builder/block_device/config.py --- old/diskimage-builder-2.15.1/diskimage_builder/block_device/config.py 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/block_device/config.py 2018-07-18 07:10:51.000000000 +0200 @@ -74,7 +74,7 @@ else: this['name'] = values['name'] - # Go through the the values dictionary. Either this is a "plugin" + # Go through the values dictionary. Either this is a "plugin" # key that needs to be recursed, or it is a value that is part of # this config entry. for nk, nv in values.items(): @@ -159,6 +159,12 @@ # add the appropriate nodes and edges. dg = nx.DiGraph() + # check about dg.nodes, to support different networkx versions + if hasattr(dg.nodes, '__iter__'): + dg_nodes = dg.nodes + else: + dg_nodes = dg.node + for config_entry in config: # this should have been checked by generate_config assert len(config_entry) == 1 @@ -190,7 +196,7 @@ # ensure node names are unique. networkx by default # just appends the attribute to the node dict for # existing nodes, which is not what we want. - if node.name in dg.node: + if node.name in dg_nodes: raise BlockDeviceSetupException( "Duplicate node name: %s" % (node.name)) logger.debug("Adding %s : %s", node.name, node) @@ -210,12 +216,12 @@ logger.debug("Edges for %s: f:%s t:%s", name, edges_from, edges_to) for edge_from in edges_from: - if edge_from not in dg.node: + if edge_from not in dg_nodes: raise BlockDeviceSetupException( "Edge not defined: %s->%s" % (edge_from, name)) dg.add_edge(edge_from, name) for edge_to in edges_to: - if edge_to not in dg.node: + if edge_to not in dg_nodes: raise BlockDeviceSetupException( "Edge not defined: %s->%s" % (name, edge_to)) dg.add_edge(name, edge_to) @@ -231,9 +237,9 @@ # Topological sort (i.e. create a linear array that satisfies # dependencies) and return the object list - call_order_nodes = nx.topological_sort(dg) - logger.debug("Call order: %s", list(call_order_nodes)) - call_order = [dg.node[n]['obj'] for n in call_order_nodes] + call_order_nodes = list(nx.topological_sort(dg)) + logger.debug("Call order: %s", call_order_nodes) + call_order = [dg_nodes[n]['obj'] for n in call_order_nodes] return dg, call_order diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/block_device/level2/mkfs.py new/diskimage-builder-2.16.0/diskimage_builder/block_device/level2/mkfs.py --- old/diskimage-builder-2.15.1/diskimage_builder/block_device/level2/mkfs.py 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/block_device/level2/mkfs.py 2018-07-18 07:10:39.000000000 +0200 @@ -58,6 +58,11 @@ if self.label is None: self.label = self.name + # for fat/vfat, we use the label as an identifier for the disk + # so we need that the label is converted to upper case + if self.type in ('vfat', 'fat'): + self.label = self.label.upper() + # ensure we don't already have a fs with this label ... they # all must be unique. if 'fs_labels' in self.state: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/block_device/tests/test_mount_order.py new/diskimage-builder-2.16.0/diskimage_builder/block_device/tests/test_mount_order.py --- old/diskimage-builder-2.15.1/diskimage_builder/block_device/tests/test_mount_order.py 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/block_device/tests/test_mount_order.py 2018-07-18 07:10:39.000000000 +0200 @@ -100,7 +100,7 @@ mock.call(['mkfs', '-t', 'xfs', '-L', 'mkfs_var', '-m', 'uuid=var-uuid-1234', '-q', '/dev/loopXp2/var']), - mock.call(['mkfs', '-t', 'vfat', '-n', 'varlog', + mock.call(['mkfs', '-t', 'vfat', '-n', 'VARLOG', '/dev/loopXp3/var_log']) ] self.assertEqual(mock_exec_sudo_mkfs.call_count, len(cmd_sequence)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/bootloader/finalise.d/50-bootloader new/diskimage-builder-2.16.0/diskimage_builder/elements/bootloader/finalise.d/50-bootloader --- old/diskimage-builder-2.15.1/diskimage_builder/elements/bootloader/finalise.d/50-bootloader 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/bootloader/finalise.d/50-bootloader 2018-07-18 07:10:39.000000000 +0200 @@ -224,6 +224,14 @@ if [ -d /sys/firmware/efi ]; then sed -i 's%\(initrd\|linux\)efi /boot%\1 /boot%g' $GRUB_CFG fi + + # when using efi, and having linux16/initrd16, it needs to be replaced + # by linuxefi/initrdefi. When building images on a non-efi system, + # the 16 suffix is added to linux/initrd entries, but we need it to be + # linuxefi/initrdefi for the image to boot under efi + if [[ ${DIB_BLOCK_DEVICE} == "efi" ]]; then + sed -i 's%\(linux\|initrd\)16 /boot%\1efi /boot%g' $GRUB_CFG + fi } DIB_EXTLINUX=${DIB_EXTLINUX:-0} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/bootloader/pkg-map new/diskimage-builder-2.16.0/diskimage_builder/elements/bootloader/pkg-map --- old/diskimage-builder-2.15.1/diskimage_builder/elements/bootloader/pkg-map 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/bootloader/pkg-map 2018-07-18 07:10:39.000000000 +0200 @@ -15,6 +15,8 @@ "redhat": { "extlinux": "syslinux-extlinux", "grub-pc": "grub2-tools grub2", + "grub-efi-amd64": "grub2-tools grub2-efi grub2-efi-modules", + "grub-efi-arm64": "grub2-tools grub2-efi grub2-efi-modules", "grub-efi": "grub2-tools grub2-efi", "grub-ppc64": "grub2-tools grub2" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall new/diskimage-builder-2.16.0/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall --- old/diskimage-builder-2.15.1/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall 2018-07-18 07:10:39.000000000 +0200 @@ -24,6 +24,11 @@ set -eu set -o pipefail +# NOTE(SamYaple): Add the keyring deboostrap used if specified +if [ -n "${DIB_APT_KEYRING:-${DIB_DEBIAN_KEYRING:-}}" ]; then + cat $DIB_APT_KEYRING | sudo chroot $TARGET_ROOT /usr/bin/apt-key add - +fi + # Writes the apt sources files. # The description is passed in via line coded elements. # (The approach using associative arrays for configuration faild, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces new/diskimage-builder-2.16.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces --- old/diskimage-builder-2.15.1/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces 2018-07-18 07:10:39.000000000 +0200 @@ -17,9 +17,9 @@ if [ -f /etc/dhcp/dhclient.conf ] ; then # Set the dhclient timeout configurations to match DIB_DHCP_TIMEOUT, if grep -o "^timeout " /etc/dhcp/dhclient.conf ; then - sed -i -e "s/^timeout .*/# \"timeout\" Value set by dhcp-all-interfaces\ntimeout ${DIB_DHCP_TIMEOUT:-30}/" /etc/dhcp/dhclient.conf + sed -i -e "s/^timeout .*/# \"timeout\" Value set by dhcp-all-interfaces\ntimeout ${DIB_DHCP_TIMEOUT:-30};/" /etc/dhcp/dhclient.conf else - echo -e "# \"timeout\" Value set by dhcp-all-interfaces\ntimeout ${DIB_DHCP_TIMEOUT:-30}" >> /etc/dhcp/dhclient.conf + echo -e "# \"timeout\" Value set by dhcp-all-interfaces\ntimeout ${DIB_DHCP_TIMEOUT:-30};" >> /etc/dhcp/dhclient.conf fi fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces new/diskimage-builder-2.16.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces --- old/diskimage-builder-2.15.1/diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces 2018-07-18 07:10:39.000000000 +0200 @@ -25,6 +25,10 @@ if [ -f "/etc/network/interfaces" ]; then printf "auto lo\niface lo inet loopback\n\n" > /etc/network/interfaces if [ -d "/etc/network/interfaces.d/" ]; then - printf "source-directory interfaces.d\n\n" >> /etc/network/interfaces + if [ "$DISTRO_NAME" == "ubuntu" ] && [ "$DIB_RELEASE" == "trusty" ]; then + printf "source-directory interfaces.d\n\n" >> /etc/network/interfaces + else + printf "source /etc/network/interfaces.d/*\n\n" >> /etc/network/interfaces + fi fi fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/iscsi-boot/README.rst new/diskimage-builder-2.16.0/diskimage_builder/elements/iscsi-boot/README.rst --- old/diskimage-builder-2.15.1/diskimage_builder/elements/iscsi-boot/README.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/iscsi-boot/README.rst 2018-07-18 07:10:39.000000000 +0200 @@ -0,0 +1,20 @@ +========== +iscsi-boot +========== +Handles configuration for the disk to be capable of serving as +a remote root filesystem through iSCSI. Currently, this element +can configure Ubuntu/Debian images and CentOS7 images. + +It performs the following actions: + +For Ubuntu/Debian images: + * Installs the ``open-iscsi`` package. + * Creates the ``etc/iscsi/iscsi.initramfs`` configuration file and sets + ``ISCSI_AUTO=true`` within it. + * Updates the initramfs to apply the changes. + +For CentOS7 images: + * Required ``dracut-regenerate`` element when performs ``disk-image-create``. + * Updates ``network`` and ``iscsi`` into ``dracut-regenerate`` during + pre-installs. + * Updates ``GRUB_CMDLINE_LINUX_DEFAULT`` into ``/etc/default/grub``. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/iscsi-boot/element-deps new/diskimage-builder-2.16.0/diskimage_builder/elements/iscsi-boot/element-deps --- old/diskimage-builder-2.15.1/diskimage_builder/elements/iscsi-boot/element-deps 1970-01-01 01:00:00.000000000 +0100 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/iscsi-boot/element-deps 2018-07-18 07:10:39.000000000 +0200 @@ -0,0 +1 @@ +package-installs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config new/diskimage-builder-2.16.0/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config --- old/diskimage-builder-2.15.1/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config 1970-01-01 01:00:00.000000000 +0100 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config 2018-07-18 07:10:39.000000000 +0200 @@ -0,0 +1,14 @@ +if [[ $DISTRO_NAME = "centos7" ]]; then + eval declare -A image_elements=($(get_image_element_array)) + found=0 + for i in "${!image_elements[@]}"; do + [ "$i" = "dracut-regenerate" ] && found=1 + done + [ "$found" = 0 ] && echo "The dracut-regenerate element is required!" && exit 1 + + DIB_DRACUT_ENABLED_MODULES+=" +- name: network +- name: iscsi + " + export DIB_DRACUT_ENABLED_MODULES +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config new/diskimage-builder-2.16.0/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config --- old/diskimage-builder-2.15.1/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config 1970-01-01 01:00:00.000000000 +0100 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config 2018-07-18 07:10:39.000000000 +0200 @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi + +set -eu +set -o pipefail + +if [[ $DISTRO_NAME = "centos7" ]]; then + sed -i -E 's/(GRUB_CMDLINE_LINUX_DEFAULT=")(.+)(")/\1\2 rd.iscsi.firmware=1"/' /etc/default/grub + grub2-mkconfig -o /boot/grub2/grub.cfg +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/iscsi-boot/package-installs.yaml new/diskimage-builder-2.16.0/diskimage_builder/elements/iscsi-boot/package-installs.yaml --- old/diskimage-builder-2.15.1/diskimage_builder/elements/iscsi-boot/package-installs.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/iscsi-boot/package-installs.yaml 2018-07-18 07:10:39.000000000 +0200 @@ -0,0 +1,2 @@ +open-iscsi: + phase: install.d diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/iscsi-boot/post-install.d/open-iscsi-config new/diskimage-builder-2.16.0/diskimage_builder/elements/iscsi-boot/post-install.d/open-iscsi-config --- old/diskimage-builder-2.15.1/diskimage_builder/elements/iscsi-boot/post-install.d/open-iscsi-config 1970-01-01 01:00:00.000000000 +0100 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/iscsi-boot/post-install.d/open-iscsi-config 2018-07-18 07:10:39.000000000 +0200 @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi + +set -eu +set -o pipefail + +if [[ $DISTRO_NAME = "ubuntu" || $DISTRO_NAME = "debian" ]]; then + echo "ISCSI_AUTO=true" > /etc/iscsi/iscsi.initramfs + update-initramfs -u +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/modprobe/README.rst new/diskimage-builder-2.16.0/diskimage_builder/elements/modprobe/README.rst --- old/diskimage-builder-2.15.1/diskimage_builder/elements/modprobe/README.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/modprobe/README.rst 2018-07-18 07:10:39.000000000 +0200 @@ -0,0 +1,21 @@ +======== +modprobe +======== + +Allows to configure specific modprobe options on the image. + +It contains the following functionalities: + +1. Ability to blacklist specific modules using modprobe.d/blacklist.conf. + In order to use set DIB_MODPROBE_BLACKLIST to the name of your + module. To disable multiple modules you can set DIB_MODPROBE_BLACKLIST + to a list of string separated by spaces. + + Example: + + export DIB_MODPROBE_BLACKLIST="igb" + +2. Ability to copy specific files into /etc/modprobe.d directory, so it + allows to configure settings with freedom. To achieve that, the files + to be copied needs to be placed inside an specific modprobe.d directory + of the element. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/modprobe/extra-data.d/50-modprobe-blacklist new/diskimage-builder-2.16.0/diskimage_builder/elements/modprobe/extra-data.d/50-modprobe-blacklist --- old/diskimage-builder-2.15.1/diskimage_builder/elements/modprobe/extra-data.d/50-modprobe-blacklist 1970-01-01 01:00:00.000000000 +0100 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/modprobe/extra-data.d/50-modprobe-blacklist 2018-07-18 07:10:39.000000000 +0200 @@ -0,0 +1,20 @@ +#!/bin/bash + +if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +# copy all modprobe.d snippets to /etc/modprobe.d + +eval declare -A image_elements=($(get_image_element_array)) + +for i in "${!image_elements[@]}"; do + element=$i + element_dir=${image_elements[$i]} + + if [ -d "${element_dir}/modprobe.d/" ]; then + sudo cp ${element_dir}/modprobe.d/*.conf $TMP_MOUNT_PATH/etc/modprobe.d/ + fi +done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/modprobe/install.d/80-modprobe-blacklist new/diskimage-builder-2.16.0/diskimage_builder/elements/modprobe/install.d/80-modprobe-blacklist --- old/diskimage-builder-2.15.1/diskimage_builder/elements/modprobe/install.d/80-modprobe-blacklist 1970-01-01 01:00:00.000000000 +0100 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/modprobe/install.d/80-modprobe-blacklist 2018-07-18 07:10:39.000000000 +0200 @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +MODULES_LIST=${DIB_MODPROBE_BLACKLIST:?"Please set DIB_MODPROBE_BLACKLIST."} + +for mod_name in $MODULES_LIST; do + echo "blacklist $mod_name" >> /etc/modprobe.d/blacklist.conf +done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/modprobe-blacklist/README.rst new/diskimage-builder-2.16.0/diskimage_builder/elements/modprobe-blacklist/README.rst --- old/diskimage-builder-2.15.1/diskimage_builder/elements/modprobe-blacklist/README.rst 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/modprobe-blacklist/README.rst 2018-07-18 07:10:39.000000000 +0200 @@ -10,3 +10,7 @@ Example: export DIB_MODPROBE_BLACKLIST="igb" + +.. note:: + This element has been deprecated and replaced by the modprobe element, that + covers 100% the modprobe-blacklist functionality. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/package-installs/bin/package-installs-v2 new/diskimage-builder-2.16.0/diskimage_builder/elements/package-installs/bin/package-installs-v2 --- old/diskimage-builder-2.15.1/diskimage_builder/elements/package-installs/bin/package-installs-v2 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/package-installs/bin/package-installs-v2 2018-07-18 07:10:39.000000000 +0200 @@ -18,6 +18,7 @@ import argparse import json +import locale import os import subprocess import sys @@ -29,19 +30,20 @@ # if follow is set, output will be echoed to stdout def process_output(cmdline, follow=False): proc = subprocess.Popen(cmdline, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - universal_newlines=True) + stderr=subprocess.STDOUT) if follow: print("Running command: %s" % cmdline) out = "" with proc.stdout: - for line in iter(proc.stdout.readline, ''): + for line in iter(proc.stdout.readline, b''): + line = line.decode(encoding=locale.getpreferredencoding(False), + errors='backslashreplace') out += line print("> %s" % line, end="") proc.wait() print("returncode: %d" % proc.returncode) else: - out = proc.communicate()[0] + out = proc.communicate()[0].decode(errors='backslashreplace') if proc.returncode: e = subprocess.CalledProcessError(proc.returncode, cmdline) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore new/diskimage-builder-2.16.0/diskimage_builder/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore --- old/diskimage-builder-2.15.1/diskimage_builder/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore 2018-07-18 07:10:39.000000000 +0200 @@ -65,7 +65,7 @@ IFS='|' read -ra SPLIT_MOUNTS <<< "$DIB_MOUNTPOINTS" for MOUNTPOINT in "${SPLIT_MOUNTS[@]}"; do - if [ "${MOUNTPOINT}" != "/tmp/in_target.d" ] && [ "${MOUNTPOINT}" != "/dev" ]; then + if [ "${MOUNTPOINT}" != "/tmp/in_target.d" ] && [ "${MOUNTPOINT}" != "/dev" ] && [ "${MOUNTPOINT}" != "/boot/efi" ]; then sudo ${_runcon} chroot ${TARGET_ROOT} \ /usr/sbin/setfiles -F ${_dash_m} \ /etc/selinux/targeted/contexts/files/file_contexts ${MOUNTPOINT} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces new/diskimage-builder-2.16.0/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces --- old/diskimage-builder-2.15.1/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces 2018-07-18 07:10:39.000000000 +0200 @@ -28,6 +28,10 @@ if [ -f "/etc/network/interfaces" ]; then printf "auto lo\niface lo inet loopback\n\n" > /etc/network/interfaces if [ -d "/etc/network/interfaces.d/" ]; then - printf "source-directory interfaces.d\n\n" >> /etc/network/interfaces + if [ "$DISTRO_NAME" == "ubuntu" ] && [ "$DIB_RELEASE" == "trusty" ]; then + printf "source-directory interfaces.d\n\n" >> /etc/network/interfaces + else + printf "source /etc/network/interfaces.d/*\n\n" >> /etc/network/interfaces + fi fi fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall new/diskimage-builder-2.16.0/diskimage_builder/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall --- old/diskimage-builder-2.15.1/diskimage_builder/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall 2018-07-18 07:10:39.000000000 +0200 @@ -21,6 +21,11 @@ set -eu set -o pipefail +# NOTE(SamYaple): Add the keyring deboostrap used if specified +if [ -n "${DIB_APT_KEYRING:-${DIB_DEBIAN_KEYRING:-}}" ]; then + cat $DIB_APT_KEYRING | sudo chroot $TARGET_ROOT /usr/bin/apt-key add - +fi + # We should manage this in a betterer way sudo bash -c "cat << EOF >$TARGET_ROOT/etc/apt/sources.list deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE ${DIB_DEBIAN_COMPONENTS//,/ } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/lib/disk-image-create new/diskimage-builder-2.16.0/diskimage_builder/lib/disk-image-create --- old/diskimage-builder-2.15.1/diskimage_builder/lib/disk-image-create 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/lib/disk-image-create 2018-07-18 07:10:39.000000000 +0200 @@ -197,6 +197,10 @@ echo "Output logs going to: ${LOGFILE}" _LOGFILE_FLAG="-o ${LOGFILE}" fi + +# Save the existing stdout to fd3 +exec 3>&1 + exec 1> >( ${DIB_PYTHON_EXEC:-python} $_LIB/outfilter.py ${_TS_FLAG} ${_QUIET_FLAG} ${_LOGFILE_FLAG} ) 2>&1 @@ -204,6 +208,10 @@ function _ps4 { IFS=" " called=($(caller 0)) local f=$(readlink -f ${called[2]}) + # As we're being run out of the python package's lib/ dir (either + # virtualenv or system), we can strip everything before + # "site-packages" to significantly shorten the line without really + f=${f##*site-packages/} printf "%-80s " "$f:${called[1]}:${called[0]}" } export -f _ps4 @@ -546,5 +554,18 @@ # Remove the leftovers, i.e. the temporary image directory. cleanup_image_dir +# Restore fd 1&2 from the outfilter.py redirect back to the original +# saved fd. Note small hack that we can't really wait properly for +# outfilter.py so put in a sleep (might be possible to use coproc for +# this...?) +# +# TODO(ianw): probably better to cleanup the exit handler a bit for +# this? We really want some helper functions that append to the exit +# handler so we can register multiple things. +set +o xtrace +echo "Build completed successfully" +exec 1>&3 2>&3 +sleep 1 + # All done! trap EXIT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/lib/outfilter.py new/diskimage-builder-2.16.0/diskimage_builder/lib/outfilter.py --- old/diskimage-builder-2.15.1/diskimage_builder/lib/outfilter.py 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/lib/outfilter.py 2018-07-18 07:10:39.000000000 +0200 @@ -78,7 +78,8 @@ if sys.version_info < (3,): outfile.write(ts_line) else: - outfile.write(ts_line.encode('utf-8')) + outfile.write( + ts_line.encode('utf-8', errors='surrogateescape')) outfile.flush() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder/lib/ramdisk-image-create new/diskimage-builder-2.16.0/diskimage_builder/lib/ramdisk-image-create --- old/diskimage-builder-2.15.1/diskimage_builder/lib/ramdisk-image-create 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder/lib/ramdisk-image-create 2018-07-18 07:10:39.000000000 +0200 @@ -197,6 +197,10 @@ echo "Output logs going to: ${LOGFILE}" _LOGFILE_FLAG="-o ${LOGFILE}" fi + +# Save the existing stdout to fd3 +exec 3>&1 + exec 1> >( ${DIB_PYTHON_EXEC:-python} $_LIB/outfilter.py ${_TS_FLAG} ${_QUIET_FLAG} ${_LOGFILE_FLAG} ) 2>&1 @@ -204,6 +208,10 @@ function _ps4 { IFS=" " called=($(caller 0)) local f=$(readlink -f ${called[2]}) + # As we're being run out of the python package's lib/ dir (either + # virtualenv or system), we can strip everything before + # "site-packages" to significantly shorten the line without really + f=${f##*site-packages/} printf "%-80s " "$f:${called[1]}:${called[0]}" } export -f _ps4 @@ -546,5 +554,18 @@ # Remove the leftovers, i.e. the temporary image directory. cleanup_image_dir +# Restore fd 1&2 from the outfilter.py redirect back to the original +# saved fd. Note small hack that we can't really wait properly for +# outfilter.py so put in a sleep (might be possible to use coproc for +# this...?) +# +# TODO(ianw): probably better to cleanup the exit handler a bit for +# this? We really want some helper functions that append to the exit +# handler so we can register multiple things. +set +o xtrace +echo "Build completed successfully" +exec 1>&3 2>&3 +sleep 1 + # All done! trap EXIT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder.egg-info/PKG-INFO new/diskimage-builder-2.16.0/diskimage_builder.egg-info/PKG-INFO --- old/diskimage-builder-2.15.1/diskimage_builder.egg-info/PKG-INFO 2018-06-01 09:16:43.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder.egg-info/PKG-INFO 2018-07-18 07:12:21.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: diskimage-builder -Version: 2.15.1 +Version: 2.16.0 Summary: Golden Disk Image builder. Home-page: https://docs.openstack.org/diskimage-builder/latest/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder.egg-info/SOURCES.txt new/diskimage-builder-2.16.0/diskimage_builder.egg-info/SOURCES.txt --- old/diskimage-builder-2.15.1/diskimage_builder.egg-info/SOURCES.txt 2018-06-01 09:16:44.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder.egg-info/SOURCES.txt 2018-07-18 07:12:22.000000000 +0200 @@ -410,6 +410,12 @@ diskimage_builder/elements/ironic-agent/static/usr/local/bin/ironic-python-agent-create-rescue-user.sh diskimage_builder/elements/ironic-agent/test-elements/build-succeeds-fedora/element-deps diskimage_builder/elements/ironic-agent/test-elements/build-succeeds-fedora/element-type +diskimage_builder/elements/iscsi-boot/README.rst +diskimage_builder/elements/iscsi-boot/element-deps +diskimage_builder/elements/iscsi-boot/package-installs.yaml +diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config +diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config +diskimage_builder/elements/iscsi-boot/post-install.d/open-iscsi-config diskimage_builder/elements/iso/README.rst diskimage_builder/elements/iso/element-deps diskimage_builder/elements/iso/package-installs.yaml @@ -434,8 +440,11 @@ diskimage_builder/elements/mellanox/install.d/65-mellanox diskimage_builder/elements/mellanox/install.d/mellanox-rules.udev diskimage_builder/elements/mellanox/udev.d/81-mellanox-drivers.rules +diskimage_builder/elements/modprobe/README.rst diskimage_builder/elements/modprobe-blacklist/README.rst diskimage_builder/elements/modprobe-blacklist/install.d/80-modprobe-blacklist +diskimage_builder/elements/modprobe/extra-data.d/50-modprobe-blacklist +diskimage_builder/elements/modprobe/install.d/80-modprobe-blacklist diskimage_builder/elements/no-final-image/README.rst diskimage_builder/elements/oat-client/README.rst diskimage_builder/elements/oat-client/element-deps @@ -771,6 +780,7 @@ releasenotes/notes/1.17.0-ef744f36d277dba4.yaml releasenotes/notes/1.18.0-4433d3076627f10d.yaml releasenotes/notes/1.18.1-ceeb514708dcb731.yaml +releasenotes/notes/add-modprobe-element-8e3b0287ebb11920.yaml releasenotes/notes/block-device-handling-279cddba8a859718.yaml releasenotes/notes/block-device-lvm-c3b8a214952b4db5.yaml releasenotes/notes/block-device-mkfs-mount-fstab-42d7efe28fc2df04.yaml @@ -803,6 +813,7 @@ releasenotes/notes/start-using-reno-446b3d52a467a273.yaml releasenotes/notes/sysprep-f3fd036bc1d2c405.yaml releasenotes/notes/timestamp-43015aa5434e8ddb.yaml +releasenotes/notes/ubuntu-arbitrary-images-c796f5c6dbd40679.yaml releasenotes/notes/upgrade-pip-before-c-d2443847f9d58c7a.yaml releasenotes/notes/yum-cache-removal-148c33012515e56e.yaml releasenotes/source/conf.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder.egg-info/pbr.json new/diskimage-builder-2.16.0/diskimage_builder.egg-info/pbr.json --- old/diskimage-builder-2.15.1/diskimage_builder.egg-info/pbr.json 2018-06-01 09:16:43.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder.egg-info/pbr.json 2018-07-18 07:12:21.000000000 +0200 @@ -1 +1 @@ -{"git_version": "225c09b", "is_release": true} \ No newline at end of file +{"git_version": "1107326", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/diskimage_builder.egg-info/requires.txt new/diskimage-builder-2.16.0/diskimage_builder.egg-info/requires.txt --- old/diskimage-builder-2.15.1/diskimage_builder.egg-info/requires.txt 2018-06-01 09:16:43.000000000 +0200 +++ new/diskimage-builder-2.16.0/diskimage_builder.egg-info/requires.txt 2018-07-18 07:12:21.000000000 +0200 @@ -1,5 +1,5 @@ Babel!=2.4.0,>=2.3.4 -networkx<2.0,>=1.10 +networkx>=1.10 pbr!=2.1.0,>=2.0.0 PyYAML>=3.12 flake8<2.6.0,>=2.5.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/doc/source/developer/developing_elements.rst new/diskimage-builder-2.16.0/doc/source/developer/developing_elements.rst --- old/diskimage-builder-2.15.1/doc/source/developer/developing_elements.rst 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/doc/source/developer/developing_elements.rst 2018-07-18 07:10:39.000000000 +0200 @@ -97,6 +97,9 @@ * inputs: ``$TMP_HOOKS_PATH`` * outputs: None + Contents placed under ``$TMP_HOOKS_PATH`` will be available at + ``/tmp/in_target.d`` inside the chroot. + ``pre-install.d`` Run code in the chroot before customisation or packages are installed. A good place to add apt repositories. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/releasenotes/notes/add-modprobe-element-8e3b0287ebb11920.yaml new/diskimage-builder-2.16.0/releasenotes/notes/add-modprobe-element-8e3b0287ebb11920.yaml --- old/diskimage-builder-2.15.1/releasenotes/notes/add-modprobe-element-8e3b0287ebb11920.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/diskimage-builder-2.16.0/releasenotes/notes/add-modprobe-element-8e3b0287ebb11920.yaml 2018-07-18 07:10:39.000000000 +0200 @@ -0,0 +1,10 @@ +--- +features: + - Add new modprobe element. This element will replace + modprobe-blacklist element. It wil still have the + blacklist functionality, but it also adds the feature + of passing a complete file with settings to the + modprobe.d directory. Adding this functionality, that + will allow elements that depends on this module, to + just copy the specified files to the final directory. + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/releasenotes/notes/reno.cache new/diskimage-builder-2.16.0/releasenotes/notes/reno.cache --- old/diskimage-builder-2.15.1/releasenotes/notes/reno.cache 2018-06-01 09:16:46.000000000 +0200 +++ new/diskimage-builder-2.16.0/releasenotes/notes/reno.cache 2018-07-18 07:12:25.000000000 +0200 @@ -1,5 +1,11 @@ --- file-contents: + releasenotes/notes/add-modprobe-element-8e3b0287ebb11920.yaml: + features: ['Add new modprobe element. This element will replace modprobe-blacklist + element. It wil still have the blacklist functionality, but it also adds the + feature of passing a complete file with settings to the modprobe.d directory. + Adding this functionality, that will allow elements that depends on this module, + to just copy the specified files to the final directory.'] releasenotes/notes/block-device-handling-279cddba8a859718.yaml: deprecations: ['The current way of handling block devices is deprecated. The existing block device phase will be called for a limited time. If this phase delivers @@ -282,6 +288,18 @@ output, and adding your own timestamp). Note that output to ``--logfile`` will always be timestamped.', You can set ``DIB_QUIET`` to ``1`` to suppress all output. This is likely only useful when used with the ``--logfile`` command.] + releasenotes/notes/ubuntu-arbitrary-images-c796f5c6dbd40679.yaml: + upgrade: ['You would need to modify your ``DIB_CLOUD_IMAGES`` and possibly + + ``SHA256SUMS`` variables if you were using them to build Ubuntu with + + elements/ubuntu: ``DIB_CLOUD_IMAGES`` would need to contain URL with + + path, and ``SHA256SUMS`` would not now neccesarily point to + + ``$DIB_RELEASE/current/`` directory. + + '] releasenotes/notes/upgrade-pip-before-c-d2443847f9d58c7a.yaml: fixes: ['This fixes bug 1744403 where 60-ironic-agent-install fails to run @@ -303,6 +321,10 @@ to reuse the cache for the initial chroot install is future work.] notes: - files: + - [releasenotes/notes/add-modprobe-element-8e3b0287ebb11920.yaml, 31383970c72cd96e9b69c7e4a9e5a92bf9f72529] + - [releasenotes/notes/ubuntu-arbitrary-images-c796f5c6dbd40679.yaml, fde82c1f192d346ac3992b1ba30935d29f29818b] + version: 2.16.0 +- files: - [releasenotes/notes/bootloader-gpt-d1047f81f3a0631b.yaml, 55b479b54f8cd064144ba8d1e2e5be33b6a975c8] version: 2.12.0 - files: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/releasenotes/notes/ubuntu-arbitrary-images-c796f5c6dbd40679.yaml new/diskimage-builder-2.16.0/releasenotes/notes/ubuntu-arbitrary-images-c796f5c6dbd40679.yaml --- old/diskimage-builder-2.15.1/releasenotes/notes/ubuntu-arbitrary-images-c796f5c6dbd40679.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/diskimage-builder-2.16.0/releasenotes/notes/ubuntu-arbitrary-images-c796f5c6dbd40679.yaml 2018-07-18 07:10:39.000000000 +0200 @@ -0,0 +1,9 @@ +--- +upgrade: + - | + You would need to modify your ``DIB_CLOUD_IMAGES`` and possibly + ``SHA256SUMS`` variables if you were using them to build Ubuntu with + elements/ubuntu: ``DIB_CLOUD_IMAGES`` would need to contain URL with + path, and ``SHA256SUMS`` would not now neccesarily point to + ``$DIB_RELEASE/current/`` directory. + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/requirements.txt new/diskimage-builder-2.16.0/requirements.txt --- old/diskimage-builder-2.15.1/requirements.txt 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/requirements.txt 2018-07-18 07:10:51.000000000 +0200 @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. Babel!=2.4.0,>=2.3.4 # BSD -networkx<2.0,>=1.10 # BSD +networkx>=1.10 # BSD pbr!=2.1.0,>=2.0.0 # Apache-2.0 PyYAML>=3.12 # MIT flake8<2.6.0,>=2.5.4 # MIT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/test-requirements.txt new/diskimage-builder-2.16.0/test-requirements.txt --- old/diskimage-builder-2.15.1/test-requirements.txt 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/test-requirements.txt 2018-07-18 07:10:51.000000000 +0200 @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. hacking<0.11,>=0.10.0 -pylint==1.7.1 # GPLv2 +pylint==1.7.6 # GPLv2 fixtures>=3.0.0 # Apache-2.0/BSD mock>=2.0.0 # BSD diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diskimage-builder-2.15.1/tests/run_functests.sh new/diskimage-builder-2.16.0/tests/run_functests.sh --- old/diskimage-builder-2.15.1/tests/run_functests.sh 2018-06-01 09:15:08.000000000 +0200 +++ new/diskimage-builder-2.16.0/tests/run_functests.sh 2018-07-18 07:10:39.000000000 +0200 @@ -6,7 +6,7 @@ BASE_DIR=$(cd $(dirname "$0")/.. && pwd) # then execute tests for elements -export DIB_CMD=disk-image-create +export DIB_CMD="disk-image-create" export DIB_ELEMENTS=$(python -c ' import diskimage_builder.paths diskimage_builder.paths.show_path("elements")') @@ -106,6 +106,22 @@ fi } +# This takes the status and the "$logfile" argument passed to +# disk-image-create and renames the file, so you can quickly see +# in results which tests have failed. +function logfile_status { + local status="$1" + local arg="$2" + local filename + if [[ -z "${arg// }" ]]; then + return + fi + + filename="$(echo $arg | cut -f2 -d' ')" + echo "Moving ${filename} to ${filename/.log/.$status.log}" + mv "$filename" ${filename/.log/.$status.log} +} + # run_disk_element_test <test_element> <element> <use_tmp> <output_formats> # Run a disk-image-build build of ELEMENT including any elements # specified by TEST_ELEMENT. Pass OUTPUT_FORMAT to "-t" @@ -114,6 +130,7 @@ local element=$2 local dont_use_tmp=$3 local output_format="$4" + local logfile="$5" local use_tmp_flag="" local dest_dir=$(mktemp -d) @@ -132,6 +149,7 @@ ELEMENTS_PATH=$DIB_ELEMENTS/$element/test-elements \ $DIB_CMD -x -t ${output_format} \ ${use_tmp_flag} \ + ${logfile} \ -o $dest_dir/image -n $element $test_element 2>&1 \ | log_with_prefix "${element}/${test_element}"; then @@ -139,6 +157,7 @@ if ! [ -f "$dest_dir/image.qcow2" ]; then echo "Error: qcow2 build failed for element: $element, test-element: $test_element." echo "No image $dest_dir/image.qcow2 found!" + logfile_status "FAIL" "${logfile}" exit 1 fi fi @@ -147,20 +166,25 @@ if ! [ -f "$dest_dir/image.tar" ]; then echo "Error: Build failed for element: $element, test-element: $test_element." echo "No image $dest_dir/image.tar found!" + logfile_status "FAIL" "${logfile}" exit 1 else if tar -tf $dest_dir/image.tar | grep -q /tmp/dib-test-should-fail; then echo "Error: Element: $element, test-element $test_element should have failed, but passed." + logfile_status "FAIL" "${logfile}" exit 1 else echo "PASS: Element $element, test-element: $test_element" + logfile_status "PASS" "${logfile}" fi fi else if [ -f "${dest_dir}/dib-test-should-fail" ]; then echo "PASS: Element $element, test-element: $test_element" + logfile_status "PASS" "${logfile}" else echo "Error: Build failed for element: $element, test-element: $test_element." + logfile_status "FAIL" "${logfile}" exit 1 fi fi @@ -220,11 +244,12 @@ JOB_MAX_CNT=1 LOG_DATESTAMP=0 KEEP_OUTPUT=0 +LOG_DIRECTORY='' # # Parse args # -while getopts ":hlj:t" opt; do +while getopts ":hlj:tL:" opt; do case $opt in h) echo "run_functests.sh [-h] [-l] <test> <test> ..." @@ -233,6 +258,7 @@ echo " -j : parallel job count (default to 1)" echo " -t : prefix log messages with timestamp" echo " -k : keep output directories" + echo " -L : output logs into this directory" echo " <test> : functional test to run" echo " Special test 'all' will run all tests" exit 0 @@ -261,6 +287,9 @@ k) KEEP_OUTPUT=1 ;; + L) + LOG_DIRECTORY=${OPTARG} + ;; \?) echo "Invalid option: -$OPTARG" exit 1 @@ -305,6 +334,11 @@ done fi +if [[ -n "${LOG_DIRECTORY}" ]]; then + mkdir -p "${LOG_DIRECTORY}" + export DIB_QUIET=1 +fi + # print a little status info echo "------" echo ${title} @@ -365,8 +399,15 @@ element_output=$(cat ${element_output_override}) fi + log_argument=' ' + if [[ -n "${LOG_DIRECTORY}" ]]; then + log_argument="--logfile ${LOG_DIRECTORY}/${element}_${test_element}.log" + fi + echo "Running $test ($element_type)" - run_${element_type}_element_test $test_element $element ${DONT_USE_TMP} "${element_output}" & + run_${element_type}_element_test \ + $test_element $element \ + ${DONT_USE_TMP} "${element_output}" "$log_argument" & done # Wait for the rest of the jobs ++++++ diskimage-builder-rpmlintrc ++++++ --- /var/tmp/diff_new_pack.qm7IFD/_old 2018-07-21 10:24:55.710961722 +0200 +++ /var/tmp/diff_new_pack.qm7IFD/_new 2018-07-21 10:24:55.710961722 +0200 @@ -1,6 +1,6 @@ # /usr/local/bin/dib-python interpreter is only used inside # the generated image so it's not something that affects the # host or the package itself. -addFilter(".*wrong-script-interpreter.*/usr/lib/python2.7/site-packages/diskimage_builder/elements/.*") +addFilter(".*wrong-script-interpreter.*/usr/lib/python3.*/site-packages/diskimage_builder/elements/.*") # lib/* scripts are not meant to be used directly but rather be sourced by others. -addFilter(".*non-executable-script.*/usr/lib/python2.7/site-packages/diskimage_builder/lib/.*") +addFilter(".*non-executable-script.*/usr/lib/python3.*/site-packages/diskimage_builder/lib/.*")