Репозиторий Sisyphus
Последнее обновление: 19 января 2021 | Пакетов: 17773 | Посещений: 20087498
en ru br
Репозитории ALT

Группа :: Система/Серверы
Пакет: openstack-glance

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define oname glance

Name: openstack-%oname
Epoch: 1
Version: 19.0.0
Release: alt1

Summary: OpenStack Image Service

Group: System/Servers
License: ASL 2.0
Url: http://docs.openstack.org/developer/%oname

Source: https://tarballs.openstack.org/%oname/%oname-%version.tar.gz
Source1: %name-api.service
Source2: %name-registry.service
Source3: %name-scrubber.service
Source4: %name.logrotate
Source6: %name-glare.service

Source40: %name-api.init
Source41: %name-registry.init
Source42: %name-scrubber.init
Source43: %name.tmpfiles
Source46: %name-glare.init

BuildArch: noarch

Requires(pre): shadow-utils
Requires: python3-module-glance = %EVR
Requires: python3-module-glanceclient
Requires: python3-module-PasteDeploy
Requires: /usr/bin/qemu-img

BuildRequires: crudini

BuildRequires(pre): rpm-build-python3
BuildRequires: python3-devel
BuildRequires: python3-module-setuptools
BuildRequires: python3-module-pbr >= 2.0.0
BuildRequires: python3-module-defusedxml >= 0.5.0
BuildRequires: python3-module-six >= 1.10.0
BuildRequires: python3-module-SQLAlchemy >= 1.0.10
BuildRequires: python3-module-eventlet >= 0.22.0
BuildRequires: python3-module-PasteDeploy >= 1.5.0
BuildRequires: python3-module-routes >= 2.3.1
BuildRequires: python3-module-migrate >= 0.11.0
BuildRequires: python3-module-sqlparse >= 0.2.2
BuildRequires: python3-module-alembic >= 0.8.10
BuildRequires: python3-module-httplib2 >= 0.9.1
BuildRequires: python3-module-oslo.config >= 5.2.0
BuildRequires: python3-module-oslo.concurrency >= 3.26.0
BuildRequires: python3-module-oslo.context >= 2.19.2
BuildRequires: python3-module-oslo.utils >= 3.33.0
BuildRequires: python3-module-stevedore >= 1.20.0
BuildRequires: python3-module-futurist >= 1.2.0
BuildRequires: python3-module-taskflow >= 2.16.0
BuildRequires: python3-module-keystoneauth1 >= 3.4.0
BuildRequires: python3-module-keystonemiddleware >= 4.17.0
BuildRequires: python3-module-wsme >= 0.8.0
BuildRequires: python3-module-prettytable >= 0.7.1
BuildRequires: python3-module-paste >= 2.0.2
BuildRequires: python3-module-jsonschema >= 2.6.0
BuildRequires: python3-module-OpenSSL >= 17.1.0
BuildRequires: python3-module-oslo.db >= 4.27.0
BuildRequires: python3-module-oslo.i18n >= 3.15.3
BuildRequires: python3-module-oslo.log >= 3.36.0
BuildRequires: python3-module-oslo.messaging >= 5.29.0
BuildRequires: python3-module-oslo.middleware >= 3.31.0
BuildRequires: python3-module-oslo.policy >= 1.30.0
BuildRequires: python3-module-retrying >= 1.2.3
BuildRequires: python3-module-osprofiler >= 1.4.0
BuildRequires: python3-module-glance_store >= 0.26.1
BuildRequires: python3-module-debtcollector >= 1.2.0
BuildRequires: python3-module-cryptography >= 2.1
BuildRequires: python3-module-cursive >= 0.2.1
BuildRequires: python3-module-iso8601 >= 0.1.11
BuildRequires: python3-module-monotonic >= 0.6

# Required to build module documents

BuildRequires: python3-module-sphinx
BuildRequires: python3-module-os-api-ref >= 1.4.0
BuildRequires: python3-module-openstackdocstheme >= 1.18.1
BuildRequires: python3-module-reno >= 2.5.0
BuildRequires: python3-module-sphinxcontrib-apidoc >= 0.2.0
BuildRequires: python3-modules-sqlite3

OpenStack Image Service (code-named Glance) provides discovery, registration,
and delivery services for virtual disk images. The Image Service API server
provides a standard REST interface for querying information about virtual disk
images stored in a variety of back-end stores, including OpenStack Object
Storage. Clients can register new virtual disk images with the Image Service,
query for information on publicly available disk images, and use the Image
Service's client library for streaming virtual disk images.

This package contains the API and registry servers.

%package -n python3-module-%oname
Summary: Glance Python libraries
Group: Development/Python3
Requires: python3-module-keystoneauth1 >= 3.4.0
Requires: python3-module-keystonemiddleware >= 4.17.0
Requires: python3-module-oslo.config >= 5.2.0
Requires: python3-module-oslo.concurrency >= 3.26.0
Requires: python3-module-oslo.context >= 2.19.2
Requires: python3-module-oslo.utils >= 3.33.0
Requires: python3-module-oslo.log >= 3.36.0
Requires: python3-module-oslo.db >= 4.27.0
Requires: python3-module-oslo.i18n >= 3.15.3
Requires: python3-module-oslo.messaging >= 5.29.0
Requires: python3-module-oslo.policy >= 1.30.0

%add_python3_req_skip glance.cmd.cache_manage

