diff options
author | Ben Howard <ben.howard@ubuntu.com> | 2014-02-14 11:55:14 -0700 |
---|---|---|
committer | usd-importer <ubuntu-server@lists.ubuntu.com> | 2014-02-17 18:03:31 +0000 |
commit | 3e535e3f3b9b1e44ed9e2394821a4f4799c8245b (patch) | |
tree | 83c66978db367943a2f8fe17b6921ad894c40b1f /debian/patches | |
parent | b10340ae4082fc4904a41f90d4b4e6d2179ef2ff (diff) | |
download | vyos-walinuxagent-3e535e3f3b9b1e44ed9e2394821a4f4799c8245b.tar.gz vyos-walinuxagent-3e535e3f3b9b1e44ed9e2394821a4f4799c8245b.zip |
Import patches-unapplied version 2.0.3-0ubuntu1 to ubuntu/trusty-proposed
Imported using git-ubuntu import.
Changelog parent: b10340ae4082fc4904a41f90d4b4e6d2179ef2ff
New changelog entries:
* 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.
* Include patches from 1.3.x series
- 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
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/cloud-init-default-cfg.patch | 6 | ||||
-rw-r--r-- | debian/patches/config_for_cloud-init.patch | 36 | ||||
-rw-r--r-- | debian/patches/disable-udev-rules.patch | 17 | ||||
-rw-r--r-- | debian/patches/disable_disk_formating.patch | 16 | ||||
-rw-r--r-- | debian/patches/disable_provisioning.patch | 54 | ||||
-rw-r--r-- | debian/patches/fixup_setup_file.patch | 11 | ||||
-rw-r--r-- | debian/patches/idns_dhcp.patch | 44 | ||||
-rw-r--r-- | debian/patches/no_udev_rule_removal.patch | 42 | ||||
-rw-r--r-- | debian/patches/series | 10 | ||||
-rw-r--r-- | debian/patches/shadow_permissions.patch | 15 | ||||
-rw-r--r-- | debian/patches/verbose_logging.patch | 16 |
11 files changed, 92 insertions, 175 deletions
diff --git a/debian/patches/cloud-init-default-cfg.patch b/debian/patches/cloud-init-default-cfg.patch new file mode 100644 index 0000000..53d38fc --- /dev/null +++ b/debian/patches/cloud-init-default-cfg.patch @@ -0,0 +1,6 @@ +--- /dev/null ++++ b/config/91_walinuxagent.cfg +@@ -0,0 +1,3 @@ ++# This configuration file is provided by the WALinuxAgent package. ++datasource_list: [ Azure ] ++ diff --git a/debian/patches/config_for_cloud-init.patch b/debian/patches/config_for_cloud-init.patch deleted file mode 100644 index 19fddad..0000000 --- a/debian/patches/config_for_cloud-init.patch +++ /dev/null @@ -1,36 +0,0 @@ -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/disable-udev-rules.patch b/debian/patches/disable-udev-rules.patch new file mode 100644 index 0000000..ba96a2d --- /dev/null +++ b/debian/patches/disable-udev-rules.patch @@ -0,0 +1,17 @@ +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 +@@ -87,8 +87,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 diff --git a/debian/patches/disable_disk_formating.patch b/debian/patches/disable_disk_formating.patch deleted file mode 100644 index feef91b..0000000 --- a/debian/patches/disable_disk_formating.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: Disable disk formatting/mounting of ephemeral storage - Disabling this code segment as redundant with Cloud Init -Bug: https://bugs.launchpad.net/ubuntu/+bug/1231490 -Author: Ben Howard -Last-Update: 2013-09-26 ---- a/waagent -+++ b/waagent -@@ -2237,7 +2237,7 @@ Provisioning.RegenerateSshHostKeyPair=n - 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=y # Format if unformatted. If 'n', resource disk will not be mounted. -+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. diff --git a/debian/patches/disable_provisioning.patch b/debian/patches/disable_provisioning.patch new file mode 100644 index 0000000..02a90cb --- /dev/null +++ b/debian/patches/disable_provisioning.patch @@ -0,0 +1,54 @@ +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 diff --git a/debian/patches/fixup_setup_file.patch b/debian/patches/fixup_setup_file.patch new file mode 100644 index 0000000..17a29b9 --- /dev/null +++ b/debian/patches/fixup_setup_file.patch @@ -0,0 +1,11 @@ +--- 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): diff --git a/debian/patches/idns_dhcp.patch b/debian/patches/idns_dhcp.patch deleted file mode 100644 index 8db58c1..0000000 --- a/debian/patches/idns_dhcp.patch +++ /dev/null @@ -1,44 +0,0 @@ -Description: Don't send hostname in dhcp - On cloud-init provisioned hosts, the hostname is not put in - the dhcp client configuration. If a person runs '--deprovision', takes a - snapshot and attempts to start the snapshot, the host will fail to - register itself with iDNS. - . - Cherry picked fix from upstream - https://github.com/WindowsAzure/WALinuxAgent/commit/375f1ede38fd323c2560e7e21ba99ac50bc66acd -Bug: https://bugs.launchpad.net/ubuntu/+bug/1268050 -Author: Ben Howard -Last-Update: 2013-09-26 ---- a/waagent -+++ b/waagent -@@ -211,6 +211,21 @@ - return line - return None - -+def FindStringInFile(fname,matchs): -+ """ -+ Return match object if found in file. -+ """ -+ try: -+ ms=re.compile(matchs) -+ for l in (open(fname,'r')).readlines(): -+ m=re.search(ms,l) -+ if m: -+ return m -+ except: -+ raise -+ -+ return None -+ - def Run(cmd,chk_err=True): - retcode,out=RunGetOutput(cmd,chk_err) - return retcode -@@ -1435,7 +1450,7 @@ - SetFileContents("/etc/hostname", name) - - for filepath in EtcDhcpClientConfFiles: -- if os.path.isfile(filepath): -+ if os.path.isfile(filepath) and FindStringInFile(filepath,r'^[^#]*?send\s*host-name.*?(<hostname>|gethostname[(,)])') == None : - ReplaceFileContentsAtomic(filepath, "send host-name \"" + name + "\";\n" - + "\n".join(filter(lambda a: not a.startswith("send host-name"), GetFileContents(filepath).split('\n')))) - diff --git a/debian/patches/no_udev_rule_removal.patch b/debian/patches/no_udev_rule_removal.patch deleted file mode 100644 index 40a10d0..0000000 --- a/debian/patches/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/series b/debian/patches/series index 7bed91d..5879858 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,4 @@ -no_udev_rule_removal.patch -config_for_cloud-init.patch -verbose_logging.patch -shadow_permissions.patch -disable_disk_formating.patch -idns_dhcp.patch +disable-udev-rules.patch +disable_provisioning.patch +fixup_setup_file.patch +cloud-init-default-cfg.patch diff --git a/debian/patches/shadow_permissions.patch b/debian/patches/shadow_permissions.patch deleted file mode 100644 index d6731e4..0000000 --- a/debian/patches/shadow_permissions.patch +++ /dev/null @@ -1,15 +0,0 @@ -Description: Use the proper permissions on /etc/shadow (LP: #1188820). -Bug: https://bugs.launchpad.net/ubuntu/+source/walinuxagent/+bug/1188820 -Author: Ben Howard -Last-Update: 2013-07-23 ---- a/waagent -+++ b/waagent -@@ -2423,7 +2423,7 @@ def DeleteRootPassword(): - ReplaceFileContentsAtomic(filepath, "root:*LOCK*:14600::::::\n" + "\n".join(filter(lambda a: not - a.startswith("root:"), - GetFileContents(filepath).split('\n')))) -- os.chmod(filepath, 0000) -+ os.chmod(filepath, 0640) - if IsRedHat(): - Run("chcon system_u:object_r:shadow_t:s0 " + filepath) - Log("Root password deleted.") diff --git a/debian/patches/verbose_logging.patch b/debian/patches/verbose_logging.patch deleted file mode 100644 index 23422eb..0000000 --- a/debian/patches/verbose_logging.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: Use the proper log faculty for verbose logging (LP: #1193404). -Bug: https://bugs.launchpad.net/ubuntu/+source/walinuxagent/+bug/1193404 -Author: Ben Howard -Last-Update: 2013-07-23 - ---- a/waagent -+++ b/waagent -@@ -456,7 +456,7 @@ def NoLog(message): - - def LogIfVerbose(message): - if Verbose == True: -- LogFileWithPrefix('',message) -+ LogWithPrefix('',message) - - def LogWithPrefixIfVerbose(prefix, message): - if Verbose == True: |