Hello community,

here is the log from the commit of package python-azure-agent.14566 for 
openSUSE:Leap:15.1:Update checked in at 2020-10-19 12:26:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.1:Update/python-azure-agent.14566 (Old)
 and      
/work/SRC/openSUSE:Leap:15.1:Update/.python-azure-agent.14566.new.3486 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-azure-agent.14566"

Mon Oct 19 12:26:45 2020 rev:1 rq:842061 version:2.2.45

Changes:
--------
New Changes file:

--- /dev/null   2020-10-12 00:46:48.009358834 +0200
+++ 
/work/SRC/openSUSE:Leap:15.1:Update/.python-azure-agent.14566.new.3486/python-azure-agent.changes
   2020-10-19 12:26:46.145885465 +0200
@@ -0,0 +1,630 @@
+-------------------------------------------------------------------
+Fri Aug 14 12:59:45 UTC 2020 - Robert Schweikert <rjsch...@suse.com>
+
+- Drop paa_sudo_sle15_nopwd.patch (bsc#1175198)
+  + sudoers file is managed by cloud-init we no longer need this hack
+
+-------------------------------------------------------------------
+Fri Jul 17 17:20:01 UTC 2020 - Robert Schweikert <rjsch...@suse.com>
+
+- Add proper_dhcp_config_set.patch (bsc#1173866)
+  + Properly set the dhcp configuration to push the hostname to the DHCP
+    server
+  + Do not bring the interface down to push the hostname, just use ifup
+
+-------------------------------------------------------------------
+Tue Mar 24 20:41:35 UTC 2020 - Robert Schweikert <rjsch...@suse.com>
+
+- Add paa_use_hostnamectl.patch (bsc#1167601, bsc#1167602)
+  + Set the hostname using hostnamectl to ensure setting is
+    properly applied
+
+-------------------------------------------------------------------
+Mon Feb  3 15:53:16 UTC 2020 - Dominique Leuenberger <dims...@opensuse.org>
+
+- BuildRequire pkgconfig(udev) instead of udev: allow OBS to
+  shortcut through -mini flavors.
+
+-------------------------------------------------------------------
+Thu Dec  5 21:10:48 UTC 2019 - Robert Schweikert <rjsch...@suse.com>
+
+- Update to version 2.2.45 (jsc#ECO-80)
+  + Remove paa_cve_2019-0804.patch, included upstream
+  + Add support for Gen2 VM resource disks
+  + Use alternate systemd detection
+  + Fix /proc/net/route requirement that causes errors on FreeBSD
+  + Add cloud-init auto-detect to prevent multiple provisioning mechanisms
+    from relying on configuration for coordination
+  + Disable cgroups when daemon is setup incorrectly
+  + Remove upgrade extension loop for the same goal state
+  + Add container id for extension telemetry events
+  + Be more exact when detecting IMDS service health
+  + Changing add_event to start sending missing fields
+- From 2.2.44
+  + Remove outdated extension ZIP packages
+  + Improved error handling when starting extensions using systemd
+  + Reduce provisioning time of some custom images
+  + Improve the handling of extension download errors
+  + New API for extension authors to handle errors during extension update
+  + Fix handling of errors in calls to openssl
+  + Improve logic to determine current distro
+  + Reduce verbosity of several logging statements
+- From 2.2.42
+  + Poll for artifact blob, addresses goal state procesing issue
+- From 2.2.41
+  + Rewriting the mechanism to start the extension using systemd-run for
+    systems using systemd for managing
+  + Refactoring of resource monitoring framework using cgroup for both
+    systemd and non-systemd approaches [#1530, #1534]
+  + Telemetry pipeline for resource monitoring data
+- From 2.2.40
+  + Fixed tracking of memory/cpu usage
+  + Do not prevent extensions from running if setting up cgroups fails
+  + Enable systemd-aware deprovisioning on all versions >= 18.04
+  + Add systemd support for Debian Jessie, Stretch, and Buster
+  + Support for Linux Openwrt
+- From 2.2.38
+  + Fix CVE-2019-0804
+  + Add fixes for handling swap file and other nit fixes
+- From 2.2.37
+  + Improves re-try logic to handle errors while downloading extensions
+
+-------------------------------------------------------------------
+Thu Mar  7 18:21:15 UTC 2019 - Robert Schweikert <rjsch...@suse.com>
+
+- Add paa_cve_2019-0804.patch (bsc#1127838)
+  - An issue with swapfile handling in the agent creates a data leak situation
+    that exposes system memory data.
+
+-------------------------------------------------------------------
+Thu Feb  7 17:09:52 UTC 2019 - Robert Schweikert <rjsch...@suse.com>
+
+- Update to 2.2.36 (bsc#1119542)
+  - Remove, included upstream
+    + paa_fix_driver_install_detect.patch
+    + paa_rdma_install_proper_driver.patch
+    + 0001-Obtain-platform-information-in-Python-version-depend.patch
+    + 0001-Detect-openSUSE-and-SLES.patch
+    + 0001-Handle-the-disapperance-of-net-tools.patch
+    + 0001-Properly-detect-SLES-15-for-rdma-support.patch
+  - Forward port agent-no-auto-update.patch
+  - [#1451] Do not utf-8 encode telemetry messages
+- From 2.2.35
+  + [#1434] Use files instead of pipes to capture stdout/stderr
+  + [#1431] Prevent multiple downloads of zips
+  + [#1418] Add main module to Python's egg
+  + [#1416] Fix UTF-8 encoding for telemetry payload
+  + [#1408] Honor the 'no_proxy' flag
+  + [#1391, #1401, #1441] Azure Stack improvements
+  + [#1384] Write status file in WALinuxAgent lib folder
+  + [#1375] Add support for Redhat
+  + [#1373] Handle different kernel builds on SUSE Linux Enterprise
+  + [#1365, #1385, #1389] Fixes for RDMA
+- From 2.2.34
+  + [#1397] Send events when extensions fail to complete operation
+  + [#1394/#1366] Fix the threshold telemetry issue
+  + [#1298] Implementing extension sequencing in azure Linux agent
+  + [#1340] Allow Clear Linux detection in python2 and python3
+  + [#1345] FreeBSD swap issues fix (#1144)
+  + [#1349] Use append_file in Redhat6xOSUtil.openssl_to_openssh()
+  + [#1355] Ensure 'value' for authorized ssh keys end in "\n"
+  + [#1361] Remove main module
+- From 2.2.32
+  + [#1325] Enable cgroups by default on all distros
+  + [#1327, #1347] Allow enforcing of cgroups limits
+  + [#1337] Allow configuration for cgroups
+  + [#1333] Add support for NSBSD
+  + [#1319] Stream extension downloads to disk
+    (do not buffer the download in memory)
+  + [#1303] Fix to support custom DNS servers
+  + [#1306] Log extension stdout and stderr
+  + [#1302] Better of cloud-init configuration during deprovisioning
+  + [#1295] Fix to report the correct extension error code
+  + [#1289] Allow disabling the agent or extensions
+  + [#1290] Use the "ip route" command instead of the "route" comand
+    during network configuration
+  + [#1281] Delete JIT accounts
+  + [#1234] Fix for reading KVP values from host
+  + [#1287] Add UDEV rule in azure disk encryption
+- From 2.2.31
+Upstream version jump
+  + [#1196] Health store integration
+  + [#1199] CGroups support
+  + [#1194] Use host for status reporting
+  + [#1188] Fix for sentinel and signal handlers
+  + [#1182] Telemetry updates
+  + [#1171] Add support for JIT
+  + [#1164] Fix for name resolution in Ubuntu 18.04
+  + [#1154] Set connection close header
+  + [#1143] Remove extension packages after extraction
+- From 2.2.26
+  + Update Debian specific configuration and setup.
+- From 2.2.25
+  + Upstream version jump
+  + Revert extension manifest caching to prevent downgrade issues.
+- From 2.2.20
+  + This is a hotfix release for #945, details and mitigation are available
+    in the wiki.
+- From 2.2.29
+  + [#929] wire.py#update_goal_state does not handle out-of-date
+           GoalState errors
+  + [#908] Set Files to 0400 in /var/lib/waagent
+  + [#906] Hardcoded value for sshd's ClientAliveInterval (180)
+  + [#899] Improve HeartBeat Event
+  + [#898] Send dummy status if extension fails to write a #.status file
+  + [#897] 'Target handler state' wall of errors
+  + [#896] End of Line Comments are Not Supported nor Handled
+  + [#891] Create a Telemetry Event to Track Custom Data Execution
+  + [#884] Cleanup Old Goal State and Extension Cache
+  + [#876] The agent should use a scaling back-off when retrying HTTP requests
+  + [#869] The agent should report OS information in the correct JSON format.
+  + [#822] Update docs
+
+-------------------------------------------------------------------
+Wed Jun  6 21:59:43 UTC 2018 - rjsch...@suse.com
+
+- Remove paa_up_only_to_push_hostname.patch
+  + Turns out the issue was a kernel bug and while ifdown ifup sequence to
+    bounce the hostname to the DHCP server is overkill we do not
+    want to carry a "cosmetic" patch
+
+-------------------------------------------------------------------
+Tue Jun  5 19:26:14 UTC 2018 - rjsch...@suse.com
+
+- Add paa_up_only_to_push_hostname.patch (bsc#1094420)
+
+-------------------------------------------------------------------
+Thu May 10 21:30:31 UTC 2018 - rjsch...@suse.com
+
+- Add 0001-Handle-the-disapperance-of-net-tools.patch (bsc#1092831)
+  + Switch to using "ip route" command
+- Add paa_sudo_sle15_nopwd.patch
+  + Work around issue where SLE 15 will not accept the user password when
+    using sudo, cause unknown, needed to time constraints w.r.t. release
+- Add 0001-Properly-detect-SLES-15-for-rdma-support.patch
+  + Properly detect SLES 15 for RDMA support
+
+-------------------------------------------------------------------
+Mon Apr  2 15:51:08 UTC 2018 - rjsch...@suse.com
+
+- Add 0001-Detect-openSUSE-and-SLES.patch (bsc#1087764)
+  + Properly detect SLES 15 and openSUSE Leap 15 in Python 3
+
+-------------------------------------------------------------------
+Tue Mar 20 13:38:04 UTC 2018 - rjsch...@suse.com
+
+- Update paa_force_py3_sle15.patch (bsc#1061584)
+  + Another reference to python, which points to python2
++++ 433 more lines (skipped)
++++ between /dev/null
++++ and 
/work/SRC/openSUSE:Leap:15.1:Update/.python-azure-agent.14566.new.3486/python-azure-agent.changes

New:
----
  WALinuxAgent-2.2.45.tar.gz
  agent-no-auto-update.patch
  paa_force_py3_sle15.patch
  paa_use_hostnamectl.patch
  proper_dhcp_config_set.patch
  python-azure-agent.changes
  python-azure-agent.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-azure-agent.spec ++++++
#
# spec file for package python-azure-agent
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           python-azure-agent
Summary:        Microsoft Azure Linux Agent
License:        Apache-2.0
Group:          System/Daemons
Version:        2.2.45
Release:        0
URL:            https://github.com/Azure/WALinuxAgent
Source0:        WALinuxAgent-%{version}.tar.gz
Patch1:         agent-no-auto-update.patch
Patch6:         paa_force_py3_sle15.patch
Patch10:        paa_use_hostnamectl.patch
Patch11:        proper_dhcp_config_set.patch
BuildRequires:  dos2unix

BuildRequires:  distribution-release
BuildRequires:  openssl
%if 0%{?suse_version} < 1140
BuildRequires:  python-ordereddict
%endif
%if 0%{?suse_version} && 0%{?suse_version} > 1315
BuildRequires:  python3-devel
BuildRequires:  python3-distro
BuildRequires:  python3-mock
BuildRequires:  python3-pytest
BuildRequires:  python3-setuptools
BuildRequires:  python3-xml
%else
BuildRequires:  python-devel
BuildRequires:  python-mock
BuildRequires:  python-pytest
BuildRequires:  python-setuptools
BuildRequires:  python-xml
%endif
BuildRequires:  pkgconfig(udev)
Requires:       eject
Requires:       grep
Requires:       iptables
Requires:       logrotate
%if 0%{?suse_version} < 1140
Requires:       insserv
Requires:       sysvinit
%else
Requires:       systemd
Requires:       wicked
%endif
Requires:       openssh
Requires:       openssl
Requires:       pwdutils
%if 0%{?suse_version} && 0%{?suse_version} > 1315
Requires:       python3-distro
Requires:       python3-pyasn1
Requires:       python3-xml
%else
Requires:       python-pyasn1
Requires:       python-xml
%endif
Requires:       sudo
Requires:       util-linux

# Package renamed in SLE 12, do not remove Provides, Obsolete directives
# until after SLE 12 EOL
Provides:       WALinuxAgent = %{version}
Obsoletes:      WALinuxAgent < %{version}

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()")}
%endif
%if 0%{?suse_version} && 0%{?suse_version} > 1110
BuildArch:      noarch
%endif

%description
The azure-agent supports the provisioning and running of Linux
VMs in the Microsoft Azure Public Cloud and Microsoft Azure Stack private
cloud. This package should be installed on Linux disk
images that are built to run withing the Microsoft Azure or
Microsoft Azure Stack framework.

%package test
Summary:        Unit tests
Group:          Development/Languages/Python
Requires:       %{name} == %{version}
Requires:       openssl
%if 0%{?suse_version} && 0%{?suse_version} > 1315
Requires:       python3-mock
Requires:       python3-pytest
%else
Requires:       python-mock
Requires:       python-pytest
%endif
%if 0%{?suse_version} < 1140
Requires:       python-ordereddict
%endif

%description test
Unit tests for python-azure-agent.

%prep
%setup -qn WALinuxAgent-%{version}
%patch1
%if 0%{?suse_version} && 0%{?suse_version} > 1315
%patch6
%endif
%patch10
%patch11

%build
%if 0%{?suse_version} && 0%{?suse_version} > 1315
python3 setup.py build
%else
python setup.py build
%endif

%install
%if 0%{?suse_version} && 0%{?suse_version} > 1315
python3 setup.py install --prefix=%{_prefix} --lnx-distro='suse' 
--root=%{buildroot}
%else
python setup.py install --prefix=%{_prefix} --lnx-distro='suse' 
--root=%{buildroot}
%endif
%if 0%{?suse_version} > 1140
ln -s service %{buildroot}%{_sbindir}/rcwaagent
%if 0%{?suse_version} < 1230
    mkdir -p %{buildroot}/%{_unitdir}
    mv %{buildroot}/usr/lib/systemd/system/* %{buildroot}/%{_unitdir}
    rm -rf %{buildroot}/usr/lib/systemd
%endif
%else
### rc symlink
ln -s ../..%{_initddir}/waagent %{buildroot}%{_sbindir}/rcwaagent
%endif
### udev rules
%if 0%{?suse_version} < 1230
mkdir -p %{buildroot}/lib/udev/rules.d
mv %{buildroot}%{_sysconfdir}/udev/rules.d/* %{buildroot}/lib/udev/rules.d/
%else
mkdir -p %{buildroot}/usr/lib/udev/rules.d
mv %{buildroot}%{_sysconfdir}/udev/rules.d/* %{buildroot}/usr/lib/udev/rules.d/
%endif
### log file ghost
mkdir -p  %{buildroot}/%{_localstatedir}/log
touch %{buildroot}/%{_localstatedir}/log/waagent.log
### permissinon fixes
chmod +x %{buildroot}/%{_sbindir}/waagent2.0
### naming issues
mv %{buildroot}/%{_sysconfdir}/logrotate.d/waagent.logrotate 
%{buildroot}/%{_sysconfdir}/logrotate.d/waagent

# install tests
%if 0%{?suse_version} && 0%{?suse_version} > 1315
cp -r tests %{buildroot}/%{python3_sitelib}/azurelinuxagent
%else
cp -r tests %{buildroot}/%{python_sitelib}/azurelinuxagent
%endif

%pre
%if 0%{?suse_version} > 1140
    %service_add_pre waagent.service
%endif

%post
%if 0%{?suse_version} > 1140
    %service_add_post waagent.service
%endif

%preun
%if 0%{?suse_version} > 1140
    %service_del_preun waagent.service
%else
    %stop_on_removal waagent
%endif

%postun
%restart_on_update waagent
%if 0%{?suse_version} > 1140
    %service_del_postun waagent.service
%else
    %insserv_cleanup
%endif

%files
%defattr(0644,root,root,0755)
%doc Changelog NOTICE README.md
%license LICENSE.txt 
%{_sbindir}/rcwaagent
%attr(0755,root,root) %{_sbindir}/waagent
%attr(0755,root,root) %{_sbindir}/waagent2.0
%config(noreplace) %{_sysconfdir}/logrotate.d/waagent
%config(noreplace) %{_sysconfdir}/waagent.conf
%ghost %{_localstatedir}/log/waagent.log
%if 0%{?suse_version} > 1140
%{_unitdir}/waagent.service
%else
%attr(0755,root,root) %{_initddir}/waagent
%endif
%if 0%{?suse_version} < 1230
/lib/udev/rules.d/66-azure-storage.rules
/lib/udev/rules.d/99-azure-product-uuid.rules
%else
/usr//lib/udev/rules.d/66-azure-storage.rules
/usr/lib/udev/rules.d/99-azure-product-uuid.rules
%endif
%if 0%{?suse_version} && 0%{?suse_version} > 1315
%dir %{python3_sitelib}/azurelinuxagent
%{python3_sitelib}
%exclude %{python3_sitelib}/azurelinuxagent/tests
%else
%dir %{python_sitelib}/azurelinuxagent
%{python_sitelib}
%exclude %{python_sitelib}/azurelinuxagent/tests
%endif

%files test
%defattr(0644,root,root,0755)
%if 0%{?suse_version} && 0%{?suse_version} > 1315
%{python3_sitelib}/azurelinuxagent/tests
%else
%{python_sitelib}/azurelinuxagent/tests
%endif

%changelog
++++++ agent-no-auto-update.patch ++++++
--- config/suse/waagent.conf.orig
+++ config/suse/waagent.conf
@@ -109,7 +109,7 @@ OS.SshDir=/etc/ssh
 # OS.CheckRdmaDriver=y
 
 # Enable or disable goal state processing auto-update, default is enabled
-# AutoUpdate.Enabled=y
+AutoUpdate.Enabled=n
 
 # Determine the update family, this should not be changed
 # AutoUpdate.GAFamily=Prod
++++++ paa_force_py3_sle15.patch ++++++
--- bin/waagent.orig
+++ bin/waagent
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 #
 # Azure Linux Agent
 #
--- init/waagent.service.orig
+++ init/waagent.service
@@ -8,7 +8,7 @@ ConditionPathExists=/etc/waagent.conf
 
 [Service]
 Type=simple
-ExecStart=/usr/bin/python -u /usr/sbin/waagent -daemon
+ExecStart=/usr/bin/python3 -u /usr/sbin/waagent -daemon
 Restart=always
 RestartSec=5
 
++++++ paa_use_hostnamectl.patch ++++++
--- azurelinuxagent/common/osutil/suse.py.orig
+++ azurelinuxagent/common/osutil/suse.py
@@ -82,6 +82,11 @@ class SUSEOSUtil(SUSE11OSUtil):
         super(SUSEOSUtil, self).__init__()
         self.dhclient_name = 'wickedd-dhcp4'
 
+    def set_hostname(self, hostname):
+        shellutil.run(
+            "hostnamectl set-hostname {0}".format(hostname), chk_err=False
+        )
+
     def stop_dhcp_service(self):
         cmd = "systemctl stop {0}".format(self.dhclient_name)
         return shellutil.run(cmd, chk_err=False)
++++++ proper_dhcp_config_set.patch ++++++
--- azurelinuxagent/common/osutil/suse.py.orig
+++ azurelinuxagent/common/osutil/suse.py
@@ -16,20 +16,12 @@
 # Requires Python 2.6+ and Openssl 1.0+
 #
 
-import os
-import re
-import pwd
-import shutil
-import socket
-import array
-import struct
-import fcntl
 import time
+
 import azurelinuxagent.common.logger as logger
 import azurelinuxagent.common.utils.fileutil as fileutil
 import azurelinuxagent.common.utils.shellutil as shellutil
-import azurelinuxagent.common.utils.textutil as textutil
-from azurelinuxagent.common.version import DISTRO_NAME, DISTRO_VERSION, 
DISTRO_FULL_NAME
+
 from azurelinuxagent.common.osutil.default import DefaultOSUtil
 
 
@@ -82,11 +74,64 @@ class SUSEOSUtil(SUSE11OSUtil):
         super(SUSEOSUtil, self).__init__()
         self.dhclient_name = 'wickedd-dhcp4'
 
+    def publish_hostname(self, hostname):
+        self.set_dhcp_hostname(hostname)
+        self.set_hostname_record(hostname)
+        ifname = self.get_if_name()
+        # To push the hostname to the dhcp server we do not need to
+        # bring down the interface, just make the make ifup do whatever is
+        # necessary
+        self.ifup(ifname)
+
+    def ifup(self, ifname, retries=3, wait=5):
+        logger.info('Interface {0} bounce with ifup'.format(ifname))
+        retry_limit=retries+1
+        for attempt in range(1, retry_limit):
+            try:
+                shellutil.run_command(['ifup', ifname], log_error=True)
+            except Exception:
+                if attempt < retry_limit:
+                    logger.info("retrying in {0} seconds".format(wait))
+                    time.sleep(wait)
+                else:
+                    logger.warn("exceeded restart retries")
+
     def set_hostname(self, hostname):
         shellutil.run(
             "hostnamectl set-hostname {0}".format(hostname), chk_err=False
         )
 
+    def set_dhcp_hostname(self, hostname):
+        dhcp_config_file_path = '/etc/sysconfig/network/dhcp'
+        hostname_send_setting = fileutil.get_line_startingwith(
+            'DHCLIENT_HOSTNAME_OPTION', dhcp_config_file_path
+        )
+        if hostname_send_setting:
+            value = hostname_send_setting.split('=')[-1]
+            if value == "AUTO" or value == '"{0}"'.format(hostname):
+                # Return if auto send host-name is configured or the current
+                # hostname is already set up to be sent
+                return
+            else:
+                # Do not use update_conf_file as it moves the setting to the
+                # end of the file separating it from the contextual comment
+                new_conf = []
+                dhcp_conf = fileutil.read_file(
+                    dhcp_config_file_path).split('\n')
+                for entry in dhcp_conf:
+                    if entry.startswith('DHCLIENT_HOSTNAME_OPTION'):
+                        new_conf.append(
+                           'DHCLIENT_HOSTNAME_OPTION="{0}"'. format(hostname)
+                        )
+                        continue
+                    new_conf.append(entry)
+                fileutil.write_file(dhcp_config_file_path, '\n'.join(new_conf))
+        else:
+            fileutil.append_file(
+                dhcp_config_file_path,
+                'DHCLIENT_HOSTNAME_OPTION="{0}"'. format(hostname)
+            )
+
     def stop_dhcp_service(self):
         cmd = "systemctl stop {0}".format(self.dhclient_name)
         return shellutil.run(cmd, chk_err=False)

Reply via email to