summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorjh9216.park <jh9216.park@samsung.com>2022-07-21 02:05:49 -0400
committerjh9216.park <jh9216.park@samsung.com>2022-08-29 00:36:32 -0400
commit665adc112fe531d15f9fa890dae540bacdc234d6 (patch)
tree10b3059dba4a3d7ff01248418101f5af3da7f5a5 /packaging
parent4d4e89e483c0fc3e4d3b1f24023501d392d17152 (diff)
downloadslp-pkgmgr-rdtp.tar.gz
slp-pkgmgr-rdtp.tar.bz2
slp-pkgmgr-rdtp.zip
Refactor pkgmgr using TIDLrdtp
Change-Id: I8eaf77636cc56a117c42a2553846f0f61af08188 Signed-off-by: jh9216.park <jh9216.park@samsung.com>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/pkgmgr-installer-signal-agent.service6
-rw-r--r--packaging/pkgmgr-installer-signal-agent.socket7
-rw-r--r--packaging/pkgmgr.changes18
-rw-r--r--packaging/pkgmgr.conf2
-rw-r--r--packaging/pkgmgr.spec62
5 files changed, 52 insertions, 43 deletions
diff --git a/packaging/pkgmgr-installer-signal-agent.service b/packaging/pkgmgr-installer-signal-agent.service
deleted file mode 100644
index 545ff4a..0000000
--- a/packaging/pkgmgr-installer-signal-agent.service
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=Package Manager Installer Signal Agent on User Session
-
-[Service]
-Type=oneshot
-ExecStart=/usr/bin/pkgmgr-installer-signal-agent
diff --git a/packaging/pkgmgr-installer-signal-agent.socket b/packaging/pkgmgr-installer-signal-agent.socket
deleted file mode 100644
index 2e767cd..0000000
--- a/packaging/pkgmgr-installer-signal-agent.socket
+++ /dev/null
@@ -1,7 +0,0 @@
-[Socket]
-ListenStream=/run/pkgmgr/agent/%U
-SocketMode=0777
-DirectoryMode=0777
-
-[Install]
-WantedBy=sockets.target
diff --git a/packaging/pkgmgr.changes b/packaging/pkgmgr.changes
deleted file mode 100644
index 101d179..0000000
--- a/packaging/pkgmgr.changes
+++ /dev/null
@@ -1,18 +0,0 @@
-* Tue Jul 02 2013 Junfeng Dong <junfeng.dong@intel.com> accepted/tizen/20130603.181624@c6b4eaa
-- Link pkgmgr-info after pkgmgr-parse to fix the build error in mobile.
-
-* Thu Jun 27 2013 Anas Nashif <anas.nashif@intel.com> accepted/tizen/20130603.181624@3e413f3
-- Spec file clean up, install configs in /etc
-
-* Mon Jun 03 2013 Anas Nashif <anas.nashif@intel.com> submit/tizen/20130601.183631@fff80e8
-- Fixed build on 64 bit systems
-
-* Sat Jun 01 2013 Anas Nashif <anas.nashif@intel.com> submit/tizen/20130517.185027@a8c5788
-- Remove license/group placeholders
-
-* Mon May 20 2013 Rusty Lynch <rusty.lynch@intel.com> accepted/tizen/20130520.103548@a8c5788
-- Fix install of package in a buildroot environment
-
-* Fri May 17 2013 Anas Nashif <anas.nashif@intel.com> submit/tizen/20130517.044823@933748f
-- do not exclude binaries, just delete them
-
diff --git a/packaging/pkgmgr.conf b/packaging/pkgmgr.conf
index c92c823..642a6f1 100644
--- a/packaging/pkgmgr.conf
+++ b/packaging/pkgmgr.conf
@@ -1,4 +1,4 @@
d /tmp/pkgmgr 1777 root users
t /tmp/pkgmgr - - - - security.SMACK64="User::App::Shared"
t /tmp/pkgmgr - - - - security.SMACK64TRANSMUTE="TRUE"
-d /run/pkgmgr/agent 0777 root users -
+
diff --git a/packaging/pkgmgr.spec b/packaging/pkgmgr.spec
index 8a55db3..847c11f 100644
--- a/packaging/pkgmgr.spec
+++ b/packaging/pkgmgr.spec
@@ -12,8 +12,6 @@ Source1004: %{name}-installer.manifest
Source1005: %{name}-installer-devel.manifest
Source1006: %{name}-types-devel.manifest
Source1007: %{name}.conf
-Source1008: %{name}-installer-signal-agent.service
-Source1009: %{name}-installer-signal-agent.socket
Requires(post): /usr/sbin/useradd
Requires(post): capi-system-info
@@ -32,13 +30,29 @@ BuildRequires: pkgconfig(db-util)
BuildRequires: pkgconfig(libsmack)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(minizip)
+BuildRequires: pkgconfig(rpc-port)
+BuildRequires: pkgconfig(capi-appfw-event)
+BuildRequires: pkgconfig(gmock)
BuildRequires: pkgmgr-info-parser-devel
BuildRequires: pkgmgr-info-parser
BuildRequires: fdupes
+BuildRequires: tidl
+
+%if 0%{?gcov:1}
+BuildRequires: lcov
+%endif
%description
Packager Manager client library package for packaging
+%if 0%{?gcov:1}
+%package gcov
+Summary: Packager Manager library (gcov)
+Group: Application Framework/Testing
+
+%description gcov
+Packager Manager library gcov objects
+%endif
%package client
Summary: Package Manager client library develpoment package
@@ -86,15 +100,37 @@ Package Manager client types develpoment package for packaging
%prep
%setup -q
cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} %{SOURCE1005} %{SOURCE1006} .
+tidlc -p -l C++ -i ./tidl/PkgMgr.tidl -o PkgMgrProxy
+mv PkgMgrProxy.* ./client/src/
+tidlc -g -l C++ -i ./tidl/PkgSignal.tidl -o PkgSignal
+cp PkgSignal.* ./client/src/
+mv PkgSignal.* ./installer/src/
%build
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export FFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
%__make %{?_smp_mflags}
+%if 0%{?gcov:1}
+mkdir -p gcov-obj
+find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
+%endif
+
%install
%make_install
+
+%if 0%{?gcov:1}
+mkdir -p %{buildroot}%{_datadir}/gcov/obj/%{name}
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj/%{name}
+%endif
+
rm -f %{buildroot}%{_bindir}/pkgmgr_backend_sample
rm -f %{buildroot}%{_libdir}/libpkgmgr_backend_lib_sample.so
rm -f %{buildroot}%{_libdir}/libpkgmgr_parser_lib_sample.so
@@ -102,11 +138,6 @@ rm -f %{buildroot}%{_libdir}/libpkgmgr_parser_lib_sample.so
mkdir -p %{buildroot}%{_tmpfilesdir}/
install -m 0644 %{SOURCE1007} %{buildroot}%{_tmpfilesdir}/pkgmgr.conf
-mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants
-install -m 0644 %{SOURCE1008} %{buildroot}%{_unitdir_user}/pkgmgr-installer-signal-agent.service
-install -m 0644 %{SOURCE1009} %{buildroot}%{_unitdir_user}/pkgmgr-installer-signal-agent.socket
-ln -sf ../pkgmgr-installer-signal-agent.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/pkgmgr-installer-signal-agent.socket
-
mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backend
mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backendlib
mkdir -p %{buildroot}%{_sysconfdir}/opt/upgrade
@@ -118,6 +149,14 @@ chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/pkgmgr
touch %{buildroot}%{_sysconfdir}/package-manager/backend/pkgtool
chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/pkgtool
+%check
+export LD_LIBRARY_PATH=../../client
+ctest -V
+
+%if 0%{?gcov:1}
+lcov -c --ignore-errors graph --no-external -b . -d . -o %{name}.info
+genhtml %{name}.info -o out --legend --show-details
+%endif
%fdupes %{buildroot}
@@ -196,10 +235,6 @@ rm -rf %{_sysconfdir}/package-manager/pkgmgr-label-initial-image.sh
%license LICENSE
%defattr(-,root,root,-)
%{_libdir}/libpkgmgr_installer.so.*
-%{_bindir}/pkgmgr-installer-signal-agent
-%{_unitdir_user}/pkgmgr-installer-signal-agent.service
-%{_unitdir_user}/pkgmgr-installer-signal-agent.socket
-%{_unitdir_user}/sockets.target.wants/pkgmgr-installer-signal-agent.socket
%files installer-devel
%manifest %{name}-installer-devel.manifest
@@ -215,3 +250,8 @@ rm -rf %{_sysconfdir}/package-manager/pkgmgr-label-initial-image.sh
%defattr(-,root,root,-)
%{_includedir}/package-manager-*.h
%{_libdir}/pkgconfig/pkgmgr-types.pc
+
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/*
+%endif