diff options
author | Jan Synacek <jsynacek@redhat.com> | 2013-07-26 13:55:04 +0200 |
---|---|---|
committer | Jan Synacek <jsynacek@redhat.com> | 2013-07-26 14:26:23 +0200 |
commit | 77c6da6d0b45f1aab809182d05608e67a3818311 (patch) | |
tree | 3e3979f85c58097f2ebab8733bdee549d2eb6767 | |
parent | 09d47b585c01b3c0569dc6492654cca017e1b711 (diff) | |
download | openlmi-providers-77c6da6d0b45f1aab809182d05608e67a3818311.tar.gz openlmi-providers-77c6da6d0b45f1aab809182d05608e67a3818311.tar.xz openlmi-providers-77c6da6d0b45f1aab809182d05608e67a3818311.zip |
service: add profile registration, selinux wrapper and class version
-rw-r--r-- | mof/60_LMI_Service.mof | 3 | ||||
-rw-r--r-- | openlmi-providers.spec | 11 | ||||
-rw-r--r-- | src/service-dbus/90_LMI_Service_Profile.mof.skel | 22 | ||||
-rw-r--r-- | src/service-dbus/CMakeLists.txt | 6 | ||||
-rwxr-xr-x | src/service-dbus/cmpiLMI_Service-cimprovagt | 21 |
5 files changed, 62 insertions, 1 deletions
diff --git a/mof/60_LMI_Service.mof b/mof/60_LMI_Service.mof index d6c3715..917a084 100644 --- a/mof/60_LMI_Service.mof +++ b/mof/60_LMI_Service.mof @@ -18,7 +18,8 @@ * Authors: Vitezslav Crhonek <vcrhonek@redhat.com> */ -[ Description("Class representing Linux Service"), +[ Version("0.1.0"), + Description("Class representing Linux Service"), Provider("cmpi:cmpiLMI_Service") ] class LMI_Service: CIM_Service { diff --git a/openlmi-providers.spec b/openlmi-providers.spec index 9d754e7..01f6c48 100644 --- a/openlmi-providers.spec +++ b/openlmi-providers.spec @@ -293,6 +293,8 @@ mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/%{name} %{_libdir}/cmpi/libcmpiLMI_Service.so %{_datadir}/%{name}/60_LMI_Service.mof %{_datadir}/%{name}/60_LMI_Service.reg +%{_datadir}/%{name}/90_LMI_Service_Profile.mof +%attr(755, root, root) %{_libexecdir}/pegasus/cmpiLMI_Service-cimprovagt %files -n openlmi-account %doc README COPYING @@ -429,6 +431,9 @@ if [ "$1" -gt 1 ]; then %{_datadir}/%{name}/60_LMI_Service.mof \ %{_datadir}/%{name}/60_LMI_Service.reg \ > /dev/null 2>&1 || :; + %{_bindir}/openlmi-mof-register --just-mofs -n root/interop unregister \ + %{_datadir}/%{name}/90_LMI_Service_Profile.mof \ + > /dev/null 2>&1 || :; fi %pre -n openlmi-account @@ -530,6 +535,9 @@ if [ "$1" -ge 1 ]; then %{_datadir}/%{name}/60_LMI_Service.mof \ %{_datadir}/%{name}/60_LMI_Service.reg \ > /dev/null 2>&1 || :; + %{_bindir}/openlmi-mof-register --just-mofs -n root/interop register \ + %{_datadir}/%{name}/90_LMI_Service_Profile.mof \ + > /dev/null 2>&1 || :; fi %post -n openlmi-account @@ -629,6 +637,9 @@ if [ "$1" -eq 0 ]; then %{_datadir}/%{name}/60_LMI_Service.mof \ %{_datadir}/%{name}/60_LMI_Service.reg \ > /dev/null 2>&1 || :; + %{_bindir}/openlmi-mof-register --just-mofs -n root/interop unregister \ + %{_datadir}/%{name}/90_LMI_Service_Profile.mof \ + > /dev/null 2>&1 || :; fi %preun -n openlmi-account diff --git a/src/service-dbus/90_LMI_Service_Profile.mof.skel b/src/service-dbus/90_LMI_Service_Profile.mof.skel new file mode 100644 index 0000000..ff34bd5 --- /dev/null +++ b/src/service-dbus/90_LMI_Service_Profile.mof.skel @@ -0,0 +1,22 @@ +instance of PG_ProviderProfileCapabilities +{ + CapabilityID = "@CLASS@"; + + ProviderModuleName = "cmpiLMI_Service"; + + ProviderName = "@CLASS@"; + + RegisteredProfile = 0; + + OtherRegisteredProfile = "OpenLMI-Service"; + OtherProfileOrganization = "OpenLMI"; + + ProfileVersion = "@VERSION@"; + + RegisteredSubProfiles = {}; + + ConformingElements = { + "@CLASS@" + }; +}; + diff --git a/src/service-dbus/CMakeLists.txt b/src/service-dbus/CMakeLists.txt index 4da76c7..3cc2082 100644 --- a/src/service-dbus/CMakeLists.txt +++ b/src/service-dbus/CMakeLists.txt @@ -2,6 +2,7 @@ set(PROVIDER_NAME Service) set(LIBRARY_NAME cmpiLMI_${PROVIDER_NAME}) set(MOF 60_LMI_Service.mof) +set(CIMPROVAGT_SCRIPT cmpiLMI_${PROVIDER_NAME}-cimprovagt) set(provider_SRCS util/serviceutil.c @@ -28,4 +29,9 @@ target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES} ${G # Create registration file cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers) +set(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_Service_Profile.mof") +profile_mof_generate("90_LMI_Service_Profile.mof.skel" "${TARGET_MOF}" "LMI_Service") + install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi) +install(PROGRAMS ${CIMPROVAGT_SCRIPT} DESTINATION libexec/pegasus) +install(FILES ${TARGET_MOF} DESTINATION share/openlmi-providers/) diff --git a/src/service-dbus/cmpiLMI_Service-cimprovagt b/src/service-dbus/cmpiLMI_Service-cimprovagt new file mode 100755 index 0000000..f6c8842 --- /dev/null +++ b/src/service-dbus/cmpiLMI_Service-cimprovagt @@ -0,0 +1,21 @@ +#!/bin/sh +# +# Copyright (C) 2013 Red Hat, Inc. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Authors: Jan Synacek <jsynacek@redhat.com> + +/usr/libexec/pegasus/cimprovagt "$@" |