forked from pool/restic
- Update to 0.12.1 Fixes: * #2742: Improve error handling for rclone and REST backend over HTTP2 * #3111: Fix terminal output redirection for PowerShell * #3214: Treat an empty password as a fatal error for repository init * #3267: copy failed to copy snapshots in rare cases * #3184: backup --quiet no longer prints status information * #3296: Fix crash of check --read-data-subset=x% run for an empty repository * #3302: Fix fdopendir: not a directory error for local backend * #3334: Print created new cache message only on a terminal * #3380: Fix crash of backup --exclude='**' * #3305: Fix possibly missing backup summary of JSON output in case of error * #3439: Correctly handle download errors during restore Changes: * #3247: Empty files now have size of 0 in ls --json output Enhancements: * #2780: Add release binaries for s390x architecture on Linux * #3293: Add --repository-file2 option to init and copy command * #3312: Add auto-completion support for fish * #3336: SFTP backend now checks for disk space * #3377: Add release binaries for Apple Silicon * #3414: Add --keep-within-hourly option to restic forget * #3456: Support filtering and specifying untagged snapshots * #3167: Allow specifying limit of snapshots list * #3426: Optimize read performance of mount command * #3427: find --pack fallback to index if data file is missing OBS-URL: https://build.opensuse.org/request/show/910622 OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=29
100 lines
3.1 KiB
RPMSpec
100 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package restic
|
|
#
|
|
# Copyright (c) 2021 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.12.1
|
|
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.xz
|
|
BuildRequires: bash-completion
|
|
BuildRequires: golang-packaging
|
|
BuildRequires: zsh
|
|
BuildRequires: golang(API) >= 1.13
|
|
|
|
%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: packageand(restic: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: packageand(restic:zsh)
|
|
BuildArch: noarch
|
|
|
|
%description zsh-completion
|
|
Zsh command line completion support for %{name}.
|
|
|
|
%prep
|
|
%setup -q -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} -buildmode=pie \
|
|
-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
|