Blame SPECS/WALinuxAgent.spec

c26201
%define name WALinuxAgent
c26201
%define version 2.2.0
c26201
%define unmangled_version 2.2.0
c26201
cc18bb
%if 0%{?rhel} < 7
cc18bb
%global initsys sysV
cc18bb
%else
cc18bb
%global initsys systemd
cc18bb
%endif
cc18bb
c26201
Summary: UNKNOWN
c26201
Name: %{name}
c26201
Version: %{version}
c0dd94
Release: 4%{?dist}
c26201
Source0: %{name}-%{unmangled_version}.tar.gz
c26201
Patch0: agent-no-auto-update.patch
c26201
Patch1: agent-no-auto-update-when-upgrading.patch
c0dd94
# For bz#1413674 - [WALA] Fail to send hostname to DHCP server during provisioning
c0dd94
Patch2: agent-RHEL-7-hostname-533.patch
c0dd94
# For bz#1413674 - [WALA] Fail to send hostname to DHCP server during provisioning
c0dd94
Patch3: agent-fix-for-hostnamectl-534.patch
c26201
License: Apache License Version 2.0
c26201
Group: Development/Libraries
c26201
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
c26201
Prefix: %{_prefix}
c26201
BuildArch: noarch
c26201
# Vendor: Yue Zhang, Stephen Zarkos, Eric Gable <walinuxagent@microsoft.com>
c26201
Url: https://github.com/Azure/WALinuxAgent
c26201
c26201
# rhel requirements
cc18bb
cc18bb
BuildRequires:  python2-devel
cc18bb
BuildRequires:  python-setuptools
c26201
c26201
Requires: util-linux
c26201
Requires: net-tools
c26201
Requires: openssh
c26201
Requires: openssh-server
c26201
Requires: openssl
c26201
Requires: parted
c26201
Requires: python-pyasn1
c26201
c26201
%if %{initsys} == systemd
c26201
Requires:       NetworkManager
c26201
%else
c26201
%if %{initsys} == sysV
cc18bb
Conflicts:      NetworkManager
cc18bb
%endif
c26201
%endif
cc18bb
cc18bb
%if %{initsys} == systemd
cc18bb
BuildRequires:   systemd
c26201
Requires(pre):  systemd
cc18bb
Requires(post):  systemd
cc18bb
Requires(preun): systemd
cc18bb
Requires(postun): systemd
cc18bb
%else
cc18bb
%if %{initsys} == sysv
cc18bb
Requires(post):  chkconfig
cc18bb
Requires(preun): chkconfig
cc18bb
Requires(preun): initscripts
cc18bb
Requires(postun): initscripts
cc18bb
%endif
cc18bb
%endif
cc18bb
cc18bb
%description
c26201
The Azure Linux Agent supports the provisioning and running of Linux
c26201
VMs in the Azure cloud. This package should be installed on Linux disk
c26201
images that are built to run in the Azure environment.
c26201
cc18bb
cc18bb
%prep
c26201
%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version}
cc18bb
%patch0 -p1
c26201
%patch1 -p1
c0dd94
%patch2 -p1
c0dd94
%patch3 -p1
cc18bb
cc18bb
%build
c26201
python setup.py build
cc18bb
cc18bb
%install
c26201
python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
cc18bb
c26201
%clean
c26201
rm -rf $RPM_BUILD_ROOT
0196a8
cc18bb
%post
cc18bb
%if %{initsys} == systemd
cc18bb
%systemd_post waagent.service
cc18bb
%else
cc18bb
%if %{initsys} == sysV
cc18bb
/sbin/chkconfig --add waagent
cc18bb
%endif
cc18bb
%endif
cc18bb
cc18bb
%preun
cc18bb
%if %{initsys} == systemd
cc18bb
%systemd_preun waagent.service
cc18bb
%else
cc18bb
%if %{initsys} == sysV
cc18bb
if [ $1 = 0 ]; then
cc18bb
        /sbin/service waagent stop >/dev/null 2>&1
cc18bb
        /sbin/chkconfig --del waagent
cc18bb
fi
cc18bb
%endif
cc18bb
%endif
cc18bb
cc18bb
%postun
cc18bb
%if %{initsys} == systemd
cc18bb
%systemd_postun_with_restart waagent.service
cc18bb
%else
cc18bb
%if %{initsys} == sysV
cc18bb
if [ "$1" -ge "1" ]; then
cc18bb
        /sbin/service waagent restart >/dev/null 2>&1 || :
cc18bb
fi
cc18bb
%endif
cc18bb
%endif
cc18bb
c26201
%files -f INSTALLED_FILES
c26201
%{python_sitelib}/*
cc18bb
%config(noreplace) %{_sysconfdir}/waagent.conf
c26201
%defattr(-,root,root)
cc18bb
cc18bb
%changelog
c0dd94
* Mon Jan 16 2017 Miroslav Rezanina <mrezanin@redhat.com> - 2.2.0-4.el7_3
c0dd94
- agent-RHEL-7-hostname-533.patch [bz#1413674]
c0dd94
- agent-fix-for-hostnamectl-534.patch [bz#1413674]
c0dd94
- Resolves: bz#1413674
c0dd94
  ([WALA] Fail to send hostname to DHCP server during provisioning)
c0dd94
c26201
* Thu Nov 03 2016 Dave Anderson <anderson@redhat.com> - 2.2.0-3
c26201
- Set implicit default of AutoUpdate.Enabled=n when upgrading
c26201
  Resolves: rhbz#1374115
c26201
c26201
* Fri Oct 28 2016 Dave Anderson <anderson@redhat.com> - 2.2.0-2
c26201
- Set AutoUpdate.Enabled=n
c26201
  Resolves: rhbz#1374115
c26201
c26201
* Fri Sep 30 2016 Dave Anderson <anderson@redhat.com> - 2.2.0-1
c26201
- Update to v2.2.0
c26201
  Resolves: rhbz#1360492
c26201
c26201
* Wed Sep 21 2016 Dave Anderson <anderson@redhat.com> - 2.1.5-2
c26201
- Several QE updates to this file
c26201
  Resolves: rhbz#1360492
c26201
c26201
* Tue Sep 13 2016 Dave Anderson <anderson@redhat.com> - 2.1.5-1
c26201
- Update to v2.1.5
c26201
  Resolves: rhbz#1360492
c26201
c26201
* Thu Jan 14 2016 Dave Anderson <anderson@redhat.com> - 2.0.16-1
0196a8
- Update to 2.0.16
c26201
  Resolves: rhbz#1296360
0196a8
cc18bb
* Mon Jun 01 2015 Dave Anderson <anderson@redhat.com> - 2.0.13-1
cc18bb
- Update to upstream 2.0.13 package.
cc18bb
- Remove global commit md5sum and fix Source0 to point to correct location.
cc18bb
- Fix setup to deal with "WALinuxAgent-WALinuxAgent" naming scheme
cc18bb
- Added files reference for /udev/rules.d/99-azure-product-uuid.rules
cc18bb
cc18bb
* Thu May 07 2015 Dave Anderson <anderson@redhat.com> - 2.0.11-3
cc18bb
- Remove Requires: ntfsprogs for RHEL7
cc18bb
cc18bb
* Sat Jan 10 2015 Scott K Logan <logans@cottsay.net> - 2.0.11-2
cc18bb
- Use systemd for rhel7
cc18bb
- Own logrotate.d
cc18bb
- Fix python2-devel dep
cc18bb
cc18bb
* Sat Dec 20 2014 Scott K Logan <logans@cottsay.net> - 2.0.11-1
cc18bb
- Initial package