]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
* Align with MOS packaging:
authorThomas Goirand <zigo@debian.org>
Tue, 1 Sep 2015 13:50:44 +0000 (15:50 +0200)
committerThomas Goirand <zigo@debian.org>
Tue, 1 Sep 2015 13:50:44 +0000 (15:50 +0200)
    - Bumped EPOCH to 2 instead of 1.
    - Some Ubuntu version lower bounds for dependencies.
    - Added a cinder-doc package.

Rewritten-From: 2de43676b008654066239f304959e3f7ead5a958

15 files changed:
xenial/debian/changelog
xenial/debian/cinder-api.init.in
xenial/debian/cinder-api.postinst.in
xenial/debian/cinder-backup.init.in
xenial/debian/cinder-common.dirs
xenial/debian/cinder-common.postrm
xenial/debian/cinder-scheduler.init.in
xenial/debian/cinder-volume.dirs [deleted file]
xenial/debian/cinder-volume.init.in
xenial/debian/cinder_sudoers [deleted file]
xenial/debian/control
xenial/debian/docs [deleted file]
xenial/debian/logging.conf [deleted file]
xenial/debian/rules
xenial/debian/ubuntu_control_vars [deleted file]

index 40d6dce57fe8f5cd6798fc2c345b259793abf5a7..5e1d34a20d6b42428fb14170f61aa0c063dd5a42 100644 (file)
@@ -1,3 +1,12 @@
+cinder (2:7.0.0~b2-2) experimental; urgency=medium
+
+  * Align with MOS packaging:
+    - Bumped EPOCH to 2 instead of 1.
+    - Some Ubuntu version lower bounds for dependencies.
+    - Added a cinder-doc package.
+
+ -- Thomas Goirand <zigo@debian.org>  Tue, 01 Sep 2015 13:56:21 +0200
+
 cinder (1:7.0.0~b2-1) experimental; urgency=medium
 
   * New upstream release.
index d3a21a925b4247be774179e0a8eb0e676ea1c37b..1f715f6e8dad77f60cf1d4634cad324bc489f6ec 100644 (file)
@@ -13,7 +13,6 @@
 ### END INIT INFO
 
 # Author: Thomas Goirand <zigo@debian.org>
-
 DESC="OpenStack Cinder Api"
 PROJECT_NAME=cinder
 NAME=${PROJECT_NAME}-api
index 424e0cb9b5603f49f7d12ac796761224125c4eca..ff22918c622f8fec827250391e55e1bac53b65bd 100644 (file)
@@ -4,7 +4,7 @@ set -e
 
 #PKGOS-INCLUDE#
 
-if [ "$1" = "configure" ] ; then
+if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then
        . /usr/share/debconf/confmodule
        pkgos_register_endpoint_postinst cinder cinder volume "Cinder Volume Service" 8776 /v1/'%(tenant_id)s'
        db_stop
index a57c7443d11db86604aa49e4c969ed97b267fb40..22c56ddaf93ba41f824b008f7d0265388b1e8618 100644 (file)
@@ -12,7 +12,6 @@
 ### END INIT INFO
 
 # Author: Thomas Goirand <zigo@debian.org>
-
 DESC="OpenStack Cinder Backup"
 PROJECT_NAME=cinder
 NAME=${PROJECT_NAME}-backup
index f622135d1941218e98a7e36c232540c06547d8d8..989ecfa5efca421537a2b6cb4505d6201fb6e393 100644 (file)
@@ -1,5 +1 @@
-etc/cinder
 etc/cinder/rootwrap.d
-var/lib/cinder
-var/log/cinder
-var/lib/cinder/volumes
index 091fa285842a1eb8a21732c43ba5856e851628fb..614fc20679ff0bbe5b3382569649f010a238f2d3 100644 (file)
@@ -22,9 +22,11 @@ if [ "$1" = "purge" ] && [ -f /usr/share/debconf/confmodule ] ; then
        fi
 
        rm -f /etc/cinder/cinder.conf /etc/cinder/api-paste.ini /etc/cinder/logging.conf
