backrest: 1.13.0 -> 1.14.1

Diff: https://github.com/garethgeorge/backrest/compare/v1.13.0...v1.14.1
Changelog: https://github.com/garethgeorge/backrest/releases/tag/v1.14.1

Add backrest-tray with tray support enabled.

Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
This commit is contained in:
phanirithvij
2026-07-12 14:30:20 +05:30
parent 052c7170b6
commit 62a87bee49
4 changed files with 123 additions and 4 deletions
@@ -0,0 +1,52 @@
From c2d19683ba90d7cd3919ca3ea21ae4332d3ea82b Mon Sep 17 00:00:00 2001
From: phanirithvij <phanirithvij2000@gmail.com>
Date: Sun, 12 Jul 2026 14:39:09 +0530
Subject: [PATCH 1/3] fix: rm deprecated import
github.com/ncruces/go-sqlite3/embed
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
---
internal/kvstore/sqlitekvstore.go | 1 -
internal/logstore/logstore.go | 1 -
internal/oplog/sqlitestore/sqlitestore.go | 1 -
3 files changed, 3 deletions(-)
diff --git a/internal/kvstore/sqlitekvstore.go b/internal/kvstore/sqlitekvstore.go
index 9453228..e360a2c 100644
--- a/internal/kvstore/sqlitekvstore.go
+++ b/internal/kvstore/sqlitekvstore.go
@@ -8,7 +8,6 @@ import (
"strings"
_ "github.com/ncruces/go-sqlite3/driver"
- _ "github.com/ncruces/go-sqlite3/embed"
)
var ErrNotExist = errors.New("key does not exist")
diff --git a/internal/logstore/logstore.go b/internal/logstore/logstore.go
index 48e0509..dd6ac17 100644
--- a/internal/logstore/logstore.go
+++ b/internal/logstore/logstore.go
@@ -17,7 +17,6 @@ import (
"github.com/hashicorp/go-multierror"
_ "github.com/ncruces/go-sqlite3/driver"
- _ "github.com/ncruces/go-sqlite3/embed"
"go.uber.org/zap"
)
diff --git a/internal/oplog/sqlitestore/sqlitestore.go b/internal/oplog/sqlitestore/sqlitestore.go
index 41b12ac..08a53e0 100644
--- a/internal/oplog/sqlitestore/sqlitestore.go
+++ b/internal/oplog/sqlitestore/sqlitestore.go
@@ -27,7 +27,6 @@ import (
"github.com/gofrs/flock"
_ "github.com/ncruces/go-sqlite3/driver"
- _ "github.com/ncruces/go-sqlite3/embed"
"github.com/ncruces/go-sqlite3/vfs"
"github.com/ncruces/go-sqlite3/vfs/memdb"
_ "github.com/ncruces/go-sqlite3/vfs/memdb"
--
2.54.0
@@ -0,0 +1,26 @@
From 2d84683ee874d9f7ca506c61f810aaf4bdc06e63 Mon Sep 17 00:00:00 2001
From: phanirithvij <phanirithvij2000@gmail.com>
Date: Sun, 12 Jul 2026 15:12:39 +0530
Subject: [PATCH 2/3] fix: exit after printing version
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
---
cmd/backrest/backrest.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/backrest/backrest.go b/cmd/backrest/backrest.go
index dd59512..9c0ca7e 100644
--- a/cmd/backrest/backrest.go
+++ b/cmd/backrest/backrest.go
@@ -58,7 +58,7 @@ func runApp() {
flag.Parse()
if *printVersion {
fmt.Printf("backrest version: %s, commit: %s\n", version, commit)
- return
+ os.Exit(0)
}
installLoggers(version, commit)
--
2.54.0
@@ -0,0 +1,28 @@
From 809a1e95a2d322ac2c00f95a274b639860d3b5bc Mon Sep 17 00:00:00 2001
From: phanirithvij <phanirithvij2000@gmail.com>
Date: Sun, 12 Jul 2026 16:07:29 +0530
Subject: [PATCH 3/3] fix: quit tray on graceful shutdown
---
cmd/backrest/tray.go | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cmd/backrest/tray.go b/cmd/backrest/tray.go
index 68db4f2..cca1b36 100644
--- a/cmd/backrest/tray.go
+++ b/cmd/backrest/tray.go
@@ -16,7 +16,10 @@ func startTray() {
status := newTrayStatus()
// Observe oplog status in-process so the icon can reflect backup state.
onOpLogReady = status.attach
- go runApp()
+ go func() {
+ runApp()
+ systray.Quit()
+ }()
systray.Run(func() { onReady(status) }, func() {})
}
--
2.54.0
+17 -4
View File
@@ -22,13 +22,13 @@ let
pnpm = pnpm_11;
pname = "backrest";
version = "1.13.0";
version = "1.14.1";
src = fetchFromGitHub {
owner = "garethgeorge";
repo = "backrest";
tag = "v${version}";
hash = "sha256-JcrHQDjoaaK6BONEcn6XKsjhGlth4SaZKqfxa3cD0gY=";
hash = "sha256-RxjPjvnKy8UM1OXRklJF/HSZ6FMiHWYQBsZ6owMJMF0=";
leaveDotGit = true;
postFetch = ''
cd "$out"
@@ -62,7 +62,7 @@ let
inherit pnpm;
sourceRoot = "${finalAttrs.src.name}/webui";
fetcherVersion = 4;
hash = "sha256-xPZg7kYRlqdO/EfZr+m+IVhDcyYegQ6v8ZAF2EjrKjU=";
hash = "sha256-y6NYFPepibiTuvPMwyc5cN3TwAc2W7RtPbCmzWDozNQ=";
};
postPatch = ''
@@ -99,6 +99,15 @@ buildGoModule (finalAttrs: {
__structuredAttrs = true;
strictDeps = true;
patches = [
# https://github.com/garethgeorge/backrest/pull/1293
./0001-fix-rm-deprecated-import-github.com-ncruces-go-sqlit.patch
# https://github.com/garethgeorge/backrest/pull/1294
./0002-fix-exit-after-printing-version.patch
# https://github.com/garethgeorge/backrest/pull/1295
./0003-fix-quit-tray-on-graceful-shutdown.patch
];
postPatch = ''
sed -i -e \
'/func installRestic(targetPath string) error {/a\
@@ -107,7 +116,7 @@ buildGoModule (finalAttrs: {
'';
proxyVendor = true;
vendorHash = "sha256-1PecXGXdSu4FzOKVZ15lTLLPy3VlLiGvGeTUDzqe9sc=";
vendorHash = "sha256-yadRulgtcDPthWLeTydcMol/vwriflKvDu7zgoehZCM=";
subPackages = [ "cmd/backrest" ];
@@ -116,6 +125,8 @@ buildGoModule (finalAttrs: {
makeBinaryWrapper
];
tags = [ "tray" ];
ldflags = [
"-s"
"-X main.version=${finalAttrs.version}"
@@ -164,6 +175,8 @@ buildGoModule (finalAttrs: {
postInstall = ''
wrapProgram $out/bin/backrest \
--set-default BACKREST_RESTIC_COMMAND "${lib.getExe restic}"
makeBinaryWrapper $out/bin/backrest $out/bin/backrest-tray \
--add-flags "-tray"
'';
doInstallCheck = true;