SHA256
1
0
forked from pool/gromox

- Add 0001-snapshot-safer-parsing-of-snapshot.cfg.patch [boo#1209051]

OBS-URL: https://build.opensuse.org/package/show/server:mail/gromox?expand=0&rev=38
This commit is contained in:
Jan Engelhardt 2023-03-13 09:13:55 +00:00 committed by Git OBS Bridge
parent f70943afd1
commit 6e06289f53
3 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From 61b4c3b06c260fcc3d5c13cf455ea919e34d3cc8 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 13 09:13:31 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
- Add 0001-snapshot-safer-parsing-of-snapshot.cfg.patch
[boo#1209051]
-------------------------------------------------------------------
Thu Mar 9 23:44:07 UTC 2023 - Jan Engelhardt <jengelh@inai.de>

View File

@ -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