From: SangYoun Kwak Date: Tue, 17 Jan 2023 08:37:03 +0000 (+0900) Subject: packaging: Modify the installation of sensord and sensord-dummy X-Git-Tag: accepted/tizen/unified/20230119.053209^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb5f2daafcec9510fb62cd946563036c5f2cf28c;p=platform%2Fcore%2Fsystem%2Fsensord.git packaging: Modify the installation of sensord and sensord-dummy Previously, sensor-dummy was installed with sensord due to the providence of the name 'libsensor.so.', which is a reference for expanding the "package dependency". In this patch, sensord will be installed independently and it will provide the name "libsensor.so.". According to this, sensor-dummy will be installed with sensord due to the providence of the name. Since the sensord daemon is not necessary on the target which uses sensord-dummy, the post script of sensord-dummy will remove the files which are installed by the sensord package. The sensord-dummy package is not required explicitly in the tv profile. (previously, sensord-dummy was required by the name "libsensor.so.", it was not necessary to require sensord-dummy explicitly) Thus, this patch should be applied with the modification of .ks(kickstart) file. ("sensord-profile_tv" which provided by the sensord-dummy can be used) Change-Id: I0c56af9f6e9f35a35fc0b3b5074400d94ebd5ebe Signed-off-by: SangYoun Kwak --- diff --git a/packaging/sensord.spec b/packaging/sensord.spec index 407863e4..04c25e16 100644 --- a/packaging/sensord.spec +++ b/packaging/sensord.spec @@ -22,7 +22,6 @@ BuildRequires: pkgconfig(cynara-session) BuildRequires: pkgconfig(hal-api-sensor) BuildRequires: pkgconfig(hal-api-common) -Requires: %{name}-dummy = %{version}-%{release} Provides: %{name}-profile_mobile = %{version}-%{release} Provides: %{name}-profile_wearable = %{version}-%{release} Provides: %{name}-profile_ivi = %{version}-%{release} @@ -37,11 +36,9 @@ of the Sensor Framework. The library replaces the dummy library installed by %{n %package dummy Summary: Sensor Framework 'dummy' library Provides: %{name}-profile_tv = %{version}-%{release} +Requires: %{name} = %{version}-%{release} # To support old-snapshot-based package builds Provides: libsensor.so.2 -# For targets which uses only dummy -# Prevent to install sensord by providing libsensor.so. -Provides: libsensor.so.%(echo %{version} | cut -d'.' -f1) %description dummy @@ -103,7 +100,7 @@ echo "You need to reinstall %{name}-dummy to keep using the APIs after uninstall %files %manifest packaging/sensord.manifest -%{_libdir}/libsensor.so.%{version} +%{_libdir}/libsensor.so.* %{_libdir}/libsensord-shared.so %{_libdir}/sensor/fusion/libsensor-fusion.so %{_libdir}/sensor/physical/libsensor-physical.so @@ -121,12 +118,20 @@ pushd %{_libdir} ln -sf libsensor-dummy.so libsensor.so.%{version} chsmack -a "_" libsensor.so.%{version} popd +# Remove sensord files +rm -f %{_libdir}/libsensord-shared.so +rm -f %{_libdir}/sensor/fusion/libsensor-fusion.so +rm -f %{_libdir}/sensor/physical/libsensor-physical.so +rm -f %{_bindir}/sensord +rm -f %{_unitdir}/sensord.service +rm -f %{_unitdir}/sensord.socket +rm -f %{_unitdir}/multi-user.target.wants/sensord.service +rm -f %{_unitdir}/sockets.target.wants/sensord.socket /sbin/ldconfig + %files dummy %manifest packaging/sensord.manifest -%exclude %{_libdir}/libsensor.so.%{version} -%{_libdir}/libsensor.so.* %{_libdir}/libsensor-dummy.so %license LICENSE.APLv2