diff -Nru python-diskimage-builder-2.11.0/AUTHORS python-diskimage-builder-2.17.0/AUTHORS --- python-diskimage-builder-2.11.0/AUTHORS 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/AUTHORS 2018-09-13 04:30:23.000000000 +0000 @@ -0,0 +1,269 @@ +Abel Lopez +Adam Gandelman +Adam Harwell +Alex Schultz +Alexander Gordeev +Alexis Lee +Alfredo Moralejo +Amrith Kumar +Ana Krivokapic +Andreas Florath +Andreas Jaeger +Andrey Shestakov +Angel Noam +Angus Salkeld +Anshul Jain +Antoine Musso +Aparna +Arata Notsu +Arx Cruz +Atsushi SAKAI +Augustina Ragwitz +AzherKhan +Ben Kero +Ben Nemec +Ben Nemec +Bernard Cafarelli +Bob Ball +Bob Fournier +Bruno Cornec +Cady_Chen +Cao Xuan Hoang +Carlos Goncalves +Charalampos Kominos +Chhavi Agarwal +Chris Alfonso +Chris Jones +Chris Jones +Chris Krelle +Christian Berendt +Chuck Short +Cian O'Driscoll +Clark Boylan +Clint Adams +Clint Byrum +Cody A.W. Somerville +Coleman Corrigan +Colleen Murphy +Corey O'Brien +Corey O'Brien +Cédric Ollivier +Dan Prince +Dan Radez +Darragh Bailey +Darragh Bailey +Dave Hill +Dave Thomas +Derek Higgins +Devananda van der Veen +Dirk Mueller +Dmitry Tantsur +Dmitry Tantsur +Doug Hellmann +Doug Szumski +Dougal Matthews +Dustin J. Mitchell +Emilien Macchi +Endre Karlson +Erno Kuvaja +Erwan Velu +Ethan Gafford +Evgeny Antyshev +Frederic Lepied +Gabriele Cerami +Gary Duan +Ghe Rivero +Ghe Rivero +Ghe Rivero +Ghe Rivero +Giulio Fidente +Gloria +Gonéri Le Bouder +Gonéri Le Bouder +Gregory Haynes +Haomeng, Wang +Hironori Shiina +Hoang Trung Hieu +Ian Wienand +Igor Belikov +Isaac Beckman +Ivan Berezovskiy +IvanBerezovskiy +JUN JIE NAN +JUNJIE NAN +James Arendt +James E. Blair +James E. Blair +James Polley +James Slagle +Jamie Lennox +Jan Grant +Jan Provaznik +Jane.zhang +Jeff Peeler +Jeffrey Zhang +Jeremy Stanley +Jerry Zhao +Jesse Keating +Jiri Stransky +Joe Gordon +Joey D +John L. Villalovos +John Trowbridge +Jon-Paul Sullivan +Jonas Sticha +Jonathan Brownell +Juan Antonio Osorio Robles +Juerg Haefliger +Julia Kreger +Junya Akahira +K Jonathan Harker +Kashyap Chamarthy +Kevin Carter +Kevin TIBI +Kiall Mac Innes +Kui Shi +Lennart Regebro +Lenny Verkhovsky +Lin Tan +Liu Qing +Luca Lorenzetto +Lucas Alvares Gomes +Luigi Toscano +Luong Anh Tuan +Mark Goddard +Mark Hamzy +Mark McLoughlin +Markos Chandras +Martin André +Martin André +Mathieu Gagné +Mathieu Mitchell +Matthew Farrellee +Matthew Thode +Michael Johnson +Michael Kerrin +Michael McCune +Michael Turek +Michael Turek +Mikhail S Medvedev +Monty Taylor +Moshe Levi +NTTdocomo +NTTdocomo-openstack +Nam Nguyen Hoai +Newell Jensen +Nguyen Van Trung +Nicholas Randon +Nikhil Manchanda +Nisha Agarwal +NoBodyCam +Noam Angel +Oded Le'Sage +Oliver Walsh +Olivier Bourdon +Om Kumar +Ondřej Nový +Paul Belanger +Perry Myers +Peter Stachowski +Pierre Riteau +Pino Toscano +Rafael Folco +Rafael Folco +Ralf Haferkamp +Ramakrishnan G +Ricardo Carrillo Cruz +Richard Su +Ripal Nathuji +Robert Collins +Robert Collins +Robert Li +Robert Myers +Roman Gorshunov +Roman Podoliaka +Russell Sim +Ryan Brady +Ryan Hallisey +Sagi Shnaidman +Sam Betts +Sam Yaple +SamYaple +Sandhya Ganapathy +Sascha Peilicke +Saverio Proto +Shane Wang +Shivanand Tendulker +Simon Leinen +Spencer Krum +Stanislav Makar +Stephen Mulcahy +Steve Baker +Steve Kowalik +Steven Dake +Steven DuChene +Stuart McLaren +Sushil Kumar +THOMAS J. COCOZZELLO +Thom Leggett +Thomas Bechtold +Thomas Goirand +Tim Flink +Tim Miller +Tim Potter +Tim Serong +Tobias Henkel +Tomas Hancock +Tomas Sedovic +Tony Breeds +Trent Geerdes +Tristan Cacqueray +Tristan Cacqueray +Uwe Grawert +Van Hung Pham +Victor Lowther +Vipul Sabhaya +Vu Cong Tuan +Waldemar Znoinski +Wesley Hayutin +Xiang Chen +XiaojueGuan +Xinliang Liu +Yanis Guenane +Yolanda Robla +Yolanda Robla +Yolanda Robla Mota +YuikoTakada +Yuriy Zveryanskyy +Zhangfei Gao +Zhao Lei +Zhiguo Deng +Zuul +aweiteka +chenxiangui +chenxing +chriskrelle +d.marlin +gecong1973 +gengchc2 +goldyfruit +iberezovskiy +janonymous +jodewey +justin-hopper +kaiokassiano +lifeless +liyuanzhen +loki +nizam +sayalilunkad +sjing +stephane +tanlin +vmud213 +wangqi +xhzhf +yogananth subramanian +zhang.lei +zhangdebo +zhangjian diff -Nru python-diskimage-builder-2.11.0/bindep.txt python-diskimage-builder-2.17.0/bindep.txt --- python-diskimage-builder-2.11.0/bindep.txt 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/bindep.txt 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/ChangeLog python-diskimage-builder-2.17.0/ChangeLog --- python-diskimage-builder-2.11.0/ChangeLog 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/ChangeLog 2018-09-13 04:30:22.000000000 +0000 @@ -0,0 +1,2496 @@ +CHANGES +======= + +2.17.0 +------ + +* Only append DIB\_BOOTLOADER\_DEFAULT\_CMDLINE to default grub entry +* Fix CentOS image build failure when dib runs on system where audit disabled +* Fix bootloader packages for aarch64 +* Replace assertRaisesRegexp with assertRaisesRegex +* Remove unsued opensuse jobs +* Remove legacy-opensuse-423 nodeset +* Install ca-certificate with redhat-common +* Add netcat to redhat-common map-packages +* Fix typo in installation.rst +* Only detach device if all partitions have been cleaned +* Move LVM cleanup phase into cleanup +* Add DIB element to blacklist nouveau +* modprobe DIB\_MODPROBE\_BLACKLIST should be optional +* cache-url requires curl + +2.16.0 +------ + +* Update pylint to 1.7.6, uncap networkx +* Fix for proper LVM support +* Update developing\_elements +* Add expected semicolons for dhclient.conf +* Add keyring if supplied +* Call kpartx remove in umount, not cleanup +* Move localloop to exec\_sudo +* Add new modprobe element +* block-device lvm: fix umount phase +* Don't quote names with sgdisk +* better handle existing keywords files/directories +* 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 +* elements: zypper-minimal: Add support for openSUSE Leap 15.X +* Add Ubuntu 18.04 support +* IPA requires iptables +* Remove duplicate GRUB command line entry +* rpm-distro: set the contentdir yum var +* Trivial: update url to new url +* Fixes add-apt-keys in dpkg element +* Add pip cache cleanup to pip-and-virtualenv +* Install sudo on Gentoo images by deault +* pip-and-virtualenv: fix install-pip when centos-release-openstack is enabled +* Stop using slave\_scripts/install-distro-packages.sh + +2.14.1 +------ + +* Fix epel element for centos-minimal + +2.14.0 +------ + +* Revert "debootstrap: Call update-initramfs explicitly" +* Remove installed packages before pip install + +2.13.0 +------ + +* Don't only install python3-virtualenv +* Don't use -e to test for what might be broken symlink +* add lower-constraints job +* Set the dhclient timeout to match DIB\_DHCP\_TIMEOUT +* Formalise saving of /etc/resolv.conf +* Restore tracing on exit points of block\_device\_create\_config\_file +* delete unused module +* debootstrap: Call update-initramfs explicitly +* Change the GENTOO\_PORTAGE\_CLEANUP variable default +* Fix element-provides in debian element +* Revert "Remove tripleo jobs" +* enable systemd profile for Gentoo +* install sudo in the devuser element + +2.12.1 +------ + +* Fix default partition type +* Remove tripleo jobs +* remove portage git directory + +2.12.0 +------ + +* Updated from global requirements +* Updated from global requirements +* proliant-tools: add net-tools package to support hpsum utility +* 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 +* Choose appropriate bootloader for block-device +* Add block-device defaults +* Fail if two elements provide the same thing +* GPT partitioning support +* update Gentoo Hardened profiles (now stable) +* Checking link status according to DIB\_DHCP\_TIMEOUT + +2.11.0 +------ + +* Install systemd earlier for Ubuntu Bionic +* update gentoo vars for new profile and python +* Fix typo doc +* Zuul: Remove project name +* Remove some redundant indents +* Set default label for XFS disks +* Don't install dmidecode on Fedora ppc64le +* Updated from global requirements +* Add support for Fedora 27, remove EOL Fedora 25 +* Don't fstrim vfat partitions +* Remove RH1 check OVB jobs from configuration +* upgrade pip before using -c option +* Correct link address +* Updated from global requirements +* Add SUSE Mapping + +2.10.1 +------ + +* Revert "Dont install python-pip for py3k" + +2.10.0 +------ + +* Adding mapping for SUSE package +* Check source-repository-\* files for trailing newline +* Update Fedora defaults to 27 +* ironic-agent: don't remove make +* Remove architecture rules on lshw dependency in ironic-agent +* zypper: fix package removal +* Avoid tox\_install.sh for constraints support +* Fix wrong epel-release-7\* package URL +* Add the groundwork for musl profile support +* Enable support for Gentoo overlays +* Pre-install curl +* Install fedora-gpg-keys for F27 +* Make preinstall.d more deterministic +* Use EPEL for debootstrap on centos +* Fix /dev/pts mount options handling +* Make python changes more reliable +* zuul: add tripleo jobs +* Remove setting of version/release from releasenotes +* elements: zypper-minimal: Refresh repositories where necessary +* Updated from global requirements +* elements: Respect devpts mount options +* Dont install python-pip for py3k +* Enable gentoo in pip-and-virtualenv element +* zypper-minimal: Set default locale env to C.UTF-8 +* Add zipl element as s390x architecture bootloader +* diskimage\_builder: lib: common-functions: Fix options for devpts mount +* Zuul: add file extension to playbook path +* Move to a common lock-file directory +* Create rescue user on ironic agent +* Use -t devpts for /dev/pts mounts +* Dont install python-virtualenv for py3k in deb +* Import legacy playbooks +* Add debian minimal requirement for arm64 +* Fix grub2 dependency on arm64 +* Remove dd from LVM element +* Update Gentoo element for element changes +* Update proliant-tools to support Gen10 Proliant servers +* Move fstrim to block device layer +* Add Constraints support + +2.9.0 +----- + +* Revert "Support networkx 2.0" +* Support networkx 2.0 +* Add initramfs-tools for ubuntu-minimal +* Actually sort mount-point list +* Change to install a package in 'proliant-tools' +* Create /etc/machine-id for fedora +* Use latest Fedora .qcow URL +* Updated from global requirements +* Add missing package dependency for yaml +* Mention the need of dracut-regenerate element +* Move the ordering of the dracut regenerate command +* Remove nested quotes from TAROPTS +* Use [[ for =~ matches +* Fix cylical systemd config for dhcp-all-interfaces +* Updated from global requirements +* LVM support for dib-block-device +* Increase timeout for removal +* Add netbase to ensure /etc/protocols is placed for debian +* Add kpartx as a requirement to build images +* Clear up debian element documentation +* Clear /etc/machine-id to avoid duplicate machine-ids +* Bump fedora/fedora-minimal DIB\_RELEASE 26 +* Updated from global requirements + +2.8.0 +----- + +* Move selinux packages to redhat-common +* Allow users to specify partition type in the MBR PTE + +2.7.2 +----- + +* Use SELinuxfs to check selinux status +* Switch openSUSE to 42.3 by default + +2.7.1 +----- + +* elements: zypper-minimal: Install tar package + +2.7.0 +----- + +* Move setfiles to outside chroot with runcon +* zypper: Clean caches and don't cache packages locally +* doc: supported\_distros: Add openSUSE Leap 42.2/3 and Tumbleweed +* Add -m flag to setfiles for Fedora 26 +* yum-minimal: pre-install coreutils +* Force install during pip-and-virtualenv +* Fix latest-limit command line +* Updated from global requirements +* opensuse-minimal: install glibc-locale +* elements: openstack-ci-mirrors: Use openSUSE mirrors for gating jobs +* Update the documentation link for doc migration +* Remove DIB\_[DISTRO]\_DISTRIBUTION\_MIRROR +* doc: Switch from oslosphinx to openstackdocstheme +* The correct option for label name in fat and vfat is '-n' +* zypper-minimal: No point in preserving the environment here +* Remove additional Bumblebee repository for opensuse element +* Enable console during kernel boot on Power +* fix readme.rst to reflect correct environment variable +* Add symlink test for resolv.conf restore +* pip-and-virtualenv: Install python3 on openSUSE +* Support for Cloud Images on ppc64le for rhel7 and centos7 +* bindep.txt: Exclude gnupg2 package on openSUSE +* Avoid hanging endlessly on unreachable cache urls +* elements: pip-and-virtualenv: Use common packages for openSUSE +* Remove mirror create +* Remove centos and rhel elements +* Updated from global requirements +* dib-lint: Ignore editor temp files for linting run +* As far as block-device layout is concerned ppc64le == ppc64el +* [doc] Add some notes about PowerPC Architecture names +* Move image download tests to default skip +* Fix mkfs use wrong label option for vfat +* Use the dib python to do cleanup + +2.6.1 +----- + +* On suse the python2 dev package is python-devel +* Move ironic-agent test to fedora-minimal +* Start at using CI mirrors for fedora/centos +* Use local mirror for ubuntu-minimal jobs +* Move apt-sources to ubuntu-minimal / move debian to skip list +* Sync after writing partition table +* Install systemd earlier for Stretch +* Fix mkfs failure when loop device is not ready +* Add timestamp output filter + +2.6.0 +----- + +* PPC bootloader; install to boot partition +* Pass all blockdevices to bootloader +* Move rollback into NodeBase object +* Move global mount tracking into state +* Use global state to check for duplicate fs labels +* Remove 'state' argument from later cmd\_\* calls +* Add state to NodeBase class +* Use picked nodes for later cmd\_\* calls +* Don't make image & loopdev functions static +* Add env var to dump config graph +* Use class as super() argument +* Move ppc block-device default to right $ARCH +* Update tracing in block\_device\_create\_config\_file +* Add a keep-output flag for functional tests +* Updated from global requirements +* Pad state dump +* Use https in docs links +* Add missing test requirements, fixup pylint env +* Move "functional" unit tests under block-device +* Replace assertRaisesRegexp with assertRaisesRegex +* Adjust package mapping for SUSE family +* Drop support for Ubuntu precise +* Adjust package installation for openSUSE +* Trivial fix typos +* Make BlockDeviceState implement a dict +* Refactor mount-point sorting +* Remove dracut-network element +* Remove ccache +* Decode string to bytes in dracut-regenerate +* Test openSUSE 42.2/42.3 image builds +* Add state object, rename "results", add unit tests +* allow uninstalls to fail on gentoo +* Refactor: use lazy logging +* Add pylint with indent check + +2.5.0 +----- + +* Disable recommended package installations for zypper-minimal +* Move create\_graph into config.py +* Create and use plugin/node abstract classes +* Use networkx for digraph +* Add a more generic tree->graph parser +* Adding unit testing for configuration +* drop deprecated map-services/packages from zypper element +* Produce API documentation + +2.4.1 +----- + +* Set manifest permissions in the image +* dhcp-all-interfaces.sh - Add support for InfiniBand interface DHCP +* Move parts of Partition creation into object +* Split partition into it's own file +* Move exception to it's own file (again) +* Add weights to digraph +* Switch debian to deb.debian.org +* Remove use of 'which' +* Add dracut-regenerate elements +* Remove \_config\_error thrower +* Set manifests to mode 600 and owner root +* Use fakelogger in test\_blockdevice\_mbr +* Remove PluginBase/NodePluginBase class +* Only unmount directories that are mounted +* Updated from global requirements +* Apply setfiles on all mountpoints +* Updated from global requirements + +2.4.0 +----- + +* Refactor: block-device filesystem creation, mount and fstab +* Remove args from BlockDevice() init +* Move to subparsers +* Clear \_\_init\_\_.py from cmd move +* Take --params from environment +* Create BlockDeviceCmd object +* Move YAML parsing into cmd.py; default to env +* Move dib-block-device implementation into cmd.py +* Move blockdevicesetupexception.py into blockdevice.py +* Remove unused val\_else\_none +* block\_device: reorder imports +* exec\_sudo: check cmd for str, log output and raise exception +* Use check\_output +* Add sort\_mount\_point method +* Refactor documentation on image creation +* Add a test to validate we can build debian vms +* Introduce exec\_sudo command +* Fix py3 error in block-device +* Refactor block-device base functions +* Add bzip2 to test install +* Add refactor of tree-like vs graph +* Set LC\_ALL in disk-image-create +* Improve documentation for image creation +* Refactor block\_device: isolate the getval call +* Refactor block\_device: passing command line parameters +* Make Gentoo package updates work more often + +2.3.3 +----- + +* Add yum-utils as EPEL dependency +* Turn off strict\_id mode for Ec2 datasource +* Clean up dib-python symlink +* Updated from global requirements + +2.3.2 +----- + +* Skip python3-virtualenv on <= trusty + +2.3.1 +----- + +* pip-and-virtualenv : install python2 & 3, and default to 2 +* Install pip with python interpreter + +2.3.0 +----- + +* Move do\_extra\_package\_install to run in install phase +* Clean out apt index caches at end of image build +* Updated from global requirements +* Unify and fix doc of several Debian and Ubuntu elements +* Fix package-installs-v2 output +* Basic logging for package-installs-squash +* Use DIB\_PYTHON\_EXEC to run commands +* Fix typo in pip-and-virtualenv +* Ignore missing path in unmount\_dir +* Run dib-run-parts out of /tmp +* Don't provide dib-run-parts +* Add flag to disable EPEL +* Fix code-block in README of rhel7 element +* Fix opensuse-minimal element on non-SUSE hosts + +2.2.0 +----- + +* Have simple-init enable network.service +* Use stevedore for plugin config of block device +* Use correct Ubuntu distro url on non-x86 arches +* Typo fix: curent => current +* functests: skip qcow2 generically but add specific test +* Add default PPC block-device layout +* Capture output in \_exec\_sudo +* Adding aarch64 support for CentOS7 +* Fix typo in CMDLINE env var for bootloader + +2.1.0 +----- + +* Allow ELEMENTS\_DIR to be configurable +* Use sphinx warning-is-error +* Updated from global requirements +* squash-package-install to use the correct python +* Make our virtualenv source py3 safe +* blockdevice.py: python3 fixes +* Fix dib-init-system for Debian Jessie and Debian Stretch +* Replace architecture-emulation-binaries with qemu-debootstrap + +2.0.0 +----- + +* Add 2.0.0 release notes +* Send custom parameters in bootloader to GRUB\_CMDLINE + +2.0.0rc2 +-------- + +* Run indent checks in diskimage\_builder/lib +* Use OrderedDict for partitions instead of simple dictionary +* Refactor: block-device partitioning cleanup + +1.28.0 +------ + +* [suse] Handle pip-and-virtualenv install for opensuse +* pip-and-virtualenv: also handle rhel distros +* [suse] remove --no-confirm from zypper invocation +* gentoo: do not manually clean /tmp +* Fix requirements update +* Fix #1627402: fix grub2 element for ubuntu xenial + +2.0.0rc1 +-------- + +* Semi-automatic doc generation of element dependency +* Fix up doc errors +* Fix up element doc generation +* python-brickclient: accommodate python2/3 changes +* Move Ubuntu specific use\_tempaddr setting to ubuntu-common element +* Fix typo in README.rst +* yum/install-packages output cleanup +* Preinstall pyOpenSSL +* Target map-packages deprecation message +* Turn down some low-value tracing output +* Move generation of dib\_[environment|args] to manifest element +* Check return of \_load\_state +* block-device: change top level config from dict to list + +1.27.0 +------ + +* Handle blank lines in element-deps +* Don't run unit tests from run\_functests.sh +* Git ignore coverage stuff +* Refactor: block-device handling (partitioning) +* Add DIB\_IPA\_COMPRESS\_CMD option +* ironic-agent: use /sbin for modprobe +* move post-install.d to finalize.d +* Bump fedora release to 25 +* Fix dhcp-all-interfaces for ubuntu-minimal xenial +* Use strings in package-installs follow output +* Don't set base element path in run\_functests.sh +* Fix coverage report +* Use %i instead of %I in dhcp-interface@.service +* Remove hardcoded components +* Set grub device in /etc/default/grub +* Replace yaml.load() with yaml.safe\_load() +* Unify tidy up logs in lib/img-functions +* Also check bin/ for tabs +* Handle failure of carrier check in dhcp-all-interfaces.sh +* Fix Gentoo builds on Ubuntu 16.04 Xenial hosts +* Make DHCP timeout configurable +* Run dhcp-interface@.service after network.target +* Update component docs to refer to ironic-agent +* Change "Openstack" to "OpenStack" +* update pkg-map entries for python3 + +1.26.1 +------ + +* Revert "Revert Xenial to Python 2" +* Dont run with VIRTUAL\_ENV set +* dib-lint: python3 compatibility fixes +* H803 hacking have been deprecated +* Update documented default Ubuntu version + +1.26.0 +------ + +* Revert Xenial to Python 2 +* debootstrap: avoid duplicate network configuration +* Start func testing on centos-minimal again +* Increase func testing for ubuntu-minimal element +* Remove yum chroot caching +* Set grub timeout default +* Switch py34 tests to py35 +* Add get\_elements; preserve backwards compat for expand\_dependencies +* Update our package classifiers +* set default DIB\_PYTHON\_VERSION=2 for rhel7 +* Add squashfs output image format + +1.25.2 +------ + +* Add output image format tgz support +* Install dracut-generic-config package +* Switch to openSUSE Leap 42.2 release by default +* FIx the DIB\_CLOUD\_INIT\_ALLOW\_SSH\_PWAUTH variable name in README file + +1.25.1 +------ + +* Add ubuntu-precise support to dib-python +* Fix bootloader element on ppc +* Create ubuntu/fedora test for pip-and-virtualenv + +1.25.0 +------ + +* Recreate initramfs within loopback image +* Pip install as 10- incompatible with 05-heat-cfntools +* Support sysv init system used by Debian Wheezy +* elements: dib-python: Add python2 as the default version for openSUSE +* Fix pip-and-virtualenv to work with python3 +* Allow package-installs to parse DIB\_PYTHON\_VERSION +* Add install-types as pip-and-virtualenv dep +* Disable centos6 testing +* Move pip-and-virtualenv source install to 10- +* Speed up chroot checking loop +* Don't set the executable bit on dhcp-interface@.service +* Make dib-python use the default python for distro +* Allow disto-specific mirror settings +* Put MKFS\_OPTS after filesystem type +* Update hpssacli to ssacli in proliant-tools element +* Update sysctl-write-value to do conflict checking +* Delete deprecated Hacking in tox.ini +* elements: Drop executable bits from environment files + +1.24.0 +------ + +* Fix --version display +* DIB element to support cinder local attach/detach functionality +* Perform package install outside of debootstrap +* Improve checksum performance for images +* Activate virtualenv in disk-image-create +* elements: zypper-minimal: Add ca-certificates-mozilla package +* Changed author and author-email + +1.23.0 +------ + + +1.22.2 +------ + +* yum-minimal: add systemd to initial install +* Catch errors in DIB\_INIT\_SYSTEM export +* Replace six.iteritems() with .items() +* Trace package install in package-installs-v2 +* Special case dib-python in dib-lint +* elements: Drop unneeded DIB\_INIT\_SYSTEM usage +* elements: Add new openssh-server element +* add option to configure cloud-init to allow password authentication +* elements: pip-and-virtualenv: Add python-xml dependency + +1.22.1 +------ + +* Fix runtime ssh host keys script +* Turn off tracing around pid/chroot check +* Fix a typo + +1.22.0 +------ + +* Change path for dnf arch override so basearch is not overwritten +* Fedora AArch64 (64-bit ARM) support in diskimage-builder +* Disable all repos in os-refresh-config too +* lib: common-functions: Fix tmpfs umounting +* add support for SUSE in dhcp-all-interfaces +* simplify ARCH param for rhel/centos param can be x86\_64 and amd64 +* debian: install dialog package +* Install lsb package by map name instead of package name +* In disk-image-create, append to INSTALL\_PACKAGES instead of clobbering +* Cleanup yumdownloader repos +* Updated from global requirements +* Remove execute perm from disk-image-create +* Move dib-run-parts into diskimage-builder +* Avoid disabling rhel-7-server-rh-common-rpms +* elements: zypper-minimal: Mount common pseudo filesystems +* Updated from global requirements +* dhcp-all-interfaces: support Centos/RHEL 6 +* Move diskimage-image-create to an entry point +* Move elements & lib relative to diskimage\_builder package +* Fail on element-info error +* elements: zypper-minimal: Refresh repositories after adding the cache +* elements: opensuse-minimal: Add support for building Tumbleweed images +* Fix ironic-python-agent image not loading vfat mod +* Don't include openstack/common in flake8 exclude list +* Drop MANIFEST.in - it's not needed by pbr +* Changed the home-page of diskimage-builder in setup.cfg +* Remove RedHat grub workaround install +* Add support for bindep.txt +* Don't log datestamp by default in functional tests +* elements: zypper: Do not pull recommended packages +* Turn down yum install-packages +* Don't set tracing in environment files +* elements: source-repositories: Add git package mapping for SUSE +* elements: growroot: Add SUSE package mappings +* elements: runtime-ssh-host-keys: Add openssh-client mapping for SUSE +* Don't use ssh-keygen -A for init scripts +* elements: simple-init: Remove SUSE interfaces +* Document install of diskimage-builder on Gentoo +* Add element for setting sysctl values +* start cloud-init-local in the boot runlevel +* Fix formatting for supported distros in docs +* Rename devloper documentation to developer guide +* Remove copyright from docs / toc +* Use globaltoc in docs for sidebar +* Fix developer guide TOC +* Add low-hanging-fruit bug tag to docs +* Add bugs link to docs +* Generate ssh-hostkeys on boot for ironic agent +* Enable release notes translation +* Add pkg-map for gentoo to runtime-ssh-host-keys +* Remove deploy element +* Remove deprecated deploy-ironic element +* Remove deprecated ironic-discoverd-ramdisk +* Remove deprecated expand-dependencies arg +* Remove deprecated serial-console element +* Remove deprecated map-services +* Remove deprecated map-services + +1.21.0 +------ + +* Create (md5|sha256) checksum files for images +* Add opensuse-minimal element +* Add zypper-minimal element +* Move the opensuse mkinitrd script to the zypper element +* Fix a command in Developer Documentation +* Default to http://ftp.us.debian.org/debian for debian-minimal +* Updated from global requirements +* Move opensuse utils to zypper so they can be shared by SUSE-based distros + +1.20.0 +------ + +* Disabling all previous repos registered in the system +* Fix typo in extracting root partition +* Create runtime-ssh-host-keys element +* Fix grub installation for RHEL +* Add release notes for block device handling +* Shorten DHCP timeout in dhcp-all-interfaces + +1.19.1 +------ + +* yum-minimal: Disable excludes when installing pkg manager +* Add libselinux-python to yum-minimal +* elements: opensuse: Add support for openSUSE Leap + +1.19.0 +------ + +* Remove EPEL as hardcoded dependency of centos elements +* Remove unnecessary dkms install from base +* Fix mellanox element required kernel modules and user space packages +* don't configure 'lo' for dhcp +* Move element-info to a standard entry-point +* Refactor: block-device handling (local loop) +* Convert pkg-map and svc-map copies to explicit variables +* Add IMAGE\_ELEMENT\_YAML and get\_image\_element\_array +* Making element overriding explicit +* fix systemd resource deadlock +* Add option to be able to run\_functests.sh in parallel +* Document source glean installs in simple-init +* Disabled IPv6 privacy extensions +* Generate and use upper-constraints for ironic-agent +* Explain difference between two envvars +* Add tests for building \*-minimal images +* Spec for changing the block device handling +* Update portage only if needed +* Update GRUB\_MKCONFIG for detecting what's installed +* Allow ramdisk-create to run without $USER set +* Use temp file for du calculations +* Clarify OVERWRITE\_OLD\_IMAGE docs +* Add blurb about communication to docs landing page +* Change DIB\_IPA\_CERT resulting file name +* Allow to skip kernel cleanup +* Add specs dir +* Add "audit"package to yum-minimal +* secure\_path in sudoers: deal with possible quotes +* Optionally remove portage files +* Generalize logic for skipping final image generation + +1.18.2 +------ + +* add no\_proxy when debootstrap trying to use proxy +* Correct order of parameters in call to qemu-img convert +* Correct order of parameters in call to tune2fs +* Fix proliant-tools dependencies +* Fix packaging problems for Debian +* Remove the escape in the centos7 README file +* Spec for changing the block device handling: partitioning +* yum-minimal: set locale.conf and tz in chroot +* Revert "Revert "Pre-install pip/virtualenv packages"" +* Don't create an ironic-agent image just to delete it +* Make Fedora 24 the default +* Check sudoers file after editing + +1.18.1 +------ + +* Add 1.18.1 releasenotes +* Revert "Pre-install pip/virtualenv packages" +* package-installs: add list to arch and "not-arch" list +* Export YUM variable in centos bases +* Clear up "already provided" message +* Fix the bug that "mktemp: failed to create directory" +* dmidecode does not exist for ppc64/ppc64el +* Updated from global requirements + +1.18.0 +------ + +* Convert element\_dependencies to logging +* Release notes for 1.18 +* Make xenial the ubuntu default +* Clean more from ironic-agent ramdisk image +* Updated from global requirements +* Handle locales install on Fedora 24 +* Fix copyright in docs +* Run RHEL system unregister element earlier +* Updated from global requirements +* Fix sphinx-build to not depend on diskimage-builder +* Pre-install pip/virtualenv packages +* Ironic agent kernel should be owned by user building image +* Introspect logging testing more +* Add python logger configuration +* Remove discover from test-requirements +* Move pkg-map to dib-python +* Add cinder-backup mappings + +1.17.0 +------ + +* Release notes for 1.17.0 +* Cleanup source-repositories output +* Refactor: rename temporary directories +* Refactor: remove unused functions +* Rework yum-minimal locale cleanup +* Remove Fedora 21 from test-build +* Export die() function +* Fix variable unbound error while REPOREF="\*" +* Handle file magic type varying order matching +* Remove deprecated overriding of cloud-init defaults +* Add cloud-initramfs-growroot for Precise +* Add release to pkg-map +* Export FS\_TYPE and remove hardcoded ext4 values +* Add PS4 to show file/function/line in debug output + +1.16.1 +------ + +* Revert "Revert "Properly fail/trap in eval\_run\_d"" and fix PIPESTATUS +* Fix path issue for locale-archive.tmpl +* Revert "Properly fail/trap in eval\_run\_d" +* Add dhcp-all-interfaces.target for syncing units +* Small doc update, add link to relnotes + +1.16.0 +------ + +* centos-minimal: can be used with base +* Properly fail/trap in eval\_run\_d +* Add 1.16.0 releasenotes +* Do not remove sudo in ironic-agent +* Fail functests if refusing to run tests +* Install docker for tests +* Fix apt-sources configuration for debian-minimal +* Add install-bin element +* tests/elements/fake-os: add '/tmp' as top level dir +* Updated from global requirements +* Add a best-effort sudo safety check +* Fix OpenSUSE support +* Install proliantutils in IPA's virtualenv +* Add documentation for dib-lint +* Add test dependency installation on Gentoo + +1.15.0 +------ + +* Use generic "dhcp-client" name +* Split YAML & JSON parsing +* Add some output to dib-lint +* dhcp-all-interfaces depends on dib-init-system +* dhcp-all-interfaces depends on dhcp +* Add Gentoo to the dhcp-all-interfaces element +* Updated from global requirements +* yum-minimal: strip locale archive +* Add releasenotes +* Change to latest CentOS-6 image +* Document upstream executable numbering convention +* Move selinux restore to end of finalise +* yum-minimal : better cleanup of initial yum failure +* Add EPEL as requirement of centos-minimal +* Allow skipping the md docs check +* Don't stop dib-lint on first flake8 failure +* Fix up EPEL element +* Updated from global requirements +* Support to add certificate in ironic-agent +* simple-init: Fix path for /etc/ssh test +* Fix disk usage report +* Add qcow2 generation for better test coverage +* Skip gentoo test +* Turn of tracing around du invocations + +1.14.1 +------ + +* Fix add-apt-repository package for precise +* Fix ssh key cleanup to run in chroot +* Debian: dont set always the hostname to debian + +1.14.0 +------ + +* Remove ssh host keys when using simple init +* dib-run-parts: make cp to target root more robust +* Set tgtd not auto-start on OS boot time + +1.13.0 +------ + +* Handle unconfigured interfaces for dhcp-all-ifaces +* Really remove all interfaces in dhcp-all-ifaces +* ironic-agent postinst fails on systemd with no iptables +* add pkg-map to pip-and-virtualenv element +* Turn down tracing for source-repo cache +* ironic-python-agent should use console output +* Add psmisc to the packages for ironic-agent +* Add new posix element +* Note requirement for parted on gentoo hosts +* Remove all interface configs for simple-init +* Set default locale to image in debootstrap element +* Make ubuntu-core support releases +* Add testing for the Gentoo element +* Updated from global requirements + +1.12.0 +------ + +* Use fstrim to prep the block device +* Revert "Zerofree the image if possible" +* centos-minimal does not provide base +* Add lshw package to ironic-agent +* yum-minimal: clear our rpm/dnf/yum data in chroot +* Add image size report +* Zerofree the image if possible +* Create new partitioning-sfdisk element +* Fix spurious = in dib-python readme +* Fix cloud-init-disable-resizefs README title +* Reorder developer quickstart docs +* Add --version option to disk-image-create +* Add Gentoo to the list of supported distributions +* Prioritize venv python on host + +1.11.1 +------ + +* Fix building on gentoo hosts +* Depend on ifupdown in simple-init +* Rework functional test runner +* Revert "Correct rhel-common for rhel6" +* Adding InfiniBand Support +* Add force-confdef in debian package install +* Install IPA in a virtual environment +* Don't cache debootstrap rootfs by default +* Don't remove python3 & grubby in 99-remove-extra-packages + +1.11.0 +------ + +* debian-minimal: configurable debootstrap components + +1.10.0 +------ + +* Remove eclean-dist as it's not available by default +* Reorder the package-uninstall action +* Do not remove python-dev from ironic-agent image +* yum-minimal: pre-install base packages +* Fix dpkg element for Ubuntu Xenial +* Refactor growroot for debuggabilty +* Fix startup race with growroot/systemd +* Replace sfdisk partitioning with parted +* Switch simple-init to pip-and-virtualenv element +* Revert "Skip centos functional testing" +* Use dnf to cleanup old kernels +* Increase interface has link retries to 20 +* Fix growroot for Gentoo's openrc +* Fix tar listing in functional tests +* Add support for OpenRC to dib-init-system + +1.9.0 +----- + +* Add new cloud-init element +* Fix Gentoo hardened support +* Skip centos functional testing +* Fix package-installs for python3 +* Add support for gentoo to simple-init +* Mark ironic-discoverd-ramdisk as deprecated in favor of ironic-agent +* Add Gentoo support to growroot +* Add support for Gentoo to source-repositories +* Remove outdated translation files +* Only match #!/bin/bash in scripts +* Fix debian-minimal image building +* Updated from global requirements +* Don't use wc -l for the umount check +* Cleanup unmount\_dir function +* Add systemd/fedora support to growroot +* Remove argparse from requirements +* Revert "Use pip 7 for ironic" +* Updated from global requirements +* Force dib-python symlink creation +* Remove zero length files +* Use pip 7 for ironic + +1.8.0 +----- + + +1.7.2 +----- + +* Add inetutils-ping to test-deps +* Move speedup section to image building guide +* Add pkg-map for redhat +* Revert "Fix discoverd bug when dmidecode reports GB" +* Print unparsable file in pkg-map + +1.7.1 +----- + +* Fill out bootloader pkg-map + +1.7.0 +----- + +* Initial add of gentoo support for diskimage-builder +* Prune old branches when updating cache +* Correct rhel-common for rhel6 +* deploy-ironic: Fix syntax error when checking for root device hints +* Add pip-and-virtualenv element +* Run package-intalls with py3k if we must +* The mirror for installing epel is timing out +* Properly account for pipefail during cleanup +* Make dkms element depend on dkms package +* py26 is no longer supported by Infra's CI + +1.6.0 +----- + +* Fix discoverd bug when dmidecode reports GB +* yum-minimal : install selinux policy packages +* yum-minimal: do not configure eth0 & eth1 for DHCP automatically +* yum-minimal: leave behind dummy /etc/resolv.conf +* Fix growroot device detection +* Package installs defaults to tracing off +* Don't print trace unless trace is on in pkg-map +* Fix unmount/remove race in cleanup\_build\_dir +* Make check for image-should-fail quiet +* Document byte-to-inode ratio +* Split vm and bootloader elements +* Deprecated tox -downloadcache option removed +* Add a new element hpdsa +* Add dib-python element +* Allow grub2 to build with opensuse + +1.5.0 +----- + +* Add kmod to package-installs of ironic-agent +* Load the 8021q kernel module in simple-init +* Add openssh-server package-install to local-config +* Fix grub-efi-amd64-signed install failure +* Fix fedora-minimal on CentOS builds +* Follow up patch for 25d3ee547176528e86d42eb026c99a134dff9452 +* Updated from global requirements +* Add centos7 test +* Add DIB\_LOCAL\_CONFIG\_USERNAME to local-config +* Use ironic-agent for source-repositories +* Add dynamic-login element + +1.4.0 +----- + +* Remove fedora-minimal/install.d/99-ramdisk +* Remove cloud-initramfs-growroot package +* Extend root device hints for different types of WWN +* Move install-types doc to user guide + +1.3.0 +----- + +* Fixup RPM db path when building Fedora on Ubuntu +* Remove unused RELEASE\_RPMS variable +* Fix diskimage-builder image size +* Add proliant-tools element +* Add missing six requirement for svc-map element +* Fix fedora-minimal kernel-install on older platforms +* Clarify what fedora-minimal/install.d/99-ramdisk is doing +* Fix uniqueness check of initrd in fedora-minimal +* Updated from global requirements +* debian: cloud hostname ignored by Jessie +* Selectively prune /root for ironic-agent ramdisk +* Add a tox target to run functional tests locally +* Create YUM\_CACHE\_DIR in yum-minimal +* Use DIB\_EPEL\_MIRROR when finding the epel-release package + +1.2.0 +----- + +* Add support for Xen PV disks +* Add --force to grub-install +* Preserve env when calling yum with sudo +* Define a default for $YUM +* Fix tests/test\_functions.bash +* Fix devuser pubkey defaults +* Reset yum/dnf cache to correct location +* Remove extra install of release pkgs in fedora-minimal +* Update default fedora-minimal to f22 +* Add Fedora 22 support to yum-minimal +* Enable decimal value for $DIB\_IMAGE\_SIZE +* Update rhel7 element readme +* Move yum-based install into function +* Update apt-preferences element README from free text to table formatting +* Update apt-conf elements README from free text to table formatting +* Fix title of env vars section of fedora README to match template +* Fix title of env vars section of redhat-common README to match template +* Avoid transcending /proc with find +* Reorder the script number of 'elements/dkms/post-install.d/99-dkms' +* dib-lint: ignore blank lines in element ordering +* Restrict search for python object files to ./usr +* Add flake8 to requirements +* agent: ensure vmlinuz file does not exist before hard-linking into it +* Prevent overwriting of user modified blacklist.conf +* Remove quotes from subshell call in bash script +* Contains the directory name of /sys and /proc +* Install 'gdisk' when building ramdisk with ironic-agent +* Use --nodeps when installing fedora-release +* Output failing lines when dib-lint finds wrong indents +* Adds debian support to iso element +* ironic-agent element to output a .kernel file +* Add functional test for ironic-agent on Fedora +* Updated from global requirements +* Add option to set EPEL mirror +* Remove dnf workaround in ironic-agent +* ironic-agent: remove python object files +* Install ironic-agent dependencies via package-installs +* Fix variable misspelling error + +1.1.2 +----- + +* Prettyfy source-repositories doc +* Prettify 'Caches and offline mode' documentation +* Download a compressed centos cloud images +* Prettify 'Developing Elements' documentation +* Add centos7 support for DIB\_DISTRIBUTION\_MIRROR +* Don't create a centos yum repository +* Add #!/bin/bash to library functions +* Make README.rst a bit more generic +* Deprecate the deploy-ironic element +* dib-lint: validate json/yaml files +* Make sure dnf won't autoremove packages that we explicitly installed +* Handle install with pip -e +* doc: migrate from README.rst to Sphinx +* Update fedora elements README from free text to table formatting +* Update redhat-common elements README from free text to table formatting +* svc-map: do not specify user/group for install +* Activate pep8 check that \_ is imported +* Remove grub2 in redhat-common/pre-install.d/15-remove-grub +* Remove old entries from MANIFEST.in +* ironic-agent: ensure dmidecode and ipmitool are installed +* [ironic-agent] Use svc-map for enabling agent +* Update dpkg elements README from free text to table formatting +* Fix ironic-image pkg-map + +1.1.1 +----- + +* Run growroot after all filesystems are mounted +* Updated from global requirements + +1.1.0 +----- + +* Fix a typo in README.rst +* create growroot element +* Install-static depends on rsync +* Fix init-scripts element path munging and deps +* Pin the Fedora mirror for testing +* Reduce the size of the ironic-agent ramdisk +* Set and export DIB\_RELEASE for centos7 +* Correct URL in ironic-agent README +* Add curl to ironic-agent package installs +* Handle modern sfdisk and correctly align image partition +* Set DIB\_RELEASE for the Debian test-element +* Add documentation of output formats for users +* Remove docker doc from docs +* Add ability to build ironic-python-agent ramdisk from packages +* Adds Ubuntu and Debian to ironic-python-agent Support-list +* Fix link in installation doc + +1.0.0 +----- + +* debian: properly configure interfaces +* typos on the document +* Only warn about missing map files with debug +* Fix test cleanup trap to cleanup tmpdir +* Support building ACIs +* Document what our stable interfaces are +* Add element to disable cloud-init resizefs +* Update default Fedora to 22 +* Cleanup yum downloading +* Add base element for using docker as image base +* Add docker output support +* Add init-scripts directory support +* Document our supported distributions +* Use official mirror name for debian-minimal +* debian: install DHCP client and ifconfig packages +* Removes hardcoded refrences for ethernet interface +* Remove deprecated disk-image-get-kernel +* opensuse: Update README +* openSUSE: Fix link to the images download folder +* Use the init scripts from the glean package + +0.1.47 +------ + +* Have glean set hostname if a config drive exists +* Add oat-client element +* Allow source-repositories ref to be "\*" +* Only chown tmp dirs when they are a tmpfs mount +* Work around yum/dnf differences +* Add YUM variable to for Fedora >= 22 +* Optimize Python install in deploy-targetcli +* Updated from global requirements +* dib-lint: make it work on Mac OS X +* Wait longer for root device to become available +* Revert "Revert "Ensure DIB\_RELEASE is exported for fedora"" +* Add test for centos 6 +* Document only exectuables in phase dirs policy +* Change simple-init to use a PATH variable +* Add explicit f21 test +* Dont fail if were missing setfiles +* Revert "Remove unused map\_nbd function" +* ramdisk: enable ppc64 support for symlink +* Cleanup the build directories earlier + +0.1.46 +------ + +* Revert "Ensure DIB\_RELEASE is exported for fedora" +* CentOS-6 resize support +* Follow symlink for elements +* Add grub2 element +* Don't log tmpfs message during cleanup +* Support custom kernel cmdline args for deploy iso +* Address follow-up comments +* Add Ironic API version to passthru URL for deploy-ironic +* Skip backups and other non-relevant files for dib-lint +* Use tar -t instead of -l because centos 6 +* Make it clear that tmpfs is optional +* Ensure DIB\_RELEASE is exported for fedora +* rhel-common element should not use attach with activation key +* Make $DIB\_YUM\_REPO\_CONF accept a list of repo files +* Pass glean output to the console log +* Use environment setfiles +* redhat-common: rename 01-clean-old-kernels.sh to drop .sh extension +* Cleanup /tmp in the guest +* Add debian build test case +* Install debian locales +* Add smoketest for fedora +* Initial element tests +* doc: small snippet about operating system elements +* Use Centos 7 cloud image symlink +* vm: use $DISTRO\_NAME instead of lsb\_release +* rax-nova-agent: switch to $DISTRO\_NAME +* ramdisk: switch from lsb\_release to $DISTRO\_NAME +* Simple-init should disable cloud-init +* Make managing hosts entries optional +* Have simple-init regenerate ssh keys on boot + +0.1.45 +------ + +* Remove install of vlan/vconfig from base +* package-installs: fix error case for Python 2.6 +* centos/centos7: switch to epel element +* epel: support centos element +* Address comments on virtual media device label commit +* debootstrap: fix syntax issues +* Fix disk image create errors behind proxy +* force arch amd64 for EL7 elements +* Add packages required for iscsi extension in agent +* Package ldlinux.c32 along with isolinux.bin if it exists +* Add install\_test\_deps script +* Fix $DIB\_DEFAULT\_INSTALLTYPE export statement +* Export DIB\_RELEASE in centos + +0.1.44 +------ + +* debian-minimal: Remove -backport's restricted + universe + +0.1.43 +------ + +* Actually set a sane PATH for inside chroot +* Turn docs warnings into errors and fix issues +* Generate locales in debian-based elements +* Split the debootstrap functions into an element +* Install glean from openstack source +* Support arch-specific package-installs +* Add functional smoke test for disk-image-create +* Updated from global requirements +* Mount with -o nouuid for XFS base images +* Port centos-minimal to yum-minimal +* Use shorter temporary file names for kpartx +* Fix image size to fit filesystem journal +* Use labels for virtual media dev in Ironic ramdisk +* Append full path to img-functions:run\_in\_target +* Updated from global requirements +* Remove unused map\_nbd function +* update the dib centos7 baseurl to use a mirrorlist +* openSUSE update +* Add a yum-minimal element that just uses yum +* Add element to process config-drive network info +* Break install-types out of base +* Support VHD output format +* Update packages earlier +* Fix to load only signed kernel in UEFI secure boot +* Add element ubuntu-signed to provide signed kernel +* Update install docs to be more user friendly +* Switch default Fedora image to F21 + +0.1.42 +------ + +* Clean up targetcli ramdisk installation +* Make troubleshoot work with dracut ramdisks +* Do not export REG\_HALT\_UNREGISTER between hook scripts +* Add generic devuser element +* Update cloud-init-datasources README +* Improved apt-sources README +* Don't trace RHEL Registration scripts +* Try 5 times for rmdir command call after umount +* Generate the default en\_US locale +* No markdown docs for elements +* Create the dracut directory if not existing already +* Export image properties +* Correctly handle raw type ordering +* Create a user guide +* Report status of boot loader installation to Ironic +* Fix dhclient in Fedora ramdisks +* Use find instead of ls +* Reorder tox environments +* Add py34 to tox +* Run svc-map tests +* Open MKFS\_OPTS for extension in disk-image-create +* Short circuit qemu-img convert for raw images +* Download of translations not properly disabled in APT +* Split dib-init-system into its own element +* Handle non-cloud-init installs +* Dont try to unmount if were not using tmpfs +* Run udevadm settle after kpartx -l +* Refactor deploy ramdisk to allow use of targetcli +* Allow elements to add drivers to dracut +* Fedora: install redhat-rpm-config +* Cleanup/restify components.rst +* redhat-common: Fix MariaDB-Galera-server case +* Flagging ubuntu-minimal as untested + +0.1.41 +------ + +* Ironic: Deploy ramdisk to find the right root device +* Ironic: uefi localboot support +* Convert leftover unconditional set -x to DIB\_DEBUG\_TRACE +* Fix check for installtype +* Fix incorrect package name dmidecoded to dmidecode +* ironic-agent: exclude content of /tmp from initramfs +* UEFI secure boot support for iso element +* Install Fedora kernel-modules pkg for iscsi\_tcp +* Allow disabling apt-get clean +* Set DIB\_RELEASE in ubuntu element +* CentOS 6 Element +* Fix race in svc-map +* Use package-installs on dpkg-based elements +* openSUSE update +* package-installs: work with Python < 2.7 +* Split out README into separate files +* Add wget to package-installs.yaml for epel +* Updated readme +* Fix unbound variables in apt-{preferences,sources} +* pkg-map: respect --missing-ok also on missing pkg-map file +* update epel version number in epel element +* Allow setting DIB\_PIP\_RETRIES +* Add a link to the "Writing an element" section +* Quote to handle empty DIB\_RELEASE +* Namespace PYPI\_MIRROR\_URL vars with DIB +* Fix memory detection in ironic-discoverd-ramdisk +* Add documentation of DIB\_IMAGE\_CACHE variable +* Simplify ironic-discoverd-ramdisk +* Support assigning IPMI credentials in ironic-discoverd-ramdisk +* Use oslosphinx for docs site +* Standarise tracing for scripts +* Bump to hacking 0.10 +* Fix the bootloader on UEFI machines +* Add \`tox -edocs\` capability +* Create docs site containing element READMEs +* Fix type in DIB\_DISTRIBUTION\_MIRROR use +* Pass BOOTIF to ironic-discoverd from the ramdisk +* Use package-installs for ubuntu and base elements +* Add apt-get autoremove +* Add install-static element +* Enable vm element to create PowerPC image +* Add no\_timer\_check to vm grub cmdline +* Dont fail if we have no old-style package-installs +* Use sudo -E when squashing package installs files + +0.1.40 +------ + +* setfiles consistently +* Ironic: Local boot +* Corrected \`element-info\` usage +* Add installtype support to package-installs +* Fix issue with leaking /tmp/image.\* directories +* ironic-discoverd-ramdisk element cleanup +* Add support for using local PowerPC VM image +* ramdisk-image-create: add support for vmlinux file + +0.1.39 +------ + +* Switch manage\_etc\_hosts from True to localhost +* Set http\_proxy to retrieve the signed Release file +* Run Registration Once +* Fix Satellite Repo +* Use DIB\_IMAGE\_CACHE in dpkg element +* Fix for RHEL6 +* Allow for disabling rhel registration +* dracut-ramdisk: fix support for elements with ramdisk-install.d +* Don't trace RHEL registration scripts +* Ignore stderr from pkg-map +* Allow absolute path to image with ironic-agent +* Add install section to Ironic agent systemd service file +* Fail helpfully if uuidgen is missing +* Continue past dependency ordering diffs +* Add element for ubuntu-core +* Add rax-nova-agent element +* Add minimal ubuntu and centos base elements + +0.1.38 +------ + +* Rework package-installs to collapse on build host +* Fallback to a boot\_server kernel param if ip= not passed +* Add some speedups to dpkg +* Deprecates username and password from boot time registration +* Use env python +* Fix repo enablement for RHEL during registration +* Allow injecting arbitrary yum repo configuration +* Don't use lsb\_release +* Fix rst rendering +* Add Activation Key Support For Customer Portal +* Migrate to new package-installs +* Add new package-installs system +* Improve --ramdisk-element docs +* Unset requiretty if it exists in sudoers +* Remove the grub2 install from redhat-common +* Remove use of sudo from yum pre and post elements +* Add element for hardware discovery ramdisk for ironic-discoverd + +0.1.37 +------ + +* disk-image-create: fix test when no argument is given +* Warning when using pypi element without a mirror +* Make some pkg-map errors soft +* Fail helpfully if no elements are specified +* Check python with flake8 instead of dib-lint +* Update RHEL Registration + +0.1.36 +------ + +* Deprecate map-packages, replaced by pkg-map +* Allow multiple identical sources +* Add DIB\_DEBOOTSTRAP\_EXTRA\_ARGS environment variable +* deploy-kexec depends on deploy +* Remove duplicate binary-deps from dracut-ramdisk +* Add element for building ramdisk with ironic-python-agent +* Simplify Dracut cmdline script +* Add deprecation warning when using map-services +* Fix indent exclusion +* Install PyYAML for the svc-map element +* Install lsb\_release from package +* Enable RHEL Registration +* Support installing packages by default +* Optimize speed of deletion in find command +* package-installs assumes packages have a pkg-map +* Updated from global requirements +* Unset trap before dracut ramdisk build script exits +* iso element to use 'search --label' for grub +* Update Debian repo to retrieve signed Release file +* export DIB\_ROOT\_LABEL to make it global + +0.1.35 +------ + +* Use binary-deps.d for dracut ramdisks +* Move busybox binary-dep to ramdisk element +* svc-map requires PyYAML +* iso element to build bootable ISO images +* Handle extra spaces in merge-svc-map-files +* Enable dracut deploy ramdisks +* Revert "introduce $SYSTEMD\_SYSTEM\_UNIT\_DIR" +* Avoid overwritting of hooks +* Disable all interfaces on eni systems +* Remove first-boot.d support +* Force empty $TMPDIR inside the chroot +* Allow source-repositories to be disabled completely + +0.1.34 +------ + +* Move to final release of CentOS7 images +* Consolidate lsb\_release source-repositories +* Allow for multiple image outputs from raw source +* Echo that qemu-img convert is running +* Preserve exit value when leaving cleanup trap +* Don't re-install cloud-init for centos7 images +* Check for epel before installing it + +0.1.33 +------ + +* Do not try to detach non-existant loopback devices +* Move install bin from rpm-distro to yum +* Use DIB\_IMAGE\_CACHE everywhere +* Save extended attributes when creating tar +* Ensure epel7 is installed only on rhel7/centos7 +* Update EPEL release rpm +* Fix $DISTRO\_NAME usage for centos7 element + +0.1.32 +------ + +* Add unit test for cache-url +* Use $((EXPRESSION)) instead of $[EXPRESSION] +* Install openstack-selinux on RHEL +* Updated from global requirements +* Move dpkg manifest creation to finalise +* Allow custom rootfs labels +* Add svc-map element +* Refactor ramdisk element to allow alternate implementations +* Updated from global requirements +* Adds EPEL repo, cleans up rhel7 repos +* Update to newer Centos7 images +* Provide ability to build images for other architectures +* Handle non-existing \*generic kernel and initrd + +0.1.31 +------ + +* Change order for yum-repos file in centos7 element +* Make diskimage-builder work in Docker +* Add ceilometer service mappings + +0.1.30 +------ + +* Run environment.d hook for manifests earlier +* Reset yum configuration in post-install.d +* Add vmedia boot support for deploy-ironic element +* opensuse: Support pkg removal in install-packages +* Use package-installs in more elements +* Replace backticks with $() +* Fix openSUSE kernel/initrd detection +* Correct statement about ramdisk and tmpfs +* Fix for host env leak into grub + +0.1.29 +------ + +* Fix openSUSE cloud image download and extraction +* Add element-manifest +* Changed serial console setup +* Map dkms package for SUSE in base element +* Fix capitalization of openSUSE +* Fix ramdisk pkg-map for openSUSE +* Truncate instead of deleting log files +* Lock around extract-image downloads and extracts +* Add support for flashing ILO BMC's from ramdisks +* Remove docs about deprecated pypi-mirror tool +* Use dib-run-parts from dib-utils + +0.1.28 +------ + +* Make RHSM registration set -u safe +* Add service mappings for ironic +* Revert "Remove the temporary deploy element after rename" +* Remove hardcoded version +* Increase source-repositories support for tarballs +* map-services: add openstack-nova-novncproxy +* Allow to specify an empty package list in pkg\_map +* Use package-installs in fedora +* package-installs for pre-install.d/post-install.d +* Formatting fixes for dhcp-all-interfaces +* Remove disable\_interface from dhcp-all-interfaces + +0.1.27 +------ + +* Relabel filesystem if SELinux is available +* debian: exclude contents of /tmp from debootstrap tarballs +* Centralize handling of /lost+found + +0.1.26 +------ + +* Cleanup apt cache after grub install +* Extend/fix support for extlinux bootloader +* Create cache directory +* Remove package mapping for mariadb-rdo-galera-server +* Adds RHEL common element +* Support for UBoot +* Add dib-lint exclusions +* Revert "Cleanup apt cache after grub install" +* Fix sourcing of environment files +* Add virtual media boot support in ramdisk element +* Cleanup apt cache after grub install +* Update RHEL7 element since release +* Bump hacking to 0.9.x series +* Lock around ubuntu tarball download +* Avoid to install a blank list of packages +* Don't try to install if packages is empty +* Add a ramdisk-install.d hook path +* Initial centos7 support + +0.1.25 +------ + +* Update RHEL 6.5 Image name +* Add dhcp support for ramdisk element +* Handle non-script grub2-install +* Use readlink to get script path +* Detail 'other' directories in the README + +0.1.24 +------ + +* Lock around source repositories setup +* Really handle Ubuntu mirror cache skew, +* Echo output when pkg-map fails +* Optimizing directory creation +* Revert "Don't match editor backup files in env.. +* Allow overwriting old images +* Correction: if then statement code style +* Last ditch effort to correct a wrong shasum +* Avoid to install a blank list of packages +* Add global exclusions to dib-lint +* Don't match editor backup files in environment +* Remove fixfiles from rpm-distro finalize + +0.1.23 +------ + +* Rename rhel element yum blacklist +* Set LC\_ALL=C into dib-run-parts env +* update opensuse element +* Use $DISTRO\_NAME instead of local lsb\_release +* Add RHEL7 to Red Hat family in pkg-map +* Use common element select-boot-kernel-initrd +* Always bind-mount pypi mirror if dir exists +* Add select-boot-kernel-initrd element + +0.1.22 +------ + +* Ignore manifest outputs more carefully +* VM element: Enable serial console on Debian +* Disk-image-create should allow sending compat flags to qemu-img +* Ensure cache directory exists before use +* update zypper element + +0.1.21 +------ + +* Drop ending slash from DIB\_CLOUD\_IMAGES +* Update base element to make use of pkg-map +* opensuse: support pkg-map in bin/install-packages +* dpkg: support pkg-map in bin/install-packages +* Element to remove unwanted kernel/initrd +* introduce $SYSTEMD\_SYSTEM\_UNIT\_DIR +* Update README regarding Debian and OpenSUSE support +* Do not use DatasourceNone for precise cloud-init +* Explicitly name element enable-serial-console +* avoid failure if /lib/firmware doesn't exist +* Tidy base image by removing /var/log files +* debian: fix network on Wheezy + +0.1.20 +------ + +* Refactor code to select boot kernel +* fail at startup with no operating-system element +* Add test to ensure we don't duplicate filenames +* Name deploy-ironic and deploy-baremetal files uniq +* Name 10-rhel-cloud-image uniquely +* Name 01-install-bin uniquely +* Delete redhat-common 00-usr-local-bin-secure-path +* Name 99-setup-first-boot uniquely +* Yum: support pkg-map in bin/install-packages +* Add tar as an output type +* Correct source-repository comments +* dpkg: local cache for .deb files +* map-services: add openvswitch +* Ensure dib-run-parts profiling works with py3 and py2 +* Rename old image file instead of rewrite it +* Add missing dollar +* Replacing deploy to deploy-baremetal in README.md +* Reinstate Trusty as default for Ubuntu +* Only use Ec2 cloud-init data source for Ubuntu +* Remove uneeded code from pkg-map +* Correct the wrong rename in rhel element +* Add manifests to .gitignore +* Check return code of element-info +* Add new cloud-init-datasources element + +0.1.19 +------ + +* Set DISTRO\_NAME in OS environment.d + +0.1.18 +------ + +* Add pkg-map element +* Factor out error behavior in dib-lint +* Fix package removal +* Create an element to allow using a dpkg manifest +* Check for set -o pipefail +* Set -o pipefail new scripts +* Add support for source-repos gerrit refs + +0.1.17 +------ + +* Stop using bash arrays for whitelisting in yum +* Tidy up SuSE kernel selection +* Parameterise PXE kernel and initrd selection +* Debian: Support additional debootstrap arguments +* \`set -u\` doesn't permit bash arrays to test -n +* Ensure we can read the kernel out +* Export unbound variable DIB\_RHSM\_USER +* indent: search for !=4 spaces indentation +* 4 spaces indent +* Updated from global requirements +* Adding -x to set parameters for more output + +0.1.16 +------ + +* Ensure scripts are set -u +* set -u and -o pipefail everywhere +* Fedora: Add support for configuring Yum mirrors +* dib-lint: check for tab indent in files +* dib-lint: ensure file finish with a new line +* add some missing \n at end of file +* Add map-services for debian distros +* Make sure all scripts are set -e +* Allow excluding tests from certain files +* Eliminate 'tr' in favor of inline bash +* Support declarative package installs/uninstalls +* Build raw image in separate tmpfs +* debian: properly deal with Debian stable/unstable + +0.1.15 +------ + +* Permit cache-url to work with fifos +* debian: add systemd support +* debian: support upstart on Wheezy +* Debian element should activate eth0 +* Respect inmutable resolv.conf in the image +* set -e all the things +* Explicitly use bash +* Remove All Rights Reserved + +0.1.14 +------ + +* Add package uninstall support +* Revert default Ubuntu release back to Saucy +* Add a mapping for kernel headers +* Map openjdk-7-jre-headless to RHEL+SUSE +* Sort rhel/bin/map-packages +* Add sysv support to elements/dhcp-all-interfaces +* Place /usr/lib64/ccache in PATH +* Small fixes for dhcp-all-interfaces +* cleaning up 01-copy-manifests-dir +* Remove the temporary deploy element after rename +* Use provides to note an element provides deploy +* Remove dependency on /etc/lsb-release +* indent: replace tab by 4 spaces +* Make "trusty" (Ubuntu 14.04) the default release +* Add switch to turn on caching for debian element +* Remove cloudy interfaces in dhcp-all-interfaces +* debian: simplify the way debian element is called + +0.1.13 +------ + +* Fix set -eu and pipefail failures +* Move instead of copy the temporary git manifest +* Add mapping for mariadb rdo package +* map-services: add apache2 in the list +* Remove map-services from fedora element +* Use provides to note an element provides an OS +* Standardise manifest creation and retrieval +* Remove call to depmod in busybox +* apt-conf: uninitialised variables fix + +0.1.12 +------ + +* Iterate over provided elements first +* Add ability to add extra apt keys +* doc: indentation rules for element +* Document a little the concerns for operators +* debian: use sudo to create file in the chroot +* Disable splashimage for legacy grub +* Change refspec used to fetch all branches and tags +* fix grub2 installation on Debian Wheezy +* Fix Grub configurations for Fedora images built on a UEFI host + +0.1.11 +------ + +* Fix dhcp-all-interfaces upstart job +* Fix dhcp-all-interfaces on Ubuntu/Debian +* Fix resource exhaustion with upstart +* Write a dpkg manifest to list installed packages +* Fix "(None)" seed hostname on Debian +* dhcp-all-interfaces: correct ifquery return stmt + +0.1.10 +------ + +* Make stable-interface-names its own element +* Uses policy-rc.d to prevent dpkg starting daemons +* Enforce alphabetical ordering of element-deps +* Alphabetize all element-deps +* Add dib-lint script +* Adds package mapping for mariadb packages +* Adding pypi-mirror dependencies for redhat +* Revert "Only create a tmpfs big enough for DIB\_MIN\_TMPFS" +* debian: install cloud-init on Wheezy +* Remove an excess cp of disk images +* Adds "element-provides" support to element dependencies +* Add console kernel parameters to extlinux configuration +* Permit use of wheel mirrors in pypi element +* baremetal: correct the path of ifcfg-eth0 +* Adds libmariadb-dev package mapping +* rename udev.rules to dhcp-all-interfaces-udev +* serial-console: Use udev rules to startup getty +* Set +x on executable files + +0.1.9 +----- + +* DHCP: make udev rules want dhcp-interface@.service +* Add RHEL 7 image element +* Use redhat-common in fedora element +* Add redhat-common element +* Correct README.md markdown errors +* Support adding DHCP interfaces one at a time +* Move install type enablement into base element +* Remove hardcoded /tftpboot/ from token's tftp path +* RHEL Package maps for build-essential, python-dev and libz-dev +* Extract move cache logic to a function +* Always export IMAGE\_NAME +* baremetal element: Enable stable interface names +* Fixup all occurrences of REPONAME for replacing '-' +* Create a git manifest from source-repositories +* Add apache2 mod\_wsgi pkg map for suse +* Updated from global requirements +* 98-source-repositories tries to return from script +* Add libaio1 to libaio pkg map for fedora +* Only create a tmpfs big enough for DIB\_MIN\_TMPFS +* Additional swift storage service mappings +* Update openSUSE package mapping for libffi-dev +* Better apt-sources docs +* Add nfs-common package mapping +* Replace more then just "-" in REPONAME +* Bash eval the lines in source-repository scripts +* Fix spelling error in "vm" element README.md +* Add $EXTRA\_ARGS back to yum call +* Update the image name for RHEL Guest Image +* Alphabetize openSUSE services dictionary +* Alphabetize openSUSE packages dictionary +* Alphabetize Fedora services dictionary +* Alphabetize Fedora packages dictionary +* Enable extlinux support for (non-Ubuntu) Debian platforms +* Replace use of show-ref with name-rev + +0.1.8 +----- + +* Fix syntax error in GRUB\_OPTS env var handling +* Update README formatting and content +* Improve local-config proxy handling +* Enable custom apt.conf in apt-conf element +* Add rsync to the package list used by debootstrap +* Enable simple modification of git repo location +* Add NFS package mapping +* Improve usability of the source-repositories cache +* Fix unbound variable in debian element + +0.1.7 +----- + +* Replace security.ubuntu.com when setting mirror +* Generalize install-packages for yum +* Remove accidental merge marker +* Add libvirt-bin -> libvirtd to map-services +* Make max-online-resize an option +* Correct DIB long option parsing +* Add 00-fedora-fixup-vim +* Update pypi element to suggest pypi-mirror +* Permit using arbitrary PyPI urls +* Pep8/Pyflakes fixing +* Shift debian element to DIB\_DISTRIBUTION\_MIRROR +* Revert "Add Fedora DHCP interfaces via udev rules." +* Revert "Support adding DHCP interfaces one at a time. " +* Teach cache-url to handle file:// URIs + +0.1.6 +----- + +* Remove tox locale overrides +* Add Fedora DHCP interfaces via udev rules +* Support adding DHCP interfaces one at a time +* Rename Openstack to OpenStack +* Don't hardcode environment.d +* Add more package name mappings for openSUSE +* Add lsof package to all Fedora images +* ifquery doesn't exist on Fedora +* Remove unneeded service mapping for mysql on openSUSE +* Fix misspellings in diskimage-builder +* Fix kernel extraction on openSUSE +* Adjust neutron package install for Fedora +* Make the MIRROR\_TARGET directory if it didn't exist +* Add tgt service mapping for Fedora +* Update openSUSE package mappings for OpenStack +* Updated from global requirements +* Update map-services for Fedora +* Add Fedora packages mappings for snmpd +* Add mysql mapping for Fedora +* Add package map for stunnel4 +* Add ability to use local cloud image +* Add a service mapping for openSUSE +* Add bash as a dependency to the deploy ramdisk +* Include /lib64 into the deploy ramdisk on openSUSE +* Fix tftp mapping on openSUSE +* Use /usr/bin/env, not /bin/env + +0.1.5 +----- + +* Rename generate-interfaces-file.sh.. +* Only configure DHCP for real interfaces +* Add map-services +* Skip relabel unless SELinux is enforcing +* Mount root filesystem readonly during boot +* Fix kernel/initrd extraction for SUSE based distros +* Fix ramdisk element for openSUSE +* Workaround broken udev update on openSUSE +* Make copy\_required\_libs() more robust +* Add Copyright and License header to debian element +* Setup ccache symlinks on openSUSE +* Add support for Red Hat Satellite +* Support list of Red Hat channels and repos +* Add support Red Hat Network (RHN) +* Update default RHEL guest image +* Create a new baremetal element +* Fix mysql package mappings for opensuse +* fedora/RHEL: use env from /usr/bin +* Allow use of mirrors when building Ubuntu images +* Update to Fedora 20 +* Convert -dev to -devel in fedora/map-packages +* Fix the curl command in the ironic-deploy element +* Move Babel and argparse from test-requirements.txt +* Symlink correct element install type +* dib-run-parts should dereference symlinks +* Add debian-upstart for experimenting with upstart +* Allow adding packages to debootstrap +* Add support for Debian +* Wait for tgtd socket to be available + +0.1.4 +----- + +* Add new modprobe-blacklist element +* Install traceroute on Fedora +* Retry link check up to 10 times +* Implement serial-console for systemd +* Removing the config-applier element +* Add package support to source-repositories +* Increase padding to allow for smaller images +* Remove old versions of grub2 from the yum cache +* Implement dhcp-all-interfaces for systemd +* Install tcpdump on Fedora +* Mark install-packages +x +* Make sure a loop device exists before kpartx is called +* Fixed command dib-init-system not found error +* Refactor unmount\_image with unmount\_dir +* Fixed device or resource busy issue in EXIT trap +* Add a package mapping for libvirt-dev + +0.1.3 +----- + +* Log unsupported source repository types +* Improve source-repositories git caching +* Add element to modify /etc/apt/sources.list in dib +* Fix package-mappings for openSUSE +* Update login.defs on openSUSE +* Make sure sbin paths are in $PATH + +0.1.2 +----- + +* Add -U to pip install command in tox.ini +* Add zypper element +* Increase the size heuristic for images +* opensuse: Update README.md +* Fix $TARGET\_ROOT usage in yum element +* local-config: Configure proxy for zypper repos +* Updates tox.ini to use new features +* Quieten disk-image-get-kernel + +0.1.1 +----- + +* Add support for building openSUSE images +* Add examples for ramdisk-image-create +* Fix no busybox symlinks issue on rhel +* Log the repository fetches in source-repositories +* Default name for ramdisks to image +* Add deploy ramdisk element for Ironic + +0.1.0 +----- + +* Modify /etc/selinux/config if it exists +* Drop default distribution root element support +* Remove dot after TMP\_HOOKS\_PATH +* Store DIB\_\* only env variables +* Remove the dot typo in extra-data script +* Updates .gitignore +* Switch Ubuntu element to installing saucy +* Enhance dib-run-parts usage message +* Add mapping for tgt to RHEL element +* Update openssl for Fedora +* Add option --image-size +* Fix typo in source-repositories README + +0.0.11 +------ + +* Detect udevd version and behave accordingly +* Fix issue with Ubuntu grub pre-install step for ARM +* Check existence of rhel rpm key +* Fix troubleshooting override +* Support building wheels (PEP-427) +* Document ramdisk troubleshooting +* Add troubleshooting override to deploy ramdisk +* Add mapping for gearmand +* Make pxe\_mac accurate in two common cases +* /bin/bash all the things +* Split network bringup out of base ramdisk init +* Don't block the upstart daemon if it doesn't exist +* Make sorting of ramdisk init elements explicit +* Provide a way of determining init system used +* Usage message enhancement + +0.0.10 +------ + +* Add mapping for libffi-dev +* Allow heat-admin to sudo without tty +* Python code refactorings +* Add \*.egg to .gitignore +* Remove BUSYBOX variable from ramdisk-defaults +* Replace assertEquals with assertEqual +* Updated from global requirements + +0.0.9 +----- + +* Check existence of directory 'lost+found' +* Remove mapping of atftpd to tftpd-server +* Remove dependency on dracut-network +* Add redhat mapping from tftpd-hpa to tftp-server + +0.0.8 +----- + +* Add apache and mod\_wsgi to Fedora's package map +* Allow for bad Fedora image mirrors +* exit 44 if http 404 is returned +* Ignore basename failures +* Dracut regenerate initrd w/ the right kernel +* Fix disk-image-get-kernel for redhat +* Remove framebuffer video drivers from ramdisks +* Remove old-kernels for fedora + +0.0.7 +----- + +* Conditionally add dhcp-all-interfaces + +0.0.6 +----- + +* Remove \r chars from dhcp-all-interfaces +* Make dhcp-all-interfaces block all interfaces +* Fix ifquery call in dhcp-all-interfaces +* Allow for redirects to ftp servers +* Updated from global requirements +* Specify distro release in fedora image name +* Move /tmp/ccache setup to base element +* Use --numeric-owner when extracting base image +* Mount /dev/pts in chroot +* Using python to run testr instead +* Make RHEL subscription optional + +0.0.5 +----- + +* Increase journal size to 64 M for ext4 file system +* Fix mellanox module loading +* Ignore empty files returned by curl +* Generate interfaces file before cloud-init runs +* Updated from global requirements +* Fix typo in dhcp-all-interfaces +* Set locale for the profiling printf command +* Update from requirements + +0.0.4 +----- + +* Deprecate first-boot.d +* Add mapping for atftpd in fedora/rhel +* Make RHEL subscriptions optional +* Add RHEL mapping for openssh-client +* Add RHEL mapping for augeas-tools +* Add RHEL mapping for default-jre +* Translations license statement correction + +0.0.3 +----- + +* Do not prompt on removal of apt-xapian-index from ubuntu cloud images +* Add DIB\_IMAGE\_CACHE + +0.0.2 +----- + +* Remove apt-xapian-index from ubuntu cloud images +* Use lazy umount to avoid race problems with dev +* Remove github references +* Move textmode forcer to vm element +* Fix grub/linux text mode override +* Add deploy-kexec element +* Consolidate the checks for /etc/grub +* Check cached file size when downloading an url +* Fedora 19 has no grub2 conf file +* Install fedora grub from cached rpm during finalise +* Remove -r option from kpartx for successful build +* Fixes files ordering when choosing newest image +* Add package mapping for default-jre +* Set raw image size to be multiple of 64k + +0.0.1 +----- + +* Delete -new image once copied +* Add --list support to dib-run-parts +* On Fedora, use Linux Foundation bzr lsb\_release +* Add support for file to source-repositories +* Install patch for dracut patching +* Add rhel installation element +* Add option --min-tmpfs to disk-image-create +* Add package mappings for MySQL-MariaDB +* Combine compress and save image into one function +* Extlinux fallback +* Rename 51-grub to 51-bootloader +* Add a pip-cache element +* Fix URL to os-apply-config +* qpid package mappings +* Call sync before unmounting keeps the mount from being busy +* Remove a device mapping, then let the loop device get removed +* Extracting common functionality for rpm based distros +* Use kpartx if partition device doesn't exist +* Set file permission to be executable +* Fixed a network setup issue for F19 +* Update stackforge references to openstack +* Package dib-run-parts +* Add yum element +* dkms is unavailable on RHEL and derivatives +* Fix pypi element README.md errors +* Allow using a pypi mirror to install via pip +* Make $HOME in the chroot be reasonable +* Cleanup mount points automatically +* Change the rootfs label in F18 and F19 +* Remove explicit sudoers requirement +* Document the dangers of co-existing elements +* Blacklist H803 +* Capture the repositories from source-repositories +* Improve caching documentation +* Package with pbr +* Add a new break on error +* Ensure $TMP\_BUILD\_DIR is actually created +* Modify relative paths of lib, elements for packaging +* Add binaries for setuptools +* Make Ubuntu 13.04 (raring) the default release +* Ignore emacs autosave files in source-repositories +* Provide hint for what package contains qemu-img +* Fix hacking errors +* Add downloadonly flag to fedora +* Fixed up test-requirements +* Add needed symlink for Fedora deployment ramdisk +* Install which on Fedora +* Only remove $TMP\_BUILD\_DIR on cleanup +* Enable running disk-image-create on SUSE Linux +* Update TripleO incubator URL reference +* Support repo names with multiple '-'s +* Set work-dir to cached repository +* Move the getsources hook earlier +* Cache repository-sources data +* Update the Fedora element to honour --offline +* Enable --offline support for Ubuntu root images +* Fix the DIB\_OFFLINE setting to actually work +* Document an interface for offline operation +* Allow 'sudo kpartx -d' used in EACTION for Fedora +* Move end user docs higher up in README.md +* Remove excess whitespace in README.md +* Fedora 19 GRUB +* Fix for mounted readonly filesystem for Fedora 19 +* EFI hosts +* F19 GRUB configuration file +* Add package mappings for augeas-tools and openssh-client +* Build ramdisks in an image chroot +* Make cloud-init-nocloud work cross-platform +* Update Fedora cloud image to its latest version +* Adding docs for the source-repositories element +* Use ccache to cache all compiles between builds +* Add environment.d hook to setup environment +* Curl to redo the request (Found 302) +* Fix loop0p2 does not exist on F19 +* Add arping to the fedora map-packages +* Fix 50-firmware.rules no such file on Fedora 19 +* Add mysql-devel to fedora map-packages +* Fix cache-url to use single '=' in test expression +* Fix cloud-init routing issue on Fedora +* Move functions to common-functions for reuse +* Factor out element processing +* Consolidate more ramdisk and disk-image code +* Fix pyOpenSSL on Fedora +* Improve debugging of missing elements +* Fix unit tests to have accurate return code +* Use the source-repository interface +* Install git with source-repositories element +* Use full path to dib-run-parts during firstboot +* Enable Flake8 F\*\*\* checks +* Switch from pep8 to flake8/hacking +* Re-use cache\_url() in fedora element +* Improve first time download of ubuntu images +* Use dib-run-parts on dib-first-boot +* Reduce duplication between ramdisk and disk image codepaths +* Add mechanism to send error messages to helper +* Make bash troubleshooting configurable +* Make the finalise\_base function less Ubuntu-ish +* Adding element to get source for elements +* deploy element: Call find\_disk in loop w/ timeout +* Add disable-selinux element +* dib-run-parts was failing with empty targets +* Add /usr/local/bin to the secure\_path variable +* Fix cloud-init-nocloud to actually work +* Stop apt-get installing qemu-img +* Change the rootfs label in fedora's /etc/fstab +* Add zlib-devel and qemu-img to fedora map-packages +* Document some dependencies +* Add RedHat support for disk-image-get-kernel +* Add dracut-network element +* Add fedora support for ramdisk-image-create +* Remove obsolete Fedora rc-local install.d hook +* Switch from losetup+partprobe to kpartx for Fedora image creation +* Move package install of dkms to install.d +* Fix fedora element to work with qcow2 images +* Install dkms before using it +* Build all dkms modules near the end of the image build +* Set correct mode for .ssh/authorized\_keys files +* Update sudoers rules for 1PB resizing +* Increase the size heuristic for images +* The ext4 resize fix was faulty - fix it +* Basic wall clock profiling per element script +* Move the ensure\_nbd function call +* Ensure that the ext4 fs can be rebuilt up to 1PB in size +* Force text mode console in base element +* Refactor the first boot routine +* Run fixfiles restore in chroot instead of firstboot +* Trigger SELinux autorelabel on first boot +* An element for putting SELinux in permissive mode +* Fix for running /etc/rc.local on Fedora +* Honor $DIB\_IMAGE\_SIZE +* install redhat-lsb before pre-install.d baseline-tools +* install redhat-lsb-core instead of redhat-lsb +* Enable serial console for fedora +* Fix fedora fstab so / is mounted rw properly +* Add an element to configure a serial console +* Retry losetup -d for up to 10 seconds +* Force the inclusion of /usr/local/bin in PATH +* Tweak the moved cleanup\_dirs to match the original +* Remove img-functions from ramdisk-image-create +* Ignore errors when ldd'ing static binaries +* Extend mellanox support to disk images +* Reinstate support for real hardware with Ubuntu +* Remove tripleo PPA from base element +* Only use tmpfs if build machine has 4GB+ RAM +* Use conditional GET to fetch latest ubuntu image +* Revert "Improve Fedora build host support." +* Fix architecture filter +* Unbreak grub for precise +* Fix GRUB command quote escape for VM element +* Fix GRUB for for precise +* Fix missing export of $ARCH +* Improve Fedora build host support +* Use a different approach to solving the ramdisk-image-create failure +* Source img-functions into common-functions +* Build images using loopdev instead of qemu-nbd +* Add few other packages to the map list for fedora +* Fix up the conflict between audit and glibc packages +* Improve Fedora build host support: architectures +* Fix Ubuntu image fetching +* Fix a small typo in fake init scripts +* Adds support for post-install scripts +* Grab the next available /dev/nbdX +* Allow build dir to be changed from /tmp +* Migrate cloud image URL/Release options to DIB\_ +* Introduce the DIB\_ namespace for build-time config +* Fedora element allows root to sudo without TTY +* Generate ssh hostkeys on first-boot +* Add armhf support +* Always include the in-tree elements directory +* Delete elements moved to tripleo-image-elements +* Update README.md for build-time state capture +* Fix mysql migration script to handle errors +* Remove strict sql\_mode setting which breaks apps +* Do not require arguments for os-svc-daemon +* Store build-time settings +* Disable tunneling in quantum-ovs +* Migrate data into MySQL from bootstrap +* Run os-config-applier using os-refresh-config +* Bring os-svc-install element docs up-to-date +* Enable use\_namespaces setting for quantum agents +* Clearly mark unaudited config templates as such +* Replace glance-api+glance-reg elements with glance: +* Streamline upstart scripts in os-svc-daemon +* Add a nova-baremetal element +* Add a quantum element +* Run all openstack services in virtualenvs: +* Add element to run DHCP on all network interfaces +* Create users in mysql server based on metadata +* Set mysql server\_id based on instance-id +* Refactor mysql element to do less in first-boot.d +* Adding cfn-credentials file to heat-cfntools +* remove unnecessary '/usr/local/bin' from install.d +* Install os-config-applier from stackforge repo +* Switch to using the incubator-bootstrap tree +* Fix os-refresh-config failing without scripts +* Remove duplicate file extensions +* Correctly translate all branches/tags/shas: +* Update keystone middleware in cinder api-paste: +* Fix script that installs os-refresh-config scripts +* local-config: Configure proxy for apt and/or yum +* Fix issues causing Fedora images to fail +* Seperate install of services and start scripts: +* Update keystone element to use os-refresh-config +* Make 99-install-config-templates executable: +* Install os-refresh-config scripts automatically +* local-config element adds authorized\_key for root: +* Integrate os-refresh-config with heat-cfntools +* Allow elements to include skeleton config +* Add a cinder element +* Namespace SHA256SUMS file to distro/release/arch +* Fix heat-cfntools to work on Fedora +* Verify Ubuntu Cloud Images using SHA256SUMS +* Fix elements\_path default path +* Use multiple locations for elements dir +* Specify os-refresh-config path in README +* Don't use sudo in base +* Add an openstack all-openstack-db element: +* Devstack element pulls from master +* Fix ramdisk-image-create +* Run alternatives pip -> pip-python +* Install heat-cfntools from pypi +* Support multiple outputs disk formats +* Prevent silent failure of element-info: +* Fix the sudo rules for unpacking fedora raw images +* first-boot.d scripts log to a file: +* Fedora needs to depend on dib-run-parts too +* New element that uses a fedora cloud image as the base +* Add dib-run-parts install command to sudoers.d +* Use dib-run-parts for running scripts in target +* Make populate\_libs() more generic +* Work in progress run-parts replacement +* Move the dpkg specific stuff to a dpkg element rather than being hardcoded +* Change run-parts usage to be compatible with Fedora +* Give stack user passwordless sudo: +* Consolidate common OS installation into a script: +* Bad code landed, causing ubuntu to be always landed +* cloud-init-nocloud element for non-cloud image +* Add cfn-hup configuration for os-refresh-config +* Fix broken pep8 in setup.py +* Add element to call os-refresh-config +* Add default element selection +* Correct misuse of return in ramdisk-image-create +* Fix unnecessarily creating a temporary directory +* ramdisk-image-create shows a failed binary dependency +* The default ARCH was broken due to $ARCH not being exported +* Add missing python-pip dependency in heat-jeos +* Work around cfn API bug in HEAT w/ specific boto +* Move initial root contents into a hook +* Make it possible for openstack-CI to run tests +* Export the ELEMENTS\_DIR so that dependencies work +* Add os-config-applier element +* Split stack user creation out of devstack element +* Improve error message for missing element +* Create install-packages as a binary +* Add option to clear environment +* Switch locale to C +* Add sudoers rule to format and mount anykind of partitions in disks +* Add openstack-all element +* Add element to install config-applier +* Enable 'ec2-user' in HEAT for quantal images +* Add a simple implementation of element dependency +* Disable Apt Recommends +* add default gateway to deploy init script +* Allow manual installation of packages +* Include English locale in base +* Install nova-api from github +* Add Icinga elements +* Add missing whitespace to local-config +* Replace demo references with incubator +* Add an element to install the HEAT JEOS tools +* Install quantum-api from github +* Clean up the MySQL element to make it suitable for generic use +* Fix disk-image-create's getopt error handling: +* Tidy up base element: +* Add guidelines for composing elements +* Copy both http and https proxy to local-config +* Add a test framework for testing elements +* Ignore .pyc files +* Add a .testr.conf configuration and ignore .testrepository +* Add the ability to break into a shell during builds +* Add glance-api element +* Move everything 'common' into base, making it avoidable for tests +* Make it possible to not recompress the qcow2 image at the end +* Added true to avoid exit on error +* updating devstack element to reference incubator +* Add keystone element +* Add copyright to lib/ramdisk-\* +* Generate apt.conf files with correct content, fixes bug 1088805 +* Further fleshing out of hwdiscovery element +* Move grub installation to the vm element +* Rename flavour to element +* Configure git proxy settings and prefer http(s) protocol +* Use system resolv.conf file when available +* Remove udev stuff from the source tree +* Add .gitreview file +* Jenkins image fixed +* Reinstate /mnt redirection of jenkins - HPCS cloud images have a very restricted / +* Untrap EXIT before run-parts +* Update hwdiscovery flavour to have lots more structure that we can build on +* fix crappy header +* Updated jenkins flavour +* Make a primitive jenkins image +* be smarter about mounting qcow images +* Use base in all examples +* added br\* filter for interfaces +* adding BASIC hardware discovery +* adding dhclient support +* adding dhclient +* move misplaced salt-master install script +* mount\_qcow\_image should mount p1 +* removes AMQP install and adds hwinfo +* added lsmod to default busybox links +* add salt-master flavor +* remove force-xtrace in disk-image-get-kernel +* add some tooling that baremetal-devstack wants +* move tgtd & tgtadm to bin-deps of deploy and remove from lib/ramdisk-functions +* Adding python-AMQPLib install to HWdiscovery +* Fix copyrights for HP work +* Add a flavour for doing generic this-node-is-in-a-cloud stuff, like cloud-init tweaks +* adding mysql flavor (untested) +* Document more about the layers +* Some cleanup on nova-vm flavour +* Add support for flavours to ship udev rules.d files and port over the mellanox variant to use this +* Fix mysql passwords +* Default to 2G in size - 1G is just too small +* Fix handling of parameters that are not set by any flavour for eval\_run\_d +* Make it possible to set a size from within a flavour, and use that for devstack +* Rename baremetal to deploy +* Remove some whitespace +* Update ramdisk building to support init hooks for flavours +* Update docs for ramdisk building +* Add readmes to the ramdisk flavours +* Documented binary-deps feature +* Port old baremetal-mkinitrd.sh to the new image creation standards +* Land an extension of baremetal-mkinitrd.sh which can also build flavours, with a start at making hwdiscovery and hwburning flavours +* Bring across disk image code +* Ignore temporary files +* Support KVM instances - allow /dev/vda to be detected as a disk +* Turn off udev logging, it makes debugging too hard. Better would be to log to a file or something +* change working directory name template +* Rename to baremetal-mkinitrd.sh +* initial commit diff -Nru python-diskimage-builder-2.11.0/debian/changelog python-diskimage-builder-2.17.0/debian/changelog --- python-diskimage-builder-2.11.0/debian/changelog 2018-03-01 11:27:22.000000000 +0000 +++ python-diskimage-builder-2.17.0/debian/changelog 2018-09-14 20:01:17.000000000 +0000 @@ -1,3 +1,12 @@ +python-diskimage-builder (2.17.0-0ubuntu1) cosmic; urgency=medium + + * d/watch: Use upstream release tarballs. + * New upstream release for OpenStack Rocky. + * d/python{3}-diskimage-builder.install: add explicit install for + lib and elements components for dib. + + -- James Page Fri, 14 Sep 2018 14:01:17 -0600 + python-diskimage-builder (2.11.0-0ubuntu1) bionic; urgency=medium * Resync with Debian unstable. diff -Nru python-diskimage-builder-2.11.0/debian/python3-diskimage-builder.install python-diskimage-builder-2.17.0/debian/python3-diskimage-builder.install --- python-diskimage-builder-2.11.0/debian/python3-diskimage-builder.install 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/debian/python3-diskimage-builder.install 2018-09-14 20:01:17.000000000 +0000 @@ -0,0 +1,2 @@ +diskimage_builder/elements/* /usr/lib/python3/dist-packages/diskimage_builder/elements +diskimage_builder/lib/* /usr/lib/python3/dist-packages/diskimage_builder/lib diff -Nru python-diskimage-builder-2.11.0/debian/python-diskimage-builder.install python-diskimage-builder-2.17.0/debian/python-diskimage-builder.install --- python-diskimage-builder-2.11.0/debian/python-diskimage-builder.install 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/debian/python-diskimage-builder.install 2018-09-14 20:01:17.000000000 +0000 @@ -0,0 +1,2 @@ +diskimage_builder/elements/* /usr/lib/python2.7/dist-packages/diskimage_builder/elements +diskimage_builder/lib/* /usr/lib/python2.7/dist-packages/diskimage_builder/lib diff -Nru python-diskimage-builder-2.11.0/debian/source/options python-diskimage-builder-2.17.0/debian/source/options --- python-diskimage-builder-2.11.0/debian/source/options 2018-03-01 11:27:22.000000000 +0000 +++ python-diskimage-builder-2.17.0/debian/source/options 2018-09-14 20:01:17.000000000 +0000 @@ -1 +1 @@ -extend-diff-ignore = "^[.]gitreview$" +extend-diff-ignore = "^[^/]*[.]egg-info/" diff -Nru python-diskimage-builder-2.11.0/debian/watch python-diskimage-builder-2.17.0/debian/watch --- python-diskimage-builder-2.11.0/debian/watch 2018-03-01 11:27:22.000000000 +0000 +++ python-diskimage-builder-2.17.0/debian/watch 2018-09-14 20:01:17.000000000 +0000 @@ -1,3 +1,3 @@ version=3 -https://github.com/openstack/diskimage-builder/tags .*/(\d[\d\.]+)\.tar\.gz - +opts=uversionmangle=s/(rc|a|b|c)/~$1/ \ +https://pypi.debian.net/diskimage-builder/diskimage-builder-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/block_device/config.py python-diskimage-builder-2.17.0/diskimage_builder/block_device/config.py --- python-diskimage-builder-2.11.0/diskimage_builder/block_device/config.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/block_device/config.py 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/block_device/level0/localloop.py python-diskimage-builder-2.17.0/diskimage_builder/block_device/level0/localloop.py --- python-diskimage-builder-2.11.0/diskimage_builder/block_device/level0/localloop.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/block_device/level0/localloop.py 2018-09-13 04:28:23.000000000 +0000 @@ -14,12 +14,12 @@ import logging import os -import subprocess from diskimage_builder.block_device.exception import \ BlockDeviceSetupException from diskimage_builder.block_device.plugin import NodeBase from diskimage_builder.block_device.plugin import PluginBase +from diskimage_builder.block_device.utils import exec_sudo from diskimage_builder.block_device.utils import parse_abs_size_spec @@ -41,17 +41,11 @@ def loopdev_attach(filename): logger.info("loopdev attach") logger.debug("Calling [sudo losetup --show -f %s]", filename) - subp = subprocess.Popen(["sudo", "losetup", "--show", "-f", - filename], stdout=subprocess.PIPE) - rval = subp.wait() - if rval == 0: - # [:-1]: Cut of the newline - block_device = subp.stdout.read()[:-1].decode("utf-8") - logger.info("New block device [%s]", block_device) - return block_device - else: - logger.error("losetup failed") - raise BlockDeviceSetupException("losetup failed") + block_device = exec_sudo(["losetup", "--show", "-f", filename]) + # [:-1]: Cut of the newline + block_device = block_device[:-1] + logger.info("New block device [%s]", block_device) + return block_device def loopdev_detach(loopdev): @@ -59,19 +53,16 @@ # loopback dev may be tied up a bit by udev events triggered # by partition events for try_cnt in range(10, 1, -1): - logger.debug("Calling [sudo losetup -d %s]", loopdev) - subp = subprocess.Popen(["sudo", "losetup", "-d", - loopdev]) - rval = subp.wait() - if rval == 0: - logger.info("Successfully detached [%s]", loopdev) - return 0 - else: - logger.error("loopdev detach failed") + try: + exec_sudo(["losetup", "-d", loopdev]) + return + except BlockDeviceSetupException as e: # Do not raise an error - maybe other cleanup methods # can at least do some more work. + logger.error("loopdev detach failed (%s)", e.returncode) + logger.debug("Gave up trying to detach [%s]", loopdev) - return rval + return 1 class LocalLoopNode(NodeBase): diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/block_device/level1/lvm.py python-diskimage-builder-2.17.0/diskimage_builder/block_device/level1/lvm.py --- python-diskimage-builder-2.11.0/diskimage_builder/block_device/level1/lvm.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/block_device/level1/lvm.py 2018-09-13 04:28:23.000000000 +0000 @@ -13,7 +13,6 @@ # limitations under the License. import logging -import subprocess from diskimage_builder.block_device.exception \ import BlockDeviceSetupException @@ -155,7 +154,7 @@ 'devices': self.base, } - def _cleanup(self): + def _umount(self): exec_sudo(['vgchange', '-an', self.name]) def get_edges(self): @@ -214,7 +213,7 @@ 'device': '/dev/mapper/%s-%s' % (self.base, self.name) } - def _cleanup(self): + def _umount(self): exec_sudo(['lvchange', '-an', '/dev/%s/%s' % (self.base, self.name)]) @@ -280,49 +279,29 @@ for lvs in self.lvs: lvs._create() - def cleanup(self): + def umount(self): for lvs in self.lvs: - lvs._cleanup() + lvs._umount() for vgs in self.vgs: - vgs._cleanup() + vgs._umount() exec_sudo(['udevadm', 'settle']) - -class LVMCleanupNode(NodeBase): - def __init__(self, name, state, pvs): - """Cleanup Node for LVM - - Information about the PV, VG and LV is typically - cached in lvmetad. Even after removing PV device and - partitions this data is not automatically updated - which leads to a couple of problems. - the 'pvscan --cache' scans the available disks - and updates the cache. - This must be called after the cleanup of the - containing block device is done. - """ - super(LVMCleanupNode, self).__init__(name, state) - self.pvs = pvs - - def create(self): - # This class is used for cleanup only - pass - def cleanup(self): + # Information about the PV, VG and LV is typically + # cached in lvmetad. Even after removing PV device and + # partitions this data is not automatically updated + # which leads to a couple of problems. + # the 'pvscan --cache' scans the available disks + # and updates the cache. + # This is in cleanup because it must be called after the + # umount of the containing block device is done, (which should + # all be done in umount phase). try: exec_sudo(['pvscan', '--cache']) - except subprocess.CalledProcessError as cpe: - logger.debug("pvscan call result [%s]", cpe) - - def get_edges(self): - # This node depends on all physical device(s), which is - # recorded in the "base" argument of the PV nodes. - edge_to = set() - for pv in self.pvs: - edge_to.add(pv.base) - return ([], edge_to) + except BlockDeviceSetupException as e: + logger.info("pvscan call failed [%s]", e.returncode) class LVMPlugin(PluginBase): @@ -412,12 +391,10 @@ # create the "driver" node self.lvm_node = LVMNode(config['name'], state, self.pvs, self.lvs, self.vgs) - self.lvm_cleanup_node = LVMCleanupNode( - config['name'] + "-CLEANUP", state, self.pvs) def get_nodes(self): # the nodes for insertion into the graph are all of the pvs, - # vgs and lvs nodes we have created above, the root node and + # vgs and lvs nodes we have created above and the root node and # the cleanup node. return self.pvs + self.vgs + self.lvs \ - + [self.lvm_node, self.lvm_cleanup_node] + + [self.lvm_node] diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/block_device/level1/partitioning.py python-diskimage-builder-2.17.0/diskimage_builder/block_device/level1/partitioning.py --- python-diskimage-builder-2.11.0/diskimage_builder/block_device/level1/partitioning.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/block_device/level1/partitioning.py 2018-09-13 04:28:23.000000000 +0000 @@ -42,8 +42,7 @@ # Because using multiple partitions of one base is done # within one object, there is the need to store a flag if the # creation of the partitions was already done. - self.already_created = False - self.already_cleaned = False + self.number_of_partitions = 0 # Parameter check if 'base' not in config: @@ -58,8 +57,8 @@ raise BlockDeviceSetupException( "Partitioning config needs 'label'") self.label = config['label'] - if self.label not in ("mbr", ): - raise BlockDeviceSetupException("Label must be 'mbr'") + if self.label not in ("mbr", "gpt"): + raise BlockDeviceSetupException("Label must be 'mbr' or 'gpt'") # It is VERY important to get the alignment correct. If this # is not correct, the disk performance might be very poor. @@ -93,29 +92,9 @@ fd.seek(0, 2) return fd.tell() - # not this is NOT a node and this is not called directly! The - # create() calls in the partition nodes this plugin has - # created are calling back into this. - def create(self): - # This is a bit of a hack. Each of the partitions is actually - # in the graph, so for every partition we get a create() call - # as the walk happens. But we only need to create the - # partition table once... - if self.already_created: - logger.info("Not creating the partitions a second time.") - return - self.already_created = True - - # the raw file on disk - image_path = self.state['blockdev'][self.base]['image'] - # the /dev/loopX device of the parent - device_path = self.state['blockdev'][self.base]['device'] - logger.info("Creating partition on [%s] [%s]", self.base, image_path) - - assert self.label == 'mbr' - - disk_size = self._size_of_block_dev(image_path) - with MBR(image_path, disk_size, self.align) as part_impl: + def _create_mbr(self): + """Create partitions with MBR""" + with MBR(self.image_path, self.disk_size, self.align) as part_impl: for part_cfg in self.partitions: part_name = part_cfg.get_name() part_bootflag = PartitionNode.flag_boot \ @@ -137,35 +116,116 @@ # We're going to mount all partitions with kpartx # below once we're done. So the device this partition # will be seen at becomes "/dev/mapper/loop0pX" - assert device_path[:5] == "/dev/" + assert self.device_path[:5] == "/dev/" partition_device_name = "/dev/mapper/%sp%d" % \ - (device_path[5:], part_no) + (self.device_path[5:], part_no) self.state['blockdev'][part_name] \ = {'device': partition_device_name} + def _create_gpt(self): + """Create partitions with GPT""" + + cmd = ['sgdisk', self.image_path] + + # This padding gives us a little room for rounding so we don't + # go over the end of the disk + disk_free = self.disk_size - (2048 * 1024) + pnum = 1 + + for p in self.partitions: + args = {} + args['pnum'] = pnum + args['name'] = '%s' % p.get_name() + args['type'] = '%s' % p.get_type() + + # convert from a relative/string size to bytes + size = parse_rel_size_spec(p.get_size(), disk_free)[1] + + # We keep track in bytes, but specify things to sgdisk in + # megabytes so it can align on sensible boundaries. And + # create partitions right after previous so no need to + # calculate start/end - just size. + assert size <= disk_free + args['size'] = size // (1024 * 1024) + + new_cmd = ("-n", "{pnum}:0:+{size}M".format(**args), + "-t", "{pnum}:{type}".format(**args), + # Careful with this one, as {name} could have spaces + "-c", "{pnum}:{name}".format(**args)) + cmd.extend(new_cmd) + + # Fill the state; we mount all partitions with kpartx + # below once we're done. So the device this partition + # will be seen at becomes "/dev/mapper/loop0pX" + assert self.device_path[:5] == "/dev/" + device_name = "/dev/mapper/%sp%d" % (self.device_path[5:], pnum) + self.state['blockdev'][p.get_name()] \ + = {'device': device_name} + + disk_free = disk_free - size + pnum = pnum + 1 + logger.debug("Partition %s added, %s remaining in disk", + pnum, disk_free) + + logger.debug("cmd: %s", ' '.join(cmd)) + exec_sudo(cmd) + + # not this is NOT a node and this is not called directly! The + # create() calls in the partition nodes this plugin has + # created are calling back into this. + def create(self): + # This is a bit of a hack. Each of the partitions is actually + # in the graph, so for every partition we get a create() call + # as the walk happens. But we only need to create the + # partition table once... + self.number_of_partitions += 1 + if self.number_of_partitions > 1: + logger.info("Not creating the partitions a second time.") + return + + # the raw file on disk + self.image_path = self.state['blockdev'][self.base]['image'] + # the /dev/loopX device of the parent + self.device_path = self.state['blockdev'][self.base]['device'] + # underlying size + self.disk_size = self._size_of_block_dev(self.image_path) + + logger.info("Creating partition on [%s] [%s]", + self.base, self.image_path) + + assert self.label in ('mbr', 'gpt') + + if self.label == 'mbr': + self._create_mbr() + elif self.label == 'gpt': + self._create_gpt() + # "saftey sync" to make sure the partitions are written exec_sudo(["sync"]) # now all the partitions are created, get device-mapper to # mount them if not os.path.exists("/.dockerenv"): - exec_sudo(["kpartx", "-avs", device_path]) + exec_sudo(["kpartx", "-avs", self.device_path]) else: # If running inside Docker, make our nodes manually, # because udev will not be working. kpartx cannot run in # sync mode in docker. - exec_sudo(["kpartx", "-av", device_path]) + exec_sudo(["kpartx", "-av", self.device_path]) exec_sudo(["dmsetup", "--noudevsync", "mknodes"]) return - def cleanup(self): - # remove the partition mappings made for the parent - # block-device by create() above. this is called from the - # child PartitionNode umount/delete/cleanup. Thus every - # partition calls it, but we only want to do it once and our - # gate. - if not self.already_cleaned: - self.already_cleaned = True + def umount(self): + # Remove the partition mappings made for the parent + # block-device by create() above. This is called from the + # child PartitionNode umount. Thus every + # partition calls it, but we only want to do it once when + # we know this is the very last partition + self.number_of_partitions -= 1 + if self.number_of_partitions == 0: exec_sudo(["kpartx", "-d", self.state['blockdev'][self.base]['device']]) + + def cleanup(self): + pass diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/block_device/level1/partition.py python-diskimage-builder-2.17.0/diskimage_builder/block_device/level1/partition.py --- python-diskimage-builder-2.11.0/diskimage_builder/block_device/level1/partition.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/block_device/level1/partition.py 2018-09-13 04:28:23.000000000 +0000 @@ -33,6 +33,12 @@ self.partitioning = parent self.prev_partition = prev_partition + # filter out some MBR only options for clarity + if self.partitioning.label == 'gpt': + if 'flags' in config and 'primary' in config['flags']: + raise BlockDeviceSetupException( + "Primary flag not supported for GPT partitions") + self.flags = set() if 'flags' in config: for f in config['flags']: @@ -47,7 +53,10 @@ raise BlockDeviceSetupException("No size in partition" % self.name) self.size = config['size'] - self.ptype = int(config['type'], 16) if 'type' in config else 0x83 + if self.partitioning.label == 'gpt': + self.ptype = str(config['type']) if 'type' in config else '8300' + elif self.partitioning.label == 'mbr': + self.ptype = int(config['type'], 16) if 'type' in config else 0x83 def get_flags(self): return self.flags @@ -75,5 +84,8 @@ def create(self): self.partitioning.create() + def umount(self): + self.partitioning.umount() + def cleanup(self): self.partitioning.cleanup() diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/block_device/level2/mkfs.py python-diskimage-builder-2.17.0/diskimage_builder/block_device/level2/mkfs.py --- python-diskimage-builder-2.11.0/diskimage_builder/block_device/level2/mkfs.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/block_device/level2/mkfs.py 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/block_device/tests/config/gpt_efi.yaml python-diskimage-builder-2.17.0/diskimage_builder/block_device/tests/config/gpt_efi.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/block_device/tests/config/gpt_efi.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/block_device/tests/config/gpt_efi.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,34 @@ +# A sample config that has GPT/bios and EFI boot partitions + +- local_loop: + name: image0 + +- partitioning: + base: image0 + label: gpt + partitions: + - name: ESP + type: 'EF00' + size: 8MiB + mkfs: + type: vfat + mount: + mount_point: /boot/efi + fstab: + options: "defaults" + fsck-passno: 1 + - name: BSP + type: 'EF02' + size: 8MiB + # spaces are probably a bad idea for max compatability, but + # we're deliberatly testing it here. + - name: Root Part + type: '8300' + size: 100% + mkfs: + type: ext4 + mount: + mount_point: / + fstab: + options: "defaults" + fsck-passno: 1 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/block_device/tests/config/lvm_tree_multiple_partitions.yaml python-diskimage-builder-2.17.0/diskimage_builder/block_device/tests/config/lvm_tree_multiple_partitions.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/block_device/tests/config/lvm_tree_multiple_partitions.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/block_device/tests/config/lvm_tree_multiple_partitions.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,104 @@ +- local_loop: + name: image0 + +- partitioning: + base: image0 + label: mbr + partitions: + - name: root + flags: [ boot ] + size: 3G + - name: ESP + type: 'EF00' + size: 8MiB + mkfs: + type: vfat + mount: + mount_point: /boot/efi + fstab: + options: "defaults" + fsck-passno: 1 + - name: BSP + type: 'EF02' + size: 8MiB + +- lvm: + name: lvm + base: [ root ] + pvs: + - name: pv + base: root + options: [ "--force" ] + vgs: + - name: vg + base: [ "pv" ] + options: [ "--force" ] + lvs: + - name: lv_root + base: vg + extents: 28%VG + - name: lv_tmp + base: vg + extents: 4%VG + - name: lv_var + base: vg + extents: 40%VG + - name: lv_log + base: vg + extents: 23%VG + - name: lv_audit + base: vg + extents: 4%VG + - name: lv_home + base: vg + extents: 1%VG +- mkfs: + name: fs_root + base: lv_root + type: xfs + label: "img-rootfs" + mount: + mount_point: / + fstab: + options: "rw,relatime" + fck-passno: 1 +- mkfs: + name: fs_tmp + base: lv_tmp + type: xfs + mount: + mount_point: /tmp + fstab: + options: "rw,nosuid,nodev,noexec,relatime" +- mkfs: + name: fs_var + base: lv_var + type: xfs + mount: + mount_point: /var + fstab: + options: "rw,relatime" +- mkfs: + name: fs_log + base: lv_log + type: xfs + mount: + mount_point: /var/log + fstab: + options: "rw,relatime" +- mkfs: + name: fs_audit + base: lv_audit + type: xfs + mount: + mount_point: /var/log/audit + fstab: + options: "rw,relatime" +- mkfs: + name: fs_home + base: lv_home + type: xfs + mount: + mount_point: /home + fstab: + options: "rw,nodev,relatime" diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/block_device/tests/test_gpt.py python-diskimage-builder-2.17.0/diskimage_builder/block_device/tests/test_gpt.py --- python-diskimage-builder-2.11.0/diskimage_builder/block_device/tests/test_gpt.py 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/block_device/tests/test_gpt.py 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,84 @@ +# 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. + +import fixtures +import logging +import mock +import os + +import diskimage_builder.block_device.tests.test_config as tc + +from diskimage_builder.block_device.blockdevice import BlockDeviceState +from diskimage_builder.block_device.config import config_tree_to_graph +from diskimage_builder.block_device.config import create_graph +from diskimage_builder.block_device.level0.localloop import image_create +from diskimage_builder.block_device.level1.partition import PartitionNode + +logger = logging.getLogger(__name__) + + +class TestGPT(tc.TestGraphGeneration): + + @mock.patch('diskimage_builder.block_device.level1.partitioning.exec_sudo') + def test_gpt_efi(self, mock_exec_sudo): + # Test the command-sequence for a GPT/EFI partition setup + tree = self.load_config_file('gpt_efi.yaml') + config = config_tree_to_graph(tree) + + state = BlockDeviceState() + + graph, call_order = create_graph(config, self.fake_default_config, + state) + + # Create a fake temp backing file (we check the size of it, + # etc). + # TODO(ianw): exec_sudo is generically mocked out, thus the + # actual creation is mocked out ... but we could do this + # without root and use parted to create the partitions on this + # for slightly better testing. An exercise for another day... + self.tmp_dir = fixtures.TempDir() + self.useFixture(self.tmp_dir) + self.image_path = os.path.join(self.tmp_dir.path, "image.raw") + # should be sparse... + image_create(self.image_path, 1024 * 1024 * 1024) + logger.debug("Temp image in %s", self.image_path) + + # Fake state for the loopback device + state['blockdev'] = {} + state['blockdev']['image0'] = {} + state['blockdev']['image0']['image'] = self.image_path + state['blockdev']['image0']['device'] = "/dev/loopX" + + for node in call_order: + if isinstance(node, PartitionNode): + node.create() + + # check the parted call looks right + parted_cmd = ['sgdisk', self.image_path, + '-n', '1:0:+8M', '-t', '1:EF00', '-c', '1:ESP', + '-n', '2:0:+8M', '-t', '2:EF02', '-c', '2:BSP', + '-n', '3:0:+1006M', '-t', '3:8300', '-c', '3:Root Part'] + cmd_sequence = [ + mock.call(parted_cmd), + mock.call(['sync']), + mock.call(['kpartx', '-avs', '/dev/loopX']) + ] + self.assertEqual(mock_exec_sudo.call_count, len(cmd_sequence)) + mock_exec_sudo.assert_has_calls(cmd_sequence) + + # Check two new partitions appear in state correctly + self.assertDictEqual(state['blockdev']['ESP'], + {'device': '/dev/mapper/loopXp1'}) + self.assertDictEqual(state['blockdev']['BSP'], + {'device': '/dev/mapper/loopXp2'}) + self.assertDictEqual(state['blockdev']['Root Part'], + {'device': '/dev/mapper/loopXp3'}) diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/block_device/tests/test_lvm.py python-diskimage-builder-2.17.0/diskimage_builder/block_device/tests/test_lvm.py --- python-diskimage-builder-2.11.0/diskimage_builder/block_device/tests/test_lvm.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/block_device/tests/test_lvm.py 2018-09-13 04:28:23.000000000 +0000 @@ -21,12 +21,13 @@ from diskimage_builder.block_device.config import create_graph from diskimage_builder.block_device.exception import \ BlockDeviceSetupException -from diskimage_builder.block_device.level1.lvm import LVMCleanupNode +from diskimage_builder.block_device.level0.localloop import LocalLoopNode from diskimage_builder.block_device.level1.lvm import LVMNode from diskimage_builder.block_device.level1.lvm import LVMPlugin from diskimage_builder.block_device.level1.lvm import LvsNode from diskimage_builder.block_device.level1.lvm import PvsNode from diskimage_builder.block_device.level1.lvm import VgsNode +from diskimage_builder.block_device.level1.partitioning import PartitionNode logger = logging.getLogger(__name__) @@ -89,7 +90,7 @@ # XXX: This has not mocked out the "lower" layers of # creating the devices, which we're assuming works OK, nor # the upper layers. - if isinstance(node, (LVMNode, LVMCleanupNode, PvsNode, + if isinstance(node, (LVMNode, PvsNode, VgsNode, LvsNode)): # only the LVMNode actually does anything here... node.create() @@ -198,7 +199,7 @@ # XXX: This has not mocked out the "lower" layers of # creating the devices, which we're assuming works OK, nor # the upper layers. - if isinstance(node, (LVMNode, LVMCleanupNode, PvsNode, + if isinstance(node, (LVMNode, PvsNode, VgsNode, LvsNode)): # only the PvsNode actually does anything here... node.create() @@ -282,7 +283,7 @@ self.assertDictEqual(state['blockdev'], blockdev_state) # - # Cleanup test + # Umount test # with mock.patch(exec_sudo) as mock_exec_sudo, \ mock.patch('tempfile.NamedTemporaryFile') as mock_temp, \ @@ -306,11 +307,16 @@ return r mock_temp.side_effect = new_tempfile - reverse_order = reversed(call_order) - for node in reverse_order: - if isinstance(node, (LVMNode, LVMCleanupNode, PvsNode, - VgsNode, LvsNode)): - node.cleanup() + def run_it(phase): + reverse_order = reversed(call_order) + for node in reverse_order: + if isinstance(node, (LVMNode, PvsNode, VgsNode, LvsNode)): + getattr(node, phase)() + else: + logger.debug("Skipping node for test: %s", node) + + run_it('umount') + run_it('cleanup') cmd_sequence = [ # delete the lv's @@ -365,8 +371,7 @@ # XXX: This has not mocked out the "lower" layers of # creating the devices, which we're assuming works OK, nor # the upper layers. - if isinstance(node, (LVMNode, LVMCleanupNode, - PvsNode, VgsNode, LvsNode)): + if isinstance(node, (LVMNode, PvsNode, VgsNode, LvsNode)): # only the LVMNode actually does anything here... node.create() @@ -407,10 +412,16 @@ return r mock_temp.side_effect = new_tempfile - reverse_order = reversed(call_order) - for node in reverse_order: - if isinstance(node, (LVMNode, PvsNode, VgsNode, LvsNode)): - node.cleanup() + def run_it(phase): + reverse_order = reversed(call_order) + for node in reverse_order: + if isinstance(node, (LVMNode, PvsNode, VgsNode, LvsNode)): + getattr(node, phase)() + else: + logger.debug("Skipping node for test: %s", node) + + run_it('umount') + run_it('cleanup') cmd_sequence = [ # deactivate lv's @@ -422,6 +433,146 @@ mock.call(['vgchange', '-an', 'vg_data']), mock.call(['udevadm', 'settle']), + mock.call(['pvscan', '--cache']), ] self.assertListEqual(mock_exec_sudo.call_args_list, cmd_sequence) + + def test_lvm_multiple_partitions(self): + # Test the command-sequence for several partitions, one containing + # volumes on it + tree = self.load_config_file('lvm_tree_multiple_partitions.yaml') + config = config_tree_to_graph(tree) + + state = BlockDeviceState() + + graph, call_order = create_graph(config, self.fake_default_config, + state) + + # Fake state for the partitions on this config + state['blockdev'] = {} + state['blockdev']['image0'] = {} + state['blockdev']['image0']['device'] = '/dev/fake/image0' + state['blockdev']['image0']['image'] = 'image' + state['blockdev']['root'] = {} + state['blockdev']['root']['device'] = '/dev/fake/root' + state['blockdev']['ESP'] = {} + state['blockdev']['ESP']['device'] = '/dev/fake/ESP' + state['blockdev']['BSP'] = {} + state['blockdev']['BSP']['device'] = '/dev/fake/BSP' + + # + # Creation test + # + + # We mock out the following exec_sudo and other related calls + # calls for the layers we are testing. + exec_sudo_lvm = 'diskimage_builder.block_device.level1.lvm.exec_sudo' + exec_sudo_part = ('diskimage_builder.block_device.' + 'level1.partitioning.exec_sudo') + exec_sudo_loop = ('diskimage_builder.block_device.' + 'level0.localloop.exec_sudo') + image_create = ('diskimage_builder.block_device.level0.' + 'localloop.LocalLoopNode.create') + size_of_block = ('diskimage_builder.block_device.level1.' + 'partitioning.Partitioning._size_of_block_dev') + create_mbr = ('diskimage_builder.block_device.level1.' + 'partitioning.Partitioning._create_mbr') + + manager = mock.MagicMock() + with mock.patch(exec_sudo_lvm) as mock_sudo_lvm, \ + mock.patch(exec_sudo_part) as mock_sudo_part, \ + mock.patch(exec_sudo_loop) as mock_sudo_loop, \ + mock.patch(image_create) as mock_image_create, \ + mock.patch(size_of_block) as mock_size_of_block, \ + mock.patch(create_mbr) as mock_create_mbr: + + manager.attach_mock(mock_sudo_lvm, 'sudo_lvm') + manager.attach_mock(mock_sudo_part, 'sudo_part') + manager.attach_mock(mock_sudo_loop, 'sudo_loop') + manager.attach_mock(mock_image_create, 'image_create') + manager.attach_mock(mock_size_of_block, 'size_of_block') + manager.attach_mock(mock_create_mbr, 'create_mbr') + + for node in call_order: + # We're just keeping this to the partition setup and + # LVM creation; i.e. skipping mounting, mkfs, etc. + if isinstance(node, (LVMNode, PvsNode, + VgsNode, LvsNode, + LocalLoopNode, PartitionNode)): + node.create() + else: + logger.debug("Skipping node for test: %s", node) + + cmd_sequence = [ + # create the underlying block device + mock.call.image_create(), + mock.call.size_of_block('image'), + # write out partition table + mock.call.create_mbr(), + # now mount partitions + mock.call.sudo_part(['sync']), + mock.call.sudo_part(['kpartx', '-avs', '/dev/fake/image0']), + # now create lvm environment + mock.call.sudo_lvm(['pvcreate', '/dev/fake/root', '--force']), + mock.call.sudo_lvm( + ['vgcreate', 'vg', '/dev/fake/root', '--force']), + mock.call.sudo_lvm( + ['lvcreate', '--name', 'lv_root', '-l', '28%VG', 'vg']), + mock.call.sudo_lvm( + ['lvcreate', '--name', 'lv_tmp', '-l', '4%VG', 'vg']), + mock.call.sudo_lvm( + ['lvcreate', '--name', 'lv_var', '-l', '40%VG', 'vg']), + mock.call.sudo_lvm( + ['lvcreate', '--name', 'lv_log', '-l', '23%VG', 'vg']), + mock.call.sudo_lvm( + ['lvcreate', '--name', 'lv_audit', '-l', '4%VG', 'vg']), + mock.call.sudo_lvm( + ['lvcreate', '--name', 'lv_home', '-l', '1%VG', 'vg']), + ] + manager.assert_has_calls(cmd_sequence) + + # + # Umount/cleanup test + # + manager = mock.MagicMock() + with mock.patch(exec_sudo_lvm) as mock_sudo_lvm, \ + mock.patch(exec_sudo_part) as mock_sudo_part, \ + mock.patch(exec_sudo_loop) as mock_sudo_loop: + + manager.attach_mock(mock_sudo_lvm, 'sudo_lvm') + manager.attach_mock(mock_sudo_part, 'sudo_part') + manager.attach_mock(mock_sudo_loop, 'sudo_loop') + + def run_it(phase): + reverse_order = reversed(call_order) + for node in reverse_order: + if isinstance(node, (LVMNode, PvsNode, + VgsNode, LvsNode, + LocalLoopNode, PartitionNode)): + getattr(node, phase)() + else: + logger.debug("Skipping node for test: %s", node) + + run_it('umount') + run_it('cleanup') + + cmd_sequence = [ + # deactivate LVM first + mock.call.sudo_lvm(['lvchange', '-an', '/dev/vg/lv_root']), + mock.call.sudo_lvm(['lvchange', '-an', '/dev/vg/lv_tmp']), + mock.call.sudo_lvm(['lvchange', '-an', '/dev/vg/lv_var']), + mock.call.sudo_lvm(['lvchange', '-an', '/dev/vg/lv_log']), + mock.call.sudo_lvm(['lvchange', '-an', '/dev/vg/lv_audit']), + mock.call.sudo_lvm(['lvchange', '-an', '/dev/vg/lv_home']), + mock.call.sudo_lvm(['vgchange', '-an', 'vg']), + mock.call.sudo_lvm(['udevadm', 'settle']), + # now remove partitions (note has to happen after lvm removal) + mock.call.sudo_part(['kpartx', '-d', '/dev/fake/image0']), + # now remove loopback device + mock.call.sudo_loop(['losetup', '-d', '/dev/fake/image0']), + # now final LVM cleanup call + mock.call.sudo_lvm(['pvscan', '--cache']), + ] + + manager.assert_has_calls(cmd_sequence) diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/block_device/tests/test_mount_order.py python-diskimage-builder-2.17.0/diskimage_builder/block_device/tests/test_mount_order.py --- python-diskimage-builder-2.11.0/diskimage_builder/block_device/tests/test_mount_order.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/block_device/tests/test_mount_order.py 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/block_device/utils.py python-diskimage-builder-2.17.0/diskimage_builder/block_device/utils.py --- python-diskimage-builder-2.11.0/diskimage_builder/block_device/utils.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/block_device/utils.py 2018-09-13 04:28:23.000000000 +0000 @@ -12,10 +12,14 @@ # License for the specific language governing permissions and limitations # under the License. +import locale import logging import re import subprocess +from diskimage_builder.block_device.exception import \ + BlockDeviceSetupException + logger = logging.getLogger(__name__) @@ -95,10 +99,16 @@ at debug levels. Arguments: + :param cmd: str command list; for Popen() - :return: nothing - :raises: subprocess.CalledProcessError if return code != 0 + :return: the stdout+stderror of the called command + :raises BlockDeviceSetupException: if return code != 0. + + Exception values similar to ``subprocess.CalledProcessError`` + * ``returncode`` : returncode of child + * ``cmd`` : the command run + * ``output`` : stdout+stderr output """ assert isinstance(cmd, list) sudo_cmd = ["sudo"] @@ -116,10 +126,20 @@ stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - for line in iter(proc.stdout.readline, b""): - logger.debug("exec_sudo: %s", line.rstrip()) - + out = "" + with proc.stdout: + for line in iter(proc.stdout.readline, b''): + line = line.decode(encoding=locale.getpreferredencoding(False), + errors='backslashreplace') + out += line + logger.debug("exec_sudo: %s", line.rstrip()) proc.wait() - if proc.returncode != 0: - raise subprocess.CalledProcessError(proc.returncode, - ' '.join(sudo_cmd)) + + if proc.returncode: + e = BlockDeviceSetupException("exec_sudo failed") + e.returncode = proc.returncode + e.cmd = ' '.join(sudo_cmd) + e.output = out + raise e + + return out diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/element_dependencies.py python-diskimage-builder-2.17.0/diskimage_builder/element_dependencies.py --- python-diskimage-builder-2.11.0/diskimage_builder/element_dependencies.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/element_dependencies.py 2018-09-13 04:28:23.000000000 +0000 @@ -151,9 +151,14 @@ element_deps = element_obj.depends element_provides = element_obj.provides - # save which elements provide another element for potential - # error message + # Check that we are not providing an element which has already + # been provided by someone else, and additionally save which + # elements provide another element for provide in element_provides: + if provide in provided: + raise AlreadyProvidedException( + "%s: already provided by %s" % + (provide, provided_by[provide])) provided_by[provide].append(element) provided.update(element_provides) check_queue.extend(element_deps - (final_elements | provided)) diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-efi/block-device-default.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-efi/block-device-default.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-efi/block-device-default.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-efi/block-device-default.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,30 @@ +- local_loop: + name: image0 + +- partitioning: + base: image0 + label: gpt + partitions: + - name: ESP + type: 'EF00' + size: 8MiB + mkfs: + type: vfat + mount: + mount_point: /boot/efi + fstab: + options: "defaults" + fsck-passno: 1 + - name: BSP + type: 'EF02' + size: 8MiB + - name: root + type: '8300' + size: 100% + mkfs: + type: ext4 + mount: + mount_point: / + fstab: + options: "defaults" + fsck-passno: 1 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-efi/element-provides python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-efi/element-provides --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-efi/element-provides 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-efi/element-provides 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +block-device \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-efi/environment.d/15-block-device.bash python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-efi/environment.d/15-block-device.bash --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-efi/environment.d/15-block-device.bash 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-efi/environment.d/15-block-device.bash 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,10 @@ +# +# Arch gate +# + +if [[ "ppc64 ppc64le ppc64el" =~ "$ARCH" ]]; then + echo "block-device-efi is not supported on Power; use block-device-gpt or block-device-mbr" + exit 1 +fi + +export DIB_BLOCK_DEVICE=efi diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-efi/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-efi/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-efi/README.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-efi/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,11 @@ +================ +Block Device EFI +================ + +This provides a block-device configuration for the ``vm`` element to +get a single-partition disk suitable for EFI booting. + +Note on x86 this provides the extra `BIOS boot partition +`__ and a EFI boot +partition for maximum compatability. + diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-gpt/block-device-default.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-gpt/block-device-default.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-gpt/block-device-default.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-gpt/block-device-default.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,22 @@ +# Default single partition loopback using a GPT based partition table + +- local_loop: + name: image0 + +- partitioning: + base: image0 + label: gpt + partitions: + - name: BSP + type: 'EF02' + size: 8MiB + - name: root + flags: [ boot ] + size: 100% + mkfs: + type: ext4 + mount: + mount_point: / + fstab: + options: "defaults" + fsck-passno: 1 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-gpt/block-device-ppc64el.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-gpt/block-device-ppc64el.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-gpt/block-device-ppc64el.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-gpt/block-device-ppc64el.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,32 @@ +# Default GPT block device setup for PPC +# -------------------------------------- +# +# Details (extracted from [1]) +# +# Power Firmware (OFW) scans chosen (nvram value boot-device) device, +# for either PReP* partition or vfat. +# +# PReP is raw and small (8M max) partition which caries only stage1 +# binary. +# +# [1] https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/W51a7ffcf4dfd_4b40_9d82_446ebc23c550/page/PowerLinux%20Boot%20howto + +- local_loop: + name: image0 + +- partitioning: + base: image0 + label: gpt + partitions: + - name: boot + type: '0x4100' + size: 8MiB + - name: root + size: 100% + mkfs: + type: ext4 + mount: + mount_point: / + fstab: + options: "defaults" + fsck-passno: 1 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-gpt/element-provides python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-gpt/element-provides --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-gpt/element-provides 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-gpt/element-provides 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +block-device \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-gpt/environment.d/15-block-device.bash python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-gpt/environment.d/15-block-device.bash --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-gpt/environment.d/15-block-device.bash 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-gpt/environment.d/15-block-device.bash 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,10 @@ +# +# Arch gate +# + +if [[ "arm64 aarch64" =~ $ARCH ]]; then + echo "block-device-gpt is not supported on AARCH64; use block-device-efi" + exit 1 +fi + +export DIB_BLOCK_DEVICE=gpt diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-gpt/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-gpt/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-gpt/README.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-gpt/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,11 @@ +================ +Block Device GPT +================ + +This provides a block-device configuration for the ``vm`` element to +get a GPT based single-partition disk. + +Note on x86 this provides the extra `BIOS boot partition +`__ as required for +non-EFI boot environments. + diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-mbr/block-device-default.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-mbr/block-device-default.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-mbr/block-device-default.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-mbr/block-device-default.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,18 @@ +# Default single partition loopback + +- local_loop: + name: image0 + +- partitioning: + base: image0 + label: mbr + partitions: + - name: root + flags: [ boot, primary ] + size: 100% + mkfs: + mount: + mount_point: / + fstab: + options: "defaults" + fsck-passno: 1 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-mbr/block-device-ppc64el.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-mbr/block-device-ppc64el.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-mbr/block-device-ppc64el.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-mbr/block-device-ppc64el.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,36 @@ +# Default block device setup for PPC +# ---------------------------------- +# +# Details (extracted from [1]) +# +# Power Firmware (OFW) scans chosen (nvram value boot-device) device, +# for either PReP* partition or vfat. +# +# PReP is raw and small (8M max) partition which caries only stage1 +# binary. +# msdos partition table: +# - PReP partition have 0x41 type (must be active) +# - PReP partition must have boot flag set +# +# [1] https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/W51a7ffcf4dfd_4b40_9d82_446ebc23c550/page/PowerLinux%20Boot%20howto + +- local_loop: + name: image0 + +- partitioning: + base: image0 + label: mbr + partitions: + - name: boot + flags: [ boot, primary ] + type: '0x41' + size: 8MiB + - name: root + flags: [ primary ] + size: 100% + mkfs: + mount: + mount_point: / + fstab: + options: "defaults" + fsck-passno: 1 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-mbr/element-provides python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-mbr/element-provides --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-mbr/element-provides 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-mbr/element-provides 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +block-device \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-mbr/environment.d/15-block-device.bash python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-mbr/environment.d/15-block-device.bash --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-mbr/environment.d/15-block-device.bash 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-mbr/environment.d/15-block-device.bash 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,10 @@ +# +# Arch gate +# + +if [[ "arm64 aarch64" =~ $ARCH ]]; then + echo "block-device-mbr is not supported on AARCH64; use block-device-efi" + exit 1 +fi + +export DIB_BLOCK_DEVICE=mbr diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-mbr/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-mbr/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/block-device-mbr/README.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/block-device-mbr/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,7 @@ +================ +Block Device MBR +================ + +This provides the default legacy block-device configuration for the +"vm" element. This configures a single partition and is suitable for +a MBR based bootloader. diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/bootloader/finalise.d/50-bootloader python-diskimage-builder-2.17.0/diskimage_builder/elements/bootloader/finalise.d/50-bootloader --- python-diskimage-builder-2.11.0/diskimage_builder/elements/bootloader/finalise.d/50-bootloader 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/bootloader/finalise.d/50-bootloader 2018-09-13 04:28:40.000000000 +0000 @@ -55,13 +55,21 @@ # Check for offline installation of grub if [ -f "/tmp/grub/install" ] ; then source /tmp/grub/install - # Right now we can't use pkg-map to branch by arch, so tag an architecture - # specific virtual package so we can install the rigth thing based on - # distribution. + + # Right now we can't use pkg-map to branch by arch, so tag an + # architecture specific virtual package so we can install the + # rigth thing based on distribution. elif [[ "$ARCH" =~ "ppc" ]]; then install-packages -m bootloader grub-ppc64 - else + elif [[ "${DIB_BLOCK_DEVICE}" == "mbr" || + "${DIB_BLOCK_DEVICE}" == "gpt" ]]; then install-packages -m bootloader grub-pc + elif [[ "${DIB_BLOCK_DEVICE}" == "efi" ]]; then + install-packages -m bootloader grub-efi-$ARCH + else + echo "Failure: I'm not sure what bootloader to install" + echo "Ensure you have included a block-device-* element" + exit 1 fi # XXX: grub-probe on the nbd0/loop0 device returns nothing - workaround, manually @@ -127,7 +135,27 @@ # that a dev/loopXpN node will work fine. $GRUBNAME --modules="part_msdos" $GRUB_OPTS ${DEVICES[boot]} --no-nvram else - $GRUBNAME --modules="biosdisk part_msdos" $GRUB_OPTS $BOOT_DEV + # This set of modules is sufficient for all installs (mbr/gpt/efi) + modules="part_msdos part_gpt lvm" + extra_options="" + if [[ ${DIB_BLOCK_DEVICE} == "mbr" || ${DIB_BLOCK_DEVICE} == "gpt" ]]; then + modules="$modules biosdisk" + elif [[ ${DIB_BLOCK_DEVICE} == "efi" ]]; then + # This tells the EFI install to put the EFI binaries into + # the generic /BOOT directory and avoids trying to update + # nvram settings. + extra_options="--removable" + # We need to manually set the target if it's different to + # the host. Setup for EFI + case $ARCH in + "x86_64"|"amd64") + GRUB_OPTS="--target=x86_64-efi" + ;; + # At this point, we don't need to override the target + # for any other architectures. + esac + fi + $GRUBNAME --modules="$modules" $extra_options $GRUB_OPTS $BOOT_DEV fi # This might be better factored out into a per-distro 'install-bootblock' @@ -144,37 +172,27 @@ echo 'GRUB_DISABLE_LINUX_UUID=true' >> /etc/default/grub echo "GRUB_TIMEOUT=${DIB_GRUB_TIMEOUT:-5}" >>/etc/default/grub echo 'GRUB_TERMINAL="serial console"' >>/etc/default/grub - echo 'GRUB_GFXPAYLOAD_LINUX=text' >>/etc/default/grub + echo 'GRUB_GFXPAYLOAD_LINUX=auto' >>/etc/default/grub # Serial console on Power is hvc0 if [[ "powerpc ppc64 ppc64le" =~ "$ARCH" ]]; then SERIAL_CONSOLE="hvc0" + elif [[ "arm64" =~ "$ARCH" ]]; then + SERIAL_CONSOLE="ttyAMA0,115200" else SERIAL_CONSOLE="ttyS0,115200" fi GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=${SERIAL_CONSOLE} no_timer_check" - echo "GRUB_CMDLINE_LINUX_DEFAULT=\"${GRUB_CMDLINE_LINUX_DEFAULT}\"" >>/etc/default/grub + echo "GRUB_CMDLINE_LINUX_DEFAULT=\"${GRUB_CMDLINE_LINUX_DEFAULT} ${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"" >>/etc/default/grub echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >>/etc/default/grub + if type grub2-mkconfig >/dev/null; then GRUB_MKCONFIG="grub2-mkconfig -o $GRUB_CFG" else GRUB_MKCONFIG="grub-mkconfig -o $GRUB_CFG" fi - DISTRO_NAME=${DISTRO_NAME:-} - case $DISTRO_NAME in - 'ubuntu'|'debian') - sed -i -e "s/\(^GRUB_CMDLINE_LINUX.*\)\"$/\1 ${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"/" /etc/default/grub - GRUB_MKCONFIG=update-grub - ;; - 'fedora'|'centos7'|'centos') - echo "GRUB_CMDLINE_LINUX=\"${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"" >>/etc/default/grub - ;; - 'opensuse') - sed -i -e "s/\(^GRUB_CMDLINE_LINUX.*\)\"$/\1 ${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"/" /etc/default/grub - ;; - esac # os-prober leaks /dev/sda into config file in dual-boot host # Disable grub-os-prober to avoid the issue while running @@ -205,6 +223,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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/bootloader/pkg-map python-diskimage-builder-2.17.0/diskimage_builder/elements/bootloader/pkg-map --- python-diskimage-builder-2.11.0/diskimage_builder/elements/bootloader/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/bootloader/pkg-map 2018-09-13 04:28:23.000000000 +0000 @@ -3,16 +3,22 @@ "gentoo": { "dkms_package": "", "extlinux": "syslinux", - "grub-pc": "grub" + "grub-pc": "grub", + "grub-efi": "grub" }, "suse": { "dkms_package": "", "extlinux": "syslinux", - "grub-pc": "grub2" + "grub-pc": "grub2", + "grub-efi": "grub2" }, "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-aarch64": "grub2-tools grub2-efi grub2-efi-modules", + "grub-efi": "grub2-tools grub2-efi", "grub-ppc64": "grub2-tools grub2" } }, @@ -20,6 +26,8 @@ "dkms_package": "dkms", "extlinux": "extlinux", "grub-pc": "grub-pc", + "grub-efi-amd64": "grub-efi", + "grub-efi-arm64": "grub-efi-arm64", "grub-ppc64": "grub-ieee1275" } } diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/bootloader/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/bootloader/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/bootloader/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/bootloader/README.rst 2018-09-13 04:28:40.000000000 +0000 @@ -13,6 +13,6 @@ * ``DIB_GRUB_TIMEOUT`` sets the ``grub`` menu timeout. It defaults to 5 seconds. Set this to 0 (no timeout) for fast boot times. -* ``DIB_BOOTLOADER_DEFAULT_CMDLINE`` sets the CMDLINE parameters that - are appended to the grub.cfg configuration. It defaults to - 'nofb nomodeset vga=normal' +* ``DIB_BOOTLOADER_DEFAULT_CMDLINE`` sets parameters that are appended + to the ``GRUB_CMDLINE_LINUX_DEFAULT`` values in ``grub.cfg`` + configuration. It defaults to ``nofb nomodeset vga=normal``. diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/cache-url/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/cache-url/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/cache-url/element-deps 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/cache-url/element-deps 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +package-installs diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/cache-url/package-installs.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/cache-url/package-installs.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/cache-url/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/cache-url/package-installs.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +curl: diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/cache-url/pkg-map python-diskimage-builder-2.17.0/diskimage_builder/elements/cache-url/pkg-map --- python-diskimage-builder-2.11.0/diskimage_builder/elements/cache-url/pkg-map 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/cache-url/pkg-map 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,7 @@ +{ + "distro": { + "gentoo": { + "curl": "net-misc/curl" + } + } +} diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/debian/element-provides python-diskimage-builder-2.17.0/diskimage_builder/elements/debian/element-provides --- python-diskimage-builder-2.11.0/diskimage_builder/elements/debian/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/debian/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -operating-system diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall python-diskimage-builder-2.17.0/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall --- python-diskimage-builder-2.11.0/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/devuser/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/devuser/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/devuser/element-deps 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/devuser/element-deps 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +package-installs diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/devuser/package-installs.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/devuser/package-installs.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/devuser/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/devuser/package-installs.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +sudo: diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/devuser/pkg-map python-diskimage-builder-2.17.0/diskimage_builder/elements/devuser/pkg-map --- python-diskimage-builder-2.11.0/diskimage_builder/elements/devuser/pkg-map 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/devuser/pkg-map 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,7 @@ +{ + "family": { + "gentoo": { + "sudo": "app-admin/sudo" + } + } +} diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces python-diskimage-builder-2.17.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces --- python-diskimage-builder-2.11.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces 2018-09-13 04:28:23.000000000 +0000 @@ -11,6 +11,16 @@ # this script is not needed on Gentoo. 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 + sed -i "s/DIB_DHCP_TIMEOUT/${DIB_DHCP_TIMEOUT:-30}/" /usr/local/sbin/dhcp-all-interfaces.sh +fi + +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 + else + echo -e "# \"timeout\" Value set by dhcp-all-interfaces\ntimeout ${DIB_DHCP_TIMEOUT:-30};" >> /etc/dhcp/dhclient.conf + fi fi if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces python-diskimage-builder-2.17.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces --- python-diskimage-builder-2.11.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh python-diskimage-builder-2.17.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh --- python-diskimage-builder-2.11.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh 2018-09-13 04:28:23.000000000 +0000 @@ -97,8 +97,8 @@ echo "Device has generated MAC, skipping." else local has_link - local tries - for ((tries = 0; tries < 20; tries++)); do + local tries=DIB_DHCP_TIMEOUT + for ((; tries > 0; tries--)); do # Need to set the link up on each iteration ip link set dev $interface up &>/dev/null has_link=$(get_if_link $interface) diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/dhcp-all-interfaces/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/dhcp-all-interfaces/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/dhcp-all-interfaces/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/dhcp-all-interfaces/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -24,6 +24,7 @@ DIB_DHCP_TIMEOUT :Required: No :Default: 30 - :Description: Amount of time in seconds that the systemd service will - wait to get an address. + :Description: Amount of time in seconds that the systemd service(or dhclient) + will wait to get an address. Should be increased in networks such as + Infiniband. :Example: DIB_DHCP_TIMEOUT=300 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/dib-python/cleanup.d/50-dib-python python-diskimage-builder-2.17.0/diskimage_builder/elements/dib-python/cleanup.d/50-dib-python --- python-diskimage-builder-2.11.0/diskimage_builder/elements/dib-python/cleanup.d/50-dib-python 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/dib-python/cleanup.d/50-dib-python 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/bash + +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +# Remove dib-python wrapper. Nothing else should be running in chroot +# and required this any more. + +sudo unlink $TARGET_ROOT/usr/local/bin/dib-python # dib-lint: safe_sudo diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/dib-python/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/dib-python/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/dib-python/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/dib-python/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -2,23 +2,29 @@ dib-python ========== -Adds a symlink to `/usr/local/bin/dib-python` which points at either a -`python2` or `python3` executable as appropriate. +Adds a symlink to ``/usr/local/bin/dib-python`` which points at either a +``python2`` or ``python3`` executable as appropriate. In-chroot scripts should use this as their interpreter -(`#!/usr/local/bin/dib-python`) to make scripts that are compatible -with both `python2` and `python3`. We can not assume -`/usr/bin/python` exists, as some platforms have started shipping with +(``#!/usr/local/bin/dib-python``) to make scripts that are compatible +with both ``python2`` and ``python3``. We can not assume +``/usr/bin/python`` exists, as some platforms have started shipping with only Python 3. -`DIB_PYTHON` will be exported as the python interpreter. You should -use this instead of `python script.py` (e.g. `${DIB_PYTHON} -script.py`). Note you can also call `/usr/local/bin/dib-python -script.py` but in some circumstances, such as creating a `virtualenv`, -it can create somewhat confusing references to `dib-python` that +``DIB_PYTHON`` will be exported as the python interpreter. You should +use this instead of ``python script.py`` (e.g. ``${DIB_PYTHON} +script.py``). Note you can also call ``/usr/local/bin/dib-python +script.py`` but in some circumstances, such as creating a ``virtualenv``, +it can create somewhat confusing references to ``dib-python`` that remain in the built image. 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 +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. + + +.. note:: + + The ``dib-python`` interpreter will be removed in ``cleanup.d``. It + is only intended for build scripts. diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/disable-nouveau/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/disable-nouveau/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/disable-nouveau/element-deps 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/disable-nouveau/element-deps 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +modprobe diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/disable-nouveau/modprobe.d/disable-nouveau.conf python-diskimage-builder-2.17.0/diskimage_builder/elements/disable-nouveau/modprobe.d/disable-nouveau.conf --- python-diskimage-builder-2.11.0/diskimage_builder/elements/disable-nouveau/modprobe.d/disable-nouveau.conf 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/disable-nouveau/modprobe.d/disable-nouveau.conf 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,2 @@ +blacklist nouveau +options nouveau modeset=0 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/disable-nouveau/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/disable-nouveau/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/disable-nouveau/README.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/disable-nouveau/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,7 @@ +=============== +disable-nouveau +=============== +Blacklist nouveau module + +This is required when installing NVIDIA GPU drivers and to avoid issues with PCI +passthrough of NVIDIA GPUs. diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/dpkg/pre-install.d/02-add-apt-keys python-diskimage-builder-2.17.0/diskimage_builder/elements/dpkg/pre-install.d/02-add-apt-keys --- python-diskimage-builder-2.11.0/diskimage_builder/elements/dpkg/pre-install.d/02-add-apt-keys 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/dpkg/pre-install.d/02-add-apt-keys 2018-09-13 04:28:23.000000000 +0000 @@ -33,3 +33,5 @@ apt-key add ${KEY} done + +apt-get -y update diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/epel/pkg-map python-diskimage-builder-2.17.0/diskimage_builder/elements/epel/pkg-map --- python-diskimage-builder-2.11.0/diskimage_builder/elements/epel/pkg-map 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/epel/pkg-map 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,20 @@ +{ + "distro": { + "centos7": { + "wget": "wget", + "yum-utils": "yum-utils" + }, + "centos": { + "wget": "wget", + "yum-utils": "yum-utils" + }, + "rhel7": { + "wget": "wget", + "yum-utils": "yum-utils" + } + }, + "default": { + "wget": "", + "yum-utils": "" + } +} diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/epel/pre-install.d/05-rpm-epel-release python-diskimage-builder-2.17.0/diskimage_builder/elements/epel/pre-install.d/05-rpm-epel-release --- python-diskimage-builder-2.11.0/diskimage_builder/elements/epel/pre-install.d/05-rpm-epel-release 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/epel/pre-install.d/05-rpm-epel-release 2018-09-13 04:28:23.000000000 +0000 @@ -25,7 +25,8 @@ ;; *) echo "$DISTRO_NAME is not supported" - exit 1 + # Not really a failure; we just don't do anything + exit 0 ;; esac PKG_NAME=$(wget -q $URL -O - |grep -oE "(href=\"epel-release-$RELEASE-[0-9,.].*)" | cut -d'"' -f2) diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/epel/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/epel/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/epel/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/epel/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -5,7 +5,7 @@ This element installs the Extra Packages for Enterprise Linux (EPEL) repository GPG key as well as configuration for yum. -Note this element only works with platforms that have EPEL support +Note this element is only useful with platforms that have EPEL support such as CentOS and RHEL DIB_EPEL_MIRROR: diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/fedora/root.d/10-fedora-cloud-image python-diskimage-builder-2.17.0/diskimage_builder/elements/fedora/root.d/10-fedora-cloud-image --- python-diskimage-builder-2.11.0/diskimage_builder/elements/fedora/root.d/10-fedora-cloud-image 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/fedora/root.d/10-fedora-cloud-image 2018-09-13 04:28:23.000000000 +0000 @@ -24,8 +24,18 @@ BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz else # note default DIB_RELEASE set in environment setup - # Not sure if ${ARCH} is defined for anything but x86_64 here - DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-https://download.fedoraproject.org/pub/fedora/linux/releases/${DIB_RELEASE}/CloudImages/${ARCH}/images} + case ${ARCH} in + x86_64) + DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-https://download.fedoraproject.org/pub/fedora/linux/releases/${DIB_RELEASE}/CloudImages/${ARCH}/images} + ;; + aarch64|ppc64|ppc64le) + DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-https://dl.fedoraproject.org/pub/fedora-secondary/releases/${DIB_RELEASE}/CloudImages/${ARCH}/images} + ;; + *) + echo "Error: unknown ARCH: ${ARCH}" + exit 1 + ;; + esac BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-Fedora-Cloud-Base-$DIB_RELEASE-$DIB_FEDORA_SUBRELEASE.$ARCH.qcow2} BASE_IMAGE_TAR=Fedora-Cloud-Base-$DIB_RELEASE-$DIB_FEDORA_SUBRELEASE.$ARCH.tgz IMAGE_LOCATION=$DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/fedora-minimal/environment.d/10-fedora-distro-name.bash python-diskimage-builder-2.17.0/diskimage_builder/elements/fedora-minimal/environment.d/10-fedora-distro-name.bash --- python-diskimage-builder-2.11.0/diskimage_builder/elements/fedora-minimal/environment.d/10-fedora-distro-name.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/fedora-minimal/environment.d/10-fedora-distro-name.bash 2018-09-13 04:28:23.000000000 +0000 @@ -1,2 +1,2 @@ export DISTRO_NAME=fedora -export DIB_RELEASE=${DIB_RELEASE:-26} +export DIB_RELEASE=${DIB_RELEASE:-27} diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/fedora-minimal/test-elements/build-succeeds/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/fedora-minimal/test-elements/build-succeeds/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/fedora-minimal/test-elements/build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/fedora-minimal/test-elements/build-succeeds/element-deps 2018-09-13 04:28:23.000000000 +0000 @@ -1 +1,3 @@ -openstack-ci-mirrors \ No newline at end of file +block-device-gpt +openstack-ci-mirrors +vm diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash --- python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash 2018-09-13 04:28:23.000000000 +0000 @@ -1,7 +1,7 @@ export DIB_RELEASE=gentoo export DISTRO_NAME=gentoo export GENTOO_PROFILE=${GENTOO_PROFILE:-'default/linux/amd64/17.0'} -export GENTOO_PORTAGE_CLEANUP=${GENTOO_PORTAGE_CLEANUP:-'False'} +export GENTOO_PORTAGE_CLEANUP=${GENTOO_PORTAGE_CLEANUP:-'True'} export GENTOO_PYTHON_TARGETS=${GENTOO_PYTHON_TARGETS:-'python2_7 python3_5'} export GENTOO_PYTHON_ACTIVE_VERSION=${GENTOO_PYTHON_ACTIVE_VERSION:-'python3.5'} export GENTOO_OVERLAYS=${GENTOO_OVERLAYS:-''} diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/finalise.d/99-cleanup python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/finalise.d/99-cleanup --- python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/finalise.d/99-cleanup 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/finalise.d/99-cleanup 2018-09-13 04:28:23.000000000 +0000 @@ -41,7 +41,7 @@ done fi # remove portage files - rm -Rf /usr/portage/* /var/cache/portage/distfiles + rm -Rf /usr/portage/* /usr/portage/.git /var/cache/portage/distfiles fi # shrink a bit @@ -55,3 +55,8 @@ fi unfix_shm + +# systemd id +if [[ "${GENTOO_PROFILE}" == *"systemd"* ]]; then + cp /dev/null /etc/machine-id +fi diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/package-installs.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/package-installs.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/package-installs.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -1 +1,2 @@ sys-fs/dosfstools: +app-admin/sudo: diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags --- python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags 2018-09-13 04:28:23.000000000 +0000 @@ -8,7 +8,15 @@ # get the directories in order mkdir -p /etc/portage/profile -mkdir -p /etc/portage/package.keywords +if [ -f /etc/portage/package.keywords ]; then + mv /etc/portage/package.keywords /etc/portage/package.keywords.bak + mkdir -p /etc/portage/package.keywords + mv /etc/portage/package.keywords.bak /etc/portage/package.keywords/prebuilt-1 +else + mkdir -p /etc/portage/package.keywords +fi +[ -d /etc/portage/package.accept_keywords ] && mv /etc/portage/package.accept_keywords/* /etc/portage/package.keywords/ && rmdir /etc/portage/package.accept_keywords +[ -f /etc/portage/package.accept_keywords ] && mv /etc/portage/package.accept_keywords /etc/portage/package.keywords/prebuilt-2 mkdir -p /etc/portage/package.mask mkdir -p /etc/portage/package.unmask mkdir -p /etc/portage/package.use diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays --- python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays 2018-09-13 04:28:23.000000000 +0000 @@ -24,18 +24,19 @@ # redistribution, so we have to use a version of openssl that works around # it (using fedora's patchset) and also use a version of cryptography that # depends on that version of openssl. - echo '=dev-python/cryptography-2.1.3 ~amd64' >> /etc/portage/package.keywords/layman - echo '=dev-libs/openssl-1.1.0g-r1 ~amd64' >> /etc/portage/package.keywords/layman - echo '=dev-libs/openssl-1.1.0g-r1' >> /etc/portage/package.unmask/layman + echo '=dev-python/cryptography-2.1.4-r2 ~amd64' >> /etc/portage/package.keywords/layman + echo '=dev-libs/openssl-1.0.2o-r6 ~amd64' >> /etc/portage/package.keywords/layman emerge -q --oneshot --jobs=2 openssl openssh # install layman - USE="-build" emerge --deep -q --jobs=2 layman + USE="-build" emerge --deep -q --jobs=2 --ignore-built-slot-operator-deps=y layman # sync the initial overlay list layman -S - # enable the various overlays + # enable the various overlays, ignore failures (overlay my already be enabled) + set +e for OVERLAY in ${GENTOO_OVERLAYS}; do layman -a "${OVERLAY}" done + set -e unfix_shm fi diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -28,12 +28,12 @@ default/linux/amd64/17.0 default/linux/amd64/17.0/no-multilib - hardened/linux/amd64 - hardened/linux/amd64/no-multilib + default/linux/amd64/17.0/hardened + default/linux/amd64/17.0/no-multilib/hardened -* You can set the GENTOO_PORTAGE_CLEANUP environment variable to true (or - anything other than False) to clean up portage from the system and get the - image size smaller. +* You can set the GENTOO_PORTAGE_CLEANUP environment variable to False to + prevent cleaning up portage repositories (including overlays). This makes + the image bigger. * Gentoo supports many diferent versions of python, in order to select one you may use the `GENTOO_PYTHON_TARGETS` environment variable to select diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/root.d/10-gentoo-image python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/root.d/10-gentoo-image --- python-diskimage-builder-2.11.0/diskimage_builder/elements/gentoo/root.d/10-gentoo-image 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/gentoo/root.d/10-gentoo-image 2018-09-13 04:28:23.000000000 +0000 @@ -45,18 +45,22 @@ elif [[ "${GENTOO_PROFILE}" == "default/linux/amd64/17.0/no-multilib" ]]; then FILENAME_BASE='gentoo-stage4-nomultilib' SIGNED_SOURCE_SUFFIX='minimal-nomultilib' -elif [[ "${GENTOO_PROFILE}" == "hardened/linux/amd64" ]]; then +elif [[ "${GENTOO_PROFILE}" == "default/linux/amd64/17.0/hardened" ]]; then FILENAME_BASE='gentoo-stage4-hardened' SIGNED_SOURCE_SUFFIX='hardened+minimal' -elif [[ "${GENTOO_PROFILE}" == "hardened/linux/amd64/no-multilib" ]]; then +elif [[ "${GENTOO_PROFILE}" == "default/linux/amd64/17.0/no-multilib/hardened" ]]; then FILENAME_BASE='gentoo-stage4-hardened-nomultilib' SIGNED_SOURCE_SUFFIX='hardened+minimal-nomultilib' +elif [[ "${GENTOO_PROFILE}" == "default/linux/amd64/17.0/systemd" ]]; then + FILENAME_BASE='gentoo-stage4-systemd' + SIGNED_SOURCE_SUFFIX='systemd' else echo 'invalid profile, please select from the following profiles' echo 'default/linux/amd64/17.0' echo 'default/linux/amd64/17.0/no-multilib' - echo 'hardened/linux/amd64' - echo 'hardened/linux/amd64/no-multilib' + echo 'default/linux/amd64/17.0/hardened' + echo 'default/linux/amd64/17.0/no-multilib/hardened' + echo 'default/linux/amd64/17.0/systemd' exit 1 fi diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ironic-agent/package-installs.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/ironic-agent/package-installs.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ironic-agent/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ironic-agent/package-installs.yaml 2018-09-13 04:28:40.000000000 +0000 @@ -3,6 +3,7 @@ # dmidecode does not exist for ppc* arches so we use lshw dmidecode: not-arch: ppc64,ppc64el,ppc64le +iptables: lshw: ipmitool: qemu-utils: diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/iscsi-boot/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/iscsi-boot/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/iscsi-boot/element-deps 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/iscsi-boot/element-deps 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +package-installs diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config python-diskimage-builder-2.17.0/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config --- python-diskimage-builder-2.11.0/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config python-diskimage-builder-2.17.0/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config --- python-diskimage-builder-2.11.0/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/iscsi-boot/package-installs.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/iscsi-boot/package-installs.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/iscsi-boot/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/iscsi-boot/package-installs.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,2 @@ +open-iscsi: + phase: install.d diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/iscsi-boot/post-install.d/open-iscsi-config python-diskimage-builder-2.17.0/diskimage_builder/elements/iscsi-boot/post-install.d/open-iscsi-config --- python-diskimage-builder-2.11.0/diskimage_builder/elements/iscsi-boot/post-install.d/open-iscsi-config 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/iscsi-boot/post-install.d/open-iscsi-config 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/iscsi-boot/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/iscsi-boot/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/iscsi-boot/README.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/iscsi-boot/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/iso/cleanup.d/100-build-iso python-diskimage-builder-2.17.0/diskimage_builder/elements/iso/cleanup.d/100-build-iso --- python-diskimage-builder-2.11.0/diskimage_builder/elements/iso/cleanup.d/100-build-iso 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/iso/cleanup.d/100-build-iso 2018-09-13 04:28:23.000000000 +0000 @@ -29,7 +29,7 @@ # Ubuntu: grub-efi-amd64-signed and shim-signed # Fedora: grub2-efi and shim - if [ $DISTRO_NAME = "fedora" ]; then + if [[ $DISTRO_NAME = "fedora" || $DISTRO_NAME = "rhel7" ]] ; then cp $TMP_BOOTLOADER_DIR/shim.efi $TMP_BUILD_DIR/bootx64.efi cp $TMP_BOOTLOADER_DIR/grubx64.efi $TMP_BUILD_DIR/grubx64.efi else diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/iso/pkg-map python-diskimage-builder-2.17.0/diskimage_builder/elements/iso/pkg-map --- python-diskimage-builder-2.11.0/diskimage_builder/elements/iso/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/iso/pkg-map 2018-09-13 04:28:23.000000000 +0000 @@ -13,7 +13,7 @@ "isolinux": "" }, "redhat":{ - "syslinux": "", + "syslinux": "syslinux", "syslinux-common": "", "isolinux": "" } diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/iso/post-install.d/01-copy-bootloaders python-diskimage-builder-2.17.0/diskimage_builder/elements/iso/post-install.d/01-copy-bootloaders --- python-diskimage-builder-2.11.0/diskimage_builder/elements/iso/post-install.d/01-copy-bootloaders 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/iso/post-install.d/01-copy-bootloaders 2018-09-13 04:28:23.000000000 +0000 @@ -10,28 +10,28 @@ TMP_BOOTLOADER_DIR=/tmp/bootloader_files mkdir -p $TMP_BOOTLOADER_DIR +#fedora if [ $DISTRO_NAME = "fedora" ]; then GRUB_FILE="/boot/efi/EFI/fedora/grubx64.efi" -else - GRUB_FILE="/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed" -fi - -if [ $DISTRO_NAME = "fedora" ]; then SHIM_FILE="/boot/efi/EFI/fedora/shim.efi" -else - SHIM_FILE="/usr/lib/shim/shim.efi.signed" -fi - -#fedora -if [ $DISTRO_NAME = "fedora" ]; then SYSLINUX_FILE="/usr/share/syslinux/isolinux.bin" LDLINUX_FILE="/usr/share/syslinux/ldlinux.c32" #debian elif [ $DISTRO_NAME = "debian" ]; then + GRUB_FILE="/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed" + SHIM_FILE="/usr/lib/shim/shim.efi.signed" SYSLINUX_FILE="/usr/lib/ISOLINUX/isolinux.bin" LDLINUX_FILE="/usr/lib/syslinux/modules/bios/ldlinux.c32" +#rhel7 +elif [ $DISTRO_NAME = "rhel7" ]; then + GRUB_FILE="/boot/efi/EFI/redhat/grubx64.efi" + SHIM_FILE="/boot/efi/EFI/redhat/shim.efi" + SYSLINUX_FILE="/usr/share/syslinux/isolinux.bin" + LDLINUX_FILE="/usr/share/syslinux/ldlinux.c32" #ubuntu else + GRUB_FILE="/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed" + SHIM_FILE="/usr/lib/shim/shim.efi.signed" SYSLINUX_FILE="/usr/lib/syslinux/isolinux.bin" LDLINUX_FILE="/usr/lib/syslinux/ldlinux.c32" fi diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/lvm/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/lvm/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/lvm/element-deps 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/lvm/element-deps 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,3 @@ +bootloader +pkg-map +ubuntu-minimal diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/lvm/finalise.d/60-bootloader python-diskimage-builder-2.17.0/diskimage_builder/elements/lvm/finalise.d/60-bootloader --- python-diskimage-builder-2.11.0/diskimage_builder/elements/lvm/finalise.d/60-bootloader 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/lvm/finalise.d/60-bootloader 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,65 @@ +#!/bin/bash + +# Configure grub. Note that the various conditionals here are to handle +# different distributions gracefully. + +if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +BOOT_DEV=$IMAGE_BLOCK_DEVICE + +# All available devices, handy for some bootloaders... +declare -A DEVICES +eval DEVICES=( $IMAGE_BLOCK_DEVICES ) + +# This might be better factored out into a per-distro 'install-bootblock' +# helper. +if [ -d /boot/grub2 ]; then + GRUB_CFG=/boot/grub2/grub.cfg +elif [ -d /boot/grub ]; then + GRUB_CFG=/boot/grub/grub.cfg +fi + +if type grub2-mkconfig >/dev/null; then + GRUB_MKCONFIG="grub2-mkconfig -o $GRUB_CFG" +else + GRUB_MKCONFIG="grub-mkconfig -o $GRUB_CFG" +fi + +# Retrieve root filesystem mount point to check if it is LVM based +ROOTFS=$(awk '$2=="/"{print}' /proc/mounts) +# Standard filesystems are mounted as /dev/mapper/loop* within DIB +# so we need to exclude this case +if echo "$ROOTFS" | grep -qv '/dev/mapper/loop'; then + # LVM based filesystems are mounted as /dev/mapper/- within DIB + if echo "$ROOTFS" | grep -q '/dev/mapper/'; then + # Check if initramfs-tools are installed + if [ ! -d /etc/initramfs-tools ]; then + echo "You must have initramfs-tools installed for LVM based root filesystem to work properly" + exit 1 + fi + # Check if system supports LVM + if ! type pvs >/dev/null 2>&1; then + echo "You must have lvm2 package installed for LVM based root filesystem to work properly" + exit 1 + fi + # Check for appropriate filesystem support (for fsck) + FSTYPE=$(echo $ROOTFS | awk '{print $3}') + if ! type fsck.$FSTYPE >/dev/null 2>&1; then + echo "You must have utility package for $FSTYPE filesystem installed for LVM based root filesystem to work properly (fsck.$FSTYPE is missing)" + exit 1 + fi + # Change the current GRUB_DEVICE from LABEL=(cloud)img-rootfs to /dev/mapper/... + sed -i -e "s?^GRUB_DEVICE=.*?GRUB_DEVICE=$(echo $ROOTFS | awk '{print $1}')?" /etc/default/grub + # This is required for LVM2 driver to be included in the + # ramdisk of the image. + echo "lvm2" >> /etc/initramfs-tools/modules + # We need to regenerated the init ramdisk at this point + update-initramfs -u -v + fi +fi + +$GRUB_MKCONFIG diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/lvm/package-installs.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/lvm/package-installs.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/lvm/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/lvm/package-installs.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,2 @@ +lvm2: +initramfs-tools: diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/lvm/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/lvm/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/lvm/README.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/lvm/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,15 @@ +===== +lvm +===== +This is the LVM support element for Ubuntu Xenial. + +Note that this element requires initramfs-tools and lvm2 +packages to be added to the DIB image using -p option. +If this is not the case, an error will be triggered. + +This element enables that an image build with a customized +DIB_BLOCK_DEVICE_CONFIG containing LVM volumes will boot +properly. + +On CentOS like distributions, you should use dracut-regenerate +element instead of current lvm element. diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/lvm/root.d/10-lvm-check-distro python-diskimage-builder-2.17.0/diskimage_builder/elements/lvm/root.d/10-lvm-check-distro --- python-diskimage-builder-2.11.0/diskimage_builder/elements/lvm/root.d/10-lvm-check-distro 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/lvm/root.d/10-lvm-check-distro 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +if [ 'ubuntu' != $DISTRO_NAME ]; then + echo "Only ubuntu is supported for LVM support. The DISTRO is set to $DISTRO_NAME" + exit 1 +fi + +if [ 'xenial' != $DIB_RELEASE ]; then + echo "Only xenial is supported for LVM support. The DIB_RELEASE is set to $DIB_RELEASE" + exit 1 +fi diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/modprobe/extra-data.d/50-modprobe-blacklist python-diskimage-builder-2.17.0/diskimage_builder/elements/modprobe/extra-data.d/50-modprobe-blacklist --- python-diskimage-builder-2.11.0/diskimage_builder/elements/modprobe/extra-data.d/50-modprobe-blacklist 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/modprobe/extra-data.d/50-modprobe-blacklist 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/modprobe/install.d/80-modprobe-blacklist python-diskimage-builder-2.17.0/diskimage_builder/elements/modprobe/install.d/80-modprobe-blacklist --- python-diskimage-builder-2.11.0/diskimage_builder/elements/modprobe/install.d/80-modprobe-blacklist 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/modprobe/install.d/80-modprobe-blacklist 2018-09-13 04:28:23.000000000 +0000 @@ -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:-""} + +for mod_name in $MODULES_LIST; do + echo "blacklist $mod_name" >> /etc/modprobe.d/blacklist.conf +done diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/modprobe/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/modprobe/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/modprobe/README.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/modprobe/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/modprobe-blacklist/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/modprobe-blacklist/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/modprobe-blacklist/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/modprobe-blacklist/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/openstack-ci-mirrors/root.d/10-apt-disable-gpg python-diskimage-builder-2.17.0/diskimage_builder/elements/openstack-ci-mirrors/root.d/10-apt-disable-gpg --- python-diskimage-builder-2.11.0/diskimage_builder/elements/openstack-ci-mirrors/root.d/10-apt-disable-gpg 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/openstack-ci-mirrors/root.d/10-apt-disable-gpg 2018-09-13 04:28:23.000000000 +0000 @@ -32,6 +32,7 @@ FILE=${APT_DIR}/99unauthenticated sudo dd of=${FILE} < %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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/pip-and-virtualenv/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/pip-and-virtualenv/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/pip-and-virtualenv/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/pip-and-virtualenv/element-deps 2018-09-13 04:28:23.000000000 +0000 @@ -1,4 +1,5 @@ dib-python +epel install-types package-installs source-repositories diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip python-diskimage-builder-2.17.0/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip --- python-diskimage-builder-2.11.0/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip 2018-09-13 04:28:23.000000000 +0000 @@ -8,12 +8,38 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel7) ]]; then + # Default packages _do_py3=0 - packages="python-virtualenv python-pip python-setuptools" - if [[ $DISTRO_NAME =~ (fedora) ]]; then - _do_py3=1 - packages+=" python3-virtualenv python3-pip python3-setuptools" - fi + _extra_repo='' + case "$DISTRO_NAME" in + centos*|rhel7) + # note python2-pip in epel + _extra_repo="--enablerepo=epel" + packages="python-virtualenv python2-pip" + if [[ "$(rpm -q --qf '[%{obsoletes}\n]' python2-setuptools)" == "python-setuptools" ]]; then + # If OpenStack release is installed, then python-setuptools is + # obsoleted by python2-setuptools + packages+=" python2-setuptools" + else + packages+=" python-setuptools" + fi + ;; + fedora) + _do_py3=1 + packages="python2-virtualenv python2-pip python2-setuptools" + packages+=" python3-virtualenv python3-pip python3-setuptools" + ;; + opensuse) + case "$DIB_RELEASE" in + 42*) + packages="python-virtualenv python-pip python-setuptools" + ;; + tumbleweed|15*) + # XXX: python3? + packages="python2-virtualenv python2-pip python2-setuptools" + ;; + esac + esac # force things to happen so our assumptions hold pip_args="-U --force-reinstall" @@ -30,36 +56,49 @@ if [[ $DISTRO_NAME = opensuse ]]; then zypper -n install $packages else - ${YUM:-yum} install -y $packages + ${YUM:-yum} ${_extra_repo} install -y $packages fi + # pip10 (unlike earlier versions) will not uninstall distutils + # installed packages (note this is only a subset of packages that + # don't use setuptools for various reasons). We give it a little + # help by clearing out the files from the packages we are about to + # re-install so pip doesn't think anything is installed. See: + # https://github.com/pypa/pip/issues/4805 + for pkg in $packages; do + rpm -ql $pkg | xargs rm -rf + done + # install the latest python2 pip; this overwrites packaged pip python /tmp/get-pip.py ${pip_args} - # pip and setuptools are closely related; we want to ensure the - # latest for sanity. Because distro packages don't include enough - # info in the egg for pip to be certain it has fully uninstalled - # the old package, for safety we clear it out by hand (this seems - # to have been a problem with very old to new updates, - # e.g. centos6 to current-era, but less so for smaller jumps). - # There is a bit of chicken-and-egg problem with pip in that it - # requires setuptools for some operations, such as wheel creation. - # But just installing setuptools shouldn't require setuptools - # itself, so we are safe for this small section. - rm -rf /usr/lib/python2.7/site-packages/setuptools* + # Install latest setuptools; there is a slight chicken-egg issue in + # that pip requires setuptools for some operations like building a + # wheel. But this simple install should be fine. pip install ${pip_args} setuptools if [[ $_do_py3 -eq 1 ]]; then # Repeat above for python3 + + # python2 on fedora always installs into /usr/bin. Move pip2 + # binary out, as we want "pip" in the final image to be + # python2 for historical reasons. + mv /usr/bin/pip /usr/bin/pip2 + # You would think that installing python3 bits first, then # python2 would work -- alas get-pip.py doesn't seem to leave # python3 alone: # https://github.com/pypa/pip/issues/4435 python3 /tmp/get-pip.py ${pip_args} - rm -rf /usr/lib/python3.?/site-packages/setuptools* pip3 install ${pip_args} setuptools - # reclaim /usr/bin/pip back to pip2 + + # on < 27, this installed pip3 to /usr/bin/pip. On >=27 it's + # /usr/local/bin/pip. reclaim /usr/bin/pip back to pip2 and + # remove the /usr/local/bin/pip (i.e. python3 version) if it + # exists, so that "pip" calls pip2 always. if we want pip3 we + # call it explicitly. ln -sf /usr/bin/pip2 /usr/bin/pip + rm -f /usr/local/bin/pip fi # now install latest virtualenv. it vendors stuff it needs so @@ -67,14 +106,27 @@ # python[2|3]-virtualenv package has installed versioned scripts # (/usr/bin/virtualenv-[2|3]) but upstream does not! (see [2]). - # For consistency, clear them out and then reinstall so we're just - # left with python2's version - # [2] http://pkgs.fedoraproject.org/cgit/rpms/python-virtualenv.git/tree/python-virtualenv.spec#n116) - rm /usr/bin/virtualenv* + # For consistency, reinstall so we're just left with python2's + # version. Note this is a rather moot point, the usual way we get + # a python3 environment is to call "virtualenv -p python3 foo" and + # that works to create a python3 virtualenv, even if using + # python2's version. Thus we probably don't *really* need to + # "pip3 install virtualenv". What we don't want is "virtualenv + # foo" creating a python3 virtualenv by default, because that + # confuses a lot of legacy code. + # + #[2] http://pkgs.fedoraproject.org/cgit/rpms/python-virtualenv.git/tree/python-virtualenv.spec#n116) + pip install ${pip_args} virtualenv + mv /usr/bin/virtualenv /usr/bin/virtualenv2 if [[ $_do_py3 -eq 1 ]]; then pip3 install ${pip_args} virtualenv fi - pip install ${pip_args} virtualenv + + # Reclaim virtualenv to virtualenv2; similar to above, on fedora + # >27 the pip3 version has gone into /usr/local/bin; remove it so + # only /usr/bin/virtualenv exists + ln -sf /usr/bin/virtualenv2 /usr/bin/virtualenv + rm -f /usr/local/bin/virtualenv # at this point, we should have the latest # pip/setuptools/virtualenv packages for python2 & 3, and @@ -110,12 +162,13 @@ # pre-install packages so dependencies are there. We will # overwrite with latest below. packages="python-pip python3-pip python-virtualenv" - # unfortunately older ubuntu (trusty) doesn't have a + + # Unfortunately older ubuntu (trusty) doesn't have a # python3-virtualenv package -- it seems it wasn't ready at the # time and you had to use "python -m venv". Since then virtualenv # has gained 3.4 support so the pip install below will work if [[ ${DIB_PYTHON_VERSION} == 3 ]]; then - packages=$(echo "$packages" | sed s/python-virtualenv/python3-virtualenv/) + packages+=" python3-virtualenv" fi apt-get -y install $packages diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/pip-and-virtualenv/post-install.d/89-clean-up-pip-cache python-diskimage-builder-2.17.0/diskimage_builder/elements/pip-and-virtualenv/post-install.d/89-clean-up-pip-cache --- python-diskimage-builder-2.11.0/diskimage_builder/elements/pip-and-virtualenv/post-install.d/89-clean-up-pip-cache 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/pip-and-virtualenv/post-install.d/89-clean-up-pip-cache 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +# TODO(johnsom) Fix this when https://github.com/pypa/pip/issues/4685 is +# available. +if [ "${DIB_DISABLE_PIP_CLEANUP:-0}" != "1" ]; then + rm -rf ~/.cache/pip +fi diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/proliant-tools/package-installs.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/proliant-tools/package-installs.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/proliant-tools/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/proliant-tools/package-installs.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -2,3 +2,4 @@ gcc: python-dev: unzip: +net-tools: diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/proliant-tools/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/proliant-tools/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/proliant-tools/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/proliant-tools/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -29,6 +29,6 @@ in the above link. This utility is closed source and is released with `HPE End User License Agreement – Enterprise Version`_. -.. _`proliantutils`: https://pypi.python.org/pypi/proliantutils +.. _`proliantutils`: https://pypi.org/project/proliantutils .. _`HPE Smart Storage Administrator (HPE SSA) CLI for Linux 64-bit`: http://h20564.www2.hpe.com/hpsc/swd/public/detail?swItemId=MTX_5530b3f5b38b4e0781e6bf9c74 .. _`HPE End User License Agreement – Enterprise Version`: https://downloads.hpe.com/pub/softlib2/software1/doc/p1796552785/v113125/eula-en.html diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/redhat-common/bin/map-packages python-diskimage-builder-2.17.0/diskimage_builder/elements/redhat-common/bin/map-packages --- python-diskimage-builder-2.11.0/diskimage_builder/elements/redhat-common/bin/map-packages 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/redhat-common/bin/map-packages 2018-09-13 04:28:23.000000000 +0000 @@ -61,6 +61,7 @@ 'mysql-client-5.5': 'mariadb', 'mysql-server-5.5': 'mariadb-server', 'nagios-plugins-basic': 'nagios-plugins-all', + 'netcat-openbsd': 'nmap-ncat', 'nfs-common': 'nfs-utils', 'nfs-kernel-server': 'nfs-utils', 'open-iscsi': 'iscsi-initiator-utils', diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/redhat-common/package-installs.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/redhat-common/package-installs.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/redhat-common/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/redhat-common/package-installs.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -6,6 +6,7 @@ which: gettext: phase: pre-install.d +ca-certificates: # selinux-targeted policy and related tools selinux-policy: diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration python-diskimage-builder-2.17.0/diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration --- python-diskimage-builder-2.11.0/diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration 2018-09-13 04:28:23.000000000 +0000 @@ -23,6 +23,7 @@ REG_RELEASE="$(os-apply-config --key rh_registration.release --type raw --key-default '')" REG_REPOS="$(os-apply-config --key rh_registration.repos --type raw --key-default '')" REG_SAT_URL="$(os-apply-config --key rh_registration.satellite_url --type raw --key-default '')" +REG_SAT_CERT="$(os-apply-config --key rh_registration.satellite_cert --type raw --key-default '')" REG_SERVER_URL="$(os-apply-config --key rh_registration.server_url --type raw --key-default '')" REG_SERVICE_LEVEL="$(os-apply-config --key rh_registration.service_level --type raw --key-default '')" REG_USER="$(os-apply-config --key rh_registration.user --type raw --key-default '')" @@ -33,6 +34,7 @@ attach_opts= repos="repos --enable rhel-7-server-rpms" satellite_repo="rhel-7-server-rh-common-rpms" +REG_SAT_CERT=${REG_SAT_CERT:-"katello-ca-consumer-latest.noarch.rpm"} if [ -n "${REG_AUTO_ATTACH:-}" ]; then opts="$opts --auto-attach" @@ -128,7 +130,7 @@ 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 + rpm -Uvh "$REG_SAT_URL/pub/$REG_SAT_CERT" || true echo "Registering with options: $sanitized_opts" subscription-manager register $opts echo "Disabling all previous repos" diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration python-diskimage-builder-2.17.0/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration --- python-diskimage-builder-2.11.0/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration 2018-09-13 04:28:23.000000000 +0000 @@ -11,6 +11,7 @@ attach_opts= repos="repos --enable rhel-7-server-rpms" satellite_repo="rhel-7-server-rh-common-rpms" +REG_SAT_CERT=${REG_SAT_CERT:-"katello-ca-consumer-latest.noarch.rpm"} if [ -n "${REG_AUTO_ATTACH:-}" ]; then opts="$opts --auto-attach" @@ -107,7 +108,7 @@ 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 + rpm -Uvh "$REG_SAT_URL/pub/$REG_SAT_CERT" || true echo "Registering with options: $sanitized_opts" subscription-manager register $opts echo "Disabling all previous repos" diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/rhel-common/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/rhel-common/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/rhel-common/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/rhel-common/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -210,6 +210,10 @@ # system with the Red Hat Customer Portal. Use "satellite" to # register a system with Red Hat Satellite 6. Use "disable" to # skip the registration process. + satellite_cert: + # Defines the ssl certificate to be installed when using "satellite" + # as register mechanism. Default values of this is + # "katello-ca-consumer-latest.noarch.rpm". Configuration Registration Examples ------------------------------------ diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore python-diskimage-builder-2.17.0/diskimage_builder/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore --- python-diskimage-builder-2.11.0/diskimage_builder/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore 2018-09-13 04:28:23.000000000 +0000 @@ -65,7 +65,11 @@ 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 + if ! pgrep kauditd >/dev/null; then + echo "*** kauditd not found, suggesting auditing support is disabled in the host kernel. setfiles will fail without this, please enable and rebuild" + exit 1 + fi sudo ${_runcon} chroot ${TARGET_ROOT} \ /usr/sbin/setfiles -F ${_dash_m} \ /etc/selinux/targeted/contexts/files/file_contexts ${MOUNTPOINT} diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch python-diskimage-builder-2.17.0/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch --- python-diskimage-builder-2.11.0/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch 2018-09-13 04:28:23.000000000 +0000 @@ -28,7 +28,7 @@ exit 1 fi -if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then +if [[ $DISTRO_NAME == "fedora" ]]; then mkdir -p /etc/dnf/vars echo $basearch > /etc/dnf/vars/basearch echo $arch > /etc/dnf/vars/arch @@ -36,3 +36,12 @@ echo $basearch > /etc/yum/vars/basearch echo $arch > /etc/yum/vars/arch fi + +if [[ ${DISTRO_NAME} =~ "centos" ]]; then + if [[ ${arch} == "x86_64" ]]; then + contentdir=centos + else + contentdir=altarch + fi + echo $contentdir > /etc/yum/vars/contentdir +fi diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces python-diskimage-builder-2.17.0/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces --- python-diskimage-builder-2.11.0/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu/root.d/10-cache-ubuntu-tarball python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu/root.d/10-cache-ubuntu-tarball --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu/root.d/10-cache-ubuntu-tarball 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu/root.d/10-cache-ubuntu-tarball 2018-09-13 04:28:23.000000000 +0000 @@ -12,10 +12,14 @@ shopt -s extglob -DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud-images.ubuntu.com} DIB_RELEASE=${DIB_RELEASE:-trusty} -BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-$DIB_RELEASE-server-cloudimg-$ARCH-root.tar.gz} -SHA256SUMS=${SHA256SUMS:-https://${DIB_CLOUD_IMAGES##http?(s)://}/$DIB_RELEASE/current/SHA256SUMS} +DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud-images.ubuntu.com/$DIB_RELEASE/current} +if [ $DIB_RELEASE != "trusty" ] && [ $DIB_RELEASE != "xenial" ]; then + BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-$DIB_RELEASE-server-cloudimg-$ARCH.squashfs} +else + BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-$DIB_RELEASE-server-cloudimg-$ARCH-root.tar.gz} +fi +SHA256SUMS=${SHA256SUMS:-https://${DIB_CLOUD_IMAGES##http?(s)://}/SHA256SUMS} CACHED_FILE=$DIB_IMAGE_CACHE/$BASE_IMAGE_FILE CACHED_FILE_LOCK=$DIB_LOCKFILES/$BASE_IMAGE_FILE.lock CACHED_SUMS=$DIB_IMAGE_CACHE/SHA256SUMS.ubuntu.$DIB_RELEASE.$ARCH @@ -27,7 +31,7 @@ echo "Fetching Base Image" $TMP_HOOKS_PATH/bin/cache-url $SHA256SUMS $CACHED_SUMS $TMP_HOOKS_PATH/bin/cache-url \ - $DIB_CLOUD_IMAGES/$DIB_RELEASE/current/$BASE_IMAGE_FILE $CACHED_FILE + $DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE $CACHED_FILE pushd $DIB_IMAGE_CACHE if ! grep "$BASE_IMAGE_FILE" $CACHED_SUMS | sha256sum --check - ; then # It is likely that an upstream http(s) proxy has given us a skewed @@ -39,7 +43,7 @@ $TMP_HOOKS_PATH/bin/cache-url -f $SHA256SUMS $CACHED_SUMS if ! grep "$BASE_IMAGE_FILE" $CACHED_SUMS | sha256sum --check - ; then $TMP_HOOKS_PATH/bin/cache-url -f \ - $DIB_CLOUD_IMAGES/$DIB_RELEASE/current/$BASE_IMAGE_FILE $CACHED_FILE + $DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE $CACHED_FILE grep "$BASE_IMAGE_FILE" $CACHED_SUMS | sha256sum --check - fi fi @@ -47,7 +51,11 @@ fi # Extract the base image (use --numeric-owner to avoid UID/GID mismatch between # image tarball and host OS e.g. when building Ubuntu image on an openSUSE host) - sudo tar -C $TARGET_ROOT --numeric-owner -xzf $DIB_IMAGE_CACHE/$BASE_IMAGE_FILE + if [ $DIB_RELEASE != "trusty" ] && [ $DIB_RELEASE != "xenial" ]; then + sudo unsquashfs -f -d $TARGET_ROOT $DIB_IMAGE_CACHE/$BASE_IMAGE_FILE + else + sudo tar -C $TARGET_ROOT --numeric-owner -xzf $DIB_IMAGE_CACHE/$BASE_IMAGE_FILE + fi } ( diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/element-deps 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/element-deps 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,4 @@ +block-device-mbr +openstack-ci-mirrors +vm + diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/environment.d/10-set-distro.bash python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/environment.d/10-set-distro.bash --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/environment.d/10-set-distro.bash 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/environment.d/10-set-distro.bash 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +export DIB_RELEASE=bionic diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/README.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,4 @@ +Verify we can build a ubuntu image. + +Note this test includes the vm element to test the bootloader install, +and specifies to output a .qcow2 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/test-output-formats python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/test-output-formats --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/test-output-formats 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/test-output-formats 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +tar,qcow2 \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu/test-elements/xenial-build-succeeds/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu/test-elements/xenial-build-succeeds/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu/test-elements/xenial-build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu/test-elements/xenial-build-succeeds/element-deps 2018-09-13 04:28:23.000000000 +0000 @@ -1,2 +1,4 @@ +block-device-mbr openstack-ci-mirrors vm + diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-core/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-core/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-core/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-core/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -cache-url -dpkg -ubuntu-common diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-core/element-provides python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-core/element-provides --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-core/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-core/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -operating-system diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-core/environment.d/10-ubuntu-distro-name.bash python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-core/environment.d/10-ubuntu-distro-name.bash --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-core/environment.d/10-ubuntu-distro-name.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-core/environment.d/10-ubuntu-distro-name.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DISTRO_NAME=ubuntu diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-core/package-installs.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-core/package-installs.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-core/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-core/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -apt-xapian-index: - phase: pre-install.d - uninstall: True diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-core/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-core/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-core/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-core/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -=========== -ubuntu-core -=========== -Use Ubuntu Core cloud images as the baseline for built disk images. - -Overrides: - - * To use a non-default URL for downloading base Ubuntu cloud images, - use the environment variable DIB\_CLOUD\_IMAGES - * To download a non-default release of Ubuntu cloud images, use the - environment variable DIB\_RELEASE - * To use different mirrors rather than the default of archive.ubuntu.com and - security.ubuntu.com, use the environment variable DIB\_DISTRIBUTION\_MIRROR - -.. element_deps:: diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-core/root.d/10-cache-ubuntu-image python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-core/root.d/10-cache-ubuntu-image --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-core/root.d/10-cache-ubuntu-image 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-core/root.d/10-cache-ubuntu-image 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -#!/bin/bash -# These are useful, or at worst not harmful, for all images we build. - -# dib-lint: disable=safe_sudo - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$ARCH" ] -[ -n "$TARGET_ROOT" ] - -shopt -s extglob - -DIB_RELEASE=${DIB_RELEASE:-trusty} - -declare -A release_numbers -release_numbers[trusty]=14.04 -release_numbers[vivid]=15.04 -release_numbers[wily]=15.10 -release_numbers[xenial]=16.04 -release_numbers[yakkety]=16.10 -release_numbers[zesty]=17.04 - -numeric_release=${release_numbers[$DIB_RELEASE]} -DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cdimage.ubuntu.com/ubuntu-core/releases/$numeric_release/release} -BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-ubuntu-core-$numeric_release-core-$ARCH.tar.gz} -SHA256SUMS=${SHA256SUMS:-$DIB_CLOUD_IMAGES/SHA256SUMS} -CACHED_FILE=$DIB_IMAGE_CACHE/$BASE_IMAGE_FILE -CACHED_FILE_LOCK=$DIB_LOCKFILES/$BASE_IMAGE_FILE.lock -CACHED_SUMS=$DIB_IMAGE_CACHE/SHA256SUMS.ubuntu-core.$DIB_RELEASE.$ARCH - -function get_ubuntu_tarball() { - if [ -n "$DIB_OFFLINE" -a -f "$CACHED_FILE" ] ; then - echo "Not checking freshness of cached $CACHED_FILE." - else - echo "Fetching Base Image" - $TMP_HOOKS_PATH/bin/cache-url $SHA256SUMS $CACHED_SUMS - $TMP_HOOKS_PATH/bin/cache-url \ - $DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE $CACHED_FILE - pushd $DIB_IMAGE_CACHE - if ! grep "$BASE_IMAGE_FILE" $CACHED_SUMS | sha256sum --check - ; then - # It is likely that an upstream http(s) proxy has given us a skewed - # result - either a cached SHA file or a cached image. Use cache-busting - # to get (as long as caches are compliant...) fresh files. - # Try the sha256sum first, just in case that is the stale one (avoiding - # downloading the larger image), and then if the sums still fail retry - # the image. - $TMP_HOOKS_PATH/bin/cache-url -f $SHA256SUMS $CACHED_SUMS - if ! grep "$BASE_IMAGE_FILE" $CACHED_SUMS | sha256sum --check - ; then - $TMP_HOOKS_PATH/bin/cache-url -f \ - $DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE $CACHED_FILE - grep "$BASE_IMAGE_FILE" $CACHED_SUMS | sha256sum --check - - fi - fi - popd - fi - # Extract the base image (use --numeric-owner to avoid UID/GID mismatch between - # image tarball and host OS e.g. when building Ubuntu image on an openSUSE host) - sudo tar -C $TARGET_ROOT --numeric-owner -xzf $DIB_IMAGE_CACHE/$BASE_IMAGE_FILE -} - -( - echo "Getting $CACHED_FILE_LOCK: $(date)" - # Wait up to 20 minutes for another process to download - if ! flock -w 1200 9 ; then - echo "Did not get $CACHED_FILE_LOCK: $(date)" - exit 1 - fi - get_ubuntu_tarball -) 9> $CACHED_FILE_LOCK diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/package-installs.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/package-installs.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/package-installs.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -1,2 +1,9 @@ linux-image-generic: + not-arch: arm64 +# TODO(ianw): this is Xenial specific, for now. This kernel works +# much better, however, including better support for cdrom's for +# config-drive. We'll need to filter this further for future +# releases; maybe add a $DIB_RELEASE filter too? +linux-generic-hwe-16.04: + arch: arm64 initramfs-tools: diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/element-deps 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/element-deps 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,3 @@ +block-device-mbr +openstack-ci-mirrors +vm diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/environment.d/10-set-distro.bash python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/environment.d/10-set-distro.bash --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/environment.d/10-set-distro.bash 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/environment.d/10-set-distro.bash 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +export DIB_RELEASE=bionic diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/README.rst python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/README.rst --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/README.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/README.rst 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,4 @@ +Verify we can build a ubuntu-minimal image. + +Note this test includes the vm element to test the bootloader install, +and specifies to output a .qcow2 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/test-output-formats python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/test-output-formats --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/test-output-formats 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/test-output-formats 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1 @@ +tar,qcow2 \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/element-deps 2018-09-13 04:28:23.000000000 +0000 @@ -1,2 +1,3 @@ +block-device-mbr openstack-ci-mirrors vm diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/vm/block-device-default.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/vm/block-device-default.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/vm/block-device-default.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/vm/block-device-default.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -# Default single partition loopback - -- local_loop: - name: image0 - -- partitioning: - base: image0 - label: mbr - partitions: - - name: root - flags: [ boot, primary ] - size: 100% - mkfs: - mount: - mount_point: / - fstab: - options: "defaults" - fsck-passno: 1 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/vm/block-device-ppc64el.yaml python-diskimage-builder-2.17.0/diskimage_builder/elements/vm/block-device-ppc64el.yaml --- python-diskimage-builder-2.11.0/diskimage_builder/elements/vm/block-device-ppc64el.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/vm/block-device-ppc64el.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -# Default block device setup for PPC -# ---------------------------------- -# -# Details (extracted from [1]) -# -# Power Firmware (OFW) scans chosen (nvram value boot-device) device, -# for either PReP* partition or vfat. -# -# PReP is raw and small (8M max) partition which caries only stage1 -# binary. -# msdos partition table: -# - PReP partition have 0x41 type (must be active) -# - PReP partition must have boot flag set -# -# [1] https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/W51a7ffcf4dfd_4b40_9d82_446ebc23c550/page/PowerLinux%20Boot%20howto - -- local_loop: - name: image0 - -- partitioning: - base: image0 - label: mbr - partitions: - - name: boot - flags: [ boot, primary ] - type: '0x41' - size: 8MiB - - name: root - flags: [ primary ] - size: 100% - mkfs: - mount: - mount_point: / - fstab: - options: "defaults" - fsck-passno: 1 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/vm/element-deps python-diskimage-builder-2.17.0/diskimage_builder/elements/vm/element-deps --- python-diskimage-builder-2.11.0/diskimage_builder/elements/vm/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/vm/element-deps 2018-09-13 04:28:23.000000000 +0000 @@ -1 +1,2 @@ +block-device bootloader diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot python-diskimage-builder-2.17.0/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot --- python-diskimage-builder-2.11.0/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot 2018-09-13 04:28:23.000000000 +0000 @@ -51,7 +51,7 @@ ZYPPER_REPOS+="oss=>${DIB_DISTRIBUTION_MIRROR}/distribution/${DIB_RELEASE}/repo/oss/" ;; # New Leap releases - 42*) + 42*|15*) ZYPPER_REPOS="update=>${DIB_DISTRIBUTION_MIRROR}/update/leap/${DIB_RELEASE}/oss/ " ZYPPER_REPOS+="oss=>${DIB_DISTRIBUTION_MIRROR}/distribution/leap/${DIB_RELEASE}/repo/oss/" ;; @@ -111,10 +111,13 @@ sudo tee $TARGET_ROOT/etc/resolv.conf # set the most reliable UTF-8 locale -echo -e 'LANG="en_US.UTF-8"' | \ +default_lang="C.UTF-8" +sudo sed -i -e "s,^RC_LANG=.*,RC_LANG=\"$default_lang\"," \ + $TARGET_ROOT/etc/sysconfig/language +echo -e "LANG=\"$default_lang\"" | \ sudo tee $TARGET_ROOT/etc/locale.conf # default to UTC -sudo chroot $TARGET_ROOT ln -sf /usr/share/zoneinfo/UTC \ +sudo chroot $TARGET_ROOT ln -sf /usr/share/zoneinfo/Etc/UTC \ /etc/localtime # RPM doesn't know whether files have been changed since install diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/lib/common-functions python-diskimage-builder-2.17.0/diskimage_builder/lib/common-functions --- python-diskimage-builder-2.11.0/diskimage_builder/lib/common-functions 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/lib/common-functions 2018-09-13 04:28:23.000000000 +0000 @@ -239,9 +239,52 @@ check_break after-$1 bash } +function _arg_defaults_hack() { + # The block-device configuration looks in all elements for a + # "block-device-default.yaml" file. The "vm" element used to + # provide the default block-device, which was fine when there was + # only one option; but now we have mbr, gpt & efi versions. + # + # So now the vm element has a dependency on the block-device + # element, which several different elements can provide. However, + # for backwards compatability we need to ensure you can still + # build without specifying it. Thus if we see the vm element, but + # no block-device-* element, we will automatically add the old + # default MBR. + # + # Note that you can still override this by setting + # DIB_BLOCK_DEVICE_CONFIG; any value there will be taken over the + # element defaults. In this case you'd have "block-device-mbr" as + # an element, but it wouldn't actually be used for configuration. + # + # XXX: if this is becoming a common problem, we could have some + # sort of "element-defaults" that maps a "element-deps" entry to a + # default. + local vm_seen + local blockdev_seen + local elements + + for arg do + if [[ "$arg" =~ "vm" ]]; then + vm_seen=1 + elif [[ "$arg" =~ "block-device-" ]]; then + blockdev_seen=1 + fi + elements="$elements $arg" + done + + if [[ -n "${vm_seen}" && -z "${blockdev_seen}" ]]; then + elements="$elements block-device-mbr" + fi + + echo $elements +} + function arg_to_elements() { for arg do IMAGE_ELEMENT="$IMAGE_ELEMENT $arg" ; done + IMAGE_ELEMENT="$(_arg_defaults_hack $IMAGE_ELEMENT)" + if [ "$SKIP_BASE" != "1" ]; then IMAGE_ELEMENT="base $IMAGE_ELEMENT" fi @@ -295,7 +338,12 @@ fi # Configure Image - # Setup resolv.conf so we can chroot to install some packages + + # Save resolv.conf as created by the initial install. Note the + # .ORIG file is an exported interface -- it may be modified and we + # will copy it back in during finalisation of the image. + # Note that we use -L and -f to test here as test (and bash [[) + # return false with -e if the link target does not exist. if [ -L $TMP_MOUNT_PATH/etc/resolv.conf ] || [ -f $TMP_MOUNT_PATH/etc/resolv.conf ] ; then sudo mv $TMP_MOUNT_PATH/etc/resolv.conf $TMP_MOUNT_PATH/etc/resolv.conf.ORIG fi @@ -394,11 +442,13 @@ if [[ ${DIB_BLOCK_DEVICE_CONFIG:-} == file://* ]]; then cp $(echo ${DIB_BLOCK_DEVICE_CONFIG} | cut -c 8-) ${config_yaml} echo "Using file-based block-device config: ${DIB_BLOCK_DEVICE_CONFIG}" + $xtrace return fi if [ -n "${DIB_BLOCK_DEVICE_CONFIG:-}" ]; then printf "%s" "${DIB_BLOCK_DEVICE_CONFIG}" >${config_yaml} echo "User specified block-device config from DIB_BLOCK_DEVICE_CONFIG" + $xtrace return fi @@ -420,12 +470,14 @@ if [ -e ${cfg} ]; then cp ${cfg} ${config_yaml} echo "Using block-device config: ${cfg}" + $xtrace return else cfg=${image_elements[$i]}/block-device-default.yaml if [ -e ${cfg} ]; then cp ${cfg} ${config_yaml} echo "Using block-device config: ${cfg}" + $xtrace return fi fi diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/lib/disk-image-create python-diskimage-builder-2.17.0/diskimage_builder/lib/disk-image-create --- python-diskimage-builder-2.11.0/diskimage_builder/lib/disk-image-create 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/lib/disk-image-create 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/lib/img-functions python-diskimage-builder-2.17.0/diskimage_builder/lib/img-functions --- python-diskimage-builder-2.11.0/diskimage_builder/lib/img-functions 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/lib/img-functions 2018-09-13 04:28:23.000000000 +0000 @@ -93,6 +93,13 @@ function finalise_base () { TARGET_ROOT=$TMP_MOUNT_PATH run_d cleanup + + # Finalise resolv.conf + # + # NOTE(ianw): the /etc/resolv.conf.ORIG file is an + # external interface; elements might put a resolv.conf they + # want in the final image into this file. + # # In create_base() we replaced/created the initial resolv.conf # inside the image with a copy of the "outside" version so that # resolving during the build will work. @@ -106,13 +113,16 @@ # so remove the old saved file sudo rm -f $TMP_MOUNT_PATH/etc/resolv.conf.ORIG else - # Remove the resolv.conf we created above + # Remove the resolv.conf we created and put the original (or + # perhaps modified) version back. sudo rm -f $TMP_MOUNT_PATH/etc/resolv.conf - # Move the original back + # Note that we use -L and -f to test here as test (and bash [[) + # return false with -e if the link target does not exist. if [ -L $TMP_MOUNT_PATH/etc/resolv.conf.ORIG ] || [ -f $TMP_MOUNT_PATH/etc/resolv.conf.ORIG ] ; then sudo mv $TMP_MOUNT_PATH/etc/resolv.conf.ORIG $TMP_MOUNT_PATH/etc/resolv.conf fi fi + # Cleanup /tmp in the guest, so there is less cruft left there unmount_dir $TMP_MOUNT_PATH/tmp find $TMP_MOUNT_PATH/tmp -maxdepth 1 -mindepth 1 | xargs sudo rm -rf --one-file-system diff -Nru python-diskimage-builder-2.11.0/diskimage_builder/lib/outfilter.py python-diskimage-builder-2.17.0/diskimage_builder/lib/outfilter.py --- python-diskimage-builder-2.11.0/diskimage_builder/lib/outfilter.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/lib/outfilter.py 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/lib/ramdisk-image-create python-diskimage-builder-2.17.0/diskimage_builder/lib/ramdisk-image-create --- python-diskimage-builder-2.11.0/diskimage_builder/lib/ramdisk-image-create 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/lib/ramdisk-image-create 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/diskimage_builder/tests/test_elementdeps.py python-diskimage-builder-2.17.0/diskimage_builder/tests/test_elementdeps.py --- python-diskimage-builder-2.11.0/diskimage_builder/tests/test_elementdeps.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder/tests/test_elementdeps.py 2018-09-13 04:28:23.000000000 +0000 @@ -68,6 +68,10 @@ [], ['virtual']) _populate_element(self.element_dir, + 'also_provides_virtual', + [], + ['virtual']) + _populate_element(self.element_dir, 'requires_virtual', ['virtual'], ['operating-system']) @@ -168,6 +172,14 @@ [self._e('requires_new_virtual'), self._e('provides_new_virtual')], result) + def test_elements_provide_same(self): + msg = "virtual: already provided by \['provides_virtual'\]" + self.assertRaisesRegex(element_dependencies.AlreadyProvidedException, + msg, + element_dependencies.get_elements, + ['provides_virtual', 'also_provides_virtual'], + self.element_dirs) + def test_no_os_element(self): self.assertRaises(element_dependencies.MissingOSException, element_dependencies.get_elements, diff -Nru python-diskimage-builder-2.11.0/diskimage_builder.egg-info/dependency_links.txt python-diskimage-builder-2.17.0/diskimage_builder.egg-info/dependency_links.txt --- python-diskimage-builder-2.11.0/diskimage_builder.egg-info/dependency_links.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder.egg-info/dependency_links.txt 2018-09-13 04:30:23.000000000 +0000 @@ -0,0 +1 @@ + diff -Nru python-diskimage-builder-2.11.0/diskimage_builder.egg-info/entry_points.txt python-diskimage-builder-2.17.0/diskimage_builder.egg-info/entry_points.txt --- python-diskimage-builder-2.11.0/diskimage_builder.egg-info/entry_points.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder.egg-info/entry_points.txt 2018-09-13 04:30:23.000000000 +0000 @@ -0,0 +1,18 @@ +[console_scripts] +dib-block-device = diskimage_builder.block_device.cmd:main +disk-image-create = diskimage_builder.disk_image_create:main +element-info = diskimage_builder.element_dependencies:main +ramdisk-image-create = diskimage_builder.disk_image_create:main + +[diskimage_builder.block_device.plugin] +fstab = diskimage_builder.block_device.level4.fstab:Fstab +local_loop = diskimage_builder.block_device.level0.localloop:LocalLoop +lvm = diskimage_builder.block_device.level1.lvm:LVMPlugin +mkfs = diskimage_builder.block_device.level2.mkfs:Mkfs +mount = diskimage_builder.block_device.level3.mount:Mount +partitioning = diskimage_builder.block_device.level1.partitioning:Partitioning + +[diskimage_builder.block_device.plugin_test] +test_a = diskimage_builder.block_device.tests.plugin.test_a:TestA +test_b = diskimage_builder.block_device.tests.plugin.test_b:TestB + diff -Nru python-diskimage-builder-2.11.0/diskimage_builder.egg-info/not-zip-safe python-diskimage-builder-2.17.0/diskimage_builder.egg-info/not-zip-safe --- python-diskimage-builder-2.11.0/diskimage_builder.egg-info/not-zip-safe 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder.egg-info/not-zip-safe 2018-09-13 04:30:05.000000000 +0000 @@ -0,0 +1 @@ + diff -Nru python-diskimage-builder-2.11.0/diskimage_builder.egg-info/pbr.json python-diskimage-builder-2.17.0/diskimage_builder.egg-info/pbr.json --- python-diskimage-builder-2.11.0/diskimage_builder.egg-info/pbr.json 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder.egg-info/pbr.json 2018-09-13 04:30:23.000000000 +0000 @@ -0,0 +1 @@ +{"git_version": "b86af3d", "is_release": true} \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/diskimage_builder.egg-info/PKG-INFO python-diskimage-builder-2.17.0/diskimage_builder.egg-info/PKG-INFO --- python-diskimage-builder-2.11.0/diskimage_builder.egg-info/PKG-INFO 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder.egg-info/PKG-INFO 2018-09-13 04:30:23.000000000 +0000 @@ -0,0 +1,68 @@ +Metadata-Version: 1.1 +Name: diskimage-builder +Version: 2.17.0 +Summary: Golden Disk Image builder. +Home-page: https://docs.openstack.org/diskimage-builder/latest/ +Author: OpenStack +Author-email: openstack-dev@lists.openstack.org +License: Apache License (2.0) +Description: Image building tools for OpenStack + ================================== + + ``diskimage-builder`` is a flexible suite of components for building a + wide-range of disk images, filesystem images and ramdisk images for + use with OpenStack. + + This repository has the core functionality for building such images, + both virtual and bare metal. Images are composed using `elements`; + while fundamental elements are provided here, individual projects have + the flexibility to customise the image build with their own elements. + + For example:: + + $ DIB_RELEASE=trusty disk-image-create -o ubuntu-trusty.qcow2 vm ubuntu + + will create a bootable Ubuntu Trusty based ``qcow2`` image. + + ``diskimage-builder`` is useful to anyone looking to produce + customised images for deployment into clouds. These tools are the + components of `TripleO `__ + that are responsible for building disk images. They are also used + extensively to build images for testing OpenStack itself, particularly + with `nodepool + `__. + Platforms supported include Ubuntu, CentOS, RHEL and Fedora. + + Full documentation, the source of which is in ``doc/source/``, is + published at: + + * https://docs.openstack.org/diskimage-builder/latest/ + + Copyright + ========= + + Copyright 2012 Hewlett-Packard Development Company, L.P. + Copyright (c) 2012 NTT DOCOMO, INC. + + All Rights Reserved. + + 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. + + +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Operating System :: POSIX :: Linux +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Environment :: Console diff -Nru python-diskimage-builder-2.11.0/diskimage_builder.egg-info/requires.txt python-diskimage-builder-2.17.0/diskimage_builder.egg-info/requires.txt --- python-diskimage-builder-2.11.0/diskimage_builder.egg-info/requires.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder.egg-info/requires.txt 2018-09-13 04:30:23.000000000 +0000 @@ -0,0 +1,7 @@ +Babel!=2.4.0,>=2.3.4 +networkx>=1.10 +pbr!=2.1.0,>=2.0.0 +PyYAML>=3.12 +flake8<2.6.0,>=2.5.4 +six>=1.10.0 +stevedore>=1.20.0 diff -Nru python-diskimage-builder-2.11.0/diskimage_builder.egg-info/SOURCES.txt python-diskimage-builder-2.17.0/diskimage_builder.egg-info/SOURCES.txt --- python-diskimage-builder-2.11.0/diskimage_builder.egg-info/SOURCES.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder.egg-info/SOURCES.txt 2018-09-13 04:30:24.000000000 +0000 @@ -0,0 +1,837 @@ +.testr.conf +AUTHORS +ChangeLog +LICENSE +README.rst +babel.cfg +bindep.txt +lower-constraints.txt +pylint.cfg +requirements.txt +setup.cfg +setup.py +test-requirements.txt +tox.ini +.zuul.d/jobs.yaml +bin/dib-lint +contrib/setup-gate-mirrors.sh +diskimage_builder/__init__.py +diskimage_builder/disk_image_create.py +diskimage_builder/element_dependencies.py +diskimage_builder/logging_config.py +diskimage_builder/paths.py +diskimage_builder/version.py +diskimage_builder.egg-info/PKG-INFO +diskimage_builder.egg-info/SOURCES.txt +diskimage_builder.egg-info/dependency_links.txt +diskimage_builder.egg-info/entry_points.txt +diskimage_builder.egg-info/not-zip-safe +diskimage_builder.egg-info/pbr.json +diskimage_builder.egg-info/requires.txt +diskimage_builder.egg-info/top_level.txt +diskimage_builder/block_device/__init__.py +diskimage_builder/block_device/blockdevice.py +diskimage_builder/block_device/cmd.py +diskimage_builder/block_device/config.py +diskimage_builder/block_device/exception.py +diskimage_builder/block_device/plugin.py +diskimage_builder/block_device/utils.py +diskimage_builder/block_device/level0/__init__.py +diskimage_builder/block_device/level0/localloop.py +diskimage_builder/block_device/level1/__init__.py +diskimage_builder/block_device/level1/lvm.py +diskimage_builder/block_device/level1/mbr.py +diskimage_builder/block_device/level1/partition.py +diskimage_builder/block_device/level1/partitioning.py +diskimage_builder/block_device/level2/__init__.py +diskimage_builder/block_device/level2/mkfs.py +diskimage_builder/block_device/level3/__init__.py +diskimage_builder/block_device/level3/mount.py +diskimage_builder/block_device/level4/__init__.py +diskimage_builder/block_device/level4/fstab.py +diskimage_builder/block_device/tests/__init__.py +diskimage_builder/block_device/tests/test_base.py +diskimage_builder/block_device/tests/test_config.py +diskimage_builder/block_device/tests/test_gpt.py +diskimage_builder/block_device/tests/test_lvm.py +diskimage_builder/block_device/tests/test_mbr.py +diskimage_builder/block_device/tests/test_mkfs.py +diskimage_builder/block_device/tests/test_mount_order.py +diskimage_builder/block_device/tests/test_state.py +diskimage_builder/block_device/tests/test_utils.py +diskimage_builder/block_device/tests/config/bad_edge_graph.yaml +diskimage_builder/block_device/tests/config/bad_plugin.yaml +diskimage_builder/block_device/tests/config/cmd_create.yaml +diskimage_builder/block_device/tests/config/deep_graph.yaml +diskimage_builder/block_device/tests/config/deep_tree.yaml +diskimage_builder/block_device/tests/config/duplicate_fs_labels.yaml +diskimage_builder/block_device/tests/config/duplicate_name.yaml +diskimage_builder/block_device/tests/config/gpt_efi.yaml +diskimage_builder/block_device/tests/config/lvm_graph.yaml +diskimage_builder/block_device/tests/config/lvm_tree.yaml +diskimage_builder/block_device/tests/config/lvm_tree_multiple_partitions.yaml +diskimage_builder/block_device/tests/config/lvm_tree_multiple_pv.yaml +diskimage_builder/block_device/tests/config/lvm_tree_multiple_pv_vg.yaml +diskimage_builder/block_device/tests/config/lvm_tree_partition_ordering.yaml +diskimage_builder/block_device/tests/config/lvm_tree_spanned_vg.yaml +diskimage_builder/block_device/tests/config/multi_key_node.yaml +diskimage_builder/block_device/tests/config/multiple_partitions_graph.yaml +diskimage_builder/block_device/tests/config/multiple_partitions_tree.yaml +diskimage_builder/block_device/tests/config/rollback.yaml +diskimage_builder/block_device/tests/config/simple_graph.yaml +diskimage_builder/block_device/tests/config/simple_tree.yaml +diskimage_builder/block_device/tests/config/too_long_fs_label.yaml +diskimage_builder/block_device/tests/plugin/__init__.py +diskimage_builder/block_device/tests/plugin/test_a.py +diskimage_builder/block_device/tests/plugin/test_b.py +diskimage_builder/elements/apt-conf/README.rst +diskimage_builder/elements/apt-conf/extra-data.d/99-override-default-apt-conf +diskimage_builder/elements/apt-preferences/README.rst +diskimage_builder/elements/apt-preferences/extra-data.d/99-set-apt-package-pins +diskimage_builder/elements/apt-sources/README.rst +diskimage_builder/elements/apt-sources/extra-data.d/99-override-default-apt-sources +diskimage_builder/elements/apt-sources/test-elements/test-sources/element-deps +diskimage_builder/elements/apt-sources/test-elements/test-sources/environment.d/00-set-apt-sources +diskimage_builder/elements/apt-sources/test-elements/test-sources/extra-data.d/00-write-apt-sources +diskimage_builder/elements/apt-sources/test-elements/test-sources/pre-install.d/00-test-apt-sources +diskimage_builder/elements/baremetal/README.rst +diskimage_builder/elements/baremetal/cleanup.d/99-extract-kernel-and-ramdisk +diskimage_builder/elements/base/README.rst +diskimage_builder/elements/base/element-deps +diskimage_builder/elements/base/pkg-map +diskimage_builder/elements/base/install.d/00-baseline-environment +diskimage_builder/elements/base/install.d/00-up-to-date +diskimage_builder/elements/base/install.d/10-cloud-init +diskimage_builder/elements/base/pre-install.d/03-baseline-tools +diskimage_builder/elements/block-device-efi/README.rst +diskimage_builder/elements/block-device-efi/block-device-default.yaml +diskimage_builder/elements/block-device-efi/element-provides +diskimage_builder/elements/block-device-efi/environment.d/15-block-device.bash +diskimage_builder/elements/block-device-gpt/README.rst +diskimage_builder/elements/block-device-gpt/block-device-default.yaml +diskimage_builder/elements/block-device-gpt/block-device-ppc64el.yaml +diskimage_builder/elements/block-device-gpt/element-provides +diskimage_builder/elements/block-device-gpt/environment.d/15-block-device.bash +diskimage_builder/elements/block-device-mbr/README.rst +diskimage_builder/elements/block-device-mbr/block-device-default.yaml +diskimage_builder/elements/block-device-mbr/block-device-ppc64el.yaml +diskimage_builder/elements/block-device-mbr/element-provides +diskimage_builder/elements/block-device-mbr/environment.d/15-block-device.bash +diskimage_builder/elements/bootloader/README.rst +diskimage_builder/elements/bootloader/pkg-map +diskimage_builder/elements/bootloader/cleanup.d/51-bootloader +diskimage_builder/elements/bootloader/environment.d/10-bootloader-default-cmdline +diskimage_builder/elements/bootloader/finalise.d/50-bootloader +diskimage_builder/elements/cache-url/README.rst +diskimage_builder/elements/cache-url/__init__.py +diskimage_builder/elements/cache-url/element-deps +diskimage_builder/elements/cache-url/package-installs.yaml +diskimage_builder/elements/cache-url/pkg-map +diskimage_builder/elements/cache-url/bin/cache-url +diskimage_builder/elements/cache-url/tests/__init__.py +diskimage_builder/elements/cache-url/tests/test_cache_url.py +diskimage_builder/elements/centos-minimal/README.rst +diskimage_builder/elements/centos-minimal/element-deps +diskimage_builder/elements/centos-minimal/element-provides +diskimage_builder/elements/centos-minimal/environment.d/10-centos-distro-name.bash +diskimage_builder/elements/centos-minimal/test-elements/build-succeeds/README.rst +diskimage_builder/elements/centos-minimal/test-elements/build-succeeds/element-deps +diskimage_builder/elements/centos-minimal/yum.repos.d/yum.repo +diskimage_builder/elements/centos7/README.rst +diskimage_builder/elements/centos7/element-deps +diskimage_builder/elements/centos7/element-provides +diskimage_builder/elements/centos7/environment.d/10-centos7-distro-name.bash +diskimage_builder/elements/centos7/pre-install.d/01-set-centos-mirror +diskimage_builder/elements/centos7/root.d/10-centos7-cloud-image +diskimage_builder/elements/centos7/test-elements/build-succeeds/README.rst +diskimage_builder/elements/centos7/test-elements/build-succeeds/element-deps +diskimage_builder/elements/cleanup-kernel-initrd/README.rst +diskimage_builder/elements/cleanup-kernel-initrd/cleanup.d/99-cleanup-kernel-initrd +diskimage_builder/elements/cloud-init/README.rst +diskimage_builder/elements/cloud-init/element-deps +diskimage_builder/elements/cloud-init/package-installs.yaml +diskimage_builder/elements/cloud-init/pkg-map +diskimage_builder/elements/cloud-init-datasources/README.rst +diskimage_builder/elements/cloud-init-datasources/install.d/05-set-cloud-init-sources +diskimage_builder/elements/cloud-init-disable-resizefs/README.rst +diskimage_builder/elements/cloud-init-disable-resizefs/post-install.d/50-cloud-init-disable-resizefs +diskimage_builder/elements/cloud-init-nocloud/README.rst +diskimage_builder/elements/cloud-init-nocloud/element-deps +diskimage_builder/elements/cloud-init-nocloud/environment.d/10-cloud-init-nocloud.bash +diskimage_builder/elements/cloud-init-nocloud/install.d/05-inject-local-source-data +diskimage_builder/elements/cloud-init/post-install.d/20-enable-cloud-init +diskimage_builder/elements/cloud-init/post-install.d/21-cloud-init-allow-password-auth +diskimage_builder/elements/debian/README.rst +diskimage_builder/elements/debian/element-deps +diskimage_builder/elements/debian/package-installs.yaml +diskimage_builder/elements/debian-minimal/README.rst +diskimage_builder/elements/debian-minimal/element-deps +diskimage_builder/elements/debian-minimal/element-provides +diskimage_builder/elements/debian-minimal/package-installs.yaml +diskimage_builder/elements/debian-minimal/environment.d/10-debian-minimal.bash +diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall +diskimage_builder/elements/debian-minimal/test-elements/stable-build-succeeds/README.rst +diskimage_builder/elements/debian-minimal/test-elements/stable-build-succeeds/environment.d/10-set-distro.bash +diskimage_builder/elements/debian-minimal/test-elements/stable-vm/README.rst +diskimage_builder/elements/debian-minimal/test-elements/stable-vm/element-deps +diskimage_builder/elements/debian-minimal/test-elements/stable-vm/environment.d/10-set-distro.bash +diskimage_builder/elements/debian-minimal/test-elements/testing-build-succeeds/README.rst +diskimage_builder/elements/debian-minimal/test-elements/testing-build-succeeds/environment.d/10-set-distro.bash +diskimage_builder/elements/debian-systemd/README.rst +diskimage_builder/elements/debian-systemd/element-deps +diskimage_builder/elements/debian-systemd/root.d/05-debian-systemd +diskimage_builder/elements/debian-upstart/README.rst +diskimage_builder/elements/debian-upstart/element-deps +diskimage_builder/elements/debian-upstart/root.d/05-debian-upstart +diskimage_builder/elements/debian-upstart/root.d/20-debian-fix-upstart-jobs +diskimage_builder/elements/debian/install.d/10-cloud-opinions +diskimage_builder/elements/debian/test-elements/build-succeeds/README.rst +diskimage_builder/elements/debian/test-elements/build-succeeds/element-deps +diskimage_builder/elements/debian/test-elements/build-succeeds/environment.d/09-debian-stable +diskimage_builder/elements/debootstrap/README.rst +diskimage_builder/elements/debootstrap/element-deps +diskimage_builder/elements/debootstrap/package-installs.yaml +diskimage_builder/elements/debootstrap/pkg-map +diskimage_builder/elements/debootstrap/cleanup.d/99-clean-up-cache +diskimage_builder/elements/debootstrap/environment.d/10-debootstrap-default-locale +diskimage_builder/elements/debootstrap/install.d/10-debian-networking +diskimage_builder/elements/debootstrap/install.d/12-debian-locale-gen +diskimage_builder/elements/debootstrap/install.d/15-cleanup-debootstrap +diskimage_builder/elements/debootstrap/root.d/08-debootstrap +diskimage_builder/elements/deploy-baremetal/README.rst +diskimage_builder/elements/deploy-baremetal/element-deps +diskimage_builder/elements/deploy-baremetal/package-installs.yaml +diskimage_builder/elements/deploy-baremetal/binary-deps.d/deploy +diskimage_builder/elements/deploy-baremetal/init.d/80-deploy +diskimage_builder/elements/deploy-kexec/README.rst +diskimage_builder/elements/deploy-kexec/element-deps +diskimage_builder/elements/deploy-kexec/package-installs.yaml +diskimage_builder/elements/deploy-kexec/binary-deps.d/deploy-kexec +diskimage_builder/elements/deploy-kexec/init.d/81-deploy-kexec +diskimage_builder/elements/deploy-targetcli/README.rst +diskimage_builder/elements/deploy-targetcli/element-deps +diskimage_builder/elements/deploy-targetcli/package-installs.yaml +diskimage_builder/elements/deploy-targetcli/binary-deps.d/deploy-targetcli +diskimage_builder/elements/deploy-targetcli/dracut-drivers.d/targetcli-drivers +diskimage_builder/elements/deploy-targetcli/extra-data.d/50-add-targetcli-module +diskimage_builder/elements/deploy-targetcli/extra-data.d/module/iscsi-func +diskimage_builder/elements/deploy-targetcli/extra-data.d/module/module-setup.sh +diskimage_builder/elements/deploy-targetcli/extra-data.d/module/targetcli-wrapper +diskimage_builder/elements/deploy-tgtadm/README.rst +diskimage_builder/elements/deploy-tgtadm/package-installs.yaml +diskimage_builder/elements/deploy-tgtadm/binary-deps.d/deploy-tgtadm +diskimage_builder/elements/deploy-tgtadm/extra-data.d/50-inject-tgtadm-iscsi-func +diskimage_builder/elements/deploy-tgtadm/extra-data.d/scripts/iscsi-func +diskimage_builder/elements/devuser/README.rst +diskimage_builder/elements/devuser/element-deps +diskimage_builder/elements/devuser/package-installs.yaml +diskimage_builder/elements/devuser/pkg-map +diskimage_builder/elements/devuser/environment.d/50-devuser +diskimage_builder/elements/devuser/extra-data.d/50-devuser +diskimage_builder/elements/devuser/install.d/50-devuser +diskimage_builder/elements/dhcp-all-interfaces/README.rst +diskimage_builder/elements/dhcp-all-interfaces/element-deps +diskimage_builder/elements/dhcp-all-interfaces/package-installs.yaml +diskimage_builder/elements/dhcp-all-interfaces/pkg-map +diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces +diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces +diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces-udev.rules +diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.conf +diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.init +diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh +diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-interface@.service +diskimage_builder/elements/dib-init-system/README.rst +diskimage_builder/elements/dib-init-system/dib-init-system +diskimage_builder/elements/dib-init-system/environment.d/10-dib-init-system.bash +diskimage_builder/elements/dib-init-system/install.d/20-install-init-scripts +diskimage_builder/elements/dib-init-system/post-install.d/10-enable-init-scripts +diskimage_builder/elements/dib-init-system/pre-install.d/04-dib-init-system +diskimage_builder/elements/dib-python/README.rst +diskimage_builder/elements/dib-python/cleanup.d/50-dib-python +diskimage_builder/elements/dib-python/environment.d/50-dib-python-version +diskimage_builder/elements/dib-python/pre-install.d/01-dib-python +diskimage_builder/elements/dib-run-parts/README.rst +diskimage_builder/elements/dib-run-parts/package-installs.yaml +diskimage_builder/elements/disable-nouveau/README.rst +diskimage_builder/elements/disable-nouveau/element-deps +diskimage_builder/elements/disable-nouveau/modprobe.d/disable-nouveau.conf +diskimage_builder/elements/disable-selinux/post-install.d/15-disable-selinux +diskimage_builder/elements/dkms/README.rst +diskimage_builder/elements/dkms/element-deps +diskimage_builder/elements/dkms/package-installs.yaml +diskimage_builder/elements/dkms/post-install.d/97-dkms +diskimage_builder/elements/docker/README.rst +diskimage_builder/elements/docker/element-provides +diskimage_builder/elements/docker/extra-data.d/01-docker-minimal +diskimage_builder/elements/docker/root.d/08-docker +diskimage_builder/elements/dpkg/README.rst +diskimage_builder/elements/dpkg/element-deps +diskimage_builder/elements/dpkg/bin/install-packages +diskimage_builder/elements/dpkg/cleanup.d/40-unblock-daemons +diskimage_builder/elements/dpkg/cleanup.d/50-remove-img-build-proxy +diskimage_builder/elements/dpkg/cleanup.d/60-untrim-dpkg +diskimage_builder/elements/dpkg/extra-data.d/01-copy-apt-keys +diskimage_builder/elements/dpkg/finalise.d/99-clean-up-cache +diskimage_builder/elements/dpkg/finalise.d/99-write-dpkg-manifest +diskimage_builder/elements/dpkg/pre-install.d/00-disable-apt-recommends +diskimage_builder/elements/dpkg/pre-install.d/02-add-apt-keys +diskimage_builder/elements/dpkg/pre-install.d/99-apt-get-update +diskimage_builder/elements/dpkg/root.d/50-block-apt-translations +diskimage_builder/elements/dpkg/root.d/50-block-daemons +diskimage_builder/elements/dpkg/root.d/50-build-with-http-cache +diskimage_builder/elements/dpkg/root.d/50-shared-apt-cache +diskimage_builder/elements/dpkg/root.d/50-trim-dpkg +diskimage_builder/elements/dracut-network/README.rst +diskimage_builder/elements/dracut-ramdisk/README.rst +diskimage_builder/elements/dracut-ramdisk/element-deps +diskimage_builder/elements/dracut-ramdisk/pkg-map +diskimage_builder/elements/dracut-ramdisk/source-repository-dracut +diskimage_builder/elements/dracut-ramdisk/binary-deps.d/dracut-ramdisk +diskimage_builder/elements/dracut-ramdisk/dracut-drivers.d/base-drivers +diskimage_builder/elements/dracut-ramdisk/environment.d/10-dracut-version.bash +diskimage_builder/elements/dracut-ramdisk/extra-data.d/scripts/module/deploy-cmdline.sh +diskimage_builder/elements/dracut-ramdisk/extra-data.d/scripts/module/module-setup.sh +diskimage_builder/elements/dracut-ramdisk/init.d/00-override-troubleshoot +diskimage_builder/elements/dracut-ramdisk/install.d/20-install-dracut-deps +diskimage_builder/elements/dracut-ramdisk/post-install.d/01-ensure-drivers +diskimage_builder/elements/dracut-ramdisk/post-install.d/99-build-dracut-ramdisk +diskimage_builder/elements/dracut-regenerate/README.rst +diskimage_builder/elements/dracut-regenerate/element-deps +diskimage_builder/elements/dracut-regenerate/package-installs.yaml +diskimage_builder/elements/dracut-regenerate/pkg-map +diskimage_builder/elements/dracut-regenerate/environment.d/10-dracut-regenerate +diskimage_builder/elements/dracut-regenerate/finalise.d/50-dracut-regenerate +diskimage_builder/elements/dynamic-login/README.rst +diskimage_builder/elements/dynamic-login/element-deps +diskimage_builder/elements/dynamic-login/init-scripts/systemd/dynamic-login.service +diskimage_builder/elements/dynamic-login/init-scripts/sysv/dynamic-login.init +diskimage_builder/elements/dynamic-login/init-scripts/upstart/dynamic-login.conf +diskimage_builder/elements/dynamic-login/install.d/70-enable-dynamic-login-services +diskimage_builder/elements/dynamic-login/static/usr/local/bin/dynamic-login +diskimage_builder/elements/element-manifest/README.rst +diskimage_builder/elements/element-manifest/element-deps +diskimage_builder/elements/element-manifest/extra-data.d/75-inject-element-manifest +diskimage_builder/elements/enable-serial-console/README.rst +diskimage_builder/elements/enable-serial-console/cleanup.d/99-fix-grub +diskimage_builder/elements/enable-serial-console/install.d/20-stty +diskimage_builder/elements/enable-serial-console/install.d/serial-console-udev.rules +diskimage_builder/elements/enable-serial-console/install.d/ttySx.conf +diskimage_builder/elements/epel/README.rst +diskimage_builder/elements/epel/element-deps +diskimage_builder/elements/epel/package-installs.yaml +diskimage_builder/elements/epel/pkg-map +diskimage_builder/elements/epel/pre-install.d/05-rpm-epel-release +diskimage_builder/elements/fedora/README.rst +diskimage_builder/elements/fedora/element-deps +diskimage_builder/elements/fedora/element-provides +diskimage_builder/elements/fedora/package-installs.yaml +diskimage_builder/elements/fedora-minimal/README.rst +diskimage_builder/elements/fedora-minimal/element-deps +diskimage_builder/elements/fedora-minimal/element-provides +diskimage_builder/elements/fedora-minimal/environment.d/10-fedora-distro-name.bash +diskimage_builder/elements/fedora-minimal/environment.d/11-yum-dnf.bash +diskimage_builder/elements/fedora-minimal/test-elements/build-succeeds/README.rst +diskimage_builder/elements/fedora-minimal/test-elements/build-succeeds/element-deps +diskimage_builder/elements/fedora-minimal/yum.repos.d/yum.repo +diskimage_builder/elements/fedora/environment.d/10-fedora-distro-name.bash +diskimage_builder/elements/fedora/environment.d/11-yum-dnf.bash +diskimage_builder/elements/fedora/pre-install.d/01-set-fedora-mirror +diskimage_builder/elements/fedora/pre-install.d/02-set-machine-id +diskimage_builder/elements/fedora/root.d/10-fedora-cloud-image +diskimage_builder/elements/fedora/test-elements/build-succeeds/element-deps +diskimage_builder/elements/gentoo/README.rst +diskimage_builder/elements/gentoo/element-deps +diskimage_builder/elements/gentoo/element-provides +diskimage_builder/elements/gentoo/package-installs.yaml +diskimage_builder/elements/gentoo/bin/fix_shm +diskimage_builder/elements/gentoo/bin/install-packages +diskimage_builder/elements/gentoo/bin/unfix_shm +diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash +diskimage_builder/elements/gentoo/extra-data.d/gentoo-releng.gpg +diskimage_builder/elements/gentoo/finalise.d/99-cleanup +diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-01-migrate-pax +diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags +diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays +diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-04-install-desired-python +diskimage_builder/elements/gentoo/root.d/10-gentoo-image +diskimage_builder/elements/gentoo/test-elements/build-succeeds/README.rst +diskimage_builder/elements/gentoo/test-elements/build-succeeds/element-deps +diskimage_builder/elements/growroot/README.rst +diskimage_builder/elements/growroot/element-deps +diskimage_builder/elements/growroot/package-installs.yaml +diskimage_builder/elements/growroot/pkg-map +diskimage_builder/elements/growroot/init-scripts/openrc/growroot +diskimage_builder/elements/growroot/init-scripts/systemd/growroot.service +diskimage_builder/elements/growroot/init-scripts/upstart/growroot.conf +diskimage_builder/elements/growroot/post-install.d/80-growroot +diskimage_builder/elements/growroot/static/usr/local/sbin/growroot +diskimage_builder/elements/grub2/README.rst +diskimage_builder/elements/grub2/package-installs.yaml +diskimage_builder/elements/grub2/pkg-map +diskimage_builder/elements/grub2/post-install.d/01-delete-grubenv +diskimage_builder/elements/hpdsa/README.rst +diskimage_builder/elements/hpdsa/package-installs.yaml +diskimage_builder/elements/hpdsa/post-install.d/95-hpdsa +diskimage_builder/elements/hpdsa/post-install.d/98-hpdsa-post-dkms +diskimage_builder/elements/hpdsa/pre-install.d/06-hpdsa +diskimage_builder/elements/hpdsa/root.d/10-hpdsa-check-distro +diskimage_builder/elements/hwburnin/README.rst +diskimage_builder/elements/hwburnin/binary-deps.d/hwburnin +diskimage_builder/elements/hwburnin/init.d/70-hwburnin +diskimage_builder/elements/hwdiscovery/README.rst +diskimage_builder/elements/hwdiscovery/element-deps +diskimage_builder/elements/hwdiscovery/package-installs.yaml +diskimage_builder/elements/hwdiscovery/binary-deps.d/hwdiscovery +diskimage_builder/elements/hwdiscovery/init.d/60-hwdiscovery +diskimage_builder/elements/ilo/README.rst +diskimage_builder/elements/ilo/extra-data.d/50-ilo-firmware +diskimage_builder/elements/ilo/init.d/50-ilo-firmware +diskimage_builder/elements/ilo/ramdisk-install.d/50-ilo-firmware +diskimage_builder/elements/install-bin/README.rst +diskimage_builder/elements/install-bin/pre-install.d/01-install-bin +diskimage_builder/elements/install-static/README.rst +diskimage_builder/elements/install-static/element-deps +diskimage_builder/elements/install-static/package-installs.yaml +diskimage_builder/elements/install-static/install.d/10-install-static-files +diskimage_builder/elements/install-types/README.rst +diskimage_builder/elements/install-types/extra-data.d/99-enable-install-types +diskimage_builder/elements/ironic-agent/README.rst +diskimage_builder/elements/ironic-agent/element-deps +diskimage_builder/elements/ironic-agent/element-provides +diskimage_builder/elements/ironic-agent/package-installs.yaml +diskimage_builder/elements/ironic-agent/pkg-map +diskimage_builder/elements/ironic-agent/source-repository-ironic-agent +diskimage_builder/elements/ironic-agent/svc-map +diskimage_builder/elements/ironic-agent/cleanup.d/99-ramdisk-create +diskimage_builder/elements/ironic-agent/environment.d/01-ironic-agent.sh +diskimage_builder/elements/ironic-agent/extra-data.d/15-ssl-ca-copy +diskimage_builder/elements/ironic-agent/finalise.d/99-remove-extra-packages +diskimage_builder/elements/ironic-agent/install.d/ironic-agent-package-install/package-installs-ironic-agent +diskimage_builder/elements/ironic-agent/install.d/ironic-agent-source-install/60-ironic-agent-install +diskimage_builder/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.conf +diskimage_builder/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.init +diskimage_builder/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.service +diskimage_builder/elements/ironic-agent/post-install.d/80-ironic-agent +diskimage_builder/elements/ironic-agent/static/etc/systemd/system/ironic-agent-create-rescue-user.path +diskimage_builder/elements/ironic-agent/static/etc/systemd/system/ironic-agent-create-rescue-user.service +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 +diskimage_builder/elements/iso/pkg-map +diskimage_builder/elements/iso/cleanup.d/100-build-iso +diskimage_builder/elements/iso/post-install.d/01-copy-bootloaders +diskimage_builder/elements/local-config/README.rst +diskimage_builder/elements/local-config/element-deps +diskimage_builder/elements/local-config/environment.d/62-ssh-key +diskimage_builder/elements/local-config/extra-data.d/62-ssh-key +diskimage_builder/elements/local-config/install.d/62-ssh-key +diskimage_builder/elements/local-config/pre-install.d/02-proxy-settings +diskimage_builder/elements/lvm/README.rst +diskimage_builder/elements/lvm/element-deps +diskimage_builder/elements/lvm/package-installs.yaml +diskimage_builder/elements/lvm/finalise.d/60-bootloader +diskimage_builder/elements/lvm/root.d/10-lvm-check-distro +diskimage_builder/elements/manifests/README.rst +diskimage_builder/elements/manifests/cleanup.d/01-copy-manifests-dir +diskimage_builder/elements/manifests/environment.d/14-manifests +diskimage_builder/elements/manifests/extra-data.d/20-manifest-dir +diskimage_builder/elements/mellanox/README.rst +diskimage_builder/elements/mellanox/element-deps +diskimage_builder/elements/mellanox/package-installs.yaml +diskimage_builder/elements/mellanox/pkg-map +diskimage_builder/elements/mellanox/init.d/01-mellanox +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 +diskimage_builder/elements/oat-client/package-installs.yaml +diskimage_builder/elements/oat-client/yum.repos.d/fedora-oat.repo +diskimage_builder/elements/openssh-server/README.rst +diskimage_builder/elements/openssh-server/element-deps +diskimage_builder/elements/openssh-server/package-installs.yaml +diskimage_builder/elements/openssh-server/pkg-map +diskimage_builder/elements/openssh-server/post-install.d/80-enable-sshd-service +diskimage_builder/elements/openstack-ci-mirrors/README.rst +diskimage_builder/elements/openstack-ci-mirrors/environment.d/11-dib-distribution-mirror.bash +diskimage_builder/elements/openstack-ci-mirrors/root.d/10-apt-disable-gpg +diskimage_builder/elements/opensuse/README.rst +diskimage_builder/elements/opensuse/element-deps +diskimage_builder/elements/opensuse/element-provides +diskimage_builder/elements/opensuse/package-installs.yaml +diskimage_builder/elements/opensuse-minimal/README.rst +diskimage_builder/elements/opensuse-minimal/element-deps +diskimage_builder/elements/opensuse-minimal/element-provides +diskimage_builder/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash +diskimage_builder/elements/opensuse-minimal/test-elements/opensuse423-build-succeeds/README.rst +diskimage_builder/elements/opensuse-minimal/test-elements/opensuse423-build-succeeds/element-deps +diskimage_builder/elements/opensuse-minimal/test-elements/opensuse423-build-succeeds/environment.d/10-set-distro.bash +diskimage_builder/elements/opensuse/environment.d/10-opensuse-distro-name.bash +diskimage_builder/elements/opensuse/extra-data.d/01-inject-defaults +diskimage_builder/elements/opensuse/root.d/10-opensuse-cloud-image +diskimage_builder/elements/opensuse/test-elements/build-succeeds/README.rst +diskimage_builder/elements/opensuse/test-elements/build-succeeds/element-deps +diskimage_builder/elements/opensuse/test-elements/opensuse423-build-succeeds/README.rst +diskimage_builder/elements/opensuse/test-elements/opensuse423-build-succeeds/environment.d/10-set-distro.bash +diskimage_builder/elements/package-installs/README.rst +diskimage_builder/elements/package-installs/element-deps +diskimage_builder/elements/package-installs/bin/package-installs +diskimage_builder/elements/package-installs/bin/package-installs-squash +diskimage_builder/elements/package-installs/bin/package-installs-v2 +diskimage_builder/elements/package-installs/bin/package-uninstalls +diskimage_builder/elements/package-installs/extra-data.d/99-squash-package-install +diskimage_builder/elements/package-installs/install.d/01-package-installs +diskimage_builder/elements/package-installs/install.d/99-package-uninstalls +diskimage_builder/elements/package-installs/post-install.d/00-package-installs +diskimage_builder/elements/package-installs/post-install.d/95-package-uninstalls +diskimage_builder/elements/package-installs/pre-install.d/02-package-installs +diskimage_builder/elements/package-installs/pre-install.d/99-package-uninstalls +diskimage_builder/elements/pip-and-virtualenv/README.rst +diskimage_builder/elements/pip-and-virtualenv/element-deps +diskimage_builder/elements/pip-and-virtualenv/package-installs.yaml +diskimage_builder/elements/pip-and-virtualenv/pkg-map +diskimage_builder/elements/pip-and-virtualenv/source-repository-pip-and-virtualenv +diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip +diskimage_builder/elements/pip-and-virtualenv/post-install.d/89-clean-up-pip-cache +diskimage_builder/elements/pip-and-virtualenv/test-elements/source-install-fedora/element-deps +diskimage_builder/elements/pip-and-virtualenv/test-elements/source-install-fedora/environment.d/10-source-installtype-pip-and-virtualenv +diskimage_builder/elements/pip-and-virtualenv/test-elements/source-install-ubuntu/element-deps +diskimage_builder/elements/pip-and-virtualenv/test-elements/source-install-ubuntu/environment.d/10-source-installtype-pip-and-virtualenv +diskimage_builder/elements/pip-cache/README.rst +diskimage_builder/elements/pip-cache/environment.d/10-pip-cache +diskimage_builder/elements/pip-cache/root.d/01-pip-cache +diskimage_builder/elements/pkg-map/README.rst +diskimage_builder/elements/pkg-map/element-deps +diskimage_builder/elements/pkg-map/bin/pkg-map +diskimage_builder/elements/pkg-map/extra-data.d/10-create-pkg-map-dir +diskimage_builder/elements/posix/README.rst +diskimage_builder/elements/posix/element-deps +diskimage_builder/elements/posix/package-installs.yaml +diskimage_builder/elements/posix/pkg-map +diskimage_builder/elements/proliant-tools/README.rst +diskimage_builder/elements/proliant-tools/element-deps +diskimage_builder/elements/proliant-tools/package-installs.yaml +diskimage_builder/elements/proliant-tools/pkg-map +diskimage_builder/elements/proliant-tools/install.d/65-proliant-tools-install +diskimage_builder/elements/pypi/README.rst +diskimage_builder/elements/pypi/extra-data.d/00-mount-pypi-mirror +diskimage_builder/elements/pypi/post-install.d/00-unconfigure-pypi-mirror +diskimage_builder/elements/pypi/pre-install.d/00-configure-pypi-mirror +diskimage_builder/elements/python-brickclient/README.rst +diskimage_builder/elements/python-brickclient/element-deps +diskimage_builder/elements/python-brickclient/package-installs.yaml +diskimage_builder/elements/python-brickclient/pkg-map +diskimage_builder/elements/python-brickclient/post-install.d/55-brick-client-install +diskimage_builder/elements/ramdisk/README.rst +diskimage_builder/elements/ramdisk/element-deps +diskimage_builder/elements/ramdisk/pkg-map +diskimage_builder/elements/ramdisk-base/README.rst +diskimage_builder/elements/ramdisk-base/cleanup.d/99-extract-ramdisk-files +diskimage_builder/elements/ramdisk-base/extra-data.d/01-inject-ramdisk-build-files +diskimage_builder/elements/ramdisk-base/extra-data.d/scripts/init +diskimage_builder/elements/ramdisk-base/extra-data.d/scripts/init-end +diskimage_builder/elements/ramdisk-base/extra-data.d/scripts/d/init-func +diskimage_builder/elements/ramdisk-base/init.d/20-init-variables +diskimage_builder/elements/ramdisk-base/init.d/40-check-network-ready +diskimage_builder/elements/ramdisk-base/post-install.d/01-ensure-binaries +diskimage_builder/elements/ramdisk-base/udev.d/60-persistent-storage.rules +diskimage_builder/elements/ramdisk/binary-deps.d/ramdisk +diskimage_builder/elements/ramdisk/init.d/10-start-base-system +diskimage_builder/elements/ramdisk/init.d/30-start-network +diskimage_builder/elements/ramdisk/install.d/20-install-dhcp-client +diskimage_builder/elements/ramdisk/install.d/52-ramdisk-install-busybox +diskimage_builder/elements/ramdisk/post-install.d/99-build-ramdisk +diskimage_builder/elements/rax-nova-agent/README.rst +diskimage_builder/elements/rax-nova-agent/element-deps +diskimage_builder/elements/rax-nova-agent/package-installs.yaml +diskimage_builder/elements/rax-nova-agent/source-repository-nova-agent +diskimage_builder/elements/rax-nova-agent/source-repository-xen-tools +diskimage_builder/elements/rax-nova-agent/install.d/05-xen-tools +diskimage_builder/elements/rax-nova-agent/install.d/10-nova-agent +diskimage_builder/elements/redhat-common/README.rst +diskimage_builder/elements/redhat-common/element-deps +diskimage_builder/elements/redhat-common/package-installs.yaml +diskimage_builder/elements/redhat-common/bin/extract-image +diskimage_builder/elements/redhat-common/bin/map-packages +diskimage_builder/elements/redhat-common/environment.d/50-redhat-common +diskimage_builder/elements/redhat-common/finalise.d/01-clean-old-kernels +diskimage_builder/elements/rhel-common/README.rst +diskimage_builder/elements/rhel-common/finalise.d/60-unregister +diskimage_builder/elements/rhel-common/install.d/10-openstack-selinux-rhel +diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration +diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration +diskimage_builder/elements/rhel-common/pre-install.d/00-rhsm +diskimage_builder/elements/rhel-common/pre-install.d/10-rhel-blacklist +diskimage_builder/elements/rhel7/README.rst +diskimage_builder/elements/rhel7/element-deps +diskimage_builder/elements/rhel7/element-provides +diskimage_builder/elements/rhel7/environment.d/10-rhel7-distro-name.bash +diskimage_builder/elements/rhel7/root.d/10-rhel7-cloud-image +diskimage_builder/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore +diskimage_builder/elements/rpm-distro/post-install.d/06-network-config-nonzeroconf +diskimage_builder/elements/rpm-distro/pre-install.d/00-fix-requiretty +diskimage_builder/elements/rpm-distro/pre-install.d/00-usr-local-bin-secure-path +diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch +diskimage_builder/elements/runtime-ssh-host-keys/README.rst +diskimage_builder/elements/runtime-ssh-host-keys/element-deps +diskimage_builder/elements/runtime-ssh-host-keys/package-installs.yaml +diskimage_builder/elements/runtime-ssh-host-keys/pkg-map +diskimage_builder/elements/runtime-ssh-host-keys/cleanup.d/90-remove-ssh-host-keys +diskimage_builder/elements/runtime-ssh-host-keys/init-scripts/systemd/ssh-keygen.service +diskimage_builder/elements/runtime-ssh-host-keys/init-scripts/upstart/ssh-keygen.conf +diskimage_builder/elements/runtime-ssh-host-keys/post-install.d/80-ssh-keygen +diskimage_builder/elements/runtime-ssh-host-keys/static/usr/local/sbin/runtime-ssh-host-keys.sh +diskimage_builder/elements/select-boot-kernel-initrd/README.rst +diskimage_builder/elements/select-boot-kernel-initrd/bin/select-boot-kernel-initrd +diskimage_builder/elements/select-boot-kernel-initrd/cleanup.d/99-remove-dib-img-functions +diskimage_builder/elements/select-boot-kernel-initrd/extra-data.d/99-copy-dib-img-functions +diskimage_builder/elements/selinux-permissive/README.rst +diskimage_builder/elements/selinux-permissive/install.d/11-selinux-permissive +diskimage_builder/elements/simple-init/README.rst +diskimage_builder/elements/simple-init/element-deps +diskimage_builder/elements/simple-init/package-installs.yaml +diskimage_builder/elements/simple-init/pkg-map +diskimage_builder/elements/simple-init/source-repository-simple-init +diskimage_builder/elements/simple-init/environment.d/50-disable-cloud-init +diskimage_builder/elements/simple-init/install.d/50-simple-init +diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces +diskimage_builder/elements/simple-init/install.d/simple-init-repo-install/40-glean +diskimage_builder/elements/simple-init/install.d/simple-init-source-install/40-glean +diskimage_builder/elements/simple-init/post-install.d/80-simple-init +diskimage_builder/elements/source-repositories/README.rst +diskimage_builder/elements/source-repositories/element-deps +diskimage_builder/elements/source-repositories/package-installs.yaml +diskimage_builder/elements/source-repositories/pkg-map +diskimage_builder/elements/source-repositories/extra-data.d/98-source-repositories +diskimage_builder/elements/stable-interface-names/README.rst +diskimage_builder/elements/stable-interface-names/element-deps +diskimage_builder/elements/stable-interface-names/package-installs.yaml +diskimage_builder/elements/stable-interface-names/install.d/02-stable-interface-names +diskimage_builder/elements/svc-map/README.rst +diskimage_builder/elements/svc-map/package-installs.yaml +diskimage_builder/elements/svc-map/pkg-map +diskimage_builder/elements/svc-map/bin/svc-map +diskimage_builder/elements/svc-map/extra-data.d/10-merge-svc-map-files +diskimage_builder/elements/svc-map/extra-data.d/11-copy-svc-map-file +diskimage_builder/elements/svc-map/tests/__init__.py +diskimage_builder/elements/svc-map/tests/test_data_merge.py +diskimage_builder/elements/sysctl/README.rst +diskimage_builder/elements/sysctl/bin/sysctl-set-value +diskimage_builder/elements/sysctl/bin/sysctl-write-value +diskimage_builder/elements/sysprep/README.rst +diskimage_builder/elements/sysprep/finalise.d/01-clear-machine-id +diskimage_builder/elements/uboot/README.rst +diskimage_builder/elements/uboot/cleanup.d/98-uboot +diskimage_builder/elements/ubuntu/README.rst +diskimage_builder/elements/ubuntu/element-deps +diskimage_builder/elements/ubuntu/element-provides +diskimage_builder/elements/ubuntu/package-installs.yaml +diskimage_builder/elements/ubuntu-common/README.rst +diskimage_builder/elements/ubuntu-common/element-deps +diskimage_builder/elements/ubuntu-common/install.d/80-disable-rfc3041 +diskimage_builder/elements/ubuntu-minimal/README.rst +diskimage_builder/elements/ubuntu-minimal/element-deps +diskimage_builder/elements/ubuntu-minimal/element-provides +diskimage_builder/elements/ubuntu-minimal/package-installs.yaml +diskimage_builder/elements/ubuntu-minimal/environment.d/10-ubuntu-distro-name.bash +diskimage_builder/elements/ubuntu-minimal/pre-install.d/01-ubuntu-apt-update +diskimage_builder/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall +diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/README.rst +diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/element-deps +diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/test-output-formats +diskimage_builder/elements/ubuntu-minimal/test-elements/bionic-build-succeeds/environment.d/10-set-distro.bash +diskimage_builder/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/README.rst +diskimage_builder/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/element-deps +diskimage_builder/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/environment.d/10-set-distro.bash +diskimage_builder/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/README.rst +diskimage_builder/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/element-deps +diskimage_builder/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/test-output-formats +diskimage_builder/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/environment.d/10-set-distro.bash +diskimage_builder/elements/ubuntu-signed/README.rst +diskimage_builder/elements/ubuntu-signed/element-deps +diskimage_builder/elements/ubuntu-signed/package-installs.yaml +diskimage_builder/elements/ubuntu-signed/post-install.d/90-get-signed-kernel +diskimage_builder/elements/ubuntu/environment.d/10-ubuntu-distro-name.bash +diskimage_builder/elements/ubuntu/environment.d/99-cloud-init-datasources.bash +diskimage_builder/elements/ubuntu/install.d/99-autoremove +diskimage_builder/elements/ubuntu/pre-install.d/00-remove-apt-xapian-index +diskimage_builder/elements/ubuntu/pre-install.d/00-remove-grub +diskimage_builder/elements/ubuntu/pre-install.d/01-set-ubuntu-mirror +diskimage_builder/elements/ubuntu/root.d/10-cache-ubuntu-tarball +diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/README.rst +diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/element-deps +diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/test-output-formats +diskimage_builder/elements/ubuntu/test-elements/bionic-build-succeeds/environment.d/10-set-distro.bash +diskimage_builder/elements/ubuntu/test-elements/trusty-build-succeeds/README.rst +diskimage_builder/elements/ubuntu/test-elements/trusty-build-succeeds/element-deps +diskimage_builder/elements/ubuntu/test-elements/trusty-build-succeeds/environment.d/10-set-distro.bash +diskimage_builder/elements/ubuntu/test-elements/xenial-build-succeeds/README.rst +diskimage_builder/elements/ubuntu/test-elements/xenial-build-succeeds/element-deps +diskimage_builder/elements/ubuntu/test-elements/xenial-build-succeeds/test-output-formats +diskimage_builder/elements/ubuntu/test-elements/xenial-build-succeeds/environment.d/10-set-distro.bash +diskimage_builder/elements/vm/README.rst +diskimage_builder/elements/vm/element-deps +diskimage_builder/elements/vm/finalise.d/50-remove-bogus-udev-links +diskimage_builder/elements/yum/README.rst +diskimage_builder/elements/yum/element-deps +diskimage_builder/elements/yum-minimal/README.rst +diskimage_builder/elements/yum-minimal/element-deps +diskimage_builder/elements/yum-minimal/package-installs.yaml +diskimage_builder/elements/yum-minimal/pkg-map +diskimage_builder/elements/yum-minimal/cleanup.d/95-remove-yum-mirror +diskimage_builder/elements/yum-minimal/install.d/10-base-networking +diskimage_builder/elements/yum-minimal/pre-install.d/03-yum-cleanup +diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot +diskimage_builder/elements/yum/bin/install-packages +diskimage_builder/elements/yum/cleanup.d/99-remove-yum-repo-conf +diskimage_builder/elements/yum/extra-data.d/99-yum-repo-conf +diskimage_builder/elements/yum/post-install.d/99-reset-yum-conf +diskimage_builder/elements/yum/pre-install.d/00-dnf-update +diskimage_builder/elements/yum/pre-install.d/01-yum-keepcache +diskimage_builder/elements/yum/root.d/50-yum-cache +diskimage_builder/elements/zipl/README.rst +diskimage_builder/elements/zipl/element-deps +diskimage_builder/elements/zipl/element-provides +diskimage_builder/elements/zipl/package-installs.yaml +diskimage_builder/elements/zipl/environment.d/10-zipl-default-cmdline +diskimage_builder/elements/zipl/finalise.d/50-zipl +diskimage_builder/elements/zipl/pre-install.d/kernel_config +diskimage_builder/elements/zypper/README.rst +diskimage_builder/elements/zypper/element-deps +diskimage_builder/elements/zypper-minimal/README.rst +diskimage_builder/elements/zypper-minimal/element-deps +diskimage_builder/elements/zypper-minimal/package-installs.yaml +diskimage_builder/elements/zypper-minimal/post-install.d/01-locale-cleanup +diskimage_builder/elements/zypper-minimal/pre-install.d/00-disable-zypper-recommends +diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot +diskimage_builder/elements/zypper/bin/install-packages +diskimage_builder/elements/zypper/install.d/01-login-defs +diskimage_builder/elements/zypper/post-install.d/10-mkinitrd +diskimage_builder/elements/zypper/post-install.d/98-zypper-clean-cache +diskimage_builder/elements/zypper/post-install.d/99-zypper-no-keep-packages +diskimage_builder/elements/zypper/pre-install.d/01-zypper-keep-packages +diskimage_builder/elements/zypper/root.d/50-zypper-cache +diskimage_builder/lib/common-defaults +diskimage_builder/lib/common-functions +diskimage_builder/lib/dib-run-parts +diskimage_builder/lib/die +diskimage_builder/lib/disk-image-create +diskimage_builder/lib/img-defaults +diskimage_builder/lib/img-functions +diskimage_builder/lib/outfilter.py +diskimage_builder/lib/ramdisk-defaults +diskimage_builder/lib/ramdisk-functions +diskimage_builder/lib/ramdisk-image-create +diskimage_builder/tests/__init__.py +diskimage_builder/tests/base.py +diskimage_builder/tests/test_elementdeps.py +diskimage_builder/tests/test_loggingconfig.py +diskimage_builder/tests/test_no_dup_filenames.py +diskimage_builder/tests/functional/__init__.py +doc/lib/element_deps.py +doc/source/ci.md +doc/source/conf.py +doc/source/elements +doc/source/elements.rst +doc/source/index.rst +doc/source/developer/caches.rst +doc/source/developer/components.rst +doc/source/developer/design.rst +doc/source/developer/developing_elements.rst +doc/source/developer/dib_lint.rst +doc/source/developer/index.rst +doc/source/developer/invocation.rst +doc/source/developer/stable_interfaces.rst +doc/source/specs/README.rst +doc/source/specs/v1/approved/block-device-lvl1-partitioning.rst +doc/source/specs/v1/approved/block-device-overview.rst +doc/source/specs/v1/approved/v1-template.rst +doc/source/user_guide/building_an_image.rst +doc/source/user_guide/index.rst +doc/source/user_guide/install_types.rst +doc/source/user_guide/installation.rst +doc/source/user_guide/supported_distros.rst +playbooks/legacy/dib-dsvm-functests-python2-centos-7/post.yaml +playbooks/legacy/dib-dsvm-functests-python2-centos-7/run.yaml +playbooks/legacy/dib-dsvm-functests-python2-centos-7-extras/post.yaml +playbooks/legacy/dib-dsvm-functests-python2-centos-7-extras/run.yaml +playbooks/legacy/dib-dsvm-functests-python2-centos-7-image/post.yaml +playbooks/legacy/dib-dsvm-functests-python2-centos-7-image/run.yaml +playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty/post.yaml +playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty/run.yaml +playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-extras/post.yaml +playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-extras/run.yaml +playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-image/post.yaml +playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-image/run.yaml +playbooks/legacy/dib-dsvm-functests-python3/post.yaml +playbooks/legacy/dib-dsvm-functests-python3/run.yaml +playbooks/legacy/dib-dsvm-functests-python3-extras/post.yaml +playbooks/legacy/dib-dsvm-functests-python3-extras/run.yaml +playbooks/legacy/dib-dsvm-functests-python3-image/post.yaml +playbooks/legacy/dib-dsvm-functests-python3-image/run.yaml +releasenotes/notes/1.16.0-updates-bad91fc0b36c1755.yaml +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 +releasenotes/notes/block-device-partitioning-237249e7ed2bad26.yaml +releasenotes/notes/bootloader-commandline-d2db7524f1f9ad28.yaml +releasenotes/notes/bootloader-gpt-d1047f81f3a0631b.yaml +releasenotes/notes/centos-retired-f17ae9f6f03e57e3.yaml +releasenotes/notes/dash-p-after-install-58a87549c1c906c3.yaml +releasenotes/notes/dib-distribution-mirror-8c241c0d3d4a539a.yaml +releasenotes/notes/dib-init-system_fix_for_debian_jessie-c6f7261ee84dad27.yaml +releasenotes/notes/dib-run-parts-6f67d038aa5a4156.yaml +releasenotes/notes/dib-run-parts-e18cc3a6c2d66c24.yaml +releasenotes/notes/dibv2-omnibus-b30e0c7ecd76db8d.yaml +releasenotes/notes/doc-auto-element-dependency-cb7488c5bb7301a4.yaml +releasenotes/notes/dracut-network-adaabf90da9f6866.yaml +releasenotes/notes/element-info-entry-point-448bf622be6061a0.yaml +releasenotes/notes/element-override-ccda78c24ab4a4ff.yaml +releasenotes/notes/element-vars-c6bf2e6795002f01.yaml +releasenotes/notes/fedora26-690b9fd9ac3c3d4f.yaml +releasenotes/notes/grub-timeout-1cdd14a2b1467d89.yaml +releasenotes/notes/incorrect-grub-label-5d2000215c0cc73e.yaml +releasenotes/notes/move_tidy_logs_to_main-a8c03427fe1a445c.yaml +releasenotes/notes/openssh-server-0f6d065748a2fc18.yaml +releasenotes/notes/opensuse-423-default-3bc73fff69374cd0.yaml +releasenotes/notes/opensuse-minimal-45267f5be1112c22.yaml +releasenotes/notes/package-install-arch-38bb5a6e61794fa5.yaml +releasenotes/notes/package-outside-debootstrap-ac93e9ce991819f1.yaml +releasenotes/notes/remove-dib-utils-37f70dfad54900a0.yaml +releasenotes/notes/runtime-ssh-host-keys-7a2fc873cc90d33e.yaml +releasenotes/notes/squashfs-output-91c1f0dc37474d3c.yaml +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 +releasenotes/source/index.rst +tests/README.rst +tests/install_test_deps.sh +tests/run_dib_library_tests.sh +tests/run_functests.sh +tests/run_output_format_test.sh +tests/elements/fake-os/README.rst +tests/elements/fake-os/element-provides +tests/elements/fake-os/root.d/10-fake-os \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/diskimage_builder.egg-info/top_level.txt python-diskimage-builder-2.17.0/diskimage_builder.egg-info/top_level.txt --- python-diskimage-builder-2.11.0/diskimage_builder.egg-info/top_level.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/diskimage_builder.egg-info/top_level.txt 2018-09-13 04:30:23.000000000 +0000 @@ -0,0 +1 @@ +diskimage_builder diff -Nru python-diskimage-builder-2.11.0/doc/lib/element_deps.py python-diskimage-builder-2.17.0/doc/lib/element_deps.py --- python-diskimage-builder-2.11.0/doc/lib/element_deps.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/lib/element_deps.py 2018-09-13 04:28:23.000000000 +0000 @@ -33,7 +33,7 @@ lines = [] lines.append(title) lines.append("+" * len(title)) - for dep in deps: + for dep in sorted(deps): lines.append("* :doc:`../%s/README`" % dep) lines.append('') # careful to end with a blank line return lines diff -Nru python-diskimage-builder-2.11.0/doc/source/developer/developing_elements.rst python-diskimage-builder-2.17.0/doc/source/developer/developing_elements.rst --- python-diskimage-builder-2.11.0/doc/source/developer/developing_elements.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/developer/developing_elements.rst 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/doc/source/elements/apt-conf/extra-data.d/99-override-default-apt-conf python-diskimage-builder-2.17.0/doc/source/elements/apt-conf/extra-data.d/99-override-default-apt-conf --- python-diskimage-builder-2.11.0/doc/source/elements/apt-conf/extra-data.d/99-override-default-apt-conf 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/apt-conf/extra-data.d/99-override-default-apt-conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -#!/bin/bash -# Override the default /etc/apt/apt.conf with $DIB_APT_CONF - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# exit directly if DIB_APT_CONF is not defined properly -if [ -z "${DIB_APT_CONF:-}" ] ; then - echo "DIB_APT_CONF is not set - no apt.conf will be copied in" - exit 0 -elif [ ! -f "$DIB_APT_CONF" ] ; then - echo "$DIB_APT_CONF is not a valid apt.conf file." - echo "You should assign a proper apt.conf file in DIB_APT_CONF" - exit 1 -fi - -# copy the apt.conf to cloudimg -sudo cp -L -f $DIB_APT_CONF $TMP_MOUNT_PATH/etc/apt/apt.conf diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/apt-conf/README.rst python-diskimage-builder-2.17.0/doc/source/elements/apt-conf/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/apt-conf/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/apt-conf/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -======== -apt-conf -======== - -This element overrides the default apt.conf for APT based systems. - -Environment Variables ---------------------- - -DIB_APT_CONF: - :Required: No - :Default: None - :Description: To override `DIB_APT_CONF`, set it to the path to your - apt.conf. The new apt.conf will take effect at build time and - run time. - :Example: ``DIB_APT_CONF=/etc/apt/apt.conf`` diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/apt-preferences/extra-data.d/99-set-apt-package-pins python-diskimage-builder-2.17.0/doc/source/elements/apt-preferences/extra-data.d/99-set-apt-package-pins --- python-diskimage-builder-2.11.0/doc/source/elements/apt-preferences/extra-data.d/99-set-apt-package-pins 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/apt-preferences/extra-data.d/99-set-apt-package-pins 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -#!/bin/bash -# -# Copyright 2014 Hewlett-Packard Development 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:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# exit directly if DIB_DPKG_MANIFEST is not defined properly -if [ -z "${DIB_DPKG_MANIFEST:-}" ]; then - echo "DIB_DPKG_MANIFEST must be set to the location of a manifest file you wish to use" - exit 0 -elif [ ! -f "$DIB_DPKG_MANIFEST" -o ! -s "$DIB_DPKG_MANIFEST" ]; then - echo "$DIB_DPKG_MANIFEST is not a valid manifest file." - echo "You should assign a proper manifest file in DIB_DPKG_MANIFEST" - exit 1 -fi - -DIB_DPKG_MANIFEST=$(readlink -f $DIB_DPKG_MANIFEST) - -# Create the preferences file from the given manifest -outfile=$(mktemp) -for package in $(jq -r ".packages[].package" $DIB_DPKG_MANIFEST); do - version=$(jq -r ".packages[] | select(.package == \"${package}\") |\ - .version" $DIB_DPKG_MANIFEST) - cat << EOF >> $outfile -Package: ${package} -Pin: version ${version} -Pin-Priority: 1001 - -EOF -done - -if [ -s $outfile ]; then - sudo mv $outfile $TMP_MOUNT_PATH/etc/apt/preferences -else - rm $outfile -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/apt-preferences/README.rst python-diskimage-builder-2.17.0/doc/source/elements/apt-preferences/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/apt-preferences/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/apt-preferences/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -=============== -apt-preferences -=============== - -This element generates the APT preferences file based on the provided manifest -provided by the :doc:`../manifests/README` element. - -The APT preferences file can be used to control which versions of packages will -be selected for installation. APT uses a priority system to make this -determination. For more information about APT preferences, see the apt_preferences(5) -man page. - -Environment Variables ---------------------- - -DIB_DPKG_MANIFEST: - :Required: No - :Default: None - :Description: The manifest file to generate the APT preferences file from. - :Example: ``DIB\_DPKG\_MANIFEST=~/image.d/dib-manifests/dib-manifest-dpkg-image`` - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/apt-sources/extra-data.d/99-override-default-apt-sources python-diskimage-builder-2.17.0/doc/source/elements/apt-sources/extra-data.d/99-override-default-apt-sources --- python-diskimage-builder-2.11.0/doc/source/elements/apt-sources/extra-data.d/99-override-default-apt-sources 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/apt-sources/extra-data.d/99-override-default-apt-sources 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -#!/bin/bash -# Override the default /etc/apt/sources.list with $DIB_APT_SOURCES - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# exit directly if DIB_APT_SOURCES is not defined properly -if [ -z "${DIB_APT_SOURCES:-}" ] ; then - echo "DIB_APT_SOURCES must be set to the location of a sources.list file you wish to use" - exit 0 -elif [ ! -f "$DIB_APT_SOURCES" -o ! -s "$DIB_APT_SOURCES" ] ; then - echo "$DIB_APT_SOURCES is not a valid sources.list file." - echo "You should assign proper sources.list file in DIB_APT_SOURCES" - exit 1 -fi - -DIB_APT_SOURCES=`readlink -f $DIB_APT_SOURCES` - -# copy the sources.list to cloudimg -pushd $TMP_MOUNT_PATH/etc/apt/ -sudo cp -f $DIB_APT_SOURCES sources.list # dib-lint: safe_sudo -popd diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/apt-sources/README.rst python-diskimage-builder-2.17.0/doc/source/elements/apt-sources/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/apt-sources/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/apt-sources/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -=========== -apt-sources -=========== - -Specify an apt sources.list file which is used during image building and then -remains on the image when it is run. - -Environment Variables ---------------------- - -DIB_APT_SOURCES - :Required: No - :Default: None (Does not replace sources.list file) - :Description: Path to a file on the build host which is used in place of - ``/etc/apt/sources.list`` - :Example: ``DIB_APT_SOURCES=/etc/apt/sources.list`` will use the same - sources.list as the build host. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/apt-sources/test-elements/test-sources/element-deps python-diskimage-builder-2.17.0/doc/source/elements/apt-sources/test-elements/test-sources/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/apt-sources/test-elements/test-sources/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/apt-sources/test-elements/test-sources/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -base -openstack-ci-mirrors -ubuntu-minimal diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/apt-sources/test-elements/test-sources/environment.d/00-set-apt-sources python-diskimage-builder-2.17.0/doc/source/elements/apt-sources/test-elements/test-sources/environment.d/00-set-apt-sources --- python-diskimage-builder-2.11.0/doc/source/elements/apt-sources/test-elements/test-sources/environment.d/00-set-apt-sources 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/apt-sources/test-elements/test-sources/environment.d/00-set-apt-sources 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -DIB_APT_SOURCES=$(mktemp) -export DIB_APT_SOURCES diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/apt-sources/test-elements/test-sources/extra-data.d/00-write-apt-sources python-diskimage-builder-2.17.0/doc/source/elements/apt-sources/test-elements/test-sources/extra-data.d/00-write-apt-sources --- python-diskimage-builder-2.11.0/doc/source/elements/apt-sources/test-elements/test-sources/extra-data.d/00-write-apt-sources 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/apt-sources/test-elements/test-sources/extra-data.d/00-write-apt-sources 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -echo "testdata" > $DIB_APT_SOURCES diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/apt-sources/test-elements/test-sources/pre-install.d/00-test-apt-sources python-diskimage-builder-2.17.0/doc/source/elements/apt-sources/test-elements/test-sources/pre-install.d/00-test-apt-sources --- python-diskimage-builder-2.11.0/doc/source/elements/apt-sources/test-elements/test-sources/pre-install.d/00-test-apt-sources 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/apt-sources/test-elements/test-sources/pre-install.d/00-test-apt-sources 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eux -set -o pipefail - -echo "Verifying apt sources.list content" -[ -f /etc/apt/sources.list ] -[ "$(cat /etc/apt/sources.list)" = "testdata" ] - -touch /tmp/dib-test-should-fail && exit 1 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/baremetal/cleanup.d/99-extract-kernel-and-ramdisk python-diskimage-builder-2.17.0/doc/source/elements/baremetal/cleanup.d/99-extract-kernel-and-ramdisk --- python-diskimage-builder-2.11.0/doc/source/elements/baremetal/cleanup.d/99-extract-kernel-and-ramdisk 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/baremetal/cleanup.d/99-extract-kernel-and-ramdisk 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#!/bin/bash -# -# Copyright 2014 Hewlett-Packard Development 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. - -# dib-lint: disable=safe_sudo - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$TARGET_ROOT" ] - -source $_LIB/img-functions - -# Dig up the initrd and kernel to use. -select_boot_kernel_initrd $TARGET_ROOT -sudo cp $BOOTDIR/$KERNEL ${IMAGE_NAME}.vmlinuz -sudo cp $BOOTDIR/$RAMDISK ${IMAGE_NAME}.initrd -sudo chmod a+r ${IMAGE_NAME}.vmlinuz -sudo chmod a+r ${IMAGE_NAME}.initrd - -if [ -f $TARGET_ROOT/dib-signed-kernel-version ] ; then - echo "Removing $TARGET_ROOT/dib-signed-kernel-version" - sudo rm -f $TARGET_ROOT/dib-signed-kernel-version -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/baremetal/README.rst python-diskimage-builder-2.17.0/doc/source/elements/baremetal/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/baremetal/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/baremetal/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -.. _element-baremetal: - -========= -baremetal -========= - -This is the baremetal (IE: real hardware) element. - -Does the following: - - * extracts the kernel and initial ramdisk of the built image. - -Optional parameters: - - * DIB_BAREMETAL_KERNEL_PATTERN and DIB_BAREMETAL_INITRD_PATTERN - may be supplied to specify which kernel files are preferred; this - can be of use when using custom kernels that don't fit the - standard naming patterns. Both variables must be provided in - order for them to have any effect. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/base/element-deps python-diskimage-builder-2.17.0/doc/source/elements/base/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/base/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/base/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -dib-init-system -install-types -pkg-map diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/base/install.d/00-baseline-environment python-diskimage-builder-2.17.0/doc/source/elements/base/install.d/00-baseline-environment --- python-diskimage-builder-2.11.0/doc/source/elements/base/install.d/00-baseline-environment 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/base/install.d/00-baseline-environment 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash -# These are useful, or at worst not harmful, for all images we build. - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -install-packages -m base iscsi_package diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/base/install.d/00-up-to-date python-diskimage-builder-2.17.0/doc/source/elements/base/install.d/00-up-to-date --- python-diskimage-builder-2.11.0/doc/source/elements/base/install.d/00-up-to-date 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/base/install.d/00-up-to-date 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/doc/source/elements/base/install.d/10-cloud-init python-diskimage-builder-2.17.0/doc/source/elements/base/install.d/10-cloud-init --- python-diskimage-builder-2.11.0/doc/source/elements/base/install.d/10-cloud-init 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/base/install.d/10-cloud-init 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#!/bin/bash -# Tweak the stock ubuntu cloud-init config - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# cloud-init May not actually be installed -mkdir -p /etc/cloud/cloud.cfg.d - -if [ -n "${DIB_CLOUD_INIT_ETC_HOSTS:-}" ]; then - dd of=/etc/cloud/cloud.cfg.d/10_etc_hosts.cfg << EOF -manage_etc_hosts: $DIB_CLOUD_INIT_ETC_HOSTS -EOF -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/base/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/base/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/base/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/base/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -{ - "family": { - "redhat": { - "iscsi_package": "iscsi-initiator-utils" - }, - "gentoo": { - "curl": "net-misc/curl", - "dhcp_client": "net-misc/dhcp", - "extlinux": "sys-boot/syslinux", - "git": "dev-vcs/git", - "grub_bios": "sys-boot/grub", - "grub-pc": "sys-boot/grub", - "ironic-python-agent": "", - "iscsi_package": "sys-block/open-iscsi", - "isc-dhcp-client": "net-misc/dhcp", - "isolinux": "", - "ncat": "net-analyzer/netcat", - "qemu-utils": "app-emulation/qemu", - "python-dev": "", - "PyYAML": "dev-python/pyyaml", - "syslinux": "sys-boot/syslinux", - "syslinux-common": "", - "tftp": "net-ftp/tftp-hpa", - "tgt": "sys-block/tgt" - }, - "suse": { - "qemu-utils": "qemu-tools" - } - }, - "default": { - "iscsi_package": "open-iscsi" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/base/pre-install.d/03-baseline-tools python-diskimage-builder-2.17.0/doc/source/elements/base/pre-install.d/03-baseline-tools --- python-diskimage-builder-2.11.0/doc/source/elements/base/pre-install.d/03-baseline-tools 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/base/pre-install.d/03-baseline-tools 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#!/bin/bash -# Install baseline packages and tools. - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -case $DISTRO_NAME in - 'ubuntu'|'debian') - # Note: add-apt-repository would be nice for RPM platforms too - so when we - # need something like it, create a wrapper in dpkg/bin and fedora/bin. - apt-get -y update - install-packages software-properties-common - ;; -esac diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/base/README.rst python-diskimage-builder-2.17.0/doc/source/elements/base/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/base/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/base/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -==== -base -==== -This is the base element. - -Almost all users will want to include this in their disk image build, -as it includes a lot of useful functionality. - -The `DIB_CLOUD_INIT_ETC_HOSTS` environment variable can be used to -customize cloud-init's management of `/etc/hosts`: - - * If the variable is set to something, write that value as - cloud-init's manage_etc_hosts. - - * If the variable is set to an empty string, don't create - manage_etc_hosts setting (cloud-init will use its default value). - - * If the variable is not set, use "localhost" for now. Later, not - setting the variable will mean using cloud-init's default. (To - preserve diskimage-builder's current default behavior in the - future, set the variable to "localhost" explicitly.) - -Notes: - - * If you are getting warnings during the build about your locale - being missing, consider installing/generating the relevant locale. - This may be as simple as having language-pack-XX installed in the - pre-install stage diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/bootloader/cleanup.d/51-bootloader python-diskimage-builder-2.17.0/doc/source/elements/bootloader/cleanup.d/51-bootloader --- python-diskimage-builder-2.11.0/doc/source/elements/bootloader/cleanup.d/51-bootloader 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/bootloader/cleanup.d/51-bootloader 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -#!/bin/bash -# -# Copyright 2014 Hewlett-Packard Development Company, L.P. -# All Rights Reserved. -# -# 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. - -# dib-lint: disable=safe_sudo - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$TARGET_ROOT" ] - -source $_LIB/img-functions - -if [ -d $TARGET_ROOT/boot/extlinux ] ; then - CONF=$TARGET_ROOT/boot/extlinux/extlinux.conf -elif [ -d $TARGET_ROOT/boot/syslinux ] ; then - CONF=$TARGET_ROOT/boot/syslinux/syslinux.cfg -else - exit 0 -fi - -# Dig up the initrd and kernel to use. -select_boot_kernel_initrd $TARGET_ROOT - -# Serial console on Power is hvc0 -if [[ "powerpc ppc64 ppc64le" =~ "$ARCH" ]] ; then - SERIAL_CONSOLE="hvc0" -else - SERIAL_CONSOLE="ttyS0,115200" -fi - -sudo sh -c "cat > $CONF <<_EOF_ -DEFAULT linux - -LABEL linux - KERNEL /boot/$KERNEL - APPEND ro root=LABEL=${DIB_ROOT_LABEL} console=tty0 console=${SERIAL_CONSOLE} nofb nomodeset vga=normal - INITRD /boot/$RAMDISK -_EOF_" diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/bootloader/environment.d/10-bootloader-default-cmdline python-diskimage-builder-2.17.0/doc/source/elements/bootloader/environment.d/10-bootloader-default-cmdline --- python-diskimage-builder-2.11.0/doc/source/elements/bootloader/environment.d/10-bootloader-default-cmdline 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/bootloader/environment.d/10-bootloader-default-cmdline 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DIB_BOOTLOADER_DEFAULT_CMDLINE=${DIB_BOOTLOADER_DEFAULT_CMDLINE:-"nofb nomodeset vga=normal"} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/bootloader/finalise.d/50-bootloader python-diskimage-builder-2.17.0/doc/source/elements/bootloader/finalise.d/50-bootloader --- python-diskimage-builder-2.11.0/doc/source/elements/bootloader/finalise.d/50-bootloader 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/bootloader/finalise.d/50-bootloader 1970-01-01 00:00:00.000000000 +0000 @@ -1,215 +0,0 @@ -#!/bin/bash - -# Configure grub. Note that the various conditionals here are to handle -# different distributions gracefully. - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -BOOT_DEV=$IMAGE_BLOCK_DEVICE - -# All available devices, handy for some bootloaders... -declare -A DEVICES -eval DEVICES=( $IMAGE_BLOCK_DEVICES ) - -function install_extlinux { - install-packages -m bootloader extlinux - - echo "Installing Extlinux..." - - # Find and install mbr.bin - for MBR in /usr/share/syslinux/mbr.bin /usr/lib/syslinux/mbr.bin \ - /usr/lib/extlinux/mbr.bin /usr/lib/EXTLINUX/mbr.bin ; do - if [ -f $MBR ]; then - break - fi - done - if [ ! -f $MBR ]; then - echo "mbr.bin (from EXT/SYSLINUX) not found." - exit 1 - fi - - dd if=$MBR of=$BOOT_DEV - - # Find any pre-created extlinux install directory - for EXTDIR in /boot/extlinux /boot/syslinux ; do - if [ -d $EXTDIR ] ; then - break - fi - done - if [ ! -d $EXTDIR ] ; then - # No install directory found so default to /boot/syslinux - EXTDIR=/boot/syslinux - mkdir -p $EXTDIR - fi - - # Finally install extlinux - extlinux --install $EXTDIR -} - -function install_grub2 { - - # Check for offline installation of grub - if [ -f "/tmp/grub/install" ] ; then - source /tmp/grub/install - # Right now we can't use pkg-map to branch by arch, so tag an architecture - # specific virtual package so we can install the rigth thing based on - # distribution. - elif [[ "$ARCH" =~ "ppc" ]]; then - install-packages -m bootloader grub-ppc64 - else - install-packages -m bootloader grub-pc - fi - - # XXX: grub-probe on the nbd0/loop0 device returns nothing - workaround, manually - # specify modules. https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1073731 - GRUBNAME=$(type -p grub-install) || echo "trying grub2-install" - if [ -z "$GRUBNAME" ]; then - GRUBNAME=$(type -p grub2-install) - fi - - # If no GRUB2 is found, fallback to extlinux - if [ -z "$GRUBNAME" ] || [ $($GRUBNAME --version | grep "0.97" | wc -l) -ne 0 ]; then - echo "No GRUB2 found. Fallback to Extlinux..." - install_extlinux - exit 0 - fi - - echo "Installing GRUB2..." - - # We need --force so grub does not fail due to being installed on the - # root partition of a block device. - GRUB_OPTS=${GRUB_OPTS:-"--force"} - # XXX: This is buggy: - # - --target=i386-pc is invalid for non-i386/amd64 architectures - # - and for UEFI too. - # GRUB_OPTS="$GRUB_OPTS --target=i386-pc" - if [[ ! $GRUB_OPTS == *--target* ]] && [[ $($GRUBNAME --version) =~ ' 2.' ]]; then - # /sys/ comes from the host machine. If the host machine is using EFI - # but the image being built doesn't have EFI boot-images installed we - # should set the --target to use a BIOS-based boot-image. - # - # * --target tells grub what's the target platform - # * the boot images are placed in /usr/lib/grub/- - # * i386-pc is used for BIOS-based machines - # http://www.gnu.org/software/grub/manual/grub.html#Installation - # - if [ -d /sys/firmware/efi ]; then - if [ ! -d /usr/lib/grub/*-efi ]; then - case $ARCH in - "x86_64"|"amd64") - GRUB_OPTS="$GRUB_OPTS --target=i386-pc" - ;; - "i386") - target=i386-pc - if [ -e /proc/device-tree ]; then - for x in /proc/device-tree/*; do - if [ -e "$x" ]; then - target="i386-ieee1275" - fi - done - fi - GRUB_OPTS="$GRUB_OPTS --target=$target" - ;; - esac - fi - fi - fi - - if [[ "$ARCH" =~ "ppc" ]] ; then - # For PPC (64-Bit regardless of Endian-ness), we use the "boot" - # partition as the one to point grub-install to, not the loopback - # device. ppc has a dedicated PReP boot partition. - # For grub2 < 2.02~beta3 this needs to be a /dev/mapper/... node after - # that a dev/loopXpN node will work fine. - $GRUBNAME --modules="part_msdos" $GRUB_OPTS ${DEVICES[boot]} --no-nvram - else - $GRUBNAME --modules="biosdisk part_msdos" $GRUB_OPTS $BOOT_DEV - fi - - # This might be better factored out into a per-distro 'install-bootblock' - # helper. - if [ -d /boot/grub2 ]; then - GRUB_CFG=/boot/grub2/grub.cfg - elif [ -d /boot/grub ]; then - GRUB_CFG=/boot/grub/grub.cfg - fi - - # Override the root device to the default label, and disable uuid - # lookup. - echo "GRUB_DEVICE=LABEL=${DIB_ROOT_LABEL}" >> /etc/default/grub - echo 'GRUB_DISABLE_LINUX_UUID=true' >> /etc/default/grub - echo "GRUB_TIMEOUT=${DIB_GRUB_TIMEOUT:-5}" >>/etc/default/grub - echo 'GRUB_TERMINAL="serial console"' >>/etc/default/grub - echo 'GRUB_GFXPAYLOAD_LINUX=text' >>/etc/default/grub - - # Serial console on Power is hvc0 - if [[ "powerpc ppc64 ppc64le" =~ "$ARCH" ]]; then - SERIAL_CONSOLE="hvc0" - else - SERIAL_CONSOLE="ttyS0,115200" - fi - - GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=${SERIAL_CONSOLE} no_timer_check" - - echo "GRUB_CMDLINE_LINUX_DEFAULT=\"${GRUB_CMDLINE_LINUX_DEFAULT}\"" >>/etc/default/grub - echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >>/etc/default/grub - if type grub2-mkconfig >/dev/null; then - GRUB_MKCONFIG="grub2-mkconfig -o $GRUB_CFG" - else - GRUB_MKCONFIG="grub-mkconfig -o $GRUB_CFG" - fi - DISTRO_NAME=${DISTRO_NAME:-} - case $DISTRO_NAME in - 'ubuntu'|'debian') - sed -i -e "s/\(^GRUB_CMDLINE_LINUX.*\)\"$/\1 ${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"/" /etc/default/grub - GRUB_MKCONFIG=update-grub - ;; - 'fedora'|'centos7'|'centos') - echo "GRUB_CMDLINE_LINUX=\"${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"" >>/etc/default/grub - ;; - 'opensuse') - sed -i -e "s/\(^GRUB_CMDLINE_LINUX.*\)\"$/\1 ${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"/" /etc/default/grub - ;; - esac - - # os-prober leaks /dev/sda into config file in dual-boot host - # Disable grub-os-prober to avoid the issue while running - # grub-mkconfig - # Setting a flag to track whether the entry is already there in grub config - PROBER_DISABLED= - if ! grep -qe "^\s*GRUB_DISABLE_OS_PROBER=true" /etc/default/grub; then - PROBER_DISABLED=true - echo 'GRUB_DISABLE_OS_PROBER=true' >> /etc/default/grub - fi - - $GRUB_MKCONFIG - - # Remove the fix to disable os_prober - if [ -n "$PROBER_DISABLED" ]; then - sed -i '$d' /etc/default/grub - fi - - # grub-mkconfig generates a config with the device in it, - # This shouldn't be needed, but old code has bugs - DIB_RELEASE=${DIB_RELEASE:-} - if [ "$DIB_RELEASE" = 'wheezy' ]; then - sed -i "s%search --no.*%%" $GRUB_CFG - sed -i "s%set root=.*%set root=(hd0,1)%" $GRUB_CFG - fi - - # Fix efi specific instructions in grub config file - if [ -d /sys/firmware/efi ]; then - sed -i 's%\(initrd\|linux\)efi /boot%\1 /boot%g' $GRUB_CFG - fi -} - -DIB_EXTLINUX=${DIB_EXTLINUX:-0} -if [ "$DIB_EXTLINUX" != "0" ]; then - install_extlinux -else - install_grub2 -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/bootloader/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/bootloader/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/bootloader/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/bootloader/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -{ - "family": { - "gentoo": { - "dkms_package": "", - "extlinux": "syslinux", - "grub-pc": "grub" - }, - "suse": { - "dkms_package": "", - "extlinux": "syslinux", - "grub-pc": "grub2" - }, - "redhat": { - "extlinux": "syslinux-extlinux", - "grub-pc": "grub2-tools grub2", - "grub-ppc64": "grub2-tools grub2" - } - }, - "default": { - "dkms_package": "dkms", - "extlinux": "extlinux", - "grub-pc": "grub-pc", - "grub-ppc64": "grub-ieee1275" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/bootloader/README.rst python-diskimage-builder-2.17.0/doc/source/elements/bootloader/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/bootloader/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/bootloader/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -========== -bootloader -========== - -Installs ``grub[2]`` on boot partition on the system. In case GRUB2 is -not available in the system, a fallback to Extlinux will happen. It's -also possible to enforce the use of Extlinux by exporting a -``DIB_EXTLINUX`` variable to the environment. - -Arguments -========= - -* ``DIB_GRUB_TIMEOUT`` sets the ``grub`` menu timeout. It defaults to - 5 seconds. Set this to 0 (no timeout) for fast boot times. - -* ``DIB_BOOTLOADER_DEFAULT_CMDLINE`` sets the CMDLINE parameters that - are appended to the grub.cfg configuration. It defaults to - 'nofb nomodeset vga=normal' diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/cache-url/bin/cache-url python-diskimage-builder-2.17.0/doc/source/elements/cache-url/bin/cache-url --- python-diskimage-builder-2.11.0/doc/source/elements/cache-url/bin/cache-url 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/cache-url/bin/cache-url 1970-01-01 00:00:00.000000000 +0000 @@ -1,119 +0,0 @@ -#!/bin/bash - -# Copyright 2012 Hewlett-Packard Development Company, L.P. -# Copyright 2013 Red Hat, Inc. -# -# 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:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Download a URL to a local cache -# e.g. cache-url http://.../foo ~/.cache/image-create/foo - -SCRIPT_NAME=$(basename $0) -SCRIPT_HOME=$(dirname $0) -FORCE_REVALIDATE=0 - -function show_options () { - echo "Usage: $SCRIPT_NAME [options] " - echo - echo "Download a URL and cache it to a specified location." - echo "Subsequent requests will compare the last modified date" - echo "of the upstream file to determine whether it needs to be" - echo "downloaded again." - echo - echo "Options:" - echo " -f -- force upstream caches to fetch a new copy of the file" - echo " -h -- show this help" - echo - exit $1 -} - -TEMP=$(getopt -o hf -n $SCRIPT_NAME -- "$@") -if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi - -# Note the quotes around `$TEMP': they are essential! -eval set -- "$TEMP" - -while true ; do - case "$1" in - -h|"-?") show_options 0;; - -f) FORCE_REVALIDATE=1; shift 1;; - --) shift; break;; - *) echo "Error: unsupported option $1." ; exit 1 ;; - esac -done - -url=$1 -dest=$2 -time_cond= -curl_opts="" - -if [ -z $url -o -z $dest ] ; then - show_options 1 -fi - -if [ -p $dest ]; then - type="fifo" - tmp=$(mktemp --tmpdir download.XXXXXXXX) -else - type="normal" - mkdir -p $(dirname $dest) - tmp=$(mktemp $(dirname $dest)/.download.XXXXXXXX) -fi - -if [ "$FORCE_REVALIDATE" = "1" ]; then - curl_opts="-H 'Pragma: no-cache, must-revalidate' -H 'Cache-Control: no-cache, must-revalidate'" - success="Downloaded and cached $url, having forced upstream caches to revalidate" -elif [ -f $dest -a -s $dest ] ; then - time_cond="-z $dest" - success="Server copy has changed. Using server version of $url" -else - success="Downloaded and cached $url for the first time" -fi - -rcode=$(curl -v -L -o $tmp -w '%{http_code}' --connect-timeout 10 $curl_opts $url $time_cond) -if [ "$rcode" == "200" -o "${url:0:7}" == "file://" ] ; then - # In cases where servers ignore the Modified time, - # curl cancels the download, outputs a 200 and leaves - # the output file untouched, we don't want this empty file. - if [ -n "$time_cond" -a ! -s $tmp ] ; then - echo "Ignoring empty file returned by curl. Using locally cached $url" - rm -f $tmp - else - echo $success - if [ "fifo" = "$type" ]; then - cp $tmp $dest - rm $tmp - else - mv $tmp $dest - fi - fi - # 213 is the response to a ftp MDTM command, curl outputs a 213 as the status - # if the url redirected to a ftp server and Not-Modified -elif [ "$rcode" = "304" -o "$rcode" = "213" ] ; then - echo "Server copy has not changed. Using locally cached $url" - rm -f $tmp -else - echo "Server returned an unexpected response code. [$rcode]" - rm -f $tmp - # expose some error codes so the calling process might know what happened - if [ "$rcode" = "404" ] ; then - exit 44 - fi - exit 1 -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/cache-url/README.rst python-diskimage-builder-2.17.0/doc/source/elements/cache-url/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/cache-url/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/cache-url/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -========= -cache-url -========= -A helper script to download images into a local cache. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/cache-url/tests/test_cache_url.py python-diskimage-builder-2.17.0/doc/source/elements/cache-url/tests/test_cache_url.py --- python-diskimage-builder-2.11.0/doc/source/elements/cache-url/tests/test_cache_url.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/cache-url/tests/test_cache_url.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -# Copyright 2014 Red Hat, Inc. -# -# 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. - -import os -import tempfile -import time - -from diskimage_builder.tests import base - - -class TestCacheUrl(base.ScriptTestBase): - def test_cache_url_caches(self): - tempdir = tempfile.mkdtemp() - target = os.path.join(tempdir, 'target') - source = 'http://fake/url' - # Write fake data to the target file and return success - self._stub_script('curl', 'echo "test" > ${3:7:100}\necho 200') - self._run_command(['elements/cache-url/bin/cache-url', - source, - target]) - self.assertTrue(os.path.exists(target)) - modification_time = os.path.getmtime(target) - # Make sure that the timestamp would change if the file does - time.sleep(1) - self._stub_script('curl', 'echo "304"') - self._run_command(['elements/cache-url/bin/cache-url', - source, - target]) - self.assertEqual(modification_time, os.path.getmtime(target)) diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos7/element-deps python-diskimage-builder-2.17.0/doc/source/elements/centos7/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/centos7/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos7/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -cache-url -redhat-common -rpm-distro -source-repositories -yum diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos7/element-provides python-diskimage-builder-2.17.0/doc/source/elements/centos7/element-provides --- python-diskimage-builder-2.11.0/doc/source/elements/centos7/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos7/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -operating-system diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos7/environment.d/10-centos7-distro-name.bash python-diskimage-builder-2.17.0/doc/source/elements/centos7/environment.d/10-centos7-distro-name.bash --- python-diskimage-builder-2.11.0/doc/source/elements/centos7/environment.d/10-centos7-distro-name.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos7/environment.d/10-centos7-distro-name.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -export DISTRO_NAME=centos7 -export DIB_RELEASE=GenericCloud - -# Useful for elements that work with fedora (dnf) & centos -export YUM=${YUM:-yum} - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos7/pre-install.d/01-set-centos-mirror python-diskimage-builder-2.17.0/doc/source/elements/centos7/pre-install.d/01-set-centos-mirror --- python-diskimage-builder-2.11.0/doc/source/elements/centos7/pre-install.d/01-set-centos-mirror 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos7/pre-install.d/01-set-centos-mirror 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-} - -[ -n "$DIB_DISTRIBUTION_MIRROR" ] || exit 0 - -# Only set the mirror for the Base, Extras and Updates repositories -# The others arn't enabled and do not exist on all mirrors -sed -e "s|^#baseurl=http://mirror.centos.org/centos|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-Base.repo diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos7/README.rst python-diskimage-builder-2.17.0/doc/source/elements/centos7/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/centos7/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos7/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -======= -centos7 -======= -Use Centos 7 cloud images as the baseline for built disk images. - -For further details see the redhat-common README. - -DIB_DISTRIBUTION_MIRROR: - :Required: No - :Default: None - :Description: To use a CentOS Yum mirror, set this variable to the mirror URL - before running bin/disk-image-create. This URL should point to - the directory containing the ``5/6/7`` directories. - :Example: ``DIB_DISTRIBUTION_MIRROR=http://amirror.com/centos`` - -DIB_CLOUD_IMAGES - :Required: No - :Description: Set the desired URL to fetch the images from. ppc64le: - Currently the CentOS community is working on providing the - ppc64le images until then you'll need to set this to a local - image file. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos7/root.d/10-centos7-cloud-image python-diskimage-builder-2.17.0/doc/source/elements/centos7/root.d/10-centos7-cloud-image --- python-diskimage-builder-2.11.0/doc/source/elements/centos7/root.d/10-centos7-cloud-image 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos7/root.d/10-centos7-cloud-image 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$ARCH" ] -[ -n "$TARGET_ROOT" ] - -if [[ "amd64 x86_64" =~ "$ARCH" ]]; then - ARCH="x86_64" - DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud.centos.org/centos/7/images} -elif [[ "arm64 aarch64" =~ "$ARCH" ]]; then - ARCH="aarch64" - DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud.centos.org/altarch/7/images/aarch64} -elif [[ "ppc64le" =~ "$ARCH" ]]; then - DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud.centos.org/altarch/7/images/ppc64le} -else - echo 'centos7 root element only support the x86_64, aarch64 and ppc64le values for $ARCH' - exit 1 -fi - -DIB_LOCAL_IMAGE=${DIB_LOCAL_IMAGE:-} - -if [ -n "$DIB_LOCAL_IMAGE" ]; then - IMAGE_LOCATION=$DIB_LOCAL_IMAGE - # No need to copy a local image into the cache directory, so just specify - # the cached path as the original path. - CACHED_IMAGE=$IMAGE_LOCATION - BASE_IMAGE_FILE=$(basename $DIB_LOCAL_IMAGE) - BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz -else - DIB_RELEASE=${DIB_RELEASE:-GenericCloud} - DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES} - BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-CentOS-7-${ARCH}-$DIB_RELEASE.qcow2.xz} - BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz - IMAGE_LOCATION=$DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE - CACHED_IMAGE=$DIB_IMAGE_CACHE/$BASE_IMAGE_FILE -fi - -$TMP_HOOKS_PATH/bin/extract-image $BASE_IMAGE_FILE $BASE_IMAGE_TAR $IMAGE_LOCATION $CACHED_IMAGE diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos7/test-elements/build-succeeds/element-deps python-diskimage-builder-2.17.0/doc/source/elements/centos7/test-elements/build-succeeds/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/centos7/test-elements/build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos7/test-elements/build-succeeds/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -base -openstack-ci-mirrors diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/element-deps python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -yum-minimal - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/element-provides python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/element-provides --- python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -operating-system diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/environment.d/10-centos-distro-name.bash python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/environment.d/10-centos-distro-name.bash --- python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/environment.d/10-centos-distro-name.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/environment.d/10-centos-distro-name.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -export DISTRO_NAME=centos -export DIB_RELEASE=${DIB_RELEASE:-7} - -# by default, enable DHCP configuration of eth0 & eth1 in network -# scripts. See yum-minimal for full details -export DIB_YUM_MINIMAL_CREATE_INTERFACES=${DIB_YUM_MINIMAL_CREATE_INTERFACES:-1} - -# Useful for elements that work with fedora (dnf) & centos -export YUM=${YUM:-yum} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/README.rst python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -============== -centos-minimal -============== -Create a minimal image based on CentOS 7. - -Use of this element will require 'yum' and 'yum-utils' to be installed on -Ubuntu and Debian. Nothing additional is needed on Fedora or CentOS. - -By default, ``DIB_YUM_MINIMAL_CREATE_INTERFACES`` is set to enable the -creation of ``/etc/sysconfig/network-scripts/ifcfg-eth[0|1]`` scripts to -enable DHCP on the ``eth0`` & ``eth1`` interfaces. If you do not have -these interfaces, or if you are using something else to setup the -network such as cloud-init, glean or network-manager, you would want -to set this to ``0``. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/test-elements/build-succeeds/element-deps python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/test-elements/build-succeeds/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/test-elements/build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/test-elements/build-succeeds/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -openstack-ci-mirrors \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/test-elements/build-succeeds/README.rst python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/test-elements/build-succeeds/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/test-elements/build-succeeds/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/test-elements/build-succeeds/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Verify we can build a centos-minimal image. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/yum.repos.d/yum.repo python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/yum.repos.d/yum.repo --- python-diskimage-builder-2.11.0/doc/source/elements/centos-minimal/yum.repos.d/yum.repo 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/centos-minimal/yum.repos.d/yum.repo 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -[centos] -name=CentOS-$releasever - Base -mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os -gpgcheck=0 -#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ -#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/cleanup-kernel-initrd/cleanup.d/99-cleanup-kernel-initrd python-diskimage-builder-2.17.0/doc/source/elements/cleanup-kernel-initrd/cleanup.d/99-cleanup-kernel-initrd --- python-diskimage-builder-2.11.0/doc/source/elements/cleanup-kernel-initrd/cleanup.d/99-cleanup-kernel-initrd 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/cleanup-kernel-initrd/cleanup.d/99-cleanup-kernel-initrd 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright 2014 Hewlett-Packard Development Company, L.P. -# All Rights Reserved. -# -# 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 - -source $_LIB/img-functions - -function cleanup_old_kernel_initrd() -{ - KERNEL_VERSION=${KERNEL#vmlinuz-} - if [ -n "${BOOTDIR}" ] ; then - for file in `ls $BOOTDIR/vmlinuz-* | grep -v $KERNEL_VERSION | grep -v debug` - do - echo "Removing unnecessary kernels and ramdisk images from image." - file=$(basename $file) - rm -Rvf $BOOTDIR/*${file#vmlinuz-}* - done - fi -} - -# Dig up the initrd and kernel. -select_boot_kernel_initrd $TARGET_ROOT -BOOTDIR=$TARGET_ROOT/boot - -# Select_boot_kernel has support for redhat/debian/openSUSE -# openSUSE has a built-in logic to delete old kernels -# Hence cleanup_old_kernel will be used only for redhat and debian derived distros. -if [ -f $TARGET_ROOT/etc/redhat-release -o -f $TARGET_ROOT/etc/debian_version ] ; then - cleanup_old_kernel_initrd -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/cleanup-kernel-initrd/README.rst python-diskimage-builder-2.17.0/doc/source/elements/cleanup-kernel-initrd/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/cleanup-kernel-initrd/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/cleanup-kernel-initrd/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -===================== -cleanup-kernel-initrd -===================== -Remove unused kernel/initrd from the image. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/cloud-init/element-deps python-diskimage-builder-2.17.0/doc/source/elements/cloud-init/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/cloud-init/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/cloud-init/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/cloud-init/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/cloud-init/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/cloud-init/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/cloud-init/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -cloud-init: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/cloud-init/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/cloud-init/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/cloud-init/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/cloud-init/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -{ - "family": { - "gentoo": { - "cloud-init": "app-emulation/cloud-init" - } - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/cloud-init/post-install.d/20-enable-cloud-init python-diskimage-builder-2.17.0/doc/source/elements/cloud-init/post-install.d/20-enable-cloud-init --- python-diskimage-builder-2.11.0/doc/source/elements/cloud-init/post-install.d/20-enable-cloud-init 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/cloud-init/post-install.d/20-enable-cloud-init 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# gentoo -if [[ "${DISTRO_NAME}" == "gentoo" ]]; then - rc-update add cloud-config default - rc-update add cloud-final default - rc-update add cloud-init-local boot - rc-update add cloud-init default -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/cloud-init/post-install.d/21-cloud-init-allow-password-auth python-diskimage-builder-2.17.0/doc/source/elements/cloud-init/post-install.d/21-cloud-init-allow-password-auth --- python-diskimage-builder-2.11.0/doc/source/elements/cloud-init/post-install.d/21-cloud-init-allow-password-auth 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/cloud-init/post-install.d/21-cloud-init-allow-password-auth 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -#!/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 -Nru python-diskimage-builder-2.11.0/doc/source/elements/cloud-init/README.rst python-diskimage-builder-2.17.0/doc/source/elements/cloud-init/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/cloud-init/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/cloud-init/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -========== -cloud-init -========== - -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_SSH_PWAUTH - :Required: No - :Default: password authentication disabled when cloud-init installed - :Description: customize cloud-init to allow ssh password - authentication. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/cloud-init-datasources/install.d/05-set-cloud-init-sources python-diskimage-builder-2.17.0/doc/source/elements/cloud-init-datasources/install.d/05-set-cloud-init-sources --- python-diskimage-builder-2.11.0/doc/source/elements/cloud-init-datasources/install.d/05-set-cloud-init-sources 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/cloud-init-datasources/install.d/05-set-cloud-init-sources 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -DIB_CLOUD_INIT_DATASOURCES=${DIB_CLOUD_INIT_DATASOURCES:-""} - -if [ -z "$DIB_CLOUD_INIT_DATASOURCES" ] ; then - echo "DIB_CLOUD_INIT_DATASOURCES must be set to a comma-separated list " - echo "of cloud-init data sources you wish to use, ie 'Ec2, NoCloud, ConfigDrive'" - exit 1 -fi - -if [ -d /etc/cloud/cloud.cfg.d ]; then - cat > /etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg < /etc/cloud/cloud.cfg.d/92-ec2-datasource.cfg < /etc/sudoers.d/debian-cloud-init -chmod 0440 /etc/sudoers.d/debian-cloud-init - -if [ "$DIB_DEBIAN_ALT_INIT_PACKAGE" != "sysvinit" ]; then - # To avoid a conflict against an essential package, we need to remove sysvinit first - dpkg --purge --force remove-essential sysvinit - apt-get install -y $apt_get_bp_extra_opts $DIB_DEBIAN_ALT_INIT_PACKAGE - printf \"Package: sysvinit\nPin: origin ""\nPin-Priority: -1\n\" > \ - /etc/apt/preferences.d/sysvinit > /etc/apt/preferences.d/sysvinit -fi - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/debian/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/debian/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -file: -less: -kbd: -curl: -rsync: -bash-completion: -isc-dhcp-client: -net-tools: -cloud-init: -cloud-utils: -cloud-initramfs-growroot: -dialog: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian/README.rst python-diskimage-builder-2.17.0/doc/source/elements/debian/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/debian/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -====== -debian -====== - -This element is based on ``debian-minimal`` with ``cloud-init`` and -related tools installed. This produces something more like a standard -upstream cloud image. - -By default this element creates the latest stable release. The exact -setting can be found in the ``debian-minimal/environment.d`` directory -in the variable ``DIB_RELEASE``. If a different release of Debian -should be created, the variable ``DIB_RELEASE`` can be set -appropriately. - -.. element_deps:: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian/test-elements/build-succeeds/element-deps python-diskimage-builder-2.17.0/doc/source/elements/debian/test-elements/build-succeeds/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/debian/test-elements/build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian/test-elements/build-succeeds/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -base diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian/test-elements/build-succeeds/environment.d/09-debian-stable python-diskimage-builder-2.17.0/doc/source/elements/debian/test-elements/build-succeeds/environment.d/09-debian-stable --- python-diskimage-builder-2.11.0/doc/source/elements/debian/test-elements/build-succeeds/environment.d/09-debian-stable 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian/test-elements/build-succeeds/environment.d/09-debian-stable 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# We don't want to build against Debian unstable -# (Needs to be a 09- because must be executed before -# debian-minimal 10-debian-minimal.bash.) -export DIB_RELEASE="stable" diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian/test-elements/build-succeeds/README.rst python-diskimage-builder-2.17.0/doc/source/elements/debian/test-elements/build-succeeds/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/debian/test-elements/build-succeeds/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian/test-elements/build-succeeds/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Test that we can successfully build a debian image. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/element-deps python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -debootstrap -dib-python -pkg-map diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/element-provides python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/element-provides --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -operating-system diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/environment.d/10-debian-minimal.bash python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/environment.d/10-debian-minimal.bash --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/environment.d/10-debian-minimal.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/environment.d/10-debian-minimal.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -export DISTRO_NAME=debian -export DIB_RELEASE=${DIB_RELEASE:-stable} - -if [ -n "${DIB_DEBIAN_DISTRIBUTION_MIRROR:-}" ]; then - DIB_DISTRIBUTION_MIRROR=$DIB_DEBIAN_DISTRIBUTION_MIRROR -fi -export DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-http://deb.debian.org/debian} - -export DIB_DEBIAN_COMPONENTS=${DIB_DEBIAN_COMPONENTS:-main} -export DIB_DEBIAN_COMPONENTS_WS=${DIB_DEBIAN_COMPONENTS//,/ } - -DIB_APT_SOURCES_CONF_DEFAULT=\ -"default:deb ${DIB_DISTRIBUTION_MIRROR} ${DIB_RELEASE} ${DIB_DEBIAN_COMPONENTS_WS} -backports:deb ${DIB_DISTRIBUTION_MIRROR} ${DIB_RELEASE}-backports ${DIB_DEBIAN_COMPONENTS_WS} -updates:deb ${DIB_DISTRIBUTION_MIRROR} ${DIB_RELEASE}-updates ${DIB_DEBIAN_COMPONENTS_WS} -security:deb http://security.debian.org/ ${DIB_RELEASE}/updates ${DIB_DEBIAN_COMPONENTS_WS} -" - -if [ "${DIB_RELEASE}" = "testing" -o "${DIB_RELEASE}" = "unstable" ]; then - DIB_APT_SOURCES_CONF_DEFAULT="default:deb ${DIB_DISTRIBUTION_MIRROR} ${DIB_RELEASE} ${DIB_DEBIAN_COMPONENTS_WS}" -fi - -export DIB_APT_SOURCES_CONF=${DIB_APT_SOURCES_CONF:-${DIB_APT_SOURCES_CONF_DEFAULT}} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -linux-image-amd64: - arch: amd64 -linux-image-686: - arch: i386 -linux-image-arm64: - arch: arm64 -netbase: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/README.rst python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -============== -debian-minimal -============== - -The ``debian-minimal`` element uses debootstrap for generating a -minimal image. - -By default this element creates the latest stable release. The exact -setting can be found in the element's ``environment.d`` directory in -the variable ``DIB_RELEASE``. If a different release of Debian should -be created, the variable ``DIB_RELEASE`` can be set appropriately. - -Note that this element installs ``systemd-sysv`` as the init system - -.. element_deps:: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/root.d/75-debian-minimal-baseinstall python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/root.d/75-debian-minimal-baseinstall --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/root.d/75-debian-minimal-baseinstall 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/root.d/75-debian-minimal-baseinstall 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -#!/bin/bash -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# Copyright (c) 2016 Andreas Florath (andreas@florath.net) -# -# 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. - -# dib-lint: disable=safe_sudo - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Writes the apt sources files. -# The description is passed in via line coded elements. -# (The approach using associative arrays for configuration faild, -# because it looks that there is no way to handle defaults in -# this case - and additionally we run with '-u'.) -function apt_sources_write { - local APT_SOURCES_CONF="$1" - - sudo mkdir -p $TARGET_ROOT/etc/apt/sources.list.d - - echo "${APT_SOURCES_CONF}" \ - | while read line; do - local name=$(echo ${line} | cut -d ":" -f 1) - local value=$(echo ${line} | cut -d ":" -f 2-) - echo "$value" | sudo tee $TARGET_ROOT/etc/apt/sources.list.d/${name}.list - done -} - -sudo mount -t proc none $TARGET_ROOT/proc -sudo mount -t sysfs none $TARGET_ROOT/sys -trap "sudo umount $TARGET_ROOT/proc; sudo umount $TARGET_ROOT/sys" EXIT - -apt_get="sudo chroot $TARGET_ROOT /usr/bin/apt-get" - -apt_sources_write "${DIB_APT_SOURCES_CONF}" - -# Need to update to retrieve the signed Release file -$apt_get update - -$apt_get clean -$apt_get dist-upgrade -y - -to_install="" - -# pre-stretch (9.0) brought this in via debootstrap, but init -# dependencies have narrowed in the container world, so now we add it -# explicitly here so it's brought in early. -to_install+="systemd-sysv " - -# default required -to_install+="busybox sudo " - -if [ "$DIB_PYTHON_VERSION" == "2" ]; then - to_install+="python " -elif [ "$DIB_PYTHON_VERSION" == "3" ]; then - to_install+="python3 " -else - echo "ERROR: DIB_PYTHON_VERSION is '$DIB_PYTHON_VERSION' but needs to be 2 or 3" - exit 1 -fi - -$apt_get install -y $to_install diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/stable-build-succeeds/environment.d/10-set-distro.bash python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/stable-build-succeeds/environment.d/10-set-distro.bash --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/stable-build-succeeds/environment.d/10-set-distro.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/stable-build-succeeds/environment.d/10-set-distro.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -export DISTRO_NAME=debian -export DIB_RELEASE=stable diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/stable-build-succeeds/README.rst python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/stable-build-succeeds/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/stable-build-succeeds/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/stable-build-succeeds/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Verify we can build a debian-minimal stable image. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/stable-vm/element-deps python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/stable-vm/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/stable-vm/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/stable-vm/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -vm diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/stable-vm/environment.d/10-set-distro.bash python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/stable-vm/environment.d/10-set-distro.bash --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/stable-vm/environment.d/10-set-distro.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/stable-vm/environment.d/10-set-distro.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -export DISTRO_NAME=debian -export DIB_RELEASE=stable diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/stable-vm/README.rst python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/stable-vm/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/stable-vm/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/stable-vm/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Verify we can build a debian-minimal stable VM image. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/testing-build-succeeds/environment.d/10-set-distro.bash python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/testing-build-succeeds/environment.d/10-set-distro.bash --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/testing-build-succeeds/environment.d/10-set-distro.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/testing-build-succeeds/environment.d/10-set-distro.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -export DISTRO_NAME=debian -export DIB_RELEASE=testing diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/testing-build-succeeds/README.rst python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/testing-build-succeeds/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/debian-minimal/test-elements/testing-build-succeeds/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-minimal/test-elements/testing-build-succeeds/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Verify we can build a debian-minimal stable image. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-systemd/element-deps python-diskimage-builder-2.17.0/doc/source/elements/debian-systemd/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/debian-systemd/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-systemd/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -debian diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-systemd/README.rst python-diskimage-builder-2.17.0/doc/source/elements/debian-systemd/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/debian-systemd/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-systemd/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -============== -debian-systemd -============== -You may want to use `systemd` instead of the classic sysv init system. -In this case, include this element in your element list. - -Note that this works with the ``debian`` element, not the -``debian-minimal`` element. - -.. element_deps:: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-systemd/root.d/05-debian-systemd python-diskimage-builder-2.17.0/doc/source/elements/debian-systemd/root.d/05-debian-systemd --- python-diskimage-builder-2.11.0/doc/source/elements/debian-systemd/root.d/05-debian-systemd 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-systemd/root.d/05-debian-systemd 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -cat > ${TARGET_ROOT}/.extra_settings << EOF -DIB_DEBIAN_ALT_INIT_PACKAGE=systemd-sysv -EOF diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-upstart/element-deps python-diskimage-builder-2.17.0/doc/source/elements/debian-upstart/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/debian-upstart/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-upstart/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -debian diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-upstart/README.rst python-diskimage-builder-2.17.0/doc/source/elements/debian-upstart/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/debian-upstart/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-upstart/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -============== -debian-upstart -============== -By default Debian will use sysvinit for booting. If you want to experiment -with Upstart, or have need of it due to a need for upstart jobs, this -element will build the image with upstart as the init system. - -Note that this works with the ``debian`` element, not the -``debian-minimal`` element. - -.. element_deps:: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-upstart/root.d/05-debian-upstart python-diskimage-builder-2.17.0/doc/source/elements/debian-upstart/root.d/05-debian-upstart --- python-diskimage-builder-2.11.0/doc/source/elements/debian-upstart/root.d/05-debian-upstart 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-upstart/root.d/05-debian-upstart 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -cat > ${TARGET_ROOT}/.extra_settings << EOF -DIB_DEBIAN_ALT_INIT_PACKAGE=upstart -EOF diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debian-upstart/root.d/20-debian-fix-upstart-jobs python-diskimage-builder-2.17.0/doc/source/elements/debian-upstart/root.d/20-debian-fix-upstart-jobs --- python-diskimage-builder-2.11.0/doc/source/elements/debian-upstart/root.d/20-debian-fix-upstart-jobs 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debian-upstart/root.d/20-debian-fix-upstart-jobs 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Working around bug in Debian cloud-init packages with upstart -# where startpar will wait forever for these because they are tasks -# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735204 -for sysv_script in cloud-init cloud-init-local cloud-config cloud-final ; do - sudo rm -f ${TARGET_ROOT}/etc/rc2.d/??${sysv_script} ${TARGET_ROOT}/etc/init.d/${sysv_script} -done -# And working around upstart job bug in Debian where cloud-config will never run -# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735207 -sudo sed -i -e 's/start on .*/start on started rc RUNLEVEL=[2345]/' ${TARGET_ROOT}/etc/init/cloud-config.conf diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/cleanup.d/99-clean-up-cache python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/cleanup.d/99-clean-up-cache --- python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/cleanup.d/99-clean-up-cache 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/cleanup.d/99-clean-up-cache 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 Red Hat, Inc. -# -# 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 - -# NOTE(pabelanger): Remove cached info about APT repositories, as it will go -# stale fast. -sudo rm -rf $TARGET_ROOT/var/lib/apt/lists/* diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/element-deps python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -dpkg -pkg-map diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/environment.d/10-debootstrap-default-locale python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/environment.d/10-debootstrap-default-locale --- python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/environment.d/10-debootstrap-default-locale 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/environment.d/10-debootstrap-default-locale 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DIB_DEBOOTSTRAP_DEFAULT_LOCALE=${DIB_DEBOOTSTRAP_DEFAULT_LOCALE:-C.UTF-8} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/install.d/10-debian-networking python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/install.d/10-debian-networking --- python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/install.d/10-debian-networking 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/install.d/10-debian-networking 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Hewlett-Packard Development 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:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# It would be eversogreat if we didn't need to do crap like this -echo $DISTRO_NAME > /etc/hostname - -# cloud images expect eth0 and eth1 to use dhcp. -mkdir -p /etc/network/interfaces.d -if ! grep -E -q '^source(|-directory) /etc/network/interfaces.d/\*' /etc/network/interfaces; then - echo "source /etc/network/interfaces.d/*" >> /etc/network/interfaces - echo 'Network configuration set to source /etc/network/interfaces.d/*' -fi -for interface in eth0 eth1; do - cat << EOF | tee /etc/network/interfaces.d/$interface -auto $interface -iface $interface inet dhcp -EOF -done diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/install.d/12-debian-locale-gen python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/install.d/12-debian-locale-gen --- python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/install.d/12-debian-locale-gen 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/install.d/12-debian-locale-gen 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Hewlett-Packard Development 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:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -f /etc/locale.gen ] && rm /etc/locale.gen - -debconf-set-selections - < /etc/default/locale < /etc/modprobe.d/blacklist.conf diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -adduser: -ca-certificates: -locales: -lsb-release: - phase: pre-install.d diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -{ - "default": { - "cloud-initramfs-growroot": "" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/README.rst python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -=========== -debootstrap -=========== - -Base element for creating minimal debian-based images. - -This element is incomplete by itself, you'll want to use elements like -debian-minimal or ubuntu-minimal to get an actual base image. - -There are two ways to configure apt-sources: - -1. Using the standard way of defining the default, backports, updates - and security repositories is the default. In this case you can - overwrite the two environment variables to adapt the behavior: - - * ``DIB_DISTRIBUTION_MIRROR``: the mirror to use (default: - ``__) - * ``DIB_DEBIAN_COMPONENTS``: (default: ``main``) a comma - separated list of components. For Debian this can be - e.g. ``main,contrib,non-free``. - - By default only the ``main`` component is used. If - ``DIB_DEBIAN_COMPONENTS`` (comma separated) from the - ``debootstrap`` element has been set, that list of components will - be used instead. - - Backports, updates and security are included unless ``DIB_RELEASE`` - is ``unstable``. - -2. Complete configuration given in the variable ``DIB_APT_SOURCES_CONF``. - - Each line contains exactly one entry for the sources.list.d - directory. The first word must be the logical name (which is used - as file name with ``.list`` automatically appended), followed by a - colon ``:``, followed by the complete repository specification. - - .. code-block:: bash - - DIB_APT_SOURCES_CONF=\ - "default:deb http://10.0.0.10/ stretch main contrib - mysecurity:deb http://10.0.0.10/ stretch-security main contrib" - -If necessary, a custom apt keyring and debootstrap script can be -supplied to the ``debootstrap`` command via ``DIB_APT_KEYRING`` and -``DIB_DEBIAN_DEBOOTSTRAP_SCRIPT`` respectively. Both options require the -use of absolute rather than relative paths. - -Use of this element will also require the tool 'debootstrap' to be -available on your system. It should be available on Ubuntu, Debian, -and Fedora. It is also recommended that the 'debian-keyring' package -be installed. - -The ``DIB_OFFLINE`` or more specific ``DIB_DEBIAN_USE_DEBOOTSTRAP_CACHE`` -variables can be set to prefer the use of a pre-cached root filesystem -tarball. - -The ``DIB_DEBOOTSTRAP_EXTRA_ARGS`` environment variable may be used to -pass extra arguments to the debootstrap command used to create the -base filesystem image. If --keyring is is used in ``DIB_DEBOOTSTRAP_EXTRA_ARGS``, -it will override ``DIB_APT_KEYRING`` if that is used as well. - -For further information about ``DIB_DEBIAN_DEBOOTSTRAP_SCRIPT`` , -``DIB_DEBIAN_USE_DEBOOTSTRAP_CACHE`` and ``DIB_DEBOOTSTRAP_EXTRA_ARGS`` -please consult "README.rst" of the debootstrap element. - -------------------- -Note on ARM systems -------------------- - -Because there is not a one-to-one mapping of ``ARCH`` to a kernel package, if -you are building an image for ARM on debian, you need to specify which kernel -you want in the environment variable ``DIB_ARM_KERNEL``. For instance, if you want -the ``linux-image-mx5`` package installed, set ``DIB_ARM_KERNEL`` to ``mx5``. - -.. element_deps:: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/root.d/08-debootstrap python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/root.d/08-debootstrap --- python-diskimage-builder-2.11.0/doc/source/elements/debootstrap/root.d/08-debootstrap 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/debootstrap/root.d/08-debootstrap 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -#!/bin/bash -# -# Copyright 2014 Hewlett-Packard Development 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 - -if [ -f ${TARGET_ROOT}/.extra_settings ] ; then - . ${TARGET_ROOT}/.extra_settings -fi - -[ -n "$DISTRO_NAME" ] -[ -n "$DIB_RELEASE" ] -[ -n "$DIB_DISTRIBUTION_MIRROR" ] - -DIB_DEBIAN_COMPONENTS=${DIB_DEBIAN_COMPONENTS:-main} -DIB_DEBOOTSTRAP_EXTRA_ARGS=${DIB_DEBOOTSTRAP_EXTRA_ARGS:-} -DEBOOTSTRAP_TARBALL=$DIB_IMAGE_CACHE/debootstrap-${DISTRO_NAME}-${DIB_RELEASE}-${ARCH}.tar.gz -http_proxy=${http_proxy:-} -no_proxy=${no_proxy:-} - -DEBOOTSTRAP_QEMU="" - -if [ -n "$DIB_OFFLINE" -o -n "${DIB_DEBIAN_USE_DEBOOTSTRAP_CACHE:-}" ] && [ -f $DEBOOTSTRAP_TARBALL ] ; then - echo $DEBOOTSTRAP_TARBALL found in cache. Using. - sudo tar -C $TARGET_ROOT --numeric-owner -xzf $DEBOOTSTRAP_TARBALL -else - - KEYRING_OPT= - if [ -n "${DIB_APT_KEYRING:-${DIB_DEBIAN_KEYRING:-}}" ] ; then - KEYRING_OPT="--keyring=${DIB_APT_KEYRING:-${DIB_DEBIAN_KEYRING:-}}" - fi - - # Have to --include=python because of dib-run-parts - # Have to --include=sudo for pre-install.d use of sudoers files - # Have to --include=busybox because initramfs needs it - - if [ $(dpkg --print-architecture) != ${ARCH} ]; then - # Target architecture diffrent from host architecture: - # there is the need to call 'qemu-debootstrap'. - DEBOOTSTRAP_QEMU="qemu-" - fi - - sudo sh -c "http_proxy=$http_proxy no_proxy=$no_proxy ${DEBOOTSTRAP_QEMU}debootstrap --verbose \ - --variant=minbase \ - --components=${DIB_DEBIAN_COMPONENTS} \ - --arch=${ARCH} \ - $KEYRING_OPT \ - $DIB_DEBOOTSTRAP_EXTRA_ARGS \ - $DIB_RELEASE \ - $TARGET_ROOT \ - $DIB_DISTRIBUTION_MIRROR \ - ${DIB_DEBIAN_DEBOOTSTRAP_SCRIPT:-}" - - # debootstrap creates sometimes a not-usable - # /etc/apt/sources.list: DIB wants to set up its own anyway - # and the old has to go. - sudo rm -fr ${TARGET_ROOT}/etc/apt/sources.list \ - ${TARGET_ROOT}/etc/apt/sources.list.d - - echo Caching debootstrap result in $DEBOOTSTRAP_TARBALL - if [ "${DIB_DEBOOTSTRAP_CACHE:-0}" != "0" ]; then - sudo tar --numeric-owner -C $TARGET_ROOT -zcf $DEBOOTSTRAP_TARBALL --exclude='./tmp/*' . - fi -fi - -sudo rm -f ${TARGET_ROOT}/.extra_settings diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-baremetal/binary-deps.d/deploy python-diskimage-builder-2.17.0/doc/source/elements/deploy-baremetal/binary-deps.d/deploy --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-baremetal/binary-deps.d/deploy 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-baremetal/binary-deps.d/deploy 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -bash -tgtd -tgtadm diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-baremetal/element-deps python-diskimage-builder-2.17.0/doc/source/elements/deploy-baremetal/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-baremetal/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-baremetal/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-baremetal/init.d/80-deploy python-diskimage-builder-2.17.0/doc/source/elements/deploy-baremetal/init.d/80-deploy --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-baremetal/init.d/80-deploy 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-baremetal/init.d/80-deploy 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -if [ -z "$ISCSI_TARGET_IQN" ]; then - err_msg "iscsi_target_iqn is not defined" - troubleshoot -fi - -t=0 -while ! target_disk=$(find_disk "$DISK"); do - if [ $t -eq 10 ]; then - break - fi - t=$(($t + 1)) - sleep 1 -done - -if [ -z "$target_disk" ]; then - err_msg "Could not find disk to use." - troubleshoot -fi - -echo "start iSCSI target on $target_disk" -start_iscsi_target "$ISCSI_TARGET_IQN" "$target_disk" ALL -if [ $? -ne 0 ]; then - err_msg "Failed to start iscsi target." - troubleshoot -fi - -echo "request boot server to deploy image" -d="i=$DEPLOYMENT_ID&k=$DEPLOYMENT_KEY&a=$BOOT_IP_ADDRESS&n=$ISCSI_TARGET_IQN&e=$FIRST_ERR_MSG" -wget --post-data "$d" "http://$BOOT_SERVER:10000" - -echo "waiting for notice of complete" -nc -l -p 10000 - -echo "stop iSCSI target on $target_disk" - -stop_iscsi_target - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-baremetal/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/deploy-baremetal/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-baremetal/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-baremetal/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -tgt: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-baremetal/README.rst python-diskimage-builder-2.17.0/doc/source/elements/deploy-baremetal/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-baremetal/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-baremetal/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -================ -deploy-baremetal -================ -A ramdisk that will expose the machine primary disk over iSCSI and reboot -once baremetal-deploy-helper signals it is finished. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-kexec/binary-deps.d/deploy-kexec python-diskimage-builder-2.17.0/doc/source/elements/deploy-kexec/binary-deps.d/deploy-kexec --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-kexec/binary-deps.d/deploy-kexec 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-kexec/binary-deps.d/deploy-kexec 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -kexec diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-kexec/element-deps python-diskimage-builder-2.17.0/doc/source/elements/deploy-kexec/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-kexec/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-kexec/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -deploy -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-kexec/init.d/81-deploy-kexec python-diskimage-builder-2.17.0/doc/source/elements/deploy-kexec/init.d/81-deploy-kexec --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-kexec/init.d/81-deploy-kexec 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-kexec/init.d/81-deploy-kexec 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -TFTP_MAC_ADDRESS="01-"`echo $BOOT_MAC_ADDRESS | sed 's/:/-/g' | tr "A-Z" "a-z"` -tftp -r /tftpboot/pxelinux.cfg/${TFTP_MAC_ADDRESS} -g ${BOOT_SERVER} -APPEND=$(tail -n1 ${TFTP_MAC_ADDRESS} | cut -f3- -d" ") - -KERNEL=$(get_kernel_parameter BOOT_IMAGE | sed 's/deploy_//g') -RAMDISK=$(echo $KERNEL | sed 's/kernel/ramdisk/') - -tftp -r ${KERNEL} -g ${BOOT_SERVER} -tftp -r ${RAMDISK} -g ${BOOT_SERVER} -kexec -l kernel --append="${APPEND}" --initrd=ramdisk && kexec -e diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-kexec/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/deploy-kexec/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-kexec/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-kexec/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -kexec-tools: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-kexec/README.rst python-diskimage-builder-2.17.0/doc/source/elements/deploy-kexec/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-kexec/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-kexec/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -============ -deploy-kexec -============ -Boots into the new image once baremetal-deploy-helper signals -it is finished by downloading the kernel and ramdisk via tftp, -and using the kexec utilities. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/binary-deps.d/deploy-targetcli python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/binary-deps.d/deploy-targetcli --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/binary-deps.d/deploy-targetcli 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/binary-deps.d/deploy-targetcli 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -targetcli diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/dracut-drivers.d/targetcli-drivers python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/dracut-drivers.d/targetcli-drivers --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/dracut-drivers.d/targetcli-drivers 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/dracut-drivers.d/targetcli-drivers 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -target_core_mod -iscsi_target_mod -target_core_iblock -target_core_file -target_core_pscsi -configfs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/element-deps python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/extra-data.d/50-add-targetcli-module python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/extra-data.d/50-add-targetcli-module --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/extra-data.d/50-add-targetcli-module 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/extra-data.d/50-add-targetcli-module 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/bash - -set -eu -set -o pipefail - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi - -MODULE_PATH="/usr/lib/dracut/modules.d" -sudo mkdir -p ${TMP_MOUNT_PATH}${MODULE_PATH} -sudo cp -r $(dirname $0)/module/ ${TMP_MOUNT_PATH}${MODULE_PATH}/50targetcli diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/extra-data.d/module/iscsi-func python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/extra-data.d/module/iscsi-func --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/extra-data.d/module/iscsi-func 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/extra-data.d/module/iscsi-func 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -function start_iscsi_target() { - local iqn=$1 - local dev=$2 - local cli=$3 - - # used by tgtd - mkdir -p /var/run - - ln -s /usr/bin/targetcli /targetcli_bin.py - /targetcli-wrapper /backstores/block create block1 dev=$dev - /targetcli-wrapper /iscsi create $iqn - /targetcli-wrapper /iscsi/$iqn/tpg1/luns create /backstores/block/block1 1 - /targetcli-wrapper /iscsi/$iqn/tpg1/portals create $BOOT_IP_ADDRESS - /targetcli-wrapper /iscsi/$iqn/tpg1 set attribute authentication=0 - /targetcli-wrapper /iscsi/$iqn/tpg1 set attribute demo_mode_write_protect=0 - /targetcli-wrapper /iscsi/$iqn/tpg1 set attribute generate_node_acls=1 - -} - -function stop_iscsi_target() { - /targetcli-wrapper clearconfig confirm=True -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/extra-data.d/module/module-setup.sh python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/extra-data.d/module/module-setup.sh --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/extra-data.d/module/module-setup.sh 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/extra-data.d/module/module-setup.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -#!/bin/bash - -# Dracut is bash too, and it doesn't play nicely with our usual sets -# dib-lint: disable=setu sete setpipefail dibdebugtrace - -check() { - return 0 -} - -depends() { - return 0 -} - -install() { - inst /bin/targetcli - inst "$moddir/targetcli-wrapper" /targetcli-wrapper - inst "$moddir/iscsi-func" /iscsi-func - # Install all of Python - # TODO(bnemec): At some point this will need to be extended to support - # Python 3, but for the moment we aren't using that anyway. - inst /usr/bin/python - local all_of_python=() - while IFS='' read -r -d '' i; do - all_of_python+=("$i") - done < <(find /usr/lib64/python2.7/ /usr/lib/python2.7/ -type f -not -name "*.pyc" -not -name "*.pyo" -print0) - inst_multiple "${all_of_python[@]}" -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/extra-data.d/module/targetcli-wrapper python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/extra-data.d/module/targetcli-wrapper --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/extra-data.d/module/targetcli-wrapper 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/extra-data.d/module/targetcli-wrapper 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -#!/usr/bin/python - -# Copyright 2014 Red Hat, Inc. -# -# 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. - -import rtslib - -import targetcli_bin - - -class MyISCSIFabricModule(rtslib.fabric.ISCSIFabricModule): - def __init__(self): - super(rtslib.fabric.ISCSIFabricModule, self).__init__('iscsi') - self.wwn_types = ('free',) - - -rtslib.fabric.fabric_modules['iscsi'] = MyISCSIFabricModule - - -targetcli_bin.main() diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -targetcli: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/README.rst python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-targetcli/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-targetcli/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -deploy-targetcli -================ - -Use targetcli for the deploy ramdisk - -Provides the necessary scripts and dependencies to use targetcli -for exporting the iscsi target in the deploy ramdisk. - -Implemented as a dracut module, so will only work with dracut-based -ramdisks. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-tgtadm/binary-deps.d/deploy-tgtadm python-diskimage-builder-2.17.0/doc/source/elements/deploy-tgtadm/binary-deps.d/deploy-tgtadm --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-tgtadm/binary-deps.d/deploy-tgtadm 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-tgtadm/binary-deps.d/deploy-tgtadm 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -tgtadm -tgtd diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-tgtadm/extra-data.d/50-inject-tgtadm-iscsi-func python-diskimage-builder-2.17.0/doc/source/elements/deploy-tgtadm/extra-data.d/50-inject-tgtadm-iscsi-func --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-tgtadm/extra-data.d/50-inject-tgtadm-iscsi-func 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-tgtadm/extra-data.d/50-inject-tgtadm-iscsi-func 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/bash - -set -eu -set -o pipefail - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi - -RAMDISK_SCRIPT_PATH="$TMP_MOUNT_PATH/tmp/ramdisk-build/scripts/d" -mkdir -p ${RAMDISK_SCRIPT_PATH} -cp $(dirname $0)/scripts/iscsi-func ${RAMDISK_SCRIPT_PATH} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-tgtadm/extra-data.d/scripts/iscsi-func python-diskimage-builder-2.17.0/doc/source/elements/deploy-tgtadm/extra-data.d/scripts/iscsi-func --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-tgtadm/extra-data.d/scripts/iscsi-func 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-tgtadm/extra-data.d/scripts/iscsi-func 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -function start_iscsi_target() { - local iqn=$1 - local dev=$2 - local cli=$3 - - # used by tgtd - mkdir -p /var/run - - tgtd - wait_for 10 0.5 check_tgtd_socket - - tgtadm --lld iscsi --mode target --op new --tid 1 --targetname "$iqn" - tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 --backing-store "$dev" - tgtadm --lld iscsi --mode target --op bind --tid 1 --initiator-address "$cli" -} - -function stop_iscsi_target() { - tgtadm --lld iscsi --mode logicalunit --op delete --tid 1 --lun 1 - tgtadm --lld iscsi --mode target --op delete --tid 1 - killall tgtd -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-tgtadm/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/deploy-tgtadm/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-tgtadm/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-tgtadm/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -tgt: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/deploy-tgtadm/README.rst python-diskimage-builder-2.17.0/doc/source/elements/deploy-tgtadm/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/deploy-tgtadm/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/deploy-tgtadm/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -deploy-tgtadm -============= - -Use tgtadm and tgtd for the deploy ramdisk - -Provides the necessary scripts and dependencies to use tgtadm -and tgtd for exporting the iscsi target in the deploy ramdisk. - -Will only work with the standard (not dracut) ramdisk. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/devuser/environment.d/50-devuser python-diskimage-builder-2.17.0/doc/source/elements/devuser/environment.d/50-devuser --- python-diskimage-builder-2.11.0/doc/source/elements/devuser/environment.d/50-devuser 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/devuser/environment.d/50-devuser 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -export DIB_DEV_USER_USERNAME=${DIB_DEV_USER_USERNAME:-devuser} -export DIB_DEV_USER_SHELL=${DIB_DEV_USER_SHELL:-} -export DIB_DEV_USER_PWDLESS_SUDO=${DIB_DEV_USER_PWDLESS_SUDO:-} -export DIB_DEV_USER_AUTHORIZED_KEYS=${DIB_DEV_USER_AUTHORIZED_KEYS:-} -export DIB_DEV_USER_PASSWORD=${DIB_DEV_USER_PASSWORD:-} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/devuser/extra-data.d/50-devuser python-diskimage-builder-2.17.0/doc/source/elements/devuser/extra-data.d/50-devuser --- python-diskimage-builder-2.11.0/doc/source/elements/devuser/extra-data.d/50-devuser 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/devuser/extra-data.d/50-devuser 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [ -n "$DIB_DEV_USER_AUTHORIZED_KEYS" ]; then - if [ -f "$DIB_DEV_USER_AUTHORIZED_KEYS" ]; then - cat $DIB_DEV_USER_AUTHORIZED_KEYS >> $TMP_HOOKS_PATH/devuser-ssh-authorized-keys - fi -else - for fmt in rsa dsa; do - if [ -f "$HOME/.ssh/id_$fmt.pub" ]; then - cat $HOME/.ssh/id_$fmt.pub >> $TMP_HOOKS_PATH/devuser-ssh-authorized-keys - break - fi - done -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/devuser/install.d/50-devuser python-diskimage-builder-2.17.0/doc/source/elements/devuser/install.d/50-devuser --- python-diskimage-builder-2.11.0/doc/source/elements/devuser/install.d/50-devuser 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/devuser/install.d/50-devuser 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -user_shell_args= -if [ -n "${DIB_DEV_USER_SHELL}" ]; then - user_shell_args="-s ${DIB_DEV_USER_SHELL}" -fi -useradd -m ${DIB_DEV_USER_USERNAME} $user_shell_args -set +x -if [ -n "${DIB_DEV_USER_PASSWORD}" ]; then - echo "Setting password." - echo "${DIB_DEV_USER_USERNAME}:${DIB_DEV_USER_PASSWORD}" | chpasswd -fi -set -x - -if [ -n "${DIB_DEV_USER_PWDLESS_SUDO}" ]; then - cat > /etc/sudoers.d/${DIB_DEV_USER_USERNAME} << EOF -${DIB_DEV_USER_USERNAME} ALL=(ALL) NOPASSWD:ALL -EOF - chmod 0440 /etc/sudoers.d/${DIB_DEV_USER_USERNAME} - visudo -c || rm /etc/sudoers.d/${DIB_DEV_USER_USERNAME} -fi - -if [ -f /tmp/in_target.d/devuser-ssh-authorized-keys ]; then - mkdir -p /home/${DIB_DEV_USER_USERNAME}/.ssh - cp /tmp/in_target.d/devuser-ssh-authorized-keys /home/${DIB_DEV_USER_USERNAME}/.ssh/authorized_keys -fi - -chown -R ${DIB_DEV_USER_USERNAME}:${DIB_DEV_USER_USERNAME} /home/${DIB_DEV_USER_USERNAME} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/devuser/README.rst python-diskimage-builder-2.17.0/doc/source/elements/devuser/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/devuser/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/devuser/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -======= -devuser -======= - -Creates a user that is useful for development / debugging. The following -environment variables can be useful for configuration: - -Environment Variables ---------------------- - -DIB_DEV_USER_USERNAME - :Required: No - :Default: devuser - :Description: Username for the created user. - -DIB_DEV_USER_SHELL - :Required: No - :Default: System default (The useradd default is used) - :Description: Full path for the shell of the user. This is passed to useradd - using the -s parameter. Note that this does not install the (possibly) - required shell package. - -DIB_DEV_USER_PWDLESS_SUDO - :Required: No - :Default: No - :Description: Enable passwordless sudo for the user. - -DIB_DEV_USER_AUTHORIZED_KEYS - :Required: No - :Default: $HOME/.ssh/id_{rsa,dsa}.pub - :Description: Path to a file to copy into this users' .ssh/authorized_keys - If this is not specified then an attempt is made to use a the building - user's public key. To disable this behavior specify an invalid path for - this variable (such as /dev/null). - -DIB_DEV_USER_PASSWORD - :Required: No - :Default: Password is disabled - :Description: Set the default password for this user. This is a fairly - insecure method of setting the password and is not advised. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/element-deps python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -dib-init-system -package-installs -pkg-map diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces --- python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -SCRIPTDIR=$(dirname $0) - -# this script is not needed on Gentoo. -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 - -if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then - if [ -e "/etc/redhat-release" ] ; then - # the init system is upstart but networking is using sysv compatibility (i.e. Centos/RHEL 6) - install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.init /etc/init.d/dhcp-all-interfaces - chkconfig dhcp-all-interfaces on - else - 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 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 - sed -i "s/TimeoutStartSec=DIB_DHCP_TIMEOUT/TimeoutStartSec=${DIB_DHCP_TIMEOUT:-30}s/" /usr/lib/systemd/system/dhcp-interface@.service -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 - update-rc.d dhcp-all-interfaces defaults -elif [ "$DISTRO_NAME" == "gentoo" ]; then - # let ipv6 use normal slaac - sed -i 's/slaac/#slaac/g' /etc/dhcpcd.conf - # don't let dhcpcd set domain name or hostname - sed -i 's/domain_name\,\ domain_search\,\ host_name/domain_search/g' /etc/dhcpcd.conf - rc-update add dhcpcd default -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces --- python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Cloud images may hard code the eth0 interfaces so they -# boot with DHCP. - -# Fedora -rm -f /etc/sysconfig/network-scripts/ifcfg-eth* - -# Ubuntu -rm -f /etc/network/interfaces.d/eth*.cfg - -# Debian -rm -f /etc/network/interfaces.d/eth* - -# Gentoo -rm -f /etc/conf.d/net* - -# /etc/network/interfaces distributions -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 - fi -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.conf python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.conf --- python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.conf 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -# Call a script to generate a /etc/network/interfaces file to DHCP all available interfaces -# Then remove this config file so the script is never run again - -description "DHCP any connected, but unconfigured network interfaces" - -start on starting network-interface -instance $INTERFACE - -task - -exec /usr/local/sbin/dhcp-all-interfaces.sh $INTERFACE diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.init python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.init --- python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.init 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.init 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -#!/bin/sh -e -### BEGIN INIT INFO -# Provides: dhcp-all-interfaces -# Required-Start: $local_fs -# Required-Stop: $local_fs -# Default-Start: S -# Default-Stop: 0 6 -# X-Start-Before: networking -# chkconfig: 3 9 50 -# Short-Description: Autodetect network interfaces -# Description: Autodetect network interfaces during boot and configure them for DHCP -### END INIT INFO - -NAME=dhcp-all-interfaces -INIT_NAME=/etc/init.d/${NAME} -SCRIPT_NAME=/usr/local/sbin/${NAME}.sh - -[ -x $SCRIPT_NAME ] || exit 0 - -case "$1" in - start) - $SCRIPT_NAME - ;; - stop) - ;; - *) - echo "Usage: $INIT_NAME {start|stop}" - exit 1 - ;; -esac - -exit 0 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh --- python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -INTERFACE=${1:-} #optional, if not specified configure all available interfaces -ENI_FILE="/etc/network/interfaces" - -PATH=/sbin:$PATH - -if [ -d "/etc/network" ]; then - CONF_TYPE="eni" -elif [ -d "/etc/sysconfig/network-scripts/" ]; then - CONF_TYPE="rhel-netscripts" - SCRIPTS_PATH="/etc/sysconfig/network-scripts/" -elif [ -d "/etc/sysconfig/network/" ]; then - # SUSE network scripts location - CONF_TYPE="suse-netscripts" - SCRIPTS_PATH="/etc/sysconfig/network/" -else - echo "Unsupported network configuration type!" - exit 1 -fi - -ARGS="$0 $@" - -function serialize_me() { - if [ "$CONF_TYPE" == "eni" ]; then - # Serialize runs so that we don't miss hot-add interfaces - FLOCKED=${FLOCKED:-} - if [ -z "$FLOCKED" ] ; then - FLOCKED=true exec flock -x $ENI_FILE $ARGS - fi - fi -} - -function get_if_link() { - cat /sys/class/net/${1}/carrier || echo 0 -} - -function get_if_type() { - cat /sys/class/net/${1}/type -} - -function enable_interface() { - local interface=$1 - - serialize_me - if [ "$CONF_TYPE" == "eni" ]; then - printf "auto $interface\niface $interface inet dhcp\n\n" >>$ENI_FILE - elif [ "$CONF_TYPE" == "rhel-netscripts" ]; then - if [ "$(get_if_type $interface)" == "32" ]; then - printf "DEVICE=\"$interface\"\nBOOTPROTO=\"dhcp\"\nONBOOT=\"yes\"\nTYPE=\"InfiniBand\"\nCONNECTED_MODE=\"no\"\nDEFROUTE=\"yes\"\nPEERDNS=\"yes\"\nPEERROUTES=\"yes\"\nIPV4_FAILURE_FATAL=\"yes\"\nIPV6INIT=\"no\"" >"${SCRIPTS_PATH}ifcfg-$interface" - else - printf "DEVICE=\"$interface\"\nBOOTPROTO=\"dhcp\"\nONBOOT=\"yes\"\nTYPE=\"Ethernet\"" >"${SCRIPTS_PATH}ifcfg-$interface" - fi - elif [ "$CONF_TYPE" == "suse-netscripts" ]; then - printf "BOOTPROTO=\"dhcp\"\nSTARTMODE=\"auto\"" >"${SCRIPTS_PATH}ifcfg-$interface" - fi - echo "Configured $1" - -} - - -function config_exists() { - local interface=$1 - if [[ "$CONF_TYPE" =~ "netscripts" ]]; then - if [ -f "${SCRIPTS_PATH}ifcfg-$interface" ]; then - return 0 - fi - else - if ifquery $interface >/dev/null 2>&1; then - if [ -z "$(ifquery $interface 2>&1)" ]; then - return 1 - else - return 0 - fi - else - return 1 - fi - fi - return 1 -} - -function inspect_interface() { - local interface=$1 - local mac_addr_type - mac_addr_type=$(cat /sys/class/net/${interface}/addr_assign_type) - - echo -n "Inspecting interface: $interface..." - if config_exists $interface; then - echo "Has config, skipping." - elif [ "$mac_addr_type" != "0" ]; then - echo "Device has generated MAC, skipping." - else - local has_link - local tries - for ((tries = 0; tries < 20; tries++)); do - # Need to set the link up on each iteration - ip link set dev $interface up &>/dev/null - has_link=$(get_if_link $interface) - [ "$has_link" == "1" ] && break - sleep 1 - done - if [ "$has_link" == "1" ]; then - enable_interface "$interface" - else - echo "No link detected, skipping" - fi - fi -} - -if [ -n "$INTERFACE" ]; then - inspect_interface $INTERFACE -else - for iface in $(ls /sys/class/net | grep -v ^lo$); do - inspect_interface $iface - done -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces-udev.rules python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces-udev.rules --- python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces-udev.rules 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces-udev.rules 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -SUBSYSTEM=="net", KERNEL!="lo", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="dhcp-interface@$name.service" diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-interface@.service python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-interface@.service --- python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-interface@.service 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/install.d/dhcp-interface@.service 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -[Unit] -Description=DHCP interface %i -# We want to run after network.target so it doesn't try to bring -# up the interfaces a second time, but network-online should not -# be reached until after we've brought up the interfaces. -# We also need to break the default dependencies which prevents -# this from operating on Ubuntu/Debian as the unit gets stuck -# into a cyclical dependency loop. -DefaultDependencies=no -After=network.target -Before=network-online.target -Wants=network-online.target - -ConditionPathExists=!/etc/sysconfig/network-scripts/ifcfg-%i - -[Service] -Type=oneshot -User=root -ExecStartPre=/usr/local/sbin/dhcp-all-interfaces.sh %i -ExecStart=/sbin/ifup %i -RemainAfterExit=true -TimeoutStartSec=DIB_DHCP_TIMEOUT - -[Install] -WantedBy=multi-user.target diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -dhcp-client: -ifupdown: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -{ - "family": { - "redhat": { - "dhcp-client": "dhclient" - }, - "gentoo": { - "dhcp-client": "net-misc/dhcpcd" - }, - "suse": { - "dhcp-client": "dhcp-client" - }, - "debian": { - "ifupdown": "ifupdown" - } - }, - "default": { - "dhcp-client": "isc-dhcp-client", - "ifupdown": "" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/README.rst python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/dhcp-all-interfaces/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dhcp-all-interfaces/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -=================== -dhcp-all-interfaces -=================== -Autodetect network interfaces during boot and configure them for DHCP - -The rationale for this is that we are likely to require multiple -network interfaces for use cases such as baremetal and there is no way -to know ahead of time which one is which, so we will simply run a -DHCP client on all interfaces with real MAC addresses (except lo) that -are visible on the first boot. - -On non-Gentoo based distributions the script -/usr/local/sbin/dhcp-all-interfaces.sh will be called early in each -boot and will scan available network interfaces and ensure they are -configured properly before networking services are started. - -On Gentoo based distributions we will install the dhcpcd package and -ensure the service starts at boot. This service automatically sets -up all interfaces found via dhcp and/or dhcpv6 (or SLAAC). - -Environment Variables ---------------------- - -DIB_DHCP_TIMEOUT - :Required: No - :Default: 30 - :Description: Amount of time in seconds that the systemd service will - wait to get an address. - :Example: DIB_DHCP_TIMEOUT=300 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dib-init-system/dib-init-system python-diskimage-builder-2.17.0/doc/source/elements/dib-init-system/dib-init-system --- python-diskimage-builder-2.11.0/doc/source/elements/dib-init-system/dib-init-system 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dib-init-system/dib-init-system 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Debian Jessie and Debian Stretch use /bin/systemctl. -# (/sbin/init is only available if systemd-sysv is installed.) - -if [ -f /usr/bin/systemctl -o -f /bin/systemctl ]; then - echo "systemd" -elif [[ -f /sbin/initctl ]]; then - echo "upstart" -elif [[ -f /etc/gentoo-release ]]; then - if [[ "${GENTOO_PROFILE}" =~ systemd ]]; then - echo "systemd" - else - echo "openrc" - fi -elif [[ -f /sbin/init ]]; then - if [[ -f /bin/systemd ]]; then - echo "systemd" - else - echo "sysv" - fi -else - echo "Unknown init system" - exit 1 -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dib-init-system/environment.d/10-dib-init-system.bash python-diskimage-builder-2.17.0/doc/source/elements/dib-init-system/environment.d/10-dib-init-system.bash --- python-diskimage-builder-2.11.0/doc/source/elements/dib-init-system/environment.d/10-dib-init-system.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dib-init-system/environment.d/10-dib-init-system.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -DIB_INIT_SYSTEM=$(PATH="$PATH:$(dirname $BASH_SOURCE)/.." dib-init-system) -export DIB_INIT_SYSTEM diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dib-init-system/install.d/20-install-init-scripts python-diskimage-builder-2.17.0/doc/source/elements/dib-init-system/install.d/20-install-init-scripts --- python-diskimage-builder-2.11.0/doc/source/elements/dib-init-system/install.d/20-install-init-scripts 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dib-init-system/install.d/20-install-init-scripts 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -#!/bin/bash -# Note that this relies on the detail that all elements share one dir inside -# the chroot. This will copy all the files that elements have added to -# element/static into the image. Mode, symlinks etc will be respected. - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -scripts_dir="$(dirname $0)/../init-scripts/$DIB_INIT_SYSTEM/" -if [ -d "$scripts_dir" ]; then - dest= - case $DIB_INIT_SYSTEM in - upstart) dest=/etc/init/ ;; - openrc) dest=/etc/init.d/ ;; - systemd) dest=/usr/lib/systemd/system/ ;; - sysv) dest=/etc/init.d/ ;; - esac - - if [ -z "$dest" ]; then - echo "ERROR: DIB_INIT_SYSTEM ($DIB_INIT_SYSTEM) is not a known type" - exit 1 - fi - cp -RP $scripts_dir. $dest || true -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dib-init-system/post-install.d/10-enable-init-scripts python-diskimage-builder-2.17.0/doc/source/elements/dib-init-system/post-install.d/10-enable-init-scripts --- python-diskimage-builder-2.11.0/doc/source/elements/dib-init-system/post-install.d/10-enable-init-scripts 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dib-init-system/post-install.d/10-enable-init-scripts 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -SCRIPTS_DIR="$(dirname $0)/../init-scripts/${DIB_INIT_SYSTEM}/" -if [[ -d "${SCRIPTS_DIR}" ]]; then - # figure out init prefix - case "${DIB_INIT_SYSTEM}" in - upstart) ;; - openrc) - # only gentoo needs manual runlevel adding - for INIT_SCRIPT in "${SCRIPTS_DIR}"*; do - rc-update add $(basename "${INIT_SCRIPT}") default - done - ;; - systemd) ;; - sysv) ;; - *) - echo "ERROR: DIB_INIT_SYSTEM (${DIB_INIT_SYSTEM}) is not a known type" - exit 1 - ;; - esac -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dib-init-system/pre-install.d/04-dib-init-system python-diskimage-builder-2.17.0/doc/source/elements/dib-init-system/pre-install.d/04-dib-init-system --- python-diskimage-builder-2.11.0/doc/source/elements/dib-init-system/pre-install.d/04-dib-init-system 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dib-init-system/pre-install.d/04-dib-init-system 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -install -m 0755 -o root -g root $(dirname $0)/../dib-init-system /usr/bin/ diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dib-init-system/README.rst python-diskimage-builder-2.17.0/doc/source/elements/dib-init-system/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/dib-init-system/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dib-init-system/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -=============== -dib-init-system -=============== - -Installs a script (dib-init-system) which outputs the type of init system in -use on the target image. Also sets an environment variable ``DIB_INIT_SYSTEM`` -to this value. - -Any files placed in a ``init-scripts/INIT_SYSTEM`` directory inside the -element will be copied into the appropriate directory if ``INIT_SYSTEM`` -is in use on the host. - -Environment Variables ---------------------- - -DIB_INIT_SYSTEM - :Description: One of upstart, systemd, or sysv depending on the init system - in use for the target image. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dib-python/environment.d/50-dib-python-version python-diskimage-builder-2.17.0/doc/source/elements/dib-python/environment.d/50-dib-python-version --- python-diskimage-builder-2.11.0/doc/source/elements/dib-python/environment.d/50-dib-python-version 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dib-python/environment.d/50-dib-python-version 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -# Pick which distros we need to force python2 -if [ -z "${DIB_PYTHON_VERSION:-}" ]; then - if [ "$DISTRO_NAME" == "ubuntu" ]; then - if [ "$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" == "rhel7" ]; 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 -export DIB_PYTHON=python${DIB_PYTHON_VERSION} - -# Local variables: -# mode: sh -# End: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dib-python/pre-install.d/01-dib-python python-diskimage-builder-2.17.0/doc/source/elements/dib-python/pre-install.d/01-dib-python --- python-diskimage-builder-2.11.0/doc/source/elements/dib-python/pre-install.d/01-dib-python 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dib-python/pre-install.d/01-dib-python 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -python_path=$(command -v python${DIB_PYTHON_VERSION}) -if [ -z "$python_path" ]; then - echo "Could not find python${DIB_PYTHON_VERSION} executable." - exit 1 -fi - -ln -sf $python_path /usr/local/bin/dib-python diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dib-python/README.rst python-diskimage-builder-2.17.0/doc/source/elements/dib-python/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/dib-python/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dib-python/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -========== -dib-python -========== - -Adds a symlink to `/usr/local/bin/dib-python` which points at either a -`python2` or `python3` executable as appropriate. - -In-chroot scripts should use this as their interpreter -(`#!/usr/local/bin/dib-python`) to make scripts that are compatible -with both `python2` and `python3`. We can not assume -`/usr/bin/python` exists, as some platforms have started shipping with -only Python 3. - -`DIB_PYTHON` will be exported as the python interpreter. You should -use this instead of `python script.py` (e.g. `${DIB_PYTHON} -script.py`). Note you can also call `/usr/local/bin/dib-python -script.py` but in some circumstances, such as creating a `virtualenv`, -it can create somewhat confusing references to `dib-python` that -remain in the built image. - -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 -Nru python-diskimage-builder-2.11.0/doc/source/elements/dib-run-parts/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/dib-run-parts/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/dib-run-parts/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dib-run-parts/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -dib-utils: \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dib-run-parts/README.rst python-diskimage-builder-2.17.0/doc/source/elements/dib-run-parts/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/dib-run-parts/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dib-run-parts/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -============= -dib-run-parts -============= - -.. warning:: - - This element is deprecated and is left only for compatibility. - Please read the notes. - -This element install the ``dib-utils`` package to provide -``dib-run-parts``. - -Previously this element was a part of most base images and copied the -internal version of ``dib-run-parts`` to ``/usr/local/bin`` during the -build. Due to a (longstanding) oversight this was never removed and -stayed in the final image. The image build process now uses a private -copy of ``dib-run-parts`` during the build, so this element has become -deprecated. - -For compatibility this element simply installs the ``dib-utils`` -package, which will provide ``dib-run-parts``. However, this is -probably better expressed as a dependency in individual elements. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/disable-selinux/post-install.d/15-disable-selinux python-diskimage-builder-2.17.0/doc/source/elements/disable-selinux/post-install.d/15-disable-selinux --- python-diskimage-builder-2.11.0/doc/source/elements/disable-selinux/post-install.d/15-disable-selinux 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/disable-selinux/post-install.d/15-disable-selinux 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -config=/etc/selinux/config -[ -e $config ] && sed -i "s%^\(SELINUX=\s*\).*$%SELINUX=disabled%" $config diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dkms/element-deps python-diskimage-builder-2.17.0/doc/source/elements/dkms/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/dkms/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dkms/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dkms/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/dkms/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/dkms/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dkms/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -dkms: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dkms/post-install.d/97-dkms python-diskimage-builder-2.17.0/doc/source/elements/dkms/post-install.d/97-dkms --- python-diskimage-builder-2.11.0/doc/source/elements/dkms/post-install.d/97-dkms 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dkms/post-install.d/97-dkms 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -#!/bin/bash -# Trigger a run of dkms for all the modules installed -# to ensure we have valid modules build for all. - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -modules=$(dkms status | tr ',:' ' ' | awk '{ print $1 "/" $2 }') -kernels=$(ls /usr/src/linux-headers-*-*-* -d | sed -e 's|/usr/src/linux-headers-||' || echo "") -# NOTE(bnemec): On Fedora, the versions can be found in /usr/src/kernels -if [ -z "$kernels" ]; then - kernels=$(ls /usr/src/kernels/* -d | sed -e 's|/usr/src/kernels/||' || echo "") -fi -if [ -z "$kernels" ]; then - echo "Warning: No kernel versions found for DKMS" -fi -__ARCH=$ARCH -unset ARCH - -for module in $modules ; do - for kernel in $kernels ; do - dkms build $module -k $kernel - dkms install $module -k $kernel - done -done - -ARCH=$__ARCH - -dkms status diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dkms/README.rst python-diskimage-builder-2.17.0/doc/source/elements/dkms/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/dkms/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dkms/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -==== -dkms -==== -This is the dkms (Dynamic Kernel Module System) element. - -Some distributions such as Fedora and Ubuntu include DKMS in their packaging. -In these distros, it is reasonable to include dkms. Other RHEL based -derivatives do not include DKMS, so those distros should not use the DKMS -element. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/docker/element-provides python-diskimage-builder-2.17.0/doc/source/elements/docker/element-provides --- python-diskimage-builder-2.11.0/doc/source/elements/docker/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/docker/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -operating-system diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/docker/extra-data.d/01-docker-minimal python-diskimage-builder-2.17.0/doc/source/elements/docker/extra-data.d/01-docker-minimal --- python-diskimage-builder-2.11.0/doc/source/elements/docker/extra-data.d/01-docker-minimal 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/docker/extra-data.d/01-docker-minimal 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Hewlett-Packard Development 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 - -# This is not using install-packages because it's before install-packages can -# work - and is work needed to make it possible for it to work -if [ -x $TMP_MOUNT_PATH/usr/bin/apt-get ] ; then - sudo chroot $TMP_MOUNT_PATH apt-get update - sudo chroot $TMP_MOUNT_PATH apt-get -y install python -elif [ -x $TMP_MOUNT_PATH/bin/dnf ] ; then - sudo chroot $TMP_MOUNT_PATH dnf install -y findutils -elif [ -x $TMP_MOUNT_PATH/usr/bin/yum ] ; then - sudo chroot $TMP_MOUNT_PATH yum install -y findutils -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/docker/README.rst python-diskimage-builder-2.17.0/doc/source/elements/docker/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/docker/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/docker/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -====== -docker -====== - -Base element for creating images from docker containers. - -This element is incomplete by itself, you'll want to add additional elements, -such as dpkg or yum to get richer features. At its heart, this element simply -exports a root tarball from a named docker container so that other -diskimage-builder elements can build on top of it. - -The variables `DISTRO_NAME` and `DIB_RELEASE` will be used to decide which -docker image to pull, and are required for most other elements. Additionally, -the `DIB_DOCKER_IMAGE` environment variable can be set in addition to -`DISTRO_NAME` and `DIB_RELEASE` if a different docker image is desired. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/docker/root.d/08-docker python-diskimage-builder-2.17.0/doc/source/elements/docker/root.d/08-docker --- python-diskimage-builder-2.11.0/doc/source/elements/docker/root.d/08-docker 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/docker/root.d/08-docker 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Hewlett-Packard Development 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 - -if [ -f ${TARGET_ROOT}/.extra_settings ] ; then - . ${TARGET_ROOT}/.extra_settings -fi - -[ -n "$DISTRO_NAME" ] -[ -n "$DIB_RELEASE" ] - -DIB_DOCKER_IMAGE=${DIB_DOCKER_IMAGE:-${DISTRO_NAME}:${DIB_RELEASE}} - -container=$(docker run -d $DIB_DOCKER_IMAGE /bin/sh) -docker export $container | sudo tar -C $TARGET_ROOT --numeric-owner -xf - -docker rm $container - -sudo rm -f ${TARGET_ROOT}/.extra_settings diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/bin/install-packages python-diskimage-builder-2.17.0/doc/source/elements/dpkg/bin/install-packages --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/bin/install-packages 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/bin/install-packages 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -#!/bin/bash - -# Copyright 2012 Hewlett-Packard Development 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:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# install-packages package [package ...] - -ACTION=install -MAP_ELEMENT="" - -SCRIPTNAME=$(basename $0) -function show_options () { - echo "Usage: $SCRIPTNAME [package ...]" - echo - echo "Options:" - echo " -u -- update all packages" - echo " -e -- erase/remove packages" - echo " -m -- use custom element package map (Example: -m nova)" - exit 0 -} - -install_deb_packages () { - DEBIAN_FRONTEND=noninteractive \ - http_proxy=${http_proxy:-} https_proxy=${https_proxy:-} \ - no_proxy=${no_proxy:-} \ - apt-get --option "Dpkg::Options::=--force-confold" \ - --option "Dpkg::Options::=--force-confdef" --assume-yes "$@" -} - -TEMP=$(getopt -o hudem: -n $SCRIPTNAME -- "$@") -if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi -eval set -- "$TEMP" - -while true ; do - case "$1" in - -u) install_deb_packages dist-upgrade; exit 0;; - -e) ACTION="remove"; shift;; - -m) MAP_ELEMENT=$2; shift 2;; - -h) show_options;; - --) shift; break ;; - *) echo "Error: unsupported option $1."; exit 1;; - esac -done - -PKGS=$@ -if [ -n "$MAP_ELEMENT" ]; then - if ! PKGS=$(pkg-map --element $MAP_ELEMENT $@); then - echo "bin/pkg-map error. $PKGS" - exit 1 - fi -fi - -if [ -z "${PKGS}" ]; then - echo "Not running install-packages $ACTION with empty packages list" -else - install_deb_packages $ACTION $PKGS -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/cleanup.d/40-unblock-daemons python-diskimage-builder-2.17.0/doc/source/elements/dpkg/cleanup.d/40-unblock-daemons --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/cleanup.d/40-unblock-daemons 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/cleanup.d/40-unblock-daemons 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$TARGET_ROOT" ] - -sudo mv $TARGET_ROOT/sbin/start-stop-daemon.REAL $TARGET_ROOT/sbin/start-stop-daemon - -if [ -f $TARGET_ROOT/sbin/initctl.REAL ]; then - sudo mv $TARGET_ROOT/sbin/initctl.REAL $TARGET_ROOT/sbin/initctl -fi - -sudo rm $TARGET_ROOT/usr/sbin/policy-rc.d diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/cleanup.d/50-remove-img-build-proxy python-diskimage-builder-2.17.0/doc/source/elements/dpkg/cleanup.d/50-remove-img-build-proxy --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/cleanup.d/50-remove-img-build-proxy 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/cleanup.d/50-remove-img-build-proxy 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$TARGET_ROOT" ] - -# Undo our proxy support -sudo rm -f $TARGET_ROOT/etc/apt/apt.conf.d/60img-build-proxy diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/cleanup.d/60-untrim-dpkg python-diskimage-builder-2.17.0/doc/source/elements/dpkg/cleanup.d/60-untrim-dpkg --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/cleanup.d/60-untrim-dpkg 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/cleanup.d/60-untrim-dpkg 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$TARGET_ROOT" ] - -sudo rm $TARGET_ROOT/etc/dpkg/dpkg.cfg.d/02apt-speedup -sudo rm $TARGET_ROOT/etc/apt/apt.conf.d/no-languages diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/element-deps python-diskimage-builder-2.17.0/doc/source/elements/dpkg/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -install-bin -manifests -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/extra-data.d/01-copy-apt-keys python-diskimage-builder-2.17.0/doc/source/elements/dpkg/extra-data.d/01-copy-apt-keys --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/extra-data.d/01-copy-apt-keys 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/extra-data.d/01-copy-apt-keys 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#!/bin/bash -# -# Copyright 2014 Hewlett-Packard Development 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:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -DIB_ADD_APT_KEYS=${DIB_ADD_APT_KEYS:-""} -if [ -z "${DIB_ADD_APT_KEYS}" ]; then - echo "DIB_ADD_APT_KEYS is not set - not importing keys" - exit 0 -fi - -DIR=${TMP_MOUNT_PATH}/tmp/apt_keys -if [ -e ${DIR} ]; then - echo "${DIR} already exists!" - exit 1 -fi -sudo mkdir -p ${DIR} # dib-lint: safe_sudo - -# Copy to DIR -for KEY in $(find ${DIB_ADD_APT_KEYS} -type f); do - sudo cp -L ${KEY} ${DIR} # dib-lint: safe_sudo -done diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/finalise.d/99-clean-up-cache python-diskimage-builder-2.17.0/doc/source/elements/dpkg/finalise.d/99-clean-up-cache --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/finalise.d/99-clean-up-cache 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/finalise.d/99-clean-up-cache 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/bash -# Do an apt-get clean. This will free some space. - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [ "${DIB_DISABLE_APT_CLEANUP:-0}" != "1" ]; then - apt-get clean -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/finalise.d/99-write-dpkg-manifest python-diskimage-builder-2.17.0/doc/source/elements/dpkg/finalise.d/99-write-dpkg-manifest --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/finalise.d/99-write-dpkg-manifest 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/finalise.d/99-write-dpkg-manifest 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright 2014 Hewlett-Packard Development 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 - -DPKG_MANIFEST_NAME=dib-manifest-dpkg-$(basename ${IMAGE_NAME}) - -# Write the json preamble -echo '{"packages": [' > ${DIB_MANIFEST_IMAGE_DIR}/${DPKG_MANIFEST_NAME} - -# Write a json-format output for the packages installed -format='{"package": "${binary:Package}","arch": "${Architecture}","version": "${Version}","status": "${db:Status-Abbrev}"},' -# Use the configurable dpkg --show output as a manifest -dpkg-query --show --showformat="${format}" | tee -a ${DIB_MANIFEST_IMAGE_DIR}/${DPKG_MANIFEST_NAME} - -# Finish off the json structure and make it easier for human inspection -sed -i -e 's/,$/\n]}/g' -e 's/\(},\)/ \1\n/g' ${DIB_MANIFEST_IMAGE_DIR}/${DPKG_MANIFEST_NAME} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/pre-install.d/00-disable-apt-recommends python-diskimage-builder-2.17.0/doc/source/elements/dpkg/pre-install.d/00-disable-apt-recommends --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/pre-install.d/00-disable-apt-recommends 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/pre-install.d/00-disable-apt-recommends 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash -# Prevent apt from installing recommended packages - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -dd of=/etc/apt/apt.conf.d/95disable-recommends << _EOF_ -APT::Install-Recommends "0"; -Apt::Install-Suggests "0"; -_EOF_ - - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/pre-install.d/02-add-apt-keys python-diskimage-builder-2.17.0/doc/source/elements/dpkg/pre-install.d/02-add-apt-keys --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/pre-install.d/02-add-apt-keys 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/pre-install.d/02-add-apt-keys 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright 2014 Hewlett-Packard Development 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:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -KEY_DIRECTORY=/tmp/apt_keys -if [ ! -d "${KEY_DIRECTORY}" ]; then - exit 0 -fi - -for KEY in ${KEY_DIRECTORY}/*; do - if ! file -b "${KEY}" | grep -q 'PGP public key block'; then - echo "Skipping ${KEY}, not a valid GPG public key" - continue - fi - - apt-key add ${KEY} -done diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/pre-install.d/99-apt-get-update python-diskimage-builder-2.17.0/doc/source/elements/dpkg/pre-install.d/99-apt-get-update --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/pre-install.d/99-apt-get-update 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/pre-install.d/99-apt-get-update 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash -# Do an apt-get update, so that packages can be installed. - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -apt-get -y update diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/README.rst python-diskimage-builder-2.17.0/doc/source/elements/dpkg/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -==== -dpkg -==== -Provide dpkg specific image building glue. - -The ubuntu element needs customisations at the start and end of the image build -process that do not apply to RPM distributions, such as using the host machine -HTTP proxy when installing packages. These customisations live here, where they -can be used by any dpkg based element. - -The dpkg specific version of install-packages is also kept here. - -Environment Variables ---------------------- - -DIB_ADD_APT_KEYS - :Required: No - :Default: None - :Description: If an extra or updated apt key is needed then define - ``DIB_ADD_APT_KEYS`` with the path to a folder. Any key files inside will be - added to the key ring before any apt-get commands take place. - :Example: ``DIB_ADD_APT_KEYS=/etc/apt/trusted.gpg.d`` - -DIB_APT_LOCAL_CACHE - :Required: No - :Default: 1 - :Description: By default the ``$DIB_IMAGE_CACHE/apt/$DISTRO_NAME`` directory is - mounted in ``/var/cache/apt/archives`` to cache the .deb files downloaded - during the image creation. Use this variable if you wish to disable the - internal cache of the ``/var/cache/apt/archives`` directory - :Example: ``DIB_APT_LOCAL_CACHE=0`` will disable internal caching. - -DIB_DISABLE_APT_CLEANUP - :Required: No - :Default: 0 - :Description: At the end of a dib run we clean the apt cache to keep the image - size as small as possible. Use this variable to prevent cleaning the apt cache - at the end of a dib run. - :Example: ``DIB_DISABLE_APT_CLEANUP=1`` will disable cleanup. - -.. element_deps:: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dpkg/root.d/50-block-apt-translations python-diskimage-builder-2.17.0/doc/source/elements/dpkg/root.d/50-block-apt-translations --- python-diskimage-builder-2.11.0/doc/source/elements/dpkg/root.d/50-block-apt-translations 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dpkg/root.d/50-block-apt-translations 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$TARGET_ROOT" ] - -# Configure APT not to fetch translations files -sudo dd of=$TARGET_ROOT/etc/apt/apt.conf.d/95no-translations < /dev/null - -# and remove the translations, too -echo 'Acquire::Languages "none";' | sudo tee $TARGET_ROOT/etc/apt/apt.conf.d/no-languages > /dev/null diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-network/README.rst python-diskimage-builder-2.17.0/doc/source/elements/dracut-network/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-network/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-network/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -============== -dracut-network -============== - -This element was removed in the Pike cycle. Please consider using the -dracut-regenerate element instead. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/binary-deps.d/dracut-ramdisk python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/binary-deps.d/dracut-ramdisk --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/binary-deps.d/dracut-ramdisk 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/binary-deps.d/dracut-ramdisk 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -tail -head -awk -ifconfig -cut -expr -route -ping -nc -wget -tftp -grep diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/dracut-drivers.d/base-drivers python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/dracut-drivers.d/base-drivers --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/dracut-drivers.d/base-drivers 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/dracut-drivers.d/base-drivers 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -virtio -virtio_net -virtio_blk diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/element-deps python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -deploy-targetcli -pkg-map -ramdisk-base -source-repositories diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/environment.d/10-dracut-version.bash python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/environment.d/10-dracut-version.bash --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/environment.d/10-dracut-version.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/environment.d/10-dracut-version.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# Using 037 because that matches the current Fedora package -export DRACUT_VERSION=037 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/extra-data.d/scripts/module/deploy-cmdline.sh python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/extra-data.d/scripts/module/deploy-cmdline.sh --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/extra-data.d/scripts/module/deploy-cmdline.sh 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/extra-data.d/scripts/module/deploy-cmdline.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -#!/bin/bash - -# NOTE(bnemec): Dracut doesn't like it if we enable these -# dib-lint: disable=setu sete setpipefail dibdebugtrace - -# We never let Dracut boot off the specified root anyway, so all -# we need is a value it will accept. -root=/dev/zero -rootok=1 - -# Dracut doesn't correctly parse the ip argument passed to us. -# Override /proc/cmdline to rewrite it in a way dracut can grok. -sed 's/\(ip=\S\+\)/\1:::off/' /proc/cmdline > /run/cmdline -mount -n --bind -o ro /run/cmdline /proc/cmdline -# Force Dracut to re-read the cmdline args -CMDLINE= diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/extra-data.d/scripts/module/module-setup.sh python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/extra-data.d/scripts/module/module-setup.sh --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/extra-data.d/scripts/module/module-setup.sh 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/extra-data.d/scripts/module/module-setup.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#!/bin/bash - -# Dracut is bash too, and it doesn't play nicely with our usual sets -# dib-lint: disable=setu sete setpipefail dibdebugtrace - -check() { - return 0 -} - -depends() { - return 0 -} - -install() { - inst_hook cmdline 80 "$moddir/deploy-cmdline.sh" - inst_hook pre-mount 50 "$moddir/init.sh" -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/init.d/00-override-troubleshoot python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/init.d/00-override-troubleshoot --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/init.d/00-override-troubleshoot 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/init.d/00-override-troubleshoot 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# NOTE(bnemec): Dracut provides its own emergency shell, and it doesn't -# seem to allow directly starting bash as the existing troubleshoot function -# does. -function troubleshoot() { - echo "Starting troubleshooting shell." - emergency_shell -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/install.d/20-install-dracut-deps python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/install.d/20-install-dracut-deps --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/install.d/20-install-dracut-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/install.d/20-install-dracut-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -DRACUT_NETWORK="dracut-network" -if [ 'ubuntu' = "$DISTRO_NAME" ]; then - DRACUT_NETWORK= - # Install Dracut from source because the packaged version is - # broken and old. For Dracut builds we throw away the chroot - # anyway so it won't matter if we've installed some build deps. - install-packages build-essential arping - pushd /tmp - tar xJvf dracut.tar.xz - pushd dracut-$DRACUT_VERSION - ./configure - make - make install - popd - popd -fi - -PACKAGES=$(pkg-map --element dracut-ramdisk ncat tftp) -install-packages $DRACUT_NETWORK wget $PACKAGES diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -{ - "family":{ - "debian":{ - "ncat":"netcat-traditional", - "tftp":"tftp-hpa" - }, - "redhat":{ - "ncat":"nmap-ncat" - }, - "suse":{ - "arping": "iputils" - } - }, - "default":{ - "ncat":"ncat", - "tftp":"tftp" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/post-install.d/01-ensure-drivers python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/post-install.d/01-ensure-drivers --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/post-install.d/01-ensure-drivers 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/post-install.d/01-ensure-drivers 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -#!/bin/bash - -set -eu -set -o pipefail - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi - -TARGET_DIR="/tmp/in_target.d/" - -EXTRA_DRIVERS= - -for _FILE in $(ls ${TARGET_DIR}/dracut-drivers.d/) ; do - _FILE="${TARGET_DIR}/dracut-drivers.d/${_FILE}" - if [ -s $_FILE ]; then - for _LINE in $(cat $_FILE) ; do - EXTRA_DRIVERS="${EXTRA_DRIVERS} $_LINE" - done - fi -done - -if [ "$EXTRA_DRIVERS" = "" ]; then - echo "No extra drivers found" -else - DRIVERS_OUTPUT="/etc/dib_dracut_drivers" - echo "Creating extra drivers record at: ${DRIVERS_OUTPUT}" - echo "$EXTRA_DRIVERS" >${DRIVERS_OUTPUT} -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/post-install.d/99-build-dracut-ramdisk python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/post-install.d/99-build-dracut-ramdisk --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/post-install.d/99-build-dracut-ramdisk 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/post-install.d/99-build-dracut-ramdisk 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - - -_LIB="/tmp/ramdisk-build" - -source "$_LIB/common-defaults" -source "$_LIB/img-defaults" -source "$_LIB/ramdisk-defaults" - -source "$_LIB/common-functions" -source "$_LIB/img-functions" -source "$_LIB/ramdisk-functions" - -KERNEL_VERSION="${DIB_KERNEL_VERSION:-$(find_kernel_version)}" -MODULE_DIR="$MODULE_ROOT/lib/modules/$KERNEL_VERSION" -FIRMWARE_DIR="$MODULE_ROOT/lib/firmware" -LIB_UDEV="$LIB_UDEV_ROOT/lib/udev" -INIT="$_LIB/scripts/init" -FUNCTIONS_D="$_LIB/scripts/d" -MODULE="$_LIB/scripts/module" -# NOTE(bnemec): IMAGE_ELEMENT is normally set in disk-image-create, but we're -# not using that to build the image here. -IMAGE_ELEMENT= - -mk_build_dir -mkdir -p "$TMP_BUILD_DIR/mnt" -export TMP_HOOKS_PATH=/tmp -export TMP_MOUNT_PATH="$TMP_BUILD_DIR/mnt" - -echo "building ramdisk in $TMP_MOUNT_PATH" - -populate_init -SCRIPT_HOME=/tmp/in_target.d/bin TMP_HOOKS_PATH=/tmp/in_target.d run_d ramdisk-install -MODULE_PATH="/usr/lib/dracut/modules.d" -cp -r "$MODULE" "$MODULE_PATH/80deploy-ramdisk" -mv "$TMP_MOUNT_PATH/init" "$MODULE_PATH/80deploy-ramdisk/init.sh" - -# NOTE(bnemec): Workaround for bug in Dracut. This fix has been proposed to -# Dracut as well in https://github.com/haraldh/dracut/pull/34 , and once it has -# been released for all of our supported platforms we can remove this. Until then -# this makes --include work correctly and will be a noop if we're running a fixed -# Dracut version. -sed -i 's|cp --reflink=auto --sparse=auto -fa -t "$s" "$i"$|cp --reflink=auto --sparse=auto -fa -t "${initdir}/${tgt}" "$i"|g' $(type -p dracut) - -# Notes on the options passed to Dracut: -# -N: Do not build a host-specific ramdisk. We want to be able to run this ramdisk -# on as many different machines as possible. -# --install: A list of the binaries needed by our ramdisk script fragments. -# --kernel-cmdline: Kernel parameters to pass to the ramdisk. rd.neednet is required -# to force Dracut to bring up networking even if it isn't passed a -# network target root. Pre-loading the ahci module is necessary -# on some systems to ensure that SATA disks are recognized. -# --include: Files from the chroot to include in the ramdisk. -# --kver: The kernel version to use, as determined above. -# --add-drivers: Extra kernel modules to include in the ramdisk. -# -o: Force omission of these dracut modules. Our scripts are written for bash, -# so dash is not desirable, and plymouth was causing some issues on Ubuntu. -dracut -N \ - --install "$(cat /etc/dib_binary_deps)" \ - --kernel-cmdline "rd.shell rd.debug rd.neednet=1 rd.driver.pre=ahci" \ - --include "$TMP_MOUNT_PATH/" / \ - --kver "${KERNEL_VERSION}" \ - --add-drivers "$(cat /etc/dib_dracut_drivers)" \ - -o "dash plymouth" \ - /tmp/ramdisk - -cp "/boot/vmlinuz-${KERNEL_VERSION}" /tmp/kernel -chmod o+r /tmp/kernel -# We don't want to run cleanup (set in mk_build_dir above) when this exits -trap EXIT diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/README.rst python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -============== -dracut-ramdisk -============== -Build Dracut-based ramdisks - -This is an alternative to the `ramdisk` element that uses -Dracut to provide the base system functionality instead of -Busybox. - -For elements that need additional drivers in the ramdisk image, -a dracut-drivers.d feature is included that works in a similar -fashion to the binary-deps.d feature. The element needing to -add drivers should create a dracut-drivers.d directory and -populate it with a single file listing all of the kernel modules -it needs added to the ramdisk. Comments are not supported in this -file. Note that these modules must be installed in the chroot first. - -By default, the virtio, virtio_net, and virtio_blk modules are -included so that ramdisks are able to function properly in a -virtualized environment. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/source-repository-dracut python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/source-repository-dracut --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-ramdisk/source-repository-dracut 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-ramdisk/source-repository-dracut 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -dracut file /tmp/dracut.tar.xz https://www.kernel.org/pub/linux/utils/boot/dracut/dracut-$DRACUT_VERSION.tar.xz diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-regenerate/element-deps python-diskimage-builder-2.17.0/doc/source/elements/dracut-regenerate/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-regenerate/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-regenerate/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -package-installs -select-boot-kernel-initrd - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-regenerate/environment.d/10-dracut-regenerate python-diskimage-builder-2.17.0/doc/source/elements/dracut-regenerate/environment.d/10-dracut-regenerate --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-regenerate/environment.d/10-dracut-regenerate 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-regenerate/environment.d/10-dracut-regenerate 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -export DIB_DRACUT_ENABLED_MODULES_DEFAULT_CONFIG=" -- name: crypt - packages: - - cryptsetup -- name: lvm - packages: - - lvm2 -" - -DIB_DRACUT_ENABLED_MODULES=${DIB_DRACUT_ENABLED_MODULES:-${DIB_DRACUT_ENABLED_MODULES_DEFAULT_CONFIG}} -export DIB_DRACUT_ENABLED_MODULES diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-regenerate/finalise.d/50-dracut-regenerate python-diskimage-builder-2.17.0/doc/source/elements/dracut-regenerate/finalise.d/50-dracut-regenerate --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-regenerate/finalise.d/50-dracut-regenerate 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-regenerate/finalise.d/50-dracut-regenerate 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -#!/usr/local/bin/dib-python - -# Copyright 2017 Red Hat, Inc. -# -# 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. - -import os -import re -import subprocess -import yaml - - -def main(): - dracut_env = os.getenv('DIB_DRACUT_ENABLED_MODULES') - dracut_objects = yaml.safe_load(dracut_env) - - modules_to_boot = [] - for dracut_object in dracut_objects: - # first, install dependent packages - packages = dracut_object.get('packages', []) - for package in packages: - cmdline = ["install-packages", package] - subp = subprocess.Popen(cmdline, stdout=subprocess.PIPE) - out = subp.communicate()[0] - if subp.returncode: - e = subprocess.CalledProcessError(subp.returncode, cmdline) - e.output = out - raise e - - # second, compose the list of modules to boot - modules_to_boot.append(dracut_object.get('name', None)) - - # regenerate dracut with the list of installed modules - if len(modules_to_boot) > 0: - cmdline = ["select-boot-kernel-initrd"] - subp = subprocess.Popen(cmdline, stdout=subprocess.PIPE) - out, err = subp.communicate() - - if subp.returncode: - e = subprocess.CalledProcessError(subp.returncode, cmdline) - e.output = out - raise e - - kernel_set = out.decode().split(':') - kernel_search = re.match("vmlinuz-(.*)", kernel_set[0]) - kernel_version = "%s" % kernel_search.groups(1) - ramdisk_path = "/boot/%s" % kernel_set[1].strip() - modules_to_boot = ' ' .join(modules_to_boot) - - subp = subprocess.Popen(['dracut', '--force', '--add', modules_to_boot, - '-f', ramdisk_path, kernel_version], - stdout=subprocess.PIPE) - subp.wait() - - -if __name__ == '__main__': - main() diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-regenerate/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/dracut-regenerate/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-regenerate/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-regenerate/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -PyYAML: - phase: pre-install.d - dib_python_version: 2 -python3-PyYAML: - phase: pre-install.d - installtype: package - dib_python_version: 3 - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-regenerate/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/dracut-regenerate/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-regenerate/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-regenerate/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -{ - "family": { - "gentoo": { - "PyYAML": "dev-python/pyyaml" - }, - "suse": { - "PyYAML": "python-PyYAML", - "python3-PyYAML": "python3-PyYAML" - }, - "redhat": { - "PyYAML": "PyYAML", - "python3-PyYAML": "python3-PyYAML" - }, - "debian": { - "PyYAML": "python-yaml", - "python3-PyYAML": "python3-yaml" - } - }, - "default": { - "PyYAML": "", - "python3-PyYAML": "" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dracut-regenerate/README.rst python-diskimage-builder-2.17.0/doc/source/elements/dracut-regenerate/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/dracut-regenerate/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dracut-regenerate/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -================= -dracut-regenerate -================= -Adds the possibility of regenerating dracut on image build time, giving the -possibility to load extra modules. -It relies on the ``DIB_DRACUT_ENABLED_MODULES`` setting, that will accept -a yaml blob with the following format:: - - - name: - packages: - - - - - - name: - packages: - - - - - -By default, this element will bring lvm and crypt modules. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/element-deps python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -dib-init-system -install-static -openssh-server diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/init-scripts/systemd/dynamic-login.service python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/init-scripts/systemd/dynamic-login.service --- python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/init-scripts/systemd/dynamic-login.service 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/init-scripts/systemd/dynamic-login.service 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -[Unit] -Description=Dynamic Login -After=network.target - -[Service] -Type=oneshot -ExecStart=/usr/local/bin/dynamic-login - -[Install] -WantedBy=multi-user.target - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/init-scripts/sysv/dynamic-login.init python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/init-scripts/sysv/dynamic-login.init --- python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/init-scripts/sysv/dynamic-login.init 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/init-scripts/sysv/dynamic-login.init 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -#!/bin/sh -e -### BEGIN INIT INFO -# Provides: dynamic-login -# Required-Start: $local_fs networking -# Required-Stop: $local_fs -# Default-Start: S -# Default-Stop: 0 6 -# X-Start-Before: -# Short-Description: Dynamic Login -# Description: Execute Dynamic Login -### END INIT INFO - -NAME=dynamic-login -INIT_NAME=/etc/init.d/${NAME} -SCRIPT_NAME=/usr/local/bin/${NAME} - -[ -x $SCRIPT_NAME ] || exit 0 - -case "$1" in - start) - $SCRIPT_NAME - ;; - stop) - ;; - *) - echo "Usage: $INIT_NAME {start}" - exit 1 - ;; -esac - -exit 0 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/init-scripts/upstart/dynamic-login.conf python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/init-scripts/upstart/dynamic-login.conf --- python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/init-scripts/upstart/dynamic-login.conf 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/init-scripts/upstart/dynamic-login.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -description "Dynamic Login" - -start on runlevel [2345] -stop on runlevel [!2345] - -umask 022 - -expect stop - -script - echo "Executing Dynamic Login" - /usr/local/bin/dynamic-login -end script diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/install.d/70-enable-dynamic-login-services python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/install.d/70-enable-dynamic-login-services --- python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/install.d/70-enable-dynamic-login-services 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/install.d/70-enable-dynamic-login-services 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -case "$DIB_INIT_SYSTEM" in - systemd) - systemctl enable dynamic-login.service - ;; - sysv) - update-rc.d dynamic-login.init defaults - ;; -esac diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/README.rst python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -============= -dynamic-login -============= - -This element insert a helper script in the image that allows users to -dynamically configure credentials at boot time. This is specially useful -for troubleshooting. - -Troubleshooting an image can be quite hard, specially if you can not get -a prompt you can enter commands to find out what went wrong. By default, -the images (specially ramdisks) doesn't have any SSH key or password for -any user. Of course one could use the ``devuser`` element to generate -an image with SSH keys and user/password in the image but that would be -a massive security hole and very it's discouraged to run in production -with a ramdisk like that. - -This element allows the operator to inject a SSH key and/or change the -root password dynamically when the image boots. Two kernel command line -parameters are used to do it: - -sshkey - :Description: If the operator append sshkey="$PUBLIC_SSH_KEY" to the - kernel command line on boot, the helper script will append - this key to the root user authorized_keys. - -rootpwd - :Description: If the operator append rootpwd="$ENCRYPTED_PASSWORD" to the - kernel command line on boot, the helper script will set the - root password to the one specified by this option. Note that - this password must be **encrypted**. Encrypted passwords - can be generated using the ``openssl`` command, e.g: - *openssl passwd -1*. - - -.. note:: - The value of these parameters must be **quoted**, e.g: sshkey="ssh-rsa - BBBA1NBzaC1yc2E ..." - - -.. warning:: - Some base operational systems might require selinux to be in - **permissive** or **disabled** mode so that you can log in - the image. This can be achieved by building the image with the - ``selinux-permissive`` element for diskimage-builder or by passing - ``selinux=0`` in the kernel command line. RHEL/CentOS are examples - of OSs which this is true. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/static/usr/local/bin/dynamic-login python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/static/usr/local/bin/dynamic-login --- python-diskimage-builder-2.11.0/doc/source/elements/dynamic-login/static/usr/local/bin/dynamic-login 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/dynamic-login/static/usr/local/bin/dynamic-login 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#!/bin/bash -# dib-lint: disable=dibdebugtrace -# Copyright 2015 Red Hat, Inc. -# -# 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. - -set -eu -set -o pipefail - -# Reads an encrypted root password from the kernel command line and set -# it to the root user -if [[ $( $SSHDIR/authorized_keys - chmod 600 $SSHDIR/authorized_keys -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/element-manifest/element-deps python-diskimage-builder-2.17.0/doc/source/elements/element-manifest/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/element-manifest/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/element-manifest/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -manifests diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/element-manifest/extra-data.d/75-inject-element-manifest python-diskimage-builder-2.17.0/doc/source/elements/element-manifest/extra-data.d/75-inject-element-manifest --- python-diskimage-builder-2.11.0/doc/source/elements/element-manifest/extra-data.d/75-inject-element-manifest 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/element-manifest/extra-data.d/75-inject-element-manifest 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -DIB_ELEMENT_MANIFEST_PATH=${DIB_ELEMENT_MANIFEST_PATH:-"$DIB_MANIFEST_IMAGE_DIR/dib-element-manifest"} -sudo mkdir -p $TMP_MOUNT_PATH/$(dirname $DIB_ELEMENT_MANIFEST_PATH) -sudo /bin/bash -c "echo $IMAGE_ELEMENT | tr ' ' '\n' > $TMP_MOUNT_PATH/$DIB_ELEMENT_MANIFEST_PATH" diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/element-manifest/README.rst python-diskimage-builder-2.17.0/doc/source/elements/element-manifest/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/element-manifest/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/element-manifest/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -================ -element-manifest -================ - -Writes a manifest file that is the full list of elements that were used to -build the image. The file path can be overridden by setting -$DIB\_ELEMENT\_MANIFEST\_PATH, and defaults to -/etc/dib-manifests/element-manifest. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/enable-serial-console/cleanup.d/99-fix-grub python-diskimage-builder-2.17.0/doc/source/elements/enable-serial-console/cleanup.d/99-fix-grub --- python-diskimage-builder-2.11.0/doc/source/elements/enable-serial-console/cleanup.d/99-fix-grub 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/enable-serial-console/cleanup.d/99-fix-grub 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -set -euxo - -BOOTDIR=$TARGET_ROOT/boot - -# Splashimage in grub has a known issue with serial console -# So grub config file needs to be fixed. -if [ -f $BOOTDIR/grub/grub.conf ] ; then - sed -i -e "/^splashimage/d;s/ rhgb\( \|$\)/\1/g;s/ quiet\( \|$\)/\1/g;/^serial/d;/^terminal/d;/^hiddenmenu/d" $BOOTDIR/grub/grub.conf - sed -i "/^default/aserial --unit=0 --speed=9600 --word=8 --parity=no --stop=1\nterminal --timeout=5 serial console" $BOOTDIR/grub/grub.conf -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/enable-serial-console/install.d/20-stty python-diskimage-builder-2.17.0/doc/source/elements/enable-serial-console/install.d/20-stty --- python-diskimage-builder-2.11.0/doc/source/elements/enable-serial-console/install.d/20-stty 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/enable-serial-console/install.d/20-stty 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -SCRIPTDIR=$(dirname $0) - -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 - install -D -g root -o root -m 0644 ${SCRIPTDIR}/serial-console-udev.rules /etc/udev/rules.d/99-serial-console.rules -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/enable-serial-console/install.d/serial-console-udev.rules python-diskimage-builder-2.17.0/doc/source/elements/enable-serial-console/install.d/serial-console-udev.rules --- python-diskimage-builder-2.11.0/doc/source/elements/enable-serial-console/install.d/serial-console-udev.rules 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/enable-serial-console/install.d/serial-console-udev.rules 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -SUBSYSTEM=="tty", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="getty@$name.service", ATTRS{type}=="4" diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/enable-serial-console/install.d/ttySx.conf python-diskimage-builder-2.17.0/doc/source/elements/enable-serial-console/install.d/ttySx.conf --- python-diskimage-builder-2.11.0/doc/source/elements/enable-serial-console/install.d/ttySx.conf 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/enable-serial-console/install.d/ttySx.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -# This service maintains a getty on ttyS0/1 from the point the system is -# started until it is shut down again. - -start on stopped rc or RUNLEVEL=[2345] -stop on runlevel [!2345] - -respawn - -script - console_port=0 - echo "ttySx probing ttyS1" >/dev/ttyS1 2>/dev/null && console_port=1 - echo "ttySx: console tty = /dev/ttyS$console_port" >&2 - exec /sbin/agetty -m ttyS$console_port 115200,57600,38400,9600,4800 vt102 - -end script diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/enable-serial-console/README.rst python-diskimage-builder-2.17.0/doc/source/elements/enable-serial-console/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/enable-serial-console/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/enable-serial-console/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -===================== -enable-serial-console -===================== -Start getty on active serial consoles. - -With ILO and other remote admin environments, having a serial console can be -useful for debugging and troubleshooting. - -For upstart: - If ttyS1 exists, getty will run on that, otherwise on ttyS0. - -For systemd: - We dynamically start a getty on any active serial port via udev rules. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/epel/element-deps python-diskimage-builder-2.17.0/doc/source/elements/epel/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/epel/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/epel/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/epel/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/epel/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/epel/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/epel/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -wget: - phase: pre-install.d -yum-utils: - phase: pre-install.d diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/epel/pre-install.d/05-rpm-epel-release python-diskimage-builder-2.17.0/doc/source/elements/epel/pre-install.d/05-rpm-epel-release --- python-diskimage-builder-2.11.0/doc/source/elements/epel/pre-install.d/05-rpm-epel-release 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/epel/pre-install.d/05-rpm-epel-release 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [[ ${DISTRO_NAME} =~ "centos" ]]; then - # Centos has "epel-release" in extras, which is default enabled. - yum install -y epel-release -else - # For RHEL, we have to scrape the download page to find the latest - # release and install that - [ -n "$ARCH" ] - if [ 'amd64' = "$ARCH" ] ; then - ARCH="x86_64" - fi - - BASE_URL=${DIB_EPEL_MIRROR:-https://dl.fedoraproject.org/pub/epel} - case "$DISTRO_NAME" in - rhel7) - RELEASE=7 - URL=$BASE_URL/$RELEASE/x86_64/Packages/e/ - ;; - *) - echo "$DISTRO_NAME is not supported" - exit 1 - ;; - esac - PKG_NAME=$(wget -q $URL -O - |grep -oE "(href=\"epel-release-$RELEASE-[0-9,.].*)" | cut -d'"' -f2) - rpm -q epel-release || yum install -y $URL/$PKG_NAME -fi - -if [ ${DIB_EPEL_DISABLED:-0} -ne 0 ]; then - yum-config-manager --disable epel -fi - -DIB_EPEL_MIRROR=${DIB_EPEL_MIRROR:-} -[ -n "$DIB_EPEL_MIRROR" ] || exit 0 - -# Set the EPEL mirror to use -sed -e "s|^#baseurl=http://download.fedoraproject.org/pub/epel|baseurl=$DIB_EPEL_MIRROR|;/^mirrorlist=/d" -i /etc/yum.repos.d/epel.repo diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/epel/README.rst python-diskimage-builder-2.17.0/doc/source/elements/epel/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/epel/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/epel/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -==== -epel -==== - -This element installs the Extra Packages for Enterprise Linux (EPEL) -repository GPG key as well as configuration for yum. - -Note this element only works with platforms that have EPEL support -such as CentOS and RHEL - -DIB_EPEL_MIRROR: - :Required: No - :Default: None - :Description: To use a EPEL Yum mirror, set this variable to the mirror URL - before running bin/disk-image-create. This URL should point to - the directory containing the ``5/6/7`` directories. - :Example: ``DIB\_EPEL\_MIRROR=http://dl.fedoraproject.org/pub/epel`` - -DIB_EPEL_DISABLED: - :Required: No - :Default: 0 - :Description: To disable the EPEL repo (but leave it available if - used with an explicit ``--enablerepo``) set this to 1 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora/element-deps python-diskimage-builder-2.17.0/doc/source/elements/fedora/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/fedora/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -cache-url -dkms -redhat-common -rpm-distro -source-repositories -yum diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora/element-provides python-diskimage-builder-2.17.0/doc/source/elements/fedora/element-provides --- python-diskimage-builder-2.11.0/doc/source/elements/fedora/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -operating-system diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora/environment.d/10-fedora-distro-name.bash python-diskimage-builder-2.17.0/doc/source/elements/fedora/environment.d/10-fedora-distro-name.bash --- python-diskimage-builder-2.11.0/doc/source/elements/fedora/environment.d/10-fedora-distro-name.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora/environment.d/10-fedora-distro-name.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -export DISTRO_NAME=fedora -export DIB_RELEASE=${DIB_RELEASE:-27} - -# Note the filename URL has a "sub-release" in it -# http:// ... Fedora-Cloud-Base-25-1.3.x86_64.qcow2 -# ^^^ -# It's not exactly clear how this is generated, or how we could -# determine this programatically. Other projects have more -# complicated regex-based scripts to find this, which we can examine -# if this becomes an issue ... see thread at [1] -# -# [1] https://lists.fedoraproject.org/archives/list/cloud@lists.fedoraproject.org/thread/2WFO2FKIGUQYRQXIR35UVJGRHF7LQENJ/ - -if [[ ${DIB_RELEASE} == '26' ]]; then - export DIB_FEDORA_SUBRELEASE=1.5 -elif [[ ${DIB_RELEASE} == '27' ]]; then - export DIB_FEDORA_SUBRELEASE=1.6 -else - echo "Unsupported Fedora release" - exit 1 -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora/environment.d/11-yum-dnf.bash python-diskimage-builder-2.17.0/doc/source/elements/fedora/environment.d/11-yum-dnf.bash --- python-diskimage-builder-2.11.0/doc/source/elements/fedora/environment.d/11-yum-dnf.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora/environment.d/11-yum-dnf.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# since f22, dnf is the yum replacement. Mostly it drops in -# unmodified, so while we transition KISS and use this to choose - -if [ $DIB_RELEASE -ge 22 ]; then - export YUM=dnf -else - export YUM=yum -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/fedora/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/fedora/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -# On a fresh Fedora 18 install you might have to update audit in order to -# fix a conflict with a file from the glibc package. -# https://bugzilla.redhat.com/show_bug.cgi?id=894307 -audit: - -# The version of openssl shipped in the fedora cloud image is no longer -# compatible with new python environments installed by virtualenv, so we need -# to update it first. -# See https://bugs.launchpad.net/diskimage-builder/+bug/1254879 -openssl: - -# FIXME: To avoid conflict between the pyOpenSSL installed via python-pip -# and pyOpenSSL installed via yum, we are going to sort it out installing -# it earlier at the beginning of the image building process. Python-pip -# is installing pyOpenSSL as part of satisfying the requirements.txt -# in python-glanceclient and afterwards yum tries to install it as a -# dependency of the python-paste package needed for the heat element, -# this seems to be conflicting and causing the image building process to -# fail. The problem is happening on a Fedora 18 system. -pyOpenSSL: - -# Workaround for: -# https://bugzilla.redhat.com/show_bug.cgi?id=1066983 -vim-minimal: - -# kernel modules to match the core kernel -# Newer Fedora 21 splits these out into a separate package. -# It contains iscsi_tcp.ko (for Ironic) among other things like network -# driver modules, etc. -kernel-modules: - -# This small package is required on Fedora 21 in order to build some -# packages via source (MySQL driver). -redhat-rpm-config: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora/pre-install.d/01-set-fedora-mirror python-diskimage-builder-2.17.0/doc/source/elements/fedora/pre-install.d/01-set-fedora-mirror --- python-diskimage-builder-2.11.0/doc/source/elements/fedora/pre-install.d/01-set-fedora-mirror 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora/pre-install.d/01-set-fedora-mirror 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-} - -[ -n "$DIB_DISTRIBUTION_MIRROR" ] || exit 0 - -for FILE in /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates-testing.repo; do - sudo sed -e "s|^#baseurl=http://download.fedoraproject.org/pub/fedora/linux|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^metalink/d" -i $FILE -done diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora/pre-install.d/02-set-machine-id python-diskimage-builder-2.17.0/doc/source/elements/fedora/pre-install.d/02-set-machine-id --- python-diskimage-builder-2.11.0/doc/source/elements/fedora/pre-install.d/02-set-machine-id 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora/pre-install.d/02-set-machine-id 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# The systemd .spec file does this in %post [1] and it turns out that -# (in what is possibly a bug [2]) that kernel install requires -# /etc/machine-id. This affects "fedora" (the image-based build) if -# there is no systemd update to install ... with "fedora-minimal" we -# are always installing into the chroot so, so %post always runs and -# this is always run -# -# [1] https://src.fedoraproject.org/rpms/systemd/blob/master/f/systemd.spec -# [2] https://bugzilla.redhat.com/show_bug.cgi?id=1486124 - -systemd-machine-id-setup diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora/README.rst python-diskimage-builder-2.17.0/doc/source/elements/fedora/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/fedora/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -====== -fedora -====== - -Use Fedora cloud images as the baseline for built disk images. For further -details see the redhat-common README. - -Environment Variables ---------------------- - -DIB_DISTRIBUTION_MIRROR: - :Required: No - :Default: None - :Description: To use a Fedora Yum mirror, set this variable to the mirror URL - before running bin/disk-image-create. This URL should point to - the directory containing the ``releases/updates/development`` - and ``extras`` directories. - :Example: ``DIB\_DISTRIBUTION\_MIRROR=http://download.fedoraproject.org/pub/fedora/linux`` - - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora/root.d/10-fedora-cloud-image python-diskimage-builder-2.17.0/doc/source/elements/fedora/root.d/10-fedora-cloud-image --- python-diskimage-builder-2.11.0/doc/source/elements/fedora/root.d/10-fedora-cloud-image 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora/root.d/10-fedora-cloud-image 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$ARCH" ] -[ -n "$TARGET_ROOT" ] - -if [ 'amd64' = "$ARCH" ] ; then - ARCH="x86_64" -fi - -DIB_LOCAL_IMAGE=${DIB_LOCAL_IMAGE:-""} - -if [ -n "$DIB_LOCAL_IMAGE" ]; then - IMAGE_LOCATION=$DIB_LOCAL_IMAGE - # No need to copy a local image into the cache directory, so just specify - # the cached path as the original path. - CACHED_IMAGE=$IMAGE_LOCATION - BASE_IMAGE_FILE=`basename $DIB_LOCAL_IMAGE` - BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz -else - # note default DIB_RELEASE set in environment setup - # Not sure if ${ARCH} is defined for anything but x86_64 here - DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-https://download.fedoraproject.org/pub/fedora/linux/releases/${DIB_RELEASE}/CloudImages/${ARCH}/images} - BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-Fedora-Cloud-Base-$DIB_RELEASE-$DIB_FEDORA_SUBRELEASE.$ARCH.qcow2} - BASE_IMAGE_TAR=Fedora-Cloud-Base-$DIB_RELEASE-$DIB_FEDORA_SUBRELEASE.$ARCH.tgz - IMAGE_LOCATION=$DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE - CACHED_IMAGE=$DIB_IMAGE_CACHE/$BASE_IMAGE_FILE -fi - -$TMP_HOOKS_PATH/bin/extract-image $BASE_IMAGE_FILE $BASE_IMAGE_TAR $IMAGE_LOCATION $CACHED_IMAGE diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora/test-elements/build-succeeds/element-deps python-diskimage-builder-2.17.0/doc/source/elements/fedora/test-elements/build-succeeds/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/fedora/test-elements/build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora/test-elements/build-succeeds/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -base -openstack-ci-mirrors diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/element-deps python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -yum-minimal diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/element-provides python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/element-provides --- python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -operating-system diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/environment.d/10-fedora-distro-name.bash python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/environment.d/10-fedora-distro-name.bash --- python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/environment.d/10-fedora-distro-name.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/environment.d/10-fedora-distro-name.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -export DISTRO_NAME=fedora -export DIB_RELEASE=${DIB_RELEASE:-26} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/environment.d/11-yum-dnf.bash python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/environment.d/11-yum-dnf.bash --- python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/environment.d/11-yum-dnf.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/environment.d/11-yum-dnf.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# since f22, dnf is the yum replacement. Mostly it drops in -# unmodified, so while we transition KISS and use this to choose - -if [ $DIB_RELEASE -ge 22 ]; then - export YUM=dnf -else - export YUM=yum -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/README.rst python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -============== -fedora-minimal -============== -Create a minimal image based on Fedora. - -Use of this element will require 'yum' and 'yum-utils' to be installed on -Ubuntu and Debian. Nothing additional is needed on Fedora or CentOS. The -element will need `python-lzma` everywhere. - -Due to a bug in the released version of urlgrabber, on many systems an -installation of urlgrabber from git is required. The git repository -can be found here: http://yum.baseurl.org/gitweb?p=urlgrabber.git;a=summary - -This element sets the ``DIB_RELEASE`` var to 'fedora'. The release of -fedora to be installed can be controlled through the ``DIB_RELEASE`` -variable, which defaults the latest supported release. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/test-elements/build-succeeds/element-deps python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/test-elements/build-succeeds/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/test-elements/build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/test-elements/build-succeeds/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -openstack-ci-mirrors \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/test-elements/build-succeeds/README.rst python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/test-elements/build-succeeds/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/test-elements/build-succeeds/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/test-elements/build-succeeds/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Verify we can build a fedora-minimal image. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/yum.repos.d/yum.repo python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/yum.repos.d/yum.repo --- python-diskimage-builder-2.11.0/doc/source/elements/fedora-minimal/yum.repos.d/yum.repo 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/fedora-minimal/yum.repos.d/yum.repo 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -[fedora] -name=Fedora $releasever - $basearch -failovermethod=priority -#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/ -metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch -gpgcheck=0 -skip_if_unavailable=False - -[updates] -name=Fedora $releasever - $basearch - Updates -failovermethod=priority -#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/$basearch/ -metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch -enabled=1 -gpgcheck=0 -skip_if_unavailable=False diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/bin/fix_shm python-diskimage-builder-2.17.0/doc/source/elements/gentoo/bin/fix_shm --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/bin/fix_shm 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/bin/fix_shm 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#!/bin/bash - -# Copyright 2017 Matthew Thode -# -# 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:-0}" -gt 0 ]]; then - set -x -fi -set -eu -set -o pipefail - -# make /dev/shm dir if it doesn't exist -# mount tmpfs and chown it -# existing programs could be using /dev/shm -# This means it cannot be moved or backed -# up as a copy easily. The only remaining -# option is to move the link if it exists -# as a link. Existing programs will still -# hold the file handle of the original -# location open and new programs can use -# the fixed /dev/shm. -[[ -e /run/lock/shm_fixed ]] && exit 0 # shm has already been fixed -if [[ ! -d /dev/shm ]]; then - if [[ ! -e /dev/shm ]]; then - if [[ -L /dev/shm ]]; then - mv /dev/shm /dev/shm.orig - fi - mkdir /dev/shm - fi -fi -mount -t tmpfs none /dev/shm -chmod 1777 /dev/shm -mkdir -p /run/lock -touch /run/lock/shm_fixed diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/bin/install-packages python-diskimage-builder-2.17.0/doc/source/elements/gentoo/bin/install-packages --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/bin/install-packages 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/bin/install-packages 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -#!/bin/bash - -# Copyright 2016 Matthew Thode -# -# 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:-0}" -gt 0 ]]; then - set -x -fi -set -eu -set -o pipefail - -ACTION='install' - -SCRIPTNAME="$(basename $0)" -function show_options { - echo "Usage: ${SCRIPTNAME} [package ...]" - echo - echo 'Options:' - echo ' -u -- update all packages' - echo ' -e -- erase/remove packages' - exit 0 -} - -function install_gentoo_packages { - RUN_ONCE_SHM='1' - if mountpoint -q /dev/shm; then - emerge $@ - elif [[ -k /dev/shm ]]; then - emerge $@ - else - fix_shm - emerge $@ - unfix_shm - fi -} - -TEMP="$(getopt -o huem: -n ${SCRIPTNAME} -- ${@})" -if [[ "${?}" != 0 ]]; then - echo 'Terminating...' >&2 - exit 1 -fi -eval set -- "${TEMP}" - -while true; do - case "${1}" in - -u ) - if [[ ! -f /usr/portage/profiles ]]; then - emerge-webrsync -q - fi - install_gentoo_packages -uDNv --with-bdeps=y --complete-graph=y --jobs=2 @world - install_gentoo_packages --verbose=n --depclean - install_gentoo_packages -v --usepkg=n @preserved-rebuild - etc-update --automode -5 - eselect news read new - exit 0; - ;; - -e ) - ACTION='remove' - shift - ;; - -m ) - MAP_ELEMENT="${2}" - shift 2 - ;; - -h ) - show_options - ;; - -- ) - shift - break - ;; - * ) - echo "Error: unsupported option ${1}." - exit 1 - ;; - esac -done - -PKGS="${@}" -if [[ -n "${MAP_ELEMENT:-}" ]]; then - PKGS="$(pkg-map --element ${MAP_ELEMENT} ${@})" - if [[ "${?}" != 0 ]]; then - echo "bin/pkg-map error. ${PKGS}" - exit 1 - fi -fi - -if [[ -z "${PKGS}" ]]; then - echo "Not running install-packages ${ACTION} with empty packages list" -else - if [[ "${ACTION}" == 'install' ]]; then - if [[ ! -f /usr/portage/profiles ]]; then - emerge-webrsync -q - fi - install_gentoo_packages -q --jobs=2 --changed-use "${PKGS}" - elif [[ "${ACTION}" == 'remove' ]]; then - if [[ ! -f /usr/portage/profiles ]]; then - emerge-webrsync -q - fi - install_gentoo_packages -C "${PKGS}" - else - echo 'something when really wrong, install action is not install or remove' - fi -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/bin/unfix_shm python-diskimage-builder-2.17.0/doc/source/elements/gentoo/bin/unfix_shm --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/bin/unfix_shm 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/bin/unfix_shm 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#!/bin/bash - -# Copyright 2017 Matthew Thode -# -# 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:-0}" -gt 0 ]]; then - set -x -fi -set -eu -set -o pipefail - - -# unmount tmpfs -# care about anything still using it -[[ ! -e /run/lock/shm_fixed ]] && exit 0 # shm hasn't been modified -umount /dev/shm -if fuser /dev/shm; then - rmdir /dev/shm -fi -if [[ -e /dev/shm.orig ]]; then - mv /dev/shm.orig /dev/shm -fi -rm /run/lock/shm_fixed diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/element-deps python-diskimage-builder-2.17.0/doc/source/elements/gentoo/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -cache-url -install-bin -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/element-provides python-diskimage-builder-2.17.0/doc/source/elements/gentoo/element-provides --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -operating-system diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/environment.d/00-gentoo-envars.bash python-diskimage-builder-2.17.0/doc/source/elements/gentoo/environment.d/00-gentoo-envars.bash --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/environment.d/00-gentoo-envars.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/environment.d/00-gentoo-envars.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -export DIB_RELEASE=gentoo -export DISTRO_NAME=gentoo -export GENTOO_PROFILE=${GENTOO_PROFILE:-'default/linux/amd64/17.0'} -export GENTOO_PORTAGE_CLEANUP=${GENTOO_PORTAGE_CLEANUP:-'False'} -export GENTOO_PYTHON_TARGETS=${GENTOO_PYTHON_TARGETS:-'python2_7 python3_5'} -export GENTOO_PYTHON_ACTIVE_VERSION=${GENTOO_PYTHON_ACTIVE_VERSION:-'python3.5'} -export GENTOO_OVERLAYS=${GENTOO_OVERLAYS:-''} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/extra-data.d/gentoo-releng.gpg python-diskimage-builder-2.17.0/doc/source/elements/gentoo/extra-data.d/gentoo-releng.gpg --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/extra-data.d/gentoo-releng.gpg 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/extra-data.d/gentoo-releng.gpg 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBEqUWzgBEACXftaG+HVuSQBEqdpBIg2SOVgWW/KbCihO5wPOsdbM93e+psmb -wvw+OtNHADQvxocKMuZX8Q/j5i3nQ/ikQFW5Oj6UXvl1qyxZhR2P7GZSNQxn0eMI -zAX08o691ws2/dFGXKmNT6btYJ0FxuTtTVSK6zi68WF+ILGK/O2TZXK9EKfZKPDH -KHcGrUq4c03vcGANz/8ksJj2ZYEGxMr1h7Wfe9PVcm0gCB1MhYHNR755M47V5Pch -fyxbs6vaKz82PgrNjjjbT0PISvnKReUOdA2PFUWry6UKQkiVrLVDRkd8fryLL8ey -5JxgVoJZ4echoVWQ0JYJ5lJTWmcZyxQYSAbz2w9dLB+dPyyGpyPp1KX1ADukbROp -9S11I9+oVnyGdUBm+AUme0ecekWvt4qiCw3azghLSwEyGZc4a8nNcwSqFmH7Rqdd -1+gHc+4tu4WHmguhMviifGXKyWiRERULp0obV33JEo/c4uwyAZHBTJtKtVaLb92z -aRdh1yox2I85iumyt62lq9dfOuet4NNVDnUkqMYCQD23JB8IM+qnVaDwJ6oCSIKi -nY3uyoqbVE6Lkm+Hk5q5pbvg1cpEH6HWWAl20EMCzMOoMcH0tPyQLDlD2Mml7veG -kwdy3S6RkjCympbNzqWec2+hkU2c93Bgpfh7QP0GDN0qrzcNNFmrD5795QARAQAB -tFNHZW50b28gTGludXggUmVsZWFzZSBFbmdpbmVlcmluZyAoQXV0b21hdGVkIFdl -ZWtseSBSZWxlYXNlIEtleSkgPHJlbGVuZ0BnZW50b28ub3JnPoheBBARCAAGBQJR -yaWCAAoJELP3uHLZaXat08sA/3paxuDydIV/8qe9PzgID6zifip9T9XfTDCRbHQR -Kw0xAP9vTE9yoPuNMrF55AP9+68FbYaIO0sUxNN9CVby28iU7IkBHAQQAQIABgUC -Ut9qEwAKCRAvJnjSPF2apBtSCACIPmfvwiBluwx1dz4/C4pUSIZmaRk5NrKhuADL -CBUyH4X/Ajz4MhvXjAYeWpvtzxHW5sJL0mnNBQtkEM3SPGrYsJLCmhp0hW0lfYtq -pG8Kymej7N7CJMYKW65HTvlLyCM1JpBy3OAXBgtxNIeho+dXbXTBPAUCje2MVS8h -tFgxn6mmXqQPh3YQTY8UE4c+s4XOLBiV2PQowmRZ/m7OzPTf7Yp9j/WJdJN6Rn8P -lOvsQ6soThiFm5kr1UqreALKEZOVrWT7SuhNFB3s8luHfKkwiWx4B2/Pku9LOXEz -Z6hnOV+ZWsF9LQEGtTmS3BZVIVEEKniBLEnoqPdae5xHhJhXiQIcBBABAgAGBQJO -ucCvAAoJENpWdD1eHU4JCY0P/2PU2WDPI1I1/fO6O7jflQMXkxrKi7IP/VaELTlg -ADhKRDecWOJltodAoIZItLowviRH0N5FQ7a9MtYG3DyDZPvkF7U0UXoej8uT0XBp -FRLqbSbGL3krnXR0RfFsolK4x53nXGDV9noZsOWEovafhAysOngLCCNk136fSI3l -gEQngJ6ChUN0IWtkQaE2IATOqgwkGQ7jJjt5qSznadCqBTaOkHvKCM4KZOjJC/zG -/ZIQ2+PmFtR+LpgqdugHzGHvP+gG8jEG/i4EX8aAzcDVP8tejAqsS2X1yRSY7GEf -odJ9679dUwsFZbECNKuO8QnJXe5sTx9G15qjPpai2gM5rqN+ENdalVOAlqy3QM/X -TSD2KkXnQjtutOYNAMYukSamnvEu1oxH4KoiIK4ThB4OmXtq4Ua5JRDGGZo8Y19M -wVHXIHBuHszcZ7zBNhps00yzwE+ymgiAmLkAzZ8XkKJUZf0/p6jrSpoE9aygyDXt -+0+3tkreEVIFwCRowq0KXhFaL4+nnQsTqGDVnpkBj70+9WBcVk4zXUPXXYo6ACyK -8PuUQAVP3PGMERCYk5EeXwgGGcIYblRqQtYKxiHHYF5N9zTl+IaEN2wt64DirIRW -gIxXIrAIDF5KvcrIsdJJVvPUA2GHKmKQrFSm9lnxiA7abMnFxabBTkGsLgcBlppM -XJAJiQI7BBMBAgAlAhsDBgsJCAcDAgQVAggDAxYCAQIeAQIXgAUCUhkTvgUJC0cf -hgAKCRC7Vy4OLRgpEHTWD/45wbLJg4iupSCat1+5Le9D84hdgRZIydEjt+cLaSYr -sUBZX72P+wDi0wpdcYuiHI+IWlneMQZcBpVuL+ODPek3s6Z4R7XqN9mD79RjaoFy -H7870X/y8C4NhjV3UXBOx0o5/1tNtROlqm8PNa1LIKP7mfR61fGo8YmWt6duZxei -k/S1WYlR5XqEyUfDaMnID6p8tck1BVxws61DSweYNOgZFWyemO60d2duLEU85L7j -vpDIu5q4zSGvnCA5hML1nclc40DFrQsTf13nQsNOojJo+Erc95KyNLp6N9OYt+3M -mkBc104XFFyEyHQ6IgfKI834pKnuEh1btsQUJjVwmHsxxqr0YPLsBbdq8fklD5Xr -ahqDiMLSVJmm37eqyXGeqtUzgs4i6zMKPbSX3uqR3h/F1uEg9ijhdPAbYXMeQqDR -tkHAshp0x+CLCJRZPPvKZHqZBmGeiZg8Rphxd8R8x/KI6gddGlYh/n4MESmZBhMT -qSnletjbxmHfcX4Q/M2JmKDpEML7RrPdJTa9Cuc/GdqOr83V/szVEF4cKH3ot520 -KQ4F7LmE3XVT084b2Aqhz3Rcp3ubpeRCXsDkV0SGI1qLtJLQ5xvOhaVgi6s1sbX9 -i6qOm5UyfdlPwadF//4Lsku/F7cN6qf5asTr+1Pbpc8osZsXuDa0fBzP/gYBxYOv -fokCOwQTAQIAJQIbAwYLCQgHAwIEFQIIAwMWAgECHgECF4AFAlXeGLoFCQ8MJIIA -CgkQu1cuDi0YKRBXMQ//QiGV6PauMMzFuVDREtLEAzXrSRBDMYLrtIvgTOYMslli -mpqpj/DV4XkQsEZY3A5mlWBStGFIG9B7CMAmYveuW/wiDH08ONJ1kEbFs3txFgPj -CDRd2a+/U/ALf1J9JnPy1rjAM3HfRvruTx46pxT9CJjRDOyatl911XM0RCbecPZw -tMo9em59F1R5rFqxvuP4BbekXdZc1orXfAC/5ot8v+3TK/MD26tjNE8qfAhfLV25 -426IoXIG/EoNI7WYkVK3Fiyzjyyq90hF8TI+CLG5mPPx7PLl1LAZaoOYQ5l9J7oL -OrYwyDjqcLxGnaSbVa++qooaJnwMusYYJeysV7z+7ZiV2xkxhahMQQs/6i8vtmSW -s83pXcmbO3zpXC59qdHmHcMmtXLxM10D7SFXv1GI8Ev5ewKoRIREXNzZeIB+SHdQ -A6Ffv6FWAXvITldpR8MeSm3oxFEjLhxhhI6cZoVITw93zUyk9LDq/i583vvdUrnh -Uy++ByguXPAuMP+pcseKU5jCxTR+o9K0pwXhRAZC+iBLHLnRInD6rKPOsuIudLBh -EqPeqfB5Qec58EeH8Ghz2qkqNIxgZuj1Iu+e1ppteVcXQJIeeBGrmSJaRDJlnh2n -F6SWlTIx0ZXYQJ2vMmzn4HvuQiMlKRUHEM8f0DC24YrgEXwjHr3LCZn1oJmq4KmJ -AjsEEwECACUFAkqUWzkCGwMFCQeEzgAGCwkIBwMCBBUCCAMDFgIBAh4BAheAAAoJ -ELtXLg4tGCkQFq8QAI3o+OEx2feC/0R7qzXe6ANkBEdXDGIFLYggVqtOPS2/C1fY -YeZ7y7QCBDy7WGEYin8m+dSLwvKVNOfHKhZ5NLuRTsvC/TylfS4joysZ9NuVFCgp -ZlAoZxNndvdCPaX0RdQcgDRkGP9E89qqrglACOJDc2DaEKK2lQ24wK9wwm0lKAHN -s3d5qz9TQ2PopBED1LQbyHk29pTy/zJqyKNn0mxD97blvH2mJDU1pISMxNqOv9HA -PysjrqRYzrme6Mhy6TfWknWThLhIMDaaOehzMrwTlIYi85bySWYd3DEa7NH3IvWc -6SfLQgaRh93GK7ImY3sI4A2MoIxGVU6CSzHiRfwW1RnOb+3fw0ffvrbV7Qr6axln -pF4RQaCXfpDAde8AzIwOGJJUcImdjd4Z2Ji33vmhx3drD2SyYiZ3/3cPjheHBJgH -p/LnOFb/ejlvaqIYpFKlIbqsPbl541mhjTsu2yrgfAlRBAIer9m6c0dtjIJnqnXB -yNhv11XdiH3rIURCJcKkZIBgMcosun3bMK9hHYQ+A2dvLbWIG4W67xDufYpzmRx8 -pLepfQa6FHgD/5a1AJ93fQrkkd0gaDbNt0H/DvQZqLaxaZHKtCVO7JZwPvxw4ttS -jq6MW8v78I1D9i/WC53rvUeFTiChm7xtCMzXr08g51Xu/t3q0oOtaHhCHYGOiQI7 -BBMBAgAlBQJKlFs5AhsDBQkHhM4ABgsJCAcDAgQVAggDAxYCAQIeAQIXgAAKCRC7 -Vy4OLRgpEBavEACN6PjhMdn3gv9Ee6s13ugDZARHVwxiBS2IIFarTj0tvwtX2GHm -e8u0AgQ8u1hhGIp/JvnUi8LylTTnxyoWeTS7kU7Lwv08pX0uI6MrGfTblRQoKWZQ -KGcTZ3b3Qj2l9EXUHIA0ZBj/RPPaqq4JQAjiQ3Ng2hCitpUNuMCvcMJtJSgBzbN3 -eas/U0Nj6KQR//////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////w== -=1qLu ------END PGP PUBLIC KEY BLOCK----- diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/finalise.d/99-cleanup python-diskimage-builder-2.17.0/doc/source/elements/gentoo/finalise.d/99-cleanup --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/finalise.d/99-cleanup 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/finalise.d/99-cleanup 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -#!/bin/bash - -if [[ ${DIB_DEBUG_TRACE:-0} -gt 0 ]]; then - set -x -fi -set -eu -set -o pipefail - -if mountpoint -q /dev/shm; then - echo "/dev/shm found in /proc/self/mountinfo" -elif [[ -k /dev/shm ]]; then - echo "/dev/shm exists and is stickied" -else - fix_shm -fi - -# make world consistant -USE="-build" emerge -q --complete-graph=y --jobs=2 --update --newuse --deep --with-bdeps=y @world -# rebuild packages that might need it -USE="-build" emerge -q --jobs=2 --usepkg=n @preserved-rebuild -# remove unneeded packages -USE="-build" emerge --verbose=n --depclean -# rebuild packages that might have somehow depended on the unneeded packages -USE="-build" emerge -q --jobs=2 --usepkg=n @preserved-rebuild - -# update config files -etc-update --automode -5 - -# clean up portage files -emerge --verbose=n --depclean -emaint all -f -eselect news read all - -rm -Rf /root/.ccache/* /usr/src/* /var/cache/edb/dep/* /var/cache/genkernel/* /var/empty/* /var/run/* /var/state/* /var/tmp/* -rm -Rf /etc/*- /etc/*.old /etc/ssh/ssh_host_* /root/.*history /root/.lesshst /root/.ssh/known_hosts /root/.viminfo /usr/share/genkernel /usr/lib64/python*/site-packages/gentoolkit/test/eclean/testdistfiles.tar.gz -if [[ "${GENTOO_PORTAGE_CLEANUP}" != "False" ]]; then - # remove the overlays - if [[ ${GENTOO_OVERLAYS} != '' ]]; then - for OVERLAY in ${GENTOO_OVERLAYS}; do - layman -d "${OVERLAY}" - done - fi - # remove portage files - rm -Rf /usr/portage/* /var/cache/portage/distfiles -fi - -# shrink a bit -for i in $(find /var/log -type f); do echo > $i; done -find /usr/share/man/ -mindepth 1 -maxdepth 1 -path "/usr/share/man/man*" -prune -o -exec rm -rf {} \; - -# make it so we don't have to reinstall grub -if [[ -a /usr/sbin/grub2-install ]]; then - mkdir -p /tmp/grub - touch /tmp/grub/install -fi - -unfix_shm diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/gentoo/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -sys-fs/dosfstools: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-01-migrate-pax python-diskimage-builder-2.17.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-01-migrate-pax --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-01-migrate-pax 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-01-migrate-pax 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# migrate pt_pax flags to xt_pax -if [[ -a /usr/sbin/migrate-pax ]]; then - /usr/sbin/migrate-pax -m -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-02-flags python-diskimage-builder-2.17.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-02-flags --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-02-flags 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-02-flags 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# get the directories in order -mkdir -p /etc/portage/profile -mkdir -p /etc/portage/package.keywords -mkdir -p /etc/portage/package.mask -mkdir -p /etc/portage/package.unmask -mkdir -p /etc/portage/package.use - -# needed in order to install pip packages as root -echo 'dev-python/pip vanilla' >> /etc/portage/package.use/pip -# needed to create disk images -echo 'sys-fs/lvm2 -thin' >> /etc/portage/package.use/grub -echo 'sys-boot/grub device-mapper' >> /etc/portage/package.use/grub - -# needed in order to install pip packages as root -echo '=dev-python/pip-9.0.1-r2 ~amd64' >> /etc/portage/package.keywords/pip - -if [[ "${GENTOO_PROFILE}" == *"musl"* ]]; then - echo "dev-vcs/git -gpg" >> /etc/portage/package.use/musl # gpg doesn't build on musl profiles - echo "=sys-block/open-iscsi-2.0.874-r1 ~amd64" >> /etc/portage/package.keywords/musl - echo "=sys-block/open-isns-0.97 ~amd64" >> /etc/portage/package.keywords/musl -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays python-diskimage-builder-2.17.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [[ ${GENTOO_OVERLAYS} != '' ]]; then - if mountpoint -q /dev/shm; then - echo "/dev/shm found in /proc/self/mountinfo" - elif [[ -k /dev/shm ]]; then - echo "/dev/shm exists and is stickied" - else - fix_shm - fi - - if [[ ! -f /usr/portage/profiles ]]; then - emerge-webrsync -q - fi - - # layman requires cryptography, which needs ecc crypto functions. - # binaries providing those functions have questionable legality for - # redistribution, so we have to use a version of openssl that works around - # it (using fedora's patchset) and also use a version of cryptography that - # depends on that version of openssl. - echo '=dev-python/cryptography-2.1.3 ~amd64' >> /etc/portage/package.keywords/layman - echo '=dev-libs/openssl-1.1.0g-r1 ~amd64' >> /etc/portage/package.keywords/layman - echo '=dev-libs/openssl-1.1.0g-r1' >> /etc/portage/package.unmask/layman - emerge -q --oneshot --jobs=2 openssl openssh - # install layman - USE="-build" emerge --deep -q --jobs=2 layman - # sync the initial overlay list - layman -S - # enable the various overlays - for OVERLAY in ${GENTOO_OVERLAYS}; do - layman -a "${OVERLAY}" - done - - unfix_shm -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-04-install-desired-python python-diskimage-builder-2.17.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-04-install-desired-python --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-04-install-desired-python 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/pre-install.d/02-gentoo-04-install-desired-python 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -#!/bin/bash - -if [[ ${DIB_DEBUG_TRACE:-0} -gt 0 ]]; then - set -x -fi -set -eu -set -o pipefail - -if mountpoint -q /dev/shm; then - echo "/dev/shm found in /proc/self/mountinfo" -elif [[ -k /dev/shm ]]; then - echo "/dev/shm exists and is stickied" -else - fix_shm -fi - -if [[ ! -f /usr/portage/profiles ]]; then - emerge-webrsync -q -fi - -# python-3.6 and python-3.5 are masked and considered unstable for some reason -echo "PYTHON_TARGETS=\"${GENTOO_PYTHON_TARGETS}\"" >> /etc/portage/make.conf -if [[ "${GENTOO_PYTHON_TARGETS}" == *"python3_6"* ]]; then - echo -e "-python_targets_python3_6\n-python_single_target_python3_6" >> /etc/portage/profile/use.stable.mask - echo 'dev-lang/python:3.6 ~amd64' >> /etc/portage/package.keywords/python - echo '~dev-python/setuptools-36.0.1 ~amd64' >> /etc/portage/package.keywords/python - echo '~dev-python/pyxattr-0.6.0 ~amd64' >> /etc/portage/package.keywords/python - echo '~sys-apps/kmod-24 ~amd64' >> /etc/portage/package.keywords/python - [[ ! -e /usr/lib64/libpython3.6m.so ]] && USE="-build" emerge -1q --jobs=2 dev-lang/python:3.6 -fi -[[ "${GENTOO_PYTHON_TARGETS}" == *"python3_5"* ]] && [[ ! -e /usr/lib64/libpython3.5m.so ]] && USE="-build" emerge -1q --jobs=2 dev-lang/python:3.5 -[[ "${GENTOO_PYTHON_TARGETS}" == *"python3_4"* ]] && [[ ! -e /usr/lib64/libpython3.4m.so ]] && USE="-build" emerge -1q --jobs=2 dev-lang/python:3.4 -[[ "${GENTOO_PYTHON_TARGETS}" == *"python2_7"* ]] && [[ ! -e /usr/lib64/libpython2.7.so ]] && USE="-build" emerge -1q --jobs=2 dev-lang/python:2.7 -# disable python in git if we have to, it only supports python-2.7 -if [[ "${GENTOO_PYTHON_TARGETS}" != *"python2_7"* ]]; then - echo 'dev-vcs/git -python' >> /etc/portage/package.use/git -fi -# make sure we have the new python for portage bevore we possibly remove python 2.7 -# this is done one by one with nodeps because it can sometimes have dependency loops -PYTHON_PACKAGES="dev-python/six dev-python/packaging dev-python/pyparsing dev-python/appdirs dev-python/setuptools dev-python/certifi" -for PACKAGE in ${PYTHON_PACKAGES}; do - USE="-build" emerge -q --oneshot --jobs=2 --with-bdeps=y --update --newuse --deep --nodeps "${PACKAGE}" -done -USE="-build" emerge -q --oneshot --jobs=2 --with-bdeps=y --update --newuse --deep --complete-graph=y sys-apps/portage dev-python/pyxattr -# set the active python version -eselect python set ${GENTOO_PYTHON_ACTIVE_VERSION} -# allow these uninstalls to fail as they may not be installed to begin with -set +e -[[ "${GENTOO_PYTHON_TARGETS}" != *"python2_7"* ]] && emerge -C -q dev-lang/python:2.7 -[[ "${GENTOO_PYTHON_TARGETS}" != *"python3_4"* ]] && emerge -C -q dev-lang/python:3.4 -[[ "${GENTOO_PYTHON_TARGETS}" != *"python3_5"* ]] && emerge -C -q dev-lang/python:3.5 -[[ "${GENTOO_PYTHON_TARGETS}" != *"python3_6"* ]] && emerge -C -q dev-lang/python:3.6 -set -e - -# make world consistant -USE="-build" emerge -q --complete-graph=y --jobs=2 --update --newuse --deep --with-bdeps=y @world -# rebuild packages that might need it -USE="-build" emerge -q --jobs=2 --usepkg=n @preserved-rebuild -# remove unneeded packages -USE="-build" emerge --verbose=n --depclean -# rebuild packages that might have somehow depended on the unneeded packages -USE="-build" emerge -q --jobs=2 --usepkg=n @preserved-rebuild - -unfix_shm diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/README.rst python-diskimage-builder-2.17.0/doc/source/elements/gentoo/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -======== -Gentoo -======== -Use a Gentoo cloud image as the baseline for built disk images. The images are -located in profile specific sub directories: - - http://distfiles.gentoo.org/releases/amd64/autobuilds/ - -As of this writing, only x86_64 images are available. - -Notes: - -* There are very frequently new automated builds that include changes that - happen during the product maintenance. The download directories contain an - unversioned name and a versioned name. The unversioned name will always - point to the latest image, but will frequently change its content. The - versioned one will never change content, but will frequently be deleted and - replaced by a newer build with a higher version-release number. - -* In order to run the package-installs element you will need to make sure - `dev-python/pyyaml` is installed on the host. - -* In order to run the vm element you will need to make sure `sys-block/parted` - is installed on the host. - -* Other profiles can be used by exporting GENTOO_PROFILE with a valid profile. - A list of valid profiles follows: - - default/linux/amd64/17.0 - default/linux/amd64/17.0/no-multilib - hardened/linux/amd64 - hardened/linux/amd64/no-multilib - -* You can set the GENTOO_PORTAGE_CLEANUP environment variable to true (or - anything other than False) to clean up portage from the system and get the - image size smaller. - -* Gentoo supports many diferent versions of python, in order to select one - you may use the `GENTOO_PYTHON_TARGETS` environment variable to select - the versions of python you want on your image. The format of this variable - is a string as follows `"python2_7 python3_5"`. - -* In addition you can select the primary python version you wish to use (that - which will be called by running the `python` command. The - `GENTOO_PYTHON_ACTIVE_VERSION` is used to set that mapping. The variable - contents can be something like `python3.5`. - -* You can enable overlays using the `GENTOO_OVERLAYS` variable. In it you - should put a space separated list of overlays. The overlays must be in the - official overlay list and must be git based. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/root.d/10-gentoo-image python-diskimage-builder-2.17.0/doc/source/elements/gentoo/root.d/10-gentoo-image --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/root.d/10-gentoo-image 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/root.d/10-gentoo-image 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -#!/bin/bash - -# Copyright 2016 Matthew Thode -# All Rights Reserved. -# -# 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:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "${ARCH}" ] -[ -n "${TARGET_ROOT}" ] - -if [ 'amd64' = "${ARCH}" ] ; then - ARCH='x86_64' -fi - -if ! [ 'x86_64' = "${ARCH}" ] ; then - echo "Only x86_64 images are currently available but ARCH is set to ${ARCH}." - exit 1 -fi - -# valid gentoo profiles are as follows -# default/linux/amd64/13.0 -# default/linux/amd64/13.0/no-multilib -# hardened/linux/amd64 -# hardened/linux/amd64/no-multilib -GENTOO_PROFILE=${GENTOO_PROFILE:-'default/linux/amd64/17.0'} -if [[ "${GENTOO_PROFILE}" == "default/linux/amd64/17.0" ]]; then - FILENAME_BASE='gentoo-stage4' - SIGNED_SOURCE_SUFFIX='minimal' -elif [[ "${GENTOO_PROFILE}" == "default/linux/amd64/17.0/no-multilib" ]]; then - FILENAME_BASE='gentoo-stage4-nomultilib' - SIGNED_SOURCE_SUFFIX='minimal-nomultilib' -elif [[ "${GENTOO_PROFILE}" == "hardened/linux/amd64" ]]; then - FILENAME_BASE='gentoo-stage4-hardened' - SIGNED_SOURCE_SUFFIX='hardened+minimal' -elif [[ "${GENTOO_PROFILE}" == "hardened/linux/amd64/no-multilib" ]]; then - FILENAME_BASE='gentoo-stage4-hardened-nomultilib' - SIGNED_SOURCE_SUFFIX='hardened+minimal-nomultilib' -else - echo 'invalid profile, please select from the following profiles' - echo 'default/linux/amd64/17.0' - echo 'default/linux/amd64/17.0/no-multilib' - echo 'hardened/linux/amd64' - echo 'hardened/linux/amd64/no-multilib' - exit 1 -fi - -DIB_CLOUD_SOURCE=${DIB_CLOUD_SOURCE:-"http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-stage4-amd64-${SIGNED_SOURCE_SUFFIX}.txt"} -BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-"http://distfiles.gentoo.org/releases/amd64/autobuilds/$(curl ${DIB_CLOUD_SOURCE} -s | tail -n 1 | cut -d\ -f 1)"} -SIGNATURE_FILE="${SIGNATURE_FILE:-${BASE_IMAGE_FILE}.DIGESTS.asc}" -CACHED_FILE="${DIB_IMAGE_CACHE}/${FILENAME_BASE}.tar.bz2" -CACHED_SIGNATURE_FILE="${DIB_IMAGE_CACHE}/${FILENAME_BASE}.asc" - -if [ -n "${DIB_OFFLINE}" -a -f "${CACHED_FILE}" ] ; then - echo "Not checking freshness of cached ${CACHED_FILE}" -else - echo 'Fetching Base Image' - "${TMP_HOOKS_PATH}"/bin/cache-url "${SIGNATURE_FILE}" "${CACHED_SIGNATURE_FILE}" - "${TMP_HOOKS_PATH}"/bin/cache-url "${BASE_IMAGE_FILE}" "${CACHED_FILE}" - pushd "${DIB_IMAGE_CACHE}" - # import the key - # this key can be verified at one of the following places - # https://wiki.gentoo.org/wiki/Project:RelEng#Keys - # https://dev.gentoo.org/~dolsen/releases/keyrings/gentoo-keys-*.tar.xz - # http://distfiles.gentoo.org/distfiles/gentoo-keys-*.tar.xz - GPGDIR=$(mktemp -d -t) - gpg --no-default-keyring --keyring "${GPGDIR}"/gentookeys.gpg --import "${TMP_HOOKS_PATH}"/extra-data.d/gentoo-releng.gpg - # check the sig file - gpgv --keyring "${GPGDIR}"/gentookeys.gpg "${CACHED_SIGNATURE_FILE}" - if [[ "${?}" != 0 ]]; then - echo 'invalid signature file' - exit 1 - fi - rm -rf "${GPGDIR}" - echo 'valid key used' - CACHED_SHA512SUM=$(grep -A1 -e 'SHA512' "${CACHED_SIGNATURE_FILE}" | grep -e 'tar.bz2$' | cut -d\ -f 1) - ACTUAL_SHA512SUM=$(sha512sum "${CACHED_FILE}" | cut -d\ -f 1) - if [[ "${ACTUAL_SHA512SUM}" != "${CACHED_SHA512SUM}" ]]; then - echo "invalid checksum on downloaded tarball: ${CACHED_FILE}" - exit 1 - fi - echo 'valid checksum' - popd -fi - -# Extract the base image (use --numeric-owner to avoid UID/GID mismatch between -# image tarball and host OS) -sudo tar -C "${TARGET_ROOT}" --numeric-owner --xattrs -xjpf "${CACHED_FILE}" diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/test-elements/build-succeeds/element-deps python-diskimage-builder-2.17.0/doc/source/elements/gentoo/test-elements/build-succeeds/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/test-elements/build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/test-elements/build-succeeds/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -base diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/gentoo/test-elements/build-succeeds/README.rst python-diskimage-builder-2.17.0/doc/source/elements/gentoo/test-elements/build-succeeds/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/gentoo/test-elements/build-succeeds/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/gentoo/test-elements/build-succeeds/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Test that we can successfully build a gentoo image. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/growroot/element-deps python-diskimage-builder-2.17.0/doc/source/elements/growroot/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/growroot/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/growroot/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -dib-init-system -install-static diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/growroot/init-scripts/openrc/growroot python-diskimage-builder-2.17.0/doc/source/elements/growroot/init-scripts/openrc/growroot --- python-diskimage-builder-2.11.0/doc/source/elements/growroot/init-scripts/openrc/growroot 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/growroot/init-scripts/openrc/growroot 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/sbin/runscript - -start() { - /usr/local/sbin/growroot - eend 0 -} - -depend() { - need localmount -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/growroot/init-scripts/systemd/growroot.service python-diskimage-builder-2.17.0/doc/source/elements/growroot/init-scripts/systemd/growroot.service --- python-diskimage-builder-2.11.0/doc/source/elements/growroot/init-scripts/systemd/growroot.service 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/growroot/init-scripts/systemd/growroot.service 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -[Unit] -Description=Grow root partition -Wants=systemd-udev-settle.service -After=systemd-udev-settle.service - -[Service] -Type=oneshot -User=root -ExecStart=/usr/local/sbin/growroot -RemainAfterExit=true - -[Install] -WantedBy=multi-user.target diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/growroot/init-scripts/upstart/growroot.conf python-diskimage-builder-2.17.0/doc/source/elements/growroot/init-scripts/upstart/growroot.conf --- python-diskimage-builder-2.11.0/doc/source/elements/growroot/init-scripts/upstart/growroot.conf 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/growroot/init-scripts/upstart/growroot.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -description "Growing root partition" - -console output - -start on local-filesystems - -post-start script -/usr/local/sbin/growroot -end script diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/growroot/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/growroot/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/growroot/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/growroot/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -growpart: -e2fsprogs: \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/growroot/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/growroot/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/growroot/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/growroot/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -{ - "family":{ - "redhat": { - "growpart": "cloud-utils-growpart", - "e2fsprogs": "e2fsprogs" - }, - "debian":{ - "growpart": "cloud-utils", - "e2fsprogs": "e2fsprogs" - }, - "suse": { - "growpart": "growpart", - "e2fsprogs": "e2fsprogs" - }, - "gentoo": { - "growpart": "sys-fs/growpart", - "e2fsprogs": "sys-fs/e2fsprogs" - } - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/growroot/post-install.d/80-growroot python-diskimage-builder-2.17.0/doc/source/elements/growroot/post-install.d/80-growroot --- python-diskimage-builder-2.11.0/doc/source/elements/growroot/post-install.d/80-growroot 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/growroot/post-install.d/80-growroot 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -case "$DIB_INIT_SYSTEM" in - upstart) - # nothing to do - exit 0 - ;; - systemd) - systemctl enable growroot.service - ;; - openrc) - # let dib-init-system's postinstall handle enabling init scripts - exit 0 - ;; - *) - echo "Unsupported init system" - exit 1 - ;; -esac diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/growroot/README.rst python-diskimage-builder-2.17.0/doc/source/elements/growroot/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/growroot/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/growroot/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -======== -growroot -======== - -Grow the root partition on first boot. - -This is only supported on: - -* ubuntu trusty or later -* gentoo -* fedora & centos -* suse & opensuse diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/growroot/static/usr/local/sbin/growroot python-diskimage-builder-2.17.0/doc/source/elements/growroot/static/usr/local/sbin/growroot --- python-diskimage-builder-2.11.0/doc/source/elements/growroot/static/usr/local/sbin/growroot 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/growroot/static/usr/local/sbin/growroot 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#!/bin/bash -# dib-lint: disable=dibdebugtrace - -set -exu -set -o pipefail - -root_dev=$(df -P / | tail -n 1 | awk '/.*/ { print $1 }') - -if [ -z "${root_dev}" ]; then - echo "*** Root device not found?" - exit 1 -fi - -udev_root=$(udevadm info --query=all --name $root_dev) - -part=$(grep ID_PART_ENTRY_DISK <<< "${udev_root}" | cut -d= -f2) -if [ -z "${part}" ]; then - echo "*** Root partition not found!" - exit 1 -fi -part_no=$(grep ID_PART_ENTRY_NUMBER <<< "${udev_root}" | cut -d= -f2) -if [ -z "${part_no}" ]; then - echo "*** Root partition number not found!" - exit 1 -fi - -disk=$(find /sys/dev/block -name ${part}) -disk="/dev/$(source ${disk}/uevent; echo $DEVNAME)" - -set +e -growpart $disk $part_no -# Error code 1 means no change -if [ "$?" -le 1 ]; then - # always return true because this might not work if were are non ext4 - resize2fs $root_dev || true -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/grub2/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/grub2/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/grub2/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/grub2/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -signed_grub_efi: - arch: amd64 -signed_shim_efi: - arch: amd64 -grub_bios: - arch: amd64 -signed_grub_efi_arm64: - arch: arm64 -grub_bios_arm64: - arch: arm64 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/grub2/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/grub2/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/grub2/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/grub2/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -{ - "family":{ - "debian":{ - "signed_grub_efi": "grub-efi-amd64-signed", - "signed_shim_efi": "shim-signed", - "grub_bios": "grub-pc-bin", - "signed_grub_efi_arm64": "grub-efi-arm64", - "grub_bios_arm64": "grub-efi-arm64-bin" - }, - "redhat":{ - "signed_grub_efi": "efibootmgr grub2-efi-modules grub2-efi", - "signed_shim_efi": "shim", - "grub_bios": "grub2" - }, - "suse":{ - "signed_grub_efi": "", - "signed_shim_efi": "", - "grub_bios": "grub2" - } - }, - "default":{ - "signed_grub_efi": "grub-efi-amd64-signed", - "signed_shim_efi": "shim-signed", - "grub_bios": "grub-pc-bin" - } -} - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/grub2/post-install.d/01-delete-grubenv python-diskimage-builder-2.17.0/doc/source/elements/grub2/post-install.d/01-delete-grubenv --- python-diskimage-builder-2.11.0/doc/source/elements/grub2/post-install.d/01-delete-grubenv 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/grub2/post-install.d/01-delete-grubenv 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi - -set -eu -set -o pipefail - - -# Delete /boot/grub2/grubenv if it exists because -# it will fail while doing grub-install again. -rm -f /boot/grub2/grubenv diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/grub2/README.rst python-diskimage-builder-2.17.0/doc/source/elements/grub2/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/grub2/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/grub2/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -===== -grub2 -===== -This image installs grub2 bootloader on the image, that's necessary for -the local boot feature in Ironic to work. This is being made a separated -element because usually images have grub2 removed for space reasons and -also because they are going to boot from network (PXE boot). diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/hpdsa/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/hpdsa/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/hpdsa/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/hpdsa/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -build-essential: -curl: - phase: pre-install.d -linux-headers-generic: -hpdsa-dkms: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/hpdsa/post-install.d/95-hpdsa python-diskimage-builder-2.17.0/doc/source/elements/hpdsa/post-install.d/95-hpdsa --- python-diskimage-builder-2.11.0/doc/source/elements/hpdsa/post-install.d/95-hpdsa 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/hpdsa/post-install.d/95-hpdsa 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail -# Blacklist the ahci driver for hpdsa to recognize the disks. -# It can also be done with element "modprobe-blacklist" which -# would add the ahci driver to /etc/modprobe.d/blacklist.conf. -# To be on safer side, blacklist the driver ahci without the -# element "modprobe-blacklist" also. -echo "blacklist ahci" >> /etc/modprobe.d/install-hpdsa.conf -echo "hpdsa" >> /etc/modules diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/hpdsa/post-install.d/98-hpdsa-post-dkms python-diskimage-builder-2.17.0/doc/source/elements/hpdsa/post-install.d/98-hpdsa-post-dkms --- python-diskimage-builder-2.11.0/doc/source/elements/hpdsa/post-install.d/98-hpdsa-post-dkms 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/hpdsa/post-install.d/98-hpdsa-post-dkms 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# This is required for HPDSA driver to be included in the -# ramdisk of the image. -update-initramfs -u diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/hpdsa/pre-install.d/06-hpdsa python-diskimage-builder-2.17.0/doc/source/elements/hpdsa/pre-install.d/06-hpdsa --- python-diskimage-builder-2.11.0/doc/source/elements/hpdsa/pre-install.d/06-hpdsa 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/hpdsa/pre-install.d/06-hpdsa 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Add hpdsa repository -echo 'deb https://downloads.linux.hp.com/SDR/repo/ubuntu-hpdsa' $DIB_RELEASE ' main' \ - >> /etc/apt/sources.list.d/ubuntu-hpdsa.list - -# Add the key -curl https://downloads.linux.hp.com/SDR/hpPublicKey2048_key1.pub | apt-key add - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/hpdsa/README.rst python-diskimage-builder-2.17.0/doc/source/elements/hpdsa/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/hpdsa/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/hpdsa/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -===== -hpdsa -===== -This is the hpdsa element. - -This element enables the 'hpdsa' driver to be included in -the ramdisk when invoked during ramdisk/image creation. - -This driver is required for deploying the HP Proliant Servers -Gen9 with Dynamic Smart Array Controllers. - -Note: This element supports only Ubuntu image/ramdisk to be -updated with the hpdsa driver. It installs hp certificate -from https://downloads.linux.hp.com/SDR/hpPublicKey2048_key1.pub. -Since HP has released this currently only for trusty, -It has been restricted to work only for trusty. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/hpdsa/root.d/10-hpdsa-check-distro python-diskimage-builder-2.17.0/doc/source/elements/hpdsa/root.d/10-hpdsa-check-distro --- python-diskimage-builder-2.11.0/doc/source/elements/hpdsa/root.d/10-hpdsa-check-distro 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/hpdsa/root.d/10-hpdsa-check-distro 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [ 'ubuntu' != $DISTRO_NAME ] ; then - echo "Only ubuntu is supported for hpdsa driver. The DISTRO is set to $DISTRO_NAME" - exit 1 -fi - -if [ 'trusty' != $DIB_RELEASE ] ; then - echo "Only trusty is supported for hpdsa driver. The DIB_RELEASE is set to $DIB_RELEASE" - exit 1 -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/hwburnin/binary-deps.d/hwburnin python-diskimage-builder-2.17.0/doc/source/elements/hwburnin/binary-deps.d/hwburnin --- python-diskimage-builder-2.11.0/doc/source/elements/hwburnin/binary-deps.d/hwburnin 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/hwburnin/binary-deps.d/hwburnin 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -spew -memtester diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/hwburnin/init.d/70-hwburnin python-diskimage-builder-2.17.0/doc/source/elements/hwburnin/init.d/70-hwburnin --- python-diskimage-builder-2.11.0/doc/source/elements/hwburnin/init.d/70-hwburnin 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/hwburnin/init.d/70-hwburnin 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -echo "Starting HW Burnin" -memtester 1G 10 # XXX: Discover RAM size -# XXX: Discover and test disks with spew - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/hwburnin/README.rst python-diskimage-builder-2.17.0/doc/source/elements/hwburnin/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/hwburnin/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/hwburnin/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -======== -hwburnin -======== -A hardware test ramdisk - exercises the machine RAM and exercises the hard -disks diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/hwdiscovery/binary-deps.d/hwdiscovery python-diskimage-builder-2.17.0/doc/source/elements/hwdiscovery/binary-deps.d/hwdiscovery --- python-diskimage-builder-2.11.0/doc/source/elements/hwdiscovery/binary-deps.d/hwdiscovery 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/hwdiscovery/binary-deps.d/hwdiscovery 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -lshw -hwinfo -dhclient -wget -base64 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/hwdiscovery/element-deps python-diskimage-builder-2.17.0/doc/source/elements/hwdiscovery/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/hwdiscovery/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/hwdiscovery/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/hwdiscovery/init.d/60-hwdiscovery python-diskimage-builder-2.17.0/doc/source/elements/hwdiscovery/init.d/60-hwdiscovery --- python-diskimage-builder-2.11.0/doc/source/elements/hwdiscovery/init.d/60-hwdiscovery 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/hwdiscovery/init.d/60-hwdiscovery 1970-01-01 00:00:00.000000000 +0000 @@ -1,104 +0,0 @@ -echo "Starting HW Discovery" - -function cpu_cores() { - hwinfo --cpu | grep -c "Hardware Class: cpu" -} - -function ram() { - # XXX: /proc may not be the best place to get this from, but hwinfo reports weird values (e.g. "1GB + 512MB" on a test VM of mine) - _KB=$(grep MemTotal /proc/meminfo | awk '{ print $2 }') - echo "$((_KB * 1024)) bytes" -} - -function pxe_mac() { - local bootif_re='BOOTIF=([^ ]+)' _mac - if [[ $(cat /proc/cmdline) =~ $bootif_re ]]; then - # If we were booted using pxelinux and its config file has the - # IPAPPEND 2 stanza under the entry we booted from, then pxelinux - # will have appended a BOOTIF argument to the kernel parameters telling - # us what MAC address we are booting with. From that, we can derive the - # boot interface with no problems. - _mac="${BASH_REMATCH[1]//-/:}" - _mac="${_mac#*:}" - elif [[ -d /sys/firmware/efi ]] && type efibootmgr &>/dev/null; then - # Likewise, if we booted via the network while running in UEFI mode, and - # efibootmgr is installed, we can determine the MAC address of the nic we - # booted from. It would be good to have code that can also do this using - # efivars or parsing the stuff under /sys/firmware/efi/efivars directly, - # but that is a trickier thing to do. - local -A boot_entries - local bootent_re='^Boot([0-9]{4})' - local efimac_re='MAC\(([0-9a-f]+)' - local k v current_bootent - while read line; do - k="${line%% *}" - v="${line#* }" - if [[ $k = BootCurrent:* ]]; then - current_bootent="${line##BootCurrent: }" - elif [[ $k =~ $bootent_re ]]; then - boot_entries["${BASH_REMATCH[1]}"]="$v" - fi - done < <(efibootmgr -v) - - if [[ ${boot_entries["$current_bootent"]} =~ $efimac_re ]]; then - _mac='' - for o in 0 2 4 6 8 10; do - _mac+="${BASH_REMATCH[1]:$o:2}:" - done - _mac=${_mac%:} - fi - fi - if [[ ! $_mac ]]; then - # If none of the exact methods worked, fall back on the heuristic - # method and just return the mac addresses of all the interfaces - # that have a link. Hopefully whatever consumes this info is smarter - # than we are. - local _info1 _info2 _dev - _info1=$(hwinfo --network|grep -B2 "Link detected: yes"|grep -C1 "HW Address:") - _info2=$(echo "${_info1}"|awk '/Device File: (vlan*|br*)/{for(x=NR-2;x<=NR+2;x++)d[x];}{a[NR]=$0}END{for(i=1;i<=NR;i++)if(!(i in d))print a[i]}') - _dev=$(echo "${_info1}" | grep "Device File:"|awk -F':' {'print $2'}|tr -d ' ') - _mac=$(echo "${_info2}" | grep "HW Address:"|awk -F'ss:' {'print $2'}|tr -d ' ') - fi - echo $_mac - export HW_DISCOVERY_BOOT_IFACE="$_mac" -} - -function disk() { - # XXX: This is returning only the first disk discovered, which is very likely to be insufficient on machines that present us with multiple disks - # XXX: This is likely reporting in TB, but the units are not guaranteed. Maybe convert to bytes? - lshw -C disk | grep size | awk -F'(' '{ print $2 }' | tr -d ')' | head -1 -} - -function raw_disk() { - hwinfo --disk -} - -function raw_network() { - hwinfo --network -} - -HW_DISCOVERY_OUTPUT=$(cat <&2 - exit 0 -fi - -if [ ! -d "${DIB_ILO_FIRMWARE_PATH}" ]; then - echo "Firmware path not found: ${DIB_ILO_FIRMWARE_PATH}" - exit 1 -fi - -# We copy to /tmp because its temporary - we do a mv later into the initramfs -# image. -mkdir -p "$TMP_MOUNT_PATH/tmp/ilo/" -find "${DIB_ILO_FIRMWARE_PATH}" -type f \( -name '*.scexe' -o -name '*.exe' \) | while read FWNAME -do - TARGET="$TMP_MOUNT_PATH/tmp/ilo/$(basename "$FWNAME")" - echo Unpacking $FWNAME to $TARGET - bash "$FWNAME" "--unpack=$TARGET" - echo Done -done diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ilo/init.d/50-ilo-firmware python-diskimage-builder-2.17.0/doc/source/elements/ilo/init.d/50-ilo-firmware --- python-diskimage-builder-2.11.0/doc/source/elements/ilo/init.d/50-ilo-firmware 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ilo/init.d/50-ilo-firmware 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -if [ -d /ilo ]; then - find /ilo -type f \( -name flash_ilo3 -o -name flash_ilo4 \) | while read FWNAME - do - cd "$(dirname "$FWNAME")" - logname="$(basename "$(dirname "$FWNAME")").log" - echo Running $FWNAME - "$FWNAME" --silent --log "$logname" - result=$? - echo Finished $FWNAME with result $? - cat "$logname" - #avoid leaking space during large runs - rm "$logname" - if [ $result -eq 2 ]; then - echo "Firmware already up to date" - elif [ $result -eq 4 ]; then - echo "Firmware not applicable to machine" - elif [ $result -ne 0 ]; then - echo "Error applying firmware" - troubleshoot - fi - done -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ilo/ramdisk-install.d/50-ilo-firmware python-diskimage-builder-2.17.0/doc/source/elements/ilo/ramdisk-install.d/50-ilo-firmware --- python-diskimage-builder-2.11.0/doc/source/elements/ilo/ramdisk-install.d/50-ilo-firmware 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ilo/ramdisk-install.d/50-ilo-firmware 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [ ! -d /tmp/ilo ]; then - exit 0 -fi - -mv /tmp/ilo "$TMP_MOUNT_PATH" diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ilo/README.rst python-diskimage-builder-2.17.0/doc/source/elements/ilo/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/ilo/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ilo/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -=== -ilo -=== -Ramdisk support for applying HP iLO firmware. - -The firmware files are copied in via an extra-data hook: the variable -DIB\_ILO\_FIRMWARE\_PATH specifies a directory, and every file in that directory -will be unpacked into a same-named directory in the ramdisk (using ---unpack=...). If the path is not specified, a diagnostic is output but no -error is triggered. - -During ramdisk init every found firmware installer will be executed using ---silent --log=log The log is displayed after the firmware has executed. - -If the firmware exits with status 0 (ok), status 2 (same or older version) or 4 -(ilo not detected) a diagnostic message is logged and init proceeds. - -Any other status code is treated as an error. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/install-bin/pre-install.d/01-install-bin python-diskimage-builder-2.17.0/doc/source/elements/install-bin/pre-install.d/01-install-bin --- python-diskimage-builder-2.11.0/doc/source/elements/install-bin/pre-install.d/01-install-bin 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/install-bin/pre-install.d/01-install-bin 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -install -m 0755 -o root -g root $(dirname $0)/../bin/* /usr/local/bin diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/install-bin/README.rst python-diskimage-builder-2.17.0/doc/source/elements/install-bin/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/install-bin/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/install-bin/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -=========== -install-bin -=========== - -Add any files in an element's bin directory to /usr/local/bin in the created -image with permissions 0755. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/install-static/element-deps python-diskimage-builder-2.17.0/doc/source/elements/install-static/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/install-static/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/install-static/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/install-static/install.d/10-install-static-files python-diskimage-builder-2.17.0/doc/source/elements/install-static/install.d/10-install-static-files --- python-diskimage-builder-2.11.0/doc/source/elements/install-static/install.d/10-install-static-files 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/install-static/install.d/10-install-static-files 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash -# Note that this relies on the detail that all elements share one dir inside -# the chroot. This will copy all the files that elements have added to -# element/static into the image. Mode, symlinks etc will be respected. - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -STATIC_SOURCE="$(dirname $0)/../static" -[ -d "${STATIC_SOURCE}" ] || exit 0 - -rsync -lCr "${STATIC_SOURCE}"/ / diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/install-static/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/install-static/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/install-static/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/install-static/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -rsync: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/install-static/README.rst python-diskimage-builder-2.17.0/doc/source/elements/install-static/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/install-static/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/install-static/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -============== -install-static -============== -Copy static files into the built image. - -The contents of any ``static/`` subdirs of elements will be installed into -these images at build time using ``rsync -lCr``. So to install a file -``/etc/boo``, include ``static/etc/boo`` in your element. - -Note: This installs all files with owner and group of root. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/install-types/extra-data.d/99-enable-install-types python-diskimage-builder-2.17.0/doc/source/elements/install-types/extra-data.d/99-enable-install-types --- python-diskimage-builder-2.11.0/doc/source/elements/install-types/extra-data.d/99-enable-install-types 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/install-types/extra-data.d/99-enable-install-types 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -#!/bin/bash -# Copyright 2014 Red Hat, Inc. -# -# 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 - -declare -a SPECIFIED_ELEMS - -# Add a blank first element to the array, since we're running with -u, we don't -# want an unbound variable error if no element install types were specified. -SPECIFIED_ELEMS[0]="" - -# List of all env vars to set install types -PREFIX="DIB_INSTALLTYPE_" -INSTALL_TYPE_VARS=$(env | grep ^$PREFIX | cut -d'=' -f1 || echo "") - -for _install_type_var in $INSTALL_TYPE_VARS; do - - # Get the element name and its install type - INSTALLDIRPREFIX=${_install_type_var:${#PREFIX}} - INSTALLDIRPREFIX=${INSTALLDIRPREFIX//_/-} - eval INSTALLTYPE=\$$_install_type_var - - # Create symlink for correct install type - pushd $TMP_HOOKS_PATH/install.d - if [ -d $INSTALLDIRPREFIX-$INSTALLTYPE-install ]; then - ln -sf $INSTALLDIRPREFIX-$INSTALLTYPE-install/* . - fi - popd - - SPECIFIED_ELEMS+=($INSTALLDIRPREFIX) - -done - -# For any existing *--install directory under install.d, -# if an environment variable setting a different install type was not seen, -# enable the default (set via --install-type). -default_install_type_dirs=$(find $TMP_HOOKS_PATH/install.d -maxdepth 1 -name "*-${DIB_DEFAULT_INSTALLTYPE}-install" -type d) -for _install_dir in $default_install_type_dirs; do - SUFFIX="-${DIB_DEFAULT_INSTALLTYPE}-install" - _install_dir=$(basename $_install_dir) - INSTALLDIRPREFIX=${_install_dir%$SUFFIX} - - found=0 - for specified in ${SPECIFIED_ELEMS[@]}; do - if [ "$specified" = "$INSTALLDIRPREFIX" ]; then - found=1 - break - fi - done - - # install type not specified, assume source - if [ "$found" = "0" ]; then - pushd $TMP_HOOKS_PATH/install.d - ln -sf $_install_dir/* . - popd - fi -done diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/install-types/README.rst python-diskimage-builder-2.17.0/doc/source/elements/install-types/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/install-types/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/install-types/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -============= -install-types -============= - -Enable install-types support for elements. - -Install types permit elements to be installed from different sources, such as -git repositories, distribution packages, or pip. The default install type -is 'source' but it can be modified on the disk-image-create command line -via the --install-type option. For example you can set: - - --install-type=package - -to enable package installs by default. Alternately, you can also -set DIB\_DEFAULT\_INSTALLTYPE. - -Many elements expose different install types. The different implementations -live under `--install` directories under an -element's install.d. The base element enables the chosen install type by -symlinking the correct hook scripts under install.d directly. -`` can be a string of alphanumeric and '-' characters, but -typically corresponds to the element name. - -For example, the nova element would provide: - - nova/install.d/nova-package-install/74-nova - nova/install.d/nova-source-install/74-nova - -The following symlink would be created for the package install type: - - install.d/74-nova -> nova-package-install/74-nova - -Or, for the source install type: - - install.d/74-nova -> nova-source-install/74-nova - -All other scripts that exist under install.d for an element will be executed as -normal. This allows common install code to live in a script under install.d. - -Environment Variables ---------------------- - -DIB_INSTALLTYPE_ - :Required: No - :Default: source - :Description: Set the install type for the dir prefix. '-' characters can be - replaced with a '_'. - :Example: ``DIB_INSTALLTYPE_simple_init=repo`` Sets the simple-init element - install type to be repo. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/cleanup.d/99-ramdisk-create python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/cleanup.d/99-ramdisk-create --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/cleanup.d/99-ramdisk-create 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/cleanup.d/99-ramdisk-create 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -#!/bin/bash - -# dib-lint: disable=safe_sudo - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - - -[ -n "$TARGET_ROOT" ] - -USER=${USER:-$(whoami)} - -source $_LIB/img-functions - -IMAGE_PATH=$(readlink -f $IMAGE_NAME) -cd $TARGET_ROOT - -DIB_IPA_COMPRESS_CMD="${DIB_IPA_COMPRESS_CMD:-gzip}" - -echo "#disabled" > ./tmp/fstab.new -sudo mv ./tmp/fstab.new ./etc/fstab -sudo ln -s ./sbin/init ./ - -# Note: The pci.ids, which is used by lshw, locate on Ubuntu -# in /usr/share/misc. Therefore we are removing only the -# ./usr/share/misc/m* (will remove the magic and magic.mgc files). -# on RHEL pci.ids is locate on /usr/share/hwdata/pci.ids. -sudo find . -xdev \ - -path './sys/*' -prune -o \ - -path './tmp/*' -prune -o \ - -path './boot/*' -prune -o \ - -path './root/.cache' -prune -o \ - -path './usr/include/*' -prune -o \ - -path './usr/lib/locale/*' -prune -o \ - -path './usr/share/doc/*' -prune -o \ - -path './usr/share/man/*' -prune -o \ - -path './usr/share/info/*' -prune -o \ - -path './usr/share/licenses/*' -prune -o \ - -path './usr/share/misc/m*' -prune -o \ - -path './usr/src/kernels/*' -prune -o \ - -path './var/cache/*' -prune -o \ - -name '*.pyc' -prune -o \ - -name '*.pyo' -prune -o \ - -print | sudo cpio -o -H newc | ${DIB_IPA_COMPRESS_CMD} > ${IMAGE_PATH}.initramfs - -select_boot_kernel_initrd $TARGET_ROOT -sudo cp $BOOTDIR/$KERNEL ${IMAGE_PATH}.kernel -sudo chown $USER: ${IMAGE_PATH}.kernel - -# TODO(lucasagomes): Create a hard link for the .vmlinuz file to keep -# it backward compatible. Remove it after it has been consistent and -# documented in both places for at least one full OpenStack release cycle -echo "WARNING: The kernel extension .vmlinuz has been deprecated. Please rely on the file with the extension .kernel instead." -sudo rm -f ${IMAGE_PATH}.vmlinuz -ln ${IMAGE_PATH}.kernel ${IMAGE_PATH}.vmlinuz diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/element-deps python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -dhcp-all-interfaces -install-static -no-final-image -package-installs -pip-and-virtualenv -pkg-map -runtime-ssh-host-keys -source-repositories -svc-map diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/element-provides python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/element-provides --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -ironic-python-agent diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/environment.d/01-ironic-agent.sh python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/environment.d/01-ironic-agent.sh --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/environment.d/01-ironic-agent.sh 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/environment.d/01-ironic-agent.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# backwards compatibility with the previous environment -# variable for the ironic-agent source repository -if [ -n "${DIB_REPOREF_agent:-}" ]; then - echo "WARNING: DIB_REPOREF_agent is deprecated. Please update to use DIB_REPOREF_ironic_agent instead." - export DIB_REPOREF_ironic_agent=${DIB_REPOREF_agent} -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/extra-data.d/15-ssl-ca-copy python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/extra-data.d/15-ssl-ca-copy --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/extra-data.d/15-ssl-ca-copy 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/extra-data.d/15-ssl-ca-copy 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi - -set -eu -set -o pipefail - -if [ -n "${DIB_IPA_CERT:=}" ]; then - cp $DIB_IPA_CERT $TMP_HOOKS_PATH/ipa-trusted-cert.pem -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/finalise.d/99-remove-extra-packages python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/finalise.d/99-remove-extra-packages --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/finalise.d/99-remove-extra-packages 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/finalise.d/99-remove-extra-packages 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# TODO(lucasagomes): optimize the ramdisk for other OSs -if [ $DISTRO_NAME = 'fedora' ] ; then - - _remove_yum='' - if [ $DIB_RELEASE -ge 22 ]; then - # if we are on F22, we can remove yum if there, because it has - # been superseeded by dnf - _remove_yum='yum' - fi - - install-packages -e kernel-debug-devel gcc fedora-logos \ - rsync pykickstart \ - genisoimage tcpdump \ - man-db kbd-misc \ - plymouth cronie ${_remove_yum} - - ${YUM:-yum} clean all - - # Rebuilding the rpm database after removing packages will reduce - # its size - rpm --rebuilddb - -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/install.d/ironic-agent-package-install/package-installs-ironic-agent python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/install.d/ironic-agent-package-install/package-installs-ironic-agent --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/install.d/ironic-agent-package-install/package-installs-ironic-agent 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/install.d/ironic-agent-package-install/package-installs-ironic-agent 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -ironic-python-agent diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/60-ironic-agent-install python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/60-ironic-agent-install --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/60-ironic-agent-install 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/60-ironic-agent-install 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -SCRIPTDIR=$(dirname $0) -IPADIR=/usr/share/ironic-python-agent - -# Generate upper-constraints -$IPADIR/imagebuild/common/generate_upper_constraints.sh $IPADIR/upper-constraints.txt - -# create the virtual environment -virtualenv $IPADIR/venv - -# pip might be an older version which does not support the -c option, therefore upgrade first -$IPADIR/venv/bin/pip install pip --upgrade - -# install IPA inside the virtual environment -$IPADIR/venv/bin/pip install -c $IPADIR/upper-constraints.txt $IPADIR - -# FIXME(lucasagomes): Figure out how we can use the "--install-option" -# parameter for pip install so we don't have to manually create a symlink -# create the launcher link so services can use it -ln -s $IPADIR/venv/bin/ironic-python-agent /usr/local/bin/ironic-python-agent - -case "$DIB_INIT_SYSTEM" in - upstart) - install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.conf /etc/init/ironic-python-agent.conf - ;; - systemd) - install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.service /usr/lib/systemd/system/ironic-python-agent.service - ;; - sysv) - install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.init /etc/init.d/ironic-python-agent.init - update-rc.d ironic-python-agent.init defaults - ;; - *) - echo "Unsupported init system" - exit 1 - ;; -esac - -# Copying the self signed certificate for request library -if [ -f /tmp/in_target.d/ipa-trusted-cert.pem ]; then - cat /tmp/in_target.d/ipa-trusted-cert.pem >> $($IPADIR/venv/bin/python -c "import requests; print requests.certs.where()") -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.conf python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.conf --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.conf 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -# ironic-python-agent - OpenStack Ironic Python Agent -# -# The ironic-python-agent helps ironic in deploying instances. - -description "Ironic Python Agnet" - -start on runlevel [2345] -stop on runlevel [!2345] - -respawn -respawn limit 10 5 -umask 022 - -expect stop - -console output - -pre-start script - echo Starting Ironic Python Agent -end script - -exec /usr/local/bin/ironic-python-agent diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.init python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.init --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.init 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.init 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -#!/bin/sh -e -### BEGIN INIT INFO -# Provides: ironic-python-agent -# Required-Start: $local_fs networking -# Required-Stop: $local_fs -# Default-Start: S -# Default-Stop: 0 6 -# X-Start-Before: -# Short-Description: Ironic Python Agent -# Description: Starts Ironic Python Agent for instance deployment -### END INIT INFO - -NAME=ironic-python-agent -INIT_NAME=/etc/init.d/${NAME} -SCRIPT_NAME=/usr/local/bin/${NAME} - -[ -x $SCRIPT_NAME ] || exit 0 - -case "$1" in - start) - $SCRIPT_NAME - ;; - stop) - ;; - *) - echo "Usage: $INIT_NAME {start|stop}" - exit 1 - ;; -esac - -exit 0 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.service python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.service --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.service 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/install.d/ironic-agent-source-install/ironic-python-agent.service 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -[Unit] -Description=Ironic Python Agent -After=network-online.target - -[Service] -ExecStartPre=/sbin/modprobe vfat -ExecStart=/usr/local/bin/ironic-python-agent -Restart=always -RestartSec=30s - -[Install] -WantedBy=multi-user.target - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -tgt: -curl: -# dmidecode does not exist for ppc* arches so we use lshw -dmidecode: - not-arch: ppc64,ppc64el,ppc64le -lshw: -ipmitool: -qemu-utils: -gcc: -python-dev: -parted: -hdparm: -util-linux: -genisoimage: -gdisk: -kmod: -psmisc: -dosfstools: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -{ - "family": { - "redhat": { - "tgt": "scsi-target-utils", - "curl": "curl", - "ironic-python-agent": "openstack-ironic-python-agent", - "qemu-utils": "qemu-img", - "python-dev": "python2-devel" - }, - "debian": { - "tgt": "tgt", - "curl": "curl" - } - }, - "default": { - "tgt": "tgt", - "curl": "curl", - "ironic-python-agent": "openstack-ironic-python-agent", - "qemu-utils": "qemu-utils", - "python-dev": "python-dev" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/post-install.d/80-ironic-agent python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/post-install.d/80-ironic-agent --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/post-install.d/80-ironic-agent 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/post-install.d/80-ironic-agent 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -install-packages -e git cloud-init - -rm -rf /tmp/ironic-python-agent - -case "$DIB_INIT_SYSTEM" in - upstart) - if [ -f /etc/init/ufw.conf ]; then - mv /etc/init/ufw.conf /etc/init/ufw.conf.disabled - fi - if [ -f /etc/init/tgt.conf ]; then - mv /etc/init/tgt.conf /etc/init/tgt.conf.disabled - fi - ;; - systemd) - if [[ $(systemctl --no-pager list-unit-files iptables) =~ 'enabled' ]]; then - systemctl disable iptables.service - fi - systemctl enable $(svc-map ironic-python-agent).service - systemctl enable ironic-agent-create-rescue-user.path - ;; - sysv) - update-rc.d iptables disable - ;; - *) - echo "Unsupported init system" - exit 1 - ;; -esac diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/README.rst python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -============ -ironic-agent -============ -Builds a ramdisk with ironic-python-agent. More information can be found at: - https://git.openstack.org/cgit/openstack/ironic-python-agent/ - -Beyond installing the ironic-python-agent, this element does the following: - -* Installs the ``dhcp-all-interfaces`` so the node, upon booting, attempts to - obtain an IP address on all available network interfaces. -* Disables the ``iptables`` service on SysV and systemd based systems. -* Disables the ``ufw`` service on Upstart based systems. -* Installs packages required for the operation of the ironic-python-agent:: - ``qemu-utils`` ``parted`` ``hdparm`` ``util-linux`` ``genisoimage`` -* When installing from source, ``python-dev`` and ``gcc`` are also installed - in order to support source based installation of ironic-python-agent and its - dependencies. -* Install the certificate if any, which is set to the environment variable - ``DIB_IPA_CERT`` for validating the authenticity by ironic-python-agent. The - certificate can be self-signed certificate or CA certificate. -* Compresses initramfs with command specified in environment variable - ``DIB_IPA_COMPRESS_CMD``, which is 'gzip' by default. This command should listen - for raw data from stdin and write compressed data to stdout. Command can be - with arguments. - -This element outputs three files: - -- ``$IMAGE-NAME.initramfs``: The deploy ramdisk file containing the - ironic-python-agent (IPA) service. -- ``$IMAGE-NAME.kernel``: The kernel binary file. -- ``$IMAGE-NAME.vmlinuz``: A hard link pointing to the ``$IMAGE-NAME.kernel`` - file; this is just a backward compatibility layer, please do not rely - on this file. - -.. note:: - The package based install currently only enables the service when using the - systemd init system. This can easily be changed if there is an agent - package which includes upstart or sysv packaging. - -.. note:: - Using the ramdisk will require at least 1.5GB of ram diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/source-repository-ironic-agent python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/source-repository-ironic-agent --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/source-repository-ironic-agent 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/source-repository-ironic-agent 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -ironic-agent git /usr/share/ironic-python-agent https://git.openstack.org/openstack/ironic-python-agent diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/static/etc/systemd/system/ironic-agent-create-rescue-user.path python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/static/etc/systemd/system/ironic-agent-create-rescue-user.path --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/static/etc/systemd/system/ironic-agent-create-rescue-user.path 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/static/etc/systemd/system/ironic-agent-create-rescue-user.path 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -[Unit] -Description=Ironic user rescue - notify path existence - -[Path] -PathExists=/etc/ipa-rescue-config/ipa-rescue-password - -[Install] -WantedBy=multi-user.target diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/static/etc/systemd/system/ironic-agent-create-rescue-user.service python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/static/etc/systemd/system/ironic-agent-create-rescue-user.service --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/static/etc/systemd/system/ironic-agent-create-rescue-user.service 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/static/etc/systemd/system/ironic-agent-create-rescue-user.service 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -[Unit] -Description=Ironic agent rescue user creation - -[Service] -ExecStart=/bin/bash /usr/local/bin/ironic-python-agent-create-rescue-user.sh -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/static/usr/local/bin/ironic-python-agent-create-rescue-user.sh python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/static/usr/local/bin/ironic-python-agent-create-rescue-user.sh --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/static/usr/local/bin/ironic-python-agent-create-rescue-user.sh 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/static/usr/local/bin/ironic-python-agent-create-rescue-user.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -echo "Adding rescue user with root privileges..." -crypted_pass=$( /etc/sudoers.d/rescue diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/svc-map python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/svc-map --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/svc-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/svc-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -ironic-python-agent: - default: openstack-ironic-python-agent - redhat: openstack-ironic-python-agent - debian: ironic-python-agent \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/test-elements/build-succeeds-fedora/element-deps python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/test-elements/build-succeeds-fedora/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/test-elements/build-succeeds-fedora/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/test-elements/build-succeeds-fedora/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -fedora-minimal -openstack-ci-mirrors diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/test-elements/build-succeeds-fedora/element-type python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/test-elements/build-succeeds-fedora/element-type --- python-diskimage-builder-2.11.0/doc/source/elements/ironic-agent/test-elements/build-succeeds-fedora/element-type 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ironic-agent/test-elements/build-succeeds-fedora/element-type 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -ramdisk diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/iso/cleanup.d/100-build-iso python-diskimage-builder-2.17.0/doc/source/elements/iso/cleanup.d/100-build-iso --- python-diskimage-builder-2.11.0/doc/source/elements/iso/cleanup.d/100-build-iso 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/iso/cleanup.d/100-build-iso 1970-01-01 00:00:00.000000000 +0000 @@ -1,181 +0,0 @@ -#!/bin/bash -# -# Copyright 2014 Hewlett-Packard Development 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. - -# dib-lint: disable=safe_sudo - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -function build_efiboot_img() { - # Signed bootloader files are saved at tmp/bootloader_files during - # post-install stage needs to copy them into image. - # Signed bootloader packages used are:- - # Ubuntu: grub-efi-amd64-signed and shim-signed - # Fedora: grub2-efi and shim - - if [ $DISTRO_NAME = "fedora" ]; then - cp $TMP_BOOTLOADER_DIR/shim.efi $TMP_BUILD_DIR/bootx64.efi - cp $TMP_BOOTLOADER_DIR/grubx64.efi $TMP_BUILD_DIR/grubx64.efi - else - cp $TMP_BOOTLOADER_DIR/shim.efi.signed $TMP_BUILD_DIR/bootx64.efi - cp $TMP_BOOTLOADER_DIR/grubx64.efi.signed $TMP_BUILD_DIR/grubx64.efi - fi - - dd if=/dev/zero of=$TMP_BUILD_DIR/efiboot.img bs=1K count=5760 - mkdosfs -F 12 $TMP_BUILD_DIR/efiboot.img - - # Create a temporary mount point: - MOUNTPOINT=$TMP_BUILD_DIR/tmpmount - mkdir $MOUNTPOINT - sudo mount -o loop $TMP_BUILD_DIR/efiboot.img $MOUNTPOINT - sudo mkdir -p $MOUNTPOINT/EFI/BOOT - sudo cp $TMP_BUILD_DIR/bootx64.efi $MOUNTPOINT/EFI/BOOT - sudo cp $TMP_BUILD_DIR/grubx64.efi $MOUNTPOINT/EFI/BOOT - sudo umount $MOUNTPOINT - rmdir $MOUNTPOINT - cp $TMP_BUILD_DIR/efiboot.img $TMP_IMAGE_DIR/isolinux -} - -function build_iso() { - - KERNEL=$1 - INITRD=$2 - KERNEL_CMDLINE_ARGS=$3 - OUTPUT_FILENAME=$4 - - SCRIPTNAME=$(basename $0) - SCRIPTDIR=$(dirname $0) - MKISOFS="/usr/bin/mkisofs" - if [ $DISTRO_NAME = "fedora" ]; then - EFI_BOOT_DIR="EFI/fedora" - EXTRA_KERNEL_PARAMS="usbcore.autosuspend=-1" - #debian - elif [ $DISTRO_NAME = "debian" ]; then - EFI_BOOT_DIR="EFI/debian" - EXTRA_KERNEL_PARAMS="" - #ubuntu: - else - EFI_BOOT_DIR="EFI/ubuntu" - EXTRA_KERNEL_PARAMS="" - fi - - # Create a temporary build directory for holding the contents of iso - TMP_IMAGE_DIR="$TMP_BUILD_DIR/image" - echo "Creating temporary directory $TMP_IMAGE_DIR" - mkdir -p "$TMP_IMAGE_DIR" - - # Copy isolinux bin to the isolinux directory - mkdir -p "$TMP_IMAGE_DIR/isolinux" - echo "Copying isolinux.bin" - - ISOLINUX_BIN=$TMP_BOOTLOADER_DIR/isolinux.bin - LDLINUX_BIN=$TMP_BOOTLOADER_DIR/ldlinux.c32 - - cp $ISOLINUX_BIN "$TMP_IMAGE_DIR/isolinux" - - # Starting from SYSLINUX 5.00, the isolinux.bin is dependent - # on ldlinux.c32. - # http://www.syslinux.org/wiki/index.php/Library_modules - if [ -f "$LDLINUX_BIN" ]; then - cp $LDLINUX_BIN "$TMP_IMAGE_DIR/isolinux" - fi - - # Copy initrd, kernel - echo "Copying kernel to $TMP_IMAGE_DIR/vmlinuz" - cp $KERNEL "$TMP_IMAGE_DIR/vmlinuz" - - echo "Copying initrd to $TMP_IMAGE_DIR/initrd" - cp $INITRD "$TMP_IMAGE_DIR/initrd" - - # Generate isolinux.cfg for default booting - echo "Generating isolinux.cfg" - cat > "$TMP_IMAGE_DIR/isolinux/isolinux.cfg" << END_CONFIG -DEFAULT install -LABEL install -menu label "Install image" - kernel /vmlinuz - append initrd=/initrd $KERNEL_CMDLINE_ARGS -- -TIMEOUT 5 -PROMPT 0 -END_CONFIG - - echo "Creating EFI/ubuntu directory" - mkdir -p "$TMP_IMAGE_DIR/$EFI_BOOT_DIR" - - # Generate grub.cfg for default booting - echo "Generating grub.cfg" - cat > "$TMP_IMAGE_DIR/$EFI_BOOT_DIR/grub.cfg" << END_CONFIG -set default="0" -set timeout="5" -set hidden_timeout_quiet=false - -menuentry "install" { - search --set=root --label VMEDIA_BOOT_ISO - linuxefi /vmlinuz $EXTRA_KERNEL_PARAMS $KERNEL_CMDLINE_ARGS -- - initrdefi /initrd -} -END_CONFIG - - build_efiboot_img - - # Create the ISO - echo "Generating the ISO" - $MKISOFS -r -V "VMEDIA_BOOT_ISO" -cache-inodes -J -l \ - -b isolinux/isolinux.bin -no-emul-boot \ - -boot-load-size 4 -boot-info-table \ - -eltorito-alt-boot -e isolinux/efiboot.img \ - -no-emul-boot -o $OUTPUT_FILENAME $TMP_IMAGE_DIR - -} - -IMAGE_NAME=${IMAGE_NAME:-'image'} - -if echo $IMAGE_ELEMENT | grep -q '\bramdisk\b'; then - EMITTED_KERNEL=$IMAGE_NAME.kernel - EMITTED_RAMDISK=$IMAGE_NAME.initramfs - DIB_DEPLOY_ISO_KERNEL_CMDLINE_ARGS=${DIB_DEPLOY_ISO_KERNEL_CMDLINE_ARGS:-} - EMITTED_KERNEL_CMDLINE_ARGS="boot_method=vmedia $DIB_DEPLOY_ISO_KERNEL_CMDLINE_ARGS" - EMITTED_ISO_FILENAME=$IMAGE_NAME.iso -elif echo $IMAGE_ELEMENT | grep -q '\bironic-agent\b'; then - EMITTED_KERNEL=$IMAGE_NAME.vmlinuz - EMITTED_RAMDISK=$IMAGE_NAME.initramfs - DIB_DEPLOY_ISO_KERNEL_CMDLINE_ARGS=${DIB_DEPLOY_ISO_KERNEL_CMDLINE_ARGS:-} - EMITTED_KERNEL_CMDLINE_ARGS="boot_method=vmedia $DIB_DEPLOY_ISO_KERNEL_CMDLINE_ARGS" - EMITTED_ISO_FILENAME=$IMAGE_NAME.iso -elif echo $IMAGE_ELEMENT | grep -q '\bbaremetal\b'; then - EMITTED_KERNEL=${IMAGE_NAME}.vmlinuz - EMITTED_RAMDISK=${IMAGE_NAME}.initrd - EMITTED_KERNEL_CMDLINE_ARGS="root=UUID=$DIB_IMAGE_ROOT_FS_UUID" - DIB_BOOT_ISO_KERNEL_CMDLINE_ARGS=${DIB_BOOT_ISO_KERNEL_CMDLINE_ARGS:-} - if [ -n "$DIB_BOOT_ISO_KERNEL_CMDLINE_ARGS" ]; then - EMITTED_KERNEL_CMDLINE_ARGS="$EMITTED_KERNEL_CMDLINE_ARGS $DIB_BOOT_ISO_KERNEL_CMDLINE_ARGS" - fi - export EMITTED_ISO_FILENAME="$IMAGE_NAME-boot.iso" -else - echo "Cannot find the kernel/ramdisk to build the iso image. " - echo "Please use 'iso' element with either 'baremetal' or 'ramdisk' elements" -fi - -export TMP_BOOTLOADER_DIR=$TARGET_ROOT/tmp/bootloader_files -build_iso "$EMITTED_KERNEL" "$EMITTED_RAMDISK" "$EMITTED_KERNEL_CMDLINE_ARGS" \ - "$EMITTED_ISO_FILENAME" - -# Clean-up the bootloaders directory -sudo rm -fr $TMP_BOOTLOADER_DIR - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/iso/element-deps python-diskimage-builder-2.17.0/doc/source/elements/iso/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/iso/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/iso/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -grub2 -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/iso/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/iso/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/iso/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/iso/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -syslinux: -syslinux-common: -isolinux: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/iso/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/iso/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/iso/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/iso/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -{ - "distro":{ - "debian":{ - "syslinux": "syslinux", - "syslinux-common": "syslinux-common", - "isolinux": "isolinux" - } - }, - "family":{ - "debian":{ - "syslinux": "syslinux", - "syslinux-common": "", - "isolinux": "" - }, - "redhat":{ - "syslinux": "", - "syslinux-common": "", - "isolinux": "" - } - }, - "default":{ - "syslinux": "syslinux", - "syslinux-common": "", - "isolinux": "" - } -} - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/iso/post-install.d/01-copy-bootloaders python-diskimage-builder-2.17.0/doc/source/elements/iso/post-install.d/01-copy-bootloaders --- python-diskimage-builder-2.11.0/doc/source/elements/iso/post-install.d/01-copy-bootloaders 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/iso/post-install.d/01-copy-bootloaders 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi - -set -eux -set -o pipefail - -TMP_BOOTLOADER_DIR=/tmp/bootloader_files -mkdir -p $TMP_BOOTLOADER_DIR - -if [ $DISTRO_NAME = "fedora" ]; then - GRUB_FILE="/boot/efi/EFI/fedora/grubx64.efi" -else - GRUB_FILE="/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed" -fi - -if [ $DISTRO_NAME = "fedora" ]; then - SHIM_FILE="/boot/efi/EFI/fedora/shim.efi" -else - SHIM_FILE="/usr/lib/shim/shim.efi.signed" -fi - -#fedora -if [ $DISTRO_NAME = "fedora" ]; then - SYSLINUX_FILE="/usr/share/syslinux/isolinux.bin" - LDLINUX_FILE="/usr/share/syslinux/ldlinux.c32" -#debian -elif [ $DISTRO_NAME = "debian" ]; then - SYSLINUX_FILE="/usr/lib/ISOLINUX/isolinux.bin" - LDLINUX_FILE="/usr/lib/syslinux/modules/bios/ldlinux.c32" -#ubuntu -else - SYSLINUX_FILE="/usr/lib/syslinux/isolinux.bin" - LDLINUX_FILE="/usr/lib/syslinux/ldlinux.c32" -fi - -cp $GRUB_FILE $TMP_BOOTLOADER_DIR -cp $SHIM_FILE $TMP_BOOTLOADER_DIR -cp $SYSLINUX_FILE $TMP_BOOTLOADER_DIR - -# Starting from SYSLINUX 5.00, the isolinux.bin is dependent -# on ldlinux.c32. -# http://www.syslinux.org/wiki/index.php/Library_modules -if [ -f "$LDLINUX_FILE" ]; then - cp $LDLINUX_FILE $TMP_BOOTLOADER_DIR -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/iso/README.rst python-diskimage-builder-2.17.0/doc/source/elements/iso/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/iso/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/iso/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -=== -iso -=== -Generates a bootable ISO image from the kernel/ramdisk generated by the -elements ``baremetal``, ``ironic-agent`` or ``ramdisk``. It uses isolinux to boot on BIOS -machines and grub to boot on EFI machines. - -This element has been tested on the following distro(s): -* ubuntu -* fedora -* debian - -**NOTE**: For other distros, please make sure the ``isolinux.bin`` file -exists at ``/usr/lib/syslinux/isolinux.bin``. - -baremetal element ------------------ -When used with ``baremetal`` element, this generates a bootable ISO image -named ``-boot.iso`` booting the generated kernel and ramdisk. -It also automatically appends kernel command-line argument -'root=UUID='. Any more kernel command-line -arguments required may be provided by specifying them in -``DIB_BOOT_ISO_KERNEL_CMDLINE_ARGS``. - -**NOTE**: It uses pre-built efiboot.img by default to work for UEFI machines. -This is because of a bug in latest version of grub[1]. The user may choose -to avoid using pre-built binary and build efiboot.img on their own machine -by setting the environment variable DIB\_UEFI\_ISO\_BUILD\_EFIBOOT to 1 (this -might work only on certain versions of grub). The current efiboot.img was -generated by the method build\_efiboot\_img() in 100-build-iso on -Ubuntu 13.10 with grub 2.00-19ubuntu2.1. - -ramdisk element ---------------- -When used with ``ramdisk`` element, this generates a bootable ISO image -named ``.iso`` booting the generated kernel and ramdisk. It also -automatically appends kernel command-line argument 'boot\_method=vmedia' -which is required for Ironic drivers ``iscsi_ilo``. - -ironic-agent element --------------------- -When used with ``ironic-agent`` element, this generates a bootable ISO image named ``.iso`` which boots the agent kernel and agent ramdisk. - -**REFERENCES** - -[1] https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1378658 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/local-config/element-deps python-diskimage-builder-2.17.0/doc/source/elements/local-config/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/local-config/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/local-config/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/local-config/environment.d/62-ssh-key python-diskimage-builder-2.17.0/doc/source/elements/local-config/environment.d/62-ssh-key --- python-diskimage-builder-2.11.0/doc/source/elements/local-config/environment.d/62-ssh-key 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/local-config/environment.d/62-ssh-key 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DIB_LOCAL_CONFIG_USERNAME=${DIB_LOCAL_CONFIG_USERNAME:-root} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/local-config/extra-data.d/62-ssh-key python-diskimage-builder-2.17.0/doc/source/elements/local-config/extra-data.d/62-ssh-key --- python-diskimage-builder-2.11.0/doc/source/elements/local-config/extra-data.d/62-ssh-key 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/local-config/extra-data.d/62-ssh-key 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash -# Save user SSH public key if available. -# (Obviously not suitable for downloadable images). - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$TMP_HOOKS_PATH" ] || die "Temp hook path not set" - -if [ -e ~/.ssh/authorized_keys ]; then - cat ~/.ssh/authorized_keys > $TMP_HOOKS_PATH/ssh-authorized-keys -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/local-config/install.d/62-ssh-key python-diskimage-builder-2.17.0/doc/source/elements/local-config/install.d/62-ssh-key --- python-diskimage-builder-2.11.0/doc/source/elements/local-config/install.d/62-ssh-key 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/local-config/install.d/62-ssh-key 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -#!/bin/bash -# Save user SSH public key if available. -# XXX: Obviously not suitable for downloadable images. - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [ "$DIB_LOCAL_CONFIG_USERNAME" == "root" ]; then - DIR_NAME=${DIB_LOCAL_CONFIG_USERNAME} -else - DIR_NAME=home/${DIB_LOCAL_CONFIG_USERNAME} -fi - -if [ -e "/tmp/in_target.d/ssh-authorized-keys" ]; then - mkdir -p /${DIR_NAME}/.ssh - cat /tmp/in_target.d/ssh-authorized-keys >> /${DIR_NAME}/.ssh/authorized_keys - chmod 0700 /${DIR_NAME}/.ssh - chmod 0600 /${DIR_NAME}/.ssh/authorized_keys -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/local-config/pre-install.d/02-proxy-settings python-diskimage-builder-2.17.0/doc/source/elements/local-config/pre-install.d/02-proxy-settings --- python-diskimage-builder-2.11.0/doc/source/elements/local-config/pre-install.d/02-proxy-settings 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/local-config/pre-install.d/02-proxy-settings 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -#!/bin/bash -# Save the HTTP/[S] and noproxy settings if available. -# XXX: Obviously not suitable for downloadable images. - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -have_apt= -have_yum= -have_zypper= -http_proxy=${http_proxy:-""} -https_proxy=${https_proxy:-""} - -if [ -d /etc/apt ] ; then - have_apt=1 -fi -if [ -e /etc/yum.conf ] ; then - have_yum=1 -fi -if [ -d /etc/zypp ] ; then - have_zypper=1 -fi - -if [ -n "$http_proxy" ]; then - if [ -d ~stack ]; then - echo export http_proxy=$http_proxy >> ~stack/.profile - fi - if [ -n "$have_apt" ] ; then - echo "Acquire::http::Proxy \"$http_proxy\";" > /etc/apt/apt.conf.d/02-use-http-proxy - fi - if [ -n "$have_yum" ] ; then - sed -i -e "s,\[main\],[main]\nproxy=$http_proxy," /etc/yum.conf - fi - if [ -n "$have_zypper" ] ; then - sed -i -e "s,^HTTP_PROXY=.*$,HTTP_PROXY=\"$http_proxy\"," /etc/sysconfig/proxy - fi -fi - -if [ -n "$https_proxy" ]; then - if [ -d ~stack ]; then - echo export https_proxy=$https_proxy >> ~stack/.profile - fi - if [ -n "$have_apt" ] ; then - echo "Acquire::https::Proxy \"$https_proxy\";" > /etc/apt/apt.conf.d/02-use-https-proxy - fi - if [ -n "$have_zypper" ] ; then - sed -i -e "s,^HTTPS_PROXY=.*$,HTTPS_PROXY=\"$https_proxy\"," /etc/sysconfig/proxy - fi -fi - -no_proxy=${no_proxy:+"$no_proxy,192.0.2.1"} -no_proxy=${no_proxy:-"192.0.2.1"} -if [ -n "$no_proxy" ]; then - if [ -d ~stack ]; then - echo export no_proxy=$no_proxy >> ~stack/.profile - fi - if [ -n "$have_apt" ] ; then - for host in $(sed 's/,/ /g' <<<$no_proxy); do - echo "Acquire::http::Proxy::$host \"DIRECT\";" >> /etc/apt/apt.conf.d/02-no-proxy - done - fi - if [ -n "$have_zypper" ] ; then - sed -i -e "s,^\(NO_PROXY=.*\)\"$,\1\, $no_proxy\"," /etc/sysconfig/proxy - fi -fi - -if [ -n "$http_proxy" -o -n "$https_proxy" -o -n "$no_proxy" ]; then - if [ -n "$have_zypper" ] ; then - sed -i -e "s,^PROXY_ENABLED=.*$,PROXY_ENABLED=\"yes\"," /etc/sysconfig/proxy - fi -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/local-config/README.rst python-diskimage-builder-2.17.0/doc/source/elements/local-config/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/local-config/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/local-config/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -============ -local-config -============ -Copies local user settings such as .ssh/authorized\_keys and $http\_proxy into -the image. - -Environment Variables ---------------------- - -DIB_LOCAL_CONFIG_USERNAME - :Required: No - :Default: root - :Description: Username used when installing .ssh/authorized\_keys. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/manifests/cleanup.d/01-copy-manifests-dir python-diskimage-builder-2.17.0/doc/source/elements/manifests/cleanup.d/01-copy-manifests-dir --- python-diskimage-builder-2.11.0/doc/source/elements/manifests/cleanup.d/01-copy-manifests-dir 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/manifests/cleanup.d/01-copy-manifests-dir 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -#!/bin/bash -# -# Copyright 2014 Hewlett-Packard Development Company, L.P. -# Copyright 2017 Andreas Florath (andreas@florath.net) -# -# 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 - -MANIFEST_IMAGE_PATH=${TMP_MOUNT_PATH}/${DIB_MANIFEST_IMAGE_DIR} - -# Double check: directory must be created in extra-data.d/20-manifest-dir -[ -d ${MANIFEST_IMAGE_PATH} ] || { - echo "Error: MANIFEST_IMAGE_PATH [${MANIFEST_IMAGE_PATH}] does not exist"; - exit 1; } - -echo "$DIB_ENV" | sudo dd of=${MANIFEST_IMAGE_PATH}/dib_environment # dib-lint: safe_sudo -echo "$DIB_ARGS" | sudo dd of=${MANIFEST_IMAGE_PATH}/dib_arguments # dib-lint: safe_sudo - -# Save the manifests locally to the save dir -mkdir -p ${DIB_MANIFEST_SAVE_DIR} -cp --no-preserve=ownership -rv ${MANIFEST_IMAGE_PATH} ${DIB_MANIFEST_SAVE_DIR} - -# Lock down permissions on the manifest files inside the image to -# root. We don't want regular users being able to see what might -# contain a password, etc. -find ${MANIFEST_IMAGE_PATH} -type f | xargs sudo chown root:root # dib-lint: safe_sudo -find ${MANIFEST_IMAGE_PATH} -type f | xargs sudo chmod 600 # dib-lint: safe_sudo diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/manifests/environment.d/14-manifests python-diskimage-builder-2.17.0/doc/source/elements/manifests/environment.d/14-manifests --- python-diskimage-builder-2.11.0/doc/source/elements/manifests/environment.d/14-manifests 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/manifests/environment.d/14-manifests 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -# Copyright 2014 Hewlett-Packard Development 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. -# - -export DIB_MANIFEST_IMAGE_DIR=${DIB_MANIFEST_IMAGE_DIR:-/etc/dib-manifests} -export DIB_MANIFEST_SAVE_DIR=${DIB_MANIFEST_SAVE_DIR:-${IMAGE_NAME}.d/} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/manifests/extra-data.d/20-manifest-dir python-diskimage-builder-2.17.0/doc/source/elements/manifests/extra-data.d/20-manifest-dir --- python-diskimage-builder-2.11.0/doc/source/elements/manifests/extra-data.d/20-manifest-dir 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/manifests/extra-data.d/20-manifest-dir 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -#!/bin/bash -# -# Copyright 2014 Hewlett-Packard Development 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 - -sudo mkdir -p $TMP_MOUNT_PATH/${DIB_MANIFEST_IMAGE_DIR} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/manifests/README.rst python-diskimage-builder-2.17.0/doc/source/elements/manifests/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/manifests/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/manifests/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -========= -manifests -========= - -An framework for saving manifest information generated during the -build for later inspection. Manifests are kept in the final image and -also copied to the build area post-image creation. - -Elements that wish to save any form of manifest should depend on this -element and can save their data to into the ``DIB_MANIFEST_IMAGE_DIR`` ( -which defaults to ``/etc/dib-manifests``). Note this is created in -``extra-data.d`` rather than ``pre-install.d`` to allow the -``source-repositories`` element to make use of it - -The manifests are copied to ``DIB_MANIFEST_SAVE_DIR``, which defaults -to ``${IMAGE_NAME}.d/``, resulting in the manifests being available as -``${IMAGE_NAME}.d/dib-manifests`` by default after the build. - -Extra status ------------- - -This element will also add the files ``dib_environment`` and -``dib_arguments`` to the manifest recording the ``diskimage-builder`` -specific environment (``DIB_*`` variables) and command-line arguments -respectively. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/mellanox/element-deps python-diskimage-builder-2.17.0/doc/source/elements/mellanox/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/mellanox/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/mellanox/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -package-installs -pkg-map diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/mellanox/init.d/01-mellanox python-diskimage-builder-2.17.0/doc/source/elements/mellanox/init.d/01-mellanox --- python-diskimage-builder-2.11.0/doc/source/elements/mellanox/init.d/01-mellanox 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/mellanox/init.d/01-mellanox 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# extra load for mellanox -modprobe mlx4_en -modprobe mlx4_ib -modprobe ib_ipoib -modprobe mlx5_ib -modprobe ib_umad -modprobe ib_uverbs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/mellanox/install.d/65-mellanox python-diskimage-builder-2.17.0/doc/source/elements/mellanox/install.d/65-mellanox --- python-diskimage-builder-2.11.0/doc/source/elements/mellanox/install.d/65-mellanox 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/mellanox/install.d/65-mellanox 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -#!/bin/bash -# Ensure we load the mellanox driver somehow - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -home=$(dirname $0) - -install -m 0644 -o root -g root $home/mellanox-rules.udev /etc/udev/rules.d/81-mellanox.rules - -# needed kernel modules; mlx4_en mlx4_ib ib_ipoib mlx5_ib ib_umad ib_uverbs -# mlx5_core loaded by mlx5_ib -echo "mlx4_en" >>/etc/modules -echo "mlx4_ib" >>/etc/modules -echo "ib_ipoib" >>/etc/modules -echo "mlx5_ib" >>/etc/modules -echo "ib_umad" >>/etc/modules -echo "ib_uverbs" >>/etc/modules diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/mellanox/install.d/mellanox-rules.udev python-diskimage-builder-2.17.0/doc/source/elements/mellanox/install.d/mellanox-rules.udev --- python-diskimage-builder-2.11.0/doc/source/elements/mellanox/install.d/mellanox-rules.udev 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/mellanox/install.d/mellanox-rules.udev 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -ACTION!="add", GOTO="drivers_end" - -SUBSYSTEM=="net", RUN+="/sbin/modprobe mlx4_en" -SUBSYSTEM=="net", RUN+="/sbin/modprobe mlx4_ib" -SUBSYSTEM=="net", RUN+="/sbin/modprobe ib_ipoib" -SUBSYSTEM=="net", RUN+="/sbin/modprobe mlx5_ib" -SUBSYSTEM=="net", RUN+="/sbin/modprobe ib_umad" -SUBSYSTEM=="net", RUN+="/sbin/modprobe ib_uverbs" - -LABEL="drivers_end" - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/mellanox/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/mellanox/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/mellanox/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/mellanox/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -dkms: -ibacm: -ibutils: -ibverbs-utils: -infiniband-diags: -libibcm: -libibcommon: -libibmad: -libibumad: -libibverbs: -libibverbs-runtime: -libmlx4: -libmlx4-dev: -libmlx5: -librdmacm: -librdmacm-dev: -librdmacm-runtime: -mstflint: -opensm: -pciutils: -perftest: -qperf: -rdma: -rpm-build: -srptools: -vlan: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/mellanox/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/mellanox/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/mellanox/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/mellanox/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -{ - "family": { - "debian":{ - "dkms": "dkms", - "libibverbs": "libibverbs*", - "ibacm": "ibacm", - "librdmacm": "librdmacm*", - "libmlx4": "libmlx4*", - "libmlx5": "libmlx5*", - "libibcm": "libibcm.*", - "libibmad": "libibmad.*", - "libibumad": "libibumad*", - "libmlx4-dev": "libmlx4-dev", - "librdmacm-dev": "librdmacm-dev", - "rdma": "rdmacm-utils", - "vlan": "vlan", - "ibverbs-utils": "ibverbs-utils" - }, - "redhat": { - "libibverbs": "libibverbs.*", - "librdmacm": "librdmacm.*", - "libmlx4": "libmlx4.*", - "libmlx5": "libmlx5.*", - "libibcm": "libibcm.*", - "libibmad": "libibmad.*", - "libibumad": "libibumad.*", - "rdma": "rdma", - "qperf": "qperf", - "pciutils": "pciutils" - }, - "suse":{ - "libibverbs": "libibverbs", - "librdmacm": "librdmacm", - "libmlx4": "libmlx4", - "libmlx5": "libmlx5", - "libibcm": "libibcm", - "libibmad": "libibmad", - "libibumad": "libibumad", - "rdma": "rdma", - "qperf": "qperf", - "rpm-build": "rpm-build", - "libibverbs-runtime": "libibverbs-runtime", - "librdmacm-runtime": "librdmacm-runtime", - "libibcommon": "libibcommon" - } - }, - "default": { - "infiniband-diags": "infiniband-diags", - "mstflint": "mstflint", - "opensm": "opensm", - "srptools": "srptools", - "libmlx4-dev": "", - "librdmacm-dev": "", - "ibutils": "ibutils", - "perftest": "perftest", - "vlan": "", - "pciutils": "", - "ibverbs-utils": "", - "rpm-build": "", - "libibverbs-runtime": "", - "librdmacm-runtime": "", - "ibacm": "", - "qperf": "", - "dkms": "", - "libibcommon": "" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/mellanox/README.rst python-diskimage-builder-2.17.0/doc/source/elements/mellanox/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/mellanox/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/mellanox/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -======== -mellanox -======== -Force support for mellanox hardware diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/mellanox/udev.d/81-mellanox-drivers.rules python-diskimage-builder-2.17.0/doc/source/elements/mellanox/udev.d/81-mellanox-drivers.rules --- python-diskimage-builder-2.11.0/doc/source/elements/mellanox/udev.d/81-mellanox-drivers.rules 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/mellanox/udev.d/81-mellanox-drivers.rules 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -ACTION!="add", GOTO="drivers_end" - -SUBSYSTEM=="net", RUN+="/sbin/modprobe mlx4_en" -SUBSYSTEM=="net", RUN+="/sbin/modprobe mlx4_ib" -SUBSYSTEM=="net", RUN+="/sbin/modprobe ib_ipoib" -SUBSYSTEM=="net", RUN+="/sbin/modprobe mlx5_ib" -SUBSYSTEM=="net", RUN+="/sbin/modprobe ib_umad" -SUBSYSTEM=="net", RUN+="/sbin/modprobe ib_uverbs" - -LABEL="drivers_end" - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/modprobe-blacklist/install.d/80-modprobe-blacklist python-diskimage-builder-2.17.0/doc/source/elements/modprobe-blacklist/install.d/80-modprobe-blacklist --- python-diskimage-builder-2.11.0/doc/source/elements/modprobe-blacklist/install.d/80-modprobe-blacklist 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/modprobe-blacklist/install.d/80-modprobe-blacklist 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -#!/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 -Nru python-diskimage-builder-2.11.0/doc/source/elements/modprobe-blacklist/README.rst python-diskimage-builder-2.17.0/doc/source/elements/modprobe-blacklist/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/modprobe-blacklist/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/modprobe-blacklist/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -================== -modprobe-blacklist -================== -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" diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/no-final-image/README.rst python-diskimage-builder-2.17.0/doc/source/elements/no-final-image/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/no-final-image/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/no-final-image/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -============== -no-final-image -============== - -This is a noop element which can be used to indicate to diskimage-builder that -it should not bother creating a final image out of the generated filesystem. -It is useful in cases where an element handles all of the image building -itself, such as ironic-agent or Docker images. In those cases the final image -normally generated by diskimage-builder is not the desired output, so there's -no reason to spend time creating it. - -Elements that wish to behave this way should include this element in their -element-deps file. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/oat-client/element-deps python-diskimage-builder-2.17.0/doc/source/elements/oat-client/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/oat-client/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/oat-client/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/oat-client/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/oat-client/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/oat-client/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/oat-client/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -oat-client: -oat-commandtool: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/oat-client/README.rst python-diskimage-builder-2.17.0/doc/source/elements/oat-client/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/oat-client/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/oat-client/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -========== -oat-client -========== -This element installs oat-client on the image, that's necessary for -trusted boot feature in Ironic to work. - -Intel TXT will measure BIOS, Option Rom and Kernel/Ramdisk during trusted -boot, the oat-client will securely fetch the hash values from TPM. - -.. note:: - This element only works on Fedora. - -Put `fedora-oat.repo` into `/etc/yum.repos.d/`:: - - export DIB_YUM_REPO_CONF=/etc/yum.repos.d/fedora-oat.repo - -.. note:: - OAT Repo is lack of a GPG signature check on packages, which can be - tracked on: https://github.com/OpenAttestation/OpenAttestation/issues/26 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/oat-client/yum.repos.d/fedora-oat.repo python-diskimage-builder-2.17.0/doc/source/elements/oat-client/yum.repos.d/fedora-oat.repo --- python-diskimage-builder-2.11.0/doc/source/elements/oat-client/yum.repos.d/fedora-oat.repo 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/oat-client/yum.repos.d/fedora-oat.repo 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# Place this file in your /etc/yum.repos.d/ directory - -[oat] -name=oat 2.2 packages and dependencies -baseurl=http://repos.fedorapeople.org/repos/gwei3/oat/fedora-$releasever/$basearch/ -enabled=1 -skip_if_unavailable=1 -gpgcheck=0 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/openssh-server/element-deps python-diskimage-builder-2.17.0/doc/source/elements/openssh-server/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/openssh-server/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/openssh-server/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -dib-init-system -package-installs -runtime-ssh-host-keys diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/openssh-server/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/openssh-server/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/openssh-server/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/openssh-server/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -openssh-server: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/openssh-server/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/openssh-server/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/openssh-server/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/openssh-server/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -{ - "family": { - "suse": { - "openssh-server": "openssh" - }, - "gentoo": { - "openssh-server": "openssh" - } - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/openssh-server/post-install.d/80-enable-sshd-service python-diskimage-builder-2.17.0/doc/source/elements/openssh-server/post-install.d/80-enable-sshd-service --- python-diskimage-builder-2.11.0/doc/source/elements/openssh-server/post-install.d/80-enable-sshd-service 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/openssh-server/post-install.d/80-enable-sshd-service 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -case "$DIB_INIT_SYSTEM" in - upstart) - # nothing to do - exit 0 - ;; - systemd) - if [[ $DISTRO_NAME = "ubuntu" || $DISTRO_NAME = "debian" ]]; then - systemctl enable ssh.service - else - systemctl enable sshd.service - fi - ;; - openrc) - rc-update add sshd default - ;; - sysv) - # ssh is enabled by default, nothing to do - exit 0 - ;; - *) - echo "Unsupported init system $DIB_INIT_SYSTEM" - exit 1 - ;; -esac diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/openssh-server/README.rst python-diskimage-builder-2.17.0/doc/source/elements/openssh-server/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/openssh-server/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/openssh-server/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -============== -openssh-server -============== -This element ensures that openssh server is installed and enabled during boot. - - -Note ----- -Most cloud images come with the openssh server service installed and enabled -during boot. However, certain cloud images, especially those created by the -\*-minimal elements may not have it installed or enabled. In these cases, -using this element may be helpful to ensure your image will accessible via SSH. -It's usually helpful to combine this element with others such as the -`runtime-ssh-host-keys`. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/openstack-ci-mirrors/environment.d/11-dib-distribution-mirror.bash python-diskimage-builder-2.17.0/doc/source/elements/openstack-ci-mirrors/environment.d/11-dib-distribution-mirror.bash --- python-diskimage-builder-2.11.0/doc/source/elements/openstack-ci-mirrors/environment.d/11-dib-distribution-mirror.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/openstack-ci-mirrors/environment.d/11-dib-distribution-mirror.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -# Set DIB_DISTRIBUTION_MIRROR if running in openstack gate -if [ -f /etc/ci/mirror_info.sh ]; then - - # don't spam logs with this source - _xtrace=$(set +o | grep xtrace) - set +o xtrace - source /etc/ci/mirror_info.sh - $_xtrace - - # note 11- is after 10- which is where DISTRO_NAME is set usually - - if [[ "${DISTRO_NAME}" == "ubuntu" ]]; then - export DIB_DISTRIBUTION_MIRROR=$NODEPOOL_UBUNTU_MIRROR - export DIB_DEBOOTSTRAP_EXTRA_ARGS+=" --no-check-gpg" - elif [[ "${DISTRO_NAME}" == "debian" ]]; then - export DIB_DISTRIBUTION_MIRROR=$NODEPOOL_DEBIAN_MIRROR - export DIB_DEBOOTSTRAP_EXTRA_ARGS+=" --no-check-gpg" - elif [[ "${DISTRO_NAME}" == "fedora" ]]; then - export DIB_DISTRIBUTION_MIRROR=$NODEPOOL_FEDORA_MIRROR - elif [[ "${DISTRO_NAME}" == "centos" ]]; then - export DIB_DISTRIBUTION_MIRROR=$NODEPOOL_CENTOS_MIRROR - elif [[ "${DISTRO_NAME}" == "centos7" ]]; then - export DIB_DISTRIBUTION_MIRROR=$NODEPOOL_CENTOS_MIRROR - elif [[ "${DISTRO_NAME}" == "opensuse" ]]; then - export DIB_DISTRIBUTION_MIRROR=$NODEPOOL_OPENSUSE_MIRROR - fi - -fi - -# This is repo files pre-created for the fedora/centos-minimal jobs in -# the gate -if [[ -d ${WORKSPACE:-/not/a/path/}/dib-mirror ]]; then - - if [[ "${DISTRO_NAME}" == "fedora" ]]; then - export DIB_YUM_MINIMAL_BOOTSTRAP_REPOS=${WORKSPACE}/dib-mirror/fedora-minimal/yum.repos.d - elif [[ "${DISTRO_NAME}" == "centos" ]]; then - export DIB_YUM_MINIMAL_BOOTSTRAP_REPOS=${WORKSPACE}/dib-mirror/centos-minimal/yum.repos.d - fi - -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/openstack-ci-mirrors/README.rst python-diskimage-builder-2.17.0/doc/source/elements/openstack-ci-mirrors/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/openstack-ci-mirrors/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/openstack-ci-mirrors/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -==================== -openstack-ci-mirrors -==================== - -This element contains various settings to setup mirrors for openstack -ci gate testing in a generic fashion. It is intended to be used as a -dependency of testing elements that run in the gate. It should do -nothing outside that environment. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/openstack-ci-mirrors/root.d/10-apt-disable-gpg python-diskimage-builder-2.17.0/doc/source/elements/openstack-ci-mirrors/root.d/10-apt-disable-gpg --- python-diskimage-builder-2.11.0/doc/source/elements/openstack-ci-mirrors/root.d/10-apt-disable-gpg 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/openstack-ci-mirrors/root.d/10-apt-disable-gpg 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#!/bin/bash -# -# 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. - -# dib-lint: disable=safe_sudo - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Disable gpg signing for apt openstack ci repos are created by reprepro -# and not signed. - -# This has to be after debootstrap, but before anything else tries to -# use the mirror. - -APT_DIR=${TARGET_ROOT}/etc/apt/apt.conf.d - -if [ -d ${APT_DIR} ]; then - FILE=${APT_DIR}/99unauthenticated - sudo dd of=${FILE} <" - echo - echo "Options:" - echo " -d -- directory to search for package-installs-* files" - exit 1 -} - -TEMP=$(getopt -o hd: -n $SCRIPTNAME -- "$@") -if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi -eval set -- "$TEMP" - -WORKDIR= - -while true ; do - case "$1" in - -d) WORKDIR=$2; shift 2;; - -h) show_options;; - --) shift ; break ;; - *) echo "Error: unsupported option $1."; exit 1;; - esac -done - -if [ -z "$WORKDIR" ]; then - show_options -fi - -PACKAGES= - -for PACKAGEFILE in $(find $WORKDIR -maxdepth 1 -name "package-installs-*" ); do - basefile=$(basename $PACKAGEFILE) - element_name=${basefile#"package-installs-"} - while read pkg; do - if [ -z "$pkg" ]; then - continue - fi - # Ignore comments - if [ ${pkg:0:1} = "#" ]; then - continue - fi - if [ ${pkg:0:1} = "-" ]; then - pkg=${pkg:1} - fi - - if [ -e /usr/share/pkg-map/$element_name ]; then - # map the package to its true name - set +e - map_pkg=$(pkg-map --element $element_name $pkg) - if [ $? -eq 0 ]; then - pkg=$map_pkg - fi - set -e - fi - - PACKAGES="$PACKAGES $pkg" - done < $PACKAGEFILE -done - -if [ -n "$PACKAGES" ]; then - install-packages $PACKAGES -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/package-installs/bin/package-installs-squash python-diskimage-builder-2.17.0/doc/source/elements/package-installs/bin/package-installs-squash --- python-diskimage-builder-2.11.0/doc/source/elements/package-installs/bin/package-installs-squash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/package-installs/bin/package-installs-squash 1970-01-01 00:00:00.000000000 +0000 @@ -1,140 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2014 Hewlett-Packard Development 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. - -import argparse -import collections -import functools -import json -import logging -import os -import sys -import yaml - -from diskimage_builder import logging_config - -logger = logging.getLogger(__name__) - - -def get_element_installtype(element_name): - default = os.environ.get("DIB_DEFAULT_INSTALLTYPE", "source") - return os.environ.get( - "DIB_INSTALLTYPE_%s" % element_name.replace('-', '_'), - default) - - -def _is_arch_in_list(strlist): - """Checks if os.environ['ARCH'] is in comma separated strlist""" - strlist = strlist.split(',') - map(str.strip, strlist) - return os.environ['ARCH'] in strlist - - -def _valid_for_arch(pkg_name, arch, not_arch): - """Filter out incorrect ARCH versions""" - if arch is None and not_arch is None: - # nothing specified; always OK - return True - if arch and not_arch: - print("package-installs configuration error: arch and not_arch " - "given for package [%s]" % pkg_name) - sys.exit(1) - # if we have an arch list, our current arch must be in it - # to install. - if arch: - return _is_arch_in_list(arch) - # if we don't have an explicit arch list, we should - # install unless we are in the not-arch list. - return not _is_arch_in_list(not_arch) - - -def collect_data(data, filename, element_name): - try: - objs = json.load(open(filename)) - except ValueError: - objs = yaml.safe_load(open(filename)) - for pkg_name, params in objs.items(): - if not params: - params = {} - phase = params.get('phase', 'install.d') - install = "install" - if 'uninstall' in params: - install = "uninstall" - - # Filter out incorrect installtypes - installtype = params.get('installtype', None) - elem_installtype = get_element_installtype(element_name) - valid_installtype = (installtype is None or - 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 and valid_dib_python_version: - data[phase][install].append((pkg_name, element_name)) - - return data - - -def main(): - parser = argparse.ArgumentParser( - description="Produce a single packages-installs file from all of" - " the available package-installs files") - parser.add_argument('--elements', required=True, - help="Which elements to squash") - parser.add_argument('--path', required=True, - help="Elements path to search for elements") - parser.add_argument('outfile', help="Location of the output file") - args = parser.parse_args() - - logging_config.setup() - - # Replicate the logic of finding the first element, because we can't - # operate on the post-copied hooks dir, since we lose element context - element_dirs = list() - for element_name in args.elements.split(): - for elements_dir in args.path.split(':'): - potential_path = os.path.join(elements_dir, element_name) - if os.path.exists(potential_path): - element_dirs.append((elements_dir, element_name)) - - logger.debug("element_dirs -> %s" % element_dirs) - - # Collect the merge of all of the existing install files in the elements - # that are the first on the ELEMENT_PATH - final_dict = collections.defaultdict( - functools.partial(collections.defaultdict, list)) - for (elements_dir, element_name) in element_dirs: - for file_type in ('json', 'yaml'): - target_file = os.path.join( - elements_dir, element_name, "package-installs.%s" % file_type) - if not os.path.exists(target_file): - continue - logger.info("Squashing install file: %s" % target_file) - final_dict = collect_data(final_dict, target_file, element_name) - - logger.debug("final_dict -> %s" % final_dict) - - # Write the resulting file - with open(args.outfile, 'w') as outfile: - json.dump( - final_dict, outfile, - indent=True, separators=(',', ': '), sort_keys=False) - -if __name__ == '__main__': - main() diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/package-installs/bin/package-installs-v2 python-diskimage-builder-2.17.0/doc/source/elements/package-installs/bin/package-installs-v2 --- python-diskimage-builder-2.11.0/doc/source/elements/package-installs/bin/package-installs-v2 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/package-installs/bin/package-installs-v2 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ -#!/usr/local/bin/dib-python - -# Copyright 2014 Hewlett-Packard Development 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. - -from __future__ import print_function - -import argparse -import json -import os -import subprocess -import sys - -from collections import defaultdict - - -# run a command, return output -# 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) - if follow: - print("Running command: %s" % cmdline) - out = "" - with proc.stdout: - for line in iter(proc.stdout.readline, ''): - out += line - print("> %s" % line, end="") - proc.wait() - print("returncode: %d" % proc.returncode) - else: - out = proc.communicate()[0] - - if proc.returncode: - e = subprocess.CalledProcessError(proc.returncode, cmdline) - e.output = out - raise e - - return out - - -def main(): - dbg_level = int(os.getenv('DIB_DEBUG_TRACE', '0')) - - parser = argparse.ArgumentParser( - description="Install or uninstall packages for a specific phase based" - " on package-installs files.") - parser.add_argument('--phase', required=True, - help="Install phase to filter on. Valid options are" - " 'install.d' or pre-install.d") - parser.add_argument('--uninstall', action="store_true", - help="Only show packages to uninstall. By default only" - " packages to install are shown") - parser.add_argument('-n', '--noop', action="store_true", - help="Don't actually install, just print the command") - parser.add_argument('infile', help="File to process") - args = parser.parse_args() - - packages = json.load(open(args.infile)) - if args.uninstall: - install = "uninstall" - else: - install = "install" - - pkgs = list() - if args.phase in packages and install in packages[args.phase]: - install_packages = packages[args.phase][install] - else: - print("Nothing to %s" % install) - sys.exit(0) - - # sort the list by element, this way we only do one pkg-map call - # per element - by_element = defaultdict(list) - for (pkg, element) in install_packages: - by_element[element].append(pkg) - - for element, packages in by_element.items(): - print("Map %s for %s: %s" % (install, element, ', '.join(packages))) - - # Only trace pkg-map for higher levels of debugging. Note - # that pkg-map debug output comes out on stderr, which is - # captured into the output by process_output. We filter by - # "prefix" so we don't think the debug lines are packages! - pkg_map_args = ['pkg-map', '--prefix', '-', - '--missing-ok', '--element', element] - if dbg_level > 1: - pkg_map_args.append('--debug') - pkg_map_args.extend(packages) - - try: - follow = True if dbg_level > 1 else False - map_output = process_output(pkg_map_args, follow=follow) - map_output = map_output.strip().split('\n') - map_output = [m[1:] for m in map_output if m.startswith('-')] - pkgs.extend(map_output) - except subprocess.CalledProcessError as e: - if e.returncode == 1: - if args.noop: - pkgs.append(pkg) - continue - else: - print("pkg-map failed") - sys.exit(1) - elif e.returncode == 2: - pkgs.append(pkg) - continue - - install_args = ["install-packages"] - if args.uninstall: - install_args.append("-e") - install_args.extend(list(set(pkgs))) - - if args.noop: - print(" ".join(install_args)) - else: - try: - process_output(install_args, follow=True) - except subprocess.CalledProcessError as e: - print("install-packages failed with returncode %d" % e.returncode) - sys.exit(1) - - -if __name__ == '__main__': - main() - -# Tell emacs to use python-mode -# Local variables: -# mode: python -# End: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/package-installs/bin/package-uninstalls python-diskimage-builder-2.17.0/doc/source/elements/package-installs/bin/package-uninstalls --- python-diskimage-builder-2.11.0/doc/source/elements/package-installs/bin/package-uninstalls 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/package-installs/bin/package-uninstalls 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -SCRIPTNAME=$(basename $0) -function show_options () { - echo "Usage: $SCRIPTNAME -d " - echo - echo "Options:" - echo " -d -- directory to search for package-uninstalls-* files" - exit 1 -} - -TEMP=$(getopt -o hd: -n $SCRIPTNAME -- "$@") -if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi -eval set -- "$TEMP" - -WORKDIR= - -while true ; do - case "$1" in - -d) WORKDIR=$2; shift 2;; - -h) show_options;; - --) shift ; break ;; - *) echo "Error: unsupported option $1."; exit 1;; - esac -done - -if [ -z "$WORKDIR" ]; then - show_options -fi - -PACKAGES= - -for PACKAGEFILE in $(find $WORKDIR -maxdepth 1 -name "package-installs-*" ); do - basefile=$(basename $PACKAGEFILE) - element_name=${basefile#"package-installs-"} - while read pkg; do - if [ -z "$pkg" ]; then - continue - fi - # Ignore comments - if [ ${pkg:0:1} = "#" ]; then - continue - fi - if [ ! ${pkg:0:1} = "-" ]; then - continue - fi - - if [ -e /usr/share/pkg-map/$element_name ]; then - # map the package to its true name - pkg=$(pkg-map --element $element_name $pkg) - fi - - pkg=${pkg:1} - PACKAGES="$PACKAGES $pkg" - done < $PACKAGEFILE -done - -install-packages -e $PACKAGES diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/package-installs/element-deps python-diskimage-builder-2.17.0/doc/source/elements/package-installs/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/package-installs/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/package-installs/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -dib-python -install-bin -pkg-map diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/package-installs/extra-data.d/99-squash-package-install python-diskimage-builder-2.17.0/doc/source/elements/package-installs/extra-data.d/99-squash-package-install --- python-diskimage-builder-2.11.0/doc/source/elements/package-installs/extra-data.d/99-squash-package-install 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/package-installs/extra-data.d/99-squash-package-install 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -#!/bin/bash -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -sudo -E $DIB_PYTHON_EXEC $(dirname $0)/../bin/package-installs-squash --elements="$IMAGE_ELEMENT" --path=$ELEMENTS_PATH $TMP_MOUNT_PATH/tmp/package-installs.json diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/package-installs/install.d/01-package-installs python-diskimage-builder-2.17.0/doc/source/elements/package-installs/install.d/01-package-installs --- python-diskimage-builder-2.11.0/doc/source/elements/package-installs/install.d/01-package-installs 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/package-installs/install.d/01-package-installs 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -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 -Nru python-diskimage-builder-2.11.0/doc/source/elements/package-installs/install.d/99-package-uninstalls python-diskimage-builder-2.17.0/doc/source/elements/package-installs/install.d/99-package-uninstalls --- python-diskimage-builder-2.11.0/doc/source/elements/package-installs/install.d/99-package-uninstalls 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/package-installs/install.d/99-package-uninstalls 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -package-uninstalls -d $(dirname $0) -package-installs-v2 --phase install.d --uninstall /tmp/package-installs.json diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/package-installs/post-install.d/00-package-installs python-diskimage-builder-2.17.0/doc/source/elements/package-installs/post-install.d/00-package-installs --- python-diskimage-builder-2.11.0/doc/source/elements/package-installs/post-install.d/00-package-installs 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/package-installs/post-install.d/00-package-installs 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -package-installs -d $(dirname $0) -package-installs-v2 --phase post-install.d /tmp/package-installs.json diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/package-installs/post-install.d/95-package-uninstalls python-diskimage-builder-2.17.0/doc/source/elements/package-installs/post-install.d/95-package-uninstalls --- python-diskimage-builder-2.11.0/doc/source/elements/package-installs/post-install.d/95-package-uninstalls 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/package-installs/post-install.d/95-package-uninstalls 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -package-uninstalls -d $(dirname $0) -package-installs-v2 --phase post-install.d --uninstall /tmp/package-installs.json diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/package-installs/pre-install.d/02-package-installs python-diskimage-builder-2.17.0/doc/source/elements/package-installs/pre-install.d/02-package-installs --- python-diskimage-builder-2.11.0/doc/source/elements/package-installs/pre-install.d/02-package-installs 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/package-installs/pre-install.d/02-package-installs 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -package-installs -d $(dirname $0) -package-installs-v2 --phase pre-install.d /tmp/package-installs.json diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/package-installs/pre-install.d/99-package-uninstalls python-diskimage-builder-2.17.0/doc/source/elements/package-installs/pre-install.d/99-package-uninstalls --- python-diskimage-builder-2.11.0/doc/source/elements/package-installs/pre-install.d/99-package-uninstalls 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/package-installs/pre-install.d/99-package-uninstalls 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -package-uninstalls -d $(dirname $0) -package-installs-v2 --phase pre-install.d --uninstall /tmp/package-installs.json diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/package-installs/README.rst python-diskimage-builder-2.17.0/doc/source/elements/package-installs/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/package-installs/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/package-installs/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -================ -package-installs -================ - -The package-installs element allows for a declarative method of installing and -uninstalling packages for an image build. This is done by creating a -package-installs.yaml or package-installs.json file in the element directory. - -In order to work on Gentoo hosts you will need to manually install -`dev-python/pyyaml`. - -example ``package-installs.yaml`` - -.. code-block:: YAML - - libxml2: - grub2: - phase: pre-install.d - networkmanager: - uninstall: True - os-collect-config: - installtype: source - linux-image-amd64: - arch: amd64 - dmidecode: - not-arch: ppc64, ppc64le - lshw: - arch: ppc64, ppc64le - python-dev: - dib_python_version: 2 - python3-dev: - dib_python_version: 3 - -example package-installs.json - -.. code-block:: json - - { - "libxml2": null, - "grub2": {"phase": "pre-install.d"}, - "networkmanager": {"uninstall": true} - "os-collect-config": {"installtype": "source"} - } - - -Setting phase, uninstall, or installtype properties for a package overrides -the following default values:: - - phase: install.d - 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 -diskimage-builder docs for more information on installtypes. - -The ``arch`` property is a comma-separated list of architectures to -install for. The ``not-arch`` is a comma-separated list of -architectures the package should be excluded from. Either ``arch`` or -``not-arch`` can be given for one package - not both. See -documentation about the ARCH variable for more information. - -DEPRECATED: Adding a file under your elements pre-install.d, install.d, or -post-install.d directories called package-installs- will cause -the list of packages in that file to be installed at the beginning of the -respective phase. If the package name in the file starts with a "-", then -that package will be removed at the end of the install.d phase. - -Using post-install.d for cleanup -================================ - -Package removal is done in post-install.d at level 95. If you a -running cleanup functions before this, you need to be careful not -to clean out any temporary files relied upon by this element. -For this reason, generally post-install cleanup functions should -occupy the higher levels between 96 and 99. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/element-deps python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -dib-python -install-types -package-installs -source-repositories diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip --- python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip 1970-01-01 00:00:00.000000000 +0000 @@ -1,134 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel7) ]]; then - - _do_py3=0 - packages="python-virtualenv python-pip python-setuptools" - if [[ $DISTRO_NAME =~ (fedora) ]]; then - _do_py3=1 - packages+=" python3-virtualenv python3-pip python3-setuptools" - fi - - # force things to happen so our assumptions hold - pip_args="-U --force-reinstall" - - # GENERAL WARNING : mixing packaged python libraries with - # pip-installed versions always creates issues. Upstream - # openstack-infra uses this a lot (especially devstack) but be - # warned: here be dragons :) - - # Firstly we want to install the system packages. Otherwise later - # on somebody does a "yum install python-virtualenv" and goes and - # overwrites the pip installed version with the packaged version, - # leading to all sorts of weird version issues. - if [[ $DISTRO_NAME = opensuse ]]; then - zypper -n install $packages - else - ${YUM:-yum} install -y $packages - fi - - # install the latest python2 pip; this overwrites packaged pip - python /tmp/get-pip.py ${pip_args} - - # pip and setuptools are closely related; we want to ensure the - # latest for sanity. Because distro packages don't include enough - # info in the egg for pip to be certain it has fully uninstalled - # the old package, for safety we clear it out by hand (this seems - # to have been a problem with very old to new updates, - # e.g. centos6 to current-era, but less so for smaller jumps). - # There is a bit of chicken-and-egg problem with pip in that it - # requires setuptools for some operations, such as wheel creation. - # But just installing setuptools shouldn't require setuptools - # itself, so we are safe for this small section. - rm -rf /usr/lib/python2.7/site-packages/setuptools* - pip install ${pip_args} setuptools - - if [[ $_do_py3 -eq 1 ]]; then - # Repeat above for python3 - # You would think that installing python3 bits first, then - # python2 would work -- alas get-pip.py doesn't seem to leave - # python3 alone: - # https://github.com/pypa/pip/issues/4435 - python3 /tmp/get-pip.py ${pip_args} - rm -rf /usr/lib/python3.?/site-packages/setuptools* - pip3 install ${pip_args} setuptools - # reclaim /usr/bin/pip back to pip2 - ln -sf /usr/bin/pip2 /usr/bin/pip - fi - - # now install latest virtualenv. it vendors stuff it needs so - # doesn't have issues with other system packages. - - # python[2|3]-virtualenv package has installed versioned scripts - # (/usr/bin/virtualenv-[2|3]) but upstream does not! (see [2]). - # For consistency, clear them out and then reinstall so we're just - # left with python2's version - # [2] http://pkgs.fedoraproject.org/cgit/rpms/python-virtualenv.git/tree/python-virtualenv.spec#n116) - rm /usr/bin/virtualenv* - if [[ $_do_py3 -eq 1 ]]; then - pip3 install ${pip_args} virtualenv - fi - pip install ${pip_args} virtualenv - - # at this point, we should have the latest - # pip/setuptools/virtualenv packages for python2 & 3, and - # "/usr/bin/pip" and "/usr/bin/virtualenv" should be python2 - # versions. - - if [[ $DISTRO_NAME = opensuse ]]; then - for pkg in virtualenv pip setuptools; do - cat - >> /etc/zypp/locks <> ${conf} - fi -elif [[ $DISTRO_NAME = gentoo ]]; then - packages="dev-python/pip dev-python/virtualenv" - emerge -U $packages -else - # pre-install packages so dependencies are there. We will - # overwrite with latest below. - packages="python-pip python3-pip python-virtualenv" - # unfortunately older ubuntu (trusty) doesn't have a - # python3-virtualenv package -- it seems it wasn't ready at the - # time and you had to use "python -m venv". Since then virtualenv - # has gained 3.4 support so the pip install below will work - if [[ ${DIB_PYTHON_VERSION} == 3 ]]; then - packages=$(echo "$packages" | sed s/python-virtualenv/python3-virtualenv/) - fi - - apt-get -y install $packages - - # force things to happen so our assumptions hold - pip_args="-U --force-reinstall" - - # These install into /usr/local/bin so override any packages, even - # if installed later. - - python3 /tmp/get-pip.py $pip_args - python2 /tmp/get-pip.py $pip_args - - pip3 install $pip_args virtualenv - pip install $pip_args virtualenv -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -# The python-xml and python3 openSUSE packages contain core python modules -# such as the XML one but the python devel packages do not pull them. As -# such we need to install them during the pre-install.d phase so they are -# available as early as possible. See -# - https://bugzilla.suse.com/show_bug.cgi?id=1046990 -# - https://review.openstack.org/#/c/478648/ -# - https://review.openstack.org/#/c/478650/ -# for discussions about this issue. -python-xml: - phase: pre-install.d - dib_python_version: 2 -python3: - phase: pre-install.d - installtype: package - dib_python_version: 3 -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 -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -{ - "family": { - "gentoo": { - "python-pip": "dev-python/pip", - "python3-pip": "dev-python/pip", - "python-virtualenv": "dev-python/virtualenv", - "python3-virtualenv": "dev-python/virtualenv", - "python-dev": "dev-lang/python", - "python3-dev": "dev-lang/python" - }, - "suse": { - "python-xml": "python-xml", - "python-dev": "python-devel", - "python3-dev": "python3-devel", - "python3": "python3" - }, - "redhat": { - "python-dev": "python2-devel", - "python3-dev": "python3-devel" - } - }, - "default": { - "python-xml": "", - "python3": "" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/README.rst python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -================== -pip-and-virtualenv -================== - -This element installs pip and virtualenv in the image. - -.. note:: This element setups and Python 2 and Python 3 environment. - This means it will bring in python2 packages, so isn't - appropriate if you want a python3 only environment. - -Package install -=============== - -If the package installtype is used then these programs are installed -from distribution packages. In this case, ``pip`` and ``virtualenv`` -will be installed *only* for the python version identified by -``dib-python`` (i.e. the default python for the platform). - -Distribution packages have worked out name-spacing such that only -python2 or python3 owns common scripts like ``/usr/bin/pip`` (on most -platforms, ``pip`` refers to python2 pip, and ``pip3`` refers to -python3 pip, although some may choose the reverse). - -To install pip and virtualenv from package:: - - export DIB_INSTALLTYPE_pip_and_virtualenv=package - -Source install -============== - -Source install is the default. If the source installtype is used, -``pip`` and ``virtualenv`` are installed from the latest upstream -releases. - -Source installs from these tools are not name-spaced. It is -inconsistent across platforms if the first or last install gets to own -common scripts like ``/usr/bin/pip`` and ``virtualenv``. - -To avoid inconsistency, we firstly install the packaged python 2 -**and** 3 versions of ``pip`` and ``virtualenv``. This prevents a -later install of these distribution packages conflicting with the -source install. We then overwrite ``pip`` and ``virtualenv`` via -``get-pip.py`` and ``pip`` respectively. - -The system will be left in the following state: - -* ``/usr/bin/pip`` : python2 pip -* ``/usr/bin/pip2`` : python2 pip (same as prior) -* ``/usr/bin/pip3`` : python3 pip -* ``/usr/bin/virtualenv`` : python2 virtualenv - -(note python3 ``virtualenv`` script is *not* installed, see below) - -Source install is supported on limited platforms. See the code, but -this includes Ubuntu and RedHat platforms. - -Using the tools -=============== - -Due to the essentially unsolvable problem of "who owns the script", it -is recommended to *not* call ``pip`` or ``virtualenv`` directly. You -can directly call them with the ``-m`` argument to the python -interpreter you wish to install with. - -For example, to create a python3 environment do:: - - # python3 -m virtualenv myenv - # myenv/bin/pip install mytool - -To install a python2 tool from pip:: - - # python2 -m pip install mytool - -In this way, you can always know which interpreter is being used (and -affected by) the call. - -Ordering -======== -Any element that uses these commands must be designated as -05-* or higher to ensure that they are first installed. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/source-repository-pip-and-virtualenv python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/source-repository-pip-and-virtualenv --- python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/source-repository-pip-and-virtualenv 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/source-repository-pip-and-virtualenv 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -pip-and-virtualenv file /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-fedora/element-deps python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-fedora/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-fedora/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-fedora/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -fedora-minimal -openstack-ci-mirrors diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-fedora/environment.d/10-source-installtype-pip-and-virtualenv python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-fedora/environment.d/10-source-installtype-pip-and-virtualenv --- python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-fedora/environment.d/10-source-installtype-pip-and-virtualenv 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-fedora/environment.d/10-source-installtype-pip-and-virtualenv 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DIB_INSTALLTYPE_pip_and_virtualenv=source diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-ubuntu/element-deps python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-ubuntu/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-ubuntu/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-ubuntu/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -openstack-ci-mirrors -ubuntu-minimal diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-ubuntu/environment.d/10-source-installtype-pip-and-virtualenv python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-ubuntu/environment.d/10-source-installtype-pip-and-virtualenv --- python-diskimage-builder-2.11.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-ubuntu/environment.d/10-source-installtype-pip-and-virtualenv 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-and-virtualenv/test-elements/source-install-ubuntu/environment.d/10-source-installtype-pip-and-virtualenv 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DIB_INSTALLTYPE_pip_and_virtualenv=source diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-cache/environment.d/10-pip-cache python-diskimage-builder-2.17.0/doc/source/elements/pip-cache/environment.d/10-pip-cache --- python-diskimage-builder-2.11.0/doc/source/elements/pip-cache/environment.d/10-pip-cache 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-cache/environment.d/10-pip-cache 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export PIP_DOWNLOAD_CACHE=/tmp/pip diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-cache/README.rst python-diskimage-builder-2.17.0/doc/source/elements/pip-cache/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/pip-cache/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-cache/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -========= -pip-cache -========= -# Use a cache for pip - -Using a download cache speeds up image builds. - -Including this element in an image build causes -$HOME/.cache/image-create/pip to be bind mounted as /tmp/pip inside -the image build chroot. The $PIP_DOWNLOAD_CACHE environment variable -is then defined as /tmp/pip, which causes pip to cache all downloads -to the defined location. - -Note that pip and its use of $PIP_DOWNLOAD_CACHE is not concurrency -safe. Running multiple instances of diskimage-builder concurrently -can cause issues. Therefore, it is advised to only have one instance -of diskimage-builder that includes the pip-cache element running at a -time. - -The pip concurrency issue is being tracked upstream at -https://github.com/pypa/pip/issues/1141 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pip-cache/root.d/01-pip-cache python-diskimage-builder-2.17.0/doc/source/elements/pip-cache/root.d/01-pip-cache --- python-diskimage-builder-2.11.0/doc/source/elements/pip-cache/root.d/01-pip-cache 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pip-cache/root.d/01-pip-cache 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -PIP_CACHE_DIR=$DIB_IMAGE_CACHE/pip -mkdir -p $PIP_CACHE_DIR - -sudo mkdir -p $TMP_MOUNT_PATH/tmp/pip -sudo mount --bind $PIP_CACHE_DIR $TMP_MOUNT_PATH/tmp/pip diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pkg-map/bin/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/pkg-map/bin/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/pkg-map/bin/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pkg-map/bin/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,199 +0,0 @@ -#!/usr/local/bin/dib-python - -# Copyright 2014 Red Hat Inc. -# -# 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. - -import argparse -import json -import logging -import os -import sys - - -log = logging.getLogger() - - -def os_family(distro): - family = None - if distro in ['fedora', 'rhel', 'rhel7', 'centos', 'centos7']: - family = 'redhat' - elif distro in ['debian', 'ubuntu']: - family = 'debian' - elif distro == 'opensuse': - family = 'suse' - elif distro == 'gentoo': - family = 'gentoo' - - return family - - -def main(): - parser = argparse.ArgumentParser( - description="Translate package name to distro specific name." - " Exits with 1 if error is encountered, 2 if no pkg-map" - " file is found. Otherwise exits with 0.") - parser.add_argument('--element', default='', - help='The element (namespace) to use for translation.') - parser.add_argument('--pkg-map', default='', - help='Path to specific pkg-map file. ' - '(Useful for testing)') - parser.add_argument('--distro', default=os.environ.get('DISTRO_NAME'), - help='The distro name to use for translation.' - ' Defaults to DISTRO_NAME') - parser.add_argument('--release', default=os.environ.get('DIB_RELEASE'), - help='A more specfic name for distribution release') - parser.add_argument('--missing-ok', action="store_true", - help='Do not consider missing mappings an error.' - ' Causes packages where no mapping is set to be' - ' printed.') - # This tool has traditionally output status and debug messages on - # stderr. The problem is if a caller has stderr > stdout then - # actual output gets messed in with the logs. This allows callers - # to disambiguate actual output by specifying a unique prefix. - parser.add_argument('--prefix', default='', - help='Output mapped packages with this prefix') - parser.add_argument('--debug', dest='debug', action="store_true", - help="Enable debugging output") - - args, extra = parser.parse_known_args() - - # Logs have traditionally gone to stderr with this tool. Maintain - # compatibility - level = logging.DEBUG if args.debug else logging.INFO - logging.basicConfig(stream=sys.stderr, level=level) - - if not args.element and not args.pkg_map: - log.error('Please specify an --element argument.') - sys.exit(1) - - if args.element and args.pkg_map: - log.error('Specify either --element or --pkg-map') - sys.exit(1) - - if not args.distro: - log.error('Please specify a --distro argument or set DISTRO_NAME.') - sys.exit(1) - - if args.pkg_map: - # specifying the pkg-map by hand is just for manual testing - element = "<%s>" % args.pkg_map - map_file = args.pkg_map - else: - element = args.element - map_file = '/usr/share/pkg-map/%s' % element - - log.info("Mapping for %s : %s" % (element, ' '.join(extra))) - - if not os.path.exists(map_file): - if args.missing_ok: - log.info("No package map for %s, done" % element) - for name in extra: - print('%s%s' % (args.prefix, name)) - sys.exit(0) - else: - log.error('Required pkg-map for %s element does not exist.' - % args.element) - sys.exit(2) - - with open(map_file) as fd: - try: - package_names = json.loads(fd.read()) - # log.debug(pprint.pformat(package_names)) - except ValueError: - log.error('Unable to parse %s' % map_file) - raise - - # Parse mapping data in this form using release/distro/family/default - # Most specific takes priority; order is - # - release - # - distro - # - family - # - default - # An empty package list can be provided. - # - # Example for Nova and Glance (using fictitious name for Fedora and SUSE - # and package mapping for SUSE family) - # { - # "release": { - # "fedora" : { - # "23" : { - # "nova_package": "openstack-compute-foo" - # } - # } - # } - # "distro": { - # "fedora": { - # "nova_package": "openstack-compute", - # "glance_package": "openstack-image" - # } - # }, - # "family": { - # "redhat": { - # "nova_package": "openstack-nova", - # "glance_package": "openstack-glance" - # }, - # "suse": { - # "nova_package": "" - # } - # }, - # "default": { - # "nova_package": "nova", - # "glance_package": "glance" - # } - # } - name_map = package_names.get('default', {}) - if 'family' in package_names: - family_map = package_names['family'].get(os_family(args.distro)) - if family_map: - name_map.update(family_map) - if 'distro' in package_names: - distro_map = package_names['distro'].get(args.distro) - if distro_map: - name_map.update(distro_map) - if 'release' in package_names: - try: - # release is a sub-concept of distro - release_map = package_names['release'][args.distro][args.release] - name_map.update(release_map) - except KeyError: - pass - - # log.debug(pprint.pformat(name_map)) - - for name in extra: - pkg_name = name_map.get(name) - if pkg_name: - log.debug("map %s -> %s" % (name, pkg_name)) - print('%s%s' % (args.prefix, pkg_name)) - elif name in name_map: - log.debug("map %s -> " % (name)) - continue - else: - if args.missing_ok: - log.debug("pass -> %s" % (name)) - print('%s%s' % (args.prefix, name)) - else: - log.error("%s has no valid mapping for package %s" % - (element, name)) - sys.exit(1) - - sys.exit(0) - -if __name__ == '__main__': - main() - -# Tell emacs to use python-mode -# Local variables: -# mode: python -# End: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pkg-map/element-deps python-diskimage-builder-2.17.0/doc/source/elements/pkg-map/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/pkg-map/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pkg-map/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -dib-python diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pkg-map/extra-data.d/10-create-pkg-map-dir python-diskimage-builder-2.17.0/doc/source/elements/pkg-map/extra-data.d/10-create-pkg-map-dir --- python-diskimage-builder-2.11.0/doc/source/elements/pkg-map/extra-data.d/10-create-pkg-map-dir 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pkg-map/extra-data.d/10-create-pkg-map-dir 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -sudo mkdir -p $TMP_MOUNT_PATH/usr/share/pkg-map/ - -eval declare -A image_elements=($(get_image_element_array)) - -for i in "${!image_elements[@]}"; do - element=$i - element_dir=${image_elements[$i]} - - pkg_map="${element_dir}/pkg-map" - if [ -f "${pkg_map}" ]; then - sudo cp "${pkg_map}" "$TMP_MOUNT_PATH/usr/share/pkg-map/$element" - fi -done diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pkg-map/README.rst python-diskimage-builder-2.17.0/doc/source/elements/pkg-map/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/pkg-map/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pkg-map/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -======= -pkg-map -======= -Map package names to distro specific packages. - -Provides the following: - - * bin/pkg-map:: - - usage: pkg-map [-h] [--element ELEMENT] [--distro DISTRO] - - Translate package name to distro specific name. - - optional arguments: - -h, --help show this help message and exit - --element ELEMENT The element (namespace) to use for translation. - --distro DISTRO The distro name to use for translation. Defaults to - DISTRO_NAME - --release RELEASE The release to use for translation. Defaults to - DIB_RELEASE - - * Any element may create its own pkg-map JSON config file using the - one of 4 sections for the release/distro/family/ and or default. - The family is set automatically within pkg-map based on the - supplied distro name. Families include: - - + redhat: includes centos, fedora, and rhel distros - + debian: includes debian and ubuntu distros - + suse: includes the opensuse distro - - The release is a specification of distro; i.e. the distro and - release must mach for a translation. - - The most specific section takes priority. - - An empty package list can be provided. - - Example for Nova and Glance (NOTE: using fictitious package names - for Fedora and package mapping for suse family to provide a good - example!) - - Example format:: - - { - "release": { - "fedora": { - "23": { - "nova_package": "foo" "bar" - } - } - }, - "distro": { - "fedora": { - "nova_package": "openstack-compute", - "glance_package": "openstack-image" - } - }, - "family": { - "redhat": { - "nova_package": "openstack-nova", - "glance_package": "openstack-glance" - }, - "suse": { - "nova_package": "" - } - }, - "default": { - "nova_package": "nova", - "glance_package": "glance" - } - } - - Example commands using this format: - - pkg-map --element nova-compute --distro fedora nova_package - - Returns: openstack-compute - - pkg-map --element nova-compute --distro rhel nova_package - - Returns: openstack-nova - - pkg-map --element nova-compute --distro ubuntu nova_package - - Returns: nova - - pkg-map --element nova-compute --distro opensuse nova_package - - Returns: - - * This output can be used to filter what other tools actually install - (install-packages can be modified to use this for example) - - * Individual pkg-map files live within each element. For example - if you are created an Apache element your pkg-map JSON file - should be created at elements/apache/pkg-map. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/posix/element-deps python-diskimage-builder-2.17.0/doc/source/elements/posix/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/posix/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/posix/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -openssh-server diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/posix/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/posix/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/posix/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/posix/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,160 +0,0 @@ -"admin": -"alias": -"ar": -"asa": -"at": -"awk": -"basename": -"batch": -"bc": -"bg": -"c99": -"cal": -"cat": -"cd": -"cflow": -"chgrp": -"chmod": -"chown": -"cksum": -"cmp": -"comm": -"command": -"compress": -"cp": -"crontab": -"csplit": -"ctags": -"cut": -"cxref": -"date": -"dd": -"delta": -"df": -"diff": -"dirname": -"du": -"echo": -"ed": -"env": -"ex": -"expand": -"expr": -"false": -"fc": -"fg": -"file": -"find": -"fold": -"fort77": -"fuser": -"gencat": -"get": -"getconf": -"getopts": -"grep": -"hash": -"head": -"iconv": -"id": -"ipcrm": -"ipcs": -"jobs": -"join": -"kill": -"lex": -"link": -"ln": -"locale": -"localedef": -"logger": -"logname": -"lp": -"ls": -"m4": -"mailx": -"make": -"man": -"mesg": -"mkdir": -"mkfifo": -"more": -"mv": -"newgrp": -"nice": -"nl": -"nm": -"nohup": -"od": -"paste": -"patch": -"pathchk": -"pax": -"pr": -"printf": -"prs": -"ps": -"pwd": -"qalter": -"qdel": -"qhold": -"qmove": -"qmsg": -"qrerun": -"qrls": -"qselect": -"qsig": -"qstat": -"qsub": -"read": -"renice": -"rm": -"rmdel": -"rmdir": -"sact": -"sccs": -"sed": -"sh": -"sleep": -"sort": -"split": -"strings": -"strip": -"stty": -"tabs": -"tail": -"talk": -"tee": -"test": -"time": -"touch": -"tput": -"tr": -"true": -"tsort": -"tty": -"type": -"ulimit": -"umask": -"unalias": -"uname": -"uncompress": -"unexpand": -"unget": -"uniq": -"unlink": -"uucp": -"uudecode": -"uuencode": -"uustat": -"uux": -"val": -"vi": -"wait": -"wc": -"what": -"who": -"write": -"xargs": -"yacc": -"zcat": diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/posix/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/posix/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/posix/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/posix/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,328 +0,0 @@ -{ - "family":{ - "debian":{ - "admin": "", - "alias": "", - "ar": "binutils", - "asa": "", - "at": "at", - "awk": "gawk", - "basename": "coreutils", - "batch": "at", - "bc": "bc", - "bg": "", - "c99": "gcc", - "cal": "bsdmainutils", - "cat": "coreutils", - "cd": "", - "cflow": "cflow", - "chgrp": "coreutils", - "chmod": "coreutils", - "chown": "coreutils", - "cksum": "coreutils", - "cmp": "diffutils", - "comm": "coreutils", - "command": "", - "compress": "ncompress", - "cp": "coreutils", - "crontab": "cron", - "csplit": "coreutils", - "ctags": "exuberant-ctags", - "cut": "coreutils", - "cxref": "cxref", - "date": "coreutils", - "dd": "coreutils", - "delta": "", - "df": "coreutils", - "diff": "diffutils", - "dirname": "coreutils", - "du": "coreutils", - "echo": "coreutils", - "ed": "ed", - "env": "coreutils", - "ex": "vim", - "expand": "coreutils", - "expr": "coreutils", - "false": "coreutils", - "fc": "", - "fg": "", - "file": "file", - "find": "findutils", - "fold": "coreutils", - "fort77": "fort77", - "fuser": "psmisc", - "gencat": "libc-dev-bin", - "get": "", - "getconf": "libc-bin", - "getopts": "", - "grep": "grep", - "hash": "", - "head": "coreutils", - "iconv": "libc-bin", - "id": "coreutils", - "ipcrm": "util-linux", - "ipcs": "util-linux", - "jobs": "", - "join": "coreutils", - "kill": "procps", - "lex": "flex", - "link": "coreutils", - "ln": "coreutils", - "locale": "libc-bin", - "localedef": "libc-bin", - "logger": "bsdutils", - "logname": "coreutils", - "lp": "cups-client", - "ls": "coreutils", - "m4": "m4", - "mailx": "mailutils", - "make": "make", - "man": "man-db", - "mesg": "sysvinit-utils", - "mkdir": "coreutils", - "mkfifo": "coreutils", - "more": "util-linux", - "mv": "coreutils", - "newgrp": "login", - "nice": "coreutils", - "nl": "coreutils", - "nm": "binutils", - "nohup": "coreutils", - "od": "coreutils", - "paste": "coreutils", - "patch": "patch", - "pathchk": "coreutils", - "pax": "pax", - "pr": "coreutils", - "printf": "coreutils", - "prs": "", - "ps": "procps", - "pwd": "coreutils", - "qalter": "", - "qdel": "", - "qhold": "", - "qmove": "", - "qmsg": "", - "qrerun": "", - "qrls": "", - "qselect": "", - "qsig": "", - "qstat": "", - "qsub": "", - "read": "", - "renice": "bsdutils", - "rm": "coreutils", - "rmdel": "cssc", - "rmdir": "coreutils", - "sact": "cssc", - "sccs": "cssc", - "sed": "sed", - "sh": "dash", - "sleep": "coreutils", - "sort": "coreutils", - "split": "coreutils", - "strings": "binutils", - "strip": "binutils", - "stty": "coreutils", - "tabs": "ncurses-bin", - "tail": "coreutils", - "talk": "talk", - "tee": "coreutils", - "test": "coreutils", - "time": "", - "touch": "coreutils", - "tput": "ncurses-bin", - "tr": "coreutils", - "true": "coreutils", - "tsort": "coreutils", - "tty": "coreutils", - "type": "", - "ulimit": "", - "umask": "", - "unalias": "", - "uname": "coreutils", - "uncompress": "gzip", - "unexpand": "coreutils", - "unget": "", - "uniq": "coreutils", - "unlink": "coreutils", - "uucp": "uucp", - "uudecode": "sharutils", - "uuencode": "sharutils", - "uustat": "uucp", - "uux": "uucp", - "val": "", - "vi": "vim", - "wait": "", - "wc": "coreutils", - "what": "", - "who": "coreutils", - "write": "bsdmainutils", - "xargs": "findutils", - "yacc": "bison", - "zcat": "gzip" - }, - "redhat":{ - "admin": "", - "alias": "bash", - "ar": "binutils", - "asa": "", - "at": "at", - "awk": "gawk", - "basename": "coreutils", - "batch": "at", - "bc": "bc", - "bg": "", - "c99": "gcc", - "cal": "util-linux", - "cat": "coreutils", - "cd": "bash", - "cflow": "", - "chgrp": "coreutils", - "chmod": "coreutils", - "chown": "coreutils", - "cksum": "coreutils", - "cmp": "diffutils", - "comm": "coreutils", - "command": "bash", - "compress": "ncompress", - "cp": "coreutils", - "crontab": "cronie", - "csplit": "coreutils", - "ctags": "ctags", - "cut": "coreutils", - "cxref": "", - "date": "coreutils", - "dd": "coreutils", - "delta": "", - "df": "coreutils", - "diff": "diffutils", - "dirname": "coreutils", - "du": "coreutils", - "echo": "coreutils", - "ed": "ed", - "env": "coreutils", - "ex": "vim-minimal", - "expand": "coreutils", - "expr": "coreutils", - "false": "coreutils", - "fc": "", - "fg": "", - "file": "file", - "find": "findutils", - "fold": "coreutils", - "fort77": "", - "fuser": "psmisc", - "gencat": "glibc-common", - "get": "", - "getconf": "glibc-common", - "getopts": "bash", - "grep": "grep", - "hash": "", - "head": "coreutils", - "iconv": "glibc-common", - "id": "coreutils", - "ipcrm": "util-linux", - "ipcs": "util-linux", - "jobs": "bash", - "join": "coreutils", - "kill": "util-linux", - "lex": "flex", - "link": "coreutils", - "ln": "coreutils", - "locale": "glibc-common", - "localedef": "", - "logger": "util-linux", - "logname": "coreutils", - "lp": "cups-client", - "ls": "coreutils", - "m4": "m4", - "mailx": "mailx", - "make": "make", - "man": "man-db", - "mesg": "sysvinit-utils", - "mkdir": "coreutils", - "mkfifo": "coreutils", - "more": "util-linux", - "mv": "coreutils", - "newgrp": "shadow-utils", - "nice": "coreutils", - "nl": "coreutils", - "nm": "binutils", - "nohup": "coreutils", - "od": "coreutils", - "paste": "coreutils", - "patch": "patch", - "pathchk": "coreutils", - "pax": "pax", - "pr": "coreutils", - "printf": "coreutils", - "prs": "", - "ps": "procps-ng", - "pwd": "coreutils", - "qalter": "", - "qdel": "", - "qhold": "", - "qmove": "", - "qmsg": "", - "qrerun": "", - "qrls": "", - "qselect": "", - "qsig": "", - "qstat": "", - "qsub": "", - "read": "bash", - "renice": "util-linux", - "rm": "coreutils", - "rmdel": "", - "rmdir": "coreutils", - "sact": "", - "sccs": "", - "sed": "sed", - "sh": "bash", - "sleep": "coreutils", - "sort": "coreutils", - "split": "coreutils", - "strings": "binutils", - "strip": "binutils", - "stty": "coreutils", - "tabs": "ncurses-bin", - "tail": "coreutils", - "talk": "talk", - "tee": "coreutils", - "test": "coreutils", - "time": "", - "touch": "coreutils", - "tput": "ncurses", - "tr": "coreutils", - "true": "coreutils", - "tsort": "coreutils", - "tty": "coreutils", - "type": "", - "ulimit": "", - "umask": "bash", - "unalias": "bash", - "uname": "coreutils", - "uncompress": "ncompress", - "unexpand": "coreutils", - "unget": "", - "uniq": "coreutils", - "unlink": "coreutils", - "uucp": "", - "uudecode": "sharutils", - "uuencode": "sharutils", - "uustat": "", - "uux": "", - "val": "", - "vi": "vim-minimal", - "wait": "bash", - "wc": "coreutils", - "what": "", - "who": "coreutils", - "write": "util-linux", - "xargs": "findutils", - "yacc": "byacc", - "zcat": "gzip" - } - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/posix/README.rst python-diskimage-builder-2.17.0/doc/source/elements/posix/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/posix/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/posix/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -posix -===== - -* This element installs packages to ensure that the resulting image has - binaries necessary to meet the requirements of POSIX, laid out in the - following URL: - - + http://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html - -* This has been tested to work on Ubuntu, Debian, and CentOS, although - should work on Red Hat Enterprise Linux. - -* To add support for other distros please consult the URL for binaries, - then add the providing packages to pkg-map. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/proliant-tools/element-deps python-diskimage-builder-2.17.0/doc/source/elements/proliant-tools/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/proliant-tools/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/proliant-tools/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -package-installs -pip-and-virtualenv diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/proliant-tools/install.d/65-proliant-tools-install python-diskimage-builder-2.17.0/doc/source/elements/proliant-tools/install.d/65-proliant-tools-install --- python-diskimage-builder-2.11.0/doc/source/elements/proliant-tools/install.d/65-proliant-tools-install 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/proliant-tools/install.d/65-proliant-tools-install 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Hewlett-Packard Development 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 - -# Set the below variable to allow ssacli to be installed from custom URLs. -if [[ -n "${DIB_HPSSACLI_URL:=}" ]]; then - echo "The environment variable DIB_HPSSACLI_URL is deprecated; use DIB_SSACLI_URL instead." -fi - -DIB_SSACLI_URL=${DIB_SSACLI_URL:-${DIB_HPSSACLI_URL:-https://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1857046646/v122802/ssacli-3.10-3.0.x86_64.rpm}} -curl -k -o /tmp/ssacli.rpm $DIB_SSACLI_URL - -if [[ $DISTRO_NAME = "ubuntu" || $DISTRO_NAME = "debian" ]]; then - # There is no deb package for ssacli. Install with alien. - alien -i /tmp/ssacli.rpm -else - rpm -iv /tmp/ssacli.rpm -fi - -rm -f /tmp/ssacli.rpm - -# Install proliantutils python module in the -# virtual environment of ironic-python-agent. -# This is pre-installed by -# ironic-agent/install.d/ironic-agent-source-install/60-ironic-agent-install. -IPA_VENV=/usr/share/ironic-python-agent/venv -if [[ -d "$IPA_VENV" ]]; then - $IPA_VENV/bin/pip install proliantutils -else - pip install proliantutils -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/proliant-tools/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/proliant-tools/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/proliant-tools/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/proliant-tools/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -alien: -gcc: -python-dev: -unzip: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/proliant-tools/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/proliant-tools/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/proliant-tools/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/proliant-tools/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -{ - "family": { - "debian": { - "alien": "alien" - }, - "redhat": { - "python-dev": "python2-devel" - }, - "suse": { - "python-dev": "python-devel" - } - }, - "default": { - "alien": "", - "gcc": "gcc", - "python-dev": "python-dev", - "unzip": "unzip" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/proliant-tools/README.rst python-diskimage-builder-2.17.0/doc/source/elements/proliant-tools/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/proliant-tools/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/proliant-tools/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -proliant-tools -============== - -* This element can be used when building ironic-agent ramdisk. It - enables ironic-agent ramdisk to do in-band cleaning operations specific - to HPE ProLiant hardware. - -* Works with ubuntu and fedora distributions (on which ironic-agent - element is supported). - -* Currently the following utilities are installed: - - + `proliantutils`_ - This module registers an ironic-python-agent hardware - manager for HPE ProLiant hardware, which implements in-band cleaning - steps. The latest version of ``proliantutils`` available is - installed. This python module is released with Apache license. - - + `HPE Smart Storage Administrator (HPE SSA) CLI for Linux 64-bit`_ - This - utility is used by ``proliantutils`` library above for doing in-band RAID - configuration on HPE ProLiant hardware. Currently installed version is - 2.60. Newer version of ``ssacli`` when available, may be installed to - the ramdisk by using the environment variable ``DIB_SSACLI_URL``. - ``DIB_SSACLI_URL`` should contain the HTTP(S) URL for downloading the - RPM package for ``ssacli`` utility. The old environmental variable - ``DIB_HPSSACLI_URL``,a HTTP(S) URL for downloading the RPM package for - ``hpssacli`` utility, is deprecated. The ``hpssacli`` utility is not - supported anymore, use ``ssacli`` instead for the same functionality. - Availability of newer versions can be in the Revision History - in the above link. This utility is closed source and is released with - `HPE End User License Agreement – Enterprise Version`_. - -.. _`proliantutils`: https://pypi.python.org/pypi/proliantutils -.. _`HPE Smart Storage Administrator (HPE SSA) CLI for Linux 64-bit`: http://h20564.www2.hpe.com/hpsc/swd/public/detail?swItemId=MTX_5530b3f5b38b4e0781e6bf9c74 -.. _`HPE End User License Agreement – Enterprise Version`: https://downloads.hpe.com/pub/softlib2/software1/doc/p1796552785/v113125/eula-en.html diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pypi/extra-data.d/00-mount-pypi-mirror python-diskimage-builder-2.17.0/doc/source/elements/pypi/extra-data.d/00-mount-pypi-mirror --- python-diskimage-builder-2.11.0/doc/source/elements/pypi/extra-data.d/00-mount-pypi-mirror 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pypi/extra-data.d/00-mount-pypi-mirror 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -MIRROR_SOURCE=$DIB_IMAGE_CACHE/pypi/mirror/ -if [ -d "$MIRROR_SOURCE" ]; then - MIRROR_TARGET=$TMP_MOUNT_PATH/tmp/pypi - - sudo mkdir -p $MIRROR_SOURCE $MIRROR_TARGET # dib-lint: safe_sudo - sudo mount --bind $MIRROR_SOURCE $MIRROR_TARGET # dib-lint: safe_sudo -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pypi/post-install.d/00-unconfigure-pypi-mirror python-diskimage-builder-2.17.0/doc/source/elements/pypi/post-install.d/00-unconfigure-pypi-mirror --- python-diskimage-builder-2.11.0/doc/source/elements/pypi/post-install.d/00-unconfigure-pypi-mirror 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pypi/post-install.d/00-unconfigure-pypi-mirror 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [ -e ~/.pip/pip.conf.orig ]; then - mv ~/.pip/pip.conf{.orig,} -else - rm ~/.pip/pip.conf -fi - - -if [ -e ~/.pydistutils.cfg.orig ]; then - mv ~/.pydistutils.cfg{.orig,} -else - rm ~/.pydistutils.cfg -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pypi/pre-install.d/00-configure-pypi-mirror python-diskimage-builder-2.17.0/doc/source/elements/pypi/pre-install.d/00-configure-pypi-mirror --- python-diskimage-builder-2.11.0/doc/source/elements/pypi/pre-install.d/00-configure-pypi-mirror 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pypi/pre-install.d/00-configure-pypi-mirror 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -#!/usr/bin/env python -# -# 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. - -from __future__ import print_function - -import os.path - - -def main(): - home = os.path.expanduser("~") - backup_configs(home) - indices = [] - if (os.environ.get('DIB_PYPI_MIRROR_URL') or - os.environ.get('PYPI_MIRROR_URL')): - candidates = [k for k in os.environ if - k.startswith('DIB_PYPI_MIRROR_URL')] - back_compat = [k for k in os.environ if - k.startswith('PYPI_MIRROR_URL')] - if len(back_compat) > 0: - print('DEPRECATION WARNING: Please use DIB_PYPI_MIRROR_URL* rather' - ' than PYPI_MIRROR_URL*') - candidates += back_compat - indices = list(map(os.environ.get, sorted(candidates))) - else: - indices = ['file:///tmp/pypi'] - print('WARNING: You are using the pypi element but no pypi mirror is ' - 'defined via the PYPI_MIRROR_URL env variable') - easy_index = indices[-1] - use_pypi_python_org = True - if os.environ.get('DIB_OFFLINE'): - use_pypi_python_org = False - if os.environ.get('DIB_NO_PYPI_PIP'): - use_pypi_python_org = False - if use_pypi_python_org: - indices.append('https://pypi.python.org/simple') - retries = os.environ.get('DIB_PIP_RETRIES') - with open(home + '/.pip/pip.conf', 'wt') as output: - output.write('[global]\n') - output.write('log = %s/pip.log\n' % (home,)) - output.write('index-url = %s\n' % (indices[0],)) - if retries is not None: - output.write('retries = %s\n' % retries) - for index in indices[1:]: - output.write('extra-index-url = %s\n' % (index,)) - with open(home + '/.pydistutils.cfg', 'wt') as output: - output.write('[easy_install]\n') - output.write('index_url = %s\n' % (easy_index,)) - - -def backup_configs(home): - pip_dir = home + '/.pip' - if not os.path.exists(pip_dir): - os.mkdir(pip_dir) - if os.path.exists(pip_dir + '/pip.conf'): - os.rename(pip_dir + '/pip.conf', pip_dir + '/pip.conf.orig') - if os.path.exists(home + '/.pydistutils.cfg'): - os.rename(home + '/.pydistutils.cfg', home + '/.pydistutils.cfg.orig') - - -if __name__ == '__main__': - main() diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/pypi/README.rst python-diskimage-builder-2.17.0/doc/source/elements/pypi/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/pypi/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/pypi/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -==== -pypi -==== -Inject a PyPI mirror -==================== - -Use a custom PyPI mirror to build images. The default is to bind mount one from -~/.cache/image-create/pypi/mirror into the build environment as mirror URL -file:///tmp/pypi. The element temporarily overwrites /root/.pip.conf -and .pydistutils.cfg to use it. - -When online, the official pypi.python.org pypi index is supplied as an -extra-url, so uncached dependencies will still be available. When offline, only -the mirror is used - be warned that a stale mirror will cause build failures. -To disable the pypi.python.org index without using --offline (e.g. when working -behind a corporate firewall that prohibits pypi.python.org) set -DIB\_NO\_PYPI\_PIP to any non-empty value. - -To use an arbitrary mirror set DIB\_PYPI\_MIRROR\_URL=http[s]://somevalue/ - -Additional mirrors can be added by exporting DIB\_PYPI\_MIRROR\_URL\_1=... etc. -Only the one mirror can be used by easy-install, but since wheels need to be in -the first mirror to be used, the last listed mirror is used as the pydistutils -index. NB: The sort order for these variables is a simple string sort - if you -have more than 9 additional mirrors, some care will be needed. - -You can also set the number of retries that occur on failure by setting the -DIB\_PIP\_RETRIES environment variable. If setting fallback pip mirrors you -typically want to set this to 0 to prevent the need to fail multiple times -before falling back. - -A typical use of this element is thus: -export DIB\_PYPI\_MIRROR\_URL=http://site/pypi/Ubuntu-13.10 -export DIB\_PYPI\_MIRROR\_URL\_1=http://site/pypi/ -export DIB\_PYPI\_MIRROR\_URL\_2=file:///tmp/pypi -export DIB\_PIP\_RETRIES=0 - -[devpi-server](https://git.openstack.org/cgit/openstack-infra/pypi-mirro://pypi.python.org/pypi/devpi-server) -can be useful in making a partial PyPI mirror suitable for building images. For -instance: - - * pip install -U devpi - - * devpi-server quickstart - - * devpi use http://machinename:3141 - -* Re-export your variables to point at the new mirror: - - export DIB\_PYPI\_MIRROR\_URL=http://machinename:3141/ - unset DIB\_PYPI\__MIRROR\_URL\_1 - unset DIB\_PYPI\__MIRROR\_URL\_2 - -The next time packages are installed, they'll be cached on the local devpi -server; subsequent runs pointed at the same mirror will use the local cache if -the upstream can't be contacted. - -Note that this process only has the server running temporarily; see -[Quickstart: Permanent install on -server/laptop](http://doc.devpi.net/latest/quickstart-server.html) guide from -the devpi developers for more information on a more permanent setup. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/python-brickclient/element-deps python-diskimage-builder-2.17.0/doc/source/elements/python-brickclient/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/python-brickclient/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/python-brickclient/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -package-installs -pip-and-virtualenv diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/python-brickclient/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/python-brickclient/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/python-brickclient/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/python-brickclient/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -libssl-dev: -libffi-dev: -python-dev: - installtype: source - dib_python_version: 2 -python3-dev: - installtype: source - dib_python_version: 3 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/python-brickclient/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/python-brickclient/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/python-brickclient/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/python-brickclient/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -{ - "family": { - "redhat": { - "python2-dev": "python2-devel", - "python3-dev": "python3-devel", - "libssl-dev": "openssl-devel", - "libffi-dev": "libffi-devel" - } - }, - "default": { - "python2-dev": "python2-dev", - "python3-dev": "python3-dev", - "libssl-dev": "libssl-dev", - "libffi-dev": "libffi-dev" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/python-brickclient/post-install.d/55-brick-client-install python-diskimage-builder-2.17.0/doc/source/elements/python-brickclient/post-install.d/55-brick-client-install --- python-diskimage-builder-2.11.0/doc/source/elements/python-brickclient/post-install.d/55-brick-client-install 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/python-brickclient/post-install.d/55-brick-client-install 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -#!/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 -Nru python-diskimage-builder-2.11.0/doc/source/elements/python-brickclient/README.rst python-diskimage-builder-2.17.0/doc/source/elements/python-brickclient/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/python-brickclient/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/python-brickclient/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -python-brickclient -================== - -* This element is aimed for providing cinder local attach/detach - functionality. - -* Currently the feature has a dependency on a known bug - ``__, 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 for - ``/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. - -.. code-block:: bash - - #!/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: - -.. code-block:: bash - - /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 -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/binary-deps.d/ramdisk python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/binary-deps.d/ramdisk --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/binary-deps.d/ramdisk 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/binary-deps.d/ramdisk 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -dhclient -ip -busybox diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/element-deps python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -deploy-tgtadm -pkg-map -ramdisk-base diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/init.d/10-start-base-system python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/init.d/10-start-base-system --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/init.d/10-start-base-system 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/init.d/10-start-base-system 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -mkdir -p /proc /sys /dev /boot /etc /mnt /lib/modules - -mount -t proc proc /proc - -mount -t sysfs none /sys - -UDEVD= -if [ -x "/bin/systemd-udevd" ]; then - UDEVD="systemd-udevd" -else - UDEVD="udevd" -fi - -# udev versions 176 and newer require a different on-disk setup -UDEVD_VERSION=$(udevadm --version) - -if [ "$UDEVD_VERSION" != "" -a $UDEVD_VERSION -gt 175 ]; then - echo "Using new-style udevd setup" - mount -t devtmpfs none /dev - mkdir -p /run - mount -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run - mkdir -p /run/{lock,udev} -else - echo "Using old-style udevd setup" - mount -t tmpfs none /dev - ln -sf /proc/self/fd /dev/fd - mknod /dev/null c 1 3 - mknod /dev/zero c 1 5 - mknod /dev/random c 1 8 - mknod /dev/urandom c 1 9 - mknod /dev/tty0 c 4 0 - mknod /dev/tty1 c 4 1 - mknod /dev/tty2 c 4 2 - mknod /dev/tty3 c 4 3 - mknod /dev/tty4 c 4 4 - mknod /dev/tty5 c 4 5 - mknod /dev/tty6 c 4 6 - mknod /dev/tty7 c 4 7 - mknod /dev/tty8 c 4 8 - mknod /dev/tty9 c 4 9 - mknod /dev/tty c 5 0 - mknod -m 0600 /dev/console c 5 1 - mknod -m 0666 /dev/ptmx c 5 2 - mkdir -p /dev/.udev/data -fi - -echo "starting syslogd" - -echo '*.* /initlog' > /etc/syslog.conf -syslogd -klogd - -echo "starting udevd" -$UDEVD --daemon --resolve-names=never - -echo "load modules" -load_modules_by_udev diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/init.d/30-start-network python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/init.d/30-start-network --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/init.d/30-start-network 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/init.d/30-start-network 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -echo "starting network $BOOT_MAC_ADDRESS" -t=0 -while ! BOOT_INTERFACE=$(find_interface "$BOOT_MAC_ADDRESS"); do - t=`expr "$t" + 5` - if [ "$t" -gt 10 ]; then - break - fi - sleep 5 -done -if [ -z "$BOOT_INTERFACE" ]; then - err_msg "Could not find an interface that owns MAC: $BOOT_MAC_ADDRESS" - troubleshoot -fi - -readonly BOOT_INTERFACE - -ifconfig lo 127.0.0.1 up -rv=0 -ifconfig "$BOOT_INTERFACE" up || rv=1 -if [ $rv -ne 0 ]; then - sleep 10 - rv=0 - ifconfig "$BOOT_INTERFACE" up || rv=1 - if [ $? -ne 0 ]; then - err_msg "Failed to ifconfig up $BOOT_INTERFACE" - troubleshoot - fi -fi - -# Check if boot IP address was specific or retrieve from DHCP -if [ -n "$BOOT_IP_ADDRESS" ]; then - ifconfig "$BOOT_INTERFACE" "$BOOT_IP_ADDRESS" netmask "$BOOT_NETMASK" - route del default || true - route add default gw $BOOT_GATEWAY -else - dhclient -1 "$BOOT_INTERFACE" - if [[ $? == 2 ]]; then - echo "Error getting IP address for $BOOT_INTERFACE with MAC \ - $BOOT_MAC_ADDRESS" - troubleshoot - fi - - BOOT_IP_ADDRESS=$(ifconfig "$BOOT_INTERFACE" | grep 'inet addr:' | \ - cut -d: -f2 | awk '{ print $1}') - BOOT_NETMASK=$(ifconfig "$BOOT_INTERFACE" | grep 'Mask:' | cut -d':' -f4) - BOOT_GATEWAY=$(route -n | grep "$BOOT_INTERFACE" | grep '^0.0.0.0' | \ - awk '{print $2}') - echo "obtained the following from dhcp: " - echo " ip address = $BOOT_IP_ADDRESS" - echo " netmask = $BOOT_NETMASK" - echo " gateway = $BOOT_GATEWAY" -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/install.d/20-install-dhcp-client python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/install.d/20-install-dhcp-client --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/install.d/20-install-dhcp-client 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/install.d/20-install-dhcp-client 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -DHCP_CLIENT=$(pkg-map --element ramdisk dhcp_client) -install-packages $DHCP_CLIENT diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/install.d/52-ramdisk-install-busybox python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/install.d/52-ramdisk-install-busybox --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/install.d/52-ramdisk-install-busybox 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/install.d/52-ramdisk-install-busybox 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -install-packages busybox diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -{ - "family":{ - "debian":{ - "dhcp_client":"isc-dhcp-client" - }, - "suse":{ - "dhcp_client":"dhcp-client" - } - }, - "default":{ - "dhcp_client":"dhclient" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/post-install.d/99-build-ramdisk python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/post-install.d/99-build-ramdisk --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/post-install.d/99-build-ramdisk 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/post-install.d/99-build-ramdisk 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -_LIB="/tmp/ramdisk-build" - -source $_LIB/common-defaults -source $_LIB/img-defaults -source $_LIB/ramdisk-defaults - -source $_LIB/common-functions -source $_LIB/img-functions -source $_LIB/ramdisk-functions - -KERNEL_VERSION=${DIB_KERNEL_VERSION:-$(find_kernel_version)} - -MODULE_DIR=$MODULE_ROOT/lib/modules/$KERNEL_VERSION -if [ -f /dib-signed-kernel-version ] ; then - . /dib-signed-kernel-version -fi -if [ -n "${DIB_SIGNED_KERNEL_VERSION:-}" ]; then - # Though kernel name is suffixed with efi.signed, modules directory is - # without that suffix - MOD_KERNEL_NAME=`echo "$DIB_SIGNED_KERNEL_VERSION" |sed "s/\.efi\.signed//g"` - MODULE_DIR=$MODULE_ROOT/lib/modules/$MOD_KERNEL_NAME -fi - -FIRMWARE_DIR=$MODULE_ROOT/lib/firmware -LIB_UDEV=$LIB_UDEV_ROOT/lib/udev -INIT="$_LIB/scripts/init" -FUNCTIONS_D="$_LIB/scripts/d" -BUSYBOX=${BUSYBOX:-$(type -p busybox)} -# NOTE(bnemec): IMAGE_ELEMENT is normally set in disk-image-create, but we're -# not using that to build the image here. -IMAGE_ELEMENT= - -mk_build_dir -mkdir -p $TMP_BUILD_DIR/mnt -export TMP_HOOKS_PATH=/tmp -export TMP_MOUNT_PATH=$TMP_BUILD_DIR/mnt - -echo "building ramdisk in $TMP_MOUNT_PATH" - -create_ramdisk_base -populate_lib -populate_busybox -populate_init -populate_udev -SCRIPT_HOME=/tmp/in_target.d/bin TMP_HOOKS_PATH=/tmp/in_target.d run_d ramdisk-install -finalise_image -save_image /tmp/ramdisk -# In the past save_image did this for us. If EXIT handler is not -# reset ramdisk image builds fail. -trap EXIT -cp /boot/vmlinu[zx]-${KERNEL_VERSION} /tmp/kernel -if [ -n "${DIB_SIGNED_KERNEL_VERSION:-}" ]; then - cp /boot/vmlinu[zx]-${DIB_SIGNED_KERNEL_VERSION} /tmp/kernel -fi - -chmod o+r /tmp/kernel - -if [ -f /dib-signed-kernel-version ] ; then - echo "Removing /dib-signed-kernel-version" - rm -f /dib-signed-kernel-version -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/README.rst python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -======= -ramdisk -======= -This is the ramdisk element. - -Almost any user building a ramdisk will want to include this in their build, -as it triggers many of the vital functionality from the basic diskimage-builder -libraries (such as init script aggregation, busybox population, etc). - -An example of when one might want to use this toolchain to build a ramdisk would -be the initial deployment of baremetal nodes in a TripleO setup. Various tools -and scripts need to be injected into a ramdisk that will fetch and apply a -machine image to local disks. That tooling/scripting customisation can be -easily applied in a repeatable and automatable way, using this element. - -NOTE: ramdisks require 1GB minimum memory on the machines they are booting. - -See the top-level README.md of the project, for more information about the -mechanisms available to a ramdisk element. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/cleanup.d/99-extract-ramdisk-files python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/cleanup.d/99-extract-ramdisk-files --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/cleanup.d/99-extract-ramdisk-files 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/cleanup.d/99-extract-ramdisk-files 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -IMAGE_NAME=${IMAGE_NAME:-'image'} - -sudo chmod a+r $TMP_MOUNT_PATH/tmp/ramdisk $TMP_MOUNT_PATH/tmp/kernel -cp $TMP_MOUNT_PATH/tmp/ramdisk $IMAGE_NAME.initramfs -cp $TMP_MOUNT_PATH/tmp/kernel $IMAGE_NAME.kernel diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/extra-data.d/01-inject-ramdisk-build-files python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/extra-data.d/01-inject-ramdisk-build-files --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/extra-data.d/01-inject-ramdisk-build-files 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/extra-data.d/01-inject-ramdisk-build-files 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -export RAMDISK_BUILD_PATH="$TMP_MOUNT_PATH/tmp/ramdisk-build" -mkdir -p $RAMDISK_BUILD_PATH - -for file in common-defaults common-functions ramdisk-defaults ramdisk-functions img-defaults img-functions ; do - cp $_LIB/$file $RAMDISK_BUILD_PATH -done - -cp -r $(dirname $0)/scripts $RAMDISK_BUILD_PATH - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/extra-data.d/scripts/d/init-func python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/extra-data.d/scripts/d/init-func --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/extra-data.d/scripts/d/init-func 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/extra-data.d/scripts/d/init-func 1970-01-01 00:00:00.000000000 +0000 @@ -1,318 +0,0 @@ -# Copyright (c) 2012 NTT DOCOMO, INC. -# Copyright 2012 Hewlett-Packard Development 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. - -source /iscsi-func - -function configure_vmedia_dir() { - VMEDIA_MOUNT_POINT="/vfloppy_mnt" - VMEDIA_DIR="/vfloppy" - VMEDIA_CONFIG_FILE="parameters.txt" - VMEDIA_DEVICE_BY_LABEL="/dev/disk/by-label/ir-vfd-dev" - - # Wait for some seconds for kernel to finish initializing the - # virtual media devices. - wait_for 5 1 "ls $VMEDIA_DEVICE_BY_LABEL" - if [[ $? != 0 ]]; then - - # TODO(rameshg87) - 04/29/15 : This block of code is there only - # for backward compatibility to older versions of Ironic. Remove this - # after 2 releases. Ironic will now assign labels to Virtual Media - # devices. - SYSFS_DEVICE_MODELS="/sys/class/block/*/device/model" - SYSFS_VMEDIA_DEVICE_MODEL="virtual media" - - grep -q -i "$SYSFS_VMEDIA_DEVICE_MODEL" $SYSFS_DEVICE_MODELS - if [[ $? != 0 ]]; then - echo "Error finding the virtual floppy device on the node." - troubleshoot - fi - - # Find the virtual media device from the kernel sysfs file system. - VMEDIA_DEVICE=$(grep -l -i "$SYSFS_VMEDIA_DEVICE_MODEL" $SYSFS_DEVICE_MODELS | awk -F'/' '{print $5}') - if [[ -z $VMEDIA_DEVICE ]]; then - echo "Error finding the virtual floppy device on the node." - troubleshoot - fi - VMEDIA_DEVICE_FILE="/dev/$VMEDIA_DEVICE" - else - VMEDIA_DEVICE_FILE="$VMEDIA_DEVICE_BY_LABEL" - fi - - # Mount the virtual media device - mkdir -p $VMEDIA_MOUNT_POINT - mount $VMEDIA_DEVICE_FILE $VMEDIA_MOUNT_POINT - if [[ $? != 0 ]]; then - echo "Error mounting virtual media device $VMEDIA_DEVICE_FILE" - troubleshoot - fi - - # Copy the contents of the virtual media to a directory in root - # filesystem so that we can unmount virtual media soon. - cp -rf $VMEDIA_MOUNT_POINT $VMEDIA_DIR - umount $VMEDIA_MOUNT_POINT -} - -function get_kernel_parameter() { - if [ "$BOOT_METHOD" = "$VMEDIA_BOOT_TAG" ]; then - echo $(find_parameter_from_file $1 "$VMEDIA_DIR/$VMEDIA_CONFIG_FILE") - else - echo $(find_parameter_from_file $1 "/proc/cmdline") - fi -} - -function find_parameter_from_file() { - - local paramname=$1 - local filename=$2 - - for i in `cat $filename`; do - case "$i" in - ${paramname}=*) - echo "${i#${paramname}=}" - return 0 - ;; - ${paramname}) - echo "" - return 0 - ;; - *) - ;; - esac - done - - echo "" - return 1 -} - -function string_contains() { - local string=$1 - local word=$2 - if [ "$string" != "${string/$word/}" ]; then - return 0 - else - return 1 - fi -} - -function load_modules_by_udev() { - udevadm trigger --action=add - udevadm settle -} - -function strip_dev() { - echo "$1" | sed -e 's:^/dev/::' -} - -function prepend_dev() { - case "$1" in - /dev/*) - echo "$1" - ;; - *) - echo "/dev/$1" - ;; - esac -} - -function whole_disk_name() { - local dev=`prepend_dev "$1"` - case "$dev" in - /dev/sd*|/dev/hd*|/dev/vd*|/dev/xvd*) - echo "$dev" | sed -e 's/[0-9]*$//' - ;; - /dev/cciss/*) - echo "$dev" | sed -e 's/p[0-9]*$//' - ;; - *) - echo "" - return 1 - ;; - esac -} - -function partition_name() { - local dev=`prepend_dev "$1"` - local part=$2 - case "$dev" in - /dev/sd*|/dev/hd*|/dev/vd*|/dev/xvd*) - echo "${dev}${part}" - ;; - /dev/cciss/*) - echo "${dev}p${part}" - ;; - *) - echo "" - return 1 - ;; - esac -} - -function find_interface() { - local mac=$1 - local interface - interface=$(ip link show | grep -B1 -i $mac | awk '/mtu/ { print $2 }') - if [ -n "$interface" ]; then - echo "${interface%:}" - return 0 - else - # Note(moshele): try to find the InfinBand interface by - # matching the InfinBand MAC upper and lower - # 3 octets to the GUID lower and upper 3 octets. - local upper_octs=${mac:0:8} - local lower_octs=${mac:9:16} - ib_re="${upper_octs}:[A-F0-9][A-F0-9]:[A-F0-9][A-F0-9]:${lower_octs}" - interface=$(ip link show | grep -B1 -i ${ib_re} | grep mtu | \ - awk {'print $2'}) - if [ -n "$interface" ]; then - echo "${interface%:}" - return 0 - fi - return 1 - fi -} - -function set_mac() { - local dev=$1 - local mac=$2 - ip link set "$dev" address "$mac" -} - -function swap_ifname() { - local dev=$1 - local dev2=$2 - if [ "$dev" = "$dev2" ]; then - return - fi - if ip link show "$dev2" >/dev/null; then - # dev2 exists - # swap device name - ip link set "$dev" name "_$dev" - ip link set "$dev2" name "$dev" - ip link set "_$dev" name "$dev2" - else - ip link set "$dev" name "$dev2" - fi -} - -function partition_exists() { - local dev=$1 - dev=`strip_dev "$dev"` - if tail -n +3 /proc/partitions | grep "$dev" >/dev/null; then - return 0 - else - return 1 - fi -} - -function find_disk() { - local disks=$1 - local dev - - # find device - local OLD_IFS=$IFS - IFS=, - for i in $disks; do - dev=`whole_disk_name "$i"` - if partition_exists "$dev"; then - dev=`prepend_dev "$dev"` - break - fi - dev="" - done - IFS=$OLD_IFS - - if [ -z "$dev" ]; then - return 1 - fi - echo "$dev" - return 0 -} - -function check_tgtd_socket() { - echo -n "waiting for tgtd socket..." - if [ -e /var/run/tgtd.ipc_abstract_namespace.0 ]; then - echo "found" - return 0 - else - echo "not found" - return 1 - fi -} - -wait_for(){ - LOOPS=$1 - SLEEPTIME=$2 - shift ; shift - i=0 - while [ $i -lt $LOOPS ] ; do - i=$((i + 1)) - eval "$@" && return 0 || true - sleep $SLEEPTIME - done - return 1 -} - -function troubleshoot() { - if [ "$TROUBLESHOOT" != 1 ]; then - _DO_TROUBLESHOOT="" - _t=0 - echo -n "Troubleshooting required, press t to launch shell." - while [ $_t -lt 10 ]; do - read -n 1 -t 1 _DO_TROUBLESHOOT - _t=$(($_t + 1)) - if [ "$_DO_TROUBLESHOOT" == "t" ]; then - export TROUBLESHOOT=1 - break - fi - echo -n "." - done - echo "" - fi - if [ "$TROUBLESHOOT" == 1 ]; then - echo "Starting troubleshooting shell." - bash - fi -} - -function safe_url_encode() { - local str=$1 - local out="" - - for (( i=0; i<${#str}; i++ )); do - c=${str:$i:1} - case $c in - [a-zA-Z0-9.-_] ) - out+="$c" - ;; - ' ' ) - out+="+" - ;; - *) - #skip it - ;; - esac - done - echo "$out" - -} - -function err_msg() { - message=$1 - if [ -z "$FIRST_ERR_MSG" ]; then - FIRST_ERR_MSG=$(safe_url_encode "$message") - fi - echo "$message" -} - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/extra-data.d/scripts/init python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/extra-data.d/scripts/init --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/extra-data.d/scripts/init 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/extra-data.d/scripts/init 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2012 NTT DOCOMO, INC. -# Copyright 2012 Hewlett-Packard Development 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. - -# NOTE(bnemec): We don't want this script to exit on failures because if init -# dies then we get a kernel panic on ramdisk boot. -# dib-lint: disable=sete setu setpipefail dibdebugtrace - -echo "init" - -source /init-func - -PATH=/sbin:/bin:/usr/bin:/usr/sbin -export PATH diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/extra-data.d/scripts/init-end python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/extra-data.d/scripts/init-end --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/extra-data.d/scripts/init-end 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/extra-data.d/scripts/init-end 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ - - -# Final init steps -echo "rebooting" -reboot -f - -echo "failed to reboot" -echo "Starting troubleshooting shell." -bash - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/init.d/20-init-variables python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/init.d/20-init-variables --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/init.d/20-init-variables 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/init.d/20-init-variables 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -FIRST_ERR_MSG= - -# To identify that the node has booted from virtual media, a kernel -# command-line argument boot_method=vmedia is added in the iso bootloader -# configuration file (like isolinux.cfg for isolinux). -VMEDIA_BOOT_TAG="vmedia" -BOOT_METHOD=$(get_kernel_parameter boot_method) - -if [ "$BOOT_METHOD" = "$VMEDIA_BOOT_TAG" ]; then - - # If the node booted from virtual media cdrom, the arguments for the - # installation are provided in virtual media floppy. Find out - # the virtual media device, mount it and get the information. - configure_vmedia_dir -fi - -readonly _BOOTIF_=$(get_kernel_parameter BOOTIF) -readonly _IP_=$(get_kernel_parameter ip) - -# _BOOTIF_ is the hardware type with the MAC address -# see http://www.syslinux.org/wiki/index.php/PXELINUX -if [[ $_BOOTIF_ =~ ^20.* && ${#_BOOTIF_} == 20 ]]; then - # InfiniBand hardware type is 20 with InfiniBand MAC - # For example InfiniBand GID: - # 80:00:02:08:fe:80:00:00:00:00:00:00:f4:52:14:03:00:3a:16:b1 - # is converted to BOOTIF 20:f4:52:14:3a:16:b1 - MAC_ADDRESS=$(echo "$_BOOTIF_" | sed -e "s/-/:/g" | \ - sed -e "s/^20://g" | tr 'a-f' 'A-F') -else - # Ethernet BOOTIF hardware type is 01 with MAC - MAC_ADDRESS=$(echo "$_BOOTIF_" | sed -e "s/-/:/g" | \ - sed -e "s/^01://g" | tr 'a-f' 'A-F') -fi - -readonly BOOT_MAC_ADDRESS=$MAC_ADDRESS - -# If bootloader did not pass on network info, we fallback to a kernel -# parameter to locate the address of the boot server. -if [ -n "$_IP_" ]; then - readonly BOOT_SERVER=$(echo "$_IP_" | cut -d':' -f2) -else - readonly BOOT_SERVER=$(get_kernel_parameter boot_server) -fi - -# IP address, netmask, gateway can be set a later point of time if -# IP address is assigned by dhcp (for non-pxe boots). -BOOT_IP_ADDRESS=$(echo "$_IP_" | cut -d':' -f1) -BOOT_NETMASK=$(echo "$_IP_" | cut -d':' -f4) -BOOT_GATEWAY=$(echo "$_IP_" | cut -d':' -f3) - -readonly DISK=$(get_kernel_parameter disk) - -readonly DEPLOYMENT_ID=$(get_kernel_parameter deployment_id) -readonly DEPLOYMENT_KEY=$(get_kernel_parameter deployment_key) -readonly ISCSI_TARGET_IQN=$(get_kernel_parameter iscsi_target_iqn) -TROUBLESHOOT=$(get_kernel_parameter troubleshoot) diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/init.d/40-check-network-ready python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/init.d/40-check-network-ready --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/init.d/40-check-network-ready 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/init.d/40-check-network-ready 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -if [ -n "$BOOT_SERVER" ]; then - echo "pinging to boot server $BOOT_SERVER" - wait_for 6 5 ping -c 5 -q "$BOOT_SERVER" > /dev/null -fi - -echo "network ready" \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/post-install.d/01-ensure-binaries python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/post-install.d/01-ensure-binaries --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/post-install.d/01-ensure-binaries 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/post-install.d/01-ensure-binaries 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -#!/bin/bash -# Ensure that all binaries listed in ramdisk elements, exist - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -export TARGET_DIR="/tmp/in_target.d/" - -if [ -z $TARGET_DIR ] ; then - echo "Target dir not specified" - exit 1 -fi - -if [ ! -d $TARGET_DIR ] ; then - echo "Unable to find specified directory in target: $TARGET_DIR" - bash - exit 1 -fi - -BINARY_DEPS= - -for _FILE in $(ls ${TARGET_DIR}/binary-deps.d/) ; do - _FILE="${TARGET_DIR}/binary-deps.d/${_FILE}" - if [ -a $_FILE ]; then - for _LINE in $(cat $_FILE) ; do - BINARY_DEPS="${BINARY_DEPS} $_LINE" - done - fi -done - -for _BIN in $BINARY_DEPS ; do - _LOCATION=$(type -p "$_BIN" || echo "") - if [ -z "$_LOCATION" ]; then - echo "$_BIN is not found in PATH. Please ensure your elements install it" - exit 1 - fi -done - -if [ "$BINARY_DEPS" == "" ]; then - echo "No binary-deps found" -else - DEPS_OUTPUT="/etc/dib_binary_deps" - echo "Creating binary_deps record at: ${DEPS_OUTPUT}" - echo "$BINARY_DEPS" >${DEPS_OUTPUT} -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/README.rst python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -============ -ramdisk-base -============ -Shared functionality required by all of the different ramdisk elements. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/udev.d/60-persistent-storage.rules python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/udev.d/60-persistent-storage.rules --- python-diskimage-builder-2.11.0/doc/source/elements/ramdisk-base/udev.d/60-persistent-storage.rules 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ramdisk-base/udev.d/60-persistent-storage.rules 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -# do not edit this file, it will be overwritten on update - -# persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} -# scheme based on "Linux persistent device names", 2004, Hannes Reinecke - -# forward scsi device event to corresponding block device -ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" - -ACTION=="remove", GOTO="persistent_storage_end" - -# enable in-kernel media-presence polling -ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_poll_msecs}=="0", ATTR{parameters/events_dfl_poll_msecs}="2000" -ACTION=="add", ATTR{removable}=="1", ATTR{events_poll_msecs}=="-1", ATTR{events_poll_msecs}="2000" - -SUBSYSTEM!="block", GOTO="persistent_storage_end" - -# skip rules for inappropriate block devices -KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|dm-*|md*", GOTO="persistent_storage_end" - -# ignore partitions that span the entire disk -TEST=="whole_disk", GOTO="persistent_storage_end" - -# for partitions import parent information -ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*" - -# virtio-blk -KERNEL=="vd*[!0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}" -KERNEL=="vd*[0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}-part%n" - -# ATA devices using the "scsi" subsystem -KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", IMPORT{program}="ata_id --export $devnode" -# ATA/ATAPI devices (SPC-3 or later) using the "scsi" subsystem -KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{type}=="5", ATTRS{scsi_level}=="[6-9]*", IMPORT{program}="ata_id --export $devnode" - -# Run ata_id on non-removable USB Mass Storage (SATA/PATA disks in enclosures) -KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", ATTR{removable}=="0", SUBSYSTEMS=="usb", IMPORT{program}="ata_id --export $devnode" -# Otherwise fall back to using usb_id for USB devices -KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id" - -# scsi devices -KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $devnode", ENV{ID_BUS}="scsi" -KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $devnode", ENV{ID_BUS}="cciss" -KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" - -# firewire -KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}" -KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n" - -KERNEL=="mmcblk[0-9]", SUBSYSTEMS=="mmc", ATTRS{name}=="?*", ATTRS{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}" -KERNEL=="mmcblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n" -KERNEL=="mmcblk[0-9]p[0-9]", ENV{PARTNAME}=="?*", SYMLINK+="disk/by-partlabel/$env{PARTNAME}" -KERNEL=="mspblk[0-9]", SUBSYSTEMS=="memstick", ATTRS{name}=="?*", ATTRS{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}" -KERNEL=="mspblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}-part%n" - -# by-path (parent device path) -ENV{DEVTYPE}=="disk", DEVPATH!="*/virtual/*", IMPORT{builtin}="path_id" -ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" -ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" - -# skip unpartitioned removable media devices from drivers which do not send "change" events -ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" - -# probe filesystem metadata of optical drives which have a media inserted -KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", \ - IMPORT{builtin}="blkid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}" -# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET -KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \ - IMPORT{builtin}="blkid --noraid" - -# probe filesystem metadata of disks -KERNEL!="sr*", IMPORT{builtin}="blkid" - -# watch metadata changes by tools closing the device after writing -KERNEL!="sr*", OPTIONS+="watch" - -# by-label/by-uuid links (filesystem metadata) -ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" -ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" - -# by-id (World Wide Name) -ENV{DEVTYPE}=="disk", ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN_WITH_EXTENSION}" -ENV{DEVTYPE}=="partition", ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN_WITH_EXTENSION}-part%n" - -# by-partlabel/by-partuuid links (partition metadata) -ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}" -ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="disk/by-partlabel/$env{ID_PART_ENTRY_NAME}" - -LABEL="persistent_storage_end" diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/element-deps python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -source-repositories diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/install.d/05-xen-tools python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/install.d/05-xen-tools --- python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/install.d/05-xen-tools 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/install.d/05-xen-tools 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#!/bin/bash -# Copyright (c) 2014 Hewlett-Packard Development 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:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -XS_TOOLS_DIR=$(mktemp -d) -mount -o loop /tmp/xs-tools.iso $XS_TOOLS_DIR -pushd $XS_TOOLS_DIR/Linux -case "$DISTRO_NAME" in - 'ubuntu'|'debian') - # Seriously - source versions.deb - dpkg -i $XE_GUEST_UTILITIES_PKG_FILE_amd64 - ;; - 'fedora'|'centos'|'centos7'|'opensuse') - source versions.rpm - rpm -Uvh $XE_GUEST_UTILITIES_PKG_FILE_x86_64 - ;; -esac - -popd -umount $XS_TOOLS_DIR diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/install.d/10-nova-agent python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/install.d/10-nova-agent --- python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/install.d/10-nova-agent 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/install.d/10-nova-agent 1970-01-01 00:00:00.000000000 +0000 @@ -1,138 +0,0 @@ -#!/bin/bash -# Copyright (c) 2014 Hewlett-Packard Development 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:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -cd /tmp/nova-agent -./installer.sh - -cat > /etc/cloud/cloud.cfg.d/80_restart_network.cfg <<'EOF' -# Restart networking if it's got no IP. This is to catch if we're on RAX -# and the baked in dhcp config didn't work, but is now probably reconfigured -# by nova-agent -runcmd: - - ip addr show eth0 | grep inet || ( ifdown -a ; ifup -a ) -EOF - -case "$DISTRO_NAME" in - 'ubuntu'|'debian') - - # cloud-init / nova-agent sad panda hacks - cat > /etc/init/nova-agent.conf <<'EOF' -# nova-agent - start before cloud-init and hup network interfaces -start on starting cloud-init-local - -task - -console output - -script - /etc/init.d/nova-agent start - sleep 13 - ifdown -a - ifup -a -end script -EOF - - cat > /etc/init/xe-linux-distribution.conf <<'EOF' -# xe-linux-distribution - start the xentools before nova-agent runs -start on starting nova-agent - -task - -console output - -script - /etc/init.d/xe-linux-distribution start - sleep 2 -end script -EOF - - # stop nova-agent from starting twice since we start it from upstart now - update-rc.d -f nova-agent remove - update-rc.d -f xe-linux-distribution remove - - # console fix for PV Ubuntus - cat > /etc/init/hvc0.conf <<'EOF' - -# hvc0 - getty -# -# This service maintains a getty on hvc0 from the point the system is -# started until it is shut down again. - -start on stopped rc RUNLEVEL=[2345] -stop on runlevel [!2345] - -respawn -exec /sbin/getty -L 115200 hvc0 vt102 -EOF - ;; - 'fedora'|'centos'|'centos7'|'opensuse') - - cat > /usr/local/bin/run-nova-agent.sh <<'EOF' -#!/bin/bash -/etc/init.d/nova-agent start -sleep 13 -ifdown -a -ifup -a -EOF - chmod 0755 /usr/local/bin/run-nova-agent.sh - - cat > /usr/local/bin/run-xe-linux-distribution.sh <<'EOF' -#!/bin/bash -/etc/init.d/xe-linux-distribution start -sleep 2 -EOF - chmod 0755 /usr/local/bin/run-xe-linux-distribution.sh - - cat > /etc/systemd/system/nova-agent.service < /etc/systemd/system/xe-linux-distribution.service <<'EOF' -[Unit] -Description=xentools agent -Before=nova-agent -Wants=nova-agent - -[Service] -ExecStart=/usr/local/bin/run-xe-linux-distribution.sh - -[Install] -WantedBy=multi-user.target -EOF - # stop nova-agent from starting twice since we start it from systemd now - chkconfig nova-agent off - chkconfig xe-linux-distribution off - - systemctl enable nova-agent - systemctl enable xe-linux-distribution - ;; -esac diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -cloud-init: - phase: pre-install.d diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/README.rst python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -============== -rax-nova-agent -============== -Images for Rackspace Cloud currently require nova-agent to get networking -information. - -Many of the things here are adapted from: - -https://developer.rackspace.com/blog/bootstrap-your-qcow-images-for-the-rackspace-public-cloud/ diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/source-repository-nova-agent python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/source-repository-nova-agent --- python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/source-repository-nova-agent 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/source-repository-nova-agent 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -nova-agent tar /tmp/nova-agent https://f97f271e9fde8f434e2a-fa73b8821af96cee574a861a54d04230.ssl.cf3.rackcdn.com/files/nova-agent/nova-agent-Linux-x86_64-1.39.0.tar.gz . diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/source-repository-xen-tools python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/source-repository-xen-tools --- python-diskimage-builder-2.11.0/doc/source/elements/rax-nova-agent/source-repository-xen-tools 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rax-nova-agent/source-repository-xen-tools 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -xen-tools file /tmp/xs-tools.iso https://f97f271e9fde8f434e2a-fa73b8821af96cee574a861a54d04230.ssl.cf3.rackcdn.com/files/xentools/xs-tools-6.2.0.iso diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/bin/extract-image python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/bin/extract-image --- python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/bin/extract-image 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/bin/extract-image 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ -#!/bin/bash - -# Intended to be called from the root.d cloud-image script as follows: -# $TMP_HOOKS_PATH/bin/extract-image $BASE_IMAGE_FILE $BASE_IMAGE_TAR $IMAGE_LOCATION $CACHED_IMAGE - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -BASE_IMAGE_FILE=$1 -BASE_IMAGE_TAR=$2 -IMAGE_LOCATION=$3 -CACHED_IMAGE=$4 - -CACHED_TAR=$DIB_IMAGE_CACHE/$BASE_IMAGE_TAR -DIB_LOCAL_IMAGE=${DIB_LOCAL_IMAGE:-""} -TAR_LOCK=$CACHED_TAR.lock - -function extract_image() { - if [ -n "$DIB_OFFLINE" -a -f "$CACHED_TAR" ] ; then - echo "Not checking freshness of cached $CACHED_TAR." - else - if [ -z "$DIB_LOCAL_IMAGE" ]; then - echo "Fetching Base Image" - - # There seems to be some bad Fedora mirrors returning http 404's for the cloud image. - # If the image fails to download due to a 404 we retry once. - set +e - $TMP_HOOKS_PATH/bin/cache-url $IMAGE_LOCATION $CACHED_IMAGE - RV=$? - set -e - - if [ "$RV" == "44" ] ; then - $TMP_HOOKS_PATH/bin/cache-url $IMAGE_LOCATION $CACHED_IMAGE - elif [ "$RV" != "0" ] ; then - exit 1 - fi - fi - - if [ ! -f $CACHED_TAR -o \ - $CACHED_IMAGE -nt $CACHED_TAR ] ; then - echo "Repacking base image as tarball." - - WORKING=$(mktemp --tmpdir=${TMP_DIR:-/tmp} -d) - EACTION="rm -r $WORKING" - trap "$EACTION" EXIT - echo "Working in $WORKING" - - RAW_FILE=$(mktemp --tmpdir=$WORKING XXXXXX.raw) - - if [ "${CACHED_IMAGE: -3}" == ".xz" ] ; then - QCOW2_FILE=$(mktemp --tmpdir=$WORKING XXXXXX.qcow2) - # This leaves the old image in place so cache-url wont get it again - unxz --stdout $CACHED_IMAGE > $QCOW2_FILE - CACHED_IMAGE=$QCOW2_FILE - fi - - qemu-img convert -f qcow2 -O raw $CACHED_IMAGE $RAW_FILE - - ROOT_PARTITION=p$(sudo kpartx -l $RAW_FILE | awk "/loop[0-9]+p/"|wc -l) - sudo udevadm settle - - # kpartx fails if no /dev/loop* exists, "losetup -f" prints first unused - # loop device and creates it if it doesn't exist - sudo losetup -f - - # XXX: Parsing stdout is dangerous, would like a better way to discover - # the device used for the image. - ROOT_LOOPDEV=$(sudo kpartx -av $RAW_FILE | \ - awk "/loop[0-9]+$ROOT_PARTITION/ {print \$3}") - # If running inside Docker, make our nodes manually, because udev will not be working. - if [ -f /.dockerenv ]; then - sudo dmsetup --noudevsync mknodes - fi - if ! timeout 5 sh -c "while ! [ -e /dev/mapper/$ROOT_LOOPDEV ]; do sleep 1; done"; then - echo "Error: Could not find /dev/mapper/$ROOT_LOOPDEV" - exit 1 - fi - EACTION="sudo kpartx -d $RAW_FILE ; $EACTION" - trap "$EACTION" EXIT - mkdir $WORKING/mnt - if [ "xfs" = "$(sudo blkid -o value -s TYPE /dev/mapper/$ROOT_LOOPDEV)" ]; then - # mount xfs with nouuid, just in case that uuid is already mounted - MOUNTOPTS="-o nouuid" - else - MOUNTOPTS="" - fi - - sudo mount $MOUNTOPTS /dev/mapper/$ROOT_LOOPDEV $WORKING/mnt - EACTION="sudo umount -f $WORKING/mnt ; $EACTION" - trap "$EACTION" EXIT - - # find out if chroot tar has full xattr support - if [ 0 == `sudo chroot $WORKING/mnt bin/tar --help | grep -c xattrs-exclude` ]; then - TAROPTS="--no-xattrs" - else - TAROPTS="--xattrs --xattrs-include=* --xattrs-exclude=security.selinux" - fi - # Chroot in so that we get the correct uid/gid - sudo chroot $WORKING/mnt bin/tar $TAROPTS -cz . > $WORKING/tmp.tar - mv $WORKING/tmp.tar $CACHED_TAR - else - echo "Using cached tar from $CACHED_TAR" - fi - fi - - # Extract the base image (use --numeric-owner to avoid UID/GID mismatch between - # image tarball and host OS e.g. when building Fedora image on an openSUSE host) - # Include all xattrs except selinux because the selinux ones cause issues in our - # chroot environment, and we restore all of those at the end of the build anyway. - echo "Extracting base root image from $CACHED_TAR" - sudo tar -C $TARGET_ROOT --numeric-owner --xattrs --xattrs-include='*' --xattrs-exclude='security.selinux' -xzf $CACHED_TAR -} - -( - echo "Getting $TAR_LOCK: $(date)" - # Wait up to 20 minutes for another process to download - if ! flock -w 1200 9 ; then - echo "Did not get $TAR_LOCK: $(date)" - exit 1 - fi - extract_image -) 9> $TAR_LOCK diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/bin/map-packages python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/bin/map-packages --- python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/bin/map-packages 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/bin/map-packages 1970-01-01 00:00:00.000000000 +0000 @@ -1,117 +0,0 @@ -#!/usr/local/bin/dib-python -# dib-lint: disable=indent -# dib-lint indent requirements causes issue with pep8 - -# Copyright 2012 Hewlett-Packard Development 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. - -from __future__ import print_function -import sys - -# Manually maintained for brevity; consider making this compiled from -# distromatch or other rich data sources. -# Debian name on the left, Fedora/RHEL on the right. - -# -# !!! DO NOT ADD ANY ENTRIES TO THIS FILE !!! -# -# This global list has been deprecated by the pkg-map element. New -# package mappings should go in pkg-map files inside each element. -# -package_map = { - 'apache2': 'httpd', - 'arping': 'iputils', - 'augeas-tools': 'augeas', - 'build-essential': 'make automake gcc gcc-c++ kernel-devel', - 'default-jre': 'java', - 'extlinux': 'syslinux-extlinux', - 'gearman-job-server': 'gearmand', - 'grub-pc': 'grub2-tools grub2', - 'libaio1': 'libaio', - 'libapache2-mod-wsgi': 'mod_wsgi', - 'libc6-dev': 'glibc-devel', - 'libmariadb-dev': 'mariadb-devel', - 'libffi-dev': 'libffi-devel', - 'libldap2-dev': 'python-ldap', - 'libmysql-dev': 'mysql++-devel', - 'libmysql-java': 'mysql-connector-java', - 'libmysqlclient-dev': 'mysql-devel', - 'libpq-dev': 'libpqxx-devel', - 'libxslt-dev': 'libxslt-devel', - 'libsasl2-dev': 'cyrus-sasl-devel', - 'libsqlite3-dev': 'libsqlite3x-devel', - 'libssl-dev': 'openssl-devel', - 'libvirt-bin': 'libvirt', - 'libxml2-dev': 'libxml2-devel', - 'libz-dev': 'zlib-devel', - 'linux-headers-generic': 'kernel-headers', - 'linux-image-generic': 'kernel', - 'lm-sensors': 'lm_sensors', - 'mysql-client-5.5': 'mariadb', - 'mysql-server-5.5': 'mariadb-server', - 'nagios-plugins-basic': 'nagios-plugins-all', - 'nfs-common': 'nfs-utils', - 'nfs-kernel-server': 'nfs-utils', - 'open-iscsi': 'iscsi-initiator-utils', - 'openjdk-7-jre-headless': 'java-1.7.0-openjdk-headless', - 'openssh-client': 'openssh-clients', - 'openvswitch-common': 'openvswitch', - 'openvswitch-switch': 'openvswitch', - 'python-dev': 'python-devel', - 'python-libvirt': 'libvirt-python', - 'python-memcache': 'python-memcached', - 'python-mysqldb': 'MySQL-python', - 'python-numpy': 'numpy', - 'python-pyopenssl': 'pyOpenSSL', - 'python-xattr': 'pyxattr', - 'qemu-utils': 'qemu-img', - 'qpid-client': 'qpid-cpp-client', - 'qpidd': 'qpid-cpp-server', - 'snmp-mibs-downloader': '', - 'snmpd': 'net-snmp', - 'stunnel4': 'stunnel', - 'tftpd-hpa': 'tftp-server', - 'tgt': 'scsi-target-utils', - 'vlan': 'vconfig', - # openstack mappings - 'openstack-neutron-dhcp-agent': 'openstack-neutron', -} - -deprecated = [] -for arg in sys.argv[1:]: - if arg not in package_map and arg.endswith('-dev'): - # convert -dev into devel - converted = '%s%s' % (arg, 'el') - deprecated.append((arg, converted)) - print(converted) - else: - converted = package_map.get(arg, arg) - if converted != arg: - deprecated.append((arg, converted)) - print(converted) - -if deprecated: - print("WARNING: The following packages were re-mapped by " - "redhat-common map-packages\n" - "They should be converted to pkg-map:", file=sys.stderr) - for arg, converted in deprecated: - print(" %s -> %s" % (arg, converted), file=sys.stderr) - -sys.exit(0) - - -# Tell emacs to use python-mode -# Local variables: -# mode: python -# End: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/element-deps python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -package-installs -sysprep diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/environment.d/50-redhat-common python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/environment.d/50-redhat-common --- python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/environment.d/50-redhat-common 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/environment.d/50-redhat-common 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DIB_DISABLE_KERNEL_CLEANUP=${DIB_DISABLE_KERNEL_CLEANUP:-0} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/finalise.d/01-clean-old-kernels python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/finalise.d/01-clean-old-kernels --- python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/finalise.d/01-clean-old-kernels 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/finalise.d/01-clean-old-kernels 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [ $DIB_DISABLE_KERNEL_CLEANUP -ne 0 ]; then - echo "Skipping kernel cleanup as configured" - exit 0 -fi - -YUM=${YUM:-yum} - -if [[ ${YUM} == "dnf" ]]; then - # cribbed from - # http://dnf.readthedocs.org/en/latest/cli_vs_yum.html - _old_kernels="$(dnf repoquery --installonly --latest-limit=-1 -q)" - if [[ -n "${_old_kernels}" ]]; then - dnf remove -y ${_old_kernels} - fi -else - install-packages yum-utils - package-cleanup --oldkernels -y --count=1 -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -# Install any packages in this file that may not be in the base cloud -# image but could reasonably be expected -lsof: -tcpdump: -traceroute: -which: -gettext: - phase: pre-install.d - -# selinux-targeted policy and related tools -selinux-policy: -selinux-policy-targeted: -libselinux-python: -policycoreutils: -policycoreutils-python: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/README.rst python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/redhat-common/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/redhat-common/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -============= -redhat-common -============= -Image installation steps common to RHEL, CentOS, and Fedora. - -Requirements: - -If used to build an image form a cloud image compress with xz -(the default in centos), this element uses "unxz" to decompress -the image. Depending on your distro you may need to install either -the xz or xz-utils package. - -Environment Variables ---------------------- - -DIB_LOCAL_IMAGE - :Required: No - :Default: None - :Description: Use the local path of a qcow2 cloud image. This is useful in - that you can use a customized or previously built cloud image from - diskimage-builder as input. The cloud image does not have to have been built - by diskimage-builder. It should be a full disk image, not just a filesystem - image. - :Example: ``DIB_LOCAL_IMAGE=rhel-guest-image-7.1-20150224.0.x86_64.qcow2`` - -DIB_DISABLE_KERNEL_CLEANUP - :Required: No - :Default: 0 - :Description: Specify if kernel needs to be cleaned up or not. When set to - true, the bits that cleanup old kernels will not be executed. - :Example: DIB_DISABLE_KERNEL_CLEANUP=1 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rhel7/element-deps python-diskimage-builder-2.17.0/doc/source/elements/rhel7/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/rhel7/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rhel7/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -cache-url -redhat-common -rhel-common -rpm-distro -source-repositories -yum diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rhel7/element-provides python-diskimage-builder-2.17.0/doc/source/elements/rhel7/element-provides --- python-diskimage-builder-2.11.0/doc/source/elements/rhel7/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rhel7/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -operating-system diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rhel7/environment.d/10-rhel7-distro-name.bash python-diskimage-builder-2.17.0/doc/source/elements/rhel7/environment.d/10-rhel7-distro-name.bash --- python-diskimage-builder-2.11.0/doc/source/elements/rhel7/environment.d/10-rhel7-distro-name.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rhel7/environment.d/10-rhel7-distro-name.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DISTRO_NAME=rhel7 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rhel7/README.rst python-diskimage-builder-2.17.0/doc/source/elements/rhel7/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/rhel7/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rhel7/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -===== -rhel7 -===== -Use RHEL 7 cloud images as the baseline for built disk images. - -Because RHEL 7 base images are not publicly available, it is necessary to first -download the RHEL 7 cloud image from the Red Hat Customer Portal and pass the -path to the resulting file to disk-image-create as the ``DIB_LOCAL_IMAGE`` -environment variable. - -The cloud image can be found at (login required): -https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.1/x86_64/product-downloads - -Then before running the image build, define DIB_LOCAL_IMAGE (replace the file -name with the one downloaded, if it differs from the example): - -.. code-block:: bash - - export DIB_LOCAL_IMAGE=rhel-guest-image-7.1-20150224.0.x86_64.qcow2 - -The downloaded file will then be used as the basis for any subsequent image -builds. - -For further details about building RHEL 7 images, see the rhel-common and -redhat-common element README files. - -Environment Variables ---------------------- - -DIB_LOCAL_IMAGE - :Required: Yes - :Default: None - :Description: The RHEL 7 base image you have downloaded. See the element - description above for more details. - :Example: ``DIB_LOCAL_IMAGE=/tmp/rhel7-cloud.qcow2`` diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rhel7/root.d/10-rhel7-cloud-image python-diskimage-builder-2.17.0/doc/source/elements/rhel7/root.d/10-rhel7-cloud-image --- python-diskimage-builder-2.11.0/doc/source/elements/rhel7/root.d/10-rhel7-cloud-image 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rhel7/root.d/10-rhel7-cloud-image 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$ARCH" ] -[ -n "$TARGET_ROOT" ] - -if [[ "amd64 x86_64" =~ "$ARCH" ]]; then - ARCH="x86_64" -elif [[ "ppc64le" =~ "$ARCH" ]]; then - # We don't need to do anything here other than avoid the else clause - : -else - echo 'rhel7 root element only supports x86_64 and ppc64le values for $ARCH' - exit 1 -fi - -DIB_LOCAL_IMAGE=${DIB_LOCAL_IMAGE:-""} - -if [ -n "$DIB_LOCAL_IMAGE" ]; then - IMAGE_LOCATION=$DIB_LOCAL_IMAGE - # No need to copy a local image into the cache directory, so just specify - # the cached path as the original path. - CACHED_IMAGE=$IMAGE_LOCATION - BASE_IMAGE_FILE=`basename $DIB_LOCAL_IMAGE` - BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz -else - if [ -z "${BASE_IMAGE_FILE:-}" -o -z "${DIB_CLOUD_IMAGES:-}" ]; then - echo "No source for a base image file configured." - echo "See rhel7 element readme for details on how to obtain and use a base image." - exit 1 - fi - DIB_RELEASE=${DIB_RELEASE:-latest} - BASE_IMAGE_TAR=$DIB_RELEASE-rhel-server-$ARCH-latest.tgz - IMAGE_LOCATION=$DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE - CACHED_IMAGE=$DIB_IMAGE_CACHE/$BASE_IMAGE_FILE - -fi - -$TMP_HOOKS_PATH/bin/extract-image $BASE_IMAGE_FILE $BASE_IMAGE_TAR $IMAGE_LOCATION $CACHED_IMAGE diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/finalise.d/60-unregister python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/finalise.d/60-unregister --- python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/finalise.d/60-unregister 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/finalise.d/60-unregister 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-1}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# When building an image with diskimage-builder, you will need to register -# with either the customer portal or a satellite instance in order to enable -# repos for software installation. In most cases, it is desirable to -# unregister a system when diskimage-builder is completing so the customer -# entitlements are not decremented. This option is here for the case when -# a single image needs to be built and deployed as a single instance or for -# 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. -case "${REG_METHOD:-}" in - portal | satellite) - if [ -z "${REG_HALT_UNREGISTER:-}" ]; then - subscription-manager unregister - fi - ;; - disable) - ;; -esac diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/install.d/10-openstack-selinux-rhel python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/install.d/10-openstack-selinux-rhel --- python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/install.d/10-openstack-selinux-rhel 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/install.d/10-openstack-selinux-rhel 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -#!/bin/bash -# Install openstack-selinux if it is available -# dib-lint: disable=sete - -if [ "${DIB_DEBUG_TRACE:-1}" -gt 0 ]; then - set -x -fi -set -u -set -o pipefail - -HAS_PACKAGE=$(yum list | grep openstack-selinux) -if [ -n "$HAS_PACKAGE" ]; then - install-packages openstack-selinux -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration --- python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration 1970-01-01 00:00:00.000000000 +0000 @@ -1,153 +0,0 @@ -#!/bin/bash - -# dib-lint: disable=dibdebugtrace - -set -eu -set -o pipefail - -OK=/mnt/state/var/lib/rhsm/rhsm.ok - -if [ -e $OK ] ; then - exit 0 -fi - -REG_ACTIVATION_KEY="$(os-apply-config --key rh_registration.activation_key --type raw --key-default '')" -REG_AUTO_ATTACH="$(os-apply-config --key rh_registration.auto_attach --type raw --key-default 'true')" -REG_BASE_URL="$(os-apply-config --key rh_registration.base_url --type raw --key-default '')" -REG_ENVIRONMENT="$(os-apply-config --key rh_registration.environment --type raw --key-default '')" -REG_FORCE="$(os-apply-config --key rh_registration.force --type raw --key-default '')" -REG_MACHINE_NAME="$(os-apply-config --key rh_registration.machine_name --type raw --key-default '')" -REG_ORG="$(os-apply-config --key rh_registration.org --type raw --key-default '')" -REG_PASSWORD="$(os-apply-config --key rh_registration.password --type raw --key-default '')" -REG_POOL_ID="$(os-apply-config --key rh_registration.poolid --type raw --key-default '')" -REG_RELEASE="$(os-apply-config --key rh_registration.release --type raw --key-default '')" -REG_REPOS="$(os-apply-config --key rh_registration.repos --type raw --key-default '')" -REG_SAT_URL="$(os-apply-config --key rh_registration.satellite_url --type raw --key-default '')" -REG_SERVER_URL="$(os-apply-config --key rh_registration.server_url --type raw --key-default '')" -REG_SERVICE_LEVEL="$(os-apply-config --key rh_registration.service_level --type raw --key-default '')" -REG_USER="$(os-apply-config --key rh_registration.user --type raw --key-default '')" -REG_TYPE="$(os-apply-config --key rh_registration.type --type raw --key-default '')" -REG_METHOD="$(os-apply-config --key rh_registration.method --type raw --key-default '')" - -opts= -attach_opts= -repos="repos --enable rhel-7-server-rpms" -satellite_repo="rhel-7-server-rh-common-rpms" -if [ -n "${REG_AUTO_ATTACH:-}" ]; then - opts="$opts --auto-attach" - - if [ -n "${REG_SERVICE_LEVEL:-}" ]; then - opts="$opts --servicelevel $REG_SERVICE_LEVEL" - fi - - if [ -n "${REG_RELEASE:-}" ]; then - opts="$opts --release=$REG_RELEASE" - fi -else - if [ -n "${REG_SERVICE_LEVEL:-}" ]; then - echo "WARNING: REG_SERVICE_LEVEL set without REG_AUTO_ATTACH." - fi - - if [ -n "${REG_RELEASE:-}" ]; then - echo "WARNING: REG_RELEASE set without REG_AUTO_ATTACH." - fi - - if [ -n "${REG_POOL_ID:-}" ]; then - attach_opts="$attach_opts --pool=$REG_POOL_ID" - fi -fi - -if [ -n "${REG_BASE_URL:-}" ]; then - opts="$opts --baseurl=$REG_BASE_URL" -fi - -if [ -n "${REG_ENVIRONMENT:-}" ]; then - opts="$opts --env=$REG_ENVIRONMENT" -fi - -if [ -n "${REG_FORCE:-}" ]; then - opts="$opts --force" -fi - -if [ -n "${REG_SERVER_URL:-}" ]; then - opts="$opts --serverurl=$REG_SERVER_URL" -fi - -if [ -n "${REG_ACTIVATION_KEY:-}" ]; then - opts="$opts --activationkey=$REG_ACTIVATION_KEY" - - if [ -z "${REG_ORG:-}" ]; then - echo "WARNING: REG_ACTIVATION_KEY set without REG_ORG." - fi -else - echo "WARNING: Support for registering with a username and password is deprecated." - echo "Please use activation keys instead. See the README for more information." - if [ -n "${REG_PASSWORD:-}" ]; then - opts="$opts --password $REG_PASSWORD" - fi - - if [ -n "${REG_USER:-}" ]; then - opts="$opts --username $REG_USER" - fi -fi - -if [ -n "${REG_MACHINE_NAME:-}" ]; then - opts="$opts --name $REG_MACHINE_NAME" -fi - -if [ -n "${REG_ORG:-}" ]; then - opts="$opts --org=$REG_ORG" -fi - -if [ -n "${REG_REPOS:-}" ]; then - for repo in $(echo $REG_REPOS | tr ',' '\n'); do - repos="$repos --enable $repo" - done -fi - -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:-}" -a -z "${REG_ACTIVATION_KEY:-}" ]; 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 "Disabling all previous repos" - subscription-manager repos --disable=\* - 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) - echo "Disabling RHEL registration" - ;; - *) - echo "WARNING: only 'portal', 'satellite', and 'disable' are valid values for REG_METHOD." - exit 0 -esac - -mkdir -p $(dirname $OK) -touch $OK diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/pre-install.d/00-rhel-registration python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/pre-install.d/00-rhel-registration --- python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/pre-install.d/00-rhel-registration 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/pre-install.d/00-rhel-registration 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -#!/bin/bash - -# 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 - -opts= -attach_opts= -repos="repos --enable rhel-7-server-rpms" -satellite_repo="rhel-7-server-rh-common-rpms" - -if [ -n "${REG_AUTO_ATTACH:-}" ]; then - opts="$opts --auto-attach" - - if [ -n "${REG_SERVICE_LEVEL:-}" ]; then - opts="$opts --servicelevel $REG_SERVICE_LEVEL" - fi - - if [ -n "${REG_RELEASE:-}" ]; then - opts="$opts --release=$REG_RELEASE" - fi -else - if [ -n "${REG_SERVICE_LEVEL:-}" ]; then - echo "WARNING: REG_SERVICE_LEVEL set without REG_AUTO_ATTACH." - fi - - if [ -n "${REG_RELEASE:-}" ]; then - echo "WARNING: REG_RELEASE set without REG_AUTO_ATTACH." - fi - - if [ -n "${REG_POOL_ID:-}" ]; then - attach_opts="$attach_opts --pool=$REG_POOL_ID" - fi -fi - -if [ -n "${REG_BASE_URL:-}" ]; then - opts="$opts --baseurl=$REG_BASE_URL" -fi - -if [ -n "${REG_ENVIRONMENT:-}" ]; then - opts="$opts --env=$REG_ENVIRONMENT" -fi - -if [ -n "${REG_FORCE:-}" ]; then - opts="$opts --force" -fi - -if [ -n "${REG_SERVER_URL:-}" ]; then - opts="$opts --serverurl=$REG_SERVER_URL" -fi - -if [ -n "${REG_ACTIVATION_KEY:-}" ]; then - opts="$opts --activationkey=$REG_ACTIVATION_KEY" - - if [ -z "${REG_ORG:-}" ]; then - echo "WARNING: REG_ACTIVATION_KEY set without REG_ORG." - fi -else - if [ -n "${REG_PASSWORD:-}" ]; then - opts="$opts --password $REG_PASSWORD" - fi - - if [ -n "${REG_USER:-}" ]; then - opts="$opts --username $REG_USER" - fi -fi - -if [ -n "${REG_MACHINE_NAME:-}" ]; then - opts="$opts --name $REG_MACHINE_NAME" -fi - -if [ -n "${REG_ORG:-}" ]; then - opts="$opts --org=$REG_ORG" -fi - -if [ -n "${REG_REPOS:-}" ]; then - for repo in $(echo $REG_REPOS | tr ',' '\n'); do - repos="$repos --enable $repo" - done -fi - -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:-}" -a -z "${REG_ACTIVATION_KEY:-}" ]; then - echo "Attaching with options: $attach_opts" - subscription-manager attach $attach_opts - fi - echo "Disabling all previous repos" - subscription-manager repos --disable=\* - 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 "Disabling all previous repos" - subscription-manager repos --disable=\* - echo "Enabling repos: $user_repos" - subscription-manager $repos - ;; - disable) - echo "Disabling RHEL registration" - ;; - *) - echo "WARNING: only 'portal', 'satellite', and 'disable' are valid values for REG_METHOD." - exit 0 -esac diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/pre-install.d/00-rhsm python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/pre-install.d/00-rhsm --- python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/pre-install.d/00-rhsm 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/pre-install.d/00-rhsm 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -#!/bin/bash -# This script is for RHEL6 use only. For RHEL7, please see the readme for -# documentation on which scripts are used for registration and the variables -# needed to enable the registration process. - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -export DIB_RHSM_USER=${DIB_RHSM_USER:-} - -if [ -n "${DIB_RHSM_USER:-}" ] && [ -n "${DIB_RHSM_PASSWORD:-}" ] ; then - opts="--force" - if [[ -n "${DIB_SAT_KEY:-}" ]]; then - opts="$opts --activationkey ${DIB_SAT_KEY}" - else - opts="$opts --username ${DIB_RHSM_USER} --password ${DIB_RHSM_PASSWORD}" - fi - if [[ -n "${DIB_SAT_URL:-}" ]]; then - if [[ "${DIB_REG_TYPE:-}" == "rhn" ]]; then - opts="$opts --serverUrl ${DIB_SAT_URL}" - else - opts="$opts --serverurl ${DIB_SAT_URL} --sslCACert /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT" - fi - fi - if [[ -n "${DIB_SAT_CERT_RPM_URL:-}" ]]; then - yum install -y ${DIB_SAT_CERT_RPM_URL} - fi - if [[ "${DIB_REG_TYPE:-}" == "rhn" ]]; then - rhnreg_ks $opts --norhnsd - sleep 1 - # optional channel required for diskimage-builder dependency - channels="-a -c rhel-x86_64-server-optional-6" - if [[ -n "${DIB_RHN_CHANNELS:-}" ]]; then - for chan in $DIB_RHN_CHANNELS; do - channels="$channels -a -c $chan" - done - fi - rhn-channel --user=$DIB_RHSM_USER --password=$DIB_RHSM_PASSWORD $channels - rhn-channel -l - else - subscription-manager register $opts - # wait a second to ensure consumer certificate is finished writing to disk - sleep 1 - if [ -z ${DIB_RHSM_POOL:-} ]; then - subscription-manager attach --auto - else - subscription-manager attach --pool $DIB_RHSM_POOL - fi - # optional repo required for diskimage-builder dependency - if [ "$DISTRO_NAME" == "rhel7" ]; then - repos="--enable rhel-7-server-optional-rpms" - else - repos="--enable rhel-6-server-optional-rpms" - fi - if [[ -n "${DIB_RHSM_REPOS:-}" ]]; then - for repo in $DIB_RHSM_REPOS; do - repos="$repos --enable $repo" - done - fi - subscription-manager repos $repos - subscription-manager repos --list - fi -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/pre-install.d/10-rhel-blacklist python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/pre-install.d/10-rhel-blacklist --- python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/pre-install.d/10-rhel-blacklist 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/pre-install.d/10-rhel-blacklist 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# This is packages that are required for installation by other -# elements (like base) but aren't actually available for this -# platform. This is a bit of a hack -echo "dkms" > /tmp/yum-blacklist diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/README.rst python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/rhel-common/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rhel-common/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,242 +0,0 @@ -=========== -rhel-common -=========== -This element contains the common installation steps between RHEL os releases. - -RHEL Registration ------------------ -This element provides functionality for registering RHEL images during the -image build process with the disk-image-create script from diskimage-builder. -The RHEL image will register itself with either the hosted Red Hat Customer -Portal or Satellite to enable software installation from official -repositories. After the end of the image creation process, the image will -unregister itself so an entitlement will not be decremented from the account. - - -SECURITY WARNING: ------------------ -While the image building workflow will allow you to register with a username -and password combination, that feature is deprecated in the boot process via -Heat as it will expose your username and password in clear text for anyone -that has rights to run heat stack-show. A compromised username and password -can be used to login to the Red Hat Customer Portal or an instance of -Satellite. An activation key can only be used for registration purposes using -the subscription-manager command line tool and is considered a lower security -risk. - -IMPORTANT NOTE: ----------------- -The 00-rhsm script is specific to RHEL6. If you use the REG\_ variables to -use with RHEL7, you do not need to set any DIB_RHSM variables. The scripts -named with "rhel-registration" have not been developed or tested for RHEL6. -For information on building RHEL6 images, please see the rhel element README. - -Environment Variables For Image Creation ----------------------------------------- -The following environment variables are used for registering a RHEL instance -with either the Red Hat Customer Portal or Satellite 6. - -#### REG\_ACTIVATION\_KEY -Attaches existing subscriptions as part of the registration process. The -subscriptions are pre-assigned by a vendor or by a systems administrator -using Subscription Asset Manager. - -#### REG\_AUTO\_ATTACH -Automatically attaches the best-matched compatible subscription. This is -good for automated setup operations, since the system can be configured -in a single step. - -#### REG\_BASE\_URL -Gives the hostname of the content delivery server to use to receive updates. -Both Customer Portal Subscription Management and Subscription Asset Manager -use Red Hat's hosted content delivery services, with the URL -https://cdn.redhat.com. Since Satellite 6 hosts its own content, the URL -must be used for systems registered with Satellite 6. - -#### REG\_ENVIRONMENT -Registers the system to an environment within an organization. - -#### REG\_FORCE -Registers the system even if it is already registered. Normally, any register -operations will fail if the machine is already registered. - -#### REG\_HALT\_UNREGISTER -At the end of the image build process, the element runs a cleanup script that -will unregister it from the system it registered with. There are some cases -when building an image where you may want to stop this from happening so you -can verify the registration or to build a one off-image where the boot-time -registration will not be enabled. Set this value to '1' to stop the -unregistration process. - -#### REG\_MACHINE\_NAME -Sets the name of the system to be registered. This defaults to be the same as -the hostname. - -#### REG\_METHOD -Sets the method of registration. Use "portal" to register a system with the -Red Hat Customer Portal. Use "satellite" to register a system with Red -Hat Satellite 6. Use "disable" to skip the registration process. - -#### REG\_ORG -Gives the organization to which to join the system. - -#### REG\_POOL\_ID -The pool ID is listed with the product subscription information, which is -available from running the list subcommand of subscription-manager. - -#### REG\_PASSWORD -Gives the password for the user account. - -#### REG\_RELEASE -Sets the operating system minor release to use for subscriptions for the -system. Products and updates are limited to that specific minor release -version. This is used only used with the REG_AUTO_ATTACH option. Possible -values for this include 5Server, 5.7, 5.8, 5.9, 5.10, 6.1,...6.6, 7.0. -It will change over time as new releases come out. There are also variants -6Server, 6Client, 6Workstation, 7Server, etc. - -#### REG\_REPOS -A single string representing a list of repository names separated by a -comma (No spaces). Each of the repositories in this string are enabled -through subscription manager. Once you've attached a subscription, you can -find available repositories by running subscription-manager repos --list. - -#### REG\_SERVER\_URL -Gives the hostname of the subscription service to use. The default is -for Customer Portal Subscription Management, subscription.rhn.redhat.com. -If this option is not used, the system is registered with Customer Portal -Subscription Management. - -#### REG\_SERVICE\_LEVEL -Sets the service level to use for subscriptions on that machine. This -is only used with the REG_AUTO_ATTACH option. - -#### REG\_USER -Gives the content server user account name. - -#### REG\_TYPE -Sets what type of consumer is being registered. The default is system, which -is applicable to both physical systems and virtual guests. Other types include -hypervisor for virtual hosts, person, domain, rhui, and candlepin for some -subscription management applications. - -Image Build Registration Examples ------------------------------------- -To register with Satellite 6, a common example would be to set the following -variables: - -REG_SAT_URL='http://my-sat06.server.org' -REG_ORG='tripleo' -REG_ENV='Library' -REG_USER='tripleo' -REG_PASSWORD='tripleo' -REG_METHOD=satellite - -To register with the Red Hat Customer Portal, a common example would be to -set the following variables: - -REG_REPOS='rhel-7-server-optional-rpms,rhel-7-server-extras-rpms' -REG_AUTO_ATTACH=true -REG_USER='tripleo' -REG_PASSWORD='tripleo' -REG_METHOD=portal - - -Configuration -------------- -Heat metadata can be used to configure the rhel-common element. - - rh_registration: - activation_key: - # Attaches existing subscriptions as part of the registration - # process. The subscriptions are pre-assigned by a vendor or by - # a systems administrator using Subscription Asset Manager. - auto_attach: 'true' - # Automatically attaches the best-matched compatible subscription. - # This is good for automated setup operations, since the system can - # be configured in a single step. - base_url: - # Gives the hostname of the content delivery server to use to - # receive updates. Both Customer Portal Subscription Management - # and Subscription Asset Manager use Red Hat's hosted content - # delivery services, with the URL https://cdn.redhat.com. Since - # Satellite 6 hosts its own content, the URL must be used for - # systems registered with Satellite 6. - environment: - # Registers the system to an environment within an organization. - force: - # Registers the system even if it is already registered. Normally, - # any register operations will fail if the machine is already - # registered. - machine_name: - # Sets the name of the system to be registered. This defaults to be - # the same as the hostname. - org: - # Gives the organization to which to join the system. - password: - # DEPRECATED - # Gives the password for the user account. - release: - # Sets the operating system minor release to use for subscriptions - # for the system. Products and updates are limited to that specific - # minor release version. This is only used with the auto_attach - # option. - repos: - # A single string representing a list of repository names separated by a - # comma (No spaces). Each of the repositories in this string are enabled - # through subscription manager. - satellite_url: - # The url of the Satellite instance to register with. Required for - # Satellite registration. - server_url: - # Gives the hostname of the subscription service to use. The default - # is for Customer Portal Subscription Management, - # subscription.rhn.redhat.com. If this option is not used, the system - # is registered with Customer Portal Subscription Management. - service_level: - # Sets the service level to use for subscriptions on that machine. - # This is only used with the auto_attach option. - user: - # DEPRECATED - # Gives the content server user account name. - type: - # Sets what type of consumer is being registered. The default is - # "system", which is applicable to both physical systems and virtual - # guests. Other types include "hypervisor" for virtual hosts, - # "person", "domain", "rhui", and "candlepin" for some subscription - # management applications. - method: - # Sets the method of registration. Use "portal" to register a - # system with the Red Hat Customer Portal. Use "satellite" to - # register a system with Red Hat Satellite 6. Use "disable" to - # skip the registration process. - -Configuration Registration Examples ------------------------------------- -To register with Satellite 6, a common example would be to use the following -metadata:: - - { - "rh_registration":{ - "satellite_url": "http://my-sat06.server.org", - "org": "tripleo", - "environment": "Library", - "activation_key": "my-key-SQQkh4", - "method":"satellite", - "repos": "rhel-ha-for-rhel-7-server-rpms" - } - } - -To register with the Red Hat Customer Portal, a common example would be to -use the following metadata:: - - { - "rh_registration":{ - "repos":"rhel-7-server-optional-rpms,rhel-7-server-extras-rpms", - "auto_attach":true, - "activation_key": "my-key-SQQkh4", - "org": "5643002", - "method":"portal" - } - } - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore python-diskimage-builder-2.17.0/doc/source/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore --- python-diskimage-builder-2.11.0/doc/source/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rpm-distro/cleanup.d/99-selinux-fixfiles-restore 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# parser isn't smart enough to figure out \ -# dib-lint: disable=safe_sudo - -# Here be dragons ... a previous dragon slayer helpfully pointed out in -# http://www.spinics.net/lists/selinux/msg17379.html -# -# Not all of the contexts defined by the offline system's -# file_contexts may be valid under the policy of the host on which -# you are running (e.g. if they run different distributions or even -# different releases of the same distribution), which will normally -# prevent setting those contexts (the kernel won't recognize them). -# If you have this issue, you'll need to run setfiles as root in a -# special domain, setfiles_mac_t, that is allowed to set contexts -# unknown to the host policy, and likely chrooted so that it doesn't -# ask the kernel whether the contexts are valid via -# /sys/fs/selinux/context. That is how livecd-creator supported -# creating images for other releases. - -# One issue you might see without fixing selinux file labels is sshd -# will run in the kernel_t domain instead of the sshd_t domain, making -# ssh connections fail with "Unable to get valid context for " -# error message. Other failures will occur too. - -# XXX: is it really valid to build rpm-distros without this? -if [[ ! -f ${TARGET_ROOT}/etc/selinux/targeted/contexts/files/file_contexts ]]; then - echo "No selinux policy found in chroot, skipping..." - exit 0 -fi - -if [[ ! -x ${TARGET_ROOT}/usr/sbin/setfiles ]]; then - echo "Can not find setfiles in chroot!" - exit 1 -fi - -# If we're on a selinux system, enable permissive mode for -# setfiles_mac_t so we can relabel within the chroot without concern -# for whatever policy is in the host kernel. We will run under -# "runcon" to specifically allow this -_runcon="" -if [[ -d /sys/fs/selinux ]]; then - sudo semanage permissive -a setfiles_mac_t - _runcon="runcon -t setfiles_mac_t -- " -fi - -# setfiles in > Fedora 26 added this flag: -# do not read /proc/mounts to obtain a list of -# non-seclabel mounts to be excluded from relabeling -# checks. Setting this option is useful where there is -# a non-seclabel fs mounted with a seclabel fs -# this describes our situation of being on a loopback device on -# an ubuntu system, say. See also -# https://bugzilla.redhat.com/show_bug.cgi?id=1472709 -_dash_m="" -if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 26 ]]; then - _dash_m+="-m" -fi - -IFS='|' read -ra SPLIT_MOUNTS <<< "$DIB_MOUNTPOINTS" -for MOUNTPOINT in "${SPLIT_MOUNTS[@]}"; do - if [ "${MOUNTPOINT}" != "/tmp/in_target.d" ] && [ "${MOUNTPOINT}" != "/dev" ]; then - sudo ${_runcon} chroot ${TARGET_ROOT} \ - /usr/sbin/setfiles -F ${_dash_m} \ - /etc/selinux/targeted/contexts/files/file_contexts ${MOUNTPOINT} - fi -done - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rpm-distro/post-install.d/06-network-config-nonzeroconf python-diskimage-builder-2.17.0/doc/source/elements/rpm-distro/post-install.d/06-network-config-nonzeroconf --- python-diskimage-builder-2.11.0/doc/source/elements/rpm-distro/post-install.d/06-network-config-nonzeroconf 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rpm-distro/post-install.d/06-network-config-nonzeroconf 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# zeroconf should not be activated or it will add a 169.254.0.0 -# route. The route will interfere with access to the nova metadata -# server at 169.254.169.254. -if ! grep NOZEROCONF /etc/sysconfig/network ; then - echo "NOZEROCONF=yes" >> /etc/sysconfig/network -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rpm-distro/pre-install.d/00-fix-requiretty python-diskimage-builder-2.17.0/doc/source/elements/rpm-distro/pre-install.d/00-fix-requiretty --- python-diskimage-builder-2.11.0/doc/source/elements/rpm-distro/pre-install.d/00-fix-requiretty 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rpm-distro/pre-install.d/00-fix-requiretty 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Fedora sets requiretty by default, which while great for machines that are -# going to see a lot of passwords sent over the wire because of interactive -# activity, that's not how we're using these. Remove the setting, and the -# comments about it - -sed -i -e '/^Defaults\s*requiretty/d' -e '/Disable "ssh hostname/d' /etc/sudoers -sed -i -e '/You have to run/d' /etc/sudoers -visudo -c diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rpm-distro/pre-install.d/00-usr-local-bin-secure-path python-diskimage-builder-2.17.0/doc/source/elements/rpm-distro/pre-install.d/00-usr-local-bin-secure-path --- python-diskimage-builder-2.11.0/doc/source/elements/rpm-distro/pre-install.d/00-usr-local-bin-secure-path 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rpm-distro/pre-install.d/00-usr-local-bin-secure-path 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -sed -i -e "/secure_path/ s@\([\'\"]\?\)\$@:/usr/local/bin/\1@" /etc/sudoers -visudo -c diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/rpm-distro/pre-install.d/01-override-yum-arch python-diskimage-builder-2.17.0/doc/source/elements/rpm-distro/pre-install.d/01-override-yum-arch --- python-diskimage-builder-2.11.0/doc/source/elements/rpm-distro/pre-install.d/01-override-yum-arch 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/rpm-distro/pre-install.d/01-override-yum-arch 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [ "i386" = "$ARCH" ]; then - basearch=i386 - arch=i686 -elif [[ "amd64 x86_64" =~ "$ARCH" ]]; then - basearch=x86_64 - arch=x86_64 -elif [[ "$ARCH" = "ppc64" ]]; then - basearch=ppc64 - arch=ppc64 -elif [[ "$ARCH" = "ppc64le" ]]; then - basearch=ppc64le - arch=ppc64le -elif [[ "arm64 aarch64" =~ "$ARCH" ]]; then - basearch=aarch64 - arch=aarch64 -else - echo "********************" - echo "Unknown arch '$ARCH'" - echo "********************" - exit 1 -fi - -if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then - mkdir -p /etc/dnf/vars - echo $basearch > /etc/dnf/vars/basearch - echo $arch > /etc/dnf/vars/arch -else - echo $basearch > /etc/yum/vars/basearch - echo $arch > /etc/yum/vars/arch -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/cleanup.d/90-remove-ssh-host-keys python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/cleanup.d/90-remove-ssh-host-keys --- python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/cleanup.d/90-remove-ssh-host-keys 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/cleanup.d/90-remove-ssh-host-keys 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Cloud images shouldn't have ssh host keys baked -# in so that they are regenerated on first boot and -# are unique. - -if [ -d $TARGET_ROOT/etc/ssh ] ; then - sudo find $TARGET_ROOT/etc/ssh -name 'ssh_host*' -type f -delete -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/element-deps python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -dib-init-system -install-static diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/init-scripts/systemd/ssh-keygen.service python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/init-scripts/systemd/ssh-keygen.service --- python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/init-scripts/systemd/ssh-keygen.service 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/init-scripts/systemd/ssh-keygen.service 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -[Unit] -Description=OpenSSH Server Key Generation -Before=ssh.service - -[Service] -ExecStart=/usr/local/sbin/runtime-ssh-host-keys.sh -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/init-scripts/upstart/ssh-keygen.conf python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/init-scripts/upstart/ssh-keygen.conf --- python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/init-scripts/upstart/ssh-keygen.conf 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/init-scripts/upstart/ssh-keygen.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -description "OpenSSH Server Key Generation" - -start on starting ssh -console output - -task - -exec /usr/local/sbin/runtime-ssh-host-keys.sh diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -openssh-client: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -{ - "family": { - "redhat": { - "openssh-client": "openssh" - }, - "gentoo": { - "openssh-client": "" - }, - "suse": { - "openssh-client": "openssh" - } - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/post-install.d/80-ssh-keygen python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/post-install.d/80-ssh-keygen --- python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/post-install.d/80-ssh-keygen 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/post-install.d/80-ssh-keygen 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -case "$DIB_INIT_SYSTEM" in - upstart) - # nothing to do - exit 0 - ;; - systemd) - if [[ $DISTRO_NAME = "ubuntu" || $DISTRO_NAME = "debian" ]]; then - # NOTE(pabelanger): Only support ubuntu / debian today. - systemctl enable ssh-keygen.service - else - # Since we are not enabling it, delete it. - rm /usr/lib/systemd/system/ssh-keygen.service - fi - ;; - openrc) - # let dib-init-system's postinstall handle enabling init scripts - exit 0 - ;; - sysv) - # nothing to do - exit 0 - ;; - *) - echo "Unsupported init system $DIB_INIT_SYSTEM" - exit 1 - ;; -esac diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/README.rst python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -===================== -runtime-ssh-host-keys -===================== -An element to generate SSH host keys on first boot. - -Since ssh key generation is not yet common to all operating systems, we need to -create a DIB element to manage this. We force the removal of the SSH host keys, -then add init scripts to generate them on first boot. - -This element currently supports Debian and Ubuntu (both systemd and upstart). diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/static/usr/local/sbin/runtime-ssh-host-keys.sh python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/static/usr/local/sbin/runtime-ssh-host-keys.sh --- python-diskimage-builder-2.11.0/doc/source/elements/runtime-ssh-host-keys/static/usr/local/sbin/runtime-ssh-host-keys.sh 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/runtime-ssh-host-keys/static/usr/local/sbin/runtime-ssh-host-keys.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -#!/bin/bash -# Copyright 2016 Red Hat, Inc. -# -# 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. -# dib-lint: disable=dibdebugtrace setpipefail - -set -exu - -# We are running into race conditions with glean, which ssh-keygen -A is -# not handling properly. So, create a new script to first check if the -# file exists, then use 'yes' to disable overwriting of existing files. - -for key in dsa ecdsa ed25519 rsa; do - FILE=/etc/ssh/ssh_host_${key}_key - if ! [ -f $FILE ]; then - /usr/bin/yes n | /usr/bin/ssh-keygen -f $FILE -N '' -t $key - fi -done diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/select-boot-kernel-initrd/bin/select-boot-kernel-initrd python-diskimage-builder-2.17.0/doc/source/elements/select-boot-kernel-initrd/bin/select-boot-kernel-initrd --- python-diskimage-builder-2.11.0/doc/source/elements/select-boot-kernel-initrd/bin/select-boot-kernel-initrd 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/select-boot-kernel-initrd/bin/select-boot-kernel-initrd 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -#!/bin/bash - -# Copyright 2012 Hewlett-Packard Development Company, L.P. -# Copyright 2013 Red Hat, Inc. -# -# 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:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -source /lib/diskimage-builder/img-functions - -select_boot_kernel_initrd / - -echo ${KERNEL}:${RAMDISK} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/select-boot-kernel-initrd/cleanup.d/99-remove-dib-img-functions python-diskimage-builder-2.17.0/doc/source/elements/select-boot-kernel-initrd/cleanup.d/99-remove-dib-img-functions --- python-diskimage-builder-2.11.0/doc/source/elements/select-boot-kernel-initrd/cleanup.d/99-remove-dib-img-functions 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/select-boot-kernel-initrd/cleanup.d/99-remove-dib-img-functions 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -sudo rm -f $TMP_MOUNT_PATH/lib/diskimage-builder/img-functions -sudo rmdir $TMP_MOUNT_PATH/lib/diskimage-builder diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/select-boot-kernel-initrd/extra-data.d/99-copy-dib-img-functions python-diskimage-builder-2.17.0/doc/source/elements/select-boot-kernel-initrd/extra-data.d/99-copy-dib-img-functions --- python-diskimage-builder-2.11.0/doc/source/elements/select-boot-kernel-initrd/extra-data.d/99-copy-dib-img-functions 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/select-boot-kernel-initrd/extra-data.d/99-copy-dib-img-functions 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -#!/bin/bash -# Copy elements-functions into chroot so we can access the get_kernel_image function - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -sudo mkdir -p $TMP_MOUNT_PATH/lib/diskimage-builder -sudo cp -t $TMP_MOUNT_PATH/lib/diskimage-builder $_LIB/img-functions diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/select-boot-kernel-initrd/README.rst python-diskimage-builder-2.17.0/doc/source/elements/select-boot-kernel-initrd/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/select-boot-kernel-initrd/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/select-boot-kernel-initrd/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -========================= -select-boot-kernel-initrd -========================= -A helper script to get the kernel and initrd image. - -It uses the function select_boot_kernel_initrd from the library img-functions -to find the newest kernel and ramdisk in the image, and returns them as a -concatenated string separating the values with a colon (:). diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/selinux-permissive/install.d/11-selinux-permissive python-diskimage-builder-2.17.0/doc/source/elements/selinux-permissive/install.d/11-selinux-permissive --- python-diskimage-builder-2.11.0/doc/source/elements/selinux-permissive/install.d/11-selinux-permissive 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/selinux-permissive/install.d/11-selinux-permissive 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -echo "SELINUX=permissive" > /etc/selinux/config -echo "SELINUXTYPE=targeted" >> /etc/selinux/config - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/selinux-permissive/README.rst python-diskimage-builder-2.17.0/doc/source/elements/selinux-permissive/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/selinux-permissive/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/selinux-permissive/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -================== -selinux-permissive -================== -Puts selinux into permissive mode by writing SELINUX=permissive -to /etc/selinux/config - -Enable this element when debugging selinux issues. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/simple-init/element-deps python-diskimage-builder-2.17.0/doc/source/elements/simple-init/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/simple-init/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/simple-init/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -cloud-init-datasources -dib-init-system -install-types -pip-and-virtualenv -runtime-ssh-host-keys -source-repositories diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/simple-init/environment.d/50-disable-cloud-init python-diskimage-builder-2.17.0/doc/source/elements/simple-init/environment.d/50-disable-cloud-init --- python-diskimage-builder-2.11.0/doc/source/elements/simple-init/environment.d/50-disable-cloud-init 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/simple-init/environment.d/50-disable-cloud-init 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DIB_CLOUD_INIT_DATASOURCES="None" diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/simple-init/install.d/50-simple-init python-diskimage-builder-2.17.0/doc/source/elements/simple-init/install.d/50-simple-init --- python-diskimage-builder-2.11.0/doc/source/elements/simple-init/install.d/50-simple-init 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/simple-init/install.d/50-simple-init 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -#!/bin/bash -# 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 - -SCRIPTDIR=$(dirname $0) - -# Ensure the 8021q module is loaded so that glean can support tagged interfaces -echo "8021q" >> /etc/modules - -glean-install diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/simple-init/install.d/60-simple-init-remove-interfaces python-diskimage-builder-2.17.0/doc/source/elements/simple-init/install.d/60-simple-init-remove-interfaces --- python-diskimage-builder-2.11.0/doc/source/elements/simple-init/install.d/60-simple-init-remove-interfaces 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/simple-init/install.d/60-simple-init-remove-interfaces 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Cloud images may hard code the eth0 interfaces so they -# boot with DHCP. - -# Fedora -rm -f /etc/sysconfig/network-scripts/ifcfg-eth* - -# SUSE -rm -f /etc/sysconfig/network/ifcfg-eth* - -# Ubuntu -rm -f /etc/network/interfaces.d/eth* - -# Debian -rm -f /etc/network/interfaces.d/eth* - -# Gentoo -rm -f /etc/conf.d/net* - -# /etc/network/interfaces distributions -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 - fi -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/simple-init/install.d/simple-init-repo-install/40-glean python-diskimage-builder-2.17.0/doc/source/elements/simple-init/install.d/simple-init-repo-install/40-glean --- python-diskimage-builder-2.11.0/doc/source/elements/simple-init/install.d/simple-init-repo-install/40-glean 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/simple-init/install.d/simple-init-repo-install/40-glean 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -#!/bin/bash -# Copyright (c) 2015 Hewlett-Packard Development 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 - -pip install /tmp/glean.git diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/simple-init/install.d/simple-init-source-install/40-glean python-diskimage-builder-2.17.0/doc/source/elements/simple-init/install.d/simple-init-source-install/40-glean --- python-diskimage-builder-2.11.0/doc/source/elements/simple-init/install.d/simple-init-source-install/40-glean 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/simple-init/install.d/simple-init-source-install/40-glean 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -#!/bin/bash -# Copyright (c) 2015 Hewlett-Packard Development 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 - -pip install glean diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/simple-init/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/simple-init/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/simple-init/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/simple-init/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -dhcp-client: -net-tools: -ifupdown: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/simple-init/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/simple-init/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/simple-init/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/simple-init/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -{ - "family": { - "redhat": { - "dhcp-client": "dhclient" - }, - "debian": { - "dhcp-client": "isc-dhcp-client", - "ifupdown": "ifupdown" - }, - "gentoo": { - "dhcp-client": "net-misc/dhcp", - "python-pip": "dev-python/pip", - "net-tools": "sys-apps/net-tools" - }, - "suse": { - "dhcp-client": "dhcp-client" - } - }, - "default": { - "dhcp-client": "isc-dhcp-client", - "ifupdown": "" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/simple-init/post-install.d/80-simple-init python-diskimage-builder-2.17.0/doc/source/elements/simple-init/post-install.d/80-simple-init --- python-diskimage-builder-2.11.0/doc/source/elements/simple-init/post-install.d/80-simple-init 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/simple-init/post-install.d/80-simple-init 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -case "$DIB_INIT_SYSTEM" in - upstart) - # nothing to do - exit 0 - ;; - systemd) - if [[ ${DISTRO_NAME} =~ (centos|rhel7|fedora) ]]; then - # NOTE(pabelanger): Glean requires network.service for - # these platforms. - systemctl enable network.service - elif [[ ${DISTRO_NAME} =~ (opensuse) ]]; then - # on suse, this is named wicked.service, but it's the same - # as network.service. - systemctl enable wicked.service - fi - ;; - openrc) - # let dib-init-system's postinstall handle enabling init scripts - exit 0 - ;; - sysv) - # nothing to do - exit 0 - ;; - *) - echo "Unsupported init system $DIB_INIT_SYSTEM" - exit 1 - ;; -esac diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/simple-init/README.rst python-diskimage-builder-2.17.0/doc/source/elements/simple-init/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/simple-init/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/simple-init/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -=========== -simple-init -=========== -Basic network and system configuration that can't be done until boot - -Unfortunately, as much as we'd like to bake it in to an image, we can't -know in advance how many network devices will be present, nor if DHCP is -present in the host cloud. Additionally, in environments where cloud-init -is not used, there are a couple of small things, like mounting config-drive -and pulling ssh keys from it, that need to be done at boot time. - -Autodetect network interfaces during boot and configure them ------------------------------------------------------------- - -The rationale for this is that we are likely to require multiple -network interfaces for use cases such as baremetal and there is no way -to know ahead of time which one is which, so we will simply run a -DHCP client on all interfaces with real MAC addresses (except lo) that -are visible on the first boot. - -The script `/usr/local/sbin/simple-init.sh` will be called -early in each boot and will scan available network interfaces and -ensure they are configured properly before networking services are started. - -Processing startup information from config-drive ------------------------------------------------- - -On most systems, the DHCP approach desribed above is fine. But in some clouds, -such as Rackspace Public cloud, there is no DHCP. Instead, there is static -network config via `config-drive`. `simple-init` will happily call -`glean` which will do nothing if static network information is -not there. - -Finally, glean will handle ssh-keypair-injection from config -drive if cloud-init is not installed. - -Chosing glean installation source ---------------------------------- - -By default glean is installed using pip using the latest release on pypi. -It is also possible to install glean from a specified git repository -location. This is useful for debugging and testing new glean changes -for example. To do this you need to set these variables:: - - DIB_INSTALLTYPE_simple_init=repo - DIB_REPOLOCATION_glean=/path/to/glean/repo - DIB_REPOREF_glean=name_of_git_ref - -For example to test glean change 364516 do:: - - git clone https://git.openstack.org/openstack-infra/glean /tmp/glean - cd /tmp/glean - git review -d 364516 - git checkout -b my-test-ref - -Then set your DIB env vars like this before running DIB:: - - DIB_INSTALLTYPE_simple_init=repo - DIB_REPOLOCATION_glean=/tmp/glean - DIB_REPOREF_glean=my-test-ref diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/simple-init/source-repository-simple-init python-diskimage-builder-2.17.0/doc/source/elements/simple-init/source-repository-simple-init --- python-diskimage-builder-2.11.0/doc/source/elements/simple-init/source-repository-simple-init 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/simple-init/source-repository-simple-init 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -glean git /tmp/glean.git https://git.openstack.org/openstack-infra/glean diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/source-repositories/element-deps python-diskimage-builder-2.17.0/doc/source/elements/source-repositories/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/source-repositories/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/source-repositories/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -cache-url -manifests -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/source-repositories/extra-data.d/98-source-repositories python-diskimage-builder-2.17.0/doc/source/elements/source-repositories/extra-data.d/98-source-repositories --- python-diskimage-builder-2.11.0/doc/source/elements/source-repositories/extra-data.d/98-source-repositories 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/source-repositories/extra-data.d/98-source-repositories 1970-01-01 00:00:00.000000000 +0000 @@ -1,272 +0,0 @@ -#!/bin/bash - -# dib-lint: disable=safe_sudo -if [ ${DIB_DEBUG_TRACE:-0} -gt 1 ]; then - set -x -fi -set -eu -set -o pipefail - -# Don't provide any source repositories in environments where they are not allowed -if [ -n "${NO_SOURCE_REPOSITORIES:-}" ]; then - exit 0 -fi - -# If the old cache exists, move it to the new name -function make_new_cache(){ - local OLD_CACHE_BASE=$1 - local CACHE_BASE=$2 - - # If the old cache name exists, move it to the new cache name - if [ -e "$OLD_CACHE_BASE" ] ; then - if [ ! -e "$CACHE_BASE" ] ; then - mv -n $OLD_CACHE_BASE $CACHE_BASE - else - echo "Not replacing new cache location with old cache" - fi - fi -} - -# Gets repositories or individual files listed in the a repository file -# and places them in the specified destination path. -# The format of the repository file is one or more lines matching -# [] -function get_repos_for_element(){ - local REPO_SOURCES=$1 - local CACHE_URL=$TMP_HOOKS_PATH/bin/cache-url - - local REGEX="^([^ ]+) (git|tar|file|package) ?(/[^ ]+)? ?([^ ]+)? ?([^ ]*)$" - - # this can be a rather long list (e.g. caching ~1000 openstack - # repos), so we make a rough count for progress display - local COUNT=1 - local REPO_SOURCES_COUNT=$(grep -v '^$\|^\s*\#' $REPO_SOURCES | wc -l) - - while read line; do - - # temporarily turn off globbing '*' (since it may be used as - # the REPOREF for tarballs) and expand variables - set -f; line=$(eval echo $line); set +f - - # ignore blank lines and lines beginning in '#' - [[ "$line" == \#* ]] || [[ -z "$line" ]] && continue - - # rough progress counter - printf "(%04d / %04d)\n" ${COUNT} ${REPO_SOURCES_COUNT} - COUNT=$(( COUNT + 1)) - - if [[ "$line" =~ $REGEX ]] ; then - local REPONAME=${BASH_REMATCH[1]} - local REPOTYPE=${BASH_REMATCH[2]} - local REPOPATH=${BASH_REMATCH[3]} - local REPOLOCATION=${BASH_REMATCH[4]} - local REPO_ORIG_LOCATION=$REPOLOCATION - - if [ $REPONAME = "tar" -a -z "${BASH_REMATCH[5]:-}" ] ; then - echo "Warning: Default tarball REPOREF of '*' is deprecated; do not rely on it." - fi - - # Default of '*' for tar repositories is deprecated; do not rely on it. - local REPOREF_DEFAULT_TAR=* - local REPOREF_DEFAULT_GIT=master - local REPOREF_LOOKUP_DEFAULT=REPOREF_DEFAULT_${REPOTYPE^^} - - local REPOREF=${BASH_REMATCH[5]:-${!REPOREF_LOOKUP_DEFAULT:-}} - - local REPO_DEST=$TMP_MOUNT_PATH$REPOPATH - local REPO_SUB_DIRECTORY=$(dirname $REPO_DEST) - - # REPOTYPE can be overridden with DIB_REPOTYPE_{name} - local REPOTYPE_OVERRIDE=DIB_REPOTYPE_${REPONAME//[^A-Za-z0-9]/_} - REPOTYPE=${!REPOTYPE_OVERRIDE:-$REPOTYPE} - - # REPOLOCATION can be overridden with DIB_REPOLOCATION_{name} - local REPOLOCATION_OVERRIDE=DIB_REPOLOCATION_${REPONAME//[^A-Za-z0-9]/_} - REPOLOCATION=${!REPOLOCATION_OVERRIDE:-$REPOLOCATION} - - # REPOREF can be overridden with DIB_REPOREF_{name} - local REPOREF_OVERRIDE=DIB_REPOREF_${REPONAME//[^A-Za-z0-9]/_} - REPOREF=${!REPOREF_OVERRIDE:-$REPOREF} - - # Determine a unique cache path for this repo - CACHE_NAME=$(echo "${REPOTYPE}_${REPOLOCATION}" | sha1sum | awk '{ print $1 }' ) - OLD_CACHE_PATH=${CACHE_BASE}/${CACHE_NAME} - # Add the repo name to the sha1sum for readability - CACHE_NAME=${REPONAME//[^A-Za-z0-9]/_}_${CACHE_NAME} - CACHE_PATH=${CACHE_BASE}/$CACHE_NAME - make_new_cache $OLD_CACHE_PATH $CACHE_PATH - - # Return if install type is not source - local INSTALL_TYPE_VAR=DIB_INSTALLTYPE_${REPONAME//[^A-Za-z0-9]/_} - local INSTALL_TYPE=${!INSTALL_TYPE_VAR:-$DIB_DEFAULT_INSTALLTYPE} - if [ ! $INSTALL_TYPE = "source" ]; then - echo "$REPONAME install type not set to source" - continue - fi - - case $REPOTYPE in - git) - if [ -z "${!REPOLOCATION_OVERRIDE:-""}" -a -n "${DIB_GITREPOBASE:-""}" ] ; then - # Transform the current repo base to the new one - local NEW_REPOLOCATION=$(echo $REPOLOCATION |\ - sed "s,^[^:]\+://[^/]\+/\(~[^/]\+\)\?\(.*\)$,${DIB_GITREPOBASE}\2,g") - echo "Transformed ${REPOLOCATION} to ${NEW_REPOLOCATION}" - REPOLOCATION=$NEW_REPOLOCATION - # Also update the cache location - CACHE_NAME=$(echo "${REPOTYPE}_${REPOLOCATION}" | sha1sum | awk '{ print $1 }' ) - CACHE_PATH=~/.cache/image-create/repository-sources/$CACHE_NAME - fi - sudo mkdir -p $REPO_SUB_DIRECTORY - - if [ ! -e "$CACHE_PATH" ] ; then - echo "Caching $REPONAME from $REPOLOCATION in $CACHE_PATH" - git clone -q $REPOLOCATION $CACHE_PATH.tmp - mv ${CACHE_PATH}{.tmp,} - fi - - if [ "$REPOREF" != "*" ] ; then - HAS_REF=$(git --git-dir=$CACHE_PATH/.git name-rev $REPOREF 2>/dev/null || true) - fi - if [ -z "$DIB_OFFLINE" -o -z "${HAS_REF:-}" ] ; then - echo "Updating cache of $REPOLOCATION in $CACHE_PATH with ref $REPOREF" - # Copy named refs (which might be outside the usual heads - # pattern) - e.g. gerrit - if [ "$REPOREF" == "*" ] || ! git --git-dir=$CACHE_PATH/.git fetch -q --prune --update-head-ok $REPOLOCATION \ - +${REPOREF}:${REPOREF} ; then - # Copy all heads from the remote repository - this permits - # using a SHA1 object reference so long as the object - # reference is reachable from one of the heads. git does - # not permit arbitrary sha fetching from remote servers. - # This is a separate fetch to the prior one as the prior - # one will fail when REPOREF is a SHA1. - git --git-dir=$CACHE_PATH/.git fetch -q --prune --update-head-ok $REPOLOCATION \ - +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/* - fi - # Ensure that we have a reference to the revision. - if [ "$REPOREF" != "*" ] ; then - if ! git --git-dir=$CACHE_PATH/.git rev-parse -q --verify $REPOREF^{commit} > /dev/null; then - echo "Failed to find reference to $REPOREF" - exit 1 - fi - fi - fi - - echo "Cloning from $REPONAME cache and applying ref $REPOREF" - # If the local dir is already used, see if the pertinent details differ - if [[ -d $REPO_DEST ]]; then - DESIRED="$(sudo git --git-dir=$REPO_DEST/.git config remote.origin.url)" - if [[ "$CACHE_PATH" != "$DESIRED" ]]; then - echo "REPOLOCATIONS don't match ("$CACHE_PATH" != "$DESIRED")" >&2 - exit 1 - elif [[ "$REPOREF" != "*" ]]; then - pushd $REPO_DEST > /dev/null - # When we first clone we create a branch naming what we fetched - # that must match, or we are asking for two different references from the - # same repo, which is an error - if ! git rev-parse fetch_$REPOREF; then - echo "REPOREFS don't match - failed to get sha1 of fetch_$REPOREF" >&2 - exit 1 - fi - popd > /dev/null - fi - else - sudo git clone -q $CACHE_PATH $REPO_DEST - pushd $REPO_DEST > /dev/null - if [[ "$REPOREF" == "*" ]]; then - sudo git fetch -q --prune --update-head-ok $CACHE_PATH \ - +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/* - git_sha=$(git rev-parse HEAD) - else - sudo git fetch -q $CACHE_PATH $REPOREF:fetch_$REPOREF - sudo git reset --hard FETCH_HEAD - # Get the sha in use - git_sha=$(git rev-parse FETCH_HEAD) - fi - popd > /dev/null - - # Write the sha being used into the source-repositories manifest - echo "$REPONAME git $REPOPATH $REPOLOCATION $git_sha" >> $GIT_MANIFEST - fi - ;; - tar) - # The top level directory of the tarball mightn't have a fixed name i.e. - # it could contain version numbers etc... so we write it to a tmpdir - # for inspection before transferring the contents into the target directory - local tmpdir=$(mktemp --tmpdir=$TMP_MOUNT_PATH/tmp -d) - if [ -n "$CACHE_PATH" ] ; then - echo "Caching $REPONAME tarball from $REPOLOCATION in $CACHE_PATH" - if [ ! -f "$CACHE_PATH" -o -z "$DIB_OFFLINE" ] ; then - $CACHE_URL $REPOLOCATION $CACHE_PATH - fi - tar -C $tmpdir -xzf $CACHE_PATH - else - echo "Fetching $REPONAME tarball from $REPOLOCATION" - curl $REPOLOCATION | tar -C $tmpdir -xzf - - fi - - sudo mkdir -p $REPO_DEST - - # A REPOREF of '.' will select the entire contents of the tarball, - # while '*' will select only the contents of its subdirectories. - sudo rsync -a --remove-source-files $tmpdir/$REPOREF/. $REPO_DEST - - rm -rf $tmpdir - - ;; - file) - sudo mkdir -p $REPO_SUB_DIRECTORY - if [ -n "$CACHE_PATH" ] ; then - echo "Caching $REPONAME file from $REPOLOCATION in $CACHE_PATH" - if [ ! -f "$CACHE_PATH" -o -z "$DIB_OFFLINE" ] ; then - $CACHE_URL $REPOLOCATION $CACHE_PATH - fi - sudo cp $CACHE_PATH $REPO_DEST - else - echo "Fetching $REPONAME file from $REPOLOCATION" - sudo curl $REPOLOCATION -o $REPO_DEST - fi - ;; - *) - echo "Unsupported repository type: $REPOTYPE" - return 1 - ;; - esac - - # Capture the in-instance repository path for later review / other - # elements (like a pypi dependency cache). - echo "$REPOPATH" | sudo tee -a $TMP_MOUNT_PATH/etc/dib-source-repositories > /dev/null - - else - echo "Couldn't parse '$line' as a source repository" - return 1 - fi - done < $REPO_SOURCES -} - -CACHE_BASE=$DIB_IMAGE_CACHE/source-repositories -OLD_CACHE_BASE=$DIB_IMAGE_CACHE/repository-sources -make_new_cache $OLD_CACHE_BASE $CACHE_BASE -mkdir -p $CACHE_BASE -# Use the IMAGE_NAME from the calling script, and make it unique with the temporary path -GIT_MANIFEST_NAME=dib-manifest-git-$(basename ${IMAGE_NAME}) -GIT_MANIFEST_CACHE_NAME=${GIT_MANIFEST_NAME}_$(dirname ${TMP_MOUNT_PATH##*.}) -GIT_MANIFEST=$CACHE_BASE/${GIT_MANIFEST_CACHE_NAME} -rm -f $GIT_MANIFEST - -# Get source repositories for the target -for _SOURCEREPO in $(find $TMP_HOOKS_PATH -maxdepth 1 -name "source-repository-*" -not -name '*~'); do - repo_flock=$CACHE_BASE/repositories_flock - ( - echo "Getting $repo_flock: $(date) for $_SOURCEREPO" - if ! flock -w 600 9 ; then - echo "Did not get $repo_flock: $(date)" - exit 1 - fi - get_repos_for_element $_SOURCEREPO - ) 9> $repo_flock -done - -# Copy the manifest into the image if it exists (there may be no git repositories used) -if [ -e "$GIT_MANIFEST" ] ; then - sudo mv $GIT_MANIFEST $TMP_MOUNT_PATH/${DIB_MANIFEST_IMAGE_DIR}/$GIT_MANIFEST_NAME -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/source-repositories/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/source-repositories/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/source-repositories/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/source-repositories/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# Git isn't a dependency of this element, but is a dependency of pbr -# if you are doing pip install on a git cloned directory, because this -# looks to be a fairly common pattern it makes sense to have git on the -# target image -git: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/source-repositories/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/source-repositories/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/source-repositories/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/source-repositories/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -{ - "family": { - "gentoo": { - "git": "dev-vcs/git" - }, - "suse": { - "git": "git-core" - } - }, - "default": { - "git": "git" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/source-repositories/README.rst python-diskimage-builder-2.17.0/doc/source/elements/source-repositories/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/source-repositories/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/source-repositories/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -=================== -source-repositories -=================== -With this element other elements can register their installation source by -placing their details in the file ``source-repository-*``. - -source-repository-* file format -------------------------------- - -The plain text file format is space separated and has four mandatory fields -optionally followed by fields which are type dependent:: - - [] - -``name`` - Identifier for the source repository. Should match the file suffix. - -``type`` - Format of the source. Either ``git``, ``tar``, ``package`` or ``file``. - -``destination`` - Base path to place sources. - -``location`` - Resource to fetch sources from. For ``git`` the location is cloned. For - ``tar`` it is extracted. - -``ref`` (optional). Meaning depends on the ``type``: - ``file``: unused/ignored. - - ``git``: a git reference to fetch. A value of "``*``" prunes and fetches all - heads and tags. Defaults to ``master`` if not specified. - - ``tar``: - | "``.``" extracts the entire contents of the tarball. - | "``*``" extracts the contents within all its subdirectories. - | A subdirectory path may be used to extract only its contents. - | A specific file path within the archive is **not supported**. - -The lines in the source-repository scripts are eval'd, so they may contain -environment variables. - -The ``package`` type indicates the element should install from packages onto -the root filesystem of the image build during the ``install.d`` phase. If the -element provides an -package-install directory, symlinks will be -created for those scripts instead. - -``git`` and ``tar`` are treated as source installs. If the element provides an --source-install directory under it's ``install.d`` hook directory, -symlinks to the scripts in that directory will be created under ``install.d`` for -the image build. - -For example, the nova element would provide:: - - nova/install.d/nova-package-install/74-nova - nova/install.d/nova-source-install/74-nova - -source-repositories will create the following symlink for the package install -type:: - - install.d/74-nova -> nova-package-install/74-nova - -Or, for the source install type:: - - install.d/74-nova -> nova-source-install/74-nova - -All other scripts that exist under ``install.d`` for an element will be executed as -normal. This allows common install code to live in a script outside of --package-install or -source-install. - -If multiple elements register a source location with the same -then source-repositories will exit with an error. Care should therefore be taken -to only use elements together that download source to different locations. - -The repository paths built into the image are stored in -etc/dib-source-repositories, one repository per line. This permits later review -of the repositories (by users or by other elements). - -The repository names and types are written to an environment.d hook script at -01-source-repositories-environment. This allows later hook scripts during the -install.d phase to know which install type to use for the element. - - -An example of an element "custom-element" that wants to retrieve the ironic -source from git and pbr from a tarball would be: - -*Element file: elements/custom-element/source-repository-ironic*:: - - ironic git /usr/local/ironic git://git.openstack.org/openstack/ironic.git - -*File : elements/custom-element/source-repository-pbr*:: - - pbr tar /usr/local/pbr http://tarballs.openstack.org/pbr/pbr-master.tar.gz . - -diskimage-builder will then retrieve the sources specified and place them -at the directory ````. - - -Override per source -------------------- - -A number of environment variables can be set by the process calling -diskimage-builder which can change the details registered by the element, these -are: - - ``DIB_REPOTYPE_`` : change the registered type - - ``DIB_REPOLOCATION_`` : change the registered location - - ``DIB_REPOREF_`` : change the registered reference - -For example if you would like diskimage-builder to get ironic from a local -mirror you would override the ```` field and could set: - -.. sourcecode:: sh - - DIB_REPOLOCATION_ironic=git://localgitserver/ironic.git - -*As you can see above, the \ of the repo is used in several bash -variables. In order to make this syntactically feasible, any characters not in -the set \[A-Za-z0-9_\] will be converted to \_* - -*For instance, a repository named "diskimage-builder" would set a variable called -"DIB_REPOTYPE_diskimage_builder"* - - -Alternatively if you would like to use the keystone element and build an image with -keystone from a stable branch *stable/grizzly* then you would set: - -.. sourcecode:: sh - - DIB_REPOREF_keystone=stable/grizzly - -If you wish to build an image using code from a Gerrit review, you can set -``DIB_REPOLOCATION_`` and ``DIB_REPOREF_`` to the values given by -Gerrit in the fetch/pull section of a review. For example, setting up Nova with -change 61972 at patchset 8: - -.. sourcecode:: sh - - DIB_REPOLOCATION_nova=https://review.openstack.org/openstack/nova - DIB_REPOREF_nova=refs/changes/72/61972/8 - - -Alternate behaviors -------------------- - -Override git remote -^^^^^^^^^^^^^^^^^^^ - -The base url for all git repositories can be set by use of: - - ``DIB_GITREPOBASE`` - -So setting ``DIB_GITREPOBASE=https://github.com/`` when the repo location is -set to http://git.openstack.org/openstack/nova.git will result in use of the -https://github.com/openstack/nova.git repository instead. - -Disable external fetches -^^^^^^^^^^^^^^^^^^^^^^^^ - -When doing image builds in environments where external resources are not allowed, -it is possible to disable fetching of all source repositories by including an -element in the image that sets ``NO_SOURCE_REPOSITORIES=1`` in an -``environment.d`` script. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/stable-interface-names/element-deps python-diskimage-builder-2.17.0/doc/source/elements/stable-interface-names/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/stable-interface-names/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/stable-interface-names/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/stable-interface-names/install.d/02-stable-interface-names python-diskimage-builder-2.17.0/doc/source/elements/stable-interface-names/install.d/02-stable-interface-names --- python-diskimage-builder-2.11.0/doc/source/elements/stable-interface-names/install.d/02-stable-interface-names 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/stable-interface-names/install.d/02-stable-interface-names 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# remove softlink to /dev/null which disables these rules -NET_NAME_SLOT_FILE="/etc/udev/rules.d/80-net-name-slot.rules" -if [ -h $NET_NAME_SLOT_FILE ]; then - rm $NET_NAME_SLOT_FILE -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/stable-interface-names/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/stable-interface-names/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/stable-interface-names/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/stable-interface-names/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -biosdevname: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/stable-interface-names/README.rst python-diskimage-builder-2.17.0/doc/source/elements/stable-interface-names/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/stable-interface-names/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/stable-interface-names/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -====================== -stable-interface-names -====================== -Does the following: - - * Enables stable network interface naming (em1, em2, etc) by - installing the biosdevname and removes any symlinks which may - disable udev rules, etc. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/svc-map/bin/svc-map python-diskimage-builder-2.17.0/doc/source/elements/svc-map/bin/svc-map --- python-diskimage-builder-2.11.0/doc/source/elements/svc-map/bin/svc-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/svc-map/bin/svc-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2012 Hewlett-Packard Development Company, L.P. -# Copyright 2014 Red Hat, Inc. -# -# 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. -import os -import sys - -import yaml - - -def load_service_mapping(filepath="/usr/share/svc-map/services"): - if not os.path.isfile(filepath): - return {} - with open(filepath, 'r') as data_file: - return yaml.safe_load(data_file.read()) - - -def main(): - for arg in sys.argv[1:]: - # We need to support the service name being different when installing - # from source vs. packages. So, if the requested service file already - # exists, just use that. - if os.path.exists('/lib/systemd/system/%s.service' % arg): # systemd - print(arg) - elif os.path.exists('/etc/init/%s.conf' % arg): # upstart - print(arg) - else: - service_map = load_service_mapping() - name = service_map.get(arg, arg) - print(name) - sys.exit(0) - - -if __name__ == '__main__': - main() diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/svc-map/extra-data.d/10-merge-svc-map-files python-diskimage-builder-2.17.0/doc/source/elements/svc-map/extra-data.d/10-merge-svc-map-files --- python-diskimage-builder-2.11.0/doc/source/elements/svc-map/extra-data.d/10-merge-svc-map-files 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/svc-map/extra-data.d/10-merge-svc-map-files 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -#!/usr/bin/env python -# -# 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. - -import os -import sys - -import yaml - - -def os_family(distro): - "Given a distribution, returns a operating system family." - family = None - if distro in ['centos', 'centos7', 'fedora', 'rhel', 'rhel7']: - family = 'redhat' - elif distro in ['debian', 'ubuntu']: - family = 'debian' - elif distro == 'opensuse': - family = 'suse' - return family - - -def merge_data(source, destination, distro): - """Merges two dictionaries and filters on distro. - - Merges two dictionaries and filters on distro family, or default (in order) - """ - result = dict() - result.update(destination) - family = os_family(distro) - for servicename, mapping in source.items(): - if servicename in result: - raise Exception("%s already found in services list" % servicename) - if distro in mapping: - result[servicename] = mapping.get(distro) - elif family in mapping: - result[servicename] = mapping.get(family) - elif 'default' in mapping: - result[servicename] = mapping.get('default') - else: - result[servicename] = servicename - - return result - - -def write_data_to_file(data, service_file_path): - """Writes yaml data to a specified path.""" - with open(service_file_path, 'w') as destination: - yaml.dump(data, destination, default_flow_style=False) - - -def main(): - elements = yaml.safe_load(os.environ.get("IMAGE_ELEMENT_YAML")) - service_names = dict() - for element, path in elements.items(): - data_path = os.path.join(path, "svc-map") - if os.path.exists(data_path): - with open(data_path, 'r') as dataFile: - data = yaml.safe_load(dataFile.read()) - try: - service_names = merge_data( - data, - service_names, - os.environ.get("DISTRO_NAME")) - except Exception as err: - print("%s. Check %s for duplicate" - " service name." % (err, element)) - sys.exit(1) - - write_data_to_file( - service_names, - os.path.join(os.environ['TMP_MOUNT_PATH'], 'tmp', 'svc-map-services')) - - -if __name__ == "__main__": - main() diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/svc-map/extra-data.d/11-copy-svc-map-file python-diskimage-builder-2.17.0/doc/source/elements/svc-map/extra-data.d/11-copy-svc-map-file --- python-diskimage-builder-2.11.0/doc/source/elements/svc-map/extra-data.d/11-copy-svc-map-file 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/svc-map/extra-data.d/11-copy-svc-map-file 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ "${DIB_DEBUG_TRACE:-1}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -sudo install -D -m 0644 "$TMP_MOUNT_PATH/tmp/svc-map-services" "$TMP_MOUNT_PATH/usr/share/svc-map/services" diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/svc-map/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/svc-map/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/svc-map/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/svc-map/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -PyYAML: - phase: pre-install.d diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/svc-map/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/svc-map/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/svc-map/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/svc-map/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -{ - "family": { - "redhat": { - "PyYAML": "PyYAML" - }, - "debian": { - "PyYAML": "python-yaml" - }, - "suse": { - "PyYAML": "python-PyYAML" - } - }, - "default": { - "PyYAML": "PyYAML" - } -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/svc-map/README.rst python-diskimage-builder-2.17.0/doc/source/elements/svc-map/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/svc-map/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/svc-map/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -======= -svc-map -======= -Map service names to distro specific services. - -Provides the following: - - * bin/svc-map - - usage: svc-map [-h] SERVICE - - Translate service name to distro specific name. - - optional arguments: - -h, --help show this help message and exit - - * Any element may create its own svc-map YAML config file using - the one of 3 sections for the distro/family/ and or default. - The family is set automatically within svc-map based on - the supplied distro name. Families include: - - + redhat: includes centos, fedora, and rhel distros - + debian: includes debian and ubuntu distros - + suse: includes the opensuse distro - - The most specific section takes priority. Example for Nova and Glance - (NOTE: default is using the common value for redhat and suse families) - - The key used for the service name should always be the same name used for - the source installation of the service. The svc-map script will check for - the source name against systemd and upstart and return that name if it - exists instead of the mapped name. - - Example format for Nova:: - - nova-api: - default: openstack-nova-api - debian: nova-api - nova-cert: - default: openstack-nova-cert - debian: nova-cert - nova-compute: - default: openstack-nova-compute - debian: nova-compute - nova-conductor: - default: openstack-nova-conductor - debian: nova-conductor - nova-consoleauth: - default: openstack-nova-console - debian: nova-console - - - Example format for Glance:: - - glance-api: - debian: glance-api - default: openstack-glance-api - glance-reg: - debian: glance-reg - default: openstack-glance-registry - - - If the distro is of the debian family the combined services file would be:: - - nova-cert: nova-cert - nova-compute: nova-compute - glance-api: glance-api - nova-conductor: nova-conductor - nova-api: nova-api - glance-reg: glance-reg - nova-consoleauth: nova-console - - - If the distro is of the suse or redhat families the combined services file would be:: - - nova-cert: openstack-nova-cert - nova-compute: openstack-nova-compute - glance-reg: openstack-glance-registry - nova-conductor: openstack-nova-conductor - glance-api: openstack-glance-api - nova-consoleauth: openstack-nova-console - nova-api: openstack-nova-api - - - Example commands using this format:: - - svc-map nova-compute - - Returns: openstack-nova-compute - - svc-map nova-compute - - Returns: openstack-nova-compute - - svc-map nova-compute - - Returns: nova-compute - - * This output can be used to filter what other tools actually install - (install-services can be modified to use this for example) - - * If you pass more than one service argument, the result for each service - is printed on its own line. - - * Individual svc-map files live within each element. For example - if you have created an Apache element your svc-map YAML file - should be created at elements/apache/svc-map. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/svc-map/tests/test_data_merge.py python-diskimage-builder-2.17.0/doc/source/elements/svc-map/tests/test_data_merge.py --- python-diskimage-builder-2.11.0/doc/source/elements/svc-map/tests/test_data_merge.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/svc-map/tests/test_data_merge.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,181 +0,0 @@ -# Copyright 2014 Red Hat, Inc. -# -# 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. -import imp -import os -from oslotest import base - -module_path = (os.path.dirname(os.path.realpath(__file__)) + - '/../extra-data.d/10-merge-svc-map-files') -service_map = imp.load_source('service_map', module_path) - - -class TestDataMerge(base.BaseTestCase): - - nova_api_services = { - u'nova-api': { - u'debian': u'nova-api', - u'default': u'openstack-nova-api' - }, - u'nova-cert': { - u'debian': u'nova-cert', - u'default': u'openstack-nova-cert' - }, - u'nova-compute': { - u'debian': u'nova-compute', - u'default': u'openstack-nova-compute' - }, - u'nova-conductor': { - u'debian': u'nova-conductor', - u'default': u'openstack-nova-conductor' - }, - u'nova-consoleauth': { - u'debian': u'nova-console', - u'default': u'openstack-nova-console' - } - } - - glance_api_services = { - u'glance-api': { - u'debian': u'glance-api', - u'default': u'openstack-glance-api' - }, - u'glance-reg': { - u'debian': u'glance-reg', - u'default': u'openstack-glance-registry' - } - } - - cinder_api_services = { - u'cinder-api': { - u'debian': u'cinder-api', - u'default': u'openstack-cinder-api' - }, - u'cinder-scheduler': { - u'debian': u'cinder-scheduler', - u'default': u'openstack-cinder-scheduler' - } - } - - def test_merge_data_fedora(self): - - fedora_nova_api_services = { - u'nova-api': u'openstack-nova-api', - u'nova-cert': u'openstack-nova-cert', - u'nova-compute': u'openstack-nova-compute', - u'nova-conductor': u'openstack-nova-conductor', - u'nova-consoleauth': u'openstack-nova-console' - } - - fedora_nova_glance_services = { - u'nova-api': u'openstack-nova-api', - u'nova-cert': u'openstack-nova-cert', - u'nova-compute': u'openstack-nova-compute', - u'nova-conductor': u'openstack-nova-conductor', - u'nova-consoleauth': u'openstack-nova-console', - u'glance-api': u'openstack-glance-api', - u'glance-reg': u'openstack-glance-registry' - } - - fedora_nova_glance_cinder_services = { - u'nova-api': u'openstack-nova-api', - u'nova-cert': u'openstack-nova-cert', - u'nova-compute': u'openstack-nova-compute', - u'nova-conductor': u'openstack-nova-conductor', - u'nova-consoleauth': u'openstack-nova-console', - u'glance-api': u'openstack-glance-api', - u'glance-reg': u'openstack-glance-registry', - u'cinder-api': u'openstack-cinder-api', - u'cinder-scheduler': u'openstack-cinder-scheduler', - } - - result = dict() - result = service_map.merge_data(self.nova_api_services, - result, - "fedora") - - self.assertDictEqual(result, - fedora_nova_api_services, - "Merge failed") - - result = service_map.merge_data(self.glance_api_services, - result, - "fedora") - - self.assertDictEqual(result, - fedora_nova_glance_services, - "Merge failed") - - result = service_map.merge_data(self.cinder_api_services, - result, - "fedora") - self.assertDictEqual(result, - fedora_nova_glance_cinder_services, - "Merge failed") - - def test_merge_data_ubuntu(self): - - ubuntu_nova_api_services = { - u'nova-api': u'nova-api', - u'nova-cert': u'nova-cert', - u'nova-compute': u'nova-compute', - u'nova-conductor': u'nova-conductor', - u'nova-consoleauth': u'nova-console' - } - - ubuntu_nova_glance_services = { - u'nova-api': u'nova-api', - u'nova-cert': u'nova-cert', - u'nova-compute': u'nova-compute', - u'nova-conductor': u'nova-conductor', - u'nova-consoleauth': u'nova-console', - u'glance-api': u'glance-api', - u'glance-reg': u'glance-reg' - } - - ubuntu_nova_glance_cinder_services = { - u'nova-api': u'nova-api', - u'nova-cert': u'nova-cert', - u'nova-compute': u'nova-compute', - u'nova-conductor': u'nova-conductor', - u'nova-consoleauth': u'nova-console', - u'glance-api': u'glance-api', - u'glance-reg': u'glance-reg', - u'cinder-api': u'cinder-api', - u'cinder-scheduler': u'cinder-scheduler' - } - - result = dict() - result = service_map.merge_data(self.nova_api_services, - result, - "ubuntu") - - self.assertDictEqual(result, - ubuntu_nova_api_services, - "Merge failed") - - result = service_map.merge_data(self.glance_api_services, - result, - "ubuntu") - - self.assertDictEqual(result, - ubuntu_nova_glance_services, - "Merge failed") - - result = service_map.merge_data(self.cinder_api_services, - result, - "ubuntu") - - self.assertDictEqual(result, - ubuntu_nova_glance_cinder_services, - "Merge failed") diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/sysctl/bin/sysctl-set-value python-diskimage-builder-2.17.0/doc/source/elements/sysctl/bin/sysctl-set-value --- python-diskimage-builder-2.11.0/doc/source/elements/sysctl/bin/sysctl-set-value 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/sysctl/bin/sysctl-set-value 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#!/bin/bash -# -# Copied from tripleo-image-element's sysctl element -# -# Validate and manage setting sysctl settings. -# -# The script is called with name/value pairs which are stored -# in the system default sysctl.d directory. Before adding new -# settings a validation is done to ensure that conflicting -# sysctl settings have not been requested. Once finished sysctl -# is used to activate the changes. - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -NAME=${1:-} -VALUE=${2:-} -# Optional comment used to describe the setting -COMMENT=${3:-"This file was created by diskimage-builder."} - -if [ -z "$NAME" -o -z "$VALUE" ]; then - echo "NAME and VALUE are required." - exit 1 -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 - - if ! sysctl -a | grep -q "^$NAME"; then - echo "Invalid sysctl key: $NAME" - exit 1 - fi - - sysctl-write-value $NAME "$VALUE" "$COMMENT" - - sysctl -p $FILENAME - -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/sysctl/bin/sysctl-write-value python-diskimage-builder-2.17.0/doc/source/elements/sysctl/bin/sysctl-write-value --- python-diskimage-builder-2.11.0/doc/source/elements/sysctl/bin/sysctl-write-value 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/sysctl/bin/sysctl-write-value 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -#!/bin/bash -# -# Copied from tripleo-image-element's sysctl element -# -# Validate and manage setting sysctl settings. -# -# The script is called with name/value pairs which are stored -# in the system default sysctl.d directory. This script performs -# no checking, just writing out the file. - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -NAME=${1:-} -VALUE=${2:-} -# Optional comment used to describe the setting -COMMENT=${3:-"This file was created by diskimage-builder."} - -if [ -z "$NAME" -o -z "$VALUE" ]; then - echo "Usage: sysctl-write-value [comment]" - exit 1 -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 < /etc/machine-id -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/sysprep/README.rst python-diskimage-builder-2.17.0/doc/source/elements/sysprep/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/sysprep/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/sysprep/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -sysprep -======= - -This element holds configuration and scripts that are common for all -distributions. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/uboot/cleanup.d/98-uboot python-diskimage-builder-2.17.0/doc/source/elements/uboot/cleanup.d/98-uboot --- python-diskimage-builder-2.11.0/doc/source/elements/uboot/cleanup.d/98-uboot 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/uboot/cleanup.d/98-uboot 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -function post_process() -{ - mkimage -A $1 -O linux -T kernel -C none -a $UBOOT_KERNEL_ADDR -e $UBOOT_KERNEL_EP -n "Kernel" -d $KERNEL uImage - mv uImage $KERNEL - mkimage -A $1 -O linux -T ramdisk -a 0 -n "RAMdisk" -C gzip -d $RAMDISK uInitrd - mv uInitrd $RAMDISK -} - -UBOOT_KERNEL_ADDR=${UBOOT_KERNEL_ADDR:-0x80000} -UBOOT_KERNEL_EP=${UBOOT_KERNEL_EP:-0x80000} -[ -n "$TARGET_ROOT" ] - -# Check if RAMDISK is being built. -if [ -f "$TARGET_ROOT/tmp/ramdisk" ] ; then - KERNEL="$TARGET_ROOT/tmp/kernel" - RAMDISK="$TARGET_ROOT/tmp/ramdisk" -else - source "$_LIB/img-functions" - # Dig up the initrd and kernel to use. - select_boot_kernel_initrd "$TARGET_ROOT" - KERNEL="$TARGET_ROOT/boot/$KERNEL" - RAMDISK="$TARGET_ROOT/boot/$RAMDISK" -fi - -case "$ARCH" in - arm*) - post_process arm - ;; -esac diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/uboot/README.rst python-diskimage-builder-2.17.0/doc/source/elements/uboot/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/uboot/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/uboot/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -===== -uboot -===== -Perform kernel/initrd post-processing for UBoot. - -This element helps post-process the kernel/initrd -for use with uboot. It works with ramdisk images -as well as user images. - -This element needs u-boot-tools to be installed -on the host. - -The load address and entry point for UBoot kernel -can be specified as shown in the example below. - -Example: - export UBOOT\_KERNEL\_ADDR=0x80000 - export UBOOT\_KERNEL\_EP=0x80000 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/element-deps python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -cache-url -cloud-init-datasources -dkms -dpkg -ubuntu-common diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/element-provides python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/element-provides --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -operating-system diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/environment.d/10-ubuntu-distro-name.bash python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/environment.d/10-ubuntu-distro-name.bash --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/environment.d/10-ubuntu-distro-name.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/environment.d/10-ubuntu-distro-name.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -export DISTRO_NAME=ubuntu -export DIB_RELEASE=${DIB_RELEASE:-xenial} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/environment.d/99-cloud-init-datasources.bash python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/environment.d/99-cloud-init-datasources.bash --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/environment.d/99-cloud-init-datasources.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/environment.d/99-cloud-init-datasources.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# NOTE(adam_g): Until (LP: #1316475) is resolved in Ubuntu, default to only -# allowing the Ec2 data source from being queried on first boot, unless -# specified otherwise. -export DIB_CLOUD_INIT_DATASOURCES=${DIB_CLOUD_INIT_DATASOURCES:-"Ec2"} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/install.d/99-autoremove python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/install.d/99-autoremove --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/install.d/99-autoremove 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/install.d/99-autoremove 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -apt-get -y autoremove diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -linux-image-generic: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/pre-install.d/00-remove-apt-xapian-index python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/pre-install.d/00-remove-apt-xapian-index --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/pre-install.d/00-remove-apt-xapian-index 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/pre-install.d/00-remove-apt-xapian-index 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# This package is broken and causes real issues on update: -# https://bugs.launchpad.net/ubuntu/+source/apt-xapian-index/+bug/1227420 -apt-get --yes remove apt-xapian-index || : diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/pre-install.d/00-remove-grub python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/pre-install.d/00-remove-grub --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/pre-install.d/00-remove-grub 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/pre-install.d/00-remove-grub 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -#!/bin/bash -# The grub post-kernel install hook will barf if the block device can't be -# found (as happens in a chroot). -# Temporarily remove grub, to avoid that confusion. - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if dpkg-query -W grub-pc; then - apt-get -y remove grub-pc -fi - -if dpkg-query -W grub2-common; then - apt-get -y remove grub2-common -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/pre-install.d/01-set-ubuntu-mirror python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/pre-install.d/01-set-ubuntu-mirror --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/pre-install.d/01-set-ubuntu-mirror 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/pre-install.d/01-set-ubuntu-mirror 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-} - -[ -n "$DIB_DISTRIBUTION_MIRROR" ] || exit 0 - -sudo sed -ie "s&http://\(archive\|security\).ubuntu.com/ubuntu&$DIB_DISTRIBUTION_MIRROR&" \ - /etc/apt/sources.list diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/README.rst python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -====== -ubuntu -====== - -Use Ubuntu cloud images as the baseline for built disk images. - -Overrides: - - * To use a non-default URL for downloading base Ubuntu cloud images, - use the environment variable ``DIB_CLOUD_IMAGES`` - * To download a non-default release of Ubuntu cloud images, use the - environment variable ``DIB_RELEASE``. This element will export the - ``DIB_RELEASE`` variable. - -.. element_deps:: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/root.d/10-cache-ubuntu-tarball python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/root.d/10-cache-ubuntu-tarball --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/root.d/10-cache-ubuntu-tarball 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/root.d/10-cache-ubuntu-tarball 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -#!/bin/bash -# These are useful, or at worst not harmful, for all images we build. - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$ARCH" ] -[ -n "$TARGET_ROOT" ] - -shopt -s extglob - -DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud-images.ubuntu.com} -DIB_RELEASE=${DIB_RELEASE:-trusty} -BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-$DIB_RELEASE-server-cloudimg-$ARCH-root.tar.gz} -SHA256SUMS=${SHA256SUMS:-https://${DIB_CLOUD_IMAGES##http?(s)://}/$DIB_RELEASE/current/SHA256SUMS} -CACHED_FILE=$DIB_IMAGE_CACHE/$BASE_IMAGE_FILE -CACHED_FILE_LOCK=$DIB_LOCKFILES/$BASE_IMAGE_FILE.lock -CACHED_SUMS=$DIB_IMAGE_CACHE/SHA256SUMS.ubuntu.$DIB_RELEASE.$ARCH - -function get_ubuntu_tarball() { - if [ -n "$DIB_OFFLINE" -a -f "$CACHED_FILE" ] ; then - echo "Not checking freshness of cached $CACHED_FILE." - else - echo "Fetching Base Image" - $TMP_HOOKS_PATH/bin/cache-url $SHA256SUMS $CACHED_SUMS - $TMP_HOOKS_PATH/bin/cache-url \ - $DIB_CLOUD_IMAGES/$DIB_RELEASE/current/$BASE_IMAGE_FILE $CACHED_FILE - pushd $DIB_IMAGE_CACHE - if ! grep "$BASE_IMAGE_FILE" $CACHED_SUMS | sha256sum --check - ; then - # It is likely that an upstream http(s) proxy has given us a skewed - # result - either a cached SHA file or a cached image. Use cache-busting - # to get (as long as caches are compliant...) fresh files. - # Try the sha256sum first, just in case that is the stale one (avoiding - # downloading the larger image), and then if the sums still fail retry - # the image. - $TMP_HOOKS_PATH/bin/cache-url -f $SHA256SUMS $CACHED_SUMS - if ! grep "$BASE_IMAGE_FILE" $CACHED_SUMS | sha256sum --check - ; then - $TMP_HOOKS_PATH/bin/cache-url -f \ - $DIB_CLOUD_IMAGES/$DIB_RELEASE/current/$BASE_IMAGE_FILE $CACHED_FILE - grep "$BASE_IMAGE_FILE" $CACHED_SUMS | sha256sum --check - - fi - fi - popd - fi - # Extract the base image (use --numeric-owner to avoid UID/GID mismatch between - # image tarball and host OS e.g. when building Ubuntu image on an openSUSE host) - sudo tar -C $TARGET_ROOT --numeric-owner -xzf $DIB_IMAGE_CACHE/$BASE_IMAGE_FILE -} - -( - echo "Getting $CACHED_FILE_LOCK: $(date)" - # Wait up to 20 minutes for another process to download - if ! flock -w 1200 9 ; then - echo "Did not get $CACHED_FILE_LOCK: $(date)" - exit 1 - fi - get_ubuntu_tarball -) 9> $CACHED_FILE_LOCK diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/trusty-build-succeeds/element-deps python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/trusty-build-succeeds/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/trusty-build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/trusty-build-succeeds/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -openstack-ci-mirrors diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/trusty-build-succeeds/environment.d/10-set-distro.bash python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/trusty-build-succeeds/environment.d/10-set-distro.bash --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/trusty-build-succeeds/environment.d/10-set-distro.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/trusty-build-succeeds/environment.d/10-set-distro.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DIB_RELEASE=trusty diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/trusty-build-succeeds/README.rst python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/trusty-build-succeeds/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/trusty-build-succeeds/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/trusty-build-succeeds/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Verify we can build a ubuntu image. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/element-deps python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -openstack-ci-mirrors -vm diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/environment.d/10-set-distro.bash python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/environment.d/10-set-distro.bash --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/environment.d/10-set-distro.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/environment.d/10-set-distro.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DIB_RELEASE=xenial diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/README.rst python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -Verify we can build a ubuntu image. - -Note this test includes the vm element to test the bootloader install, -and specifies to output a .qcow2 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/test-output-formats python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/test-output-formats --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/test-output-formats 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu/test-elements/xenial-build-succeeds/test-output-formats 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -tar,qcow2 \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-common/element-deps python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-common/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-common/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-common/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -sysprep diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-common/install.d/80-disable-rfc3041 python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-common/install.d/80-disable-rfc3041 --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-common/install.d/80-disable-rfc3041 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-common/install.d/80-disable-rfc3041 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#!/bin/bash -# Copyright 2016, Rackspace US, Inc. -# -# 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. - -# dib-lint: disable=set setu setpipefail indent -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -e - -# This will disable the privacy extensions for IPv6 (RFC4941) -# (RFC4941 obsoletes RFC3041) -# -# Note that depending on the implementation of how the sysctl -# settings are applied there is a race condition: there might be -# a small time-frame where the original Ubuntu settings from -# /etc/sysctl.d/10-ipv6-privacy.conf are already applied but the -# new settings from /etc/sysctl.d/99-cloudimg-ipv6.conf -# not yet. -# If during this time all started network interfaces will -# use the privacy extension. -cat > /etc/sysctl.d/99-cloudimg-ipv6.conf < $CACHED_FILE_LOCK diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/element-deps python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -debootstrap -package-installs -ubuntu-common diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/element-provides python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/element-provides --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -operating-system diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/environment.d/10-ubuntu-distro-name.bash python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/environment.d/10-ubuntu-distro-name.bash --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/environment.d/10-ubuntu-distro-name.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/environment.d/10-ubuntu-distro-name.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -export DISTRO_NAME=ubuntu -export DIB_RELEASE=${DIB_RELEASE:-xenial} -export DIB_DEBIAN_COMPONENTS=${DIB_DEBIAN_COMPONENTS:-main,universe} - -# There are two default distro mirrors depending on architecture -ARCH=${ARCH:-} -if [[ "arm64 armhf powerpc ppc64el s390x" =~ "$ARCH" ]]; then - default_ubuntu_mirror=http://ports.ubuntu.com/ubuntu-ports -else - default_ubuntu_mirror=http://archive.ubuntu.com/ubuntu -fi - -export DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-$default_ubuntu_mirror} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -linux-image-generic: -initramfs-tools: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/pre-install.d/01-ubuntu-apt-update python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/pre-install.d/01-ubuntu-apt-update --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/pre-install.d/01-ubuntu-apt-update 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/pre-install.d/01-ubuntu-apt-update 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#!/bin/bash -# Copyright (c) 2014 Hewlett-Packard Development 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:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# We should manage this in a betterer way -cat << EOF >/etc/apt/sources.list -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE ${DIB_DEBIAN_COMPONENTS//,/ } -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-updates ${DIB_DEBIAN_COMPONENTS//,/ } -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-backports ${DIB_DEBIAN_COMPONENTS//,/ } -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-security ${DIB_DEBIAN_COMPONENTS//,/ } -EOF - -# Need to update to retrieve the signed Release file -apt-get update - -apt-get clean -apt-get dist-upgrade -y diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/README.rst python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -============== -ubuntu-minimal -============== - -The ``ubuntu-minimal`` element uses debootstrap for generating a -minimal image. In contrast the ``ubuntu`` element uses the cloud-image -as the initial base. - -By default this element creates the latest LTS release. The exact -setting can be found in the element's ``environment.d`` directory in -the variable ``DIB_RELEASE``. If a different release of Ubuntu should -be created, the variable ``DIB_RELEASE`` can be set appropriately. - -Note that this element installs ``systemd-sysv`` as the init system for -18.04+. - -.. element_deps:: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -#!/bin/bash -# Copyright (c) 2014 Hewlett-Packard Development 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:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# 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//,/ } -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-updates ${DIB_DEBIAN_COMPONENTS//,/ } -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-backports ${DIB_DEBIAN_COMPONENTS//,/ } -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-security ${DIB_DEBIAN_COMPONENTS//,/ } -EOF" - -sudo mount -t proc none $TARGET_ROOT/proc -sudo mount -t sysfs none $TARGET_ROOT/sys -trap "sudo umount $TARGET_ROOT/proc; sudo umount $TARGET_ROOT/sys" EXIT - -apt_get="sudo chroot $TARGET_ROOT /usr/bin/apt-get" # dib-lint: safe_sudo - -# Need to update to retrieve the signed Release file -$apt_get update - -$apt_get clean -$apt_get dist-upgrade -y - -to_install="" - -# pre-bionic (18.04) brought this in via debootstrap, but init -# dependencies have narrowed in the container world, so now we add it -# explicitly here so it's brought in early. -if [ $DIB_RELEASE != "trusty" ] && [ $DIB_RELEASE != "xenial" ]; then - to_install+="systemd-sysv " -fi - -# default required -to_install+="busybox sudo " # dib-lint: safe_sudo - -if [ "$DIB_PYTHON_VERSION" == "2" ]; then - to_install+="python " -elif [ "$DIB_PYTHON_VERSION" == "3" ]; then - to_install+="python3 " -else - echo "ERROR: DIB_PYTHON_VERSION is '$DIB_PYTHON_VERSION' but needs to be 2 or 3" - exit 1 -fi - -$apt_get install -y $to_install diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/element-deps python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -openstack-ci-mirrors diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/environment.d/10-set-distro.bash python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/environment.d/10-set-distro.bash --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/environment.d/10-set-distro.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/environment.d/10-set-distro.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DIB_RELEASE=trusty diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/README.rst python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/trusty-build-succeeds/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Verify we can build a ubuntu-minimal image. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/element-deps python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -openstack-ci-mirrors -vm diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/environment.d/10-set-distro.bash python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/environment.d/10-set-distro.bash --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/environment.d/10-set-distro.bash 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/environment.d/10-set-distro.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DIB_RELEASE=xenial diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/README.rst python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -Verify we can build a ubuntu-minimal image. - -Note this test includes the vm element to test the bootloader install, -and specifies to output a .qcow2 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/test-output-formats python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/test-output-formats --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/test-output-formats 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-minimal/test-elements/xenial-build-succeeds/test-output-formats 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -tar,qcow2 \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-signed/element-deps python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-signed/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-signed/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-signed/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -ubuntu diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-signed/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-signed/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-signed/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-signed/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -linux-signed-image-generic: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-signed/post-install.d/90-get-signed-kernel python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-signed/post-install.d/90-get-signed-kernel --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-signed/post-install.d/90-get-signed-kernel 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-signed/post-install.d/90-get-signed-kernel 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Hewlett-Packard Development 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 - -# Get signed kernel version -LATEST_SIGNED_KERNEL=$(ls /boot/vmlinu*.efi.signed | sort | tail -1) -if [ "$LATEST_SIGNED_KERNEL" == "" ]; then - echo "Unable to find a suitable kernel" >>/dev/stderr - exit 1 -fi - -SIGNED_KERNEL_VERSION=${LATEST_SIGNED_KERNEL##/boot/vmlinu[zx]-} -echo "Found signed ubuntu kernel version $SIGNED_KERNEL_VERSION" - -cat > /dib-signed-kernel-version << EOF -DIB_SIGNED_KERNEL_VERSION=$SIGNED_KERNEL_VERSION -EOF - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-signed/README.rst python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-signed/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/ubuntu-signed/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/ubuntu-signed/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -============= -ubuntu-signed -============= - -The ``ubuntu-signed`` element installs ``linux-signed-image-generic`` -that provides signed kernel that can be used for deploy in UEFI secure -boot mode. - -.. element_deps:: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/vm/block-device-default.yaml python-diskimage-builder-2.17.0/doc/source/elements/vm/block-device-default.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/vm/block-device-default.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/vm/block-device-default.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -# Default single partition loopback - -- local_loop: - name: image0 - -- partitioning: - base: image0 - label: mbr - partitions: - - name: root - flags: [ boot, primary ] - size: 100% - mkfs: - mount: - mount_point: / - fstab: - options: "defaults" - fsck-passno: 1 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/vm/block-device-ppc64el.yaml python-diskimage-builder-2.17.0/doc/source/elements/vm/block-device-ppc64el.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/vm/block-device-ppc64el.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/vm/block-device-ppc64el.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -# Default block device setup for PPC -# ---------------------------------- -# -# Details (extracted from [1]) -# -# Power Firmware (OFW) scans chosen (nvram value boot-device) device, -# for either PReP* partition or vfat. -# -# PReP is raw and small (8M max) partition which caries only stage1 -# binary. -# msdos partition table: -# - PReP partition have 0x41 type (must be active) -# - PReP partition must have boot flag set -# -# [1] https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/W51a7ffcf4dfd_4b40_9d82_446ebc23c550/page/PowerLinux%20Boot%20howto - -- local_loop: - name: image0 - -- partitioning: - base: image0 - label: mbr - partitions: - - name: boot - flags: [ boot, primary ] - type: '0x41' - size: 8MiB - - name: root - flags: [ primary ] - size: 100% - mkfs: - mount: - mount_point: / - fstab: - options: "defaults" - fsck-passno: 1 diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/vm/element-deps python-diskimage-builder-2.17.0/doc/source/elements/vm/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/vm/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/vm/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -bootloader diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/vm/finalise.d/50-remove-bogus-udev-links python-diskimage-builder-2.17.0/doc/source/elements/vm/finalise.d/50-remove-bogus-udev-links --- python-diskimage-builder-2.11.0/doc/source/elements/vm/finalise.d/50-remove-bogus-udev-links 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/vm/finalise.d/50-remove-bogus-udev-links 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [ $DISTRO_NAME = 'opensuse' ] ; then - # workaround for https://bugzilla.novell.com/show_bug.cgi?id=859493 - rm -f /dev/mapper/loop*_part1 -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/vm/README.rst python-diskimage-builder-2.17.0/doc/source/elements/vm/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/vm/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/vm/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -== -vm -== -Sets up a partitioned disk (rather than building just one filesystem with no -partition table). diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum/bin/install-packages python-diskimage-builder-2.17.0/doc/source/elements/yum/bin/install-packages --- python-diskimage-builder-2.11.0/doc/source/elements/yum/bin/install-packages 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum/bin/install-packages 1970-01-01 00:00:00.000000000 +0000 @@ -1,155 +0,0 @@ -#!/bin/bash - -# Copyright 2012 Hewlett-Packard Development 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:-0} -gt 1 ]; then - set -x -fi -set -eu -set -o pipefail - -EXTRA_ARGS= -ACTION=install -MAP_ELEMENT= - -# allow override for dnf, as shipped by default with >=F22 -YUM=${YUM:-yum} - -# save global xtrace state -_xtrace=$(set +o | grep xtrace) - -SCRIPTNAME=$(basename $0) -function show_options () { - echo "Usage: $SCRIPTNAME [package ...]" - echo - echo "Options:" - echo " -u -- update all packages" - echo " -d dir -- download the packages to directory" - echo " -e -- erase/remove packages" - echo " -m map -- use custom element package map (Example: -m nova)" - exit 0 -} - -while getopts "hud:em:" opt; do - case "$opt" in - u) - ${YUM} -y update; - exit 0 - ;; - d) - ACTION="download" - DOWNLOAD_PATH=$OPTARG - ;; - e) - ACTION="erase" - ;; - m) - MAP_ELEMENT=$OPTARG - ;; - h) - show_options - ;; - *) - exit 1 - ;; - esac -done -shift $((OPTIND-1)) - - -# Packages that aren't available in the distro but requested for installation -# can be ignored by adding them to the exclude list -BLACKLIST=$(cat /tmp/yum-blacklist 2>/dev/null || echo "") -WHITELIST="" -for i in "$@" -do - PKG_NAME=$i - if [ -n "$MAP_ELEMENT" ]; then - if ! PKG_NAME=$(pkg-map --element $MAP_ELEMENT $i); then - echo "bin/pkg-map error. $PKG_NAME" - exit 1 - fi - fi - if [[ ! ${BLACKLIST[*]} =~ $PKG_NAME ]]; then - WHITELIST="$WHITELIST $i" - else - echo "The package $i is not available and will not be installed" - fi -done -if [ -n "$WHITELIST" ]; then - if [ -f /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release ]; then - rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release - fi - if [ -n "$MAP_ELEMENT" ]; then - if ! PKGS=$(pkg-map --element $MAP_ELEMENT $WHITELIST); then - echo "bin/pkg-map error. $PKGS" - exit 1 - fi - else - PKGS=$(map-packages $WHITELIST) - fi - - if [ -z "${PKGS}" ]; then - echo "Not running install-packages $ACTION with empty packages list" - exit 0 - fi - - echo "Running install-packages ${ACTION}." - - if [ "$ACTION" == "download" ]; then - mkdir -p $DOWNLOAD_PATH - if [ ${YUM} == "dnf" ]; then - dnf download --destdir=$DOWNLOAD_PATH $PKGS - else - # note; you don't want to use yum --download only here. - # Firstly that only puts things in the yum cache - # directory, and secondly it acts funny if old versions - # are already in the cache. - if [ ! -f /usr/bin/yumdownloader ]; then - yum install -y yum-utils - fi - yumdownloader --destdir=$DOWNLOAD_PATH $PKGS - fi - exit 0 - fi - - # yum & dnf have a feature/bug where missing packages in a list of - # packages for install/erase do not raise an error exit [1]. - # There is a corner case when specifying just *one* package, where - # it will fail if the package is missing. Thus install-packages - # follows this behaviour; we may need to re-evaluate this at some - # point. - # - # [1] https://bugzilla.redhat.com/show_bug.cgi?id=965567 - set -o xtrace - ${YUM} -v -y $ACTION $EXTRA_ARGS $PKGS - - if [ "$ACTION" == "install" ]; then - if [ ${YUM} == "dnf" ]; then - # Make sure dnf won't autoremove these packages - dnf mark install $PKGS - fi - fi - $_xtrace - - # probably not the right place for this; but python-pip package on - # fedora/rh calls pip "pip-python" while the rest of the work - # expects it to be just called "pip" - for pkg in "$@"; do - if [ "$pkg" = "python-pip" ] ; then - alternatives --install /usr/bin/pip pip /usr/bin/pip-python 10 - fi - done -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum/cleanup.d/99-remove-yum-repo-conf python-diskimage-builder-2.17.0/doc/source/elements/yum/cleanup.d/99-remove-yum-repo-conf --- python-diskimage-builder-2.11.0/doc/source/elements/yum/cleanup.d/99-remove-yum-repo-conf 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum/cleanup.d/99-remove-yum-repo-conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# exit directly if DIB_YUM_REPO_CONF is not defined properly -if [ -z "${DIB_YUM_REPO_CONF:-}" ] ; then - echo "DIB_YUM_REPO_CONF is not set - no repo configurations will be cleaned up" - exit 0 -fi - -for file in $DIB_YUM_REPO_CONF; do - sudo rm -f $TMP_MOUNT_PATH/etc/yum.repos.d/$(basename $file) -done diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum/element-deps python-diskimage-builder-2.17.0/doc/source/elements/yum/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/yum/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -install-bin diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum/extra-data.d/99-yum-repo-conf python-diskimage-builder-2.17.0/doc/source/elements/yum/extra-data.d/99-yum-repo-conf --- python-diskimage-builder-2.11.0/doc/source/elements/yum/extra-data.d/99-yum-repo-conf 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum/extra-data.d/99-yum-repo-conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -#!/bin/bash -# Add additional yum repo configuration(s) with $DIB_YUM_REPO_CONF - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# exit directly if DIB_YUM_REPO_CONF is not defined properly -if [ -z "${DIB_YUM_REPO_CONF:-}" ] ; then - echo "DIB_YUM_REPO_CONF is not set - no repo configuration will be copied in" - exit 0 -fi - -for file in $DIB_YUM_REPO_CONF; do - if [ ! -f $file ]; then - echo "$file is not a valid yum repo configuration file." - echo "You should assign a list of proper yum repo configuration" - echo "files in DIB_YUM_REPO_CONF." - exit 1 - fi - - # copy the yum repo configuration - sudo cp -L -f $file $TMP_MOUNT_PATH/etc/yum.repos.d - -done diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum/post-install.d/99-reset-yum-conf python-diskimage-builder-2.17.0/doc/source/elements/yum/post-install.d/99-reset-yum-conf --- python-diskimage-builder-2.11.0/doc/source/elements/yum/post-install.d/99-reset-yum-conf 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum/post-install.d/99-reset-yum-conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then - cfg=/etc/dnf/dnf.conf - cachedir=/var/cache/dnf -else - cfg=/etc/yum.conf - cachedir=/var/cache/yum -fi - -sed -i "/^keepcache/c\keepcache=0" $cfg -sed -i "/^cachedir/c\cachedir=${cachedir}" $cfg diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum/pre-install.d/00-dnf-update python-diskimage-builder-2.17.0/doc/source/elements/yum/pre-install.d/00-dnf-update --- python-diskimage-builder-2.11.0/doc/source/elements/yum/pre-install.d/00-dnf-update 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum/pre-install.d/00-dnf-update 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -eq 22 ]]; then - # we need dnf mark command from dnf 1.1.1, which is pretty recent - dnf --refresh update -y dnf -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum/pre-install.d/01-yum-keepcache python-diskimage-builder-2.17.0/doc/source/elements/yum/pre-install.d/01-yum-keepcache --- python-diskimage-builder-2.11.0/doc/source/elements/yum/pre-install.d/01-yum-keepcache 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum/pre-install.d/01-yum-keepcache 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then - # dnf is slightly different; doesn't have these by default - cfg=/etc/dnf/dnf.conf - echo "keepcache=1" >> $cfg - echo "cachedir=/tmp/yum" >> $cfg -else - cfg=/etc/yum.conf - sed -i 's/keepcache=0/keepcache=1/' $cfg - sed -i 's/cachedir=\/var\/cache\/yum/cachedir=\/tmp\/yum/' $cfg -fi - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum/README.rst python-diskimage-builder-2.17.0/doc/source/elements/yum/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/yum/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -=== -yum -=== -Provide yum specific image building glue. - -RHEL/Fedora/CentOS and other yum based distributions need specific yum -customizations. - -Customizations include caching of downloaded yum packages outside of the build -chroot so that they can be reused by subsequent image builds. The cache -increases image building speed when building multiple images, especially on -slow connections. This is more effective than using an HTTP proxy as a yum -cache since the same rpm from different mirrors is often requested. - -Custom yum repository configurations can also be applied by defining -`DIB_YUM_REPO_CONF` to a space separated list of repo configuration files. The -files will be copied to /etc/yum.repos.d/ during the image build, and then -removed at the end of the build. Each repo file should be named differently to -avoid a filename collision. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum/root.d/50-yum-cache python-diskimage-builder-2.17.0/doc/source/elements/yum/root.d/50-yum-cache --- python-diskimage-builder-2.11.0/doc/source/elements/yum/root.d/50-yum-cache 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum/root.d/50-yum-cache 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$TARGET_ROOT" ] - -YUM_CACHE_DIR=$DIB_IMAGE_CACHE/yum -mkdir -p $YUM_CACHE_DIR - -sudo mkdir -p $TMP_MOUNT_PATH/tmp/yum -sudo mount --bind $YUM_CACHE_DIR $TMP_MOUNT_PATH/tmp/yum diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/cleanup.d/95-remove-yum-mirror python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/cleanup.d/95-remove-yum-mirror --- python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/cleanup.d/95-remove-yum-mirror 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/cleanup.d/95-remove-yum-mirror 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Hewlett-Packard Development 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. -# - -# dib-lint: disable=safe_sudo - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# This removes any build-time repos that might be set in 08-yum-chroot -if [[ -n ${DIB_YUM_MINIMAL_BOOTSTRAP_REPOS:-} ]]; then - - sudo rm -f $TMP_MOUNT_PATH/etc/yum.repos.d/dib-mirror*.repo - - for repo in $TMP_MOUNT_PATH/etc/yum.repos.d/*.USING_MIRROR; do - sudo mv $repo ${repo/.USING_MIRROR/} - done - -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/element-deps python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -redhat-common -rpm-distro -yum diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/install.d/10-base-networking python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/install.d/10-base-networking --- python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/install.d/10-base-networking 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/install.d/10-base-networking 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Hewlett-Packard Development 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:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# allow networking init scripts inside the container to work without extra steps -cat << EOF | sudo tee /etc/sysconfig/network > /dev/null -NETWORKING=yes -NETWORKING_IPV6=yes -NOZEROCONF=yes -EOF - -# If you want eth0 and eth1 created as DHCP based interfaces, enable -# this. You don't want this if systemd is going to call the -# interfaces on the real system something else, or if you're using a -# network-manager like cloud-init, glean or network-manager that will -# handle the interfaces dynamically. -if [[ "${DIB_YUM_MINIMAL_CREATE_INTERFACES:-0}" -eq "1" ]]; then - for interface in eth0 eth1; do - cat << EOF | tee /etc/sysconfig/network-scripts/ifcfg-$interface > /dev/null -DEVICE=$interface -BOOTPROTO=dhcp -ONBOOT=on -EOF - done -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -audit: -dracut: -dracut-config-generic: -grubby: -kernel: -initscripts: -man-pages: -lsb_release: -redhat-rpm-config: \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/pkg-map python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/pkg-map --- python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/pkg-map 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/pkg-map 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -{ - "family": { - "redhat": { - "lsb_release": "redhat-lsb-core" - } - } -} - diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/pre-install.d/03-yum-cleanup python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/pre-install.d/03-yum-cleanup --- python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/pre-install.d/03-yum-cleanup 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/pre-install.d/03-yum-cleanup 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Hewlett-Packard Development 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:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# effectively: febootstrap-minimize --keep-zoneinfo --keep-rpmdb --keep-services "$target" - -# This is only required on CentOS ... see notes in -# root.d/08-yum-chroot about %_install_langs -if [[ $DISTRO_NAME != "fedora" ]]; then - - # Stripping *all* locales is a bad idea. For now, we take the - # suggestion in [1] for reducing this - # [1] https://bugzilla.redhat.com/show_bug.cgi?id=156477 - - if [ ! -f /usr/lib/locale/locale-archive ]; then - die "locale-archive not found? Can not do cleanup." - fi - - # now the archive has everything in it, and is about 100MiB. Strip it - # to just en_US (basically, this is the locale we support if you ssh - # in, other than POSIX) - localedef --delete-from-archive \ - $(localedef --list-archive | grep -v '^en_US' | xargs) - - # This removes the locales from the archive index but doesn't rebuild - # the file, so it is still the same size (maybe it is sparse? - # presumably as it's mmapped you don't want to fiddle with the offsets - # of locales in the archive on a live system. We are not live). - - # build-locale-archive is a tool provided by the RH packaging of - # glibc. Documentation is scarce, but it takes the pre-built locales - # in the tmpl file and creates an archive. It seems originally the - # installer would set some flags to rpm to tell the package what - # languages to pick out of the template, but along the way, this was - # reverted to install them (size considered less important than locale - # support). - - # We hack this by moving the locale-archive we've removed the extra - # locales from to the template, then re-run the build. - mv /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl - - # rebuild archive from template - /usr/sbin/build-locale-archive - - # leave empty template behind as package does. I think this stops - # upgrades redoing things - echo > /usr/lib/locale/locale-archive.tmpl - - # remove the unnecessary source locale files and iconv files - pushd /usr/share/locale - find . ! -name 'locale.alias' -delete - popd - rm -rf {lib.lib64}/gconv - -fi - -# docs -rm -rf /usr/share/{doc,info,gnome/help} -# cracklib -rm -rf /usr/share/cracklib -# i18n -rm -rf /usr/share/i18n -# sln -rm -rf /sbin/sln -# ldconfig -rm -rf /etc/ld.so.cache /var/cache/ldconfig -mkdir -p --mode=0755 /var/cache/ldconfig diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/README.rst python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -=========== -yum-minimal -=========== -Base element for creating minimal yum-based images. - -This element is incomplete by itself, you'll want to use the centos-minimal -or fedora-minimal elements to get an actual base image. - -Use of this element will require 'yum' and 'yum-utils' to be installed on -Ubuntu and Debian. Nothing additional is needed on Fedora or CentOS. - -If you wish to have DHCP networking setup for eth0 & eth1 via -/etc/sysconfig/network-config scripts/ifcfg-eth[0|1], set the -environment variable `DIB_YUM_MINIMAL_CREATE_INTERFACES` to `1`. - -If you wish to build from specific mirrors, set -``DIB_YUM_MINIMAL_BOOTSTRAP_REPOS`` to a directory with the ``.repo`` -files to use during bootstrap and build. The repo files should be -named with a prefix ``dib-mirror-`` and will be removed from the final -image. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/root.d/08-yum-chroot python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/root.d/08-yum-chroot --- python-diskimage-builder-2.11.0/doc/source/elements/yum-minimal/root.d/08-yum-chroot 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/yum-minimal/root.d/08-yum-chroot 1970-01-01 00:00:00.000000000 +0000 @@ -1,320 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Hewlett-Packard Development 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. -# - -# dib-lint: disable=safe_sudo - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -source $_LIB/common-functions - -if [ -f ${TARGET_ROOT}/.extra_settings ] ; then - . ${TARGET_ROOT}/.extra_settings -fi -ARCH=${ARCH:-x86_64} -if [ $ARCH = amd64 ]; then - ARCH=x86_64 -fi -# Calling elements will need to set DISTRO_NAME and DIB_RELEASE -# TODO Maybe deal with DIB_DISTRIBUTION_MIRROR -http_proxy=${http_proxy:-} -YUM=${YUM:-yum} - -WORKING=$(mktemp --tmpdir=${TMP_DIR:-/tmp} -d) -EACTION="rm -r $WORKING" -trap "$EACTION" EXIT - -YUM_CACHE=$DIB_IMAGE_CACHE/yum -mkdir -p $YUM_CACHE - -# Note, on Debian/Ubuntu, %_dbpath is set in the RPM macros as -# ${HOME}/.rpmdb/ -- this makes sense as RPM isn't the system -# packager. This path is relative to the "--root" argument -_RPM="rpm --dbpath=/var/lib/rpm" - -# install the [fedora|centos]-[release|repo] packages inside the -# chroot, which are needed to bootstrap yum/dnf -# -# note this runs outside the chroot, where we're assuming the platform -# has yum/yumdownloader -function _install_repos { - local packages - local rc - - # pre-install the base system packages via rpm. We previously - # just left it up to yum to drag these in when we "yum install - # yum" in the chroot in _install_pkg_manager. This raised a small - # problem that inside the empty chroot yum went ahead and did a - # mkdir for /var/run to put some pid file in, which then messed up - # the "filesystem" package making /var/run a symlink to /run - # ... which leads to odd issues with a running system. - # - # TODO: these packages still have some small %posttrans stuff that - # depends on other packages (see rhbz#1306489) ... maybe the idea - # is that they are only installed in one big transaction with the - # rest of the system? but we don't want to use yum to do this - # (see above) so ... - packages="basesystem filesystem setup " - - packages+="${DISTRO_NAME}-release " - - # Starting in F21 this was split into a separate package - if [[ ${DISTRO_NAME} == 'fedora' ]]; then - packages+="fedora-repos " - fi - - # F27 started putting gpg keys into this separate package - if [[ ${DISTRO_NAME} = fedora && ${DIB_RELEASE} -gt 26 ]]; then - packages+="fedora-gpg-keys " - fi - - # By default, parent elements (fedora-minimal, centos-minimal) - # have a yum.repos.d directory in the element with a default repo; - # this is copied to TMP_HOOK_PATH by the usual hook-copying - # routines. In the gate, environment.d files for the funtional - # tests will set DIB_YUM_MINIMAL_BOOTSTRAP_REPOS -- this contains - # mirrors correct for the region setup by contrib/setup-gate-mirrors.sh - local repo=${DIB_YUM_MINIMAL_BOOTSTRAP_REPOS:-${TMP_HOOKS_PATH}/yum.repos.d} - - # yumdownloader puts repo xml files and such into a directory - # ${TMPDIR}/yum-$USER-random. Since we don't need this once the - # initial download happens, redirect TMPDIR for this call so we - # can clean it up nicely - local temp_tmp - temp_tmp=$(mktemp -d) - TMPDIR=${temp_tmp} yumdownloader --verbose \ - --releasever=$DIB_RELEASE \ - --setopt=reposdir=$repo \ - --destdir=$WORKING \ - ${packages} && rc=$? || rc=$? - rm -rf ${temp_tmp} - if [[ ${rc} != 0 ]]; then - die "Failed to download initial packages: ${packages}" - fi - - # --nodeps works around these wanting /bin/sh in some fedora - # releases, see rhbz#1265873 - sudo $_RPM --root $TARGET_ROOT --nodeps -ivh $WORKING/*rpm - - # install the bootstrap mirror repos over the default ones, if - # set. we will remove this at the end so the final image has - # regular mirrors - if [[ -n ${DIB_YUM_MINIMAL_BOOTSTRAP_REPOS:-} ]]; then - for repo in $TARGET_ROOT/etc/yum.repos.d/*.repo; do - sudo mv $repo $repo.USING_MIRROR - done - sudo cp ${DIB_YUM_MINIMAL_BOOTSTRAP_REPOS}/* \ - $TARGET_ROOT/etc/yum.repos.d/ - fi - -} - -# _install_pkg_manager packages... -# -# install the package manager packages. This is done outside the chroot -# and with yum from the build system. -# TODO: one day build systems will be dnf only, but we don't handle -# that right now -function _install_pkg_manager { - # Install into the chroot, using the gpg keys from the release - # rpm's installed in the chroot - sudo sed -i "s,/etc/pki/rpm-gpg,$TARGET_ROOT/etc/pki/rpm-gpg,g" \ - $TARGET_ROOT/etc/yum.repos.d/*repo - - # See notes on $_RPM variable -- we need to override the - # $HOME-based dbpath set on debian/ubuntu here. Unfortunately, - # yum does not have a way to override rpm macros from the command - # line. So we modify the user's ~/.rpmmacros to set %_dbpath back - # to "/var/lib/rpm" (note, this is taken relative to the - # --installroot). - # - # Also note, we only want this done around this call -- this is - # the only place we are using yum outside the chroot, and hence - # picking up the base-system's default rpm macros. For example, - # the yumdownloader calls above in _install_repos want to use - # ~/.rpmdb/ ... there is nothing in the build-system /var/lib/rpm! - # - # Another issue we hit is having to set --releasedir here. yum - # determines $releasevar based on (more or less) "rpm -q - # --whatprovides $distroverpkg". By default, this is - # "redhat-release" (fedora-release provides redhat-release) but - # some platforms like CentOS override it in /etc/yum.conf (to - # centos-release in their case). You can't override this (see - # [1]), but setting --releasever works around this. - # - # [1] https://bugzilla.redhat.com/show_bug.cgi?id=1287333 - ( - flock -w 1200 9 || die "Can not lock .rpmmacros" - echo "%_dbpath /var/lib/rpm" >> $HOME/.rpmmacros - - local _lang_pack="" - local _extra_pkgs="" - - if [ $DISTRO_NAME = "fedora" -a $DIB_RELEASE -le 23 ]; then - # _install_langs is a rpm macro that limits the translation - # files, etc installed by packages. For Fedora 23 [1], the - # glibc-common package will obey this to only install the - # listed locales, keeping things much smaller (we still have - # to clean up locales manually on centos7). We install just - # en_US because people often ssh in with that locale, but - # leave out everything else. Note that yum has an option to - # set this from the command-line [2], but the yum in trusty we - # are using is too old to have it. So we set it directly in - # the macros file - # - # [1] http://pkgs.fedoraproject.org/cgit/rpms/glibc.git/commit/glibc.spec?h=f23&id=91764bd9ec690d4b8a886c0a3a104aac12d340d2 - # [2] http://yum.baseurl.org/gitweb?p=yum.git;a=commit;h=26128173b362474456e8f0642073ecb0322ed031 - echo "%_install_langs C:en_US:en_US.UTF-8" >> $HOME/.rpmmacros - elif [ $DISTRO_NAME = "fedora" -a $DIB_RELEASE -ge 24 ]; then - # glibc on F24 has split locales into "langpack" packages. - # Yum doesn't understand the weak-dependencies glibc now - # uses to get the minimal-langpack and chooses a - # random(ish) one that satisfies the locale dependency - # (rhbz#1349258). Work-around this by explicitly requring - # the minimal and english (for en_US.UTF-8) pack. - _lang_pack="glibc-minimal-langpack glibc-langpack-en" - fi - - # Yum has some issues choosing weak dependencies. It can end - # up choosing "coreutils-single" instead of "coreutils" which - # causes problems later when a package actually requires - # coreutils. For more info see - # https://bugzilla.redhat.com/show_bug.cgi?id=1286445 - # Really all we can do is pre-install the right thing - _extra_pkgs+="coreutils " - - sudo -E yum -y \ - --disableexcludes=all \ - --setopt=cachedir=$YUM_CACHE/$ARCH/$DIB_RELEASE \ - --setopt=reposdir=$TARGET_ROOT/etc/yum.repos.d \ - --releasever=$DIB_RELEASE \ - --installroot $TARGET_ROOT \ - install $@ ${_lang_pack} ${_extra_pkgs} && rc=$? || rc=$? - - # Note we've modified the base system's .rpmmacros. Ensure we - # clean it up *always* - # sed makes it easy to remove last line, but not last n lines... - sed -i '$ d' $HOME/.rpmmacros; sed -i '$ d' $HOME/.rpmmacros; - if [ $rc != 0 ]; then - die "Initial yum install to chroot failed! Can not continue." - fi - ) 9>$DIB_LOCKFILES/.rpmmacros.dib.lock - - # Set gpg path back because subsequent actions will take place in - # the chroot - sudo sed -i "s,$TARGET_ROOT/etc/pki/rpm-gpg,/etc/pki/rpm-gpg,g" \ - $TARGET_ROOT/etc/yum.repos.d/*repo -} - -# Note this is not usually done for root.d elements (see -# lib/common-functions:mount_proc_dev_sys) but it's important that -# we have things like /dev/urandom around inside the chroot for -# the rpm [pre|post]inst scripts within the packages. -sudo mkdir -p $TARGET_ROOT/proc $TARGET_ROOT/dev $TARGET_ROOT/sys -sudo mount -t proc none $TARGET_ROOT/proc -sudo mount --bind /dev $TARGET_ROOT/dev -sudo mount -t devpts $(mount_dev_pts_options) devpts $TARGET_ROOT/dev/pts -sudo mount -t sysfs none $TARGET_ROOT/sys - -# initalize rpmdb -sudo mkdir -p $TARGET_ROOT/var/lib/rpm -sudo $_RPM --root $TARGET_ROOT --initdb - -# this makes sure that running yum/dnf in the chroot it can get -# out to download stuff -sudo mkdir $TARGET_ROOT/etc -sudo cp /etc/resolv.conf $TARGET_ROOT/etc/resolv.conf - -# Bind mount the external yum cache inside the chroot. Same logic -# as in the yum element to provide for yum caching copied here -# because the sequencing is wrong otherwise -sudo mkdir -p $TMP_MOUNT_PATH/tmp/yum -sudo mount --bind $YUM_CACHE $TMP_MOUNT_PATH/tmp/yum - -_install_repos - -# install dnf for >= f22 -if [ $DIB_RELEASE -ge 22 ]; then - # Fedora 27 has a "curl-minimal" package that will get pulled in as a - # rpm dependency. This causes problems later if/when "curl" gets - # installed. To avoid this, just install the full curl first up. - _install_pkg_manager dnf dnf-plugins-core yum curl -else - _install_pkg_manager yum -fi - -# we just installed yum/dnf with "outside" tools (yum/rpm) which -# might have created /var/lib/[yum|rpm] (etc) that are slighlty -# incompatible. Refresh everything with the in-chroot tools -sudo -E chroot $TARGET_ROOT rpm --rebuilddb -sudo -E chroot $TARGET_ROOT ${YUM} clean all - -# populate the lang reduction macro in the chroot -echo "%_install_langs C:en_US:en_US.UTF-8" | \ - sudo tee -a $TARGET_ROOT/etc/rpm/macros.langs > /dev/null - -_base_packages="systemd passwd findutils sudo util-linux-ng " - -# This package is split out from systemd on >F24, dracut is -# missing the dependency and will fail to make an initrd without -# it; see -# https://bugzilla.redhat.com/show_bug.cgi?id=1398505 -_base_packages+="systemd-udev " - -# bootstrap the environment within the chroot; bring in new -# metadata with an update and install some base packages we need. -sudo -E chroot $TARGET_ROOT ${YUM} -y update -sudo -E chroot $TARGET_ROOT ${YUM} -y \ - --setopt=cachedir=/tmp/yum/$ARCH/$DIB_RELEASE \ - install ${_base_packages} - -# Put in a dummy /etc/resolv.conf over the temporary one we used -# to bootstrap. systemd has a bug/feature [1] that it will assume -# you want systemd-networkd as the network manager and create a -# broken symlink to /run/... if the base image doesn't have one. -# This broken link confuses things like dhclient. -# [1] https://bugzilla.redhat.com/show_bug.cgi?id=1197204 -echo -e "# This file intentionally left blank\n" | \ - sudo tee $TARGET_ROOT/etc/resolv.conf - -# set the most reliable UTF-8 locale -echo -e 'LANG="en_US.UTF-8"' | \ - sudo tee $TARGET_ROOT/etc/locale.conf - # default to UTC -sudo -E chroot $TARGET_ROOT ln -sf /usr/share/zoneinfo/UTC \ - /etc/localtime - -# cleanup -# TODO : move this into a exit trap; and reconsider how -# this integrates with the global exit cleanup path. -sudo umount $TMP_MOUNT_PATH/tmp/yum -sudo umount $TARGET_ROOT/proc -sudo umount $TARGET_ROOT/dev/pts -sudo umount $TARGET_ROOT/dev -sudo umount $TARGET_ROOT/sys - -# RPM doesn't know whether files have been changed since install -# At this point though, we know for certain that we have changed no -# config files, so anything marked .rpmnew is just a bug. -for newfile in $(sudo find $TARGET_ROOT -type f -name '*rpmnew') ; do - sudo mv $newfile $(echo $newfile | sed 's/.rpmnew$//') -done - -sudo rm -f ${TARGET_ROOT}/.extra_settings diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zipl/element-deps python-diskimage-builder-2.17.0/doc/source/elements/zipl/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/zipl/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zipl/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -package-installs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zipl/element-provides python-diskimage-builder-2.17.0/doc/source/elements/zipl/element-provides --- python-diskimage-builder-2.11.0/doc/source/elements/zipl/element-provides 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zipl/element-provides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -bootloader diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zipl/environment.d/10-zipl-default-cmdline python-diskimage-builder-2.17.0/doc/source/elements/zipl/environment.d/10-zipl-default-cmdline --- python-diskimage-builder-2.11.0/doc/source/elements/zipl/environment.d/10-zipl-default-cmdline 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zipl/environment.d/10-zipl-default-cmdline 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -export DIB_ZIPL_DEFAULT_CMDLINE=${DIB_ZIPL_DEFAULT_CMDLINE:-"LANG=en_US.UTF-8 console=ttyS0 console=ttyS1"} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zipl/finalise.d/50-zipl python-diskimage-builder-2.17.0/doc/source/elements/zipl/finalise.d/50-zipl --- python-diskimage-builder-2.11.0/doc/source/elements/zipl/finalise.d/50-zipl 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zipl/finalise.d/50-zipl 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -#!/bin/bash -# Copyright (c) 2017 IBM Corp. -# -# 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. - -# Configure zipl. - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# get the device containing the /boot directory -base_device=`df /boot --output=source | grep "/dev/*"` - -cat > /lib/s390-tools/zipl_helper.loop < /etc/zipl.conf <>"$KERNEL_CONF_FILE" diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zipl/README.rst python-diskimage-builder-2.17.0/doc/source/elements/zipl/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/zipl/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zipl/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -========== -zipl -========== - -Zipl is the bootloader for s390x. - -This element installs zipl on the base device holding the /boot directory on the system. -It's mandatory for building s390x images. It replaces the `bootloader` element -(which would install grub2 by default). - -This element has been tested with `ubuntu` and `ubuntu-minimal` distro. - -Arguments -========= - -* ``DIB_ZIPL_DEFAULT_CMDLINE`` sets the CMDLINE parameters that - are appended to the zipl.conf parameter configuration. It defaults to - 'LANG=en_US.UTF-8 console=ttyS0 console=ttyS1' diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper/bin/install-packages python-diskimage-builder-2.17.0/doc/source/elements/zypper/bin/install-packages --- python-diskimage-builder-2.11.0/doc/source/elements/zypper/bin/install-packages 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper/bin/install-packages 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -#!/bin/bash - -# Copyright 2013 SUSE Linux Products GmbH -# -# 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:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -MAP_ELEMENT= -ACTION=install -ACTION_ARGS="--no-recommends" - -SCRIPTNAME=$(basename $0) -function show_options () { - echo "Usage: $SCRIPTNAME [package ...]" - echo - echo "Options:" - echo " -u -- update all packages" - echo " -e -- erase/remove packages" - echo " -d -- download the packages only" - echo " -m -- use custom element package map (Example: -m nova)" - exit 0 -} - -function run_zypper() { - # TODO: Uncertain if this can ever block wanting input from user - zypper --non-interactive --gpg-auto-import-keys "$@" -} - -TEMP=$(getopt -o hudem: -n $SCRIPTNAME -- "$@") -if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi -eval set -- "$TEMP" - -while true ; do - case "$1" in - -u) run_zypper dist-upgrade --no-recommends; exit 0;; - -e) ACTION="remove"; ACTION_ARGS="--clean-deps"; shift;; - -d) ACTION_ARGS="${ACTION_ARGS} --download-only"; shift;; - -m) MAP_ELEMENT=$2; shift 2;; - -h) show_options;; - --) shift; break ;; - *) echo "Error: unsupported option $1."; exit 1;; - esac -done - -PKGS=$@ -if [ -n "$MAP_ELEMENT" ]; then - if ! PKGS=$(pkg-map --element $MAP_ELEMENT $@); then - echo "bin/pkg-map error. $PKGS" - exit 1 - fi -fi - -if [ -z "${PKGS}" ]; then - echo "Not running install-packages $ACTION with empty packages list" -else - run_zypper $ACTION $ACTION_ARGS $PKGS -fi diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper/element-deps python-diskimage-builder-2.17.0/doc/source/elements/zypper/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/zypper/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -install-bin diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper/install.d/01-login-defs python-diskimage-builder-2.17.0/doc/source/elements/zypper/install.d/01-login-defs --- python-diskimage-builder-2.11.0/doc/source/elements/zypper/install.d/01-login-defs 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper/install.d/01-login-defs 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -sed -i -e "s,^USERGROUPS_ENAB.*$,USERGROUPS_ENAB yes," /etc/login.defs diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper/post-install.d/10-mkinitrd python-diskimage-builder-2.17.0/doc/source/elements/zypper/post-install.d/10-mkinitrd --- python-diskimage-builder-2.11.0/doc/source/elements/zypper/post-install.d/10-mkinitrd 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper/post-install.d/10-mkinitrd 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -#!/bin/bash -# The base image created by kiwi does not contain an initrd so create one -# here. - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# This is to tell mkinitrd to include the right tools for the root filesystem -# that will actually be used for the final image. This is likely something -# different than what the chroot is currently on (which might currently be a -# tmpfs even). -echo "rootfstype=${DIB_ROOT_FSTYPE}" > /etc/sysconfig/initrd - -# ToDo: This it not really clear to me. -# Let's see which error occurs. -# openSuse mkinitrd requires a valid root device be in fstab. -##sed -i 's/vda1/sda1/' /etc/fstab -mkinitrd -A -B - -# And cleanup again -rm /etc/sysconfig/initrd diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper/post-install.d/98-zypper-clean-cache python-diskimage-builder-2.17.0/doc/source/elements/zypper/post-install.d/98-zypper-clean-cache --- python-diskimage-builder-2.11.0/doc/source/elements/zypper/post-install.d/98-zypper-clean-cache 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper/post-install.d/98-zypper-clean-cache 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# clean all locally cached metadata -sudo zypper clean -a diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper/post-install.d/99-zypper-no-keep-packages python-diskimage-builder-2.17.0/doc/source/elements/zypper/post-install.d/99-zypper-no-keep-packages --- python-diskimage-builder-2.11.0/doc/source/elements/zypper/post-install.d/99-zypper-no-keep-packages 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper/post-install.d/99-zypper-no-keep-packages 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Disable caching packages for all repositories -sudo zypper modifyrepo --all --no-keep-packages diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper/pre-install.d/01-zypper-keep-packages python-diskimage-builder-2.17.0/doc/source/elements/zypper/pre-install.d/01-zypper-keep-packages --- python-diskimage-builder-2.11.0/doc/source/elements/zypper/pre-install.d/01-zypper-keep-packages 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper/pre-install.d/01-zypper-keep-packages 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Enable caching packages for all repositories -zypper modifyrepo --all --keep-packages diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper/README.rst python-diskimage-builder-2.17.0/doc/source/elements/zypper/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/zypper/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -====== -zypper -====== -This element provides some customizations for zypper based distributions like -SLES and openSUSE. It works in a very similar way as the yum element does for -yum based distributions. - -Zypper is reconfigured so that it keeps downloaded packages cached outside of -the build chroot so that they can be reused by subsequent image builds. The -cache increases image building speed when building multiple images, especially -on slow connections. This is more effective than using an HTTP proxy for -caching packages since the download servers will often redirect clients to -different mirrors. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper/root.d/50-zypper-cache python-diskimage-builder-2.17.0/doc/source/elements/zypper/root.d/50-zypper-cache --- python-diskimage-builder-2.11.0/doc/source/elements/zypper/root.d/50-zypper-cache 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper/root.d/50-zypper-cache 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -[ -n "$TARGET_ROOT" ] - -ZYPPER_CACHE_DIR=$DIB_IMAGE_CACHE/zypper -mkdir -p $ZYPPER_CACHE_DIR - -sudo mkdir -p $TMP_MOUNT_PATH/var/cache/zypp -sudo mount --bind $ZYPPER_CACHE_DIR $TMP_MOUNT_PATH/var/cache/zypp diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper-minimal/element-deps python-diskimage-builder-2.17.0/doc/source/elements/zypper-minimal/element-deps --- python-diskimage-builder-2.11.0/doc/source/elements/zypper-minimal/element-deps 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper-minimal/element-deps 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -package-installs -zypper diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper-minimal/package-installs.yaml python-diskimage-builder-2.17.0/doc/source/elements/zypper-minimal/package-installs.yaml --- python-diskimage-builder-2.11.0/doc/source/elements/zypper-minimal/package-installs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper-minimal/package-installs.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# kernel -kernel-default: -# locale support (we need LC_ALL=en_US.utf8) -glibc-locale: -# And a few useful tools. Some are pulled -# as dependencies but that may change so lets -# be explicit. -bash: -ca-certificates-mozilla: -lsb-release: -openssl: -sed: -sudo: -tar: diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper-minimal/post-install.d/01-locale-cleanup python-diskimage-builder-2.17.0/doc/source/elements/zypper-minimal/post-install.d/01-locale-cleanup --- python-diskimage-builder-2.11.0/doc/source/elements/zypper-minimal/post-install.d/01-locale-cleanup 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper-minimal/post-install.d/01-locale-cleanup 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/bash -# Only keep the minimum amount of locales to save disk space -# - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -find /usr/lib/locale -mindepth 1 -maxdepth 1 -type d 2>/dev/null | \ - grep -Ev '/(C.utf8|en_US|en_US.utf8)$' | xargs rm -rf diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper-minimal/pre-install.d/00-disable-zypper-recommends python-diskimage-builder-2.17.0/doc/source/elements/zypper-minimal/pre-install.d/00-disable-zypper-recommends --- python-diskimage-builder-2.11.0/doc/source/elements/zypper-minimal/pre-install.d/00-disable-zypper-recommends 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper-minimal/pre-install.d/00-disable-zypper-recommends 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -#!/bin/bash -# Prevent libsolv/zypper from installing recommended packages - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -fgrep -qx "solver.onlyRequires = true" /etc/zypp/zypp.conf || { - cat >> /etc/zypp/zypp.conf << _EOF_ -## Disable installation of recommended packages, language packages -## and packages which depend on hardware (modalias). - -solver.onlyRequires = true - -_EOF_ -} diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper-minimal/README.rst python-diskimage-builder-2.17.0/doc/source/elements/zypper-minimal/README.rst --- python-diskimage-builder-2.11.0/doc/source/elements/zypper-minimal/README.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper-minimal/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -============== -zypper-minimal -============== -Base element for creating minimal SUSE-based images - -This element is incomplete by itself so you probably want to use it along -with the opensuse-minimal one. It requires 'zypper' to be installed on the -host. diff -Nru python-diskimage-builder-2.11.0/doc/source/elements/zypper-minimal/root.d/08-zypper-chroot python-diskimage-builder-2.17.0/doc/source/elements/zypper-minimal/root.d/08-zypper-chroot --- python-diskimage-builder-2.11.0/doc/source/elements/zypper-minimal/root.d/08-zypper-chroot 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/elements/zypper-minimal/root.d/08-zypper-chroot 1970-01-01 00:00:00.000000000 +0000 @@ -1,128 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 SUSE Linux GmbH -# Copyright 2015 Hewlett-Packard Development 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. -# - -# dib-lint: disable=safe_sudo - -if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -source $_LIB/common-functions - -function cleanup() { - sudo umount $TARGET_ROOT/proc - sudo umount $TARGET_ROOT/dev/pts - sudo umount $TARGET_ROOT/dev - sudo umount $TARGET_ROOT/sys - sudo umount $TMP_MOUNT_PATH/var/cache/zypp -} - -trap cleanup EXIT - -ZYPPER_TARGET_OPTS="--non-interactive --gpg-auto-import-keys --root $TARGET_ROOT" -ZYPPER_INSTALL_OPTS="--no-recommends" - -DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-http://download.opensuse.org} - -case ${DIB_RELEASE} in - # We are using "=>" as the assignment symbol since "@" "=" etc could be used in the URI itself. - # Remember, we can't export an array in bash so we use a string instead. - # Repo format: {name}=>{uri} - # Old openSUSE releases - 13*) - ZYPPER_REPOS="update=>${DIB_DISTRIBUTION_MIRROR}/update/${DIB_RELEASE}/ " - ZYPPER_REPOS+="oss=>${DIB_DISTRIBUTION_MIRROR}/distribution/${DIB_RELEASE}/repo/oss/" - ;; - # New Leap releases - 42*) - ZYPPER_REPOS="update=>${DIB_DISTRIBUTION_MIRROR}/update/leap/${DIB_RELEASE}/oss/ " - ZYPPER_REPOS+="oss=>${DIB_DISTRIBUTION_MIRROR}/distribution/leap/${DIB_RELEASE}/repo/oss/" - ;; - # Tumbleweed - tumbleweed) - ZYPPER_REPOS="update=>${DIB_DISTRIBUTION_MIRROR}/update/${DIB_RELEASE}/ " - ZYPPER_REPOS+="oss=>${DIB_DISTRIBUTION_MIRROR}/${DIB_RELEASE}/repo/oss/" - ;; - *) echo "Unsupported openSUSE release: ${DIB_RELEASE}"; exit 1 ;; -esac - -for repo in ${ZYPPER_REPOS}; do - refresh_repo="" - reponame=repo-${repo%%=>*} - repouri=${repo##*=>} - # Refresh all repos in TW and only the update one for the stable ones. This will ensure that - # we always get the latest information from the repo. - [[ ${DIB_RELEASE} == tumbleweed ]] || [[ ${reponame} == "repo-update" ]] && refresh_repo="-f" - sudo zypper ${ZYPPER_TARGET_OPTS} addrepo --name ${reponame} --keep-packages ${refresh_repo} ${repouri} ${reponame} -done - -# It appears that zypper will clean up the repo's cache when it (re-)adds the -# repo so we need to add the cache now, once the repos are added. This is -# similar to what the zypper/50-zypper-cache script does -ZYPPER_CACHE_DIR=$DIB_IMAGE_CACHE/zypper -mkdir -p $ZYPPER_CACHE_DIR - -sudo mkdir -p $TMP_MOUNT_PATH/var/cache/zypp -sudo mount --bind $ZYPPER_CACHE_DIR $TMP_MOUNT_PATH/var/cache/zypp - -# Refresh it so we get updated data in cased we switched DIB_RELEASE -# since last run. -sudo zypper ${ZYPPER_TARGET_OPTS} refresh - -# Note this is not usually done for root.d elements (see -# lib/common-functions:mount_proc_dev_sys) but it's important that -# we have things like /dev/urandom around inside the chroot for -# the rpm [pre|post]inst scripts within the packages. -sudo mkdir -p $TARGET_ROOT/proc $TARGET_ROOT/dev $TARGET_ROOT/sys -sudo mount -t proc none $TARGET_ROOT/proc -sudo mount --bind /dev $TARGET_ROOT/dev -sudo mount -t devpts $(mount_dev_pts_options) devpts $TARGET_ROOT/dev/pts -sudo mount -t sysfs none $TARGET_ROOT/sys - -# Install filesystem, base and useful tools -sudo zypper ${ZYPPER_TARGET_OPTS} install ${ZYPPER_INSTALL_OPTS} filesystem -# Install basic components in order -sudo zypper ${ZYPPER_TARGET_OPTS} install ${ZYPPER_INSTALL_OPTS} ${DIB_OPENSUSE_PATTERNS} python zypper sudo - -# Put in a dummy /etc/resolv.conf over the temporary one we used -# to bootstrap. systemd has a bug/feature [1] that it will assume -# you want systemd-networkd as the network manager and create a -# broken symlink to /run/... if the base image doesn't have one. -# This broken link confuses things like dhclient. -# [1] https://bugzilla.redhat.com/show_bug.cgi?id=1197204 -echo -e "# This file intentionally left blank\n" | \ - sudo tee $TARGET_ROOT/etc/resolv.conf - -# set the most reliable UTF-8 locale -echo -e 'LANG="en_US.UTF-8"' | \ -sudo tee $TARGET_ROOT/etc/locale.conf -# default to UTC -sudo chroot $TARGET_ROOT ln -sf /usr/share/zoneinfo/UTC \ - /etc/localtime - -# RPM doesn't know whether files have been changed since install -# At this point though, we know for certain that we have changed no -# config files, so anything marked .rpmnew is just a bug. -for newfile in $(sudo find $TARGET_ROOT -type f -name '*rpmnew') ; do - sudo mv $newfile $(echo $newfile | sed 's/.rpmnew$//') -done - -# Unmounting of all the mount points is handled by the cleanup EXIT -# handler so there is nothing else to do here diff -Nru python-diskimage-builder-2.11.0/doc/source/index.rst python-diskimage-builder-2.17.0/doc/source/index.rst --- python-diskimage-builder-2.11.0/doc/source/index.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/index.rst 2018-09-13 04:28:23.000000000 +0000 @@ -20,14 +20,14 @@ Release notes for the latest and previous versions are available at: - * `http://docs.openstack.org/releasenotes/diskimage-builder/ - `__ +* `http://docs.openstack.org/releasenotes/diskimage-builder/ + `__ The code is available at: - * `https://git.openstack.org/cgit/openstack/diskimage-builder/ - `__ +* `https://git.openstack.org/cgit/openstack/diskimage-builder/ + `__ Issues @@ -35,7 +35,7 @@ Issues are tracked on launchpad at: - * ``__ +* ``__ Communication diff -Nru python-diskimage-builder-2.11.0/doc/source/user_guide/building_an_image.rst python-diskimage-builder-2.17.0/doc/source/user_guide/building_an_image.rst --- python-diskimage-builder-2.11.0/doc/source/user_guide/building_an_image.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/user_guide/building_an_image.rst 2018-09-13 04:28:23.000000000 +0000 @@ -67,52 +67,23 @@ There are currently two defaults: -* When using the `vm` element a MBR based partition layout is created - with exactly one partition that fills up the whole disk and used as - root device. -* When not using the `vm` element a plain filesystem image, without - any partitioning, is created. - -The user can overwrite the default handling by setting the environment -variable `DIB_BLOCK_DEVICE_CONFIG`. This variable must hold YAML -structured configuration data. - -The default when using the `vm` element is: +* When using the ``vm`` element, an element that provides + ``block-device`` should be included. Available ``block-device-*`` + elements cover the common case of a single partition that fills up + the whole disk and used as root device. Currently there are MBR, + GPT and EFI versions. For example, to use a GPT disk you could + build with :: -.. code-block:: yaml - - DIB_BLOCK_DEVICE_CONFIG=' - - local_loop: - name: image0 + disk-image-create -o output.qcow vm block-device-gpt ubuntu-minimal - - partitioning: - base: image0 - label: mbr - partitions: - - name: root - flags: [ boot, primary ] - size: 100% - mkfs: - mount: - mount_point: / - fstab: - options: "defaults" - fsck-passno: 1' - -The default when not using the `vm` element is: - -.. code-block:: yaml +* When not using the ``vm`` element a plain filesystem image, without + any partitioning, is created. - DIB_BLOCK_DEVICE_CONFIG=' - - local_loop: - name: image0 - mkfs: - name: mkfs_root - mount: - mount_point: / - fstab: - options: "defaults" - fsck-passno: 1' +If you wish to customise the top-level ``block-device-default.yaml`` +file from one of the ``block-device-*`` elements, set the environment +variable `DIB_BLOCK_DEVICE_CONFIG`. This variable must hold YAML +structured configuration data or be a ``file://`` URL reference to a +on-disk configuration file. There are a lot of different options for the different levels. The following sections describe each level in detail. @@ -247,8 +218,8 @@ The symbolic name for this module is `partitioning`. -Currently the only supported partitioning layout is Master Boot Record -`MBR`. +MBR +*** It is possible to create primary or logical partitions or a mix of them. The numbering of the primary partitions will start at 1, @@ -267,19 +238,27 @@ Partitions are created in the order they are configured. Primary partitions - if needed - must be first in the list. +GPT +*** + +GPT partitioning requires the ``sgdisk`` tool to be available. + +Options +******* + There are the following key / value pairs to define one partition table: base - (mandatory) The base device where to create the partitions in. + (mandatory) The base device to create the partitions in. label - (mandatory) Possible values: 'mbr' - This uses the Master Boot Record (MBR) layout for the disk. - (There are currently plans to add GPT later on.) + (mandatory) Possible values: 'mbr', 'gpt' + Configure use of either the Master Boot Record (MBR) or GUID + Partition Table (GPT) formats align - (optional - default value '1MiB') + (optional - default value '1MiB'; MBR only) Set the alignment of the partition. This must be a multiple of the block size (i.e. 512 bytes). The default of 1MiB (~ 2048 * 512 bytes blocks) is the default for modern systems and known to @@ -308,9 +287,9 @@ (optional) List of flags for the partition. Default: empty. Possible values: - boot + boot (MBR only) Sets the boot flag for the partition - primary + primary (MBR only) Partition should be a primary partition. If not set a logical partition will be created. @@ -321,10 +300,15 @@ based on the remaining free space. type (optional) - The partition type stored in the MBR partition table entry. The - default value is '0x83' (Linux Default partition). Any valid one + The partition type stored in the MBR or GPT partition table entry. + + For MBR the default value is '0x83' (Linux Default partition). Any valid one byte hexadecimal value may be specified here. + For GPT the default value is '8300' (Linux Default partition). Any valid two + byte hexadecimal value may be specified here. Due to ``sgdisk`` leading '0x' + should not be used. + Example: .. code-block:: yaml @@ -350,12 +334,28 @@ - name: data2 size: 100% + - partitioning: + base: gpt_image + label: gpt + partitions: + - name: ESP + type: EF00 + size: 16MiB + - name: data1 + size: 1GiB + - name: lvmdata + type: 8E00 + size: 100% + On the `image0` two partitions are created. The size of the first is 1GiB, the second uses the remaining free space. On the `data_image` -three partitions are created: all are about 1/3 of the disk size. +three partitions are created: all are about 1/3 of the disk size. On +the `gpt_image` three partitions are created: 16MiB one for EFI +bootloader, 1GiB Linux filesystem one and rest of disk will be used +for LVM partition. -Module: Lvm -··········· +Module: LVM +........... This module generates volumes on existing block devices. This means that it is possible to take any previous created partition, and create volumes information @@ -646,6 +646,29 @@ uncompressed cloud images. If tmpfs is used, you would still need /tmp space for one uncompressed cloud image and about 20% of that image for working files. +Nameservers +----------- + +To ensure elements can access the network, ``disk-image-create`` +replaces the ``/etc/resolv.conf`` within the chroot with a copy of the +host's file early in the image creation process. + +The final ``/etc/resolv.conf`` can be controlled in a number of ways. +If, during the build, the ``/etc/resolv.conf`` file within the chroot +is replaced with a symlink, this will be retained in the final image +[1]_. If the file is marked immutable, it will also not be touched. + +.. [1] This somewhat odd case was added for installation of the + ``resolvconf`` package, which replaces ``/etc/resolv.conf`` + with a symlink to it's version. Depending on its contents, and + what comes after the installation in the build, this mostly + works. + +If you would like specific contents within the final +``/etc/resolv.conf`` you can place them into +``/etc/resolv.conf.ORIG`` during the build. As one of the final +steps, this file will be ``mv`` to ``/etc/resolv.conf``. + Chosing an Architecture ----------------------- diff -Nru python-diskimage-builder-2.11.0/doc/source/user_guide/installation.rst python-diskimage-builder-2.17.0/doc/source/user_guide/installation.rst --- python-diskimage-builder-2.11.0/doc/source/user_guide/installation.rst 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/doc/source/user_guide/installation.rst 2018-09-13 04:28:23.000000000 +0000 @@ -1,7 +1,7 @@ Installation ============ -If your distribution does not proivde packages, you should install +If your distribution does not provide packages, you should install ``diskimage-builder`` via ``pip``, mostly likely in a ``virtualenv`` to keep it separate. diff -Nru python-diskimage-builder-2.11.0/.gitignore python-diskimage-builder-2.17.0/.gitignore --- python-diskimage-builder-2.11.0/.gitignore 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -.coverage -coverage.xml -cover/* -*~ -.testrepository -*.sw? -#*# -*.pyc -.tox -*.egg -*.egg-info -dist -*.qcow2 -*.raw -*.initrd -*.vmlinuz -/*-manifests -/*.d -!/.zuul.d -build -AUTHORS -ChangeLog -bin/diskimage_builder -*.bak -*.orig diff -Nru python-diskimage-builder-2.11.0/.gitreview python-diskimage-builder-2.17.0/.gitreview --- python-diskimage-builder-2.11.0/.gitreview 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/.gitreview 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -[gerrit] -host=review.openstack.org -port=29418 -project=openstack/diskimage-builder.git diff -Nru python-diskimage-builder-2.11.0/lower-constraints.txt python-diskimage-builder-2.17.0/lower-constraints.txt --- python-diskimage-builder-2.11.0/lower-constraints.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/lower-constraints.txt 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,49 @@ +alabaster==0.7.10 +appdirs==1.3.0 +astroid==1.6.2 +Babel==2.3.4 +coverage==4.0 +decorator==3.4.0 +docutils==0.11 +dulwich==0.15.0 +extras==1.0.0 +fixtures==3.0.0 +flake8==2.5.4 +hacking==0.10.0 +imagesize==0.7.1 +iso8601==0.1.11 +isort==4.3.4 +Jinja2==2.10 +keystoneauth1==3.4.0 +lazy-object-proxy==1.3.1 +linecache2==1.0.0 +MarkupSafe==1.0 +mccabe==0.2.1 +mock==2.0.0 +mox3==0.20.0 +networkx==1.10 +openstackdocstheme==1.18.1 +os-client-config==1.28.0 +oslotest==3.2.0 +pbr==2.0.0 +pep8==1.5.7 +pyflakes==0.8.1 +Pygments==2.2.0 +pylint==1.7.1 +python-mimeparse==1.6.0 +python-subunit==1.0.0 +pytz==2013.6 +PyYAML==3.12 +reno==2.5.0 +requests==2.14.2 +requestsexceptions==1.2.0 +six==1.10.0 +snowballstemmer==1.2.1 +Sphinx==1.6.2 +sphinxcontrib-websupport==1.0.1 +stevedore==1.20.0 +testrepository==0.0.18 +testtools==2.2.0 +traceback2==1.4.0 +unittest2==1.1.0 +wrapt==1.7.0 diff -Nru python-diskimage-builder-2.11.0/PKG-INFO python-diskimage-builder-2.17.0/PKG-INFO --- python-diskimage-builder-2.11.0/PKG-INFO 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/PKG-INFO 2018-09-13 04:30:28.000000000 +0000 @@ -0,0 +1,68 @@ +Metadata-Version: 1.1 +Name: diskimage-builder +Version: 2.17.0 +Summary: Golden Disk Image builder. +Home-page: https://docs.openstack.org/diskimage-builder/latest/ +Author: OpenStack +Author-email: openstack-dev@lists.openstack.org +License: Apache License (2.0) +Description: Image building tools for OpenStack + ================================== + + ``diskimage-builder`` is a flexible suite of components for building a + wide-range of disk images, filesystem images and ramdisk images for + use with OpenStack. + + This repository has the core functionality for building such images, + both virtual and bare metal. Images are composed using `elements`; + while fundamental elements are provided here, individual projects have + the flexibility to customise the image build with their own elements. + + For example:: + + $ DIB_RELEASE=trusty disk-image-create -o ubuntu-trusty.qcow2 vm ubuntu + + will create a bootable Ubuntu Trusty based ``qcow2`` image. + + ``diskimage-builder`` is useful to anyone looking to produce + customised images for deployment into clouds. These tools are the + components of `TripleO `__ + that are responsible for building disk images. They are also used + extensively to build images for testing OpenStack itself, particularly + with `nodepool + `__. + Platforms supported include Ubuntu, CentOS, RHEL and Fedora. + + Full documentation, the source of which is in ``doc/source/``, is + published at: + + * https://docs.openstack.org/diskimage-builder/latest/ + + Copyright + ========= + + Copyright 2012 Hewlett-Packard Development Company, L.P. + Copyright (c) 2012 NTT DOCOMO, INC. + + All Rights Reserved. + + 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. + + +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Operating System :: POSIX :: Linux +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Environment :: Console diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-centos-7/run.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-centos-7/run.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-centos-7/run.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-centos-7/run.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -1,6 +1,9 @@ - hosts: all name: Autoconverted job legacy-dib-dsvm-functests-python2-centos-7 from old job gate-dib-dsvm-functests-python2-centos-7 + roles: + - bindep + tasks: - name: Ensure legacy workspace directory @@ -22,16 +25,6 @@ executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - cd ~/openstack/diskimage-builder - /usr/local/jenkins/slave_scripts/install-distro-packages.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - shell: cmd: | diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-centos-7-extras/run.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-centos-7-extras/run.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-centos-7-extras/run.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-centos-7-extras/run.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -1,6 +1,9 @@ - hosts: all name: Autoconverted job legacy-dib-dsvm-functests-python2-centos-7-extras from old job gate-dib-dsvm-functests-python2-centos-7-extras-nv + roles: + - bindep + tasks: - name: Ensure legacy workspace directory @@ -22,16 +25,6 @@ executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - cd ~/openstack/diskimage-builder - /usr/local/jenkins/slave_scripts/install-distro-packages.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - shell: cmd: | diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-centos-7-image/run.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-centos-7-image/run.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-centos-7-image/run.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-centos-7-image/run.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -1,6 +1,9 @@ - hosts: all name: Autoconverted job legacy-dib-dsvm-functests-python2-centos-7-image from old job gate-dib-dsvm-functests-python2-centos-7-image-nv + roles: + - bindep + tasks: - name: Ensure legacy workspace directory @@ -25,16 +28,6 @@ - shell: cmd: | - set -e - set -x - cd ~/openstack/diskimage-builder - /usr/local/jenkins/slave_scripts/install-distro-packages.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | set -u set -e set -x @@ -74,8 +67,8 @@ opensuse/build-succeeds \ opensuse/opensuse423-build-succeeds \ fedora/build-succeeds \ - ubuntu/trusty-build-succeeds \ - ubuntu/xenial-build-succeeds + ubuntu/xenial-build-succeeds \ + ubuntu/bionic-build-succeeds set +u deactivate diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-opensuse-423/post.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-opensuse-423/post.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-opensuse-423/post.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-opensuse-423/post.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -- hosts: primary - tasks: - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/logs/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-opensuse-423/run.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-opensuse-423/run.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-opensuse-423/run.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-opensuse-423/run.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -- hosts: all - name: Autoconverted job legacy-dib-dsvm-functests-python2-opensuse-423 from old - job gate-dib-dsvm-functests-python2-opensuse-423-nv - tasks: - - - name: Ensure legacy workspace directory - file: - path: '{{ ansible_user_dir }}/workspace' - state: directory - - - shell: - cmd: | - set -u - set -e - set -x - cd ~ - - /usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \ - git://git.openstack.org \ - openstack/diskimage-builder \ - openstack/requirements - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - cd ~/openstack/diskimage-builder - /usr/local/jenkins/slave_scripts/install-distro-packages.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -u - set -e - set -x - # - # We do things that might exceed the default 2GiB tmpfs, and - # use the larger mounted space. - cd ~ - sudo mkdir /opt/dib_cache - sudo chown zuul:zuul /opt/dib_cache - export DIB_NO_TMPFS=1 - export TMPDIR=/opt/dib_cache - - virtualenv -p python2 env - - export UPPER_CONSTRAINTS_FILE=$(pwd)/openstack/requirements/upper-constraints.txt - sed -i '/^diskimage-builder/d' $UPPER_CONSTRAINTS_FILE - ./env/bin/pip install $(pwd)/openstack/diskimage-builder -c $UPPER_CONSTRAINTS_FILE - - # TODO(pabelanger): Remove once we migrated to bindep - ./openstack/diskimage-builder/tests/install_test_deps.sh - - # This sets up some repo files pointing to the infra mirrors - # which are used during test runs - ./openstack/diskimage-builder/contrib/setup-gate-mirrors.sh - - # UPPER_CONSTRAINTS_FILE is causing side effects when doing image - # build, unset it - unset UPPER_CONSTRAINTS_FILE - - # activate the virtualenv so that any tools run by dib run - # using the python inside it - set +u - source ./env/bin/activate - set -u - - ./openstack/diskimage-builder/tests/run_functests.sh - - set +u - deactivate - set -u - - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty/run.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty/run.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty/run.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty/run.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -1,6 +1,9 @@ - hosts: all name: Autoconverted job legacy-dib-dsvm-functests-python2-ubuntu-trusty from old job gate-dib-dsvm-functests-python2-ubuntu-trusty + roles: + - bindep + tasks: - name: Ensure legacy workspace directory @@ -22,16 +25,6 @@ executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - cd ~/openstack/diskimage-builder - /usr/local/jenkins/slave_scripts/install-distro-packages.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - shell: cmd: | diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-extras/run.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-extras/run.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-extras/run.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-extras/run.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -1,6 +1,9 @@ - hosts: all name: Autoconverted job legacy-dib-dsvm-functests-python2-ubuntu-trusty-extras from old job gate-dib-dsvm-functests-python2-ubuntu-trusty-extras-nv + roles: + - bindep + tasks: - name: Ensure legacy workspace directory @@ -22,16 +25,6 @@ executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - cd ~/openstack/diskimage-builder - /usr/local/jenkins/slave_scripts/install-distro-packages.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - shell: cmd: | diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-image/run.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-image/run.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-image/run.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-image/run.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -1,6 +1,9 @@ - hosts: all name: Autoconverted job legacy-dib-dsvm-functests-python2-ubuntu-trusty-image from old job gate-dib-dsvm-functests-python2-ubuntu-trusty-image-nv + roles: + - bindep + tasks: - name: Ensure legacy workspace directory @@ -22,16 +25,6 @@ executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - cd ~/openstack/diskimage-builder - /usr/local/jenkins/slave_scripts/install-distro-packages.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - shell: cmd: | diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python3/run.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python3/run.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python3/run.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python3/run.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -1,5 +1,8 @@ - hosts: all name: Autoconverted job legacy-dib-dsvm-functests-python3 from old job gate-dib-dsvm-functests-python3-ubuntu-xenial + roles: + - bindep + tasks: - name: Ensure legacy workspace directory @@ -21,16 +24,6 @@ executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - cd ~/openstack/diskimage-builder - /usr/local/jenkins/slave_scripts/install-distro-packages.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - shell: cmd: | diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python3-extras/run.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python3-extras/run.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python3-extras/run.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python3-extras/run.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -1,5 +1,8 @@ - hosts: all name: Autoconverted job legacy-dib-dsvm-functests-python3-extras from old job gate-dib-dsvm-functests-python3-ubuntu-xenial-extras-nv + roles: + - bindep + tasks: - name: Ensure legacy workspace directory @@ -21,16 +24,6 @@ executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - cd ~/openstack/diskimage-builder - /usr/local/jenkins/slave_scripts/install-distro-packages.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - shell: cmd: | diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python3-image/run.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python3-image/run.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python3-image/run.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python3-image/run.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -1,5 +1,8 @@ - hosts: all name: Autoconverted job legacy-dib-dsvm-functests-python3-image from old job gate-dib-dsvm-functests-python3-ubuntu-xenial-image-nv + roles: + - bindep + tasks: - name: Ensure legacy workspace directory @@ -24,16 +27,6 @@ - shell: cmd: | - set -e - set -x - cd ~/openstack/diskimage-builder - /usr/local/jenkins/slave_scripts/install-distro-packages.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | set -u set -e set -x @@ -74,8 +67,8 @@ opensuse/build-succeeds \ opensuse/opensuse423-build-succeeds \ fedora/build-succeeds \ - ubuntu/trusty-build-succeeds \ - ubuntu/xenial-build-succeeds + ubuntu/xenial-build-succeeds \ + ubuntu/bionic-build-succeeds set +u deactivate diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python3-opensuse-423/post.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python3-opensuse-423/post.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python3-opensuse-423/post.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python3-opensuse-423/post.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -- hosts: primary - tasks: - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/logs/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs diff -Nru python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python3-opensuse-423/run.yaml python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python3-opensuse-423/run.yaml --- python-diskimage-builder-2.11.0/playbooks/legacy/dib-dsvm-functests-python3-opensuse-423/run.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/playbooks/legacy/dib-dsvm-functests-python3-opensuse-423/run.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -- hosts: all - name: Autoconverted job legacy-dib-dsvm-functests-python3-opensuse-423 from old - job gate-dib-dsvm-functests-python3-opensuse-423-nv - tasks: - - - name: Ensure legacy workspace directory - file: - path: '{{ ansible_user_dir }}/workspace' - state: directory - - - shell: - cmd: | - set -u - set -e - set -x - cd ~ - - /usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \ - git://git.openstack.org \ - openstack/diskimage-builder \ - openstack/requirements - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - cd ~/openstack/diskimage-builder - /usr/local/jenkins/slave_scripts/install-distro-packages.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -u - set -e - set -x - # - # We do things that might exceed the default 2GiB tmpfs, and - # use the larger mounted space. - cd ~ - sudo mkdir /opt/dib_cache - sudo chown zuul:zuul /opt/dib_cache - export DIB_NO_TMPFS=1 - export TMPDIR=/opt/dib_cache - - virtualenv -p python2 env - - export UPPER_CONSTRAINTS_FILE=$(pwd)/openstack/requirements/upper-constraints.txt - sed -i '/^diskimage-builder/d' $UPPER_CONSTRAINTS_FILE - ./env/bin/pip install $(pwd)/openstack/diskimage-builder -c $UPPER_CONSTRAINTS_FILE - - # TODO(pabelanger): Remove once we migrated to bindep - ./openstack/diskimage-builder/tests/install_test_deps.sh - - # This sets up some repo files pointing to the infra mirrors - # which are used during test runs - ./openstack/diskimage-builder/contrib/setup-gate-mirrors.sh - - # UPPER_CONSTRAINTS_FILE is causing side effects when doing image - # build, unset it - unset UPPER_CONSTRAINTS_FILE - - # activate the virtualenv so that any tools run by dib run - # using the python inside it - set +u - source ./env/bin/activate - set -u - - ./openstack/diskimage-builder/tests/run_functests.sh - - set +u - deactivate - set -u - - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' diff -Nru python-diskimage-builder-2.11.0/releasenotes/notes/add-modprobe-element-8e3b0287ebb11920.yaml python-diskimage-builder-2.17.0/releasenotes/notes/add-modprobe-element-8e3b0287ebb11920.yaml --- python-diskimage-builder-2.11.0/releasenotes/notes/add-modprobe-element-8e3b0287ebb11920.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/releasenotes/notes/add-modprobe-element-8e3b0287ebb11920.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/releasenotes/notes/bootloader-commandline-d2db7524f1f9ad28.yaml python-diskimage-builder-2.17.0/releasenotes/notes/bootloader-commandline-d2db7524f1f9ad28.yaml --- python-diskimage-builder-2.11.0/releasenotes/notes/bootloader-commandline-d2db7524f1f9ad28.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/releasenotes/notes/bootloader-commandline-d2db7524f1f9ad28.yaml 2018-09-13 04:28:40.000000000 +0000 @@ -0,0 +1,7 @@ +--- +other: + - It has been clarified that the ``DIB_BOOTLOADER_DEFAULT_CMDLINE`` + variable appends its values to grubs + ``GRUB_CMDLINE_LINUX_DEFAULT``, which is used during all normal + boots but not rescue boots; as opposed to applying to + ``GRUB_CMDLINE_LINUX`` diff -Nru python-diskimage-builder-2.11.0/releasenotes/notes/bootloader-gpt-d1047f81f3a0631b.yaml python-diskimage-builder-2.17.0/releasenotes/notes/bootloader-gpt-d1047f81f3a0631b.yaml --- python-diskimage-builder-2.11.0/releasenotes/notes/bootloader-gpt-d1047f81f3a0631b.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/releasenotes/notes/bootloader-gpt-d1047f81f3a0631b.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -0,0 +1,7 @@ +--- +features: + - | + GPT support is added to the bootloader; see documentation for + configuration examples. This should be considered a technology + preview; there may be minor behaviour modifications as we enable + UEFI and support across more architectures. \ No newline at end of file diff -Nru python-diskimage-builder-2.11.0/releasenotes/notes/reno.cache python-diskimage-builder-2.17.0/releasenotes/notes/reno.cache --- python-diskimage-builder-2.11.0/releasenotes/notes/reno.cache 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/releasenotes/notes/reno.cache 2018-09-13 04:30:28.000000000 +0000 @@ -0,0 +1,402 @@ +--- +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 + a result, this is used; if there is no result, the new way of block device + handling is used. Please note that the old way of block device handling has + some major limitations such as that it is only possible to use one block device.', + The element 'partitioning-sfdisk' is deprecated. The new implementation will + create the partition tables based on a tool independent description.] + features: [Add new block device handling. Unify and generalize the creation and + usage of block device. This release includes setting up the general infrastructure + and setting up loop device] + issues: ['Because the implementation of the new block device layer is not complete, + some features which are already implemented cannot be used because of limitations + of the current environment.'] + releasenotes/notes/block-device-lvm-c3b8a214952b4db5.yaml: + features: ['Adds lvm support, allowing to create volumes.'] + releasenotes/notes/block-device-mkfs-mount-fstab-42d7efe28fc2df04.yaml: + features: ['Adds mkfs, mount and fstab to the block device layer. + + '] + releasenotes/notes/block-device-partitioning-237249e7ed2bad26.yaml: + deprecations: [The new partitions are created based on configuration rather than + on a list of provided commands for a special partitioning tool. Therefore + elements using tools (like partitioning-sfdisk) are deprecated and will be + removed.] + features: [Create partitions with MBR layout optimized for performance and highly + configurable.] + releasenotes/notes/bootloader-commandline-d2db7524f1f9ad28.yaml: + other: ['It has been clarified that the ``DIB_BOOTLOADER_DEFAULT_CMDLINE`` variable + appends its values to grubs ``GRUB_CMDLINE_LINUX_DEFAULT``, which is used + during all normal boots but not rescue boots; as opposed to applying to ``GRUB_CMDLINE_LINUX``'] + releasenotes/notes/bootloader-gpt-d1047f81f3a0631b.yaml: + features: ['GPT support is added to the bootloader; see documentation for + + configuration examples. This should be considered a technology + + preview; there may be minor behaviour modifications as we enable + + UEFI and support across more architectures.'] + releasenotes/notes/centos-retired-f17ae9f6f03e57e3.yaml: + deprecations: ['The ``centos`` and ``rhel`` elements have been removed. These + + were building version 6 which is no longer supported (mostly due + + to a lack of python 2.7). Version 7 support is available via the + + ``centos7`` and ``rhel7`` elements (which downloads and modifies + + the upstream cloud images) or via ``centos-minimal`` (which builds + + the image from a empty chroot; only available for CentOS). + + ``centos-minimal`` is suggested as this is what OpenStack + + Infrastructure uses for its elements. + + + Unfortunately, ``centos-minimal`` sets ``DISTRO=centos`` while + + ``centos7`` sets ``DISTRO=centos7``, despite building the same + + thing as far as upper levels are concerned. We plan to rectify + + this in the version 8 time-frame. + + '] + releasenotes/notes/dash-p-after-install-58a87549c1c906c3.yaml: + other: ['The packages specified with the `-p` command-line operation are now installed + after the `install.d` phase, not before. This is to give elements priority + when installing packages. The flag documentation has been updated to describe + this.'] + releasenotes/notes/dib-distribution-mirror-8c241c0d3d4a539a.yaml: + deprecations: ['The ``DIB_[DISTRO]_DISTRIBUTION_MIRROR`` variables have been removed. These + were undocumented ways to set ``DIB_DISTRIBUTION_MIRROR`` for some elements. It + was not implemented consistently and causing some confusion. If you need + to setup mirrors for testing purposes, the ``openstack-ci-mirrors`` element + is a good example that is used by OpenStack gate testing.'] + releasenotes/notes/dib-init-system_fix_for_debian_jessie-c6f7261ee84dad27.yaml: + fixes: [dib-init-system did not correctly find the init system for Debian Jessie + and Debian Stretch. This version also looks for /bin/systemctl as as hint + for systemd and fixes the problem.] + releasenotes/notes/dib-run-parts-6f67d038aa5a4156.yaml: + deprecations: ['The ``dib-run-parts`` element is no longer required as + + ``disk-image-create`` will directly source the internal version + + for running scripts within the chroot. This element was + + unintentionally leaving ``/usr/local/bin/dib-run-parts`` in the + + built image. From code search we do not believe anyone was + + relying on the presence of this script. If you do require it, you + + should source the ``dib-utils`` package to install. + + '] + releasenotes/notes/dib-run-parts-e18cc3a6c2d66c24.yaml: + deprecations: ['dib no longer exports ``dib-run-parts``. Adding this was an + + oversight made during v2 development, since ``dib-utils`` already + + provides this. The ``dib-run-parts`` used internally + + (``diskimage_builder/lib/dib-run-parts``) is not intended to be + + used by external tools. If you require ``dib-run-parts``, you + + should install the ``dib-utils`` package.'] + releasenotes/notes/dibv2-omnibus-b30e0c7ecd76db8d.yaml: + deprecations: ['A number of long-deprecated elements have been removed in v2, + which + + are to the best of our knowledge unused. + + + - ``partitioning-sfdisk`` + + - ``deploy-ironic-element`` + + - ``ironc-discovered-ramdisk`` + + - ``serial-console-element`` + + - ``map-services`` + + ', 'We have removed and deprecated the ``dib-utils`` package. This + + was intended to be a more generic repository of tools that might + + be useful outside dib, but that did not eventuate and it has been + + folded back into dib for simplicity. + + '] + features: ['2.0.0 includes a new framework for partitioning contributed by + + Andreas Florath. This should allow for creating multiple + + partitions, images with encryption, LVM support and flexibility + + for multiple-devices, all of which are currently not supported. + + Please check the v2 documentation, specs and reach out if these + + features interest you (some parts still in review). + + ', 'Element override is now supported. If you have an element of the + + same name earlier in the ``ELEMENTS_PATH``, it will override later + + instances (previously, the behaviour was undefined). + + '] + prelude: 'Version 2.0.0 of diskimage-builder incorporates recent work from the + feature/v2 branch. This includes incorporating some largely internal changes + to the way it finds and calls elements, enhancements to partitioning and removal + of some long-deprecated elements. + + If you use dib exclusively via the command-line disk-image-create installed + from a package or via pypi you are unlikely to notice any difference (if you + run it directly from a git-tree checkout, you may be affected).' + upgrade: ["For purposes of both users and development we want dib to be as\n\"\ + pythonic\" as possible and behave like all other projects. Two\nmajor visible\ + \ changes are:\n\n- command-line scripts are entry points (i.e. need to be\ + \ installed)\n- elements have moved under diskimage_create module\n\nThe result\ + \ of the first is that ``./bin/disk-image-create`` from\nthe source tree is\ + \ no longer there. Like all other projects, you\nshould install dib into\ + \ a virtualenv (if you're developing, use\npip -e) and ``disk-image-create``\ + \ will \"just work\".\n\nThe second change, moving the inbuilt elements under\ + \ the\n``diskimage_create`` module, is a simplification so we always have\n\ + a canonical path to our elements. Since we now always know where\nelements\ + \ are relative to the imported diskimage_builder module we\ncan drop all the\ + \ path guessing complexity. This has other good\nflow-on effects such as\ + \ ``testr`` being able to find unit-tests\nfor elements in the normal fashion\ + \ and having imports work as\nusual.\n\nWe are aware there are a number of\ + \ tools that like to take dib\nelements and do things with them. Reading some\ + \ of the dib source\nyou may find there is a canonical way to find out the\ + \ included dib\nelements path -- ask dib itself, something like\n\n.. code-block::\ + \ shell\n\n DIB_ELEMENTS=$(python -c '\n import diskimage_builder.paths;\n\ + \ diskimage_builder.paths.show_path(\"elements\")')\n\nNote you probably\ + \ do not want this. As mentioned, another feature\nof v2 is override elements\ + \ -- an element that appears first in the\nelement path-list will override\ + \ any built-in one (just like\n$PATH). There is a function,\n``diskimage_builder.get_elements()``,\ + \ which will correctly process\nthe element path, calculate overrides and\ + \ return a canonical list\nof elements, their dependencies and correct paths.\n\ + \n*That* said, you probably do not want this either! There are a\nnumber\ + \ of elements that do things on behalf of other elements --\nthey look for\ + \ a file in the included elements, say, and use that\nas a manifest for something.\ + \ Previously, these would just have to\nmake up their own element processing\ + \ via inspection of the\ncommand-line arguments. dib now exports pre-computed\ + \ variables\nthat an element can walk for all the current build elements --\ + \ a\nYAML list for easy python decoding and a function that builds an\narray\ + \ for Bash elements.\n"] + releasenotes/notes/doc-auto-element-dependency-cb7488c5bb7301a4.yaml: + features: [Create sphinx directive 'element_deps' that automatically generates + dependencies in the element documentation.] + releasenotes/notes/dracut-network-adaabf90da9f6866.yaml: + deprecations: [The ``dracut-network`` element has been removed. It has not been + functioning for some time due to incorrect paths.] + releasenotes/notes/element-info-entry-point-448bf622be6061a0.yaml: + deprecations: ['The ``element-info`` script is now provided by a standard python + entry-point, rather than an explicit wrapper script. This may affect you + if you were running this script directly out of ``bin`` in the source directory + without installing. See developer notes for details on using developer-installs + with virtual environments for testing.'] + releasenotes/notes/element-override-ccda78c24ab4a4ff.yaml: + deprecations: ['Element override behavior is now defined, with elements found + in earlier entries of ``ELEMENTS_PATH`` overriding later ones (e.g. the same + semantics as ``$PATH``). Previously the behavior was undefined.'] + releasenotes/notes/element-vars-c6bf2e6795002f01.yaml: + features: [Elements that need access to the other elements being used during the + build should use the new ``IMAGE_ELEMENT_YAML`` environment variable and it's + Bash equivalent ``get_image_element_array``.] + releasenotes/notes/fedora26-690b9fd9ac3c3d4f.yaml: + upgrade: ['The ``fedora-minimal`` and ``fedora`` elements have been updated to + default to Fedora 26. Note if you to pin to specific versions, be sure to + specify ``DIB_RELEASE``.'] + releasenotes/notes/grub-timeout-1cdd14a2b1467d89.yaml: + features: ['The ``bootloader`` element will explicitly set the timeout to ``5`` + seconds when using ``grub`` (previously this was undefined, but platform defaults + were usually 5 seconds). Set this to ``0`` for faster boots.'] + releasenotes/notes/incorrect-grub-label-5d2000215c0cc73e.yaml: + fixes: ['This fixes bug 1742170 where the grub root label is different than the + + file system label when booting from a whole disk image. + + '] + releasenotes/notes/move_tidy_logs_to_main-a8c03427fe1a445c.yaml: + features: ['Cleaning logs was split, some was done in the img-functions.finalise_base, + some was done in the base element. The version unifies tidy up logs in the + lib/img-functions. Especially when building docker container images the base + element cannot be used. This patch removes about some hundreds KB of useless + logs in cases when the base element is not used.'] + releasenotes/notes/openssh-server-0f6d065748a2fc18.yaml: + features: [New openssh-server element to ensure that the openssh server is installed + and enabled during boot.] + releasenotes/notes/opensuse-423-default-3bc73fff69374cd0.yaml: + upgrade: ['The opensuse and opensuse-minimal element are now defaulting to 42.3, + which + + is the latest stable openSUSE release. Building for 42.2 is still supported, + + however requires setting DIB_RELEASE to ''42.2'' explicitly. + + '] + releasenotes/notes/opensuse-minimal-45267f5be1112c22.yaml: + features: [New zypper-minimal and opensuse-minimal elements to create basic openSUSE + images. These two new elements are also making use of the existing zypper + element which has been extended to include the functionality previously present + in the opensuse element.] + releasenotes/notes/package-outside-debootstrap-ac93e9ce991819f1.yaml: + fixes: ['The `debian-minimal` and and `ubuntu-minimal` elements now install directly + from the updates repo, avoiding the need to double-install packages during + build.'] + releasenotes/notes/remove-dib-utils-37f70dfad54900a0.yaml: + deprecations: [The `dib-utils` requirement has been removed as the `dib-run-parts` + script is now shipped from within diskimage-builder. The `dib-utils` project + is now considered retired.] + releasenotes/notes/runtime-ssh-host-keys-7a2fc873cc90d33e.yaml: + features: ['New element (runtime-ssh-host-keys) to manage SSH host keys at boot. + Since SSH host key generation is not standard across operating systems, add + support for both Debian and Ubuntu to handle it. While this is a new element, + simple-init has been updated to depend on it.'] + releasenotes/notes/squashfs-output-91c1f0dc37474d3c.yaml: + features: [New squashfs image output format.] + releasenotes/notes/sysprep-f3fd036bc1d2c405.yaml: + features: ['Adds sysprep element included by all systemd distros + + '] + fixes: ['Adds default sysprep element clearing /etc/machine-id which + + prevents duplicated /etc/machine-id by forcing systemd to + + generate a new id for each booted system. + + '] + releasenotes/notes/timestamp-43015aa5434e8ddb.yaml: + features: [A ``--logfile`` option is added to save output to a given file., 'By + default, all ``stdout`` will log with timestamps (this used to be inconsistent; + python tools logged with a timestamp, and bash parts did not). If you set + ``DIB_NO_TIMESTAMP`` to ``1`` the timestamp prefix will be suppressed (this + would be appropriate if you are running diskimage-builder and capturing its + 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 + + when DIB_INSTALLTYPE_ironic_agent=source is set. pip installs + + constraints with the -c argument and this argument is a relatively + + newer addion. The currently installed pip may not support that + + option and must be upgraded before proceeding. + + '] + releasenotes/notes/yum-cache-removal-148c33012515e56e.yaml: + deprecations: [The ``DIB_YUMCHROOT_USE_CACHE`` variable has been removed and the + Fedora and CentOS ``-minimal`` initial chroot will always be created by the + package manager. The default creation of a chroot tarball is stopped for + these elements. This unused option was unsafe; there is no guarantee that + the base system will not change even between runs. Getting the package manager + to reuse the cache for the initial chroot install is future work.] +notes: +- files: + - [releasenotes/notes/bootloader-commandline-d2db7524f1f9ad28.yaml, f6a2452d4c72d52af1abd6f9d4165ff19a0506ba] + version: 2.17.0 +- 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: + - [releasenotes/notes/incorrect-grub-label-5d2000215c0cc73e.yaml, c7da8bc90aa9dd917ee9a4ae6b6e6cef8a9825d6] + - [releasenotes/notes/upgrade-pip-before-c-d2443847f9d58c7a.yaml, 34ff72f2530ed8925c8b5d71371808d39986866f] + version: 2.11.0 +- files: + - [releasenotes/notes/sysprep-f3fd036bc1d2c405.yaml, 6c2b1465cce11631f5d6bf757ea194b26ca3cb7f] + - [releasenotes/notes/timestamp-43015aa5434e8ddb.yaml, f60dd384827beb8ec193ac7738e973941fc8b6d5] + version: 2.10.0 +- files: + - [releasenotes/notes/block-device-lvm-c3b8a214952b4db5.yaml, c2dc3dc78e52c399a30035ac00cf6c3e9effeb23] + - [releasenotes/notes/fedora26-690b9fd9ac3c3d4f.yaml, 7cbbee7ea347cac690b6aabe98c2f220e374ad86] + version: 2.9.0 +- files: + - [releasenotes/notes/opensuse-423-default-3bc73fff69374cd0.yaml, 1c4c4fd7349bd78937c237dfe13fa3891945eff1] + version: 2.8.0 +- files: + - [releasenotes/notes/centos-retired-f17ae9f6f03e57e3.yaml, a00d02f6a1573ee8257105ebc18bcaba92e78ff8] + - [releasenotes/notes/dib-distribution-mirror-8c241c0d3d4a539a.yaml, 3457d2f8e82ee936ffe227e71379b437f9632a1c] + version: 2.7.0 +- files: + - [releasenotes/notes/dracut-network-adaabf90da9f6866.yaml, 54765fd2f43e43d5b2dc25e8b4cff598e9095327] + version: 2.6.0 +- files: + - [releasenotes/notes/block-device-mkfs-mount-fstab-42d7efe28fc2df04.yaml, e4e23897a13a3f3b9d28cc8d288990ab0fcc5b92] + version: 2.4.0 +- files: + - [releasenotes/notes/dash-p-after-install-58a87549c1c906c3.yaml, 95503b42017a3b96f810e3195d8edaa64995ce78] + - [releasenotes/notes/dib-run-parts-6f67d038aa5a4156.yaml, 6802cf7100e01527fcf88860e65f613f0af3e244] + - [releasenotes/notes/dib-run-parts-e18cc3a6c2d66c24.yaml, fd424757a64921a60b92837a625a23b8f681130a] + version: 2.3.0 +- files: + - [releasenotes/notes/dib-init-system_fix_for_debian_jessie-c6f7261ee84dad27.yaml, + 20389d755f60b1be43a819df8a8c80e4f6cd37ef] + version: 2.1.0 +- files: + - [releasenotes/notes/dibv2-omnibus-b30e0c7ecd76db8d.yaml, 6887e796e10b57b55ee01965b48e6e698cede520] + version: 2.0.0 +- files: + - [releasenotes/notes/doc-auto-element-dependency-cb7488c5bb7301a4.yaml, fdd2c4b2361bb9f088d8723a6fafbdf5c4101c5d] + version: 2.0.0rc1 +- files: + - [releasenotes/notes/move_tidy_logs_to_main-a8c03427fe1a445c.yaml, 022d93ee822e71245af52c4cf8f8a8e82f599af3] + - [releasenotes/notes/yum-cache-removal-148c33012515e56e.yaml, 4585955a8b82889c61deb9ecb34b8713270406a7] + version: 1.27.0 +- files: + - [releasenotes/notes/grub-timeout-1cdd14a2b1467d89.yaml, 61087d33e9ef67f05ef4a3b0dfc90ab521604292] + - [releasenotes/notes/squashfs-output-91c1f0dc37474d3c.yaml, 9d13084c4183b63587e1f5e4b03395a8df6538f6] + version: 1.26.0 +- files: + - [releasenotes/notes/block-device-partitioning-237249e7ed2bad26.yaml, ec7f56c1b2d8aa385751f02a3fa82e5a13d20b9d] + - [releasenotes/notes/package-outside-debootstrap-ac93e9ce991819f1.yaml, 45df304d488a0309fb981a4964238b81a370c358] + version: 1.24.0 +- files: + - [releasenotes/notes/openssh-server-0f6d065748a2fc18.yaml, bbcc22751f689fb1002a85e641a854006280ad66] + version: 1.23.0 +- files: + - [releasenotes/notes/opensuse-minimal-45267f5be1112c22.yaml, 90536dbab3e425d71a626f534307304389a2b7fd] + - [releasenotes/notes/remove-dib-utils-37f70dfad54900a0.yaml, d65678678ec0416550d768f323ceace4d0861bca] + version: 1.22.0 +- files: + - [releasenotes/notes/block-device-handling-279cddba8a859718.yaml, 19efc60ce8ee7abecb847b01ef1e78f3160cdaa4] + - [releasenotes/notes/element-info-entry-point-448bf622be6061a0.yaml, 91b431ce7864b0bf04ef88c71b185f3f8f5a246b] + - [releasenotes/notes/element-override-ccda78c24ab4a4ff.yaml, 274be6de551883fc14e3af30f84ba5bdf829814e] + - [releasenotes/notes/element-vars-c6bf2e6795002f01.yaml, 37a53354ec51a1d20c3ac7bfa70744fa858dcb88] + - [releasenotes/notes/runtime-ssh-host-keys-7a2fc873cc90d33e.yaml, 45467e4229b6222c63a1d274331c6fe81bca8442] + version: 1.20.0 diff -Nru python-diskimage-builder-2.11.0/releasenotes/notes/ubuntu-arbitrary-images-c796f5c6dbd40679.yaml python-diskimage-builder-2.17.0/releasenotes/notes/ubuntu-arbitrary-images-c796f5c6dbd40679.yaml --- python-diskimage-builder-2.11.0/releasenotes/notes/ubuntu-arbitrary-images-c796f5c6dbd40679.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/releasenotes/notes/ubuntu-arbitrary-images-c796f5c6dbd40679.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -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 -Nru python-diskimage-builder-2.11.0/releasenotes/source/conf.py python-diskimage-builder-2.17.0/releasenotes/source/conf.py --- python-diskimage-builder-2.11.0/releasenotes/source/conf.py 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/releasenotes/source/conf.py 2018-09-13 04:28:23.000000000 +0000 @@ -1,6 +1,3 @@ -import sys -import os - # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. diff -Nru python-diskimage-builder-2.11.0/RELEASENOTES.rst python-diskimage-builder-2.17.0/RELEASENOTES.rst --- python-diskimage-builder-2.11.0/RELEASENOTES.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-diskimage-builder-2.17.0/RELEASENOTES.rst 2018-09-13 04:30:28.000000000 +0000 @@ -0,0 +1,593 @@ +================= +diskimage-builder +================= + +.. _diskimage-builder_2.17.0: + +2.17.0 +====== + +.. _diskimage-builder_2.17.0_Other Notes: + +Other Notes +----------- + +.. releasenotes/notes/bootloader-commandline-d2db7524f1f9ad28.yaml @ f6a2452d4c72d52af1abd6f9d4165ff19a0506ba + +- It has been clarified that the ``DIB_BOOTLOADER_DEFAULT_CMDLINE`` variable appends its values to grubs ``GRUB_CMDLINE_LINUX_DEFAULT``, which is used during all normal boots but not rescue boots; as opposed to applying to ``GRUB_CMDLINE_LINUX`` + + +.. _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 +====== + +.. _diskimage-builder_2.12.0_New Features: + +New Features +------------ + +.. releasenotes/notes/bootloader-gpt-d1047f81f3a0631b.yaml @ 55b479b54f8cd064144ba8d1e2e5be33b6a975c8 + +- GPT support is added to the bootloader; see documentation for + configuration examples. This should be considered a technology + preview; there may be minor behaviour modifications as we enable + UEFI and support across more architectures. + + +.. _diskimage-builder_2.11.0: + +2.11.0 +====== + +.. _diskimage-builder_2.11.0_Bug Fixes: + +Bug Fixes +--------- + +.. releasenotes/notes/incorrect-grub-label-5d2000215c0cc73e.yaml @ c7da8bc90aa9dd917ee9a4ae6b6e6cef8a9825d6 + +- This fixes bug 1742170 where the grub root label is different than the + file system label when booting from a whole disk image. + +.. releasenotes/notes/upgrade-pip-before-c-d2443847f9d58c7a.yaml @ 34ff72f2530ed8925c8b5d71371808d39986866f + +- This fixes bug 1744403 where 60-ironic-agent-install fails to run + when DIB_INSTALLTYPE_ironic_agent=source is set. pip installs + constraints with the -c argument and this argument is a relatively + newer addion. The currently installed pip may not support that + option and must be upgraded before proceeding. + + +.. _diskimage-builder_2.10.0: + +2.10.0 +====== + +.. _diskimage-builder_2.10.0_New Features: + +New Features +------------ + +.. releasenotes/notes/sysprep-f3fd036bc1d2c405.yaml @ 6c2b1465cce11631f5d6bf757ea194b26ca3cb7f + +- Adds sysprep element included by all systemd distros + +.. releasenotes/notes/timestamp-43015aa5434e8ddb.yaml @ f60dd384827beb8ec193ac7738e973941fc8b6d5 + +- A ``--logfile`` option is added to save output to a given file. + +.. releasenotes/notes/timestamp-43015aa5434e8ddb.yaml @ f60dd384827beb8ec193ac7738e973941fc8b6d5 + +- By default, all ``stdout`` will log with timestamps (this used to be inconsistent; python tools logged with a timestamp, and bash parts did not). If you set ``DIB_NO_TIMESTAMP`` to ``1`` the timestamp prefix will be suppressed (this would be appropriate if you are running diskimage-builder and capturing its output, and adding your own timestamp). Note that output to ``--logfile`` will always be timestamped. + +.. releasenotes/notes/timestamp-43015aa5434e8ddb.yaml @ f60dd384827beb8ec193ac7738e973941fc8b6d5 + +- You can set ``DIB_QUIET`` to ``1`` to suppress all output. This is likely only useful when used with the ``--logfile`` command. + + +.. _diskimage-builder_2.10.0_Bug Fixes: + +Bug Fixes +--------- + +.. releasenotes/notes/sysprep-f3fd036bc1d2c405.yaml @ 6c2b1465cce11631f5d6bf757ea194b26ca3cb7f + +- Adds default sysprep element clearing /etc/machine-id which + prevents duplicated /etc/machine-id by forcing systemd to + generate a new id for each booted system. + + +.. _diskimage-builder_2.9.0: + +2.9.0 +===== + +.. _diskimage-builder_2.9.0_New Features: + +New Features +------------ + +.. releasenotes/notes/block-device-lvm-c3b8a214952b4db5.yaml @ c2dc3dc78e52c399a30035ac00cf6c3e9effeb23 + +- Adds lvm support, allowing to create volumes. + + +.. _diskimage-builder_2.9.0_Upgrade Notes: + +Upgrade Notes +------------- + +.. releasenotes/notes/fedora26-690b9fd9ac3c3d4f.yaml @ 7cbbee7ea347cac690b6aabe98c2f220e374ad86 + +- The ``fedora-minimal`` and ``fedora`` elements have been updated to default to Fedora 26. Note if you to pin to specific versions, be sure to specify ``DIB_RELEASE``. + + +.. _diskimage-builder_2.8.0: + +2.8.0 +===== + +.. _diskimage-builder_2.8.0_Upgrade Notes: + +Upgrade Notes +------------- + +.. releasenotes/notes/opensuse-423-default-3bc73fff69374cd0.yaml @ 1c4c4fd7349bd78937c237dfe13fa3891945eff1 + +- The opensuse and opensuse-minimal element are now defaulting to 42.3, which + is the latest stable openSUSE release. Building for 42.2 is still supported, + however requires setting DIB_RELEASE to '42.2' explicitly. + + +.. _diskimage-builder_2.7.0: + +2.7.0 +===== + +.. _diskimage-builder_2.7.0_Deprecation Notes: + +Deprecation Notes +----------------- + +.. releasenotes/notes/centos-retired-f17ae9f6f03e57e3.yaml @ a00d02f6a1573ee8257105ebc18bcaba92e78ff8 + +- The ``centos`` and ``rhel`` elements have been removed. These + were building version 6 which is no longer supported (mostly due + to a lack of python 2.7). Version 7 support is available via the + ``centos7`` and ``rhel7`` elements (which downloads and modifies + the upstream cloud images) or via ``centos-minimal`` (which builds + the image from a empty chroot; only available for CentOS). + ``centos-minimal`` is suggested as this is what OpenStack + Infrastructure uses for its elements. + + Unfortunately, ``centos-minimal`` sets ``DISTRO=centos`` while + ``centos7`` sets ``DISTRO=centos7``, despite building the same + thing as far as upper levels are concerned. We plan to rectify + this in the version 8 time-frame. + +.. releasenotes/notes/dib-distribution-mirror-8c241c0d3d4a539a.yaml @ 3457d2f8e82ee936ffe227e71379b437f9632a1c + +- The ``DIB_[DISTRO]_DISTRIBUTION_MIRROR`` variables have been removed. These were undocumented ways to set ``DIB_DISTRIBUTION_MIRROR`` for some elements. It was not implemented consistently and causing some confusion. If you need to setup mirrors for testing purposes, the ``openstack-ci-mirrors`` element is a good example that is used by OpenStack gate testing. + + +.. _diskimage-builder_2.6.0: + +2.6.0 +===== + +.. _diskimage-builder_2.6.0_Deprecation Notes: + +Deprecation Notes +----------------- + +.. releasenotes/notes/dracut-network-adaabf90da9f6866.yaml @ 54765fd2f43e43d5b2dc25e8b4cff598e9095327 + +- The ``dracut-network`` element has been removed. It has not been functioning for some time due to incorrect paths. + + +.. _diskimage-builder_2.4.0: + +2.4.0 +===== + +.. _diskimage-builder_2.4.0_New Features: + +New Features +------------ + +.. releasenotes/notes/block-device-mkfs-mount-fstab-42d7efe28fc2df04.yaml @ e4e23897a13a3f3b9d28cc8d288990ab0fcc5b92 + +- Adds mkfs, mount and fstab to the block device layer. + + +.. _diskimage-builder_2.3.0: + +2.3.0 +===== + +.. _diskimage-builder_2.3.0_Deprecation Notes: + +Deprecation Notes +----------------- + +.. releasenotes/notes/dib-run-parts-6f67d038aa5a4156.yaml @ 6802cf7100e01527fcf88860e65f613f0af3e244 + +- The ``dib-run-parts`` element is no longer required as + ``disk-image-create`` will directly source the internal version + for running scripts within the chroot. This element was + unintentionally leaving ``/usr/local/bin/dib-run-parts`` in the + built image. From code search we do not believe anyone was + relying on the presence of this script. If you do require it, you + should source the ``dib-utils`` package to install. + +.. releasenotes/notes/dib-run-parts-e18cc3a6c2d66c24.yaml @ fd424757a64921a60b92837a625a23b8f681130a + +- dib no longer exports ``dib-run-parts``. Adding this was an + oversight made during v2 development, since ``dib-utils`` already + provides this. The ``dib-run-parts`` used internally + (``diskimage_builder/lib/dib-run-parts``) is not intended to be + used by external tools. If you require ``dib-run-parts``, you + should install the ``dib-utils`` package. + + +.. _diskimage-builder_2.3.0_Other Notes: + +Other Notes +----------- + +.. releasenotes/notes/dash-p-after-install-58a87549c1c906c3.yaml @ 95503b42017a3b96f810e3195d8edaa64995ce78 + +- The packages specified with the `-p` command-line operation are now installed after the `install.d` phase, not before. This is to give elements priority when installing packages. The flag documentation has been updated to describe this. + + +.. _diskimage-builder_2.1.0: + +2.1.0 +===== + +.. _diskimage-builder_2.1.0_Bug Fixes: + +Bug Fixes +--------- + +.. releasenotes/notes/dib-init-system_fix_for_debian_jessie-c6f7261ee84dad27.yaml @ 20389d755f60b1be43a819df8a8c80e4f6cd37ef + +- dib-init-system did not correctly find the init system for Debian Jessie and Debian Stretch. This version also looks for /bin/systemctl as as hint for systemd and fixes the problem. + + +.. _diskimage-builder_2.0.0: + +2.0.0 +===== + +.. _diskimage-builder_2.0.0_Prelude: + +Prelude +------- + +.. releasenotes/notes/dibv2-omnibus-b30e0c7ecd76db8d.yaml @ 6887e796e10b57b55ee01965b48e6e698cede520 + +Version 2.0.0 of diskimage-builder incorporates recent work from the feature/v2 branch. This includes incorporating some largely internal changes to the way it finds and calls elements, enhancements to partitioning and removal of some long-deprecated elements. +If you use dib exclusively via the command-line disk-image-create installed from a package or via pypi you are unlikely to notice any difference (if you run it directly from a git-tree checkout, you may be affected). + +.. _diskimage-builder_2.0.0_New Features: + +New Features +------------ + +.. releasenotes/notes/dibv2-omnibus-b30e0c7ecd76db8d.yaml @ 6887e796e10b57b55ee01965b48e6e698cede520 + +- 2.0.0 includes a new framework for partitioning contributed by + Andreas Florath. This should allow for creating multiple + partitions, images with encryption, LVM support and flexibility + for multiple-devices, all of which are currently not supported. + Please check the v2 documentation, specs and reach out if these + features interest you (some parts still in review). + +.. releasenotes/notes/dibv2-omnibus-b30e0c7ecd76db8d.yaml @ 6887e796e10b57b55ee01965b48e6e698cede520 + +- Element override is now supported. If you have an element of the + same name earlier in the ``ELEMENTS_PATH``, it will override later + instances (previously, the behaviour was undefined). + + +.. _diskimage-builder_2.0.0_Upgrade Notes: + +Upgrade Notes +------------- + +.. releasenotes/notes/dibv2-omnibus-b30e0c7ecd76db8d.yaml @ 6887e796e10b57b55ee01965b48e6e698cede520 + +- For purposes of both users and development we want dib to be as + "pythonic" as possible and behave like all other projects. Two + major visible changes are: + + - command-line scripts are entry points (i.e. need to be installed) + - elements have moved under diskimage_create module + + The result of the first is that ``./bin/disk-image-create`` from + the source tree is no longer there. Like all other projects, you + should install dib into a virtualenv (if you're developing, use + pip -e) and ``disk-image-create`` will "just work". + + The second change, moving the inbuilt elements under the + ``diskimage_create`` module, is a simplification so we always have + a canonical path to our elements. Since we now always know where + elements are relative to the imported diskimage_builder module we + can drop all the path guessing complexity. This has other good + flow-on effects such as ``testr`` being able to find unit-tests + for elements in the normal fashion and having imports work as + usual. + + We are aware there are a number of tools that like to take dib + elements and do things with them. Reading some of the dib source + you may find there is a canonical way to find out the included dib + elements path -- ask dib itself, something like + + .. code-block:: shell + + DIB_ELEMENTS=$(python -c ' + import diskimage_builder.paths; + diskimage_builder.paths.show_path("elements")') + + Note you probably do not want this. As mentioned, another feature + of v2 is override elements -- an element that appears first in the + element path-list will override any built-in one (just like + $PATH). There is a function, + ``diskimage_builder.get_elements()``, which will correctly process + the element path, calculate overrides and return a canonical list + of elements, their dependencies and correct paths. + + *That* said, you probably do not want this either! There are a + number of elements that do things on behalf of other elements -- + they look for a file in the included elements, say, and use that + as a manifest for something. Previously, these would just have to + make up their own element processing via inspection of the + command-line arguments. dib now exports pre-computed variables + that an element can walk for all the current build elements -- a + YAML list for easy python decoding and a function that builds an + array for Bash elements. + + +.. _diskimage-builder_2.0.0_Deprecation Notes: + +Deprecation Notes +----------------- + +.. releasenotes/notes/dibv2-omnibus-b30e0c7ecd76db8d.yaml @ 6887e796e10b57b55ee01965b48e6e698cede520 + +- A number of long-deprecated elements have been removed in v2, which + are to the best of our knowledge unused. + + - ``partitioning-sfdisk`` + - ``deploy-ironic-element`` + - ``ironc-discovered-ramdisk`` + - ``serial-console-element`` + - ``map-services`` + +.. releasenotes/notes/dibv2-omnibus-b30e0c7ecd76db8d.yaml @ 6887e796e10b57b55ee01965b48e6e698cede520 + +- We have removed and deprecated the ``dib-utils`` package. This + was intended to be a more generic repository of tools that might + be useful outside dib, but that did not eventuate and it has been + folded back into dib for simplicity. + + +.. _diskimage-builder_2.0.0rc1: + +2.0.0rc1 +======== + +.. _diskimage-builder_2.0.0rc1_New Features: + +New Features +------------ + +.. releasenotes/notes/doc-auto-element-dependency-cb7488c5bb7301a4.yaml @ fdd2c4b2361bb9f088d8723a6fafbdf5c4101c5d + +- Create sphinx directive 'element_deps' that automatically generates dependencies in the element documentation. + + +.. _diskimage-builder_1.27.0: + +1.27.0 +====== + +.. _diskimage-builder_1.27.0_New Features: + +New Features +------------ + +.. releasenotes/notes/move_tidy_logs_to_main-a8c03427fe1a445c.yaml @ 022d93ee822e71245af52c4cf8f8a8e82f599af3 + +- Cleaning logs was split, some was done in the img-functions.finalise_base, some was done in the base element. The version unifies tidy up logs in the lib/img-functions. Especially when building docker container images the base element cannot be used. This patch removes about some hundreds KB of useless logs in cases when the base element is not used. + + +.. _diskimage-builder_1.27.0_Deprecation Notes: + +Deprecation Notes +----------------- + +.. releasenotes/notes/yum-cache-removal-148c33012515e56e.yaml @ 4585955a8b82889c61deb9ecb34b8713270406a7 + +- The ``DIB_YUMCHROOT_USE_CACHE`` variable has been removed and the Fedora and CentOS ``-minimal`` initial chroot will always be created by the package manager. The default creation of a chroot tarball is stopped for these elements. This unused option was unsafe; there is no guarantee that the base system will not change even between runs. Getting the package manager to reuse the cache for the initial chroot install is future work. + + +.. _diskimage-builder_1.26.0: + +1.26.0 +====== + +.. _diskimage-builder_1.26.0_New Features: + +New Features +------------ + +.. releasenotes/notes/grub-timeout-1cdd14a2b1467d89.yaml @ 61087d33e9ef67f05ef4a3b0dfc90ab521604292 + +- The ``bootloader`` element will explicitly set the timeout to ``5`` seconds when using ``grub`` (previously this was undefined, but platform defaults were usually 5 seconds). Set this to ``0`` for faster boots. + +.. releasenotes/notes/squashfs-output-91c1f0dc37474d3c.yaml @ 9d13084c4183b63587e1f5e4b03395a8df6538f6 + +- New squashfs image output format. + + +.. _diskimage-builder_1.24.0: + +1.24.0 +====== + +.. _diskimage-builder_1.24.0_New Features: + +New Features +------------ + +.. releasenotes/notes/block-device-partitioning-237249e7ed2bad26.yaml @ ec7f56c1b2d8aa385751f02a3fa82e5a13d20b9d + +- Create partitions with MBR layout optimized for performance and highly configurable. + + +.. _diskimage-builder_1.24.0_Deprecation Notes: + +Deprecation Notes +----------------- + +.. releasenotes/notes/block-device-partitioning-237249e7ed2bad26.yaml @ ec7f56c1b2d8aa385751f02a3fa82e5a13d20b9d + +- The new partitions are created based on configuration rather than on a list of provided commands for a special partitioning tool. Therefore elements using tools (like partitioning-sfdisk) are deprecated and will be removed. + + +.. _diskimage-builder_1.24.0_Bug Fixes: + +Bug Fixes +--------- + +.. releasenotes/notes/package-outside-debootstrap-ac93e9ce991819f1.yaml @ 45df304d488a0309fb981a4964238b81a370c358 + +- The `debian-minimal` and and `ubuntu-minimal` elements now install directly from the updates repo, avoiding the need to double-install packages during build. + + +.. _diskimage-builder_1.23.0: + +1.23.0 +====== + +.. _diskimage-builder_1.23.0_New Features: + +New Features +------------ + +.. releasenotes/notes/openssh-server-0f6d065748a2fc18.yaml @ bbcc22751f689fb1002a85e641a854006280ad66 + +- New openssh-server element to ensure that the openssh server is installed and enabled during boot. + + +.. _diskimage-builder_1.22.0: + +1.22.0 +====== + +.. _diskimage-builder_1.22.0_New Features: + +New Features +------------ + +.. releasenotes/notes/opensuse-minimal-45267f5be1112c22.yaml @ 90536dbab3e425d71a626f534307304389a2b7fd + +- New zypper-minimal and opensuse-minimal elements to create basic openSUSE images. These two new elements are also making use of the existing zypper element which has been extended to include the functionality previously present in the opensuse element. + + +.. _diskimage-builder_1.22.0_Deprecation Notes: + +Deprecation Notes +----------------- + +.. releasenotes/notes/remove-dib-utils-37f70dfad54900a0.yaml @ d65678678ec0416550d768f323ceace4d0861bca + +- The `dib-utils` requirement has been removed as the `dib-run-parts` script is now shipped from within diskimage-builder. The `dib-utils` project is now considered retired. + + +.. _diskimage-builder_1.20.0: + +1.20.0 +====== + +.. _diskimage-builder_1.20.0_New Features: + +New Features +------------ + +.. releasenotes/notes/block-device-handling-279cddba8a859718.yaml @ 19efc60ce8ee7abecb847b01ef1e78f3160cdaa4 + +- Add new block device handling. Unify and generalize the creation and usage of block device. This release includes setting up the general infrastructure and setting up loop device + +.. releasenotes/notes/element-vars-c6bf2e6795002f01.yaml @ 37a53354ec51a1d20c3ac7bfa70744fa858dcb88 + +- Elements that need access to the other elements being used during the build should use the new ``IMAGE_ELEMENT_YAML`` environment variable and it's Bash equivalent ``get_image_element_array``. + +.. releasenotes/notes/runtime-ssh-host-keys-7a2fc873cc90d33e.yaml @ 45467e4229b6222c63a1d274331c6fe81bca8442 + +- New element (runtime-ssh-host-keys) to manage SSH host keys at boot. Since SSH host key generation is not standard across operating systems, add support for both Debian and Ubuntu to handle it. While this is a new element, simple-init has been updated to depend on it. + + +.. _diskimage-builder_1.20.0_Known Issues: + +Known Issues +------------ + +.. releasenotes/notes/block-device-handling-279cddba8a859718.yaml @ 19efc60ce8ee7abecb847b01ef1e78f3160cdaa4 + +- Because the implementation of the new block device layer is not complete, some features which are already implemented cannot be used because of limitations of the current environment. + + +.. _diskimage-builder_1.20.0_Deprecation Notes: + +Deprecation Notes +----------------- + +.. releasenotes/notes/block-device-handling-279cddba8a859718.yaml @ 19efc60ce8ee7abecb847b01ef1e78f3160cdaa4 + +- 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 a result, this is used; if there is no result, the new way of block device handling is used. Please note that the old way of block device handling has some major limitations such as that it is only possible to use one block device. + +.. releasenotes/notes/block-device-handling-279cddba8a859718.yaml @ 19efc60ce8ee7abecb847b01ef1e78f3160cdaa4 + +- The element 'partitioning-sfdisk' is deprecated. The new implementation will create the partition tables based on a tool independent description. + +.. releasenotes/notes/element-info-entry-point-448bf622be6061a0.yaml @ 91b431ce7864b0bf04ef88c71b185f3f8f5a246b + +- The ``element-info`` script is now provided by a standard python entry-point, rather than an explicit wrapper script. This may affect you if you were running this script directly out of ``bin`` in the source directory without installing. See developer notes for details on using developer-installs with virtual environments for testing. + +.. releasenotes/notes/element-override-ccda78c24ab4a4ff.yaml @ 274be6de551883fc14e3af30f84ba5bdf829814e + +- Element override behavior is now defined, with elements found in earlier entries of ``ELEMENTS_PATH`` overriding later ones (e.g. the same semantics as ``$PATH``). Previously the behavior was undefined. + diff -Nru python-diskimage-builder-2.11.0/requirements.txt python-diskimage-builder-2.17.0/requirements.txt --- python-diskimage-builder-2.11.0/requirements.txt 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/requirements.txt 2018-09-13 04:28:23.000000000 +0000 @@ -2,9 +2,9 @@ # 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.10 # MIT +PyYAML>=3.12 # MIT flake8<2.6.0,>=2.5.4 # MIT six>=1.10.0 # MIT stevedore>=1.20.0 # Apache-2.0 diff -Nru python-diskimage-builder-2.11.0/setup.cfg python-diskimage-builder-2.17.0/setup.cfg --- python-diskimage-builder-2.11.0/setup.cfg 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/setup.cfg 2018-09-13 04:30:28.000000000 +0000 @@ -1,19 +1,19 @@ [metadata] name = diskimage-builder summary = Golden Disk Image builder. -description-file = - README.rst +description-file = + README.rst author = OpenStack author-email = openstack-dev@lists.openstack.org -license: Apache License (2.0) +license = Apache License (2.0) home-page = https://docs.openstack.org/diskimage-builder/latest/ -classifier = - Development Status :: 5 - Production/Stable - License :: OSI Approved :: Apache Software License - Operating System :: POSIX :: Linux - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3 - Environment :: Console +classifier = + Development Status :: 5 - Production/Stable + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Environment :: Console [build_sphinx] all_files = 1 @@ -23,25 +23,22 @@ [pbr] autodoc_index_modules = 1 -autodoc_exclude_modules = - setup.py - diskimage_builder.tests.* - diskimage_builder.block_device.tests.* - # elements are a weird mix of scripts & python - diskimage_builder.elements.* - # this is non-pythony stuff - diskimage_builder.lib.* +autodoc_exclude_modules = + setup.py + diskimage_builder.tests.* + diskimage_builder.block_device.tests.* + # elements are a weird mix of scripts & python + diskimage_builder.elements.* + # this is non-pythony stuff + diskimage_builder.lib.* [files] -packages = - diskimage_builder - -# ramdisk-image-create is a symlink which becomes a -# real file on install; see lp bug #1212482 -scripts = - bin/dib-lint -data_files = - share/diskimage-builder/scripts = scripts/* +packages = + diskimage_builder +scripts = + bin/dib-lint +data_files = + share/diskimage-builder/scripts = scripts/* [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext @@ -61,21 +58,23 @@ universal = 1 [entry_points] -console_scripts = - element-info = diskimage_builder.element_dependencies:main - dib-block-device = diskimage_builder.block_device.cmd:main - disk-image-create = diskimage_builder.disk_image_create:main - ramdisk-image-create = diskimage_builder.disk_image_create:main - -diskimage_builder.block_device.plugin = - local_loop = diskimage_builder.block_device.level0.localloop:LocalLoop - partitioning = diskimage_builder.block_device.level1.partitioning:Partitioning - lvm = diskimage_builder.block_device.level1.lvm:LVMPlugin - mkfs = diskimage_builder.block_device.level2.mkfs:Mkfs - mount = diskimage_builder.block_device.level3.mount:Mount - fstab = diskimage_builder.block_device.level4.fstab:Fstab - -# unit test extensions -diskimage_builder.block_device.plugin_test = - test_a = diskimage_builder.block_device.tests.plugin.test_a:TestA - test_b = diskimage_builder.block_device.tests.plugin.test_b:TestB +console_scripts = + element-info = diskimage_builder.element_dependencies:main + dib-block-device = diskimage_builder.block_device.cmd:main + disk-image-create = diskimage_builder.disk_image_create:main + ramdisk-image-create = diskimage_builder.disk_image_create:main +diskimage_builder.block_device.plugin = + local_loop = diskimage_builder.block_device.level0.localloop:LocalLoop + partitioning = diskimage_builder.block_device.level1.partitioning:Partitioning + lvm = diskimage_builder.block_device.level1.lvm:LVMPlugin + mkfs = diskimage_builder.block_device.level2.mkfs:Mkfs + mount = diskimage_builder.block_device.level3.mount:Mount + fstab = diskimage_builder.block_device.level4.fstab:Fstab +diskimage_builder.block_device.plugin_test = + test_a = diskimage_builder.block_device.tests.plugin.test_a:TestA + test_b = diskimage_builder.block_device.tests.plugin.test_b:TestB + +[egg_info] +tag_build = +tag_date = 0 + diff -Nru python-diskimage-builder-2.11.0/test-requirements.txt python-diskimage-builder-2.17.0/test-requirements.txt --- python-diskimage-builder-2.11.0/test-requirements.txt 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/test-requirements.txt 2018-09-13 04:28:23.000000000 +0000 @@ -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 @@ -11,7 +11,7 @@ testtools>=2.2.0 # MIT # Doc requirements -sphinx!=1.6.6,>=1.6.2 # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD openstackdocstheme>=1.18.1 # Apache-2.0 # releasenotes diff -Nru python-diskimage-builder-2.11.0/tests/install_test_deps.sh python-diskimage-builder-2.17.0/tests/install_test_deps.sh --- python-diskimage-builder-2.11.0/tests/install_test_deps.sh 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/tests/install_test_deps.sh 2018-09-13 04:28:23.000000000 +0000 @@ -9,6 +9,8 @@ bzip2 \ debootstrap \ docker.io \ + dosfstools \ + gdisk \ inetutils-ping \ lsb-release \ kpartx \ @@ -22,6 +24,8 @@ dpkg \ debootstrap \ docker \ + dosfstools \ + gdisk \ kpartx \ util-linux \ qemu-img \ @@ -30,6 +34,8 @@ bzip2 \ debootstrap \ docker \ + dosfstools \ + gdisk \ kpartx \ util-linux \ python-pyliblzma \ @@ -40,6 +46,8 @@ app-emulation/qemu \ dev-python/pyyaml \ sys-block/parted \ + sys-apps/gptfdisk \ sys-fs/multipath-tools \ + sys-fs/dosfstools \ qemu-img \ yum-utils diff -Nru python-diskimage-builder-2.11.0/tests/run_functests.sh python-diskimage-builder-2.17.0/tests/run_functests.sh --- python-diskimage-builder-2.11.0/tests/run_functests.sh 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/tests/run_functests.sh 2018-09-13 04:28:23.000000000 +0000 @@ -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")') @@ -44,6 +44,7 @@ fedora/build-succeeds ubuntu/trusty-build-succeeds ubuntu/xenial-build-succeeds + ubuntu/bionic-build-succeeds # No longer reasonable to test upstream (lacks a mirror in infra) # Note this is centos6 and should probably be removed @@ -51,6 +52,9 @@ # This job is a bit unreliable, even if we get mirroring debian-minimal/testing-build-succeeds + + # Replaced by bionic + ubuntu-minimal/trusty-build-succeeds ) # The default output formats (specified to disk-image-create's "-t" @@ -102,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 # Run a disk-image-build build of ELEMENT including any elements # specified by TEST_ELEMENT. Pass OUTPUT_FORMAT to "-t" @@ -110,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) @@ -128,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 @@ -135,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 @@ -143,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 @@ -216,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] ..." @@ -229,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 " : functional test to run" echo " Special test 'all' will run all tests" exit 0 @@ -257,6 +287,9 @@ k) KEEP_OUTPUT=1 ;; + L) + LOG_DIRECTORY=${OPTARG} + ;; \?) echo "Invalid option: -$OPTARG" exit 1 @@ -301,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} @@ -361,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 diff -Nru python-diskimage-builder-2.11.0/tox.ini python-diskimage-builder-2.17.0/tox.ini --- python-diskimage-builder-2.11.0/tox.ini 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/tox.ini 2018-09-13 04:28:23.000000000 +0000 @@ -45,3 +45,10 @@ [flake8] ignore = E125,E126,E127,H202,H803 exclude = .venv,.git,.tox,dist,doc/build,doc/source,*lib/python*,*egg,build,conf.py + +[testenv:lower-constraints] +basepython = python3 +deps = + -c{toxinidir}/lower-constraints.txt + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/requirements.txt diff -Nru python-diskimage-builder-2.11.0/.zuul.d/jobs.yaml python-diskimage-builder-2.17.0/.zuul.d/jobs.yaml --- python-diskimage-builder-2.11.0/.zuul.d/jobs.yaml 2018-02-20 05:26:23.000000000 +0000 +++ python-diskimage-builder-2.17.0/.zuul.d/jobs.yaml 2018-09-13 04:28:23.000000000 +0000 @@ -48,6 +48,7 @@ irrelevant-files: - ^.*\.rst$ - ^doc/.*$ + - openstack-tox-lower-constraints gate: jobs: @@ -65,6 +66,7 @@ - ^.*\.rst$ - ^doc/.*$ - tripleo-buildimage-overcloud-full-centos-7 + - openstack-tox-lower-constraints - job: name: dib-dsvm-functests-python2-centos-7 @@ -97,16 +99,6 @@ - openstack/diskimage-builder - job: - name: dib-dsvm-functests-python2-opensuse-423 - parent: legacy-dsvm-base - run: playbooks/legacy/dib-dsvm-functests-python2-opensuse-423/run.yaml - post-run: playbooks/legacy/dib-dsvm-functests-python2-opensuse-423/post.yaml - timeout: 3600 - nodeset: legacy-opensuse-423 - required-projects: - - openstack/diskimage-builder - -- job: name: dib-dsvm-functests-python2-ubuntu-trusty parent: legacy-dsvm-base run: playbooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty/run.yaml @@ -162,14 +154,3 @@ timeout: 3600 required-projects: - openstack/diskimage-builder - -- job: - name: dib-dsvm-functests-python3-opensuse-423 - parent: legacy-dsvm-base - run: playbooks/legacy/dib-dsvm-functests-python3-opensuse-423/run.yaml - post-run: playbooks/legacy/dib-dsvm-functests-python3-opensuse-423/post.yaml - timeout: 3600 - nodeset: legacy-opensuse-423 - required-projects: - - openstack/diskimage-builder -