summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2016-08-22azure dhclient-hook cleanupsScott Moser
This adds some function to the generator to maintain the presense of a flag file '/run/cloud-init/enabled' indicating that cloud-init is enabled. Then, only run the dhclient hooks if on Azure and cloud-init is enabled. The test for is_azure currently only checks to see that the board vendor is Microsoft, not actually that we are on azure. Running should not be harmful anywhere, other than slowing down dhclient. The value of this additional code is that then dhclient having run does not task the system with the load of cloud-init. Additionally, some changes to config are done here. * rename 'dhclient_leases' to 'dhclient_lease_file' * move that to the datasource config (datasource/Azure/dhclient_lease_file) Also, it removes the config in config/cloud.cfg that set agent_command to __builtin__. This means that by default cloud-init still needs the agent installed. The suggested follow-on improvement is to use __builtin__ if there is no walinux-agent installed.
2016-08-15Get Azure endpoint server from DHCP clientBrent Baude
It is more efficient and cross-distribution safe to use the hooks function from dhclient to obtain the Azure endpoint server (DHCP option 245). This is done by providing shell scritps that are called by the hooks infrastructure of both dhclient and NetworkManager. The hooks then invoke 'cloud-init dhclient-hook' that maintains json data with the dhclient options in /run/cloud-init/dhclient.hooks/<interface>.json . The azure helper then pulls the value from /run/cloud-init/dhclient.hooks/<interface>.json file(s). If that file does not exist or the value is not present, it will then fall back to the original method of scraping the dhcp client lease file.
2016-08-10tools/read-version: update to address change in versionScott Moser
commit 48ec60ae changed over several tools to use X.Y.Z-XXX-gHASH but missed tools/read-version. The end result was that check_version failed.
2016-08-09make-tarball: older versions of git with --format=tar.Scott Moser
Some older versions of git (Centos 6) do not have --format=tar.gz. To work around this, create a .tar file and then compress it.
2016-08-09read-version: do not attempt git-describe if no git.Scott Moser
Even if there is a .git directory, we can't use git if there is no git executable in the path. In that case just fall back to the cloud-init version.
2016-08-08For upstream snapshot versions do not modify git-describe output.Scott Moser
For upstream version directly use the output of git-describe (X.Y.Z-number.gHASH) rather than rather than changing it to (X.Y.Z+number.gHASH). The rpm version does not allow '-' in Version, so we create and use rpm_upstream_version in the rpm spec file. That is of format: X.Y.Z+number.gHASH
2016-08-05drop modification of version during make-tarball, tools changes.Scott Moser
Modification of the tarball became problematic, as it meant that any tool extracting source would find the orig source tarball different. I found this unusable when trying to use 'gbp buildpackage'. Other changes here are to better support using python3 or python2 for the build. Makefile will try to call the right python version and can be told which python to use. read-version: by adding 'tiny_p' and avoiding the import of cloudinit.util, we need less dependencies to run this.
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-15Remove /bin from run-pyflakesJoshua Harlow
2016-06-15Fix a few tools and tests for newer pep8Joshua Harlow
2016-04-04locale: list unsupported environment settings in warningScott Moser
Now if you log in with unsupported locale, you'll see: The unknown environment variables are: LC_CTYPE=en_GB.utf-8 LC_MESSAGES=en_GB.utf-8 LC_ALL=en_GB.utf-8 LP: #1558069
2016-03-04pep8: update formatting to pass pep8 1.4.6 (trusty) and 1.6.2 (xenial)Ryan Harper
make check fails in a trusty sbuild due to different rules on older pep8. Fix formatting to pass in older and newer pep8.
2016-03-04Apply pep8, pyflakes fixes for python2 and 3Scott Moser
Update make check target to run pep8 and run pyflakes or pyflakes3 depending on the value of 'PYVER'. This way the python3 build environment does not need python2 and vice versa. Also have make check run the 'yaml' test. tox: have tox run pep8 in the pyflakes
2016-03-03Fix pyflake/pyflake3 errorsRyan Harper
Now we can run make check to assess pep8, pyflakes for python2 or 3 And execute unittests via nosetests (2 and 3).
2016-03-03Update pep8 runner and fix pep8 issuesRyan Harper
2015-05-01fix 'Make pyflakes'Scott Moser
2015-02-11add tools/tox-venv for running in a tox envScott Moser
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-22Low hanging Python 3 fruit.Barry Warsaw
2015-01-06tools/run-pep8: remove leading ',' fed to --ignoreScott Moser
--ignore was being called with ',E121,E...' rather than 'E121,E...'. that resulted in odd behavior, missing the pep8 errors that are fixed here.
2014-12-09tools/ccfg-merge-debug: fix for updated user-data/vendor-dataScott Moser
this was broken previously when user-data and vender-data were brought together.
2014-09-29tools/build-on-freebsd: e2fsprogs provides blkidScott Moser
2014-09-29tools/build-on-freebsd: add blkid and e2fsprogrsScott Moser
2014-09-29tools/build-on-freebsd: sort pkgs listScott Moser
2014-09-03fix: Since these now actually exist in ports, install them properlyHarm Weites
(with pkg).
2014-09-02merge from trunkScott Moser
2014-08-26further remove evidence of pylint.Scott Moser
This just removes comments '# pylint:' things and other code remnents of pylint.
2014-08-26fix(pep8): Fix various pep8 violations and version-lock pep8Jay Faulkner
Fixed all complaints from running "make pep8". Also version locked pep8 in test-requirements.txt to ensure that pep8 requirements don't change without an explicit commit.
2014-08-23change: Rename the config file to cloud.cfg-freebsd so it doesn'tHarm Weites
get copied per default. Packaging will take care of installing this configfile on the BSD platform.
2014-08-23fix: Use the correct variable.Harm Weites
2014-08-22build-on-freebsd: minor cleanups/bikesheddingScott Moser
2014-08-14fix: Install the python package that will install the required link toHarm Weites
the python2.7 binary. This defaults to 2.7, which is fine.
2014-08-10change: Install everything in the right location on both Linux (whichHarm Weites
ofcourse already was good) and FreeBSD (which realy likes /usr/local for this).
2014-08-10change: Save and restore the SSH keys between builds.Harm Weites
2014-08-09change: Make note of another python lib pypi takes care of.Harm Weites
2014-08-09change: Create a symlink to python2.7, to make sure running plain pythonHarm Weites
works.
2014-08-09new: Some datasources (like Smartos) use dmidecode to gather some specificHarm Weites
information, so install it.
2014-08-09fix: More dependencies.Harm Weites
2014-08-09new: Buildscript for installing on FreeBSD. This should do until aHarm Weites
proper port is created.
2014-02-28tools/make-tarball: add ability to include uncommited changesScott Moser
if you have UNCOMMITTED=1 in environment then the tree will contain uncommitted changes.
2014-01-24add --dummy-variables-rgx= param when calling pylintScott Moser
new pylint in trusty complains about '_' variables if we don't do this. This seems to be ok in older versions of pylint also.
2014-01-24pep8/pylint fixesScott Moser
tools/run-pep8 wasn't checking all python files. tools/run-pylint wasnt checking bin/cloud-init fixed resultant pep8 issues after finding them.
2014-01-22tools/read-dependencies tools/read-version: rewrite in pythonScott Moser
This just does python rewrites of these tools that were shell or sed or grep. Clearly the user of cloud-init has python, but it turns out that getting sane versions of sed or grep on different unixes is less than simple.
2014-01-17Update makefile to install from updated requirements filesJoshua Harlow
2013-09-11fix read-versionScott Moser
2013-09-11better checking and portability in read-dependencies and read-versionScott Moser
2013-09-08tools/read-dependencies, read-version: cleanups, and use sed not grepScott Moser
There are just some cleanups here, and use of simply 'sed' rather than grep and cut. The motivation is to support running with non gnu 'grep' that doesn't have -P.
2013-04-17add debug output to ccfg-merge-debugScott Moser
Exeptions were being swallowed completely and no way to even see them other than log.
2013-04-09tools: fix [some] shell quoting problemsScott Moser
There were problems with these tools if the path had a space. This should make these tools safe. There are others that still have problems.