19 Commits

Author SHA256 Message Date
6bf2c5a09f Accepting request 1318846 from Archiving
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1318846
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/restic?expand=0&rev=35
2025-11-21 15:55:37 +00:00
0093e0ff8e fix typos
OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=77
2025-11-13 10:24:26 +00:00
93e01cbd64 - Add fuse requirement as it's needed for mounting restic snapshots
and should as such be part of the package.

OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=76
2025-11-13 10:23:39 +00:00
f952d237dc Accepting request 1306369 from Archiving
Forwarded request #1306368 from darix

- update to 0.18.1
  - Fix #5324: Correctly handle backup --stdin-filename with
    directory paths
  - Fix #5325: Accept RESTIC_HOST environment variable in forget
    command
  - Fix #5342: Ignore "chmod not supported" errors when writing
    files
  - Fix #5344: Ignore EOPNOTSUPP errors for extended attributes
  - Fix #5421: Fix rare crash if directory is removed during backup
  - Fix #5429: Stop retrying uploads when rest-server runs out of
    space
  - Fix #5467: Improve handling of download retries in check
    command
  all details at https://github.com/restic/restic/releases/tag/v0.18.1
- refreshed testsuite-use-python3.patch

OBS-URL: https://build.opensuse.org/request/show/1306369
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/restic?expand=0&rev=34
2025-09-22 14:40:02 +00:00
ac9684ca38 - update to 0.18.1
- Fix #5324: Correctly handle backup --stdin-filename with
    directory paths
  - Fix #5325: Accept RESTIC_HOST environment variable in forget
    command
  - Fix #5342: Ignore "chmod not supported" errors when writing
    files
  - Fix #5344: Ignore EOPNOTSUPP errors for extended attributes
  - Fix #5421: Fix rare crash if directory is removed during backup
  - Fix #5429: Stop retrying uploads when rest-server runs out of
    space
  - Fix #5467: Improve handling of download retries in check
    command
  all details at https://github.com/restic/restic/releases/tag/v0.18.1
- refreshed testsuite-use-python3.patch

OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=74
2025-09-21 20:04:17 +00:00
caad1eb377 Accepting request 1294770 from Archiving
- Upstream's build.go auto-sets CGO_ENABLED=0, producing static binaries. As a
  distribution we generally prefer dynamically linked binaries, so use
  --enable-cgo. This won't really affect users in practice. (forwarded request 1294746 from cyphar)

OBS-URL: https://build.opensuse.org/request/show/1294770
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/restic?expand=0&rev=33
2025-07-21 18:00:55 +00:00
a6f806bb11 - Upstream's build.go auto-sets CGO_ENABLED=0, producing static binaries. As a
distribution we generally prefer dynamically linked binaries, so use
  --enable-cgo. This won't really affect users in practice.

OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=72
2025-07-21 09:19:31 +00:00
d504aec2cd - Fix rpmlint warnings about wrong line endings and .gitignore
files

- Port to actually using build.go 
  - adds the following patches
    build.patch
    disable-selfupdate.patch
- Prepare testsuite running. Can be disabled for local builds with
  --without=run_tests
  - adds the following patches
    testsuite-use-python3.patch

OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=71
2025-07-21 01:24:36 +00:00
9142989a3e - Go module building has worked in OBS for a few years now (and this package
switched to using obs-service-go_modules to generate a vendor.tar.gz a while
  ago). So we can remove GO111MODULES=off and all of the GOPATH magic, since
  "go build" just works with the current setup.
- Remove unneeded disable-selfupdate.patch -- we have never used build.go to
  build the binary, and this patch only modified build.go. The self-update
  feature is gated behind the "selfupdate" build tag, which is something we've
  never passed and so the feature has always been disabled regardless of the
  patch.

OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=70
2025-07-20 14:17:56 +00:00
3e87ec2b80 Accepting request 1265145 from Archiving
Add missing bugnumber