-       rmdir --ignore-fail-on-non-empty /etc/cinder
+       rmdir --ignore-fail-on-non-empty /etc/cinder || true
        rm -f /etc/default/cinder-common
        rm -rf /var/lib/cinder /var/log/cinder
 fi
 
 #DEBHELPER#
+
+exit 0
index bf531ae3c074a6f39f07287f2a163943fd47a30e..4866704947db421adde9560e3a14206c5ae5922d 100644 (file)
@@ -13,7 +13,6 @@
 ### END INIT INFO
 
 # Author: Thomas Goirand <zigo@debian.org>
-
 DESC="OpenStack Cinder Scheduler"
 PROJECT_NAME=cinder
 NAME=${PROJECT_NAME}-scheduler
diff --git a/xenial/debian/cinder-volume.dirs b/xenial/debian/cinder-volume.dirs
deleted file mode 100644 (file)
index 7699139..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var/lib/cinder/volumes
index 4134d7bfcdce27d4c320d79869a6bfe49a28eeb5..98439f026fd52548d418051b331366df6b471bec 100644 (file)
@@ -13,7 +13,6 @@
 ### END INIT INFO
 
 # Author: Thomas Goirand <zigo@debian.org>
-
 DESC="OpenStack Cinder Volume"
 PROJECT_NAME=cinder
 NAME=${PROJECT_NAME}-volume
diff --git a/xenial/debian/cinder_sudoers b/xenial/debian/cinder_sudoers
deleted file mode 100644 (file)
index ed5d479..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Defaults:cinder !requiretty
-
-cinder ALL = (root) NOPASSWD: /usr/bin/cinder-rootwrap /etc/cinder/rootwrap.conf *
index 7c1830592d4d14ce55ee02bb848a95f3b1575fb0..0d8e67930fb5fac9c9069c6dc62c4c79582778c8 100644 (file)
@@ -23,7 +23,7 @@ Build-Depends-Indep: python-anyjson,
                      python-fixtures (>= 1.3.1),
                      python-glanceclient (>= 1:0.18.0),
                      python-greenlet,
-                     python-hacking,
+                     python-hacking (>= 0.10.0),
                      python-iso8601,
                      python-keystonemiddleware (>= 2.0.0),
                      python-kombu,
@@ -32,7 +32,7 @@ Build-Depends-Indep: python-anyjson,
                      python-mock (>= 1.3),
                      python-mox3,
                      python-mysqldb,
-                     python-netaddr,
+                     python-netaddr (>= 0.7.12),
                      python-novaclient (>= 2:2.22.0),
                      python-os-brick,
                      python-os-testr,
@@ -54,8 +54,8 @@ Build-Depends-Indep: python-anyjson,
                      python-oslo.vmware (>= 1.16.0),
                      python-oslosphinx (>= 2.5.0),
                      python-oslotest (>= 1.7.0),
-                     python-osprofiler,
-                     python-paramiko,
+                     python-osprofiler (>= 0.3.0),
+                     python-paramiko (>= 1.13.0),
                      python-paste,
                      python-pastedeploy,
                      python-psutil,
@@ -67,9 +67,9 @@ Build-Depends-Indep: python-anyjson,
                      python-routes,
                      python-rtslib-fb,
                      python-six (>= 1.9.0),
-                     python-sqlalchemy,
+                     python-sqlalchemy (>= 0.9.7),
                      python-stevedore (>= 1.5.0),
-                     python-swiftclient,
+                     python-swiftclient (>= 1:2.2.0),
                      python-taskflow (>= 1.16.0),
                      python-tempest-lib (>= 0.6.1),
                      python-testtools (>= 1.4.0),
