X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=trusty%2Fdebian%2Frules;h=bd5b793c86a676f7ec5b0171c849dd093138d386;hb=f3c5068373d064592f75f8250b99432b1520985a;hp=2274bccda5d5d8dd50aa6dba715b45a050af4e19;hpb=4cbecdc070c118cca3a2a7cd693357c0798e84cc;p=openstack-build%2Fcinder-build.git diff --git a/trusty/debian/rules b/trusty/debian/rules index 2274bccda..bd5b793c8 100755 --- a/trusty/debian/rules +++ b/trusty/debian/rules @@ -3,6 +3,8 @@ include /usr/share/openstack-pkg-tools/pkgos.make export OSLO_PACKAGE_VERSION=$(shell dpkg-parsechangelog | grep Version: | cut -d' ' -f2 | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' | head -n 1) +export DH_VERBOSE=1 + %: dh $@ --buildsystem=python_distutils --with python2,systemd,sphinxdoc @@ -31,33 +33,57 @@ override_dh_install: dh_install --fail-missing -Xbin/cinder-all install -D -m 0440 debian/cinder-common.sudoers $(CURDIR)/debian/cinder-common/etc/sudoers.d/cinder-common - oslo-config-generator --output-file $(CURDIR)/etc/cinder/cinder.conf.sample \ - --wrap-width 140 \ - --namespace cinder \ - --namespace oslo_concurrency \ - --namespace oslo_db \ - --namespace oslo_messaging \ - --namespace cinder.policy \ - --namespace keystonemiddleware.auth_token \ - --namespace cinder.openstack.common.eventlet_backdoor \ - --namespace cinder.openstack.common.log \ - --namespace cinder.openstack.common.periodic_task \ - --namespace cinder.openstack.common.policy \ - --namespace oslo_db.concurrency - install -D -m 0644 $(CURDIR)/etc/cinder/cinder.conf.sample $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf + mkdir -p $(CURDIR)/debian/cinder-common/usr/share/cinder-common + $(CURDIR)/tools/config/generate_sample.sh from_tox +# PYTHONPATH=. oslo-config-generator --output-file $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf \ +# --wrap-width 80 \ +# --namespace cinder \ +# --namespace keystonemiddleware.auth_token \ +# --namespace oslo.config \ +# --namespace oslo.concurrency \ +# --namespace oslo.context \ +# --namespace oslo.db \ +# --namespace oslo.i18n \ +# --namespace oslo.log \ +# --namespace oslo.messaging \ +# --namespace oslo.middleware \ +# --namespace oslo.policy \ +# --namespace oslo.reports \ +# --namespace oslo.rootwrap \ +# --namespace oslo.serialization \ +# --namespace oslo.service \ +# --namespace oslo.utils \ +# --namespace oslo.versionedobjects \ +# --namespace oslo.vmware + # The generator is currently missing enabled_backend and the [lvm] + # section. This script fixes it until upstream gets smarter. +# chmod +x debian/gen-fixed-config +# ./debian/gen-fixed-config + cp etc/cinder/cinder.conf.sample $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf + + # Set LVM as default backend + sed -i 's/^[ \t#]*enabled_backends[ \t]*=.*/enabled_backends = lvm/' $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf + echo "[lvm]" >> $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf + echo "volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver" >> $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf + echo "volume_group = pkgosvg0" >> $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf + echo "iscsi_protocol = iscsi" >> $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf + echo "iscsi_helper = tgtadm" >> $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf + + # Set a default value for lock_path + sed -i 's|^[ \t#]*lock_path[ \t]*=.*|lock_path = /var/lock/cinder|' $(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 + sed -i 's/^[ \t#]*auth_protocol[ \t]*=.*/auth_protocol = http/' $(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 + sed -i 's|#[ \t#]*state_path[ \t]*=.*|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 + #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