From 69251d5b4431204c1e768fdf6e9f268edceb2e96 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Fri, 19 Apr 2019 21:38:44 +0000 Subject: packages: update rpm specs for new bash completion path LP: #1825444 --- packages/redhat/cloud-init.spec.in | 4 +++- packages/suse/cloud-init.spec.in | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/redhat/cloud-init.spec.in b/packages/redhat/cloud-init.spec.in index 6b2022ba..057a5784 100644 --- a/packages/redhat/cloud-init.spec.in +++ b/packages/redhat/cloud-init.spec.in @@ -205,7 +205,9 @@ fi %dir %{_sysconfdir}/cloud/templates %config(noreplace) %{_sysconfdir}/cloud/templates/* %config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf -%{_sysconfdir}/bash_completion.d/cloud-init + +# Bash completion script +%{_datadir}/bash-completion/completions/cloud-init %{_libexecdir}/%{name} %dir %{_sharedstatedir}/cloud diff --git a/packages/suse/cloud-init.spec.in b/packages/suse/cloud-init.spec.in index 26894b34..004b875f 100644 --- a/packages/suse/cloud-init.spec.in +++ b/packages/suse/cloud-init.spec.in @@ -120,7 +120,9 @@ version_pys=$(cd "%{buildroot}" && find . -name version.py -type f) %config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/README %dir %{_sysconfdir}/cloud/templates %config(noreplace) %{_sysconfdir}/cloud/templates/* -%{_sysconfdir}/bash_completion.d/cloud-init + +# Bash completion script +%{_datadir}/bash-completion/completions/cloud-init %{_sysconfdir}/dhcp/dhclient-exit-hooks.d/hook-dhclient %{_sysconfdir}/NetworkManager/dispatcher.d/hook-network-manager -- cgit v1.2.3 From 796f58081766c51cdb36e770541d32f84f595371 Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Thu, 12 Dec 2019 07:13:12 -0800 Subject: debian: add reference to the manpages --- packages/debian/manpages | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 packages/debian/manpages (limited to 'packages') diff --git a/packages/debian/manpages b/packages/debian/manpages new file mode 100644 index 00000000..605cfd67 --- /dev/null +++ b/packages/debian/manpages @@ -0,0 +1,3 @@ +doc/man/cloud-id.1 +doc/man/cloud-init-per.1 +doc/man/cloud-init.1 -- cgit v1.2.3 From c99cfb21164b24644fec56013449b2b1e3b54fb3 Mon Sep 17 00:00:00 2001 From: Paride Legovini Date: Fri, 24 Jan 2020 21:12:11 +0100 Subject: Make the RPM build use Python 3 (#190) * packages/brpm: switch to python3 No changes needed other than changing the shebang interpreter. * pkg-deps.json: bump the redhat build dependencies to python36 CentOS 7 (our standard target for the COPR test builds) uses python3.6 as its default python3 interpreter, so let's bump the build dependencies accordingly. --- packages/brpm | 2 +- packages/pkg-deps.json | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/brpm b/packages/brpm index a154ef29..4004fd0e 100755 --- a/packages/brpm +++ b/packages/brpm @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import argparse import glob diff --git a/packages/pkg-deps.json b/packages/pkg-deps.json index 72409dd8..cf065219 100644 --- a/packages/pkg-deps.json +++ b/packages/pkg-deps.json @@ -29,27 +29,27 @@ ], "renames" : { "jinja2" : { - "3" : "python34-jinja2" + "3" : "python36-jinja2" }, "jsonschema" : { - "3" : "python34-jsonschema" + "3" : "python36-jsonschema" }, "pyflakes" : { "2" : "pyflakes", - "3" : "python34-pyflakes" + "3" : "python36-pyflakes" }, "pyyaml" : { "2" : "PyYAML", - "3" : "python34-PyYAML" + "3" : "python36-PyYAML" }, "pyserial" : { "2" : "pyserial" }, "requests" : { - "3" : "python34-requests" + "3" : "python36-requests" }, "six" : { - "3" : "python34-six" + "3" : "python36-six" } }, "requires" : [ -- cgit v1.2.3 From 4ad5c5d058cc9501ef2f294cb6430d9ffe372e7d Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Thu, 20 Feb 2020 12:11:04 -0500 Subject: Update tooling for GitHub-based new releases (#223) * 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`). --- packages/bddeb | 9 ++++++++- tools/make-tarball | 12 ++++++++++-- tools/read-version | 9 ++++++++- 3 files changed, 26 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/bddeb b/packages/bddeb index 95602a02..209765a5 100755 --- a/packages/bddeb +++ b/packages/bddeb @@ -177,6 +177,11 @@ def main(): # output like 0.7.6-1022-g36e92d3 ver_data = read_version() + if ver_data['is_release_branch_ci']: + # If we're performing CI for a new release branch, we don't yet + # have the tag required to generate version_long; use version + # instead. + ver_data['version_long'] = ver_data['version'] # This is really only a temporary archive # since we will extract it then add in the debian @@ -192,7 +197,9 @@ def main(): break if path is None: print("Creating a temp tarball using the 'make-tarball' helper") - run_helper('make-tarball', ['--long', '--output=' + tarball_fp]) + run_helper('make-tarball', + ['--version', ver_data['version_long'], + '--output=' + tarball_fp]) print("Extracting temporary tarball %r" % (tarball)) cmd = ['tar', '-xvzf', tarball_fp, '-C', tdir] diff --git a/tools/make-tarball b/tools/make-tarball index 8d540139..462e7d04 100755 --- a/tools/make-tarball +++ b/tools/make-tarball @@ -15,24 +15,27 @@ Usage: ${0##*/} [revision] options: -h | --help print usage -o | --output FILE write to file + --version VERSION Set the version used in the tarball. Default value is determined with 'git describe'. --orig-tarball Write file cloud-init_.orig.tar.gz --long Use git describe --long for versioning EOF } short_opts="ho:v" -long_opts="help,output:,orig-tarball,long" +long_opts="help,output:,version:,orig-tarball,long" getopt_out=$(getopt --name "${0##*/}" \ --options "${short_opts}" --long "${long_opts}" -- "$@") && eval set -- "${getopt_out}" || { Usage 1>&2; exit 1; } long_opt="" orig_opt="" +version="" while [ $# -ne 0 ]; do cur=$1; next=$2 case "$cur" in -h|--help) Usage; exit 0;; -o|--output) output=$next; shift;; + --version) version=$next; shift;; --long) long_opt="--long";; --orig-tarball) orig_opt=".orig";; --) shift; break;; @@ -41,7 +44,12 @@ while [ $# -ne 0 ]; do done rev=${1:-HEAD} -version=$(git describe --abbrev=8 "--match=[0-9]*" ${long_opt} $rev) +if [ -z "$version" ]; then + version=$(git describe --abbrev=8 "--match=[0-9]*" ${long_opt} $rev) +elif [ ! -z "$long_opt" ]; then + echo "WARNING: --long has no effect when --version is passed" >&2 + exit 1 +fi archive_base="cloud-init-$version" if [ -z "$output" ]; then diff --git a/tools/read-version b/tools/read-version index 6dca659e..92e9fc96 100755 --- a/tools/read-version +++ b/tools/read-version @@ -65,7 +65,13 @@ output_json = '--json' in sys.argv src_version = ci_version.version_string() version_long = None -if is_gitdir(_tdir) and which("git"): +# If we're performing CI for a new release branch (which our tooling creates +# with an "upstream/" prefix), then we don't want to enforce strict version +# matching because we know it will fail. +is_release_branch_ci = ( + os.environ.get("TRAVIS_PULL_REQUEST_BRANCH", "").startswith("upstream/") +) +if is_gitdir(_tdir) and which("git") and not is_release_branch_ci: flags = [] if use_tags: flags = ['--tags'] @@ -113,6 +119,7 @@ data = { 'extra': extra, 'commit': commit, 'distance': distance, + 'is_release_branch_ci': is_release_branch_ci, } if output_json: -- cgit v1.2.3