@@ -79,26 +79,27 @@ Build-Depends-Indep: python-anyjson,
 Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/cinder.git;a=summary
 Vcs-Git: git://anonscm.debian.org/openstack/cinder.git
-Homepage: http://cinder.openstack.org/
+Homepage: http://github.com/openstack/cinder
 
 Package: python-cinder
 Section: python
 Architecture: all
-Pre-Depends: dpkg (>= 1.15.6~),
 Depends: python-anyjson,
          python-babel,
          python-barbicanclient (>= 3.0.1),
+         python-ceph,
          python-crypto,
          python-eventlet (>= 0.17.4),
          python-glanceclient (>= 1:0.18.0),
          python-greenlet,
+         python-hp3parclient,
          python-iso8601,
          python-keystonemiddleware (>= 2.0.0),
          python-kombu,
          python-lxml,
          python-migrate (>= 0.9.6),
          python-mysqldb,
-         python-netaddr,
+         python-netaddr (>= 0.7.12),
          python-novaclient (>= 2:2.22.0),
          python-os-brick,
          python-oslo.concurrency (>= 2.1.0),
@@ -117,9 +118,8 @@ Depends: python-anyjson,
          python-oslo.utils (>= 1.9.0),
          python-oslo.versionedobjects (>= 0.5.0),
          python-oslo.vmware (>= 1.16.0),
-         python-osprofiler,
-         python-paramiko,
-         python-passlib,
+         python-osprofiler (>= 0.3.0),
+         python-paramiko (>= 1.13.0),
          python-paste,
          python-pastedeploy,
          python-pbr (>= 1.3),
@@ -132,9 +132,9 @@ Depends: python-anyjson,
          python-routes,
          python-rtslib-fb,
          python-six (>= 1.9.0),
-         python-sqlalchemy,
+         python-sqlalchemy (>= 0.9.7),
          python-stevedore (>= 1.5.0),
-         python-swiftclient,
+         python-swiftclient (>= 1:2.2.0),
          python-taskflow (>= 1.16.0),
          python-webob,
          ${misc:Depends},
@@ -153,7 +153,6 @@ Description: OpenStack block storage system - Python libraries
 
 Package: cinder-common
 Architecture: all
-Pre-Depends: dpkg (>= 1.15.6~),
 Depends: adduser,
          dbconfig-common,
          debconf,
@@ -177,7 +176,6 @@ Description: OpenStack block storage system - common files
 
 Package: cinder-api
 Architecture: all
-Pre-Depends: dpkg (>= 1.15.6~),
 Depends: adduser,
          cinder-common (= ${binary:Version}),
          debconf,
@@ -195,16 +193,15 @@ Description: OpenStack block storage system - API server
  It also has back-end drivers for many hardware and software storage solutions
  like Ceph, NFS, Net-APP, etc.
  .
- This package contains the API server on which clients will connect.
+ This package contains the Cinder API server.
 
 Package: cinder-volume
 Architecture: all
-Pre-Depends: dpkg (>= 1.15.6~),
 Depends: adduser,
          cinder-common (= ${binary:Version}),
          lvm2,
          qemu-utils,
-         tgt (>= 1:1.0.17-1.1~),
+         tgt,
          ${misc:Depends},
          ${ostack-lsb-base},
          ${python:Depends},
@@ -219,11 +216,10 @@ Description: OpenStack block storage system - Volume server
  It also has back-end drivers for many hardware and software storage solutions
  like Ceph, NFS, Net-APP, etc.
  .
- This package contains the Volume server which will actually do the storage.
+ This package contains the Cinder Volume server.
 
 Package: cinder-scheduler
 Architecture: all
-Pre-Depends: dpkg (>= 1.15.6~),
 Depends: cinder-common (= ${binary:Version}),
          ${misc:Depends},
          ${ostack-lsb-base},
@@ -238,11 +234,10 @@ Description: OpenStack block storage system - Scheduler server
  It also has back-end drivers for many hardware and software storage solutions
  like Ceph, NFS, Net-APP, etc.
  .
