SPECS/WALinuxAgent/WALinuxAgent.spec
624d1cc2
 Name:           WALinuxAgent
 Summary:        The Windows Azure Linux Agent
b10789a4
 Version:        2.2.14
212f651c
 Release:        3%{?dist}
624d1cc2
 License:        Apache License Version 2.0
 Group:          System/Daemons
b10789a4
 Url:            https://github.com/Azure/WALinuxAgent
624d1cc2
 Source0:        %{name}-%{version}.tar.gz
 Patch0:         photondistroadd.patch
b10789a4
 %define sha1 WALinuxAgent=f417009479ea7168ee0f2daa38328c167b4f874b
d4ac9292
 Vendor:		VMware, Inc.
 Distribution:	Photon
624d1cc2
 
 BuildRequires:  python2
 BuildRequires:  python2-libs
 BuildRequires:  python-setuptools
b10789a4
 BuildRequires:  python-xml
c417d850
 BuildRequires:  systemd
b10789a4
 
624d1cc2
 Requires:       python2
 Requires:       python2-libs
b10789a4
 Requires:       python-xml
624d1cc2
 Requires:       python-pyasn1
 Requires:       openssh
 Requires:       openssl
7f9d2e12
 Requires:       (util-linux or toybox)
 Requires:       /bin/sed
 Requires:       /bin/grep
624d1cc2
 Requires:       sudo
 Requires:       iptables
c417d850
 Requires:       systemd
624d1cc2
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
 
 %description
 The Windows Azure Linux Agent supports the provisioning and running of Linux
 VMs in the Windows Azure cloud. This package should be installed on Linux disk
 images that are built to run in the Windows Azure environment.
 
 %prep
b10789a4
 %setup -q -n WALinuxAgent-2.2.14
 %patch0 -p1
624d1cc2
 
 %pre -p /bin/sh
 
 %build
b10789a4
 python2 setup.py build -b py2
624d1cc2
 
 %install
b10789a4
 python2 -tt setup.py build -b py2 install --prefix=%{_prefix} --lnx-distro='photonos' --root=%{buildroot} --force
624d1cc2
 mkdir -p  %{buildroot}/%{_localstatedir}/log
 mkdir -p -m 0700 %{buildroot}/%{_sharedstatedir}/waagent
212f651c
 mkdir -p %{buildroot}/%{_localstatedir}/opt/waagent/log
 mkdir -p %{buildroot}/%{_localstatedir}/log/
 touch %{buildroot}/%{_localstatedir}/opt/waagent/log/waagent.log
 ln -sfv /opt/waagent/log/waagent.log %{buildroot}%{_localstatedir}/log/waagent.log
624d1cc2
 
02c3b9a3
 %check
ba174b20
 python2 setup.py check && python2 setup.py test
02c3b9a3
 
624d1cc2
 %post
c417d850
 %systemd_post waagent.service
624d1cc2
 
c417d850
 %preun
 %systemd_preun waagent.service
624d1cc2
 
c417d850
 %postun
 %systemd_postun_with_restart waagent.service
624d1cc2
 
 
 %files
 /usr/lib/systemd/system/*
 %defattr(0644,root,root,0755)
b10789a4
 %doc Changelog
 %attr(0755,root,root) %{_bindir}/waagent
 %attr(0755,root,root) %{_bindir}/waagent2.0
624d1cc2
 %config %{_sysconfdir}/waagent.conf
212f651c
 %dir %{_localstatedir}/opt/waagent/log
 %{_localstatedir}/log/waagent.log
 %ghost %{_localstatedir}/opt/waagent/log/waagent.log
624d1cc2
 %dir %attr(0700, root, root) %{_sharedstatedir}/waagent
b10789a4
 /usr/lib/python2.7/site-packages/*
624d1cc2
 
 %changelog
212f651c
 * Thu Dec 28 2017 Divya Thaluru <dthaluru@vmware.com>  2.2.14-3
 - Fixed the log file directory structure
7f9d2e12
 * Mon Sep 18 2017 Alexey Makhalov <amakhalov@vmware.com> 2.2.14-2
 - Requires /bin/grep, /bin/sed and util-linux or toybox
b10789a4
 * Thu Jul 13 2017 Anish Swaminathan <anishs@vmware.com> 2.2.14-1
 - Update to 2.2.14
ba174b20
 * Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.0.18-4
 - Use python2 explicitly to build
 * Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.0.18-3
 - GA - Bump release of all rpms
c417d850
 * Tue May 10 2016 Anish Swaminathan <anishs@vmware.com> 2.0.18-2
 - Edit post scripts
5ccfaa6d
 * Thu Apr 28 2016 Anish Swaminathan <anishs@vmware.com> 2.0.18-1
 - Update to 2.0.18
d4ac9292
 * Thu Jan 28 2016 Anish Swaminathan <anishs@vmware.com> 2.0.14-3
212f651c
 - Removed redundant requires
fce1a310
 * Thu Aug 6 2015 Anish Swaminathan <anishs@vmware.com>
 - Added sha1sum
624d1cc2
 * Fri Mar 13 2015 - mbassiouny@vmware.com
b10789a4
 - Initial packaging