From 1a528e0650495900243356715651b839114936c7 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 28 Jan 2026 11:43:34 +0100 Subject: [PATCH 1/6] Harmonize systemd service config on RPM/Deb --- debian/metaproxy.default | 8 -------- debian/metaproxy.service | 1 + debian/rules | 3 +++ rpm/metaproxy.sysconfig | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 debian/metaproxy.default diff --git a/debian/metaproxy.default b/debian/metaproxy.default deleted file mode 100644 index 550fe055..00000000 --- a/debian/metaproxy.default +++ /dev/null @@ -1,8 +0,0 @@ -# Metaproxy user information -SERVER_HOME=/var/lib/metaproxy -SERVER_USER=metaproxy -SERVER_NAME="Metaproxy user" -SERVER_GROUP=metaproxy -# Options passed in metaproxy.service -# Do *not* use -D unless changing Type=fork -OPTIONS="-u ${SERVER_USER} -l /var/log/metaproxy.log -c /etc/metaproxy/metaproxy.xml" diff --git a/debian/metaproxy.service b/debian/metaproxy.service index d41ae7ef..55f782c0 100644 --- a/debian/metaproxy.service +++ b/debian/metaproxy.service @@ -7,6 +7,7 @@ After=network.target [Service] Type=exec +EnvironmentFile=/etc/metaproxy/metaproxy.user EnvironmentFile=/etc/default/metaproxy Restart=on-abort KillMode=process diff --git a/debian/rules b/debian/rules index b75b7889..02196504 100755 --- a/debian/rules +++ b/debian/rules @@ -18,6 +18,9 @@ override_dh_auto_install: mv debian/tmp/usr/share/doc/metaproxy debian/tmp/usr/share/doc/metaproxy-doc mkdir -p debian/tmp/etc/metaproxy cp debian/metaproxy.xml debian/tmp/etc/metaproxy/metaproxy.xml + cp rpm/metaproxy.user debian/tmp/etc/metaproxy/metaproxy.user + mkdir -p debian/tmp/etc/default + cp rpm/metaproxy.sysconfig debian/tmp/etc/default/metaproxy override_dh_makeshlibs: dh_makeshlibs -V 'libmetaproxy6 (>= 1.12.0)' diff --git a/rpm/metaproxy.sysconfig b/rpm/metaproxy.sysconfig index 9c7f6219..6c20a3cc 100644 --- a/rpm/metaproxy.sysconfig +++ b/rpm/metaproxy.sysconfig @@ -1,4 +1,4 @@ # Defaults for metaproxy -OPTIONS="-u $SERVER_USER -l /var/log/metaproxy.log -c /etc/metaproxy/metaproxy.xml" +OPTIONS="-u ${SERVER_USER} -l /var/log/metaproxy.log -c /etc/metaproxy/metaproxy.xml" # The following options should not be set, because init.d script # already sets them: -p, -D, -t From 6eafaf1e85ce1d8750c4a4fc1093f9360310fd75 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 28 Jan 2026 12:12:44 +0100 Subject: [PATCH 2/6] Fixes --- debian/metaproxy.install | 2 ++ debian/metaproxy.postinst | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/metaproxy.install b/debian/metaproxy.install index 1c2f17e6..7e8e8430 100644 --- a/debian/metaproxy.install +++ b/debian/metaproxy.install @@ -1,4 +1,6 @@ etc/metaproxy/metaproxy.xml +etc/metaproxy/metaproxy.user +etc/default/metaproxy usr/bin/metaproxy usr/share/man/man1/metaproxy.1 usr/share/man/man3/* diff --git a/debian/metaproxy.postinst b/debian/metaproxy.postinst index deefd1c9..3b7772f2 100644 --- a/debian/metaproxy.postinst +++ b/debian/metaproxy.postinst @@ -4,7 +4,7 @@ set -e case "$1" in configure) - . /etc/default/metaproxy + . /etc/metaproxy/metaproxy.user # remove old init.d script if existing if [ -f /etc/init.d/metaproxy ]; then From df9a1e39f63dd5569c09abfb9ad74549841ac2f7 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 28 Jan 2026 12:59:28 +0100 Subject: [PATCH 3/6] Update rpm/metaproxy.sysconfig Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- rpm/metaproxy.sysconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/metaproxy.sysconfig b/rpm/metaproxy.sysconfig index 6c20a3cc..f5d7ae61 100644 --- a/rpm/metaproxy.sysconfig +++ b/rpm/metaproxy.sysconfig @@ -1,4 +1,4 @@ # Defaults for metaproxy OPTIONS="-u ${SERVER_USER} -l /var/log/metaproxy.log -c /etc/metaproxy/metaproxy.xml" -# The following options should not be set, because init.d script -# already sets them: -p, -D, -t +# The following options should not be set, because the systemd service +# (metaproxy.service) already sets them: -p, -D, -t From 816c13acb7b3eda24efd4550143cce29c386b12c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 28 Jan 2026 13:03:41 +0100 Subject: [PATCH 4/6] mention metaproxy.user --- rpm/metaproxy.sysconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rpm/metaproxy.sysconfig b/rpm/metaproxy.sysconfig index f5d7ae61..cbb51a02 100644 --- a/rpm/metaproxy.sysconfig +++ b/rpm/metaproxy.sysconfig @@ -1,4 +1,3 @@ # Defaults for metaproxy +# SERVER_USER is defined in /etc/metaprox/metaproxy.user OPTIONS="-u ${SERVER_USER} -l /var/log/metaproxy.log -c /etc/metaproxy/metaproxy.xml" -# The following options should not be set, because the systemd service -# (metaproxy.service) already sets them: -p, -D, -t From 38c45eab49424e12d3b980675a011fb00449f026 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 28 Jan 2026 13:13:36 +0100 Subject: [PATCH 5/6] Mention service --- rpm/metaproxy.sysconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/rpm/metaproxy.sysconfig b/rpm/metaproxy.sysconfig index cbb51a02..a4eb3ef4 100644 --- a/rpm/metaproxy.sysconfig +++ b/rpm/metaproxy.sysconfig @@ -1,3 +1,4 @@ # Defaults for metaproxy # SERVER_USER is defined in /etc/metaprox/metaproxy.user +# Options used for starting metaproxy in metaproxy.service OPTIONS="-u ${SERVER_USER} -l /var/log/metaproxy.log -c /etc/metaproxy/metaproxy.xml" From bb905d27ae86feb29f625a61e680958b638e767a Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 28 Jan 2026 14:28:57 +0100 Subject: [PATCH 6/6] Update rpm/metaproxy.sysconfig Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- rpm/metaproxy.sysconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/metaproxy.sysconfig b/rpm/metaproxy.sysconfig index a4eb3ef4..a59462d5 100644 --- a/rpm/metaproxy.sysconfig +++ b/rpm/metaproxy.sysconfig @@ -1,4 +1,4 @@ # Defaults for metaproxy -# SERVER_USER is defined in /etc/metaprox/metaproxy.user +# SERVER_USER is defined in /etc/metaproxy/metaproxy.user # Options used for starting metaproxy in metaproxy.service OPTIONS="-u ${SERVER_USER} -l /var/log/metaproxy.log -c /etc/metaproxy/metaproxy.xml"