Age | Commit message (Collapse) | Author |
|
bddeb builds a .deb package using the template packaging files in
packages/debian/.
The new --packaging-branch flag allows to specify a git branch
where to pull the packaging (i.e. the debian/ directory) from.
This is useful to build a .deb package from master with the very
same packaging which is used for the uploads.
|
|
test using it (#461)
caplog is only available in pytest itself from 3.0 onwards. In xenial, we only have pytest 2.8.7. However, in xenial we do have pytest-catchlog available (as python3-pytest-catchlog), so we use that where appropriate.
|
|
This was painful, but it finishes a TODO from cloudinit/subp.py.
It moves the following from util to subp:
ProcessExecutionError
subp
which
target_path
I moved subp_blob_in_tempfile into cc_chef, which is its only caller.
That saved us from having to deal with it using write_file
and temp_utils from subp (which does not import any cloudinit things now).
It is arguable that 'target_path' could be moved to a 'path_utils' or
something, but in order to use it from subp and also from utils,
we had to get it out of utils.
|
|
Since upstream cloud-init has dropped python2 support,
adapt remaining package build scripts and tools to python3 only
Changes:
* Do not template debian/rules as python3 is the only supported version
* Drop six from requirements.txt
* Makefile: drop everything related to Python 2
* run-container: install the CI deps only on ubuntu|debian
* read-version: update the shebang to use Python 3
* brpm: read_dependencies(): drop unused argument
* read-dependencies: switch to Py3 and drop the --python-version option
* pkg-deps.json: drop the Python version field and update the redhat deps
* pkg-deps.json: drop the unittest2 and contextlib2 renames
* Update RPM the spec file to use Python 3 when building the RPM
* bddeb: drop support for Python 2
|
|
* tools/read-version: don't enforce version parity in release branch CI
We have a bootstrapping problem with new releases, currently. To take
the example of 20.1: the branch that bumps the version fails CI because
there is no 20.1 tag for it to use in read-version. Previously, this
was solved by creating a tag and pushing it to the cloud-init repo
before the commit landed. However, we have GitHub branch protection
enabled, so the commit that needs to be tagged is not created until the
pull request lands in master.
This works around this problem by introducing a very specific check: if
we are performing CI for an upstream release branch, we skip the
read-version checking that we know will fail.
* tools/make-tarball: add --version parameter
When using make-tarball as part of a CI build of a new upstream release,
the version it determines is inconsistent with the version that other
tools determine. Instead of encoding the logic here (as well as in
Python elsewhere), we add a parameter to allow us to set it from outside
the script.
* packages/bddeb: handle missing version_long in new version CI
If we're running in CI for a new upstream release, we have to use
`version` instead of `version_long` (because we don't yet have the tag
required to generate `version_long`).
|
|
bddeb already supported passing in a '--release' and that would get
into the changelog line.
If you used bddeb to build packages for a PPA, and built multiple
releases, then you would get the same version for each release, and
launchpad would reject your upload.
The change here means we get a ~16.04.1 (for xenial) suffix on the
dpkg version. If the distro-info-data package is not installed,
or the release is not known (such as the default "UNRELEASED"),
then you get no suffix.
|
|
If you built packages with 'bddeb', each time it would create a new
tarball with make-tarball. If you then tried to upload two different
tarballs to launchpad (to a PPA), it would reject the second as the
orig tarball already existed.
This just supports looking in some places for a orig tarball and
re-using if it is found.
|
|
During boot, the usage of /tmp is not safe. In systemd systems,
systemd-tmpfiles-clean may run at any point and clear out a temp file
while cloud-init is using it. The solution here is to use
/run/cloud-init/tmp.
LP: #1707222
|
|
The ubuntu-init-switch module allowed the use to launch an instance that
was booted with upstart and have it switch its init system to systemd and
then reboot itself. It was only useful for the time period when Ubuntu was
transitioning to systemd but only produced images using upstart.
Also, do not run setup with --init-system=upstart. This means that by
default, debian packages built with packages/bddeb will not have upstart
unit files included. No other removal is done here.
|
|
read-dependencies now takes --test-distro param to indicate we want to install
all system package depenencies to allow for testing and building for our
continous integration environment. It allows us to install all needed deps on
a fresh system with:
python3 ./tools/read-dependencies --distro ubuntu --test-distro [--dry-run].
Additionally read-dependencies now looks at what version of python is running
the script (py2 vs p3) and opts to install python 2 or 3 system deps
respectively. This behavior can still be overridden with
python3 ./tools/read-dependencies ... --python-version 2.
There are also some distro-specific packaging and test dependencies, like
devscripts, tox and libssl-dev on debian or ubuntu. Those pkg dependencies
have now been broken out from common pkg deps to avoid trying to install them
on centos/redhat/suse.
|
|
This change adds a couple of makefile targets for ci environments to
install all necessary dependencies for package builds and test runs.
It adds a number of arguments to ./tools/read-dependencies to facilitate
reading pip dependencies, translating pip deps to system package names and
optionally installing needed system-package dependencies on the local
system. This relocates all package dependency and translation logic into
./tools/read-dependencies instead of duplication found in packages/brpm
and packages/bddeb.
In this branch, we also define buildrequires as including all runtime
requires when rendering cloud-init.spec.in and debian/control files
because our package build infrastructure will also be running all unit
test during the package build process so we need runtime deps at build
time.
Additionally, this branch converts
packages/(redhat|suse)/cloud-init.spec.in from cheetah templates to jinja
to allow building python3 envs.
|
|
Add a simple dependency check to "make deb" target for devscripts. Rework
a bit of the logic in package/bddeb to drop superfluous STD_NAMED_PACKAGES
to avoid duplication of requirements already listed in
(test-)?requiremets.txt. All "standard" packages can be assumed to have
either python3- or python- prefix if not listed in NONSTD_NAMED_PACKAGES.
This branch also moves logic inside write_debian_folder which is unneeded
up in main.
LP: #1685935
|
|
When we added coverage to test-requirements, we need to add the mapping
to package name. Without it there, bddeb complains that it cannot
translate the dependency.
Note, though, that the Makefile does not invoke nose with coverage.
So we don't actually use that dependency.
|
|
./packages/bddeb --release=xenial
that will get you a changelog with Distribution of xenial
rather than UNRELEASED.
|
|
upstream snapshots are versioned in the format 'X.Y.Z+<distance>.g<commit>'
where X.Y.Z are major, minor, and micro. Distance is number of commits
since last annotated tag, and commit is the git commit.
bddeb and brpm will now create and use the "upstream version" like above.
Things changed here:
- tools/make-tarball
update cloudinit/version.py to contain the full version
support --output
support '--long' to always create the long format version string.
- bddeb:
- use quilt debian source format
- use read-version and long version in changelog.
- brpm:
- change to use read-version and upstream long version in the spec.
- flake8 changes
- tools/read-version
- read version from git or from cloudinit/version.
- provide --json output with more nicely formed data.
|
|
- Update HACKING.rst to include git instructions
- update MANIFEST.in and .gitignore to ignore git-related things
- replaced tarball generation scripts with git-based script
- have the spec files correctly identify themselves as cheetah templates
- make brpm work with git
|
|
Splits off distro specific code into specific files so that
other kinds of networking configuration can be written by the
various distro(s) that cloud-init supports.
It also isolates some of the cloudinit.net code so that it can
be more easily used on its own (and incorporated into other
projects such as curtin).
During this process it adds tests so that the net process can
be tested (to some level) so that the format conversion processes
can be tested going forward.
|
|
|
|
|
|
|
|
just copy all the files that are there. makes adding files easier.
|
|
painful, and not perfect, but at this point the output builds
on a vivid system python2 (bddeb --python2) or python3.
* remove use of cheetah by bddeb in favor of builtin renderer
* add '--python2' flag to bddeb and knowledge of python 2 and python3
package names.
* read-dependencies can now read test-requirements also.
* differenciate from build-requirements and runtime requirements.
|
|
to be behind trunk.
`tox -e py27` passes full test suite. Now to work on replacing mocker.
|
|
|
|
instead of making the common use case need to pass '-us -uc',
make the less common use case pass '--sign'.
|
|
|
|
smoser pastebins).
|
|
|
|
the Requires would get that string rendered into the package's
Depends/Requires (rather than BuildDepends/BuildRequires).
We should have BuildDepends/BuildRequires too, but since
trunk's package builds do not run 'make test', this isn't a big deal.
This also adds 'test-requires' for httpretty.
|
|
debian bug 717916 renames python-json-patch to python-jsonpatch, so ubuntu
cloud-images with cloud-init may not have python-json-patch.
Just accept either one.
|
|
saucy split cloud-utils into cloud-guest-utils and cloud-image-utils.
The former is in the cloud image, the latter is not, and
we actually need it for growpart which is in the former.
|
|
|
|
These are debian's init scripts as taken from their trunk svn
as of today. Thanks Juerg.
|
|
this way you can now do ./package/bddeb --init-system=sysvinit_deb
|
|
|
|
|
|
-d pass through '-d' to debuild
--no-cloud-utils don't depend on cloud-utils package (default: False)
These are essential for building on Debian 6, because there are
no python-mocker (build dependency) and cloud-utils (install dependency)
in squeeze and squeeze-backports.
|
|
It seems like its possible that boto 2.5.2 and below have the lazy loading
metadata dictionary so as a precaution we will always take the hit of
unlazying the metadata dictionary by traversing it which in the non-lazy
dictionary case has no effect (its marginal). This also removes the need
to check the boto version and the dependency on setup tools just for this
case.
|
|
|
|
|
|
This does a few things:
* changes bddeb to copying out all files created during builddeb.
* link to .dsc file
* remove the '--no-sign' flag, replace that by '-us -uc' command line args
* also know about debuild flag '-S'.
|
|
|
|
The ubuntu packaging uses ~bzrREVNO, just be more like that.
|
|
At this point there is a mixture of "double hash" cheetah comments and '#*'
cheetah comments.
|
|
Also, remove the pre-processing of debian/rules. instead use an
environment variable. To build with sysvinit:
$ INIT_SYSTEM=sysvinit ./packages/bddeb
Note, debuild does complain with several errors on sysvinit
building at the moment. Primarily about package installing into
/etc/init.d.
|
|
This also fixes 'brpm' to address --init-system change that
smoser made to setup.py before the large 'rework' merge.
|
|
as adjustments due to sysvinit rename.
|
|
This brings with it other changes, and also makes an install
install all of the requisite init files. (ie, cloud-init needs the -local and
the non-local)
|
|
2. Adjust the bddeb to pass this in (as well as other output statement being added)
3. Adjust make-tarball to only archive the bzr versioned files (using --recursive)
|
|
needed to import glob, and use os.symlink, not util.symlink.
Also, here made the 'tar' verbose. if '-v' option given.
|