summaryrefslogtreecommitdiff
path: root/packages/bddeb
AgeCommit message (Collapse)Author
2020-10-19bddeb: new --packaging-branch argument to pull packaging from branch (#576)Paride Legovini
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.
2020-06-30Enable use of the caplog fixture in pytest tests, and add a cc_final_message ↵Daniel Watkins
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.
2020-06-08Move subp into its own module. (#416)Scott Moser
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.
2020-05-01Adapt the package building scripts to use Python 3 (#231)Paride Legovini
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
2020-02-20Update tooling for GitHub-based new releases (#223)Daniel Watkins
* 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`).
2018-05-02tools: Support adding a release suffix through packages/bddeb.Scott Moser
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.
2018-05-01tools: Re-use the orig tarball in packages/bddeb if it is around.Scott Moser
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.
2017-09-07Use /run/cloud-init for tempfile operations.Scott Moser
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
2017-08-31upstart: do not package upstart jobs, drop ubuntu-init-switch module.Scott Moser
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.
2017-06-14ci deps: Add --test-distro to read-dependencies to install all depsChad Smith
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.
2017-06-13pkg build ci: Add make ci-deps-<distro> target to install pkgsChad Smith
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.
2017-05-16make deb: Add devscripts dependency for make deb. Cleanup packages/bddeb.Chad Smith
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
2016-11-03Add coverage dependency to bddeb to fix package build.Scott Moser
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.
2016-08-31bddeb: add --release flag to specify the release in changelog.Scott Moser
./packages/bddeb --release=xenial that will get you a changelog with Distribution of xenial rather than UNRELEASED.
2016-08-05adjust tools and version information.Scott Moser
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.
2016-08-03Update build tools to work with gitLars Kellogg-Stedman
- 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
2016-06-10Refactor a large part of the networking code.Joshua Harlow
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.
2016-06-10Add unittest2 to builder listJoshua Harlow
2016-06-07allow others to sign dsc with --signuser for packages/bddebChristian Ehrhardt
2016-05-25packages/bddeb: fix to know about packages flake8 and hackingScott Moser
2016-03-03packages/bddeb: copy all files in packages/debian/Scott Moser
just copy all the files that are there. makes adding files easier.
2015-02-10make bddeb work with python3 or python2Scott Moser
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.
2015-01-21Largely merge lp:~harlowja/cloud-init/py2-3 albeit manually because it seemedBarry Warsaw
to be behind trunk. `tox -e py27` passes full test suite. Now to work on replacing mocker.
2014-07-24merge from trunkScott Moser
2014-07-24bddeb: do not sign by defaultScott Moser
instead of making the common use case need to pass '-us -uc', make the less common use case pass '--sign'.
2014-07-24default bddeb to building both systemd and upstartScott Moser
2014-07-23Modernise packaging, and allow multiple init system installation (based on ↵Dimitri John Ledkov
smoser pastebins).
2014-07-21add package info for bddeb/brpmScott Moser
2014-01-17more boto removal. move httpretty from 'Requires'Scott Moser
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.
2013-12-13packages/bddeb: accept python-json-patch or python-jsonpatchScott Moser
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.
2013-09-25bddeb: depend on cloud-utils or cloud-guest-utilsScott Moser
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.
2013-07-29add 'pyserial' to bddeb and bdrpmScott Moser
2013-07-25add debian init scriptsScott Moser
These are debian's init scripts as taken from their trunk svn as of today. Thanks Juerg.
2013-07-25add --init-sytem to ./packages/bddebScott Moser
this way you can now do ./package/bddeb --init-system=sysvinit_deb
2013-07-24update dependencies for jsonpatchScott Moser
2013-03-26fix brpm and bddeb by knowing about 'python-requests'Scott Moser
2013-02-20Added arguments to packages/bddeb:Vlastimil Holer
-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.
2012-11-13Even when using boto < 2.6 force the unlazying to occurScott Moser
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.
2012-11-13add dependency for 'pkg_resources'Scott Moser
2012-11-13sort PKG_MP entriesScott Moser
2012-07-16packages/bddeb: support building source packageScott Moser
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'.
2012-07-16packages/bddeb: fix pep8 warnings. no other changes.Scott Moser
2012-07-10debian packaging: use X.Y.Z~bzrREVNO rather than X.Y.Z~REVNOScott Moser
The ubuntu packaging uses ~bzrREVNO, just be more like that.
2012-07-09Revert back to using cheetah + adjust resultant code + templatesJoshua Harlow
At this point there is a mixture of "double hash" cheetah comments and '#*' cheetah comments.
2012-07-09Get the debian package building working again.Joshua Harlow
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.
2012-07-09rework packaging tools to find the right cloud-init topdirJoshua Harlow
This also fixes 'brpm' to address --init-system change that smoser made to setup.py before the large 'rework' merge.
2012-07-06Reworking these to look attempt to find the right parent directory, as well Joshua Harlow
as adjustments due to sysvinit rename.
2012-07-06setup.py: rename "daemon type" to "init system"Scott Moser
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)
2012-07-041. Make the debian rules file a template (and pass in the daemon-type)Joshua Harlow
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)
2012-06-29packages/bddeb: fix broken bddebScott Moser
needed to import glob, and use os.symlink, not util.symlink. Also, here made the 'tar' verbose. if '-v' option given.