summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rwxr-xr-xpackages/bddeb267
-rwxr-xr-xpackages/brpm280
-rw-r--r--packages/debian/changelog.in6
-rw-r--r--packages/debian/cloud-init.postinst16
-rw-r--r--packages/debian/cloud-init.preinst20
-rw-r--r--packages/debian/compat1
-rw-r--r--packages/debian/control.in29
-rw-r--r--packages/debian/copyright29
-rw-r--r--packages/debian/dirs6
-rwxr-xr-xpackages/debian/rules.in23
-rw-r--r--packages/debian/watch2
-rw-r--r--packages/redhat/cloud-init.spec.in204
-rw-r--r--packages/suse/cloud-init.spec.in163
13 files changed, 0 insertions, 1046 deletions
diff --git a/packages/bddeb b/packages/bddeb
deleted file mode 100755
index 3c77ce1d..00000000
--- a/packages/bddeb
+++ /dev/null
@@ -1,267 +0,0 @@
-#!/usr/bin/env python3
-
-import glob
-import os
-import shutil
-import sys
-
-
-def find_root():
- # expected path is in <top_dir>/packages/
- top_dir = os.environ.get("CLOUD_INIT_TOP_D", None)
- if top_dir is None:
- top_dir = os.path.dirname(
- os.path.dirname(os.path.abspath(sys.argv[0])))
- if os.path.isfile(os.path.join(top_dir, 'setup.py')):
- return os.path.abspath(top_dir)
- raise OSError(("Unable to determine where your cloud-init topdir is."
- " set CLOUD_INIT_TOP_D?"))
-
-# Use the util functions from cloudinit
-sys.path.insert(0, find_root())
-
-from cloudinit import templater
-from cloudinit import util
-
-import argparse
-
-# Package names that will showup in requires to what we can actually
-# use in our debian 'control' file, this is a translation of the 'requires'
-# file pypi package name to a debian/ubuntu package name.
-STD_NAMED_PACKAGES = [
- 'configobj',
- 'jinja2',
- 'jsonpatch',
- 'oauthlib',
- 'prettytable',
- 'requests',
- 'six',
- 'httpretty',
- 'mock',
- 'nose',
- 'setuptools',
- 'flake8',
- 'hacking',
- 'unittest2',
-]
-NONSTD_NAMED_PACKAGES = {
- 'argparse': ('python-argparse', None),
- 'contextlib2': ('python-contextlib2', None),
- 'cheetah': ('python-cheetah', None),
- 'pyserial': ('python-serial', 'python3-serial'),
- 'pyyaml': ('python-yaml', 'python3-yaml'),
- 'six': ('python-six', 'python3-six'),
- 'pep8': ('pep8', 'python3-pep8'),
- 'pyflakes': ('pyflakes', 'pyflakes'),
-}
-
-DEBUILD_ARGS = ["-S", "-d"]
-
-
-def write_debian_folder(root, version, revno, pkgmap,
- pyver="3", append_requires=[]):
- deb_dir = util.abs_join(root, 'debian')
- os.makedirs(deb_dir)
-
- # Fill in the change log template
- templater.render_to_file(util.abs_join(find_root(),
- 'packages', 'debian', 'changelog.in'),
- util.abs_join(deb_dir, 'changelog'),
- params={
- 'version': version,
- 'revision': revno,
- })
-
- # Write out the control file template
- cmd = [util.abs_join(find_root(), 'tools', 'read-dependencies')]
- (stdout, _stderr) = util.subp(cmd)
- pypi_pkgs = [p.lower().strip() for p in stdout.splitlines()]
-
- (stdout, _stderr) = util.subp(cmd + ['test-requirements.txt'])
- pypi_test_pkgs = [p.lower().strip() for p in stdout.splitlines()]
-
- # Map to known packages
- requires = append_requires
- test_requires = []
- lists = ((pypi_pkgs, requires), (pypi_test_pkgs, test_requires))
- for pypilist, target in lists:
- for p in pypilist:
- if p not in pkgmap:
- raise RuntimeError(("Do not know how to translate pypi "
- "dependency %r to a known package") % (p))
- elif pkgmap[p]:
- target.append(pkgmap[p])
-
- if pyver == "3":
- python = "python3"
- else:
- python = "python"
-
- templater.render_to_file(util.abs_join(find_root(),
- 'packages', 'debian', 'control.in'),
- util.abs_join(deb_dir, 'control'),
- params={'requires': ','.join(requires),
- 'test_requires': ','.join(test_requires),
- 'python': python})
-
- templater.render_to_file(util.abs_join(find_root(),
- 'packages', 'debian', 'rules.in'),
- util.abs_join(deb_dir, 'rules'),
- params={'python': python, 'pyver': pyver})
-
- # Just copy any other files directly (including .in)
- pdeb_d = util.abs_join(find_root(), 'packages', 'debian')
- for f in [os.path.join(pdeb_d, f) for f in os.listdir(pdeb_d)]:
- if os.path.isfile(f):
- shutil.copy(f, util.abs_join(deb_dir, os.path.basename(f)))
-
-
-def main():
-
- parser = argparse.ArgumentParser()
- parser.add_argument("-v", "--verbose", dest="verbose",
- help=("run verbosely"
- " (default: %(default)s)"),
- default=False,
- action='store_true')
- parser.add_argument("--cloud-utils", dest="cloud_utils",
- help=("depend on cloud-utils package"
- " (default: %(default)s)"),
- default=False,
- action='store_true')
-
- parser.add_argument("--python2", dest="python2",
- help=("build debs for python2 rather than python3"),
- default=False, action='store_true')
-
- parser.add_argument("--init-system", dest="init_system",
- help=("build deb with INIT_SYSTEM=xxx"
- " (default: %(default)s"),
- default=os.environ.get("INIT_SYSTEM",
- "upstart,systemd"))
-
-
- for ent in DEBUILD_ARGS:
- parser.add_argument(ent, dest="debuild_args", action='append_const',
- const=ent, help=("pass through '%s' to debuild" % ent),
- default=[])
-
- parser.add_argument("--sign", default=False, action='store_true',
- help="sign result. do not pass -us -uc to debuild")
-
- parser.add_argument("--signuser", default=False, action='store',
- help="user to sign, see man dpkg-genchanges")
-
- args = parser.parse_args()
-
- if not args.sign:
- args.debuild_args.extend(['-us', '-uc'])
-
- if args.signuser:
- args.debuild_args.extend(['-e%s' % args.signuser])
-
- os.environ['INIT_SYSTEM'] = args.init_system
-
- capture = True
- if args.verbose:
- capture = False
-
- pkgmap = {}
- for p in NONSTD_NAMED_PACKAGES:
- pkgmap[p] = NONSTD_NAMED_PACKAGES[p][int(not args.python2)]
-
- for p in STD_NAMED_PACKAGES:
- if args.python2:
- pkgmap[p] = "python-" + p
- pyver = "2"
- else:
- pkgmap[p] = "python3-" + p
- pyver = "3"
-
- with util.tempdir() as tdir:
-
- cmd = [util.abs_join(find_root(), 'tools', 'read-version')]
- (sysout, _stderr) = util.subp(cmd)
- version = sysout.strip()
-
- cmd = ['bzr', 'revno']
- (sysout, _stderr) = util.subp(cmd)
- revno = sysout.strip()
-
- # This is really only a temporary archive
- # since we will extract it then add in the debian
- # folder, then re-archive it for debian happiness
- print("Creating a temporary tarball using the 'make-tarball' helper")
- cmd = [util.abs_join(find_root(), 'tools', 'make-tarball')]
- (sysout, _stderr) = util.subp(cmd)
- arch_fn = sysout.strip()
- tmp_arch_fn = util.abs_join(tdir, os.path.basename(arch_fn))
- shutil.move(arch_fn, tmp_arch_fn)
-
- print("Extracting temporary tarball %r" % (tmp_arch_fn))
- cmd = ['tar', '-xvzf', tmp_arch_fn, '-C', tdir]
- util.subp(cmd, capture=capture)
- extracted_name = tmp_arch_fn[:-len('.tar.gz')]
- os.remove(tmp_arch_fn)
-
- xdir = util.abs_join(tdir, 'cloud-init')
- shutil.move(extracted_name, xdir)
-
- print("Creating a debian/ folder in %r" % (xdir))
- if args.cloud_utils:
- append_requires=['cloud-utils | cloud-guest-utils']
- else:
- append_requires=[]
- write_debian_folder(xdir, version, revno, pkgmap,
- pyver=pyver, append_requires=append_requires)
-
- # The naming here seems to follow some debian standard
- # so it will whine if it is changed...
- tar_fn = "cloud-init_%s~bzr%s.orig.tar.gz" % (version, revno)
- print("Archiving the adjusted source into %r" %
- (util.abs_join(tdir, tar_fn)))
- cmd = ['tar', '-czvf',
- util.abs_join(tdir, tar_fn),
- '-C', xdir]
- cmd.extend(os.listdir(xdir))
- util.subp(cmd, capture=capture)
-
- # Copy it locally for reference
- shutil.copy(util.abs_join(tdir, tar_fn),
- util.abs_join(os.getcwd(), tar_fn))
- print("Copied that archive to %r for local usage (if desired)." %
- (util.abs_join(os.getcwd(), tar_fn)))
-
- print("Running 'debuild %s' in %r" % (' '.join(args.debuild_args),
- xdir))
- with util.chdir(xdir):
- cmd = ['debuild', '--preserve-envvar', 'INIT_SYSTEM']
- if args.debuild_args:
- cmd.extend(args.debuild_args)
- util.subp(cmd, capture=capture)
-
- link_fn = os.path.join(os.getcwd(), 'cloud-init_all.deb')
- link_dsc = os.path.join(os.getcwd(), 'cloud-init.dsc')
- for base_fn in os.listdir(os.path.join(tdir)):
- full_fn = os.path.join(tdir, base_fn)
- if not os.path.isfile(full_fn):
- continue
- shutil.move(full_fn, base_fn)
- print("Wrote %r" % (base_fn))
- if base_fn.endswith('_all.deb'):
- # Add in the local link
- util.del_file(link_fn)
- os.symlink(base_fn, link_fn)
- print("Linked %r to %r" % (base_fn,
- os.path.basename(link_fn)))
- if base_fn.endswith('.dsc'):
- util.del_file(link_dsc)
- os.symlink(base_fn, link_dsc)
- print("Linked %r to %r" % (base_fn,
- os.path.basename(link_dsc)))
-
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/packages/brpm b/packages/brpm
deleted file mode 100755
index 45e47610..00000000
--- a/packages/brpm
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/usr/bin/python
-
-import argparse
-import contextlib
-import glob
-import os
-import shutil
-import subprocess
-import sys
-import tempfile
-import re
-
-from datetime import datetime
-
-
-def find_root():
- # expected path is in <top_dir>/packages/
- top_dir = os.environ.get("CLOUD_INIT_TOP_D", None)
- if top_dir is None:
- top_dir = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
- if os.path.isfile(os.path.join(top_dir, 'setup.py')):
- return os.path.abspath(top_dir)
- raise OSError(("Unable to determine where your cloud-init topdir is."
- " set CLOUD_INIT_TOP_D?"))
-
-
-# Use the util functions from cloudinit
-sys.path.insert(0, find_root())
-
-from cloudinit import templater
-from cloudinit import util
-
-# Mapping of expected packages to there full name...
-# this is a translation of the 'requires'
-# file pypi package name to a redhat/fedora package name.
-PKG_MP = {
- 'redhat': {
- 'argparse': 'python-argparse',
- 'cheetah': 'python-cheetah',
- 'jinja2': 'python-jinja2',
- 'configobj': 'python-configobj',
- 'jsonpatch': 'python-jsonpatch',
- 'oauthlib': 'python-oauthlib',
- 'prettytable': 'python-prettytable',
- 'pyserial': 'pyserial',
- 'pyyaml': 'PyYAML',
- 'requests': 'python-requests',
- 'six': 'python-six',
- },
- 'suse': {
- 'argparse': 'python-argparse',
- 'cheetah': 'python-cheetah',
- 'configobj': 'python-configobj',
- 'jsonpatch': 'python-jsonpatch',
- 'oauthlib': 'python-oauthlib',
- 'prettytable': 'python-prettytable',
- 'pyserial': 'python-pyserial',
- 'pyyaml': 'python-yaml',
- 'requests': 'python-requests',
- 'six': 'python-six',
- }
-}
-
-# Subdirectories of the ~/rpmbuild dir
-RPM_BUILD_SUBDIRS = ['BUILD', 'RPMS', 'SOURCES', 'SPECS', 'SRPMS']
-
-
-def get_log_header(version):
- # Try to find the version in the tags output
- cmd = ['bzr', 'tags']
- (stdout, _stderr) = util.subp(cmd)
- a_rev = None
- for t in stdout.splitlines():
- ver, rev = t.split(None)
- if ver == version:
- a_rev = rev
- break
- if not a_rev:
- return None
-
- # Extract who made that tag as the header
- cmd = ['bzr', 'log', '-r%s' % (a_rev), '--timezone=utc']
- (stdout, _stderr) = util.subp(cmd)
- kvs = {
- 'comment': version,
- }
-
- for line in stdout.splitlines():
- if line.startswith('committer:'):
- kvs['who'] = line[len('committer:'):].strip()
- if line.startswith('timestamp:'):
- ts = line[len('timestamp:'):]
- ts = ts.strip()
- # http://bugs.python.org/issue6641
- ts = ts.replace("+0000", '').strip()
- ds = datetime.strptime(ts, '%a %Y-%m-%d %H:%M:%S')
- kvs['ds'] = ds
-
- return format_change_line(**kvs)
-
-
-def format_change_line(ds, who, comment=None):
- # Rpmbuild seems to be pretty strict about the date format
- d = ds.strftime("%a %b %d %Y")
- d += " - %s" % (who)
- if comment:
- d += " - %s" % (comment)
- return "* %s" % (d)
-
-
-def generate_spec_contents(args, tmpl_fn, top_dir, arc_fn):
-
- # Figure out the version and revno
- cmd = [util.abs_join(find_root(), 'tools', 'read-version')]
- (stdout, _stderr) = util.subp(cmd)
- version = stdout.strip()
-
- cmd = ['bzr', 'revno']
- (stdout, _stderr) = util.subp(cmd)
- revno = stdout.strip()
-
- # Tmpl params
- subs = {}
- subs['version'] = version
- subs['revno'] = revno
- subs['release'] = "bzr%s" % (revno)
- if args.sub_release is not None:
- subs['subrelease'] = "." + str(args.sub_release)
- else:
- subs['subrelease'] = ''
- subs['archive_name'] = arc_fn
-
- cmd = [util.abs_join(find_root(), 'tools', 'read-dependencies')]
- (stdout, _stderr) = util.subp(cmd)
- pkgs = [p.lower().strip() for p in stdout.splitlines()]
-
- # Map to known packages
- requires = []
- for p in pkgs:
- if p == 'argparse' and sys.version_info[0:2] >= (2, 7):
- # Not needed on anything but 2.6 or older.
- continue
- tgt_pkg = PKG_MP[args.distro].get(p)
- if not tgt_pkg:
- raise RuntimeError(("Do not know how to translate pypi dependency"
- " %r to a known package") % (p))
- else:
- requires.append(tgt_pkg)
- subs['requires'] = requires
-
- # Format a nice changelog (as best as we can)
- changelog = util.load_file(util.abs_join(find_root(), 'ChangeLog'))
- changelog_lines = []
- missing_versions = 0
- for line in changelog.splitlines():
- if not line.strip():
- continue
- if re.match(r"^\s*[\d][.][\d][.][\d]:\s*", line):
- line = line.strip(":")
- header = get_log_header(line)
- if not header:
- missing_versions += 1
- if missing_versions == 1:
- # Must be using a new 'dev'/'trunk' release
- changelog_lines.append(format_change_line(datetime.now(),
- '??'))
- else:
- sys.stderr.write(("Changelog version line %s does not "
- "have a corresponding tag!\n") % (line))
- else:
- changelog_lines.append(header)
- else:
- changelog_lines.append(line)
- subs['changelog'] = "\n".join(changelog_lines)
-
- if args.boot == 'sysvinit':
- subs['sysvinit'] = True
- else:
- subs['sysvinit'] = False
-
- if args.boot == 'systemd':
- subs['systemd'] = True
- else:
- subs['systemd'] = False
-
- subs['defines'] = ["_topdir %s" % (top_dir)]
- subs['init_sys'] = args.boot
- subs['patches'] = [os.path.basename(p) for p in args.patches]
- return templater.render_from_file(tmpl_fn, params=subs)
-
-
-def main():
-
- parser = argparse.ArgumentParser()
- parser.add_argument("-d", "--distro", dest="distro",
- help="select distro (default: %(default)s)",
- metavar="DISTRO", default='redhat',
- choices=('redhat', 'suse'))
- parser.add_argument("-b", "--boot", dest="boot",
- help="select boot type (default: %(default)s)",
- metavar="TYPE", default='sysvinit',
- choices=('sysvinit', 'systemd'))
- parser.add_argument("-v", "--verbose", dest="verbose",
- help=("run verbosely"
- " (default: %(default)s)"),
- default=False,
- action='store_true')
- parser.add_argument('-s', "--sub-release", dest="sub_release",
- metavar="RELEASE",
- help=("a 'internal' release number to concat"
- " with the bzr version number to form"
- " the final version number"),
- type=int,
- default=None)
- parser.add_argument("-p", "--patch", dest="patches",
- help=("include the following patch when building"),
- default=[],
- action='append')
- args = parser.parse_args()
- capture = True
- if args.verbose:
- capture = False
-
- # Clean out the root dir and make sure the dirs we want are in place
- root_dir = os.path.expanduser("~/rpmbuild")
- if os.path.isdir(root_dir):
- shutil.rmtree(root_dir)
-
- arc_dir = util.abs_join(root_dir, 'SOURCES')
- build_dirs = [root_dir, arc_dir]
- for dname in RPM_BUILD_SUBDIRS:
- build_dirs.append(util.abs_join(root_dir, dname))
- build_dirs.sort()
- util.ensure_dirs(build_dirs)
-
- # Archive the code
- cmd = [util.abs_join(find_root(), 'tools', 'make-tarball')]
- (stdout, _stderr) = util.subp(cmd)
- archive_fn = stdout.strip()
- real_archive_fn = os.path.join(arc_dir, os.path.basename(archive_fn))
- shutil.move(archive_fn, real_archive_fn)
- print("Archived the code in %r" % (real_archive_fn))
-
- # Form the spec file to be used
- tmpl_fn = util.abs_join(find_root(), 'packages',
- args.distro, 'cloud-init.spec.in')
- contents = generate_spec_contents(args, tmpl_fn, root_dir,
- os.path.basename(archive_fn))
- spec_fn = util.abs_join(root_dir, 'cloud-init.spec')
- util.write_file(spec_fn, contents)
- print("Created spec file at %r" % (spec_fn))
- print(contents)
- for p in args.patches:
- util.copy(p, util.abs_join(arc_dir, os.path.basename(p)))
-
- # Now build it!
- print("Running 'rpmbuild' in %r" % (root_dir))
- cmd = ['rpmbuild', '-ba', spec_fn]
- util.subp(cmd, capture=capture)
-
- # Copy the items built to our local dir
- globs = []
- globs.extend(glob.glob("%s/*.rpm" %
- (util.abs_join(root_dir, 'RPMS', 'noarch'))))
- globs.extend(glob.glob("%s/*.rpm" %
- (util.abs_join(root_dir, 'RPMS', 'x86_64'))))
- globs.extend(glob.glob("%s/*.rpm" %
- (util.abs_join(root_dir, 'RPMS'))))
- globs.extend(glob.glob("%s/*.rpm" %
- (util.abs_join(root_dir, 'SRPMS'))))
- for rpm_fn in globs:
- tgt_fn = util.abs_join(os.getcwd(), os.path.basename(rpm_fn))
- shutil.move(rpm_fn, tgt_fn)
- print("Wrote out %s package %r" % (args.distro, tgt_fn))
-
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/packages/debian/changelog.in b/packages/debian/changelog.in
deleted file mode 100644
index c9affe47..00000000
--- a/packages/debian/changelog.in
+++ /dev/null
@@ -1,6 +0,0 @@
-## template:basic
-cloud-init (${version}~bzr${revision}-1) UNRELEASED; urgency=low
-
- * build
-
- -- Scott Moser <smoser@ubuntu.com> Fri, 16 Dec 2011 11:50:25 -0500
diff --git a/packages/debian/cloud-init.postinst b/packages/debian/cloud-init.postinst
deleted file mode 100644
index cdd0466d..00000000
--- a/packages/debian/cloud-init.postinst
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-cleanup_lp1552999() {
- local oldver="$1" last_bad_ver="0.7.7~bzr1178"
- dpkg --compare-versions "$oldver" le "$last_bad_ver" || return 0
- local edir="/etc/systemd/system/multi-user.target.wants"
- rm -f "$edir/cloud-config.service" "$edir/cloud-final.service" \
- "$edir/cloud-init-local.service" "$edir/cloud-init.service"
-}
-
-
-#DEBHELPER#
-
-if [ "$1" = "configure" ]; then
- oldver="$2"
- cleanup_lp1552999 "$oldver"
-fi
diff --git a/packages/debian/cloud-init.preinst b/packages/debian/cloud-init.preinst
deleted file mode 100644
index 3c2af06d..00000000
--- a/packages/debian/cloud-init.preinst
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-# vi: ts=4 expandtab
-
-cleanup_lp1552999() {
- local oldver="$1" last_bad_ver="0.7.7~bzr1178"
- dpkg --compare-versions "$oldver" le "$last_bad_ver" || return 0
- local hdir="/var/lib/systemd/deb-systemd-helper-enabled"
- hdir="$hdir/multi-user.target.wants"
- local edir="/etc/systemd/system/multi-user.target.wants"
- rm -f "$hdir/cloud-config.service" "$hdir/cloud-final.service" \
- "$hdir/cloud-init-local.service" "$hdir/cloud-init.service"
-}
-
-
-if [ "$1" = "upgrade" ]; then
- oldver="$2"
- cleanup_lp1552999 "$oldver"
-fi
-
-#DEBHELPER#
diff --git a/packages/debian/compat b/packages/debian/compat
deleted file mode 100644
index ec635144..00000000
--- a/packages/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/packages/debian/control.in b/packages/debian/control.in
deleted file mode 100644
index b58561e7..00000000
--- a/packages/debian/control.in
+++ /dev/null
@@ -1,29 +0,0 @@
-## template:basic
-Source: cloud-init
-Section: admin
-Priority: optional
-Maintainer: Scott Moser <smoser@ubuntu.com>
-Build-Depends: debhelper (>= 9),
- dh-python,
- dh-systemd,
- iproute2,
- pep8,
- pyflakes,
- python3-pyflakes | pyflakes (<< 1.1.0-2),
- ${python},
- ${test_requires},
- ${requires}
-XS-Python-Version: all
-Standards-Version: 3.9.6
-
-Package: cloud-init
-Architecture: all
-Depends: procps,
- ${python},
- ${misc:Depends},
- ${${python}:Depends}
-Recommends: eatmydata, sudo, software-properties-common, gdisk
-XB-Python-Version: ${python:Versions}
-Description: Init scripts for cloud instances
- Cloud instances need special scripts to run during initialisation
- to retrieve and install ssh keys and to let the user run various scripts.
diff --git a/packages/debian/copyright b/packages/debian/copyright
deleted file mode 100644
index c694f30d..00000000
--- a/packages/debian/copyright
+++ /dev/null
@@ -1,29 +0,0 @@
-Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
-Name: cloud-init
-Maintainer: Scott Moser <scott.moser@canonical.com>
-Source: https://launchpad.net/cloud-init
-
-This package was debianized by Soren Hansen <soren@ubuntu.com> on
-Thu, 04 Sep 2008 12:49:15 +0200 as ec2-init. It was later renamed to
-cloud-init by Scott Moser <scott.moser@canonical.com>
-
-Upstream Author: Scott Moser <smoser@canonical.com>
- Soren Hansen <soren@canonical.com>
- Chuck Short <chuck.short@canonical.com>
-
-Copyright: 2010, Canonical Ltd.
-License: GPL-3
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 3, as
- published by the Free Software Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- The complete text of the GPL version 3 can be seen in
- /usr/share/common-licenses/GPL-3.
diff --git a/packages/debian/dirs b/packages/debian/dirs
deleted file mode 100644
index 9a633c60..00000000
--- a/packages/debian/dirs
+++ /dev/null
@@ -1,6 +0,0 @@
-var/lib/cloud
-usr/bin
-etc/init
-usr/share/doc/cloud
-etc/cloud
-lib/udev/rules.d
diff --git a/packages/debian/rules.in b/packages/debian/rules.in
deleted file mode 100755
index cf2dd405..00000000
--- a/packages/debian/rules.in
+++ /dev/null
@@ -1,23 +0,0 @@
-## template:basic
-#!/usr/bin/make -f
-INIT_SYSTEM ?= upstart,systemd
-export PYBUILD_INSTALL_ARGS=--init-system=$(INIT_SYSTEM)
-PYVER ?= python${pyver}
-
-%:
- dh $@ --with $(PYVER),systemd --buildsystem pybuild
-
-override_dh_install:
- dh_install
- install -d debian/cloud-init/etc/rsyslog.d
- cp tools/21-cloudinit.conf debian/cloud-init/etc/rsyslog.d/21-cloudinit.conf
-
-override_dh_auto_test:
-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
- http_proxy= make PYVER=${pyver} check
-else
- @echo check disabled by DEB_BUILD_OPTIONS=$(DEB_BUILD_OPTIONS)
-endif
-
-override_dh_systemd_start:
- dh_systemd_start --no-restart-on-upgrade --no-start
diff --git a/packages/debian/watch b/packages/debian/watch
deleted file mode 100644
index 0f7a600b..00000000
--- a/packages/debian/watch
+++ /dev/null
@@ -1,2 +0,0 @@
-version=3
-https://launchpad.net/cloud-init/+download .*/\+download/cloud-init-(.+)\.tar.gz
diff --git a/packages/redhat/cloud-init.spec.in b/packages/redhat/cloud-init.spec.in
deleted file mode 100644
index 254d209b..00000000
--- a/packages/redhat/cloud-init.spec.in
+++ /dev/null
@@ -1,204 +0,0 @@
-## This is a cheetah template
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-
-# See: http://www.zarb.org/~jasonc/macros.php
-# Or: http://fedoraproject.org/wiki/Packaging:ScriptletSnippets
-# Or: http://www.rpm.org/max-rpm/ch-rpm-inside.html
-
-#for $d in $defines
-%define ${d}
-#end for
-
-Name: cloud-init
-Version: ${version}
-Release: ${release}${subrelease}%{?dist}
-Summary: Cloud instance init scripts
-
-Group: System Environment/Base
-License: GPLv3
-URL: http://launchpad.net/cloud-init
-
-Source0: ${archive_name}
-BuildArch: noarch
-BuildRoot: %{_tmppath}
-
-BuildRequires: python-devel
-BuildRequires: python-setuptools
-BuildRequires: python-cheetah
-
-# System util packages needed
-Requires: shadow-utils
-Requires: rsyslog
-Requires: iproute
-Requires: e2fsprogs
-Requires: net-tools
-Requires: procps
-Requires: shadow-utils
-Requires: sudo >= 1.7.2p2-3
-
-# Install pypi 'dynamic' requirements
-#for $r in $requires
-Requires: ${r}
-#end for
-
-# Custom patches
-#set $size = 0
-#for $p in $patches
-Patch${size}: $p
-#set $size += 1
-#end for
-
-#if $sysvinit
-Requires(post): chkconfig
-Requires(postun): initscripts
-Requires(preun): chkconfig
-Requires(preun): initscripts
-#end if
-
-#if $systemd
-BuildRequires: systemd-units
-Requires(post): systemd-units
-Requires(postun): systemd-units
-Requires(preun): systemd-units
-#end if
-
-%description
-Cloud-init is a set of init scripts for cloud instances. Cloud instances
-need special scripts to run during initialization to retrieve and install
-ssh keys and to let the user run various scripts.
-
-%prep
-%setup -q -n %{name}-%{version}~${release}
-
-# Custom patches activation
-#set $size = 0
-#for $p in $patches
-%patch${size} -p1
-#set $size += 1
-#end for
-
-%build
-%{__python} setup.py build
-
-%install
-
-%{__python} setup.py install -O1 \
- --skip-build --root \$RPM_BUILD_ROOT \
- --init-system=${init_sys}
-
-# Note that /etc/rsyslog.d didn't exist by default until F15.
-# el6 request: https://bugzilla.redhat.com/show_bug.cgi?id=740420
-mkdir -p \$RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d
-cp -p tools/21-cloudinit.conf \
- \$RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d/21-cloudinit.conf
-
-# Remove the tests
-rm -rf \$RPM_BUILD_ROOT%{python_sitelib}/tests
-
-# Required dirs...
-mkdir -p \$RPM_BUILD_ROOT/%{_sharedstatedir}/cloud
-mkdir -p \$RPM_BUILD_ROOT/%{_libexecdir}/%{name}
-
-#if $systemd
-mkdir -p \$RPM_BUILD_ROOT/%{_unitdir}
-cp -p systemd/* \$RPM_BUILD_ROOT/%{_unitdir}
-#end if
-
-%clean
-rm -rf \$RPM_BUILD_ROOT
-
-%post
-
-#if $systemd
-if [ \$1 -eq 1 ]
-then
- /bin/systemctl enable cloud-config.service >/dev/null 2>&1 || :
- /bin/systemctl enable cloud-final.service >/dev/null 2>&1 || :
- /bin/systemctl enable cloud-init.service >/dev/null 2>&1 || :
- /bin/systemctl enable cloud-init-local.service >/dev/null 2>&1 || :
-fi
-#end if
-
-#if $sysvinit
-/sbin/chkconfig --add %{_initrddir}/cloud-init-local
-/sbin/chkconfig --add %{_initrddir}/cloud-init
-/sbin/chkconfig --add %{_initrddir}/cloud-config
-/sbin/chkconfig --add %{_initrddir}/cloud-final
-#end if
-
-%preun
-
-#if $sysvinit
-if [ \$1 -eq 0 ]
-then
- /sbin/service cloud-init stop >/dev/null 2>&1 || :
- /sbin/chkconfig --del cloud-init || :
- /sbin/service cloud-init-local stop >/dev/null 2>&1 || :
- /sbin/chkconfig --del cloud-init-local || :
- /sbin/service cloud-config stop >/dev/null 2>&1 || :
- /sbin/chkconfig --del cloud-config || :
- /sbin/service cloud-final stop >/dev/null 2>&1 || :
- /sbin/chkconfig --del cloud-final || :
-fi
-#end if
-
-#if $systemd
-if [ \$1 -eq 0 ]
-then
- /bin/systemctl --no-reload disable cloud-config.service >/dev/null 2>&1 || :
- /bin/systemctl --no-reload disable cloud-final.service >/dev/null 2>&1 || :
- /bin/systemctl --no-reload disable cloud-init.service >/dev/null 2>&1 || :
- /bin/systemctl --no-reload disable cloud-init-local.service >/dev/null 2>&1 || :
-fi
-#end if
-
-%postun
-
-#if $systemd
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-#end if
-
-%files
-
-/lib/udev/rules.d/66-azure-ephemeral.rules
-
-#if $sysvinit
-%attr(0755, root, root) %{_initddir}/cloud-config
-%attr(0755, root, root) %{_initddir}/cloud-final
-%attr(0755, root, root) %{_initddir}/cloud-init-local
-%attr(0755, root, root) %{_initddir}/cloud-init
-#end if
-
-#if $systemd
-/usr/lib/systemd/system-generators/cloud-init-generator
-%{_unitdir}/cloud-*
-%{_unitdir}/cloud-*
-#end if
-
-# Program binaries
-%{_bindir}/cloud-init*
-%{_libexecdir}/%{name}/uncloud-init
-%{_libexecdir}/%{name}/write-ssh-key-fingerprints
-
-# Docs
-%doc LICENSE ChangeLog TODO.rst requirements.txt
-%doc %{_defaultdocdir}/cloud-init/*
-
-# Configs
-%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg
-%dir %{_sysconfdir}/cloud/cloud.cfg.d
-%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/*.cfg
-%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/README
-%dir %{_sysconfdir}/cloud/templates
-%config(noreplace) %{_sysconfdir}/cloud/templates/*
-%config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf
-
-%{_libexecdir}/%{name}
-%dir %{_sharedstatedir}/cloud
-
-# Python code is here...
-%{python_sitelib}/*
-
-%changelog
-
-${changelog}
diff --git a/packages/suse/cloud-init.spec.in b/packages/suse/cloud-init.spec.in
deleted file mode 100644
index 53e6ad13..00000000
--- a/packages/suse/cloud-init.spec.in
+++ /dev/null
@@ -1,163 +0,0 @@
-## This is a cheetah template
-
-# See: http://www.zarb.org/~jasonc/macros.php
-# Or: http://fedoraproject.org/wiki/Packaging:ScriptletSnippets
-# Or: http://www.rpm.org/max-rpm/ch-rpm-inside.html
-
-#for $d in $defines
-%define ${d}
-#end for
-
-Name: cloud-init
-Version: ${version}
-Release: ${release}${subrelease}%{?dist}
-Summary: Cloud instance init scripts
-
-Group: System/Management
-License: GPLv3
-URL: http://launchpad.net/cloud-init
-
-Source0: ${archive_name}
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
-BuildArch: noarch
-%endif
-
-BuildRequires: fdupes
-BuildRequires: filesystem
-BuildRequires: python-devel
-BuildRequires: python-setuptools
-BuildRequires: python-cheetah
-
-%if 0%{?suse_version} && 0%{?suse_version} <= 1210
- %define initsys sysvinit
-%else
- %define initsys systemd
-%endif
-
-# System util packages needed
-Requires: iproute2
-Requires: e2fsprogs
-Requires: net-tools
-Requires: procps
-Requires: sudo
-
-# Install pypi 'dynamic' requirements
-#for $r in $requires
-Requires: ${r}
-#end for
-
-# Custom patches
-#set $size = 0
-#for $p in $patches
-Patch${size}: $p
-#set $size += 1
-#end for
-
-%description
-Cloud-init is a set of init scripts for cloud instances. Cloud instances
-need special scripts to run during initialization to retrieve and install
-ssh keys and to let the user run various scripts.
-
-%prep
-%setup -q -n %{name}-%{version}~${release}
-
-# Custom patches activation
-#set $size = 0
-#for $p in $patches
-%patch${size} -p1
-#set $size += 1
-#end for
-
-%build
-%{__python} setup.py build
-
-%install
-%{__python} setup.py install \
- --skip-build --root=%{buildroot} --prefix=%{_prefix} \
- --record-rpm=INSTALLED_FILES --install-lib=%{python_sitelib} \
- --init-system=%{initsys}
-
-# Remove non-SUSE templates
-rm %{buildroot}/%{_sysconfdir}/cloud/templates/*.debian.*
-rm %{buildroot}/%{_sysconfdir}/cloud/templates/*.redhat.*
-rm %{buildroot}/%{_sysconfdir}/cloud/templates/*.ubuntu.*
-
-# Remove cloud-init tests
-rm -r %{buildroot}/%{python_sitelib}/tests
-
-# Move sysvinit scripts to the correct place and create symbolic links
-%if %{initsys} == sysvinit
- mkdir -p %{buildroot}/%{_initddir}
- mv %{buildroot}%{_sysconfdir}/rc.d/init.d/* %{buildroot}%{_initddir}/
- rmdir %{buildroot}%{_sysconfdir}/rc.d/init.d
- rmdir %{buildroot}%{_sysconfdir}/rc.d
-
- mkdir -p %{buildroot}/%{_sbindir}
- pushd %{buildroot}/%{_initddir}
- for file in * ; do
- ln -s %{_initddir}/\${file} %{buildroot}/%{_sbindir}/rc\${file}
- done
- popd
-%endif
-
-# Move documentation
-mkdir -p %{buildroot}/%{_defaultdocdir}
-mv %{buildroot}/usr/share/doc/cloud-init %{buildroot}/%{_defaultdocdir}
-for doc in TODO LICENSE ChangeLog requirements.txt; do
- cp \${doc} %{buildroot}/%{_defaultdocdir}/cloud-init
-done
-
-# Remove duplicate files
-%if 0%{?suse_version}
- %fdupes %{buildroot}/%{python_sitelib}
-%endif
-
-mkdir -p %{buildroot}/var/lib/cloud
-
-%postun
-%insserv_cleanup
-
-%files
-
-# Sysvinit scripts
-%if %{initsys} == sysvinit
- %attr(0755, root, root) %{_initddir}/cloud-config
- %attr(0755, root, root) %{_initddir}/cloud-final
- %attr(0755, root, root) %{_initddir}/cloud-init-local
- %attr(0755, root, root) %{_initddir}/cloud-init
-
- %{_sbindir}/rccloud-*
-%endif
-
-# Program binaries
-%{_bindir}/cloud-init*
-
-# There doesn't seem to be an agreed upon place for these
-# although it appears the standard says /usr/lib but rpmbuild
-# will try /usr/lib64 ??
-/usr/lib/%{name}/uncloud-init
-/usr/lib/%{name}/write-ssh-key-fingerprints
-
-# Docs
-%doc %{_defaultdocdir}/cloud-init/*
-
-# Configs
-%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg
-%dir %{_sysconfdir}/cloud/cloud.cfg.d
-%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/*.cfg
-%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/README
-%dir %{_sysconfdir}/cloud/templates
-%config(noreplace) %{_sysconfdir}/cloud/templates/*
-
-# Python code is here...
-%{python_sitelib}/*
-
-/var/lib/cloud
-
-%changelog
-
-${changelog}