From bdab22801c12933a866104695e353e5573fb55f1 Mon Sep 17 00:00:00 2001 From: Hyotaek Shim Date: Fri, 1 Jun 2018 11:37:35 +0900 Subject: Add msg-server.service adaptation for ASAN MemoryLimit=30M is required to avoid memory limit violation on ASAN binary. Change-Id: I4a126c8f0f62f61789d8980f9a852a9d7e310f52 Signed-off-by: Hyotaek Shim --- packaging/msg-server.asan.conf | 2 ++ packaging/msg-service.spec | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 packaging/msg-server.asan.conf diff --git a/packaging/msg-server.asan.conf b/packaging/msg-server.asan.conf new file mode 100644 index 0000000..85be7c2 --- /dev/null +++ b/packaging/msg-server.asan.conf @@ -0,0 +1,2 @@ +[Service] +MemoryLimit=30M diff --git a/packaging/msg-service.spec b/packaging/msg-service.spec index ae0bde5..8fff2db 100755 --- a/packaging/msg-service.spec +++ b/packaging/msg-service.spec @@ -7,6 +7,7 @@ Group: System/Libraries Source0: %{name}-%{version}.tar.gz Source1: msg-server.service Source2: msg-server.socket +Source3: msg-server.asan.conf Requires(post): /usr/bin/sqlite3 Requires(post): /sbin/ldconfig @@ -156,6 +157,10 @@ install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/msg-server.service mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}/msg-server.socket %install_service sockets.target.wants msg-server.socket +%if "%{asan}" == "1" +mkdir -p %{buildroot}%{_unitdir}/msg-server.service.d +install -m 644 %SOURCE3 %{buildroot}%{_unitdir}/msg-server.service.d/msg-server.asan.conf +%endif mkdir -p %{buildroot}%{TZ_SYS_GLOBALUSER_DB} sqlite3 %{buildroot}%{TZ_SYS_GLOBALUSER_DB}/.msg_service.db "PRAGMA journal_mode = PERSIST;" @@ -228,6 +233,9 @@ setfacl -m group:priv_message_write:rw %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipc %{_unitdir}/multi-user.target.wants/msg-server.service %{_unitdir}/msg-server.socket %{_unitdir}/sockets.target.wants/msg-server.socket +%if "%{asan}" == "1" +%{_unitdir}/msg-server.service.d/msg-server.asan.conf +%endif %files devel %license LICENSE.APLv2 -- cgit v1.2.3