- This package contains the Scheduler server.
+ This package contains the Cinder Scheduler server.
 
 Package: cinder-backup
 Architecture: all
-Pre-Depends: dpkg (>= 1.15.6~),
 Depends: adduser,
          cinder-common (= ${binary:Version}),
          ${misc:Depends},
@@ -259,3 +254,21 @@ Description: OpenStack block storage system - Backup server
  like Ceph, NFS, Net-APP, etc.
  .
  This package contains the Cinder backup service.
+
+Package: cinder-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends},
+         ${sphinxdoc:Depends},
+Description: OpenStack block storage system - doc
+ Cinder is a block Storage-as-a-Service system for the OpenStack cloud
+ computing suite. It re-implements the features of Nova-volume, which it
+ directly replaces.
+ .
+ Cinder uses LVM partitions of your volume servers in order to provide iSCSI
+ permanent block storage devices for your virtual machines running on Nova.
+ It also has back-end drivers for many hardware and software storage
+ solutions
+ like Ceph, NFS, Net-APP, etc.
+ .
+ This package contains the documentation.
diff --git a/xenial/debian/docs b/xenial/debian/docs
deleted file mode 100644 (file)
index a1320b1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-README.rst
diff --git a/xenial/debian/logging.conf b/xenial/debian/logging.conf
deleted file mode 100644 (file)
index 476425b..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-[loggers]
-keys = root, cinder
-
-[handlers]
-keys = stderr, stdout, watchedfile, syslog, null
-
-[formatters]
-keys = legacycinder, default
-
-[logger_root]
-level = WARNING
-handlers = null
-
-[logger_cinder]
-level = INFO
-handlers = stderr
-qualname = cinder
-
-[logger_amqplib]
-level = WARNING
-handlers = stderr
-qualname = amqplib
-
-[logger_sqlalchemy]
-level = WARNING
-handlers = stderr
-qualname = sqlalchemy
-# "level = INFO" logs SQL queries.
-# "level = DEBUG" logs SQL queries and results.
-# "level = WARNING" logs neither.  (Recommended for production systems.)
-
-[logger_boto]
-level = WARNING
-handlers = stderr
-qualname = boto
-
-[logger_suds]
-level = INFO
-handlers = stderr
-qualname = suds
-
-[logger_eventletwsgi]
-level = WARNING
-handlers = stderr
-qualname = eventlet.wsgi.server
-
-[handler_stderr]
-class = StreamHandler
-args = (sys.stderr,)
-formatter = legacycinder
-
-[handler_stdout]
-class = StreamHandler
-args = (sys.stdout,)
-formatter = legacycinder
-
-[handler_watchedfile]
-class = handlers.WatchedFileHandler
-args = ('cinder.log',)
-formatter = legacycinder
-
-[handler_syslog]
-class = handlers.SysLogHandler
-args = ('/dev/log', handlers.SysLogHandler.LOG_USER)
-formatter = legacycinder
-
-[handler_null]
-class = cinder.log.NullHandler
-formatter = default
-args = ()
-
-[formatter_legacycinder]
-class = cinder.log.LegacyCinderFormatter
-
-[formatter_default]
-format = %(message)s
index ae446c47f0021f5a91dc7dbddde457e98e0cacbb..2274bccda5d5d8dd50aa6dba715b45a050af4e19 100755 (executable)
@@ -1,16 +1,15 @@
 #!/usr/bin/make -f
 
 include /usr/share/openstack-pkg-tools/pkgos.make
