8bc2e5e
From d1a2fe7307e9cf2251d1f9a666c12d71d3f522d6 Mon Sep 17 00:00:00 2001
8bc2e5e
From: Chad Smith <chad.smith@canonical.com>
8bc2e5e
Date: Sat, 26 Jan 2019 15:06:42 +0000
8bc2e5e
Subject: opennebula: exclude EPOCHREALTIME as known bash env variable with a
8bc2e5e
 delta
8bc2e5e
8bc2e5e
This branch is needed to allow cloud-init to sbuild on Ubuntu Disco.
8bc2e5e
8bc2e5e
OpenNebula:parse_shell_config tries to do a comparison of bash
8bc2e5e
environment values, excluding expected environment variables which
8bc2e5e
are known to change.
8bc2e5e
8bc2e5e
Bash on Ubuntu Disco surfaces a new EPOCHREALTIME environment variable
8bc2e5e
which wasn't in previous bash environments, this var needs to be
8bc2e5e
ignored by parse_shell_config too.
8bc2e5e
8bc2e5e
LP: #1813383
8bc2e5e
8bc2e5e
Index: cloud-init-17.1/cloudinit/sources/DataSourceOpenNebula.py
8bc2e5e
===================================================================
8bc2e5e
--- cloud-init-17.1.orig/cloudinit/sources/DataSourceOpenNebula.py
8bc2e5e
+++ cloud-init-17.1/cloudinit/sources/DataSourceOpenNebula.py
8bc2e5e
@@ -279,7 +279,7 @@ def parse_shell_config(content, keylist=
8bc2e5e
     (output, _error) = util.subp(cmd, data=bcmd)
8bc2e5e
 
8bc2e5e
     # exclude vars in bash that change on their own or that we used
8bc2e5e
-    excluded = ("RANDOM", "LINENO", "SECONDS", "_", "__v")
8bc2e5e
+    excluded = ("EPOCHREALTIME", "RANDOM", "LINENO", "SECONDS", "_", "__v")
8bc2e5e
     preset = {}
8bc2e5e
     ret = {}
8bc2e5e
     target = None