restic/cmd/restic
Klemens Nanni 94f6e7d4a6
Reinstate selfupdate tag to make builds without self-update work
Revert what seems to be a typo introduced as part of the fix for #2041
in 2018 7d0f2eaf24.

`xbuild` does not look like a go build/tag keyword to me, I failed to
find documentation for it and using `go install -tags '!selfupdate' ...`
has no effect, i.e. self-update code is still compiled.

`+build` however works;  updating the OpenBSD port/binary package
security/restic to apply this PR works as expected:

```
	$ restic help | grep self
	$ restic self-update
	unknown command "self-update" for "restic"
```

(Using `go:build` now as per restic's style and gofmt.)

Previously, using `restic-0.14.0p1` on OpenBSD/amd64 7.2-current would
check for a newer version and probably attempt replacing the system wide
root-owned executable (on a read-only filesystem) as unprivileged user:

```
	$ restic version
	restic 0.14.0 compiled with go1.19.2 on openbsd/amd64
	$ restic help | grep self
	  self-update   Update the restic binary
	$ restic self-update
	writing restic to /usr/local/bin/restic
	find latest release of restic at GitHub
	restic is up to date
```

(It never tried to actually write besaid path;  doing so would fail, so
the current message can be considered misleading.)
2022-12-26 21:46:22 +04:00
..
testdata copy: test that trees with unstable json encoding are properly copied 2021-03-08 22:16:48 +01:00
.gitignore
cleanup.go Allow cleanup handlers to filter the exit code 2022-08-26 23:04:59 +02:00
cmd_backup.go add --disable-scanner to backup command 2022-12-16 21:29:59 +01:00
cmd_backup_test.go test: Use testing.T.Cleanup to remove tempdirs 2022-12-09 14:23:55 +01:00
cmd_cache.go cmd, ui: Deduplicate formatting utilities 2022-10-23 13:40:07 +02:00
cmd_cat.go identify keys by ID and not name 2022-10-15 16:07:43 +02:00
cmd_check.go checker: Make ErrLegacyLayout a value, not a type 2022-12-17 09:41:07 +01:00
cmd_check_test.go [#issue 3490] Support for specifying file size in read-data-subset 2021-11-02 15:25:46 +05:30
cmd_copy.go fix#4033 cmd: copy no longer lists skipped existing snapshots by default 2022-12-03 09:55:39 +08:00
cmd_debug.go debug: fix crash in `debug examine --reupload-blobs` 2022-11-09 22:13:17 +01:00
cmd_diff.go cmd, ui: Deduplicate formatting utilities 2022-10-23 13:40:07 +02:00
cmd_dump.go restic: Change FindSnapshot functions to return the snapshot 2022-10-15 13:34:04 +02:00
cmd_dump_test.go dump: Add test for splitPath 2020-08-30 16:00:48 +02:00
cmd_find.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_forget.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_generate.go Add powershell completion 2022-09-11 00:44:12 +02:00
cmd_init.go init: use standard name `message_type` to distinguish JSON messages 2022-12-02 21:33:03 +01:00
cmd_key.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
cmd_list.go repository: split index into a separate package 2022-10-08 21:15:34 +02:00
cmd_ls.go restic: Change FindSnapshot functions to return the snapshot 2022-10-15 13:34:04 +02:00
cmd_ls_test.go Add file mode in symbolic notation to `ls --json` 2021-11-16 19:45:50 +02:00
cmd_migrate.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_mount.go mount: switch to anacrolix fork of bazil/fuse 2022-11-12 19:22:31 +01:00
cmd_options.go Some `options` fixes 2020-12-23 23:26:04 +03:00
cmd_prune.go Merge pull request #3981 from MichaelEischer/prune-uncompressed-stats 2022-12-23 22:34:04 +01:00
cmd_rebuild_index.go repository: split index into a separate package 2022-10-08 21:15:34 +02:00
cmd_recover.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_restore.go restic: Change FindSnapshot functions to return the snapshot 2022-10-15 13:34:04 +02:00
cmd_rewrite.go rewrite: Always set the Original field in a rewritten snapshot 2022-12-10 12:47:00 +01:00
cmd_self_update.go Reinstate selfupdate tag to make builds without self-update work 2022-12-26 21:46:22 +04:00
cmd_snapshots.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_snapshots_test.go Add more error checks 2021-01-30 20:02:37 +01:00
cmd_stats.go cmd, ui: Deduplicate formatting utilities 2022-10-23 13:40:07 +02:00
cmd_tag.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_unlock.go pass global context through cobra 2022-10-03 00:19:46 +02:00
cmd_version.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
delete.go Remove ctx from globalOptions 2022-10-03 00:19:46 +02:00
doc.go
exclude.go Cleanup exclude pattern collection 2022-11-12 19:55:22 +01:00
exclude_test.go test: Use testing.T.Cleanup to remove tempdirs 2022-12-09 14:23:55 +01:00
find.go add comment 2022-10-15 13:34:21 +02:00
flags_test.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
format.go cmd, ui: Deduplicate formatting utilities 2022-10-23 13:40:07 +02:00
global.go azure: Switch to azblob sdk 2022-12-07 21:46:07 +01:00
global_debug.go Allow cleanup handlers to filter the exit code 2022-08-26 23:04:59 +02:00
global_release.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
global_test.go test: Use testing.T.Cleanup to remove tempdirs 2022-12-09 14:23:55 +01:00
integration_filter_pattern_test.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
integration_fuse_test.go mount: only start next test after mount command cleanup is complete 2022-11-11 21:43:01 +01:00
integration_helpers_test.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
integration_helpers_unix_test.go Replace usages of ioutil.ReadDir 2022-12-02 19:54:27 +01:00
integration_helpers_windows_test.go Replace usages of ioutil.ReadDir 2022-12-02 19:54:27 +01:00
integration_rewrite_test.go rewrite: Add tests for further ways to use the command 2022-11-12 19:55:22 +01:00
integration_test.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
local_layout_test.go Support specifying multiple host flags for various commands 2020-02-26 22:17:59 +01:00
lock.go fix Unix to UnixNano 2022-10-23 23:40:21 +03:00
lock_test.go Add more debug logging to TestLockSuccessfulRefresh 2022-12-03 12:05:38 +01:00
main.go Don't buffer the golang log output when running tests 2022-12-10 16:08:27 +01:00
progress.go cmd, ui: Deduplicate formatting utilities 2022-10-23 13:40:07 +02:00
secondary_repo.go Do not include the actual values of environment variables in help output 2022-08-26 20:39:54 +02:00
secondary_repo_test.go test: Use testing.T.Cleanup to remove tempdirs 2022-12-09 14:23:55 +01:00