Several improvements and partially synced with debian package

This commit is contained in:
Ghe Rivero 2012-04-17 12:37:06 +02:00
parent 20e99d9028
commit 8303198458
21 changed files with 87 additions and 56 deletions

2
debian/control vendored
View File

@ -15,7 +15,7 @@ Build-Depends-Indep:
python-boto,
python-crypto,
python-eventlet,
python-httplib2 (>= 0.6.0)
python-httplib2 (>= 0.6.0),
python-iso8601,
python-kombu,
python-migrate,

View File

@ -1,5 +1,5 @@
/var/lib/glance/images
/var/lib/glance/image-cache
/var/lib/glance/image-cache/incomplete
/var/lib/glance/image-cache/invalid
/var/lib/glance/image-cache/queue
/var/lib/glance/images

View File

@ -1,13 +1,13 @@
usr/bin/glance-api
usr/bin/glance-cache-manage
usr/bin/glance-scrubber
usr/bin/glance-cache-prefetcher
usr/bin/glance-cache-cleaner
usr/bin/glance-cache-pruner
etc/glance-api.conf etc/glance
etc/glance-cache.conf etc/glance
etc/glance-scrubber.conf etc/glance
etc/glance-api-paste.ini etc/glance
etc/glance-scrubber-paste.ini etc/glance
etc/glance-cache.conf etc/glance
etc/glance-cache-paste.ini etc/glance
etc/policy.json etc/glance
etc/glance-scrubber.conf etc/glance
etc/glance-scrubber-paste.ini etc/glance
etc/policy.json etc/glance
usr/bin/glance-api
usr/bin/glance-cache-cleaner
usr/bin/glance-cache-manage
usr/bin/glance-cache-prefetcher
usr/bin/glance-cache-pruner
usr/bin/glance-scrubber

View File

@ -1,8 +1,7 @@
/var/log/glance/glance-api.log {
daily
compress
missingok
postrotate
invoke-rc.d glance-api restart
endscript
compress
delaycompress
notifempty
}

View File

@ -3,8 +3,11 @@
set -e
case $1 in
remove|purge)
invoke-rc.d glance-api stop
remove|purge)
if [ -x /etc/init.d/glance-api ]; then
invoke-rc.d glance-api stop || true
fi
;;
esac
#DEBHELPER#

View File

@ -1,3 +1,5 @@
/etc/glance/
/var/lib/glance/
/var/log/glance/
/var/lib/glance/image-cache/
/var/lib/glance/images/
/var/log/glance/

View File

@ -1,3 +1,3 @@
usr/bin/glance
usr/bin/glance-manage
usr/bin/glance-control
usr/bin/glance-manage

View File

@ -2,15 +2,21 @@
set -e
. /usr/share/debconf/confmodule
if [ "$1" = "configure" ]
then
addgroup --quiet --system glance
adduser --quiet --system --home /var/lib/glance --ingroup glance --no-create-home --shell /bin/bash glance
if ! getent group glance > /dev/null 2>&1
then
addgroup --quiet --system glance >/dev/null
fi
if ! getent passwd glance > /dev/null 2>&1
then
adduser --quiet --system --home /var/lib/glance --ingroup glance --no-create-home --shell /bin/false glance
fi
chown glance:glance -R /var/lib/glance /var/log/glance /etc/glance
chmod 0750 /etc/glance /var/log/glance /var/lib/glance
chown -R glance:adm /var/log/glance/
chmod 0750 /var/log/glance/
chown glance:glance -R /var/lib/glance/ /etc/glance/
chmod 0700 /etc/glance/
fi
#DEBHELPER#

View File

@ -4,10 +4,18 @@ set -e
case $1 in
purge)
userdel glance || true
groupdel glance || true
rm -rf /var/log/glance
;;
echo "Purging glance. Backup of /var/lib/glance can be found at /var/lib/glance.tar.bz2"
if ( getent passwd glance) > /dev/null 2>&1; then
userdel glance || true
fi
if ( getent group glance) > /dev/null 2>&1; then
groupdel glance || true
fi
[ -e /var/lib/glance ] && rm -rf /var/lib/glance
[ -e /var/log/glance ] && rm -rf /var/log/glance
;;
esac
#DEBHELPER#

View File

@ -1,3 +1,3 @@
usr/bin/glance-registry
etc/glance-registry.conf etc/glance
etc/glance-registry-paste.ini etc/glance
etc/glance-registry-paste.ini etc/glance
usr/bin/glance-registry

View File

@ -1,8 +1,7 @@
/var/log/glance/glance-registry.log {
daily
compress
missingok
postrotate
invoke-rc.d glance-registry restart
endscript
compress
delaycompress
notifempty
}

View File

@ -1,2 +1 @@
debian/mans/glance-registry.8

View File

@ -63,9 +63,5 @@ then
fi
fi
fi
chown glance:glance -R /var/lib/glance /var/log/glance /etc/glance
chmod 0750 /etc/glance
chmod 0750 /var/log/glance
#DEBHELPER#

View File

@ -10,4 +10,12 @@ if [ "$RET" = "true" ]; then
dbc_go glance-registry $@
fi
case $1 in
remove|purge)
if [ -x /etc/init.d/glance-registry ]; then
invoke-rc.d glance-registry stop || true
fi
;;
esac
#DEBHELPER#

View File

@ -1,6 +1,6 @@
--- a/etc/glance-api.conf
+++ b/etc/glance-api.conf
@@ -235,3 +235,6 @@
@@ -240,3 +240,6 @@
# Base directory that the Image Cache uses
image_cache_dir = /var/lib/glance/image-cache/

View File

@ -0,0 +1,14 @@
Description: Dont allow network access for building docs.
Author: Chuck Short <zulcss@ubuntu.com>
Forwarded: no
diff -Naurp glance-2012.1.orig/doc/source/conf.py glance-2012.1/doc/source/conf.py
--- glance-2012.1.orig/doc/source/conf.py 2012-03-30 09:12:40.000000000 -0400
+++ glance-2012.1/doc/source/conf.py 2012-04-02 08:52:12.109238365 -0400
@@ -45,7 +45,6 @@ sys.path = [os.path.abspath('../../glanc
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
- 'sphinx.ext.intersphinx',
'sphinx.ext.pngmath',
'sphinx.ext.graphviz']

View File

@ -1,2 +1,3 @@
default_conf.patch
disable-network-for-docs.patch
sql_conn-registry.patch

View File

@ -1,2 +1 @@
usr/lib/python*/dist-packages/*

View File

@ -1,12 +0,0 @@
#!/bin/sh
set -e
#DEBHELPER#
if [ "$1" = "configure" ]
then
update-python-modules --post-install
fi
exit 0

9
debian/rules vendored
View File

@ -6,10 +6,19 @@
%:
dh $@ --with python2
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
bash run_tests.sh -N
endif
override_dh_auto_build:
dh_auto_build
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
mkdir -p doc/build
python setup.py build_sphinx
else
mkdir -p doc/build/html
endif
override_dh_auto_clean:
dh_auto_clean

2
debian/watch vendored
View File

@ -1,4 +1,4 @@
version=3
http://launchpad.net/glance/+download http://launchpad.net/glance/.*/glance-(.*)\.tar\.gz
https://launchpad.net/glance/+download https://launchpad.net/glance/.*/glance-(.*)\.tar\.gz
http://glance.openstack.org/tarballs/ glance-(.*).tar.gz