diff options
Diffstat (limited to 'packages')
-rwxr-xr-x | packages/bddeb | 20 | ||||
-rwxr-xr-x | packages/brpm | 1 | ||||
-rw-r--r-- | packages/debian/compat | 2 | ||||
-rw-r--r-- | packages/debian/control.in | 14 | ||||
-rw-r--r-- | packages/debian/pycompat | 1 | ||||
-rwxr-xr-x | packages/debian/rules | 25 |
6 files changed, 38 insertions, 25 deletions
diff --git a/packages/bddeb b/packages/bddeb index 9552aa40..9d264f92 100755 --- a/packages/bddeb +++ b/packages/bddeb @@ -31,6 +31,7 @@ PKG_MP = { 'argparse': 'python-argparse', 'cheetah': 'python-cheetah', 'configobj': 'python-configobj', + 'jinja2': 'python-jinja2', 'jsonpatch': 'python-jsonpatch | python-json-patch', 'oauth': 'python-oauth', 'prettytable': 'python-prettytable', @@ -38,7 +39,7 @@ PKG_MP = { 'pyyaml': 'python-yaml', 'requests': 'python-requests', } -DEBUILD_ARGS = ["-us", "-S", "-uc", "-d"] +DEBUILD_ARGS = ["-S", "-d"] def write_debian_folder(root, version, revno, append_requires=[]): @@ -75,7 +76,7 @@ def write_debian_folder(root, version, revno, append_requires=[]): params={'requires': requires}) # Just copy the following directly - for base_fn in ['dirs', 'copyright', 'compat', 'pycompat', 'rules']: + for base_fn in ['dirs', 'copyright', 'compat', 'rules']: shutil.copy(util.abs_join(find_root(), 'packages', 'debian', base_fn), util.abs_join(deb_dir, base_fn)) @@ -98,15 +99,23 @@ def main(): 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")) + 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)) + 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") args = parser.parse_args() + if not args.sign: + args.debuild_args.extend(['-us', '-uc']) + os.environ['INIT_SYSTEM'] = args.init_system capture = True @@ -166,7 +175,8 @@ def main(): print("Copied that archive to %r for local usage (if desired)." % (util.abs_join(os.getcwd(), tar_fn))) - print("Running 'debuild' in %r" % (xdir)) + 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: diff --git a/packages/brpm b/packages/brpm index f8ba1db1..b8bbff9d 100755 --- a/packages/brpm +++ b/packages/brpm @@ -37,6 +37,7 @@ PKG_MP = { 'redhat': { 'argparse': 'python-argparse', 'cheetah': 'python-cheetah', + 'jinja2': 'python-jinja2', 'configobj': 'python-configobj', 'jsonpatch': 'python-jsonpatch', 'oauth': 'python-oauth', diff --git a/packages/debian/compat b/packages/debian/compat index 7ed6ff82..ec635144 100644 --- a/packages/debian/compat +++ b/packages/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/packages/debian/control.in b/packages/debian/control.in index 7e42b94b..9207e5f4 100644 --- a/packages/debian/control.in +++ b/packages/debian/control.in @@ -1,18 +1,22 @@ ## This is a cheetah template Source: cloud-init Section: admin -Priority: extra +Priority: optional Maintainer: Scott Moser <smoser@ubuntu.com> -Build-Depends: cdbs, - debhelper (>= 5.0.38), +Build-Depends: debhelper (>= 9), + dh-python, + dh-systemd, python (>= 2.6.6-3~), python-nose, pyflakes, - pylint, python-setuptools, + python-selinux, python-cheetah, python-mocker, - python-setuptools + python-httpretty, +#for $r in $requires + ${r}, +#end for XS-Python-Version: all Standards-Version: 3.9.3 diff --git a/packages/debian/pycompat b/packages/debian/pycompat deleted file mode 100644 index 0cfbf088..00000000 --- a/packages/debian/pycompat +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/packages/debian/rules b/packages/debian/rules index 7623ac9d..9e0c5ddb 100755 --- a/packages/debian/rules +++ b/packages/debian/rules @@ -1,18 +1,17 @@ #!/usr/bin/make -f -DEB_PYTHON2_MODULE_PACKAGES = cloud-init -INIT_SYSTEM ?= upstart +INIT_SYSTEM ?= upstart,systemd +export PYBUILD_INSTALL_ARGS=--init-system=$(INIT_SYSTEM) -binary-install/cloud-init::cloud-init-fixups +%: + dh $@ --with python2,systemd --buildsystem pybuild -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/python-distutils.mk +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 -DEB_PYTHON_INSTALL_ARGS_ALL += --init-system=$(INIT_SYSTEM) - -DEB_DH_INSTALL_SOURCEDIR := debian/tmp - -cloud-init-fixups: - install -d $(DEB_DESTDIR)/etc/rsyslog.d - cp tools/21-cloudinit.conf $(DEB_DESTDIR)/etc/rsyslog.d/21-cloudinit.conf - +override_dh_auto_test: + # Becuase setup tools didn't copy data... + cp -r tests/data .pybuild/pythonX.Y_2.7/build/tests + http_proxy= dh_auto_test -- --test-nose |