apevec pushed to openstack-glance (master). "Merge --squash rpm-master (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat Apr 25 23:26:43 UTC 2015


>From 5c138e8aa085022d4e3f871f660456dbc78a668b Mon Sep 17 00:00:00 2001
From: Alan Pevec <alan.pevec at redhat.com>
Date: Sun, 26 Apr 2015 01:21:52 +0200
Subject: Merge --squash rpm-master

Conflicts:
	.gitignore
	0001-Don-t-access-the-net-while-building-docs.patch
	0001-Remove-runtime-dep-on-python-pbr.patch
	0003-avoid-unsupported-storage-drivers.patch
	0004-notify-calling-process-we-are-ready-to-serve.patch
	openstack-glance.spec
	sources

Change-Id: I018fe127ad88670057dbfac4ac48fd58344d639f

diff --git a/.gitignore b/.gitignore
index df2a51b..f0b747d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,29 +1 @@
-/glance-2012.2.tar.gz
-/glance-2013.1~g1.tar.gz
-/glance-2013.1~g2.tar.gz
-/glance-2013.1.g3.tar.gz
-/glance-2013.1.rc1.tar.gz
-/glance-2013.1.rc2.tar.gz
-/glance-2013.1.tar.gz
-/glance-2013.1.2.tar.gz
-/glance-2013.2.b1.tar.gz
-/glance-2013.2.b2.tar.gz
-/glance-2013.2.b3.tar.gz
-/glance-2013.2.rc1.tar.gz
-/glance-2013.2.tar.gz
-/glance-2014.1.b1.tar.gz
-/glance-2014.1.b2.tar.gz
-/glance-2014.1.b3.tar.gz
-/glance-2014.1.rc1.tar.gz
-/glance-2014.1.rc2.tar.gz
-/glance-2014.1.tar.gz
-/glance-2014.1.1.tar.gz
-/glance-2014.2.b2.tar.gz
-/glance-2014.2.b3.tar.gz
-/glance-2014.2.rc1.tar.gz
-/glance-2014.2.rc2.tar.gz
-/glance-2014.2.rc3.tar.gz
-/glance-2014.2.tar.gz
-/glance-2014.2.1.tar.gz
-/glance-2014.2.2.tar.gz
-/glance-2014.2.3.tar.gz
+/glance-2015.1.0rc2.tar.gz
diff --git a/0001-Don-t-access-the-net-while-building-docs.patch b/0001-Don-t-access-the-net-while-building-docs.patch
deleted file mode 100644
index f5f3b92..0000000
--- a/0001-Don-t-access-the-net-while-building-docs.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From d344acad455af3f72de7c1e189e1b6929ce9de11 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
-Date: Fri, 6 Jan 2012 17:12:54 +0000
-Subject: [PATCH] Don't access the net while building docs
-
-(Note this hasn't been submitted upstream)
-
-Change-Id: I42c6e3a5062db209a0abe00cebc04d383c79cbcb
-(cherry picked from commit f2b4bb4e45afcc178200966193a7b87401c534d7)
----
- doc/source/conf.py | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/doc/source/conf.py b/doc/source/conf.py
-index 2253323..fb2131e 100644
---- a/doc/source/conf.py
-+++ b/doc/source/conf.py
-@@ -44,7 +44,6 @@ sys.path = [
- # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
- extensions = ['sphinx.ext.coverage',
-               'sphinx.ext.ifconfig',
--              'sphinx.ext.intersphinx',
-               'sphinx.ext.pngmath',
-               'sphinx.ext.graphviz',
-               'oslosphinx',
diff --git a/0002-Remove-runtime-dep-on-python-pbr.patch b/0002-Remove-runtime-dep-on-python-pbr.patch
deleted file mode 100644
index 2a0ddad..0000000
--- a/0002-Remove-runtime-dep-on-python-pbr.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 02134d9179d9d1f99e97c04850c54ddbebf81b4d Mon Sep 17 00:00:00 2001
-From: John Bresnahan <jbresnah at redhat.com>
-Date: Mon, 9 Sep 2013 17:00:28 -1000
-Subject: [PATCH] Remove runtime dep on python pbr
-
----
- glance/version.py | 29 +++++++++++++++++++++++++++--
- 1 file changed, 27 insertions(+), 2 deletions(-)
-
-diff --git a/glance/version.py b/glance/version.py
-index 0172206..ac67472 100644
---- a/glance/version.py
-+++ b/glance/version.py
-@@ -13,6 +13,31 @@
- #    under the License.
- 
- 
--import pbr.version
-+GLANCE_VENDOR = "OpenStack Foundation"
-+GLANCE_PRODUCT = "OpenStack Glance"
-+GLANCE_PACKAGE = None  # OS distro package version suffix
- 
--version_info = pbr.version.VersionInfo('glance')
-+loaded = False
-+
-+
-+class VersionInfo(object):
-+    release = "REDHATGLANCERELEASE"
-+    version = "REDHATGLANCEVERSION"
-+
-+    def version_string(self):
-+        return self.version
-+
-+    def cached_version_string(self):
-+        return self.version
-+
-+    def release_string(self):
-+        return self.release
-+
-+    def canonical_version_string(self):
-+        return self.version
-+
-+    def version_string_with_vcs(self):
-+        return self.release
-+
-+
-+version_info = VersionInfo()
diff --git a/0003-avoid-unsupported-storage-drivers.patch b/0003-avoid-unsupported-storage-drivers.patch
deleted file mode 100644
index cabafa2..0000000
--- a/0003-avoid-unsupported-storage-drivers.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From c61e0ce7cf6b5397e704900cac73a04d87ebaaf3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P at draigBrady.com>
-Date: Wed, 9 Apr 2014 10:31:27 +0100
-Subject: [PATCH] avoid unsupported storage drivers
-
----
- etc/glance-cache.conf | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/etc/glance-cache.conf b/etc/glance-cache.conf
-index 0246b67..04e5623 100644
---- a/etc/glance-cache.conf
-+++ b/etc/glance-cache.conf
-@@ -44,9 +44,7 @@ registry_port = 9191
- #                glance.store.rbd.Store,
- #                glance.store.s3.Store,
- #                glance.store.swift.Store,
--#                glance.store.sheepdog.Store,
- #                glance.store.cinder.Store,
--#                glance.store.vmware_datastore.Store,
- 
- # ============ Filesystem Store Options ========================
- 
diff --git a/0004-notify-calling-process-we-are-ready-to-serve.patch b/0004-notify-calling-process-we-are-ready-to-serve.patch
deleted file mode 100644
index d86217b..0000000
--- a/0004-notify-calling-process-we-are-ready-to-serve.patch
+++ /dev/null
@@ -1,210 +0,0 @@
-From 9a844312e839f911e4f0cf5a3ea55d5810939170 Mon Sep 17 00:00:00 2001
-From: Alan Pevec <apevec at redhat.com>
-Date: Tue, 11 Feb 2014 22:36:00 +0100
-Subject: [PATCH] notify calling process we are ready to serve
-
-Systemd notification should be sent in-process, otherwise systemd might
-miss the subprocess sending notification.
-See systemd bug https://bugzilla.redhat.com/show_bug.cgi?id=820448
-
-Taken from keystone project commit
-abc06716d027d68f0da3b0f559fa7c85a21804d5
-
-Improvements from Keystone version:
-
-    * add unset_environment parameter
-    New parameter unset_environment was added to sd_notify
-    http://www.freedesktop.org/software/systemd/man/sd_notify.html
-    to ensure service readiness is sent only once.
-
-    * add onready() method to simulate systemd environment
-    For testing purposes and optional use with SysV initscripts.
-
-    * unit test added
-
-    * docstrings for notification methods
-
-Patch includes deployment in openstack.common.service.
-It does not have an effect when running the service outside
-the systemd environment.
-
-Implements: blueprint service-readiness
-Change-Id: I80f325c9be9c171c2dc8d5526570bf64f0f87c78
----
- glance/cmd/api.py                  |   2 +
- glance/cmd/registry.py             |   2 +
- glance/cmd/scrubber.py             |   2 +
- glance/openstack/common/systemd.py | 104 +++++++++++++++++++++++++++++++++++++
- 4 files changed, 110 insertions(+)
- create mode 100644 glance/openstack/common/systemd.py
-
-diff --git a/glance/cmd/api.py b/glance/cmd/api.py
-index 557dc3b..3457269 100755
---- a/glance/cmd/api.py
-+++ b/glance/cmd/api.py
-@@ -49,6 +49,7 @@ from glance.common import exception
- from glance.common import wsgi
- from glance import notifier
- from glance.openstack.common import log
-+from glance.openstack.common import systemd
- 
- CONF = cfg.CONF
- CONF.import_group("profiler", "glance.common.wsgi")
-@@ -81,6 +82,7 @@ def main():
- 
-         server = wsgi.Server()
-         server.start(config.load_paste_app('glance-api'), default_port=9292)
-+        systemd.notify_once()
-         server.wait()
-     except exception.WorkerCreationFailure as e:
-         fail(2, e)
-diff --git a/glance/cmd/registry.py b/glance/cmd/registry.py
-index 06cea6a..e0dfbab 100755
---- a/glance/cmd/registry.py
-+++ b/glance/cmd/registry.py
-@@ -44,6 +44,7 @@ from glance.common import config
- from glance.common import wsgi
- from glance import notifier
- from glance.openstack.common import log
-+from glance.openstack.common import systemd
- 
- CONF = cfg.CONF
- CONF.import_group("profiler", "glance.common.wsgi")
-@@ -69,6 +70,7 @@ def main():
-         server = wsgi.Server()
-         server.start(config.load_paste_app('glance-registry'),
-                      default_port=9191)
-+        systemd.notify_once()
-         server.wait()
-     except RuntimeError as e:
-         sys.exit("ERROR: %s" % e)
-diff --git a/glance/cmd/scrubber.py b/glance/cmd/scrubber.py
-index 850a185..38f1c16 100755
---- a/glance/cmd/scrubber.py
-+++ b/glance/cmd/scrubber.py
-@@ -35,6 +35,7 @@ from oslo.config import cfg
- 
- from glance.common import config
- from glance.openstack.common import log
-+from glance.openstack.common import systemd
- from glance import scrubber
- 
- 
-@@ -58,6 +59,7 @@ def main():
-         if CONF.daemon:
-             server = scrubber.Daemon(CONF.wakeup_time)
-             server.start(app)
-+            systemd.notify_once()
-             server.wait()
-         else:
-             import eventlet
-diff --git a/glance/openstack/common/systemd.py b/glance/openstack/common/systemd.py
-new file mode 100644
-index 0000000..47612a9
---- /dev/null
-+++ b/glance/openstack/common/systemd.py
-@@ -0,0 +1,104 @@
-+# Copyright 2012-2014 Red Hat, Inc.
-+#
-+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-+#    not use this file except in compliance with the License. You may obtain
-+#    a copy of the License at
-+#
-+#         http://www.apache.org/licenses/LICENSE-2.0
-+#
-+#    Unless required by applicable law or agreed to in writing, software
-+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-+#    License for the specific language governing permissions and limitations
-+#    under the License.
-+
-+"""
-+Helper module for systemd service readiness notification.
-+"""
-+
-+import os
-+import socket
-+import sys
-+
-+from glance.openstack.common import log as logging
-+
-+
-+LOG = logging.getLogger(__name__)
-+
-+
-+def _abstractify(socket_name):
-+    if socket_name.startswith('@'):
-+        # abstract namespace socket
-+        socket_name = '\0%s' % socket_name[1:]
-+    return socket_name
-+
-+
-+def _sd_notify(unset_env, msg):
-+    notify_socket = os.getenv('NOTIFY_SOCKET')
-+    if notify_socket:
-+        sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
-+        try:
-+            sock.connect(_abstractify(notify_socket))
-+            sock.sendall(msg)
-+            if unset_env:
-+                del os.environ['NOTIFY_SOCKET']
-+        except EnvironmentError:
-+            LOG.debug("Systemd notification failed", exc_info=True)
-+        finally:
-+            sock.close()
-+
-+
-+def notify():
-+    """Send notification to Systemd that service is ready.
-+    For details see
-+      http://www.freedesktop.org/software/systemd/man/sd_notify.html
-+    """
-+    _sd_notify(False, 'READY=1')
-+
-+
-+def notify_once():
-+    """Send notification once to Systemd that service is ready.
-+    Systemd sets NOTIFY_SOCKET environment variable with the name of the
-+    socket listening for notifications from services.
-+    This method removes the NOTIFY_SOCKET environment variable to ensure
-+    notification is sent only once.
-+    """
-+    _sd_notify(True, 'READY=1')
-+
-+
-+def onready(notify_socket, timeout):
-+    """Wait for systemd style notification on the socket.
-+
-+    :param notify_socket: local socket address
-+    :type notify_socket:  string
-+    :param timeout:       socket timeout
-+    :type timeout:        float
-+    :returns:             0 service ready
-+                          1 service not ready
-+                          2 timeout occured
-+    """
-+    sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
-+    sock.settimeout(timeout)
-+    sock.bind(_abstractify(notify_socket))
-+    try:
-+        msg = sock.recv(512)
-+    except socket.timeout:
-+        return 2
-+    finally:
-+        sock.close()
-+    if 'READY=1' in msg:
-+        return 0
-+    else:
-+        return 1
-+
-+
-+if __name__ == '__main__':
-+    # simple CLI for testing
-+    if len(sys.argv) == 1:
-+        notify()
-+    elif len(sys.argv) >= 2:
-+        timeout = float(sys.argv[1])
-+        notify_socket = os.getenv('NOTIFY_SOCKET')
-+        if notify_socket:
-+            retval = onready(notify_socket, timeout)
-+            sys.exit(retval)
diff --git a/openstack-glance.spec b/openstack-glance.spec
index 7aca9d6..e3ba687 100644
--- a/openstack-glance.spec
+++ b/openstack-glance.spec
@@ -1,14 +1,18 @@
-%global release_name juno
+%global release_name kilo
+%global milestone .0rc2
+%global service glance
+
+%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
 
 Name:             openstack-glance
-Version:          2014.2.3
-Release:          1%{?dist}
+Version:          2015.1
+Release:          0.1%{?milestone}%{?dist}
 Summary:          OpenStack Image Service
 
 Group:            Applications/System
 License:          ASL 2.0
 URL:              http://glance.openstack.org
-Source0:          https://launchpad.net/glance/%{release_name}/%{version}/+download/glance-%{version}.tar.gz
+Source0:          http://launchpad.net/%{service}/%{release_name}/%{release_name}-rc2/+download/%{service}-%{upstream_version}.tar.gz
 
 Source1:          openstack-glance-api.service
 Source2:          openstack-glance-registry.service
@@ -20,11 +24,6 @@ Source6:          glance-registry-dist.conf
 Source7:          glance-cache-dist.conf
 Source8:          glance-scrubber-dist.conf
 
-Patch0001: 0001-Don-t-access-the-net-while-building-docs.patch
-Patch0002: 0002-Remove-runtime-dep-on-python-pbr.patch
-Patch0003: 0003-avoid-unsupported-storage-drivers.patch
-Patch0004: 0004-notify-calling-process-we-are-ready-to-serve.patch
-
 BuildArch:        noarch
 BuildRequires:    python2-devel
 BuildRequires:    python-setuptools
@@ -34,7 +33,6 @@ Requires(pre):    shadow-utils
 Requires:         python-glance = %{version}-%{release}
 Requires:         python-glanceclient >= 1:0
 Requires:         openstack-utils
-BuildRequires:    python-pbr
 BuildRequires:    python-oslo-sphinx
 
 Requires(post): systemd
@@ -89,6 +87,9 @@ Requires:         python-anyjson
 Requires:         python-netaddr
 Requires:         python-wsme >= 0.6
 Requires:         pyOpenSSL
+Requires:         python-pbr
+Requires:         python-semantic-version
+Requires:         python-elasticsearch
 
 #test deps: python-mox python-nose python-requests
 #test and optional store:
@@ -126,25 +127,9 @@ and delivery services for virtual disk images.
 This package contains documentation files for glance.
 
 %prep
-%setup -q -n glance-%{version}
-
-%patch0001 -p1
-%patch0002 -p1
-%patch0003 -p1
-%patch0004 -p1
+%setup -q -n glance-%{upstream_version}
 
-# Remove bundled egg-info
-rm -rf glance.egg-info
 sed -i '/\/usr\/bin\/env python/d' glance/common/config.py glance/common/crypt.py glance/db/sqlalchemy/migrate_repo/manage.py
-# versioninfo is missing in f3 tarball
-echo %{version} > glance/versioninfo
-
-sed -i '/setuptools_git/d; /setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
-sed -i s/REDHATGLANCEVERSION/%{version}/ glance/version.py
-sed -i s/REDHATGLANCERELEASE/%{release}/ glance/version.py
-
-# make doc build compatible with python-oslo-sphinx RPM
-sed -i 's/oslosphinx/oslo.sphinx/' doc/source/conf.py
 
 # Remove the requirements file so that pbr hooks don't add it
 # to distutils requiers_dist config
@@ -173,10 +158,10 @@ for svc in api registry cache scrubber; do
 done
 
 %build
-%{__python} setup.py build
+%{__python2} setup.py build
 
 %install
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
 
 # Delete tests
 rm -fr %{buildroot}%{python2_sitelib}/glance/tests
@@ -289,6 +274,8 @@ exit 0
 %{_bindir}/glance-cache-pruner
 %{_bindir}/glance-scrubber
 %{_bindir}/glance-replicator
+%{_bindir}/glance-index
+%{_bindir}/glance-search
 
 %{_datadir}/glance/glance-api-dist.conf
 %{_datadir}/glance/glance-registry-dist.conf
@@ -316,7 +303,7 @@ exit 0
 %files -n python-glance
 %doc README.rst
 %{python2_sitelib}/glance
-%{python2_sitelib}/glance-%{version}*.egg-info
+%{python2_sitelib}/*.egg-info
 
 %files doc
 %doc doc/build/html
diff --git a/sources b/sources
index 7080bba..84c47fb 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-485a09569c63ef79a2acc72d810bab49  glance-2014.2.3.tar.gz
+0079f53f4305d29a7554d27bd72aaf9b  glance-2015.1.0rc2.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/openstack-glance.git/commit/?h=master&id=5c138e8aa085022d4e3f871f660456dbc78a668b


More information about the scm-commits mailing list