-
-export OSLO_PACKAGE_VERSION=$(shell dpkg-parsechangelog -S Version | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/')
+export OSLO_PACKAGE_VERSION=$(shell dpkg-parsechangelog | grep Version: | cut -d' ' -f2 | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' | head -n 1)
 
 %:
-       dh $@  --with python2,systemd
+       dh $@ --buildsystem=python_distutils --with python2,systemd,sphinxdoc
 
 override_dh_auto_test:
 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
        @echo "===> Running tests"
-       set -e ; set -x ; for i in 2.7 $(PYTHON3S) ; do \
+       set -e ; set -x ; for i in 2.7 ; do \
                PYMAJOR=`echo $$i | cut -d'.' -f1` ; \
                echo "===> Testing with python$$i (python$$PYMAJOR)" ; \
                rm -rf .testrepository ; \
@@ -24,12 +23,11 @@ ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
 endif
 
 override_dh_clean:
-       dh_clean
+       dh_clean -O--buildsystem=python_distutils
        rm -f debian/cinder-common.config debian/cinder-common.postinst debian/cinder-api.config debian/cinder-api.postinst debian/cinder-volume.postinst
        rm -rf debian/*.upstart debian/*.service
 
 override_dh_install:
-       #tools/config/generate_sample.sh -b . -p cinder -o etc/cinder
        dh_install --fail-missing -Xbin/cinder-all
        install -D -m 0440 debian/cinder-common.sudoers $(CURDIR)/debian/cinder-common/etc/sudoers.d/cinder-common
 
@@ -46,28 +44,39 @@ override_dh_install:
                --namespace cinder.openstack.common.periodic_task \
                --namespace cinder.openstack.common.policy \
                --namespace oslo_db.concurrency
-
-       #install -D -m 0644 $(CURDIR)/debian/cinder.conf $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf
        install -D -m 0644 $(CURDIR)/etc/cinder/cinder.conf.sample $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf
 
        # Disable https in default setup, as this makes our CI fail
        sed -i 's/#auth_protocol=https/auth_protocol=http/' $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf
-       install -D -m 0644 $(CURDIR)/etc/cinder/logging_sample.conf $(CURDIR)/debian/cinder-common/usr/share/cinder-common/logging.conf
-       sed -i 's|#rootwrap_config=<None>|rootwrap_config=/etc/cinder/rootwrap.conf|' $(CURDIR)/debian/cinder-common/etc/sudoers.d/cinder-common
-       echo "# Connection to db:" >>$(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf
-       echo "sql_connection = sqlite:////var/lib/cinder/cinderdb" >>$(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf
+
+       # Default to keystone auth
        sed -i "s/#auth_strategy=noauth/auth_strategy=keystone/" $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf
+
+       # Write only in /var/lib/cinder please
        sed -i 's|#state_path=$pybasedir|state_path=/var/lib/cinder|' $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf
 
+       # Fix the missing sql_connection directive
+       echo "# Connection to db:" >>$(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf
+       echo "sql_connection = sqlite:////var/lib/cinder/cinderdb" >>$(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf
+
+       install -D -m 0644 $(CURDIR)/etc/cinder/logging_sample.conf $(CURDIR)/debian/cinder-common/usr/share/cinder-common/logging.conf
+
 override_dh_fixperms:
        dh_fixperms -Xcinder_tgt.conf
        chmod 0440 $(CURDIR)/debian/cinder-common/etc/sudoers.d/cinder-common
 
 override_dh_auto_build:
-       dh_auto_build
+       dh_auto_build -O--buildsystem=python_distutils
 
        /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cinder-common.config
        /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cinder-common.postinst
        /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cinder-api.config
        /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cinder-api.postinst
        /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cinder-volume.postinst
+
+override_dh_sphinxdoc:
+ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
+       python setup.py build_sphinx
+       cp -rf doc/build/html $(CURDIR)/debian/cinder-doc/usr/share/doc/cinder-doc
+       dh_sphinxdoc -O--buildsystem=python_distutils
+endif
diff --git a/xenial/debian/ubuntu_control_vars b/xenial/debian/ubuntu_control_vars
deleted file mode 100644 (file)
index e69de29..0000000