+++ /dev/null
-From a41d602a988d53f469ee5bc6e6269e08557248a1 Mon Sep 17 00:00:00 2001
-From: Jeff Peeler <jpeeler@redhat.com>
-Date: Mon, 14 Oct 2013 14:30:34 -0400
-Subject: [PATCH] remove pbr runtime dependency
-
----
- heat/version.py | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/heat/version.py b/heat/version.py
-index 4a2b021..0758e7e 100644
---- a/heat/version.py
-+++ b/heat/version.py
-@@ -13,6 +13,14 @@
- # under the License.
-
-
--import pbr.version
-+class VersionInfo(object):
-+ release = 'REDHATHEATRELEASE'
-+ version = 'REDHATHEATVERSION'
-
--version_info = pbr.version.VersionInfo('heat')
-+ def version_string(self):
-+ return self.version
-+
-+ def release_string(self):
-+ return self.release
-+
-+version_info = VersionInfo()
+++ /dev/null
-From 58cfa02ab7bf5059721c387e6e2285062ae38fa5 Mon Sep 17 00:00:00 2001
-From: Jeff Peeler <jpeeler@redhat.com>
-Date: Sat, 21 Jun 2014 00:28:04 -0400
-Subject: [PATCH] Add compatability patch to allow smooth migration away from
- M2Crypto
-
-For many releases, Fedora has shipped with the encryption routines
-reimplemented using M2Crypto. We are now aligning with upstream which
-uses PyCrypto. However, we must still allow decryption of existing
-entries in the database, so this patch will remain until at least
-the next release.
----
- heat/common/crypt.py | 43 ++++++++++++++++++++++++++++++-------------
- 1 file changed, 30 insertions(+), 13 deletions(-)
-
-diff --git a/heat/common/crypt.py b/heat/common/crypt.py
-index 0defb10..0c1e14e 100644
---- a/heat/common/crypt.py
-+++ b/heat/common/crypt.py
-@@ -44,20 +44,37 @@ def oslo_decrypt_v1(auth_info):
- return sym.decrypt(cfg.CONF.auth_encryption_key[:32],
- auth_info, b64decode=True)
-
-+#This is here for testing verification purposes related to the comment below
-+#def heat_encrypt(auth_info):
-+# import M2Crypto
-+# from os import urandom
-+# iv = urandom(16)
-+# cipher = M2Crypto.EVP.Cipher(alg='aes_128_cbc', key_as_bytes=False, padding=True,
-+# key=cfg.CONF.auth_encryption_key[:32], iv=iv,
-+# op=1) # 1 is encode
-+# update = cipher.update(auth_info)
-+# final = cipher.final()
-+# res = base64.b64encode(iv + update + final)
-+# return 'heat_decrypt', res
-
- def heat_decrypt(auth_info):
-- """Decrypt function for data that has been encrypted using an older
-- version of Heat.
-- Note: the encrypt function returns the function that is needed to
-- decrypt the data. The database then stores this. When the data is
-- then retrieved (potentially by a later version of Heat) the decrypt
-- function must still exist. So whilst it may seem that this function
-- is not referenced, it will be referenced from the database.
-- """
-+ # This is an AES specific version of oslo decrypt, reimplementing the
-+ # commented out code below. The main differences are a different key size
-+ # and different padding to be compatible with our old m2crypto based
-+ # heat_encrypt. This patch will be dropped in a few releases since once
-+ # people upgrade, the new encrypt method will be used making this
-+ # decryption method no longer necessary.
-+ #sym = utils.SymmetricCrypto()
-+ #return sym.decrypt(cfg.CONF.auth_encryption_key[:16],
-+ # auth_info, b64decode=True)
-+
- if auth_info is None:
- return None
-- auth = base64.b64decode(auth_info)
-- iv = auth[:AES.block_size]
-- cipher = AES.new(cfg.CONF.auth_encryption_key[:32], AES.MODE_CFB, iv)
-- res = cipher.decrypt(auth[AES.block_size:])
-- return res
-+ auth_info = base64.b64decode(auth_info)
-+ iv = auth_info[:AES.block_size]
-+ # Note: MUST send in 16 bytes long key for AES-128
-+ cipher = AES.new(cfg.CONF.auth_encryption_key[:16], AES.MODE_CBC, iv)
-+ padded = cipher.decrypt(auth_info[AES.block_size:])
-+ l = ord(padded[-1])
-+ plain = padded[:-l]
-+ return plain
# patches_base=2014.2.b1
#
-Patch0001: 0001-remove-pbr-runtime-dependency.patch
-Patch0002: 0002-Add-compatability-patch-to-allow-smooth-migration-aw.patch
-
BuildArch: noarch
BuildRequires: git
BuildRequires: python2-devel
BuildRequires: python-oslo-middleware
BuildRequires: python-pbr
BuildRequires: python-d2to1
+BuildRequires: python-oslo-context >= 0.1.0
+
%if 0%{?with_doc}
BuildRequires: python-oslo-i18n >= 1.0.0
BuildRequires: python-oslo-config >= 1.4.0
%prep
%setup -q -n %{full_release}
-%patch0001 -p1
-%patch0002 -p1
sed -i s/REDHATHEATVERSION/%{version}/ heat/version.py
sed -i s/REDHATHEATRELEASE/%{release}/ heat/version.py
Requires: python-migrate >= 0.9.1, python-migrate < 0.9.2, python-migrate > 0.9.2
Requires: python-stevedore >= 1.1.0
Requires: python-webob >= 1.2.3
+Requires: python-oslo-context >= 0.1.0
+
Requires: python-memcached
Requires: m2crypto
- fixed most rpmlint warnings/errors
* Mon Apr 16 2012 Chris Alfonso <calfonso@redhat.com> - 3-1
-- initial openstack package log
+- initial openstack package log
\ No newline at end of file