Sphix 1.5 (I9e7261c4124b71eeb6bddd9e21747b61bbdc16fa) includes
"warning-is-error" which supersedes pbr's warnerrors. Enable this and
fix up the resulting failures
- trailing lines for lists in element_deps directive
- missing README's that are linked
- syntax error and highlighting in building instructions
Change-Id: I6549551b4a9bf47076c9811a7a38a666cbea2a50
99-squash-package-install in the package-installs element does not
know which python environments the requirements were installed into.
This can cause it to select the wrong python to run the
package-installs-squash script.
Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Change-Id: I5fab0e192c3a2dad8f60e821c184479e24e33bcd
execfile() has gone in python3, and if you google various
stackoverflow results, python-dev mailing list threads and other
projects it seems runpy is considered one of the better solutions.
This should be py2.7 safe too.
Change-Id: I18077ba9d603752492cc81f260e12710981f4dff
On Debian Jessie and Debian Stretch systemctl is in /bin.
If the package systemd-sysv is not installed the script
dib-init-system did not find the init system.
This patch fixes the problem: it also looks in /bin
for systemctl and if found decides for systemd.
Change-Id: I5a18052a070bad5e16b14672237a1e2b38513949
Signed-off-by: Andreas Florath <andreas@florath.net>
Depending on the types of deployment (security, nfv...) some extra
kernel flags are needed on the images. This change exposes the
DIB_BOOTLOADER_DEFAULT_CMDLINE parameter, defaulting to the
existing 'nofb nomodeset vga=normal', that will allow to modify
these boot params.
Change-Id: I67d191fa5ca44a57f776cb9739a02dd71212969c
Closes-Bug: #1668890
Scripts have moved from bin/ to diskimage_builder/lib (and are not
executable, since they are called from dib). Add a match so we run
checkers over those files.
Clarify the situation with .py files while we're here.
Change-Id: I8a1ef4b00a185b83c8b1f29c563b85e78bc233ca
The order of the partitions is important, it needs to be preserved.
If using a simple dict, this is not happening. As a consequence,
checks like 'primary partition being first' are failing because the
dictionary sorts the partitions randomly.
Switched to OrderedDict solved the problem, as it preserves the
ordering it gets from the yaml blob.
Change-Id: Icfa9bd95ffd0203d7c3f6af95de3a6f848c2a954
Now that the main partitioning refactor patch is merged, there is
a small relict of handling partitions still in the disk-image-create
main.
This patch moves the functionality from disk-image-create to the
block-device/partitioning module: it is mostly a rewrite of the
original bash code in python.
Change-Id: Ia73baeca74180a7bc9ea487da03ff56d6a3070ce
Signed-off-by: Andreas Florath <andreas@florath.net>
Similarly to Fedora we need to register the virtualenv package
with the rpm database to avoid things becoming messy later on
when package dependencies are conflicting with the from-source
install.
Change-Id: I67654fe5533e6086a17b38e2ae79a630a609ff92
The current pip install script only checked for centos/fedora
This causes setuptools errrors like (with pbr install):
"SyntaxError: '<' operator not allowed in environment markers"
Explictly list distro names in that situation
Change-Id: I5c894ab6152acf5441231acc1215fe00967f4f31
this is basically the deprecated version of --non-interactive, which is
already being used, so this is duplicate and only causes warnings but
doesn't help with anything
Change-Id: Ic98790461636c4136b7005bdc31ce08f8ca81e0f
disk-image-create already does that globally after the guest is
finalized, see lib/img-functions:finalise_base. Thus, there is no need
to remove part of /tmp manually, and no other distro element does that.
Change-Id: Id3b72d41fce258af98b31976ef726d57a0a9fae4
Sphinx 1.5 fails with current pbr (needs new pbr release, see change
I52d45fa0a0d42de690d3a492068f7bb03483a224.
For now, set warnerrors to False to be able to use this.
Also, remove duplicate requirements line.
Also, update to new sphinx version to show that this works.
This is in reaction to the failure in
Ia184446fe34c49a48ca079c828157ea34e662d4b.
Change-Id: I9e7261c4124b71eeb6bddd9e21747b61bbdc16fa
Looks that the special handling for Ubuntu is not needed any longer
(its a pity that there are no detailed comments...).
The grub2 element is a second implementation of the bootstrap element
- but because there are some features that come only here, e.g. efi
boot, it should be working as long as this is not implemented in the
bootloader element.
Change-Id: I74269116ea30b84f3259805720d5cd1616f960c5
Signed-off-by: Andreas Florath <andreas@florath.net>
Closes-Bug: #1627402
Currently there is no description of dependencies in the generated
documentation of the elements: therefore a user of an element does not
know which other elements are automatically included and e.g. which
configuration options are available. In addition there are some
copy&pastes of parts of the README.rst scattered thought different
Ubuntu and Debian specific elements.
This patch adds a semi-automatic generation of dependency information
of all elements. Nevertheless these are not automatically included.
The author of the element's README.rst can decide if and where the
dependency information should appear and can use the descriptor
.. element_deps::
for this.
This patch adds the dependency information for some Debian and
Ubuntu patches - and creates the base for later removing the
duplicated parts.
A call is added to element_dependencies._find_all_elements() to
populate reverse dependencies for Element objects.
(This is a reworking of I31d2b6050b6c46fefe37378698e9a330025db430 for
the feature/v2 branch)
Change-Id: Iebb83916fed71565071246baa550849eef40560b
It seems that pbr's "warnerrors" isn't actually doing anything at the
moment (I680b448471e687919d202e8f2abe57f8ba3b22ee) meaning we're able
to commit docs with RST parser errors. Fix all these up in some
minimal way (I have not audited content, just made it pass build).
Link the specs in so they're referenced from the top level.
Change-Id: Id67b9ea7ba8f49b43969c58ca3fb7fa1243538a4
Turns out that you really have to have the elements dir symlinked
under the source directory for the globbing to match anything. AFAICT
there's no way to add external directories to the sphinx build.
Change-Id: Iaa3576ef250822b0d57bebce1ebbe03e5bafa042
Following a similar fix to pip-and-virtualenv element in
Ia730850a48e2478fd5461710a9d2619408725cd8, python-brickclient is also
required to be fixed to handle python3 only systems.
Change-Id: I442469beb5a20074425e7059eec7f78604d6cc5a
By default (during boot) the use_tempaddr is set to <=0 for all
up-to date kernels. Only Ubuntu installes a sysctl setting which
sets the use_tempaddr to 2 (/etc/sysctl.d/10-ipv6-privacy.conf) [1].
The 80-disable-rfc3041 overwrites this setting and sets
use_tempaddr back to 0.
Because this only affects Ubuntu it makes sense to move the script
to the ubuntu-common element. The other motivation for the move is,
to clear the base element that it can be removed.
[1] https://bugs.launchpad.net/ubuntu/+source/procps/+bug/1068756
Change-Id: Ibf261818ca8243874fde9eb3650bb65188fa228d
Signed-off-by: Andreas Florath <andreas@florath.net>
Rather than echo the package list separately, turn on tracing around
the yum/dnf call so that we get more complete output. No loss of
info, as this effecitvely shows the packgae list; plus it has the
bonus that it makes more sense in the logs, because otherwise you get
all the yum/dnf output without knowing what the call was.
Change-Id: I44df6e944af602e6b03f669c15a521056de1ad79
With the warnings added in Ibfe69dc84246662ed8caa0d4c3e2edf68314c87e
we can see that this element is relying on map-packages to translate
the debian package name python-pyopenssl -> pyOpenSSL.
This makes no sense because this is not a generic element; it should
just use the fedora/redhat names directly.
Change-Id: Id6ecb6f978b60d6a527692692a408d1d35828de2
Currently every run of install-packages puts out a warning that
map-packages is obsolete. This happens even if map-package does no
mapping. The caller can't prevent the call (it's part of
install-packages) and it gives no actionable help if there is
something wrong.
Keep track of any mappings we are doing in the obsolete map-packages
run and only output a warning if we actually translate anything. If
we do output, tell the caller what packages were translated so they
can make appropriate pkg-map entries.
Change-Id: Ibfe69dc84246662ed8caa0d4c3e2edf68314c87e
There are a couple of loops identified here that output a lot of
tracing each iteration for little value. Make them only trace at
higher levels (-x -x and above).
Points of actual interest within the loops are replaced with an
explicit "echo" statement.
Additionally, export DIB_DEBUG_TRACE explicitly and in all cases, not
just when tracing is turned on.
Change-Id: Id710c0b111fc1f5e1ae87fc35f6db28b24867bad
dib_[environment|args] manifest files are currently generated by the
base element and then moved by the manifest element.
This creates too many corner cases -- if you don't include the base
element (we are trying to empty it ATM) you don't get the env/args
saved at all; if you include base but don't include the manifest
element they're saved to /etc, but if you do have the manifest element
they're moved to the manifest dir.
Move generation of these into the manifest element directly and update
the documentation to reflect this. In practice this doesn't change
things, because the "manifests" element gets pulled in via deps for
most builds.
Change-Id: I3f23037058137d166b29f0b70fd1a02c22c07fc8
Signed-off-by: Andreas Florath <andreas@florath.net>
In error scenarios there might be no loadable state available.
This patch adds some robustness handling this scenarios
by checking the result and possible bailing out.
Change-Id: I02e2731b14bec22c22db08d60d8d15db1911a84e
Signed-off-by: Andreas Florath <andreas@florath.net>
With the old configuration structure it was only possible
to use one image and one partition layout. The new
block-device configuration uses a list at top level;
therefore it is possible to use multiple instances
of each element type.
Change-Id: I9db4327486b676887d6ce09609994116dbebfc89
Signed-off-by: Andreas Florath <andreas@florath.net>