OBS-URL: https://build.opensuse.org/request/show/1265145
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/restic?expand=0&rev=32
2025-03-31 09:39:30 +00:00
93f167f4c1 - update to 0.18.0 (boo#1240262)
OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=68
2025-03-28 10:03:46 +00:00
8ec22e9d7a Accepting request 1264712 from Archiving
Forwarded request #1264710 from darix

- update to 0.18.0
  - Sec #5291: Mitigate attack on content-defined chunking
    algorithm
  - Fix #1843: Correctly restore long filepaths' timestamp on old
    Windows
  - Fix #2165: Ignore disappeared backup source files
  - Fix #5153: Include root tree when searching using find --tree
  - Fix #5169: Prevent Windows VSS event log 8194 warnings for
    backup with fs snapshot
  - Fix #5212: Fix duplicate data handling in prune --max-unused
  - Fix #5249: Fix creation of oversized index by repair index
    --read-all-packs
  - Fix #5259: Fix rare crash in command output
  - Chg #4938: Update dependencies and require Go 1.23 or newer
  - Chg #5162: Promote feature flags
  - Enh #1378: Add JSON support to check command
  - Enh #2511: Support generating shell completions to stdout
  - Enh #3697: Allow excluding online-only cloud files (e.g.
    OneDrive)
  - Enh #4179: Add sort option to ls command
  - Enh #4433: Change default sort order for find output
  - Enh #4521: Add support for Microsoft Blob Storage access tiers
  - Enh #4942: Add snapshot summary statistics to rewritten
    snapshots
  - Enh #4948: Format exit errors as JSON when requested
  - Enh #4983: Add SLSA provenance to GHCR container images
  - Enh #5054: Enable compression for ZIP archives in dump command
  - Enh #5081: Add retry mechanism for loading repository config
  - Enh #5089: Allow including/excluding extended file attributes
    during restore

OBS-URL: https://build.opensuse.org/request/show/1264712
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/restic?expand=0&rev=31
2025-03-27 21:34:53 +00:00
9d8d76050c - update to 0.18.0
- Sec #5291: Mitigate attack on content-defined chunking
    algorithm
  - Fix #1843: Correctly restore long filepaths' timestamp on old
    Windows
  - Fix #2165: Ignore disappeared backup source files
  - Fix #5153: Include root tree when searching using find --tree
  - Fix #5169: Prevent Windows VSS event log 8194 warnings for
    backup with fs snapshot
  - Fix #5212: Fix duplicate data handling in prune --max-unused
  - Fix #5249: Fix creation of oversized index by repair index
    --read-all-packs
  - Fix #5259: Fix rare crash in command output
  - Chg #4938: Update dependencies and require Go 1.23 or newer
  - Chg #5162: Promote feature flags
  - Enh #1378: Add JSON support to check command
  - Enh #2511: Support generating shell completions to stdout
  - Enh #3697: Allow excluding online-only cloud files (e.g.
    OneDrive)
  - Enh #4179: Add sort option to ls command
  - Enh #4433: Change default sort order for find output
  - Enh #4521: Add support for Microsoft Blob Storage access tiers
  - Enh #4942: Add snapshot summary statistics to rewritten
    snapshots
  - Enh #4948: Format exit errors as JSON when requested
  - Enh #4983: Add SLSA provenance to GHCR container images
  - Enh #5054: Enable compression for ZIP archives in dump command
  - Enh #5081: Add retry mechanism for loading repository config
  - Enh #5089: Allow including/excluding extended file attributes
    during restore

OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=66
2025-03-27 21:05:04 +00:00
3f1e36fd76 Accepting request 1252082 from Archiving
Forwarded request #1252081 from darix

- add bump-google-apis-for-oauth2-fix.patch:
  This patch is only applied for manually creating the vendor
  tarball with
  go mod vendor 
  tar cfvz ../vendor.tar.gz go.mod go.sum vendor
  
  the patched go.* files are in the vendor tarball afterwards.
  boo#1239264 CVE-2025-22868

