forked from pool/restic
- 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 <backend>.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
104 lines
3.2 KiB
RPMSpec
104 lines
3.2 KiB
RPMSpec
#
|
|
# spec file for package restic
|
|
#
|
|
# 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
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
# nodebuginfo
|
|
|
|
|
|
%define import_path github.com/restic/restic
|
|
|
|
Name: restic
|
|
Version: 0.15.0
|
|
Release: 0
|
|
Summary: Backup program with deduplication and encryption
|
|
License: BSD-2-Clause
|
|
Group: Productivity/Archiving/Backup
|
|
URL: https://restic.net
|
|
Source0: https://github.com/restic/restic/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
|
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.18
|
|
|
|
%description
|
|
restic is a backup program. It supports verification, encryption,
|
|
snapshots and deduplication.
|
|
|
|
%package bash-completion
|
|
Summary: Bash Completion for %{name}
|
|
Group: System/Shells
|
|
Requires: %{name} = %{version}
|
|
Supplements: (restic and bash-completion)
|
|
BuildArch: noarch
|
|
|
|
%description bash-completion
|
|
Bash command line completion support for %{name}.
|
|
|
|
%package zsh-completion
|
|
Summary: Zsh Completion for %{name}
|
|
Group: System/Shells
|
|
Requires: %{name} = %{version}
|
|
Supplements: (restic and zsh)
|
|
BuildArch: noarch
|
|
|
|
%description zsh-completion
|
|
Zsh command line completion support for %{name}.
|
|
|
|
%prep
|
|
%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} \
|
|
%ifnarch ppc64 s390x
|
|
-buildmode=pie \
|
|
%endif
|
|
-ldflags "-s -w -X main.version=%{version}" \
|
|
%{import_path}/cmd/restic
|
|
|
|
%install
|
|
install -D -m0755 %{name} %{buildroot}%{_bindir}/%{name}
|
|
install -d %{buildroot}%{_mandir}/man1
|
|
./%{name} generate --man %{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}
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc *.md
|
|
%doc doc/
|
|
%license LICENSE
|
|
%{_bindir}/restic
|
|
%{_mandir}/man1/restic*.1*
|
|
|
|
%files bash-completion
|
|
%{_datadir}/bash-completion/completions/%{name}
|
|
|
|
%files zsh-completion
|
|
%config %{_sysconfdir}/zsh_completion.d/%{name}
|
|
|
|
%changelog
|