Build of system-server fails for OBS projects with enabled debuginfo and
defined 'simulator' macro with this error:
error: Installed (but unpackaged) file(s) found:
/usr/lib/debug/.build-id/6e/
480d9a978edacf116bd409aa09b97923290f3b
/usr/lib/debug/.build-id/6e/
480d9a978edacf116bd409aa09b97923290f3b.debug
/usr/lib/debug/usr/bin/restart.debug
The reason of this failure is explained in this bug
https://bugzilla.redhat.com/show_bug.cgi?id=878863#c2:
Debuginfo generation operates on the disk contents and knows exactly
nothing about specs.
In plain English it means that debuginfo doesn't care about %exclude
statements in %files section of the .spec and processes all binaries,
installed into build root.
This fix removes /usr/bin/restart from buildroot to avoid generation of
debug info for it if 'simulator' macro is defined and includes this binary
into the package only if 'simulator' macro is not defined.
Change-Id: I8368ecc53edb54fb068d394db1abf8d1d73e593a
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
%install_service graphical.target.wants zbooting-done.service
install -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/zbooting-done.service
+%if 0%{?simulator}
+rm -f %{buildroot}%{_bindir}/restart
+%endif
+
%post
#memory type vconf key init
vconftool set -t int memory/sysman/usbhost_status -1 -i
%{_bindir}/system_server
/opt/etc/smack/accesses.d/system-server.rule
%{_libdir}/system-server/shutdown.sh
-%if 0%{?simulator}
-%exclude %{_bindir}/restart
-%else
+%if %{undefined simulator}
%{_bindir}/restart
%endif
%{_bindir}/movi_format.sh