debian/0000775000000000000000000000000012321574663007201 5ustar debian/patches/0000775000000000000000000000000012321574663010630 5ustar debian/patches/cloud-init-default-cfg.patch0000664000000000000000000000024112321574500016062 0ustar --- /dev/null +++ b/config/91_walinuxagent.cfg @@ -0,0 +1,3 @@ +# This configuration file is provided by the WALinuxAgent package. +datasource_list: [ Azure ] + debian/patches/disable-udev-rules.patch0000664000000000000000000000127012321574500015333 0ustar Description: Prevent the removal of udev rules by agent Agent violates packaging rules by modifying the files from another package. This patch makes the package compliant. Author: Ben Howard Last-Update: 2013-07-11 --- a/waagent +++ b/waagent @@ -90,8 +90,7 @@ VMM_STARTUP_SCRIPT_NAME='install' VMM_CONFIG_FILE_NAME='linuxosconfiguration.xml' global RulesFiles -RulesFiles = [ "/lib/udev/rules.d/75-persistent-net-generator.rules", - "/etc/udev/rules.d/70-persistent-net.rules" ] +RulesFiles = [] VarLibDhcpDirectories = ["/var/lib/dhclient", "/var/lib/dhcpcd", "/var/lib/dhcp"] EtcDhcpClientConfFiles = ["/etc/dhcp/dhclient.conf", "/etc/dhcp3/dhclient.conf"] global LibDir debian/patches/disable_provisioning.patch0000664000000000000000000000314012321574500016046 0ustar Description: Disable provisioning On Ubuntu, provisioning requires cloud-init. We disable all the provisioning functions for the agent. Author: Ben Howard Last-Update: 2013-07-11 --- a/config/waagent.conf +++ b/config/waagent.conf @@ -1,6 +1,9 @@ # # Windows Azure Linux Agent Configuration # +# Ubuntu uses Cloud-init to provision on Windows Azure. This configuration +# file is used to ensure that cloud-init does the prep of the disk +# # Specified program is invoked with the argument "Ready" when we report ready status # to the endpoint server. @@ -14,29 +17,29 @@ Role.TopologyConsumer=None # Enable instance creation -Provisioning.Enabled=y +Provisioning.Enabled=n # Password authentication for root account will be unavailable. -Provisioning.DeleteRootPassword=y +Provisioning.DeleteRootPassword=n # Generate fresh host key pair. -Provisioning.RegenerateSshHostKeyPair=y +Provisioning.RegenerateSshHostKeyPair=n # Supported values are "rsa", "dsa" and "ecdsa". Provisioning.SshHostKeyPairType=rsa # Monitor host name changes and publish changes via DHCP requests. -Provisioning.MonitorHostName=y +Provisioning.MonitorHostName=n # Format if unformatted. If 'n', resource disk will not be mounted. -ResourceDisk.Format=y +ResourceDisk.Format=n # File system on the resource disk # Typically ext3 or ext4. FreeBSD images should use 'ufs2' here. ResourceDisk.Filesystem=ext4 -# ount point for the resource disk -ResourceDisk.MountPoint=/mnt/resource +# Mount point for the resource disk +ResourceDisk.MountPoint=/mnt # Create and use swapfile on resource disk. ResourceDisk.EnableSwap=n debian/patches/fixup_setup_file.patch0000664000000000000000000000041312321574500015207 0ustar --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ def initialize_options(self): install.initialize_options(self) - self.init_system = 'sysV' + self.init_system = 'upstart' self.lnx_distro = None def finalize_options(self): debian/patches/series0000664000000000000000000000020612321574526012041 0ustar disable-udev-rules.patch disable_provisioning.patch fixup_setup_file.patch cloud-init-default-cfg.patch sshd_config_newline_fix.patch debian/patches/sshd_config_newline_fix.patch0000664000000000000000000000222212321574613016517 0ustar Description: Fix for broken sshd configuration (LP: #1305418) Change modification of sshd_config to address lack of newline at EOF. Lack of newline resulted in appended config line on same line as existing configuration option, breaking sshd_config. Author: Robert C Jennings Bug-Ubuntu: https://bugs.launchpad.net/bugs/1305418 --- waagent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/waagent +++ b/waagent @@ -3353,7 +3353,7 @@ # Disable RFC 4252 and RFC 4256 authentication schemes. ReplaceFileContentsAtomic(filepath, "\n".join(filter(lambda a: not (a.startswith("PasswordAuthentication") or a.startswith("ChallengeResponseAuthentication")), - GetFileContents(filepath).split('\n'))) + "PasswordAuthentication no\nChallengeResponseAuthentication no\n") + GetFileContents(filepath).split('\n'))) + "\nPasswordAuthentication no\nChallengeResponseAuthentication no\n") Log("Disabled SSH password-based authentication methods.") if self.AdminPassword != None: MyDistro.changePass('root',self.AdminPassword) debian/source/0000775000000000000000000000000012321574663010501 5ustar debian/source/format0000664000000000000000000000001412321574500011675 0ustar 3.0 (quilt) debian/README.source0000664000000000000000000000032712321574500011350 0ustar version=3 # Upstream have not yet released so its based on a git snapshot from: # # https://github.com/Windows-Azure/WALinuxAgent # # See the get-packaged-orig-source target in debian/rules for more # information. debian/changelog0000664000000000000000000001727712321574544011067 0ustar walinuxagent (2.0.4-0ubuntu2) trusty; urgency=low * Fix for broken sshd configuration (LP: #1305418) - Change modification of sshd_config to address lack of newline at EOF -- Ben Howard Thu, 10 Apr 2014 14:04:44 -0600 walinuxagent (2.0.4-0ubuntu1) trusty; urgency=medium * Update to latest upstream version 2.0.4 (LP: #1304023). - Includes ability for agent injection. -- Ben Howard Mon, 07 Apr 2014 16:48:16 -0600 walinuxagent (2.0.3-0ubuntu2) trusty; urgency=low * Change /etc/dhcp/dhclient.conf 'send host-name' during post-inst to fix snapshotting instances (LP: #1268050). -- Ben Howard Tue, 18 Mar 2014 17:14:41 -0600 walinuxagent (2.0.3-0ubuntu1) trusty; urgency=low * Update to latest upstream version 2.0.3 (LP: #1249052). - use python-setuptools to do installation, dropping the {pre,post}insts. - dropped the walinuxagent-datasaver packages as no longer needed. - use packaged default configuration file by default. * Rebased relevant patches from 1.3.x: - debian/patches/disable_provisioning.patch: disable provisioning features infavor of WALinuxAgent cloud-init support. - debian/patches/disable-udev-rules.patch: disable UDEV rule mangling * Include default Cloud-init configuration - configures Cloud-init to use the default Azure Datasource. -- Ben Howard Fri, 14 Feb 2014 11:55:14 -0700 walinuxagent (1.3.2-0ubuntu8) trusty; urgency=low * debian/patches/idns_dhcp.patch: only change send-hostname in dhcpclient.conf when send-hostname is already in the config (LP: #1268050). -- Ben Howard Wed, 15 Jan 2014 13:02:30 -0700 walinuxagent (1.3.2-0ubuntu7) trusty; urgency=low * debian/rules: Update for new upstream location. * debian/control: Updated the standards version from 3.9.3 to 3.9.4 * updated the description on walinuxagent-datasaver (LP: #1266545) -- Ben Howard Wed, 08 Jan 2014 14:11:13 -0700 walinuxagent (1.3.2-0ubuntu5) saucy; urgency=low * disable ephemeral disk formating by default (LP: #1231490) -- Ben Howard Thu, 26 Sep 2013 08:21:35 -0600 walinuxagent (1.3.2-0ubuntu4) saucy; urgency=low * debian/patches/shadow_permissions.patch: apply the appropriate permissions to /etc/shadow (LP: #1188820). * debian/patches/verbose_logging.patch: use the appropriate log faculty when using verbose logging (LP: #1193404). * Mark bugs fixed in 1.3.2-0ubuntu3: debian/patches/config_for_cloud-init.patch: - fix for race condition between cloud-init and waagent (LP: #1195524) - mount resource disk on /mnt (LP: #1193380) - move walinuxagent init functionality to cloud-init (LP: #1037723) -- Ben Howard Tue, 23 Jul 2013 09:43:40 -0600 walinuxagent (1.3.2-0ubuntu3) saucy; urgency=low [ Ben Howard ] * debian/patches/config_for_cloud-init.patch: Modified configuration to disable provisioning functions. walinuxagent for Ubuntu should now be used with Cloud-init. * debian/postinst: Don't overwrite existing /etc/waagent.conf agent configuration on install or upgrade. * debian/upstart: start later in boot, avoiding race conditions with cloud-init. [ Scott Moser ] * debian: wrap and sort directory * debian/patches/no_udev_rule_removal.patch: remove 000 prefix in file name. No need for numbering in filenames when we have patches/series. -- Scott Moser Thu, 11 Jul 2013 17:31:05 -0400 walinuxagent (1.3.2-0ubuntu2) saucy; urgency=low * Added logic to prevent udev rules.d movement (LP: #1188753) -- Ben Howard Tue, 11 Jun 2013 14:09:58 -0600 walinuxagent (1.3.2-0ubuntu1) raring; urgency=low * Updated to 1.3.2 as part of Windows Azure requirement (LP: #1158465). * Upstream now supports packaging; incorporated upstream packaging into Ubuntu Packaging. -- Ben Howard Thu, 21 Mar 2013 12:57:08 -0600 walinuxagent (1.3-0ubuntu2) raring; urgency=low * Changed detection of whether or not agent is packaged to using dpkg command. (LP: #1111690) -- Ben Howard Thu, 31 Jan 2013 11:42:39 -0700 walinuxagent (1.3-0ubuntu1) raring; urgency=low * New upstream version (LP: #1101371) - Add some error checking and robustness to DVD mounting operation during provisioning - Remove redundant check for IP and Port in LoadBalancerProbe - Add check to self.computername to detect empty hostname in configuration - Fix manual uninstall on Ubuntu * Modified walinuxagent to recognize when its been packaged. -- Ben Howard Fri, 18 Jan 2013 15:43:08 -0700 walinuxagent (1.2-0ubuntu1) raring; urgency=low * New upstream version (LP: #1077148) * Upstream features: - Added - load ata_piix.ko module loaded if needed for CDROM device support - Additional logging for DoDhcpWork() - Update sock.recv timeout from 30 to 10 seconds - Fix: Linux waagent deprovision, user is not deleted properly - Fix: Make LBProbeResponder construction more robust - Fix: Agent fails to provision user with public/private key pairs - Fix: DHCP broadcast response not received - Fix: Linux agent fails to delete root user password - Fix: Linux agent should report error messages to Fabric when passed an invalid hostname. * Dropped Ubuntu specific patches - Removed debian/patches/000_resolv-conf.patch as upstream now supports resolvconf properly. - Removed debian/patches/001-strip-init-d.patch as redundant now that upstream understands Ubuntu upstart. Upstream script does not handle the removal of the upstart job anyway. * Added debian/patches/000_use_package_upstart.patch to use packaged upstart job over in-script upstart. -- Ben Howard Fri, 07 Dec 2012 16:52:42 -0700 walinuxagent (1.1-0ubuntu2) raring; urgency=low * Stop upgrades purging walinuxagent meta-data and configuration files (LP: #1079897): - d/{control,walinuxagent-data-saver.preinst}: Added walinuxagent-data-saver package to ensure that agent generated data is not lost on upgrade by diverting /usr/sbin/waagent during the upgrade process. - d/walinuxagent-data-saver.lintian-overrides: Override errors about use of dpkg-divert in this package. - d/control: Added Pre-Depends to walinuxagent on walinuxagent-data-saver. - d/prerm: Stop calling waagent --uninstall during reconfiguration and upgrade, specify files to remove manually for purge. - d/postinst: Remove divert of /usr/sbin/waagent prior to completion of package install. * d/preinst: If upgrading from package version with unmanaged waagent upstart configuration stop the agent and remove the upstart configuration. * d/upstart: Tidied description in upstart job. -- James Page Fri, 23 Nov 2012 16:07:41 +0000 walinuxagent (1.1-0ubuntu1) raring; urgency=low * New upstream version (LP: #1078074, #1077147). * Moved upstart job to be managed by packaging. -- Ben Howard Wed, 14 Nov 2012 10:59:37 -0700 walinuxagent (1.0~git20120606.c16f5e9-0ubuntu2) quantal; urgency=low * Restrict target architectures to i386 and amd64. -- James Page Mon, 06 Aug 2012 10:24:07 +0100 walinuxagent (1.0~git20120606.c16f5e9-0ubuntu1) quantal; urgency=low * Initial package import (LP: #1014864). * Ubuntu specific modifications: - Made resolvconf aware during deprovisioning - Added Ubuntu upstart job - Added ability to prevent agent startup. -- Ben Howard Fri, 22 Jun 2012 09:10:22 -0600 debian/compat0000664000000000000000000000000212321574500010365 0ustar 8 debian/control0000664000000000000000000000170312321574500010573 0ustar Source: walinuxagent Section: python Priority: extra Maintainer: Ben Howard XSBC-Original-Maintainer: Microsoft Corporation Build-Depends: debhelper (>= 8), python-all, python-setuptools Standards-Version: 3.9.4 XS-Python-Version: all Homepage: http://go.microsoft.com/fwlink/?LinkId=250998 Package: walinuxagent Architecture: amd64 i386 Depends: cloud-init (>=0.7.3~bzr826-0ubuntu2), linux-image-extra-virtual, openssh-server (>=1:5.9p1), openssl (>=1.0), passwd (>=4.1.4.2), python (>= 2.4), util-linux (>=2.0), ${misc:Depends}, ${python:Depends} Conflicts: network-manager Description: Windows Azure Linux Agent 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. debian/copyright0000664000000000000000000000132612321574500011124 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: walinuxagent Upstream-Contact: Microsoft Corporation Source: https://github.com/Windows-Azure/WALinuxAgent/ Files: * Copyright: 2012, Microsoft Corporation License: Apache-2.0 Files: waaagent Copyright: 2012, Microsoft Corporation 2012, Ben Howard License: Apache-2.0 Files: debian/* Copyright: 2012, Ben Howard License: Apache-2.0 License: Apache-2.0 On Debian systems, the complete text of the Apache version 2.0 license can be found in "/usr/share/common-licenses/Apache-2.0". debian/default0000664000000000000000000000013012321574500010530 0ustar # To disable the Windows Azure Agent, set WALINUXAGENT_ENABLED=0 WALINUXAGENT_ENABLED=1 debian/dirs0000664000000000000000000000003412321574500010050 0ustar /usr/share/doc/walinuxagent debian/docs0000664000000000000000000000003612321574500010041 0ustar NOTICE LICENSE-2.0.txt README debian/install0000664000000000000000000000006112321574500010555 0ustar config/91_walinuxagent.cfg etc/cloud/cloud.cfg.d debian/postinst0000664000000000000000000000030312321574500010771 0ustar #!/bin/sh set -e if [ "$1" = "configure" ]; then # fix for LP: 1268050 sed -i 's|^send host-name "";|send host-name = gethostname();|g' /etc/dhcp/dhclient.conf fi #DEBHELPER# debian/rules0000775000000000000000000000056712321574500010257 0ustar #!/usr/bin/make -f DEB_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p') ORIG_SRC=https://github.com/WindowsAzure/WALinuxAgent get-packaged-orig-source: git clone --separate-git-dir=.git \ $(ORIG_SRC) orig_source git archive --format=tar.gz WALinuxAgent-$(DEB_VERSION) \ -o walinuxagent_$(DEB_VERSION).orig.tar.gz %: dh $@ --with python2 debian/upstart0000664000000000000000000000071712321574500010621 0ustar description "Windows Azure Linux agent" author "Ben Howard " start on runlevel [2345] stop on runlevel [!2345] pre-start script [ -r /etc/default/walinuxagent ] && . /etc/default/walinuxagent if [ "$WALINUXAGENT_ENABLED" != "1" ]; then stop ; exit 0 fi if [ ! -x /usr/sbin/waagent ]; then stop ; exit 0 fi #Load the udf module modprobe -b udf end script exec /usr/sbin/waagent -daemon debian/waagent.conf0000664000000000000000000000332012321574500011462 0ustar # # Windows Azure Linux Agent Configuration # This configuration is modified to work with Cloud-init # Role.StateConsumer=None # Specified program is invoked with "Ready" or "Shutdown". # Shutdown will be initiated only after the program returns. Windows Azure will # power off the VM if shutdown is not completed within ?? minutes. Role.ConfigurationConsumer=None # Specified program is invoked with XML file argument specifying role configuration. Role.TopologyConsumer=None # Specified program is invoked with XML file argument specifying role topology. Provisioning.Enabled=n # Provisioning.DeleteRootPassword=n # Password authentication for root account will be unavailable. Provisioning.RegenerateSshHostKeyPair=n # Generate fresh host key pair. Provisioning.SshHostKeyPairType=rsa # Supported values are "rsa", "dsa" and "ecdsa". Provisioning.MonitorHostName=n # Monitor host name changes and publish changes via DHCP requests. ResourceDisk.Format=n # Format if unformatted. If 'n', resource disk will not be mounted. ResourceDisk.Filesystem=ext4 # ResourceDisk.MountPoint=/mnt # ResourceDisk.EnableSwap=n # Create and use swapfile on resource disk. ResourceDisk.SwapSizeMB=0 # Size of the swapfile. LBProbeResponder=y # Respond to load balancer probes if requested by Windows Azure. Logs.Verbose=n # OS.RootDeviceScsiTimeout=300 # Root device timeout in seconds. OS.OpensslPath=None # If "None", the system default version is used.