OBS-URL: https://build.opensuse.org/request/show/1252082
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/restic?expand=0&rev=30
2025-03-11 19:46:49 +00:00
304bcb0bfa Accepting request 1252081 from home:darix:restic
- add bump-google-apis-for-oauth2-fix.patch:
  This patch is only applied for manually creating the vendor
  tarball with
  go mod vendor 
  tar cfvz ../vendor.tar.gz go.mod go.sum vendor
  
  the patched go.* files are in the vendor tarball afterwards.
  boo#1239264 CVE-2025-22868

OBS-URL: https://build.opensuse.org/request/show/1252081
OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=64
2025-03-11 14:28:30 +00:00
c374923f58 Accepting request 1225474 from Archiving
OBS-URL: https://build.opensuse.org/request/show/1225474
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/restic?expand=0&rev=29
2024-11-21 14:18:21 +00:00
a538c8d4a9 - Update to version 0.17.3
- Fix #4971: Fix unusable mount on macOS Sonoma
  - Fix #5003: Fix metadata errors during backup of removable disks
    on Windows
  - Fix #5101: Do not retry load/list operation if SFTP connection
    is broken
  - Fix #5107: Fix metadata error on Windows for backups using VSS
  - Enh #5096: Allow prune --dry-run without lock

OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=62
2024-11-21 08:45:31 +00:00
7ca9b63d5f Accepting request 1220415 from Archiving
OBS-URL: https://build.opensuse.org/request/show/1220415
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/restic?expand=0&rev=28
2024-11-04 21:41:49 +00:00
02c07f3ae3 - Update to version 0.17.2
- Fix #4004: Support container-level SAS/SAT tokens for Azure
    backend
  - Fix #5047: Resolve potential error during concurrent cache
    cleanup
  - Fix #5050: Return error if tag fails to lock repository
  - Fix #5057: Exclude irregular files from backups
  - Fix #5063: Correctly backup extended metadata when using VSS on
    Windows

OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=60
2024-11-03 11:54:44 +00:00
10 changed files with 270 additions and 49 deletions

21
build.patch Normal file
View File

