diff --git a/SOURCES/cloud-init-centos-cloudstack-urlhandling.patch b/SOURCES/cloud-init-centos-cloudstack-urlhandling.patch new file mode 100644 index 0000000..c63d84b --- /dev/null +++ b/SOURCES/cloud-init-centos-cloudstack-urlhandling.patch @@ -0,0 +1,18 @@ +diff -uNr cloud-init-0.7.5__orig/cloudinit/url_helper.py cloud-init-0.7.5/cloudinit/url_helper.py +--- cloud-init-0.7.5__orig/cloudinit/url_helper.py 2014-04-01 19:26:07.000000000 +0100 ++++ cloud-init-0.7.5/cloudinit/url_helper.py 2014-08-29 11:21:04.347660108 +0100 +@@ -237,6 +237,14 @@ + return UrlResponse(r) + except exceptions.RequestException as e: + if (isinstance(e, (exceptions.HTTPError)) ++ # CloudStack workaround to handle trailing slash (#7544) ++ if e.response.status_code == 404: ++ if url.endswith("/"): ++ url = url[:-1] ++ req_args["url"] = url ++ else: ++ url = url + "/" ++ req_args["url"] = url + and hasattr(e, 'response') # This appeared in v 0.10.8 + and hasattr(e.response, 'status_code')): + excps.append(UrlError(e, code=e.response.status_code, diff --git a/SOURCES/cloud-init-centos-opennebula-requiretty.patch b/SOURCES/cloud-init-centos-opennebula-requiretty.patch new file mode 100644 index 0000000..744be79 --- /dev/null +++ b/SOURCES/cloud-init-centos-opennebula-requiretty.patch @@ -0,0 +1,13 @@ +diff -uNr cloud-init-0.7.5__orig/cloudinit/sources/DataSourceOpenNebula.py cloud-init-0.7.5/cloudinit/sources/DataSourceOpenNebula.py +--- cloud-init-0.7.5__orig/cloudinit/sources/DataSourceOpenNebula.py 2014-08-29 11:01:19.817660822 +0100 ++++ cloud-init-0.7.5/cloudinit/sources/DataSourceOpenNebula.py 2014-08-29 11:02:19.641660786 +0100 +@@ -288,8 +288,7 @@ + + + def switch_user_cmd(user): +- return ['sudo', '-u', user] +- ++ return ['runuser', '-u', user, '--'] + + def parse_shell_config(content, keylist=None, bash=None, asuser=None, + switch_user_cb=None): diff --git a/SPECS/cloud-init.spec b/SPECS/cloud-init.spec index 5425f56..d43b90b 100644 --- a/SPECS/cloud-init.spec +++ b/SPECS/cloud-init.spec @@ -28,6 +28,8 @@ Patch0004: 0004-fix-typo-in-settings.py-preventing-metadata-being-fe.patch Patch1001: cloud-init-centos-opennebula.patch Patch1002: cloud-init-centos-hostnamefix.patch +Patch1003: cloud-init-centos-opennebula-requiretty.patch +Patch1004: cloud-init-centos-cloudstack-urlhandling.patch # Deal with noarch -> arch # https://bugzilla.redhat.com/show_bug.cgi?id=1067089 @@ -76,6 +78,8 @@ ssh keys and to let the user run various scripts. %patch0004 -p1 %patch1001 -p1 %patch1002 -p1 +%patch1003 -p1 +%patch1004 -p1 cp -p %{SOURCE2} README.rhel @@ -165,14 +169,18 @@ fi %changelog +* Fri Aug 29 2014 Karanbir Singh 0.7.5-2.el7.centos.1 +- Add OpenNebula patch to work with requiretty in sudoers (Jfontan #7543) +- Add cloudstack url workaround patch (Lucian #7544) + * Tue Aug 26 2014 Karanbir Singh 0.7.5-2.el7.centos - Bump ver * Wed Aug 13 2014 Karanbir Singh -- add a patch to fix hostname issues ( Thomas Oulevey ) +- add a patch to fix hostname issues ( Thomas Oulevey #7545) * Tue Jul 29 2014 Karanbir Singh -- Upgrade the opennebula datasource +- Upgrade the opennebula datasource (Jfontan #7543) * Tue Jul 15 2014 Karanbir Singh - default to using centos as the login id