From 63bd7549613177432b4c1b124d8fccd47256cda7 Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Wed, 10 Oct 2018 22:24:52 +0300 Subject: [PATCH] pacvis-git: Add patch for systemd service file --- pacvis-git/patch_pacvis-service.patch | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pacvis-git/patch_pacvis-service.patch diff --git a/pacvis-git/patch_pacvis-service.patch b/pacvis-git/patch_pacvis-service.patch new file mode 100644 index 0000000..8725e54 --- /dev/null +++ b/pacvis-git/patch_pacvis-service.patch @@ -0,0 +1,31 @@ +Pekka Helenius (~Fincer): +Fix crucial issues of PacVis server default behavior + - run the server as a user, not as root + Root is not truly required and may cause serious security issues + + - remove non-working restart loop which renders the server unusable + - increase memory limit. Adjust for your needs + +--- a/pacvis@.service ++++ b/pacvis@.service +@@ -3,14 +3,12 @@ + After=network.target + + [Service] +-ExecStart=/usr/bin/pacvis -p %i ++User=%i ++ExecStart=/usr/bin/pacvis ++PrivateTmp=true + +-# Limit memory at 400M to workaround pyalpm potential memory leak +-LimitAS=400M +- +-# Restart every >2 seconds to avoid StartLimitInterval failure +-RestartSec=2 +-Restart=always ++# Limit memory at 1000M to workaround pyalpm potential memory leak ++LimitAS=1000M + + [Install] +-WantedBy=multi-user.target ++WantedBy=default.target