From 655fb09c16cfa164fb4f47c0107c1d6fece36e96 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Thu, 11 Jul 2013 17:31:05 -0400 Subject: Import patches-unapplied version 1.3.2-0ubuntu3 to ubuntu/saucy-proposed Imported using git-ubuntu import. Changelog parent: 6cf5a13dd65bc0abf70a3874f11d5b61b26dce2b New changelog entries: [ 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. --- debian/changelog | 18 ++++++++++++ debian/control | 11 +++---- debian/patches/000_no_udev_rule_removal.patch | 42 --------------------------- debian/patches/config_for_cloud-init.patch | 36 +++++++++++++++++++++++ debian/patches/no_udev_rule_removal.patch | 42 +++++++++++++++++++++++++++ debian/patches/series | 3 +- debian/postinst | 10 +++++++ debian/upstart | 2 +- 8 files changed, 115 insertions(+), 49 deletions(-) delete mode 100644 debian/patches/000_no_udev_rule_removal.patch create mode 100644 debian/patches/config_for_cloud-init.patch create mode 100644 debian/patches/no_udev_rule_removal.patch diff --git a/debian/changelog b/debian/changelog index a183fc7..62edfb2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +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) diff --git a/debian/control b/debian/control index a49d3d0..7d2ac0f 100644 --- a/debian/control +++ b/debian/control @@ -9,14 +9,15 @@ XS-Python-Version: all Homepage: http://go.microsoft.com/fwlink/?LinkId=250998 Package: walinuxagent -Architecture: i386 amd64 +Architecture: amd64 i386 Pre-Depends: walinuxagent-data-saver (= ${binary:Version}) -Depends: python (>= 2.4), - openssl (>=1.0), +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), - linux-image-extra-virtual, ${misc:Depends}, ${python:Depends} Conflicts: network-manager @@ -26,7 +27,7 @@ Description: Windows Azure Linux Agent disk images that are built to run in the Windows Azure environment. Package: walinuxagent-data-saver -Architecture: i386 amd64 +Architecture: amd64 i386 Depends: ${misc:Depends} Description: Helper package which ensures safe upgrade for walinuxagent Early versions of walinuxagent contained a bug the deleted configuration and diff --git a/debian/patches/000_no_udev_rule_removal.patch b/debian/patches/000_no_udev_rule_removal.patch deleted file mode 100644 index 40a10d0..0000000 --- a/debian/patches/000_no_udev_rule_removal.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/waagent -+++ b/waagent -@@ -701,12 +701,13 @@ class EnvMonitor(object): - dhcpcmd = "pidof dhclient3" - dhcppid = RunGetOutput(dhcpcmd,chk_err=False)[1] - while not self.shutdown: -- for a in RulesFiles: -- if os.path.isfile(a): -- if os.path.isfile(GetLastPathElement(a)): -- os.remove(GetLastPathElement(a)) -- shutil.move(a, ".") -- Log("EnvMonitor: Moved " + a + " -> " + LibDir) -+ if not IsDebian(): -+ for a in RulesFiles: -+ if os.path.isfile(a): -+ if os.path.isfile(GetLastPathElement(a)): -+ os.remove(GetLastPathElement(a)) -+ shutil.move(a, ".") -+ Log("EnvMonitor: Moved " + a + " -> " + LibDir) - if publish != None and publish.lower().startswith("y"): - try: - if socket.gethostname() != self.HostName: -@@ -2318,12 +2319,13 @@ def Install(): - if UsesDpkg() and not Run("dpkg-query -s network-manager >/dev/null 2>&1",chk_err=False): # We want this to fail - supress error logging on error. - Error(GuestAgentLongName + " is not compatible with network-manager.") - return 1 -- for a in RulesFiles: -- if os.path.isfile(a): -- if os.path.isfile(GetLastPathElement(a)): -- os.remove(GetLastPathElement(a)) -- shutil.move(a, ".") -- Warn("Moved " + a + " -> " + LibDir + "/" + GetLastPathElement(a) ) -+ if not IsDebian(): -+ for a in RulesFiles: -+ if os.path.isfile(a): -+ if os.path.isfile(GetLastPathElement(a)): -+ os.remove(GetLastPathElement(a)) -+ shutil.move(a, ".") -+ Warn("Moved " + a + " -> " + LibDir + "/" + GetLastPathElement(a) ) - - if IsUbuntu() and not IsPackagedUbuntu(): - # Support for Ubuntu's upstart configuration diff --git a/debian/patches/config_for_cloud-init.patch b/debian/patches/config_for_cloud-init.patch new file mode 100644 index 0000000..19fddad --- /dev/null +++ b/debian/patches/config_for_cloud-init.patch @@ -0,0 +1,36 @@ +Description: Disable provisioning components in config + This disables the provisioning components of walinux-agent. + Cloud-init in newest versions can provide these same services. +Author: Ben Howard +Last-Update: 2013-07-11 +--- a/waagent ++++ b/waagent +@@ -2222,6 +2222,7 @@ exit 0 + WaagentConf = """\ + # + # 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". +@@ -2230,15 +2231,15 @@ Role.StateConsumer=None + 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=y # +-Provisioning.DeleteRootPassword=y # Password authentication for root account will be unavailable. +-Provisioning.RegenerateSshHostKeyPair=y # Generate fresh host key pair. ++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=y # Monitor host name changes and publish changes via DHCP requests. ++Provisioning.MonitorHostName=n # Monitor host name changes and publish changes via DHCP requests. + + ResourceDisk.Format=y # Format if unformatted. If 'n', resource disk will not be mounted. + ResourceDisk.Filesystem=ext4 # +-ResourceDisk.MountPoint=/mnt/resource # ++ResourceDisk.MountPoint=/mnt # + ResourceDisk.EnableSwap=n # Create and use swapfile on resource disk. + ResourceDisk.SwapSizeMB=0 # Size of the swapfile. + diff --git a/debian/patches/no_udev_rule_removal.patch b/debian/patches/no_udev_rule_removal.patch new file mode 100644 index 0000000..40a10d0 --- /dev/null +++ b/debian/patches/no_udev_rule_removal.patch @@ -0,0 +1,42 @@ +--- a/waagent ++++ b/waagent +@@ -701,12 +701,13 @@ class EnvMonitor(object): + dhcpcmd = "pidof dhclient3" + dhcppid = RunGetOutput(dhcpcmd,chk_err=False)[1] + while not self.shutdown: +- for a in RulesFiles: +- if os.path.isfile(a): +- if os.path.isfile(GetLastPathElement(a)): +- os.remove(GetLastPathElement(a)) +- shutil.move(a, ".") +- Log("EnvMonitor: Moved " + a + " -> " + LibDir) ++ if not IsDebian(): ++ for a in RulesFiles: ++ if os.path.isfile(a): ++ if os.path.isfile(GetLastPathElement(a)): ++ os.remove(GetLastPathElement(a)) ++ shutil.move(a, ".") ++ Log("EnvMonitor: Moved " + a + " -> " + LibDir) + if publish != None and publish.lower().startswith("y"): + try: + if socket.gethostname() != self.HostName: +@@ -2318,12 +2319,13 @@ def Install(): + if UsesDpkg() and not Run("dpkg-query -s network-manager >/dev/null 2>&1",chk_err=False): # We want this to fail - supress error logging on error. + Error(GuestAgentLongName + " is not compatible with network-manager.") + return 1 +- for a in RulesFiles: +- if os.path.isfile(a): +- if os.path.isfile(GetLastPathElement(a)): +- os.remove(GetLastPathElement(a)) +- shutil.move(a, ".") +- Warn("Moved " + a + " -> " + LibDir + "/" + GetLastPathElement(a) ) ++ if not IsDebian(): ++ for a in RulesFiles: ++ if os.path.isfile(a): ++ if os.path.isfile(GetLastPathElement(a)): ++ os.remove(GetLastPathElement(a)) ++ shutil.move(a, ".") ++ Warn("Moved " + a + " -> " + LibDir + "/" + GetLastPathElement(a) ) + + if IsUbuntu() and not IsPackagedUbuntu(): + # Support for Ubuntu's upstart configuration diff --git a/debian/patches/series b/debian/patches/series index 92e4a67..939d7ef 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ -000_no_udev_rule_removal.patch +no_udev_rule_removal.patch +config_for_cloud-init.patch diff --git a/debian/postinst b/debian/postinst index 20aaccd..aeb33d8 100644 --- a/debian/postinst +++ b/debian/postinst @@ -7,7 +7,17 @@ fi case "$1" in configure) + + if [ -e /etc/waagent.conf ]; then + mv /etc/waagent.conf /etc/waagent.conf.save + fi + waagent --setup --force + + if [ -e /etc/waagent.conf.save ]; then + mv /etc/waagent.conf /etc/waagent.conf.dpkg-dist + mv /etc/waagent.conf.save /etc/waagent.conf + fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/upstart b/debian/upstart index 780f19d..4ba35bc 100644 --- a/debian/upstart +++ b/debian/upstart @@ -1,7 +1,7 @@ description "Windows Azure Linux agent" author "Ben Howard " -start on mounted MOUNTPOINT=/ +start on runlevel [2345] stop on runlevel [!2345] pre-start script -- cgit v1.2.3 From 28b32f09c2a433d174ceea652d0565cc923bcc5b Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Thu, 11 Jul 2013 17:31:05 -0400 Subject: no_udev_rule_removal.patch No DEP3 Subject or Description header found Gbp-Pq: no_udev_rule_removal.patch. --- waagent | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/waagent b/waagent index 4181eca..cb077b4 100644 --- a/waagent +++ b/waagent @@ -701,12 +701,13 @@ class EnvMonitor(object): dhcpcmd = "pidof dhclient3" dhcppid = RunGetOutput(dhcpcmd,chk_err=False)[1] while not self.shutdown: - for a in RulesFiles: - if os.path.isfile(a): - if os.path.isfile(GetLastPathElement(a)): - os.remove(GetLastPathElement(a)) - shutil.move(a, ".") - Log("EnvMonitor: Moved " + a + " -> " + LibDir) + if not IsDebian(): + for a in RulesFiles: + if os.path.isfile(a): + if os.path.isfile(GetLastPathElement(a)): + os.remove(GetLastPathElement(a)) + shutil.move(a, ".") + Log("EnvMonitor: Moved " + a + " -> " + LibDir) if publish != None and publish.lower().startswith("y"): try: if socket.gethostname() != self.HostName: @@ -2318,12 +2319,13 @@ def Install(): if UsesDpkg() and not Run("dpkg-query -s network-manager >/dev/null 2>&1",chk_err=False): # We want this to fail - supress error logging on error. Error(GuestAgentLongName + " is not compatible with network-manager.") return 1 - for a in RulesFiles: - if os.path.isfile(a): - if os.path.isfile(GetLastPathElement(a)): - os.remove(GetLastPathElement(a)) - shutil.move(a, ".") - Warn("Moved " + a + " -> " + LibDir + "/" + GetLastPathElement(a) ) + if not IsDebian(): + for a in RulesFiles: + if os.path.isfile(a): + if os.path.isfile(GetLastPathElement(a)): + os.remove(GetLastPathElement(a)) + shutil.move(a, ".") + Warn("Moved " + a + " -> " + LibDir + "/" + GetLastPathElement(a) ) if IsUbuntu() and not IsPackagedUbuntu(): # Support for Ubuntu's upstart configuration -- cgit v1.2.3 From 696344edbc4808f57254af3f890896501af5db6b Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Thu, 11 Jul 2013 17:31:05 -0400 Subject: Disable provisioning components in config Gbp-Pq: config_for_cloud-init.patch. --- waagent | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/waagent b/waagent index cb077b4..980157d 100644 --- a/waagent +++ b/waagent @@ -2222,6 +2222,7 @@ exit 0 WaagentConf = """\ # # 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". @@ -2230,15 +2231,15 @@ Role.StateConsumer=None # Specified program is invoked with "Rea 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=y # -Provisioning.DeleteRootPassword=y # Password authentication for root account will be unavailable. -Provisioning.RegenerateSshHostKeyPair=y # Generate fresh host key pair. +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=y # Monitor host name changes and publish changes via DHCP requests. +Provisioning.MonitorHostName=n # Monitor host name changes and publish changes via DHCP requests. ResourceDisk.Format=y # Format if unformatted. If 'n', resource disk will not be mounted. ResourceDisk.Filesystem=ext4 # -ResourceDisk.MountPoint=/mnt/resource # +ResourceDisk.MountPoint=/mnt # ResourceDisk.EnableSwap=n # Create and use swapfile on resource disk. ResourceDisk.SwapSizeMB=0 # Size of the swapfile. -- cgit v1.2.3