From 045dcd87448e1ffe51c200a234328b060f00b882 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Tue, 27 Sep 2016 04:36:37 +0000 Subject: [PATCH] [4.0] Remove profile build dependency of wearble - This is for Tizen 4.0 (tizen branch only) - When this is SR'ed, you need to create JIRA-TRE issue: Add gumd-profile_wearable for wearable profile. Change-Id: Ia8bd0328f1a075ff7df9fb68e3344fae28f829af Signed-off-by: MyungJoo Ham --- packaging/gumd.spec | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/packaging/gumd.spec b/packaging/gumd.spec index f5b437e..75aa518 100644 --- a/packaging/gumd.spec +++ b/packaging/gumd.spec @@ -4,12 +4,6 @@ # WARNING! do not use for production builds as it will break security %define debug_build 0 -%if "%{profile}" == "wearable" -%define disable_cap_admin 1 -%else -%define disable_cap_admin 0 -%endif - %define GUMD_DBUS_SERVICE "src/daemon/dbus/services/org.O1.SecurityAccounts.gUserManagement.service" Name: gumd @@ -39,10 +33,21 @@ BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(gmodule-2.0) BuildRequires: pkgconfig(libtzplatform-config) Requires: tizen-platform-config +Provides: gumd-profile_common = %{version}-%{release} +Provides: gumd-profile_mobile = %{version}-%{release} +Provides: gumd-profile_tv = %{version}-%{release} +Provides: gumd-profile_ivi = %{version}-%{release} %description %{summary} files +%package profile_wearable +Summary: GUMD extension for Tizen Wearable +Requires: gumd = %{version}-%{release} + +%description profile_wearable +GUMD extension for Tizen Wearable. +This extension supports wearable specific gumd.service file. %package -n libgum Summary: User management client library @@ -93,13 +98,14 @@ cp -a %{SOURCE1002} libgum.manifest mv "%{GUMD_DBUS_SERVICE}".vd.in "%{GUMD_DBUS_SERVICE}".in %else mv "%{GUMD_DBUS_SERVICE}".common.in "%{GUMD_DBUS_SERVICE}".in -%if %{disable_cap_admin} == 1 -echo "CapabilityBoundingSet=~CAP_MAC_ADMIN" >> data/gumd.service -echo "SmackProcessLabel=System" >> data/gumd.service -%else + +# wearable +cp data/gumd.service data/gumd.service.wearable +echo "CapabilityBoundingSet=~CAP_MAC_ADMIN" >> data/gumd.service.wearable +echo "SmackProcessLabel=System" >> data/gumd.service.wearable +# non-wearable echo "SmackProcessLabel=System::Privileged" >> data/gumd.service %endif -%endif %build autoreconf -ivf @@ -121,6 +127,7 @@ install -m 644 data/gumd_upgrade.sh %{buildroot}%{_datadir}/upgrade/scripts %if "%{TIZEN_PRODUCT_TV}" != "1" install -m 755 -d %{buildroot}%{_unitdir} install -m 644 data/gumd.service %{buildroot}%{_unitdir} +install -m 644 data/gumd.service.wearable %{buildroot}%{_unitdir} %endif %post @@ -138,6 +145,13 @@ install -d -m 755 %{_localstatedir}/lib/%{name}/user %post -n libgum -p /sbin/ldconfig %postun -n libgum -p /sbin/ldconfig +%post profile_wearable +# Uses different service file (overwrite non wearable) +mv %{_unitdir}/gumd.service.wearable %{_unitdir}/gumd.service +# This does not support complete unisntall because gumd.service +# is not going to be recovered. Users should reinstall gumd +# to get it recovered after uninstalling profile_wearable + %files -n libgum %defattr(-,root,root,-) %manifest libgum.manifest @@ -177,6 +191,9 @@ install -d -m 755 %{_localstatedir}/lib/%{name}/user %endif %endif +%files profile_wearable +%{_unitdir}/gumd.service.wearable + %files doc %defattr(-,root,root,-) %manifest %{name}.manifest -- 2.7.4