diff --git a/0001-snapshot-safer-parsing-of-snapshot.cfg.patch b/0001-snapshot-safer-parsing-of-snapshot.cfg.patch new file mode 100644 index 0000000..44ab01b --- /dev/null +++ b/0001-snapshot-safer-parsing-of-snapshot.cfg.patch @@ -0,0 +1,32 @@ +From 61b4c3b06c260fcc3d5c13cf455ea919e34d3cc8 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Mon, 13 Mar 2023 07:09:08 +0100 +Subject: [PATCH] snapshot: safer parsing of snapshot.cfg + +--- + tools/gromox-snapshot | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git tools/gromox-snapshot tools/gromox-snapshot +index 44dc904dd..0fe3fac78 100755 +--- tools/gromox-snapshot ++++ tools/gromox-snapshot +@@ -9,7 +9,14 @@ retention_hours=0 + subvolume_root="/var/lib/gromox" + snapshot_archive="/var/lib/gromox-snapshots" + if [ -e /etc/gromox/snapshot.cfg ]; then +- . /etc/gromox/snapshot.cfg ++ str=$(awk -F= '{if($1=="subvolume_root"){print$2}}' /etc/gromox/snapshot.cfg) ++ if [ -n "$str" ]; then ++ subvolume_root="$str" ++ fi ++ str=$(awk -F= '{if($1=="snapshot_archive"){print$2}}' /etc/gromox/snapshot.cfg) ++ if [ -n "$str" ]; then ++ snapshot_archive="$str" ++ fi + fi + DB="$subvolume_root" + S="$snapshot_archive" +-- +2.39.2 + diff --git a/gromox.changes b/gromox.changes index 312dbc8..1d10529 100644 --- a/gromox.changes +++ b/gromox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 13 09:13:31 UTC 2023 - Jan Engelhardt + +- Add 0001-snapshot-safer-parsing-of-snapshot.cfg.patch + [boo#1209051] + ------------------------------------------------------------------- Thu Mar 9 23:44:07 UTC 2023 - Jan Engelhardt diff --git a/gromox.spec b/gromox.spec index 1f6f275..496d1d9 100644 --- a/gromox.spec +++ b/gromox.spec @@ -28,6 +28,7 @@ URL: https://grommunio.com/ Source: https://github.com/grommunio/gromox/releases/download/%name-%version/%name-%version.tar.zst Source2: https://github.com/grommunio/gromox/releases/download/%name-%version/%name-%version.tar.asc Source8: %name.keyring +Patch1: 0001-snapshot-safer-parsing-of-snapshot.cfg.patch BuildRequires: automake >= 1.11 BuildRequires: fdupes BuildRequires: gcc-c++ @@ -115,7 +116,7 @@ grommunio-web. The grommunio appliance ships these essentials and has a ready-to-run installation of Gromox. %prep -%autosetup -p1 +%autosetup -p0 %build autoreconf -fi