From 6b6c4b60cfd4243ef8be5a3d3f846746f175dbe7c67a9f5fe1d6dfb829d960f8 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 25 Jan 2023 08:30:27 +0000 Subject: [PATCH] Accepting request 1060692 from home:hgraeber:branches:Archiving - Allow build with architectures that do not support -buildmode=pie - New Patch disable-selfupdate.patch: Disable self-update, because updates will be made using package manager - Replace packageand by conditionals - Update to version 0.15.0 * Make mount return exit code 0 after receiving Ctrl-C / SIGINT * Make restore replace existing symlinks * Don't read password from stdin for backup --stdin * Delete files on Backblaze B2 more reliably * Make SFTP backend report no space left on device * Improve handling of interrupted syscalls in mount command * Fix stuck copy command when -o .connections=1 * Correct prune statistics for partially compressed repositories * Make ls return exit code 1 if snapshot cannot be loaded * Make backup no longer hang on Solaris when seeing a FIFO file * Support ExFAT-formatted local backends on macOS Ventura * Make init ignore "Access Denied" errors when creating S3 buckets * Make self-update enabled by default only in release builds * Don't generate negative UIDs and GIDs in tar files from dump * Include full snapshot ID in JSON output of backup * Make unlock display message only when locks were actually removed * Don't print skipped snapshots by default in copy command * Update dependencies and require Go 1.18 or newer * Implement rewrite command * Restore files with long runs of zeros as sparse files * Support restoring symbolic links on Windows * Inform about successful retries after errors * Improve handling of directories with duplicate entries * Support B2 API keys restricted to hiding but not deleting files * Make init open only one connection for the SFTP backend * Handle cache corruption on disk and in downloads * Stricter repository lock handling * Make backup file read concurrency configurable * Add support for credential_process to S3 backend * Make mount command support macOS using macFUSE 4.x * Support JSON output for the init command * Optimize prune memory usage * Improve speed of parent snapshot detection in backup command * Add compression statistics to the stats command * Provide command completion for PowerShell * Allow backup file tree scanner to be disabled * Improve handling of ErrDot errors in rclone and sftp backends * Ignore additional/unknown files in repository * Improve backup performance for small files OBS-URL: https://build.opensuse.org/request/show/1060692 OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=36 --- build.patch | 21 ++++++++++++++++++ disable-selfupdate.patch | 12 ++++++++++ restic-0.14.0.tar.gz | 3 --- restic-0.14.0.tar.gz.asc | 16 -------------- restic-0.15.0.tar.gz | 3 +++ restic-0.15.0.tar.gz.asc | 16 ++++++++++++++ restic.changes | 48 ++++++++++++++++++++++++++++++++++++++++ restic.spec | 18 +++++++++------ vendor.tar.gz | 4 ++-- 9 files changed, 113 insertions(+), 28 deletions(-) create mode 100644 build.patch create mode 100644 disable-selfupdate.patch delete mode 100644 restic-0.14.0.tar.gz delete mode 100644 restic-0.14.0.tar.gz.asc create mode 100644 restic-0.15.0.tar.gz create mode 100644 restic-0.15.0.tar.gz.asc diff --git a/build.patch b/build.patch new file mode 100644 index 0000000..6f2f9c3 --- /dev/null +++ b/build.patch @@ -0,0 +1,21 @@ +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 + } +@@ -417,7 +417,7 @@ + ldflags := constants.LDFlags() + if !preserveSymbols { + // Strip debug symbols. +- ldflags = "-s -w " + ldflags ++ ldflags = " -w " + ldflags + } + verbosePrintf("ldflags: %s\n", ldflags) + diff --git a/disable-selfupdate.patch b/disable-selfupdate.patch new file mode 100644 index 0000000..6029e2b --- /dev/null +++ b/disable-selfupdate.patch @@ -0,0 +1,12 @@ +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 + } diff --git a/restic-0.14.0.tar.gz b/restic-0.14.0.tar.gz deleted file mode 100644 index 0f409e7..0000000 --- a/restic-0.14.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:78cdd8994908ebe7923188395734bb3cdc9101477e4163c67e7cc3b8fd3b4bd6 -size 23902279 diff --git a/restic-0.14.0.tar.gz.asc b/restic-0.14.0.tar.gz.asc deleted file mode 100644 index 6c8968c..0000000 --- a/restic-0.14.0.tar.gz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEz48Y8oRFdZc/edThkaaGi9P3qQcFAmMHufgACgkQkaaGi9P3 -qQeMzRAAx/Myquv/daNNMWh015mmqwuaDME4tr49v/lArM1LNJS6O3uTnlofjHvu -X87d4R6Pok0h0zO4JxMJqNvHWALL0Xn9FQqGFOlaw3SZe0/NJzfz6YcGIXXq9qaf -Yj3YR2J700XL8/uzqSUP1LhsfkICoHDq6VPvGx8k8I/BHrNMV9aOn84IsDMXiiYP -b4OjNpDsGOve+RzbXNUXHGM+mi0Z59bMo1c2htH6PnayF4wy/C4dDl8NsnrJ94aC -qAOz2p0nt71+CADL3qNqdwz5lGjrD+ZYZi1oDGYd5/psHN0/DYILkCKwy8/FqdO4 -bMvj3iOiuiY+afzIo6JwkNLP/Zu54g/6oqT4iTxk0nhwVjmLfu6peeD87Jo21YJj -97Q0ym4prkxrFKfTUOk8OXBMDgsx8a0ZM5E06ZB0nJZLyXKoLgyftkiCNmbD6NTU -Y2c6lDuFqpff80xBjjfFRzjYpK+EGpKP7oVVlqEGC81aM9pwILlHJEgEwNgsIUnV -qcamGZesU0EfvjX+3OGVcpzwhZIt0RaDlphMhbbdncZ4VQ0+v/WweABqSRf4O6Nz -yCc3v0oPl8u1M6M1rREzHGmwSqGxW9lqGZptQnMISiRUeP78wbWF/Tydz00NrIjF -4zIU+xKs3jy8o67GW9bvwptnvyLZBzk02XguT9lepKEnyLjfqzE= -=YSw5 ------END PGP SIGNATURE----- diff --git a/restic-0.15.0.tar.gz b/restic-0.15.0.tar.gz new file mode 100644 index 0000000..f9cb613 --- /dev/null +++ b/restic-0.15.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85a6408cfb0798dab52335bcb00ac32066376c32daaa75461d43081499bc7de8 +size 23919047 diff --git a/restic-0.15.0.tar.gz.asc b/restic-0.15.0.tar.gz.asc new file mode 100644 index 0000000..304990d --- /dev/null +++ b/restic-0.15.0.tar.gz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEz48Y8oRFdZc/edThkaaGi9P3qQcFAmPAZvsACgkQkaaGi9P3 +qQeLoxAAkeI5q8uPWobR7t+qsSQq53KSGrqduXtlzALom/jU8qOSyI1Ee5cHgBgZ +pMzVuvzjRs52QWUSUuiNl3Irc1xvNNs1UvYhb+zgG73oX8E9qkjWZqlTVl8qYIeW +u5YoVnR4Qb03fkudyCOLdkIY4NHrFYA4DivCg+fP8oIc6jM/MafOmeWT0zA9dKow +9mDIw7YHUzY0XNrN2utURBuFsrXdWfbpytbuag6cK3s3U6RLarWCmv3EgSfLNDb1 +r14cWDqe7/NzPQTmSZPoqRuaitZghtaVO4EGbGCWKLTh1MAzF3z51s+Igp1uAZlP +HaKByyG5ttt4gdMLd4YWI7Jt1xipg6BCqHDH2EdI+RazrAgltBG6nPax+5vTy71e +gKNcLjoDk+WpLAYjQ9jz8TTEL5qK9LRxd/FkPZR+etj+0+SAKsPdqiibvhhdLUGM +ss4ji44fNfXoP1KRbN2OWlQT33bK3omgXppOXsw1vcFNybeotGQ1nbAmGwu0SrAt +m6/mKIslwHu3yGT77LRZuujEWOnG3UZRlj0noJcR5dZK0OS7DkaVyRR0vUaTQcDX +70DKlDlsO6xzg3OGz8JnEYj4i6wYRuT6nRe6VO0CNVhhmuB2wWldkQpmAFhvP4eM +iE8FVjCWcHAdFMmFqQ7ifjN55keMwzqsLf74YKNkKn6rSeI/FKk= +=uh/e +-----END PGP SIGNATURE----- diff --git a/restic.changes b/restic.changes index f4bf9c6..2952636 100644 --- a/restic.changes +++ b/restic.changes @@ -1,3 +1,51 @@ +------------------------------------------------------------------- +Tue Jan 24 18:46:48 UTC 2023 - Herbert Graeber + +- Allow build with architectures that do not support -buildmode=pie +- New Patch disable-selfupdate.patch: Disable self-update, because updates + will be made using package manager +- Replace packageand by conditionals +- Update to version 0.15.0 + * Make mount return exit code 0 after receiving Ctrl-C / SIGINT + * Make restore replace existing symlinks + * Don't read password from stdin for backup --stdin + * Delete files on Backblaze B2 more reliably + * Make SFTP backend report no space left on device + * Improve handling of interrupted syscalls in mount command + * Fix stuck copy command when -o .connections=1 + * Correct prune statistics for partially compressed repositories + * Make ls return exit code 1 if snapshot cannot be loaded + * Make backup no longer hang on Solaris when seeing a FIFO file + * Support ExFAT-formatted local backends on macOS Ventura + * Make init ignore "Access Denied" errors when creating S3 buckets + * Make self-update enabled by default only in release builds + * Don't generate negative UIDs and GIDs in tar files from dump + * Include full snapshot ID in JSON output of backup + * Make unlock display message only when locks were actually removed + * Don't print skipped snapshots by default in copy command + * Update dependencies and require Go 1.18 or newer + * Implement rewrite command + * Restore files with long runs of zeros as sparse files + * Support restoring symbolic links on Windows + * Inform about successful retries after errors + * Improve handling of directories with duplicate entries + * Support B2 API keys restricted to hiding but not deleting files + * Make init open only one connection for the SFTP backend + * Handle cache corruption on disk and in downloads + * Stricter repository lock handling + * Make backup file read concurrency configurable + * Add support for credential_process to S3 backend + * Make mount command support macOS using macFUSE 4.x + * Support JSON output for the init command + * Optimize prune memory usage + * Improve speed of parent snapshot detection in backup command + * Add compression statistics to the stats command + * Provide command completion for PowerShell + * Allow backup file tree scanner to be disabled + * Improve handling of ErrDot errors in rclone and sftp backends + * Ignore additional/unknown files in repository + * Improve backup performance for small files + ------------------------------------------------------------------- Thu Aug 25 22:52:37 UTC 2022 - jkowalczyk@suse.com diff --git a/restic.spec b/restic.spec index c17563f..6e9e99a 100644 --- a/restic.spec +++ b/restic.spec @@ -1,7 +1,7 @@ # # spec file for package restic # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,7 +20,7 @@ %define import_path github.com/restic/restic Name: restic -Version: 0.14.0 +Version: 0.15.0 Release: 0 Summary: Backup program with deduplication and encryption License: BSD-2-Clause @@ -30,10 +30,11 @@ Source0: https://github.com/restic/restic/releases/download/v%{version}/% Source1: https://github.com/restic/restic/releases/download/v%{version}/%{name}-%{version}.tar.gz.asc Source2: %{name}.keyring Source3: vendor.tar.gz +Patch: disable-selfupdate.patch BuildRequires: bash-completion BuildRequires: golang-packaging BuildRequires: zsh -BuildRequires: golang(API) >= 1.15 +BuildRequires: golang(API) >= 1.18 %description restic is a backup program. It supports verification, encryption, @@ -43,7 +44,7 @@ snapshots and deduplication. Summary: Bash Completion for %{name} Group: System/Shells Requires: %{name} = %{version} -Supplements: packageand(restic:bash-completion) +Supplements: (restic and bash-completion) BuildArch: noarch %description bash-completion @@ -53,14 +54,14 @@ Bash command line completion support for %{name}. Summary: Zsh Completion for %{name} Group: System/Shells Requires: %{name} = %{version} -Supplements: packageand(restic:zsh) +Supplements: (restic and zsh) BuildArch: noarch %description zsh-completion Zsh command line completion support for %{name}. %prep -%setup -q -a 3 +%autosetup -p 1 -a 3 %build # Set up GOPATH. @@ -71,7 +72,10 @@ 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} -buildmode=pie \ +GO111MODULE=off go build -o %{name} \ +%ifnarch ppc64 s390x + -buildmode=pie \ +%endif -ldflags "-s -w -X main.version=%{version}" \ %{import_path}/cmd/restic diff --git a/vendor.tar.gz b/vendor.tar.gz index ad1a3da..d6dfa99 100644 --- a/vendor.tar.gz +++ b/vendor.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:908a9b401e557acd5403a9f0221fee9856bc5ad0f094e651ffa515ebcb8215c9 -size 5714856 +oid sha256:5c58e5b76ac489b32c261c6a6c688f485f31b2ed23c212dfc93ad89c238457ef +size 5577731