@@ -0,0 +1,21 @@
Index: restic/build.go
===================================================================
--- restic.orig/build.go
+++ restic/build.go
@@ -132,6 +132,7 @@ func build(cwd string, env map[string]st
a = append(a, "-buildmode=pie")
}
+ a = append(a, "-mod=vendor")
a = append(a, args...)
cmd := exec.Command("go", a...)
cmd.Env = os.Environ()
@@ -386,7 +387,7 @@ func main() {
verbosePrintf("detected Go version %v\n", goVersion)
- preserveSymbols := false
+ preserveSymbols := true
for i := range buildTags {
buildTags[i] = strings.TrimSpace(buildTags[i])
if buildTags[i] == "debug" || buildTags[i] == "profile" {

View File

@@ -1,12 +1,13 @@
diff -uNr restic.org/build.go restic/build.go
--- restic.org/build.go 2023-01-16 23:09:42.559283644 +0100
+++ restic/build.go 2023-01-16 23:10:38.002960609 +0100
@@ -56,7 +56,7 @@
Name: "restic", // name of the program executable and directory
Namespace: "github.com/restic/restic", // subdir of GOPATH, e.g. "github.com/foo/bar"
Main: "./cmd/restic", // package name for the main package
- DefaultBuildTags: []string{"selfupdate"}, // specify build tags which are always used
+ //DefaultBuildTags: []string{"selfupdate"}, // specify build tags which are always used
Tests: []string{"./..."}, // tests to run
MinVersion: GoVersion{Major: 1, Minor: 18, Patch: 0}, // minimum Go version supported
Index: restic-0.18.0/build.go
===================================================================
--- restic-0.18.0.orig/build.go
+++ restic-0.18.0/build.go
@@ -58,7 +58,7 @@ var config = Config{
Main: "./cmd/restic", // package name for the main package
// disable_grpc_modules is necessary to reduce the binary size since cloud.google.com/go/storage v1.44.0
// see https://github.com/googleapis/google-cloud-go/issues/11448
- DefaultBuildTags: []string{"selfupdate", "disable_grpc_modules"}, // specify build tags which are always used
+ DefaultBuildTags: []string{"disable_grpc_modules"}, // specify build tags which are always used
Tests: []string{"./..."}, // tests to run
MinVersion: GoVersion{Major: 1, Minor: 23, Patch: 0}, // minimum Go version supported
}

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cba3a5759690d11dae4b5620c44f56be17a5688e32c9856776db8a9a93d6d59a
size 24104588

View File

@@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEz48Y8oRFdZc/edThkaaGi9P3qQcFAmbaBqAACgkQkaaGi9P3
qQcs6RAAv2Vgr80W3SRoV05p6xY+YuBw00feBZlUC/3O275u6mC/u1AdAL4m/WKr
m+mvC8dGsSZHYW7uZL6jAMVEVRP+Id6f3IoAReD6Nix85Hwuz985/ojyTtTERk9j
iUHmykE4gANmwBiMbklknz4Mme5UVmv2DqB7oyiz6fANTUd1Rpl2Ff56bikAJJKO
T+Edvr4CxB2PDqp4oNvueb1atvxGImsCyqNBf2dojtZX8gacVRFtVo0eurjl4fFa
lJgTsWsooF4XLwkBK1jV9iWS48ZjMK4o66mmhoNL/V7P9cv2OwGtc1lwIFpCA2LB
VSwBQTaYqHVtee+t9a+aKjZiJoSy4iUcT0qpeb3Fo2Rxg9kkW+gUebFQ6lDFdoRo
o/eKuJKWDnImvBiSJPPXxNDa6kBmhLZDwu+3836kDZC3V/misQ8Rkq9mIS5zH2RQ
9D4evXoRItHP+amSF54rXx7E8WZWq5Pj/vKCES3fN1UbzCgLXCGogNkVnru0eT+o
q0C6tWkugzjeZoToUlcPqhpwbBeGit3hPNTiQNTg1bOXAhlbVtvKH3476DVbxK/r
o/yTD0cKt3kD/+DmxqtdC9d9F+b7i2gr+kbmKPa1NOSK+WVMxvyQcY8q8Yk3s7qb
SFhYWe9k3oC+Lhrt81jYJT0eiotwnuz+swRhZhoJIY/XUKitKRY=
=+JXG
-----END PGP SIGNATURE-----

3
restic-0.18.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4b8e2b6cb20e9707e14b9b9d92ddb6f2e913523754e1f123e2e6f3321e67f7ca
size 24102654

16
restic-0.18.1.tar.gz.asc Normal file
View File

@@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEz48Y8oRFdZc/edThkaaGi9P3qQcFAmjQP5YACgkQkaaGi9P3
qQcCLg/9FRoBE6/PqxHHYoWL0pWhIFrFbKSHswiV7Ir7QTVK7ucOtVT5LL5omVNT
bV1hjf3LYv6yFs8H7GRx9S9iZEhiXWjL0sKH5sis08fEU13KO+luUxNEfBEQoEuv
dP0NadsnY5wP6mqcZ/esJkvWJ7UdSsX9uOAjUmM5ok0wqzl3RI4NgeHjtnbqyZe/
2cByq/NN8u/wr0MQH46cNGKEcI1ZI38/Iimi7KQmO1Ym42odVdqCOeNzageAmJHU
pySyk3GecNmH0C+v9+wVbZkO7KLJQEINbUhgFahtbBsPu9+Jcw7KjCzNuXPUQ4M5
w2IVCasMSJej5oElOZ4u76x5lxao5Z92KO6LtxbWN4qn1rCZLG5wc3SjEOaQ/VVB
/Jd0FDsthZW+YFGHa62A+fPDLEfBT1m/EXYJ8b7IO6xM/B1PVuMOMvvOnu3shRXk
aBh+/8wifxoBksNWud3LARME+Wxk9HmpLi3Bdby7RsftihH6h71RZLGoCCncG8Op
8wNtL+elP1gNXFFDuiUGtFQGNsQi/YyZPXK0KUwwiqfXP718vYDDH0xNoVRP3/cG
A9ZocqM5UGTd03LHydJHoCIBbjx8Pr+L4i92oyzfC/NRE2nR+HHIohdRN0hUE0SI
za+GUuNl1n/88D2y7G95D5Ft7SyVfhOXVg7IR+34ka4fqIvksY0=
=V2s2
-----END PGP SIGNATURE-----

View File

@@ -1,3 +1,154 @@
-------------------------------------------------------------------
Wed Nov 12 10:46:43 UTC 2025 - Pavel Dostál <pdostal@suse.com>
- Add fuse recommends as it's needed for mounting restic snapshots
and should as such be part of the package.
-------------------------------------------------------------------
Sun Sep 21 19:59:50 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
- update to 0.18.1
- Fix #5324: Correctly handle backup --stdin-filename with
directory paths
- Fix #5325: Accept RESTIC_HOST environment variable in forget
command
- Fix #5342: Ignore "chmod not supported" errors when writing
files
- Fix #5344: Ignore EOPNOTSUPP errors for extended attributes
- Fix #5421: Fix rare crash if directory is removed during backup
- Fix #5429: Stop retrying uploads when rest-server runs out of
space
- Fix #5467: Improve handling of download retries in check
command
all details at https://github.com/restic/restic/releases/tag/v0.18.1
- refreshed testsuite-use-python3.patch
-------------------------------------------------------------------
Mon Jul 21 01:26:02 UTC 2025 - Aleksa Sarai <asarai@suse.com>
- Upstream's build.go auto-sets CGO_ENABLED=0, producing static binaries. As a
distribution we generally prefer dynamically linked binaries, so use
--enable-cgo. This won't really affect users in practice.
-------------------------------------------------------------------
Sun Jul 20 14:31:36 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
- Fix rpmlint warnings about wrong line endings and .gitignore
files
-------------------------------------------------------------------
Sun Jul 20 14:21:26 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
- Port to actually using build.go
- adds the following patches
build.patch
disable-selfupdate.patch
- Prepare testsuite running. Can be disabled for local builds with
--without=run_tests
- adds the following patches
testsuite-use-python3.patch
-------------------------------------------------------------------
Tue Jul 1 08:42:11 UTC 2025 - Aleksa Sarai <asarai@suse.com>
- Go module building has worked in OBS for a few years now (and this package
switched to using obs-service-go_modules to generate a vendor.tar.gz a while
ago). So we can remove GO111MODULES=off and all of the GOPATH magic, since
"go build" just works with the current setup.
- Remove unneeded disable-selfupdate.patch -- we have never used build.go to
build the binary, and this patch only modified build.go. The self-update
feature is gated behind the "selfupdate" build tag, which is something we've
never passed and so the feature has always been disabled regardless of the
patch.
-------------------------------------------------------------------
Thu Mar 27 20:59:00 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
- update to 0.18.0 (boo#1240262)
- Sec #5291: Mitigate attack on content-defined chunking
algorithm
- Fix #1843: Correctly restore long filepaths' timestamp on old
Windows
- Fix #2165: Ignore disappeared backup source files
- Fix #5153: Include root tree when searching using find --tree
- Fix #5169: Prevent Windows VSS event log 8194 warnings for
backup with fs snapshot
- Fix #5212: Fix duplicate data handling in prune --max-unused
- Fix #5249: Fix creation of oversized index by repair index
--read-all-packs
- Fix #5259: Fix rare crash in command output
- Chg #4938: Update dependencies and require Go 1.23 or newer
- Chg #5162: Promote feature flags
- Enh #1378: Add JSON support to check command
- Enh #2511: Support generating shell completions to stdout
- Enh #3697: Allow excluding online-only cloud files (e.g.
OneDrive)
- Enh #4179: Add sort option to ls command
- Enh #4433: Change default sort order for find output
- Enh #4521: Add support for Microsoft Blob Storage access tiers
- Enh #4942: Add snapshot summary statistics to rewritten
snapshots
- Enh #4948: Format exit errors as JSON when requested
- Enh #4983: Add SLSA provenance to GHCR container images
- Enh #5054: Enable compression for ZIP archives in dump command
- Enh #5081: Add retry mechanism for loading repository config
- Enh #5089: Allow including/excluding extended file attributes
during restore
- Enh #5092: Show count of deleted files and directories during
restore
- Enh #5109: Make small pack size configurable for prune
- Enh #5119: Add start and end timestamps to backup JSON output
- Enh #5131: Add DragonFlyBSD support
- Enh #5137: Make tag command print which snapshots were modified
- Enh #5141: Provide clear error message if AZURE_ACCOUNT_NAME is
not set
- Enh #5173: Add experimental S3 cold storage support
- Enh #5174: Add xattr support for NetBSD 10+
- Enh #5251: Improve retry handling for flaky rclone backends
- Enh #52897: Make recover automatically rebuild index when
needed
- drop bump-google-apis-for-oauth2-fix.patch
- refresh disable-selfupdate.patch to apply cleanly again
-------------------------------------------------------------------
Tue Mar 11 14:26:17 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
- add bump-google-apis-for-oauth2-fix.patch:
This patch is only applied for manually creating the vendor
tarball with
go mod vendor
tar cfvz ../vendor.tar.gz go.mod go.sum vendor
the patched go.* files are in the vendor tarball afterwards.
boo#1239264 CVE-2025-22868
-------------------------------------------------------------------
Fri Nov 8 20:30:04 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- Update to version 0.17.3
- Fix #4971: Fix unusable mount on macOS Sonoma
- Fix #5003: Fix metadata errors during backup of removable disks
on Windows
- Fix #5101: Do not retry load/list operation if SFTP connection
is broken
- Fix #5107: Fix metadata error on Windows for backups using VSS
- Enh #5096: Allow prune --dry-run without lock
-------------------------------------------------------------------
Sun Oct 27 18:32:52 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- Update to version 0.17.2
- Fix #4004: Support container-level SAS/SAT tokens for Azure
backend
- Fix #5047: Resolve potential error during concurrent cache
cleanup
- Fix #5050: Return error if tag fails to lock repository
- Fix #5057: Exclude irregular files from backups
- Fix #5063: Correctly backup extended metadata when using VSS on
Windows
-------------------------------------------------------------------
Thu Sep 5 21:11:14 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
@@ -669,7 +820,7 @@ Tue Sep 22 21:22:18 UTC 2020 - Marcus Rueckert <mrueckert@suse.de>
- Update to 0.10.0.
https://github.com/restic/restic/releases/tag/v0.10.0
See installed /usr/share/doc/packages/restic/CHANGELOG.md.
- we need to manually vendor the libraries now
- we need to manually vendor the libraries now
- bump minimum go version to >= 1.13
-------------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
#
# spec file for package restic
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,10 +17,10 @@
# nodebuginfo
%define import_path github.com/restic/restic
%bcond_without run_tests
Name: restic
Version: 0.17.1
Version: 0.18.1
Release: 0
Summary: Backup program with deduplication and encryption
License: BSD-2-Clause
@@ -31,10 +31,18 @@ Source1: https://github.com/restic/restic/releases/download/v%{version}/%
Source2: %{name}.keyring
Source3: vendor.tar.gz
Patch0: disable-selfupdate.patch
Patch1: build.patch
Patch2: testsuite-use-python3.patch
BuildRequires: bash-completion
BuildRequires: golang-packaging
BuildRequires: zsh
BuildRequires: golang(API) >= 1.18
BuildRequires: golang(API) >= 1.24
Recommends: fuse
%if %{with run_tests}
# for the tesuite suite
BuildRequires: fuse
BuildRequires: python3
%endif
%description
restic is a backup program. It supports verification, encryption,
@@ -64,20 +72,12 @@ Zsh command line completion support for %{name}.
%autosetup -p 1 -a 3
%build
# Set up GOPATH.
export GOPATH="$GOPATH:$HOME/go"
mkdir -p $HOME/go/src/%{import_path}
cp -rT $PWD $HOME/go/src/%{import_path}
# Build restic. We don't use build.go because it builds statically, uses go
# modules, and also restricts the Go version in cases where it's not actually
# necessary. We disable go modules because restic still provides a vendor/.
GO111MODULE=off go build -o %{name} \
go run -mod=vendor build.go \
--enable-cgo \
%ifnarch ppc64 s390x
-buildmode=pie \
--enable-pie \
%endif
-ldflags "-s -w -X main.version=%{version}" \
%{import_path}/cmd/restic
--verbose
%install
install -D -m0755 %{name} %{buildroot}%{_bindir}/%{name}
@@ -86,6 +86,14 @@ install -d %{buildroot}%{_mandir}/man1
install -Dm0644 doc/bash-completion.sh %{buildroot}%{_datadir}/bash-completion/completions/%{name}
install -Dm0644 doc/zsh-completion.zsh %{buildroot}%{_sysconfdir}/zsh_completion.d/%{name}
rm doc/.gitignore
perl -p -i -e 's|\r\n|\n|g' doc/logo/font/OFL.txt
%if %{with run_tests}
%check
go test ./...
%endif
%files
%defattr(-,root,root)
%doc *.md

View File

@@ -0,0 +1,40 @@
Index: restic-0.18.1/cmd/restic/cmd_backup_integration_test.go
===================================================================
--- restic-0.18.1.orig/cmd/restic/cmd_backup_integration_test.go
+++ restic-0.18.1/cmd/restic/cmd_backup_integration_test.go
@@ -637,7 +637,7 @@ func TestStdinFromCommand(t *testing.T)
StdinFilename: "stdin/subdir/file",
}
- testRunBackup(t, filepath.Dir(env.testdata), []string{"python", "-c", "import sys; print('something'); sys.exit(0)"}, opts, env.gopts)
+ testRunBackup(t, filepath.Dir(env.testdata), []string{"python3", "-c", "import sys; print('something'); sys.exit(0)"}, opts, env.gopts)
snapshots := testListSnapshots(t, env.gopts, 1)
files := testRunLs(t, env.gopts, snapshots[0].String())
rtest.Assert(t, includes(files, "/stdin/subdir/file"), "file %q missing from snapshot, got %v", "stdin/subdir/file", files)
@@ -655,7 +655,7 @@ func TestStdinFromCommandNoOutput(t *tes
StdinFilename: "stdin",
}
- err := testRunBackupAssumeFailure(t, filepath.Dir(env.testdata), []string{"python", "-c", "import sys; sys.exit(0)"}, opts, env.gopts)
+ err := testRunBackupAssumeFailure(t, filepath.Dir(env.testdata), []string{"python3", "-c", "import sys; sys.exit(0)"}, opts, env.gopts)
rtest.Assert(t, err != nil && err.Error() == "at least one source file could not be read", "No data error expected")
testListSnapshots(t, env.gopts, 1)
@@ -672,7 +672,7 @@ func TestStdinFromCommandFailExitCode(t
StdinFilename: "stdin",
}
- err := testRunBackupAssumeFailure(t, filepath.Dir(env.testdata), []string{"python", "-c", "import sys; print('test'); sys.exit(1)"}, opts, env.gopts)
+ err := testRunBackupAssumeFailure(t, filepath.Dir(env.testdata), []string{"python3", "-c", "import sys; print('test'); sys.exit(1)"}, opts, env.gopts)
rtest.Assert(t, err != nil, "Expected error while backing up")
testListSnapshots(t, env.gopts, 0)
@@ -690,7 +690,7 @@ func TestStdinFromCommandFailNoOutputAnd
StdinFilename: "stdin",
}
- err := testRunBackupAssumeFailure(t, filepath.Dir(env.testdata), []string{"python", "-c", "import sys; sys.exit(1)"}, opts, env.gopts)
+ err := testRunBackupAssumeFailure(t, filepath.Dir(env.testdata), []string{"python3", "-c", "import sys; sys.exit(1)"}, opts, env.gopts)
rtest.Assert(t, err != nil, "Expected error while backing up")
testListSnapshots(t, env.gopts, 0)

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f92239d65b152672de902917501a39104297f0fb040a9b2eaae695eda8872978
size 6305445
oid sha256:452174f55626993ff956705eb4a84b6fc1fc6a11788ddf0f6c8463c04a5424b4
size 8634986