Package: release.debian.org Severity: normal Tags: stretch User: release.debian....@packages.debian.org Usertags: pu
Dear release team, The Azure agent provides the provisioning part of the Microsoft Azure platform. It is necessary to tell the platform about the state of the systems. Therefor it is part of the "hardware" support for the Azure platform. This updates includes both upstream fixes for sudoer handling, Azure Stack handling and some Debian fixes for state directory permissions. The diff still lacks the changelog entry for the above mentioned version, as no further changes are scheduled and this will be a straight rebuild for Stretch. Please accept the updated waagent package into Stretch. diff --git a/debian/.git-dpm b/debian/.git-dpm index 38f3e41..c773850 100644 --- a/debian/.git-dpm +++ b/debian/.git-dpm @@ -1,8 +1,8 @@ # see git-dpm(1) from git-dpm package -687c1cdd6c70d793d393d80a0406d508259d3b54 -687c1cdd6c70d793d393d80a0406d508259d3b54 -eb1e5132bbec8389a1f4df5fb78022e189c69d41 -eb1e5132bbec8389a1f4df5fb78022e189c69d41 -waagent_2.2.14.orig.tar.xz -b9147e9fd388e3491dea41e09aac98dc9316e5d4 -627124 +d59c00022f4c7d2987a832992c710dd2087e1fec +d59c00022f4c7d2987a832992c710dd2087e1fec +ae7855acb37a6964ac53e78f46103d5684983d33 +ae7855acb37a6964ac53e78f46103d5684983d33 +waagent_2.2.18.orig.tar.xz +e11edff700ee8c6a0d019ce41f92f356da7ada86 +690928 diff --git a/debian/changelog b/debian/changelog index b8169c3..56bfecc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,21 @@ -waagent (2.2.14-1~deb9u1) stretch; urgency=medium +waagent (2.2.18-3) unstable; urgency=medium - * Upload to stretch. + * Move udev rules to /lib/udev. (closes: #856065) + * Set priority to optional. - -- Bastian Blank <wa...@debian.org> Wed, 27 Sep 2017 09:34:43 +0200 + -- Bastian Blank <bastian.bl...@credativ.de> Mon, 27 Nov 2017 09:07:13 +0100 + +waagent (2.2.18-2) unstable; urgency=medium + + * Create /var/lib/waagent with mode 0700. (closes: #878951) + + -- Bastian Blank <bastian.bl...@credativ.de> Tue, 21 Nov 2017 09:28:39 +0100 + +waagent (2.2.18-1) unstable; urgency=medium + + * New upstream version. + + -- Bastian Blank <wa...@debian.org> Wed, 04 Oct 2017 11:51:29 +0200 waagent (2.2.14-1) unstable; urgency=medium diff --git a/debian/control b/debian/control index 8e74178..1ca8ae2 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,6 @@ Source: waagent Section: admin -Priority: extra +Priority: optional Maintainer: Bastian Blank <bastian.bl...@credativ.de> Build-Depends: debhelper (>= 9), diff --git a/debian/patches/agent-command-provision.patch b/debian/patches/agent-command-provision.patch index 66d5d8c..cdd77bc 100644 --- a/debian/patches/agent-command-provision.patch +++ b/debian/patches/agent-command-provision.patch @@ -1,4 +1,4 @@ -From 454a3e0b07b420c0f6015fb41028f572456c20ff Mon Sep 17 00:00:00 2001 +From ab767bf1620144df2372dd957c59b01f3ac8e30c Mon Sep 17 00:00:00 2001 From: Bastian Blank <bastian.bl...@credativ.de> Date: Wed, 4 Jan 2017 18:05:59 +0100 Subject: Add provision command to agent @@ -9,10 +9,10 @@ Patch-Name: agent-command-provision.patch 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azurelinuxagent/agent.py b/azurelinuxagent/agent.py -index d1ac354..454cc86 100644 +index e99f7be..6144401 100644 --- a/azurelinuxagent/agent.py +++ b/azurelinuxagent/agent.py -@@ -172,6 +172,8 @@ def parse_args(sys_args): +@@ -191,6 +191,8 @@ def parse_args(sys_args): cmd = "deprovision+user" elif re.match("^([-/]*)deprovision", a): cmd = "deprovision" @@ -21,7 +21,7 @@ index d1ac354..454cc86 100644 elif re.match("^([-/]*)daemon", a): cmd = "daemon" elif re.match("^([-/]*)start", a): -@@ -212,7 +214,7 @@ def usage(): +@@ -233,7 +235,7 @@ def usage(): print("") print((("usage: {0} [-verbose] [-force] [-help] " "-configuration-path:<path to configuration file>" diff --git a/debian/patches/agent-command-resourcedisk.patch b/debian/patches/agent-command-resourcedisk.patch index 879ced4..3f791e5 100644 --- a/debian/patches/agent-command-resourcedisk.patch +++ b/debian/patches/agent-command-resourcedisk.patch @@ -1,4 +1,4 @@ -From f99adfbf08d5b6e40697c1ff44d60cee9546c6d7 Mon Sep 17 00:00:00 2001 +From 4bdfad4279f64b579565d52e9cd8c93d77d2d69e Mon Sep 17 00:00:00 2001 From: Bastian Blank <bastian.bl...@credativ.de> Date: Wed, 4 Jan 2017 18:06:30 +0100 Subject: Add resourcedisk command to agent @@ -9,10 +9,10 @@ Patch-Name: agent-command-resourcedisk.patch 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/azurelinuxagent/agent.py b/azurelinuxagent/agent.py -index 454cc86..00f2861 100644 +index 6144401..843ab2a 100644 --- a/azurelinuxagent/agent.py +++ b/azurelinuxagent/agent.py -@@ -116,6 +116,11 @@ class Agent(object): +@@ -128,6 +128,11 @@ class Agent(object): update_handler = get_update_handler() update_handler.run() @@ -21,19 +21,19 @@ index 454cc86..00f2861 100644 + resourcedisk_handler = get_resourcedisk_handler() + resourcedisk_handler.run() + - def main(args=[]): - """ - Parse command line arguments, exit with usage() on error. -@@ -145,6 +150,8 @@ def main(args=[]): + def show_configuration(self): + configuration = conf.get_configuration() + for k in sorted(configuration.keys()): +@@ -162,6 +167,8 @@ def main(args=[]): agent.daemon() elif command == "run-exthandlers": agent.run_exthandlers() + elif command == "resourcedisk": + agent.resourcedisk() + elif command == "show-configuration": + agent.show_configuration() except Exception: - logger.error(u"Failed to run '{0}': {1}", - command, -@@ -182,6 +189,8 @@ def parse_args(sys_args): +@@ -201,6 +208,8 @@ def parse_args(sys_args): cmd = "register-service" elif re.match("^([-/]*)run-exthandlers", a): cmd = "run-exthandlers" @@ -42,7 +42,7 @@ index 454cc86..00f2861 100644 elif re.match("^([-/]*)version", a): cmd = "version" elif re.match("^([-/]*)verbose", a): -@@ -215,7 +224,7 @@ def usage(): +@@ -236,7 +245,7 @@ def usage(): print((("usage: {0} [-verbose] [-force] [-help] " "-configuration-path:<path to configuration file>" "-provision|-deprovision[+user]|-register-service|-version|-daemon|-start|" diff --git a/debian/patches/disable-bytecode-exthandler.patch b/debian/patches/disable-bytecode-exthandler.patch index cd37536..bbcc9ad 100644 --- a/debian/patches/disable-bytecode-exthandler.patch +++ b/debian/patches/disable-bytecode-exthandler.patch @@ -1,4 +1,4 @@ -From c7d469036318f77a5909fb03f16d74f631109fac Mon Sep 17 00:00:00 2001 +From f0c9f313723ff5eee903281049bfca88c001fe4d Mon Sep 17 00:00:00 2001 From: Bastian Blank <bastian.bl...@credativ.de> Date: Fri, 7 Jul 2017 17:13:52 +0200 Subject: Disable bytecode save in exthandler @@ -9,10 +9,10 @@ Patch-Name: disable-bytecode-exthandler.patch 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py -index 10eac82..66b6bcc 100644 +index b7ee96a..fab16a0 100644 --- a/azurelinuxagent/ga/update.py +++ b/azurelinuxagent/ga/update.py -@@ -133,6 +133,9 @@ class UpdateHandler(object): +@@ -135,6 +135,9 @@ class UpdateHandler(object): if child_args is not None: agent_cmd = "{0} {1}".format(agent_cmd, child_args) @@ -22,7 +22,7 @@ index 10eac82..66b6bcc 100644 try: # Launch the correct Python version for python-based agents -@@ -148,7 +151,7 @@ class UpdateHandler(object): +@@ -150,7 +153,7 @@ class UpdateHandler(object): cwd=agent_dir, stdout=sys.stdout, stderr=sys.stderr, diff --git a/debian/patches/entry-points.patch b/debian/patches/entry-points.patch index 16a682b..16ae294 100644 --- a/debian/patches/entry-points.patch +++ b/debian/patches/entry-points.patch @@ -1,15 +1,15 @@ -From 687c1cdd6c70d793d393d80a0406d508259d3b54 Mon Sep 17 00:00:00 2001 +From f69c49dfd63f464b7fdd40fa68d3b77e4ee01e0e Mon Sep 17 00:00:00 2001 From: Bastian Blank <bastian.bl...@credativ.de> Date: Wed, 18 Jan 2017 13:09:05 +0100 Subject: Use entry_points for scripts Patch-Name: entry-points.patch --- - setup.py | 18 ++++-------------- - 1 file changed, 4 insertions(+), 14 deletions(-) + setup.py | 20 ++++---------------- + 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/setup.py b/setup.py -index 094abb5..34d1e90 100755 +index f59f829..500aa99 100755 --- a/setup.py +++ b/setup.py @@ -35,11 +35,6 @@ def set_files(data_files, dest=None, src=None): @@ -32,7 +32,13 @@ index 094abb5..34d1e90 100755 set_conf_files(data_files) set_logrotate_files(data_files) set_udev_files(data_files) -@@ -99,7 +93,6 @@ def get_data_files(name, version, fullname): +@@ -93,13 +87,11 @@ def get_data_files(name, version, fullname): + set_sysv_files(data_files) + + elif name == 'arch': +- set_bin_files(data_files, dest="/usr/bin") + set_conf_files(data_files, src=["config/arch/waagent.conf"]) + set_udev_files(data_files) set_systemd_files(data_files, dest='/usr/lib/systemd/system', src=["init/arch/waagent.service"]) elif name == 'coreos': @@ -40,10 +46,10 @@ index 094abb5..34d1e90 100755 set_conf_files(data_files, dest="/usr/share/oem", src=["config/coreos/waagent.conf"]) set_logrotate_files(data_files) -@@ -107,13 +100,11 @@ def get_data_files(name, version, fullname): - set_files(data_files, dest="/usr/share/oem", +@@ -108,13 +100,11 @@ def get_data_files(name, version, fullname): src=["init/coreos/cloud-config.yml"]) - elif name == 'clear linux software for intel architecture': + elif name == 'clear linux os for intel architecture' \ + or name == 'clear linux software for intel architecture': - set_bin_files(data_files, dest="/usr/bin") set_conf_files(data_files, dest="/usr/share/defaults/waagent", src=["config/clearlinux/waagent.conf"]) @@ -54,7 +60,7 @@ index 094abb5..34d1e90 100755 set_conf_files(data_files, src=["config/ubuntu/waagent.conf"]) set_logrotate_files(data_files) set_udev_files(data_files) -@@ -131,7 +122,6 @@ def get_data_files(name, version, fullname): +@@ -132,7 +122,6 @@ def get_data_files(name, version, fullname): set_systemd_files(data_files, src=["init/ubuntu/walinuxagent.service"]) elif name == 'suse': @@ -62,7 +68,7 @@ index 094abb5..34d1e90 100755 set_conf_files(data_files, src=["config/suse/waagent.conf"]) set_logrotate_files(data_files) set_udev_files(data_files) -@@ -145,7 +135,6 @@ def get_data_files(name, version, fullname): +@@ -146,16 +135,13 @@ def get_data_files(name, version, fullname): # sles 12+ and openSUSE 13.2+ use systemd set_systemd_files(data_files, dest='/usr/lib/systemd/system') elif name == 'freebsd': @@ -70,7 +76,8 @@ index 094abb5..34d1e90 100755 set_conf_files(data_files, src=["config/freebsd/waagent.conf"]) set_freebsd_rc_files(data_files) elif name == 'openbsd': -@@ -154,7 +143,6 @@ def get_data_files(name, version, fullname): +- set_bin_files(data_files, dest="/usr/local/sbin") + set_conf_files(data_files, src=["config/openbsd/waagent.conf"]) set_openbsd_rc_files(data_files) else: # Use default setting @@ -78,7 +85,7 @@ index 094abb5..34d1e90 100755 set_conf_files(data_files) set_logrotate_files(data_files) set_udev_files(data_files) -@@ -208,8 +196,10 @@ setuptools.setup( +@@ -209,8 +195,10 @@ setuptools.setup( url='https://github.com/Azure/WALinuxAgent', license='Apache License Version 2.0', packages=find_packages(exclude=["tests"]), diff --git a/debian/patches/osutil-debian.patch b/debian/patches/osutil-debian.patch index b9c34e8..3fafc0f 100644 --- a/debian/patches/osutil-debian.patch +++ b/debian/patches/osutil-debian.patch @@ -1,4 +1,4 @@ -From 2106896fafe22dcc9317c963721d25ec9e362b75 Mon Sep 17 00:00:00 2001 +From 59dc1b44284247a5c9b414549f683f83fea61308 Mon Sep 17 00:00:00 2001 From: Bastian Blank <bastian.bl...@credativ.de> Date: Wed, 24 Aug 2016 16:25:56 +0200 Subject: Support Debian in osutil diff --git a/debian/patches/resourcedisk-filesystem.patch b/debian/patches/resourcedisk-filesystem.patch index 3155420..673907f 100644 --- a/debian/patches/resourcedisk-filesystem.patch +++ b/debian/patches/resourcedisk-filesystem.patch @@ -1,4 +1,4 @@ -From 69503540287b7a2b3cd9477c5b8adcf34ca533a9 Mon Sep 17 00:00:00 2001 +From 445c95cbe63d58c544b38e4444b347cd3d7d87f2 Mon Sep 17 00:00:00 2001 From: Bastian Blank <bastian.bl...@credativ.de> Date: Wed, 4 Jan 2017 18:07:20 +0100 Subject: Fix filesystem detection diff --git a/debian/patches/series b/debian/patches/series index 5fa214c..f7733b4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ agent-command-resourcedisk.patch resourcedisk-filesystem.patch disable-bytecode-exthandler.patch entry-points.patch +udev-rules-dir.patch diff --git a/debian/patches/udev-rules-dir.patch b/debian/patches/udev-rules-dir.patch new file mode 100644 index 0000000..fc8fe02 --- /dev/null +++ b/debian/patches/udev-rules-dir.patch @@ -0,0 +1,23 @@ +From d59c00022f4c7d2987a832992c710dd2087e1fec Mon Sep 17 00:00:00 2001 +From: Bastian Blank <bastian.bl...@credativ.de> +Date: Fri, 24 Nov 2017 13:33:18 +0100 +Subject: Move udev rules to /lib/udev + +Patch-Name: udev-rules-dir.patch +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 500aa99..63dd943 100755 +--- a/setup.py ++++ b/setup.py +@@ -61,7 +61,7 @@ def set_openbsd_rc_files(data_files, dest="/etc/rc.d/", src=["init/openbsd/waage + data_files.append((dest, src)) + + +-def set_udev_files(data_files, dest="/etc/udev/rules.d/", ++def set_udev_files(data_files, dest="/lib/udev/rules.d/", + src=["config/66-azure-storage.rules", + "config/99-azure-product-uuid.rules"]): + data_files.append((dest, src)) diff --git a/debian/patches/user-shell.patch b/debian/patches/user-shell.patch index dda1555..7b8e83b 100644 --- a/debian/patches/user-shell.patch +++ b/debian/patches/user-shell.patch @@ -1,4 +1,4 @@ -From c697bea73276d20095f167dc49d37202b206a812 Mon Sep 17 00:00:00 2001 +From 248afbcbbcfd53b3b03531101512bb9b6a1732b9 Mon Sep 17 00:00:00 2001 From: Bastian Blank <bastian.bl...@credativ.de> Date: Wed, 4 Jan 2017 16:07:33 +0100 Subject: Set shell of created user to /bin/bash @@ -9,10 +9,10 @@ Patch-Name: user-shell.patch 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py -index 58c0ef8..aadb6cd 100644 +index 8a34b92..7d82866 100644 --- a/azurelinuxagent/common/osutil/default.py +++ b/azurelinuxagent/common/osutil/default.py -@@ -123,9 +123,9 @@ class DefaultOSUtil(object): +@@ -270,9 +270,9 @@ class DefaultOSUtil(object): return if expiration is not None: diff --git a/debian/postinst b/debian/postinst index 831d303..c0d0762 100644 --- a/debian/postinst +++ b/debian/postinst @@ -4,7 +4,7 @@ set -e if [ "$1" = configure ] && [ -z "$2" ]; then - mkdir --mode u+rwx /var/lib/waagent + mkdir --mode 0700 /var/lib/waagent fi #DEBHELPER# README.md | 55 +-- azurelinuxagent/agent.py | 21 ++ azurelinuxagent/common/conf.py | 84 ++++- azurelinuxagent/common/event.py | 127 +++++-- azurelinuxagent/common/exception.py | 10 +- azurelinuxagent/common/future.py | 7 +- azurelinuxagent/common/osutil/default.py | 189 +++++++++- azurelinuxagent/common/osutil/factory.py | 3 +- azurelinuxagent/common/osutil/openbsd.py | 6 +- azurelinuxagent/common/protocol/hostplugin.py | 95 +---- azurelinuxagent/common/protocol/metadata.py | 4 +- azurelinuxagent/common/protocol/restapi.py | 4 +- azurelinuxagent/common/protocol/util.py | 6 + azurelinuxagent/common/protocol/wire.py | 385 +++++++++++++-------- azurelinuxagent/common/rdma.py | 12 +- azurelinuxagent/common/utils/fileutil.py | 82 ++++- azurelinuxagent/common/utils/restutil.py | 386 ++++++++++++++------- azurelinuxagent/common/utils/textutil.py | 22 ++ azurelinuxagent/common/version.py | 29 +- azurelinuxagent/ga/env.py | 25 ++ azurelinuxagent/ga/exthandlers.py | 21 +- azurelinuxagent/ga/monitor.py | 8 +- azurelinuxagent/ga/update.py | 420 ++++++++++++----------- azurelinuxagent/pa/provision/default.py | 22 +- azurelinuxagent/pa/rdma/factory.py | 4 + azurelinuxagent/pa/rdma/suse.py | 7 +- azurelinuxagent/pa/rdma/ubuntu.py | 122 +++++++ config/alpine/waagent.conf | 9 + config/arch/waagent.conf | 9 + config/bigip/waagent.conf | 19 +- config/clearlinux/waagent.conf | 9 + config/coreos/waagent.conf | 9 + config/freebsd/waagent.conf | 9 + config/gaia/waagent.conf | 9 + config/openbsd/waagent.conf | 13 +- config/suse/waagent.conf | 9 + config/ubuntu/waagent.conf | 12 + config/waagent.conf | 11 +- debian/.git-dpm | 14 +- debian/changelog | 19 +- debian/control | 2 +- debian/patches/agent-command-provision.patch | 8 +- debian/patches/agent-command-resourcedisk.patch | 22 +- debian/patches/disable-bytecode-exthandler.patch | 8 +- debian/patches/entry-points.patch | 31 +- debian/patches/osutil-debian.patch | 2 +- debian/patches/resourcedisk-filesystem.patch | 2 +- debian/patches/series | 1 + debian/patches/udev-rules-dir.patch | 23 ++ debian/patches/user-shell.patch | 6 +- debian/postinst | 2 +- init/freebsd/waagent | 2 +- setup.py | 7 +- tests/common/osutil/test_default.py | 284 ++++++++++++++- tests/common/test_conf.py | 51 +++ tests/common/test_event.py | 117 +++++-- tests/data/ga/WALinuxAgent-2.2.11.zip | Bin 450878 -> 0 bytes tests/data/ga/WALinuxAgent-2.2.18.zip | Bin 0 -> 505289 bytes tests/data/test_waagent.conf | 16 +- tests/data/wire/ga_manifest_1.xml | 18 + tests/data/wire/ga_manifest_2.xml | 24 ++ tests/ga/test_update.py | 301 ++++++++++------ tests/pa/test_provision.py | 28 +- tests/protocol/mockwiredata.py | 81 ++++- tests/protocol/test_hostplugin.py | 61 +--- tests/protocol/test_metadata.py | 20 +- tests/protocol/test_wire.py | 77 +++-- tests/test_agent.py | 77 +++++ tests/tools.py | 9 + tests/utils/test_file_util.py | 115 +++++++ tests/utils/test_rest_util.py | 356 +++++++++++++++++-- tests/utils/test_text_util.py | 44 +++ 72 files changed, 3121 insertions(+), 981 deletions(-) -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)