%description -n python3-module-%oname
OpenStack Image Service (code-named Glance) provides discovery, registration,
and delivery services for virtual disk images.

This package contains the glance Python library.

%package -n python3-module-%oname-tests
Summary: Tests for %oname
Group: Development/Python3

%description -n python3-module-%oname-tests
This package contains tests for %oname.

%package doc
Summary: Documentation for OpenStack Image Service
Group: Development/Documentation
Requires: %name = %EVR

%description doc
OpenStack Image Service (code-named Glance) provides discovery, registration,
and delivery services for virtual disk images.

This package contains documentation files for glance.

%setup -n %oname-%version

# Remove the requirements file so that pbr hooks don't add it

# to distutils requiers_dist config
rm -rf {test-,}requirements.txt tools/{pip,test}-requires


#python3 setup.py build_sphinx

#python3 setup.py build_sphinx -b man
# Fix hidden-file-or-dir warnings
#rm -fr build/sphinx/html/.buildinfo
# regenerate the sample config files
#for service in api registry scrubber cache manage glare; do
#    PYTHONPATH=. oslo-config-generator --config-file etc/oslo-config-generator/glance-$service.conf


install -d -m 0755 %buildroot%_sysconfdir/glance
install -d -m 0755 %buildroot%_sysconfdir/glance/metadefs

### configuration files

install -d -m 755 %buildroot%_sysconfdir/glance
install -d -m 755 %buildroot%_sysconfdir/glance/glance.conf.d/
install -d -m 755 %buildroot%_sysconfdir/glance/glance-api.conf.d/
install -d -m 755 %buildroot%_sysconfdir/glance/glance-registry.conf.d/

cp -pr etc/* %buildroot%_sysconfdir/glance

#for service in api registry scrubber cache manage glare swift; do

#for service in image-import swift; do
#    mv %buildroot%_sysconfdir/glance/glance-$service.conf{.sample,}

# documentation

#install -d %buildroot%_mandir/man1
#install -m 644 doc/build/man/*.1 %buildroot%_mandir/man1

rm -rf %buildroot%_sysconfdir/glance/oslo-config-generator

install -d -m 755 %buildroot%_sharedstatedir/glance/images

# Initscripts

install -p -D -m 644 %SOURCE1 %buildroot%_unitdir/openstack-glance-api.service
install -p -D -m 644 %SOURCE2 %buildroot%_unitdir/openstack-glance-registry.service
install -p -D -m 644 %SOURCE3 %buildroot%_unitdir/openstack-glance-scrubber.service
install -p -D -m 644 %SOURCE6 %buildroot%_unitdir/openstack-glance-glare.service

# Initscripts

install -p -D -m 755 %SOURCE40 %buildroot%_initdir/openstack-glance-api
install -p -D -m 755 %SOURCE41 %buildroot%_initdir/openstack-glance-registry
install -p -D -m 755 %SOURCE42 %buildroot%_initdir/openstack-glance-scrubber
install -p -D -m 755 %SOURCE46 %buildroot%_initdir/openstack-glance-glare

install -p -D -m 644 %SOURCE43 %buildroot%_tmpfilesdir/%name.conf

# Logrotate config

install -p -D -m 644 %SOURCE4 %buildroot%_sysconfdir/logrotate.d/openstack-glance

# Install pid directory

install -d -m 755 %buildroot%_runtimedir/glance

# Install log directory

install -d -m 770 %buildroot%_logdir/glance

# Delete unneeded files

rm -rf %buildroot/usr/etc

### set default configuration

%define glance_conf %buildroot%_sysconfdir/glance/glance.conf.d/010-glance.conf
crudini --set %glance_conf DEFAULT log_dir /var/log/glance
crudini --set %glance_conf oslo_concurrency lock_path /var/run/glance
crudini --set %glance_conf paste_deploy flavor keystone

# 161:161 for glance (openstack-glance)
%_sbindir/groupadd -r -g 161 -f glance 2>/dev/null ||:
%_sbindir/useradd -r -u 161 -g glance -c 'OpenStack Glance Daemons' \
       -s /sbin/nologin  -d %_sharedstatedir/glance glance 2>/dev/null ||:

%post_service %name-api
%post_service %name-registry
%post_service %name-scrubber
%post_service %name-glare

%preun_service %name-api
%preun_service %name-registry
%preun_service %name-scrubber
%preun_service %name-glare

%doc README.rst


%dir %_sysconfdir/glance
%dir %_sysconfdir/glance/glance.conf.d
%config(noreplace) %attr(640, root, glance) %_sysconfdir/glance/*.conf
%config(noreplace) %attr(640, root, glance) %_sysconfdir/glance/glance.conf.d/010-glance.conf
%config %_sysconfdir/glance/*.ini
%config %_sysconfdir/glance/*.json
%config %_sysconfdir/glance/*.sample
%dir %_sysconfdir/glance/metadefs
%config %_sysconfdir/glance/metadefs/*.json
%config(noreplace) %_sysconfdir/logrotate.d/%name
%dir %attr(0775, root, glance) %_sharedstatedir/glance
%dir %attr(0775, root, glance) %_sharedstatedir/glance/images
%dir %attr(0770, root, glance) %_logdir/glance
%dir %attr(0775, root, glance) %_runtimedir/glance

%files -n python3-module-%oname
%doc README.rst
%exclude %python3_sitelibdir/%oname/tests

%files -n python3-module-%oname-tests

#%files doc

#%doc doc/build/html


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin