3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 Summary: Contains code for the config manager
19 License: %{_platform_licence}
20 Source0: %{name}-%{version}.tar.gz
21 Vendor: %{_platform_vendor}
25 BuildRequires: python-setuptools
28 This RPM contains source code for the config manager.
34 mkdir -p %{buildroot}/opt/cmframework/activators
35 mkdir -p %{buildroot}/opt/cmframework/validators
36 mkdir -p %{buildroot}/opt/cmframework/userconfighandlers
37 mkdir -p %{buildroot}/opt/cmframework/inventoryhandlers
38 mkdir -p %{buildroot}/etc/cmframework/masks.d
40 mkdir -p %{buildroot}/opt/cmframework/scripts
41 cp cmframework/scripts/*.sh %{buildroot}/opt/cmframework/scripts
42 cp cmframework/scripts/cmserver %{buildroot}/opt/cmframework/scripts
43 cp cmframework/scripts/cmagent %{buildroot}/opt/cmframework/scripts
44 cp cmframework/scripts/redis.conf %{buildroot}/opt/cmframework/scripts
45 cp cmframework/config/masks.d/default.cfg %{buildroot}/etc/cmframework/masks.d/
47 mkdir -p %{buildroot}/usr/lib/systemd/system
48 cp cmframework/systemd/config-manager.service %{buildroot}/usr/lib/systemd/system
49 cp cmframework/systemd/cmagent.service %{buildroot}/usr/lib/systemd/system
51 mkdir -p %{buildroot}/%{_python_site_packages_path}/cmframework/
53 cd cmframework/src && python setup.py install --root %{buildroot} --no-compile --install-purelib %{_python_site_packages_path} --install-scripts %{_platform_bin_path} && cd -
55 cd cmdatahandlers && python setup.py install --root %{buildroot} --no-compile --install-purelib %{_python_site_packages_path} --install-scripts %{_platform_bin_path} && cd -
57 mkdir -p %{buildroot}/etc/service-profiles/
58 cp serviceprofiles/profiles/*.profile %{buildroot}/etc/service-profiles/
60 cd serviceprofiles/python && python setup.py install --root %{buildroot} --no-compile --install-purelib %{_python_site_packages_path} && cd -
62 cd hostcli && python setup.py install --root %{buildroot} --no-compile --install-purelib %{_python_site_packages_path} && cd -
65 %defattr(0755,root,root,0755)
67 /usr/lib/systemd/system/config-manager.service
68 /usr/lib/systemd/system/cmagent.service
69 %{_platform_bin_path}/cmserver
70 %{_platform_bin_path}/cmcli
71 %{_platform_bin_path}/cmagent
72 %dir /etc/cmframework/masks.d
73 /etc/cmframework/masks.d/default.cfg
74 %{_python_site_packages_path}/cmframework*
75 %{_python_site_packages_path}/cmdatahandlers*
76 %{_python_site_packages_path}/serviceprofiles*
77 %{_python_site_packages_path}/cmcli*
78 /etc/service-profiles/*
83 ln -sf /opt/cmframework/scripts/inventory.sh /opt/openstack-ansible/inventory/
84 chmod -x /usr/lib/systemd/system/config-manager.service
85 chmod -x /usr/lib/systemd/system/cmagent.service