packaging: Split packages to allow installing only bugreport-service with its deps 14/254814/3
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Tue, 9 Mar 2021 13:55:15 +0000 (14:55 +0100)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Tue, 9 Mar 2021 21:14:06 +0000 (22:14 +0100)
Change-Id: I8e225cc465b6a6585fd7f3f292e249a27bcff898

packaging/crash-worker.spec

index 0a4b00b..30905dd 100644 (file)
@@ -4,11 +4,16 @@
 %define _with_tests on
 %define _with_livedumper on
 %define _with_bugreportservice on
+
 %bcond_with doc
 %bcond_with tests
 %bcond_with livedumper
 %bcond_with bugreportservice
 
+%if %{?_with_bugreportservice} == on
+%define _with_livedumper on
+%endif
+
 # NOTE: To disable coredump set DumpCore=0 in configuration file
 
 Name:           crash-worker
@@ -44,23 +49,40 @@ BuildRequires:  boost-devel
 Requires(post): coreutils
 Requires(post): tar
 Requires(post): gzip
-Requires:       zip
-Requires:       libdw
 Requires:       minicoredumper >= 2.1.0
+%description
+
+%package        dumpsystemstate-config
+Summary:        common configuration for dump_systemstate utility and bugreport-service
+%description    dumpsystemstate-config
+
+%package -n     crash-manager-core
+Summary:        package provides core crash-manager functionality - needed utilities and library
+Requires:       %{name}-dumpsystemstate-config = %{version}-%{release}
+Requires:       zip
 Requires:       %{_bindir}/buxton2ctl
 %if %{with bugreportservice}
 Requires:       %{name}-livedumper = %{version}-%{release}
 %endif
-%description
+%description -n crash-manager-core
+
+%package -n     libcrash-manager-devel
+Summary:        package provides headers needed to develop programs using libcrash-manager
+%description -n libcrash-manager-devel
 
+%if %{with bugreportservice}
 %package -n     libbugreport
 Summary:        libbugreport provides API to communicate with bugreport-service
 %description -n libbugreport
 
-%package        devel
-Requires:       libbugreport
-Summary:        Crash-manager headers and library for linking
-%description    devel
+%package -n     bugreport-service
+Summary:        bugreport provides dumpsys provider for diagnostics data
+%description -n bugreport-service
+
+%package -n     libbugreport-devel
+Summary:        package provides headers needed to develop programs using bugreport-service
+%description -n libbugreport-devel
+%endif
 
 %if %{with doc}
 %package        doc
@@ -92,6 +114,8 @@ Requires:       /usr/bin/unzip
 Requires:       /usr/bin/mcookie
 Requires:       %{_sbindir}/minicoredumper
 Requires:       %{name}-system-tests-debuginfo = %{version}-%{release}
+Requires:      %{name}
+Requires:      %{name}-livecoredumper = %{version}-%{release}
 %description    system-tests
 
 %prep
@@ -179,44 +203,58 @@ if [ $1 -eq 2 ] ; then
 fi
 
 %files
-%license LICENSE LICENSE.BSD LICENSE.MIT
+%license LICENSE
 %manifest crash-worker.manifest
 %defattr(-,crash_worker,crash_worker,-)
 %dir %{crash_root_path}
 %attr(0775,crash_worker,crash_worker) %{crash_path}
-%{_sysconfdir}/crash-manager.conf
-%{_sysconfdir}/crash-manager.conf.d/crash-manager.conf.example
 %attr(-,root,root) %{_prefix}/lib/sysctl.d/70-crash-manager.conf
 %attr(0750,crash_worker,crash_worker) %{_bindir}/crash-manager
-%attr(0750,crash_worker,crash_worker) %{_bindir}/dump_systemstate
-%{_bindir}/crash-json2info
+%attr(-,root,root) %{upgrade_script_path}/500.crash-manager-upgrade.sh
+
+%files dumpsystemstate-config
+%license LICENSE
 %{_sysconfdir}/dump_systemstate.conf.d/files/*.conf*
 %{_sysconfdir}/dump_systemstate.conf.d/programs/*.conf*
+
+%files -n crash-manager-core
+%license LICENSE LICENSE.BSD LICENSE.MIT
+%manifest crash-worker.manifest
+%{_libdir}/libcrash-manager.so.*
+%{_bindir}/crash-json2info
+%attr(0750,crash_worker,crash_worker) %{_bindir}/dump_systemstate
 %{_libexecdir}/crash-stack
 %{_libexecdir}/crash-popup-launch
 %{_libexecdir}/crash-notify-send
-%{_libdir}/libcrash-manager.so.*
+%{_sysconfdir}/crash-manager.conf
+%{_sysconfdir}/crash-manager.conf.d/crash-manager.conf.example
+
+%files -n libcrash-manager-devel
+%license LICENSE
+%manifest crash-worker.manifest
+%{_includedir}/crash-manager.h
+%{_libdir}/libcrash-manager.so
+%{_libdir}/pkgconfig/crash-manager.pc
 
 %if %{with bugreportservice}
+%files -n bugreport-service
+%license LICENSE
+%manifest crash-worker.manifest
 %attr(0750,crash_worker,crash_worker) %{_bindir}/bugreport-service
 %attr(-,root,root) %{_unitdir}/bugreport.service
 %attr(-,root,root) %{_sysconfdir}/dbus-1/system.d/bugreport-service.conf
 %attr(-,root,root) %{_datadir}/dbus-1/system-services/org.tizen.system.crash.livedump.service
 %attr(-,root,root) %{_datadir}/dbus-1/system-services/org.tizen.system.diagnostics.service
 %attr(0644,root,root) %{_prefix}/lib/tmpfiles.d/diagnostics-run.conf
-%endif
-
-#upgrade script
-%attr(-,root,root) %{upgrade_script_path}/500.crash-manager-upgrade.sh
 
 %files -n libbugreport
+%license LICENSE
+%manifest crash-worker.manifest
 %{_libdir}/libbugreport.so.*
 
-%files devel
-%{_includedir}/crash-manager.h
-%{_libdir}/libcrash-manager.so
-%{_libdir}/pkgconfig/crash-manager.pc
-%if %{with bugreportservice}
+%files -n libbugreport-devel
+%license LICENSE
+%manifest crash-worker.manifest
 %{_includedir}/libbugreport.h
 %{_libdir}/libbugreport.so
 %{_libdir}/pkgconfig/bugreport.pc