From c2620109ad382a5b535b8c61ad17737e35683cb7 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 06 2016 17:24:17 +0000 Subject: import WALinuxAgent-2.2.0-3.el7 --- diff --git a/.WALinuxAgent.metadata b/.WALinuxAgent.metadata index 23608d1..f14b715 100644 --- a/.WALinuxAgent.metadata +++ b/.WALinuxAgent.metadata @@ -1 +1 @@ -65214d921122d8c048d99c8e85a4f12eb97eafaa SOURCES/WALinuxAgent-WALinuxAgent-2.0.16.tar.gz +0110c0830fb37f54a69eeacad063b92d8707e679 SOURCES/WALinuxAgent-2.2.0.tar.gz diff --git a/.gitignore b/.gitignore index 33e891f..b4a6f8f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/WALinuxAgent-WALinuxAgent-2.0.16.tar.gz +SOURCES/WALinuxAgent-2.2.0.tar.gz diff --git a/SOURCES/WALinuxAgent-2.0.8-logrotate-name.patch b/SOURCES/WALinuxAgent-2.0.8-logrotate-name.patch deleted file mode 100644 index e8f6d1a..0000000 --- a/SOURCES/WALinuxAgent-2.0.8-logrotate-name.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/setup.py 2014-10-05 03:39:26.477801917 -0500 -+++ b/setup.py 2014-10-05 03:39:51.749922806 -0500 -@@ -155,7 +155,7 @@ - sys.exit(1) - try: - self.copy_file('config/waagent.logrotate', -- tgtDir + 'etc/logrotate.d/waagent') -+ tgtDir + 'etc/logrotate.d/WALinuxAgent') - except: - msg = 'Could not install logrotate file in ' - msg += tgtDir + 'etc/logrotate.d' diff --git a/SOURCES/agent-no-auto-update-when-upgrading.patch b/SOURCES/agent-no-auto-update-when-upgrading.patch new file mode 100644 index 0000000..fd1ffe4 --- /dev/null +++ b/SOURCES/agent-no-auto-update-when-upgrading.patch @@ -0,0 +1,11 @@ +--- WALinuxAgent-2.2.0/azurelinuxagent/common/conf.py.orig ++++ WALinuxAgent-2.2.0/azurelinuxagent/common/conf.py +@@ -213,7 +213,7 @@ def get_autoupdate_gafamily(conf=__conf_ + + + def get_autoupdate_enabled(conf=__conf__): +- return conf.get_switch("AutoUpdate.Enabled", True) ++ return conf.get_switch("AutoUpdate.Enabled", False) + + + def get_autoupdate_frequency(conf=__conf__): diff --git a/SOURCES/agent-no-auto-update.patch b/SOURCES/agent-no-auto-update.patch new file mode 100644 index 0000000..b32483c --- /dev/null +++ b/SOURCES/agent-no-auto-update.patch @@ -0,0 +1,11 @@ +--- WALinuxAgent-2.2.0/config/waagent.conf.orig ++++ WALinuxAgent-2.2.0/config/waagent.conf +@@ -86,7 +86,7 @@ OS.OpensslPath=None + # OS.EnableRDMA=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 diff --git a/SPECS/WALinuxAgent.spec b/SPECS/WALinuxAgent.spec index cdb6bee..bdb6215 100644 --- a/SPECS/WALinuxAgent.spec +++ b/SPECS/WALinuxAgent.spec @@ -1,50 +1,53 @@ -%if 0%{?fedora} -%global distro fedora -%global initsys systemd -%else -%if 0%{?rhel} -%global distro redhat +%define name WALinuxAgent +%define version 2.2.0 +%define unmangled_version 2.2.0 +%define release 3 + %if 0%{?rhel} < 7 %global initsys sysV -%{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d} %else %global initsys systemd %endif -%{!?__python2: %global __python2 /usr/bin/python2} -%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} -%endif -%endif - -Name: WALinuxAgent -Version: 2.0.16 -Release: 1%{?dist} -Summary: The Microsoft Azure Linux Agent - -Group: System Environment/Daemons -License: ASL 2.0 -URL: https://github.com/Azure/%{name} -Source0: https://github.com/Azure/%{name}/archive/%{name}-%{name}-%{version}.tar.gz -# Redhat-specific patch (not submitted upstream) -Patch0: %{name}-2.0.8-logrotate-name.patch -BuildArch: noarch +Summary: UNKNOWN +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +Source0: %{name}-%{unmangled_version}.tar.gz +Patch0: agent-no-auto-update.patch +Patch1: agent-no-auto-update-when-upgrading.patch +License: Apache License Version 2.0 +Group: Development/Libraries +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +Prefix: %{_prefix} +BuildArch: noarch +# Vendor: Yue Zhang, Stephen Zarkos, Eric Gable +Url: https://github.com/Azure/WALinuxAgent + +# rhel requirements BuildRequires: python2-devel BuildRequires: python-setuptools -Requires: net-tools -# Requires: ntfsprogs -Requires: openssh -Requires: openssh-server -Requires: openssl -Requires: parted -Requires: python-pyasn1 - -%if 0%{?rhel} && 0%{?rhel} < 7 + +Requires: util-linux +Requires: net-tools +Requires: openssh +Requires: openssh-server +Requires: openssl +Requires: parted +Requires: python-pyasn1 + +%if %{initsys} == systemd +Requires: NetworkManager +%else +%if %{initsys} == sysV Conflicts: NetworkManager %endif +%endif %if %{initsys} == systemd BuildRequires: systemd +Requires(pre): systemd Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -58,28 +61,24 @@ Requires(postun): initscripts %endif %description -The Microsoft Azure Linux Agent supports the provisioning and running of Linux -VMs in the Microsoft Azure cloud. This package should be installed on Linux disk -images that are built to run in the Microsoft Azure environment. +The Azure Linux Agent supports the provisioning and running of Linux +VMs in the Azure cloud. This package should be installed on Linux disk +images that are built to run in the Azure environment. + %prep -%setup -qn %{name}-%{name}-%{version} +%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version} %patch0 -p1 - -chmod 0755 distro/redhat/waagent.sysV +%patch1 -p1 %build -%{__python2} setup.py build +python setup.py build %install -%{__python2} setup.py install --skip-build --root %{buildroot} --lnx-distro '%{distro}' --init-system '%{initsys}' - -mkdir -p -m 0700 %{buildroot}%{_sharedstatedir}/waagent -mkdir -p %{buildroot}%{_localstatedir}/log -touch %{buildroot}%{_localstatedir}/log/waagent.log +python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES -mkdir -p %{buildroot}%{_udevrulesdir} -mv %{buildroot}%{_sysconfdir}/udev/rules.d/99-azure-product-uuid.rules %{buildroot}%{_udevrulesdir}/99-azure-product-uuid.rules +%clean +rm -rf $RPM_BUILD_ROOT %post %if %{initsys} == systemd @@ -113,25 +112,35 @@ fi %endif %endif -%files -%doc Changelog LICENSE-2.0.txt NOTICE README -%ghost %{_localstatedir}/log/waagent.log -%dir %attr(0700, root, root) %{_sharedstatedir}/waagent -%config(noreplace) %{_sysconfdir}/logrotate.d -%{_sbindir}/waagent +%files -f INSTALLED_FILES +%{python_sitelib}/* %config(noreplace) %{_sysconfdir}/waagent.conf -%{_udevrulesdir}/99-azure-product-uuid.rules - -%if %{initsys} == systemd -%{_unitdir}/waagent.service -%else -%{_initddir}/waagent -%endif +%defattr(-,root,root) %changelog -* Wed Jan 16 2016 Dave Anderson - 2.0.16-1 +* Thu Nov 03 2016 Dave Anderson - 2.2.0-3 +- Set implicit default of AutoUpdate.Enabled=n when upgrading + Resolves: rhbz#1374115 + +* Fri Oct 28 2016 Dave Anderson - 2.2.0-2 +- Set AutoUpdate.Enabled=n + Resolves: rhbz#1374115 + +* Fri Sep 30 2016 Dave Anderson - 2.2.0-1 +- Update to v2.2.0 + Resolves: rhbz#1360492 + +* Wed Sep 21 2016 Dave Anderson - 2.1.5-2 +- Several QE updates to this file + Resolves: rhbz#1360492 + +* Tue Sep 13 2016 Dave Anderson - 2.1.5-1 +- Update to v2.1.5 + Resolves: rhbz#1360492 + +* Thu Jan 14 2016 Dave Anderson - 2.0.16-1 - Update to 2.0.16 - Resolves: rhbz#1296359 + Resolves: rhbz#1296360 * Mon Jun 01 2015 Dave Anderson - 2.0.13-1 - Update to upstream 2.0.13 package.