]> arthur.barton.de Git - bup.git/log
bup.git
3 years agoRedirect to GNU make when possible
Rob Browning [Sat, 27 Mar 2021 22:05:39 +0000 (17:05 -0500)]
Redirect to GNU make when possible

Rename Makefile to GNUmakefile and add a Makefile that for at least
FreeBSD make will redirect the build to GNU make, and don't fail if
make is not GNU make without checking gmake.

Thanks to Greg Troxel for a reminder about the issue.

Signed-off-by: Rob Browning <rlb@defaultvalue.org
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 years agoMove Makefile to GNUmakefile
Rob Browning [Sat, 27 Mar 2021 21:59:12 +0000 (16:59 -0500)]
Move Makefile to GNUmakefile

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agobup_py_bytes_main: add to support py 3.6 compat
Rob Browning [Sat, 27 Mar 2021 18:54:54 +0000 (13:54 -0500)]
bup_py_bytes_main: add to support py 3.6 compat

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoMove msg() to bup/io.[hc] in preparation for more sharing
Rob Browning [Sat, 27 Mar 2021 18:38:56 +0000 (13:38 -0500)]
Move msg() to bup/io.[hc] in preparation for more sharing

We're going to need to share some python compatibility code between
dev/python and bup, etc., so create src/bup for the shared code, and
move msg() there.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoCompute C dependencies automatically
Rob Browning [Sat, 27 Mar 2021 18:03:26 +0000 (13:03 -0500)]
Compute C dependencies automatically

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 years agoRework compilation of binaries; prepare for automatic dependencies
Rob Browning [Sat, 27 Mar 2021 17:56:21 +0000 (12:56 -0500)]
Rework compilation of binaries; prepare for automatic dependencies

Don't involve user-adjustable variables like CFLAGS until the final
compilation steps, in part so it's clearer where they fit in.  Handle
all of bup's flags independently, and split them into separate
library (helpers) and executable (bin/bup, etc.)  groups via
bup_shared_cflags, helpers_cflags, embed_cflags, etc.

Change the build rules to specify -fPIE for the executables, and
include all dependencies ($^) and use OUTPUT_OPTION in preparation for
automatic C dependency generation.

Add -Wno-unused-command-line-argument for clang.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 years agoMakefile: fix pytest invocation when xdist isn't available
Rob Browning [Fri, 26 Mar 2021 05:44:12 +0000 (00:44 -0500)]
Makefile: fix pytest invocation when xdist isn't available

Call "set -x", not "set-x".

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agohelp: pass full bup path as argv[0] when running 'bup help'
Rob Browning [Fri, 26 Mar 2021 05:16:08 +0000 (00:16 -0500)]
help: pass full bup path as argv[0] when running 'bup help'

Noticed this while tracking down a previous issue with our invocation
of strtok.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoMakefile: don't depend on dev/python to clean
Rob Browning [Sun, 21 Mar 2021 17:29:11 +0000 (12:29 -0500)]
Makefile: don't depend on dev/python to clean

"make clean" should always work, even if we can't build dev/python.
Thanks to Greg Troxel for reporting the problem, and Johannes Berg for
suggesting additional improvements.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoconfigure: look for suitable pythonX.Y-config versions
Rob Browning [Tue, 16 Mar 2021 00:05:10 +0000 (19:05 -0500)]
configure: look for suitable pythonX.Y-config versions

Thanks to Greg Troxel for raising the issue.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agobup.main: drop unicode-only getopt
Rob Browning [Sat, 27 Feb 2021 17:30:21 +0000 (11:30 -0600)]
bup.main: drop unicode-only getopt

It's relatively straightforward to replace it, and this will allow us
to avoid the unnecessary unicode round-trip.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 years agoStash the env PYTHONPATH during startup and restore it in main
Rob Browning [Sat, 13 Feb 2021 19:14:19 +0000 (13:14 -0600)]
Stash the env PYTHONPATH during startup and restore it in main

We have to set the PYTHONPATH from bup.c so that Py_Main will be able
to find bup.*, but we don't want that change to affect subprocesses,
so stash the original PYTHONPATH in bup_main.env_pythonpath, and
restore the original environment value once we've made it to the
python side (in bup.main).

Thanks to Johannes Berg for pointing out some issues with a previous
version of the changes.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 years agoRemove scaffolding needed during the bup.c conversion
Rob Browning [Sat, 13 Feb 2021 19:31:18 +0000 (13:31 -0600)]
Remove scaffolding needed during the bup.c conversion

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoConvert top level executables to binaries and clean up clean
Rob Browning [Sat, 13 Feb 2021 22:36:35 +0000 (16:36 -0600)]
Convert top level executables to binaries and clean up clean

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoHandle external commands directly rather than via renamed symlinks
Rob Browning [Sun, 13 Dec 2020 19:25:10 +0000 (13:25 -0600)]
Handle external commands directly rather than via renamed symlinks

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agofuse: convert to internal command
Rob Browning [Fri, 12 Feb 2021 21:57:38 +0000 (15:57 -0600)]
fuse: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agofuse-cmd: copy to bup.cmd.fuse
Rob Browning [Fri, 12 Feb 2021 21:57:38 +0000 (15:57 -0600)]
fuse-cmd: copy to bup.cmd.fuse

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agofsck: convert to internal command
Rob Browning [Fri, 12 Feb 2021 21:55:46 +0000 (15:55 -0600)]
fsck: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agofsck-cmd: copy to bup.cmd.fsck
Rob Browning [Fri, 12 Feb 2021 21:55:46 +0000 (15:55 -0600)]
fsck-cmd: copy to bup.cmd.fsck

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoget: convert to internal command
Rob Browning [Fri, 12 Feb 2021 21:48:49 +0000 (15:48 -0600)]
get: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoget-cmd: copy to bup.cmd.get
Rob Browning [Fri, 12 Feb 2021 21:48:49 +0000 (15:48 -0600)]
get-cmd: copy to bup.cmd.get

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agorestore: convert to internal command
Rob Browning [Fri, 12 Feb 2021 21:35:02 +0000 (15:35 -0600)]
restore: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agorestore-cmd: copy to bup.cmd.restore
Rob Browning [Fri, 12 Feb 2021 21:35:02 +0000 (15:35 -0600)]
restore-cmd: copy to bup.cmd.restore

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agosave: convert to internal command
Rob Browning [Fri, 12 Feb 2021 21:12:40 +0000 (15:12 -0600)]
save: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agosave-cmd: copy to bup.cmd.save
Rob Browning [Fri, 12 Feb 2021 21:12:40 +0000 (15:12 -0600)]
save-cmd: copy to bup.cmd.save

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoon--server: convert to internal command
Rob Browning [Fri, 12 Feb 2021 20:50:13 +0000 (14:50 -0600)]
on--server: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoon--server-cmd: copy to bup.cmd.on__server
Rob Browning [Fri, 12 Feb 2021 20:50:13 +0000 (14:50 -0600)]
on--server-cmd: copy to bup.cmd.on__server

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoon: convert to internal command
Rob Browning [Fri, 12 Feb 2021 20:40:46 +0000 (14:40 -0600)]
on: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoon-cmd: copy to bup.cmd.on
Rob Browning [Fri, 12 Feb 2021 20:40:45 +0000 (14:40 -0600)]
on-cmd: copy to bup.cmd.on

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoimport-duplicity: convert to internal command
Rob Browning [Fri, 12 Feb 2021 20:34:04 +0000 (14:34 -0600)]
import-duplicity: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoimport-duplicity-cmd: copy to bup.cmd.import_duplicity
Rob Browning [Fri, 12 Feb 2021 20:34:04 +0000 (14:34 -0600)]
import-duplicity-cmd: copy to bup.cmd.import_duplicity

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoserver: convert to internal command
Rob Browning [Fri, 12 Feb 2021 20:28:01 +0000 (14:28 -0600)]
server: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoserver-cmd: copy to bup.cmd.server
Rob Browning [Fri, 12 Feb 2021 20:28:01 +0000 (14:28 -0600)]
server-cmd: copy to bup.cmd.server

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoprune-older: convert to internal command
Rob Browning [Fri, 12 Feb 2021 20:19:20 +0000 (14:19 -0600)]
prune-older: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoprune-older-cmd: copy to bup.cmd.prune_older
Rob Browning [Fri, 12 Feb 2021 20:19:20 +0000 (14:19 -0600)]
prune-older-cmd: copy to bup.cmd.prune_older

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agomux: convert to internal command
Rob Browning [Fri, 12 Feb 2021 20:15:11 +0000 (14:15 -0600)]
mux: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agomux-cmd: copy to bup.cmd.mux
Rob Browning [Fri, 12 Feb 2021 20:15:11 +0000 (14:15 -0600)]
mux-cmd: copy to bup.cmd.mux

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agolist-idx: convert to internal command
Rob Browning [Fri, 12 Feb 2021 20:02:46 +0000 (14:02 -0600)]
list-idx: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agolist-idx-cmd: copy to bup.cmd.list_idx
Rob Browning [Fri, 12 Feb 2021 20:02:46 +0000 (14:02 -0600)]
list-idx-cmd: copy to bup.cmd.list_idx

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agodrecurse: convert to internal command
Rob Browning [Fri, 12 Feb 2021 19:55:36 +0000 (13:55 -0600)]
drecurse: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agodrecurse-cmd: copy to bup.cmd.drecurse
Rob Browning [Fri, 12 Feb 2021 19:55:36 +0000 (13:55 -0600)]
drecurse-cmd: copy to bup.cmd.drecurse

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agodamage: convert to internal command
Rob Browning [Fri, 12 Feb 2021 19:51:46 +0000 (13:51 -0600)]
damage: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agodamage-cmd: copy to bup.cmd.damage
Rob Browning [Fri, 12 Feb 2021 19:51:46 +0000 (13:51 -0600)]
damage-cmd: copy to bup.cmd.damage

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoftp: convert to internal command
Rob Browning [Fri, 12 Feb 2021 19:46:29 +0000 (13:46 -0600)]
ftp: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoftp-cmd: copy to bup.cmd.ftp
Rob Browning [Fri, 12 Feb 2021 19:46:29 +0000 (13:46 -0600)]
ftp-cmd: copy to bup.cmd.ftp

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoweb: convert to internal command
Rob Browning [Fri, 12 Feb 2021 19:44:05 +0000 (13:44 -0600)]
web: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoweb-cmd: copy to bup.cmd.web
Rob Browning [Fri, 12 Feb 2021 19:44:05 +0000 (13:44 -0600)]
web-cmd: copy to bup.cmd.web

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agodaemon: convert to internal command
Rob Browning [Fri, 12 Feb 2021 19:40:32 +0000 (13:40 -0600)]
daemon: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 years agodaemon-cmd: copy to bup.cmd.daemon
Rob Browning [Fri, 12 Feb 2021 19:40:32 +0000 (13:40 -0600)]
daemon-cmd: copy to bup.cmd.daemon

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agotick: convert to internal command
Rob Browning [Fri, 12 Feb 2021 19:36:04 +0000 (13:36 -0600)]
tick: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agotick-cmd: copy to bup.cmd.tick
Rob Browning [Fri, 12 Feb 2021 19:36:04 +0000 (13:36 -0600)]
tick-cmd: copy to bup.cmd.tick

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agotag: convert to internal command
Rob Browning [Fri, 12 Feb 2021 19:30:34 +0000 (13:30 -0600)]
tag: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agotag-cmd: copy to bup.cmd.tag
Rob Browning [Fri, 12 Feb 2021 19:30:34 +0000 (13:30 -0600)]
tag-cmd: copy to bup.cmd.tag

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agomidx: convert to internal command
Rob Browning [Fri, 12 Feb 2021 19:22:25 +0000 (13:22 -0600)]
midx: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agomidx-cmd: copy to bup.cmd.midx
Rob Browning [Fri, 12 Feb 2021 19:22:25 +0000 (13:22 -0600)]
midx-cmd: copy to bup.cmd.midx

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agorandom: convert to internal command
Rob Browning [Mon, 8 Feb 2021 08:30:04 +0000 (02:30 -0600)]
random: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agorandom-cmd: copy to bup.cmd.random
Rob Browning [Mon, 8 Feb 2021 08:30:04 +0000 (02:30 -0600)]
random-cmd: copy to bup.cmd.random

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agomemtest: convert to internal command
Rob Browning [Mon, 8 Feb 2021 07:28:50 +0000 (01:28 -0600)]
memtest: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agomemtest-cmd: copy to bup.cmd.memtest
Rob Browning [Mon, 8 Feb 2021 07:28:50 +0000 (01:28 -0600)]
memtest-cmd: copy to bup.cmd.memtest

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agomargin: convert to internal command
Rob Browning [Mon, 8 Feb 2021 07:17:09 +0000 (01:17 -0600)]
margin: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agomargin-cmd: copy to bup.cmd.margin
Rob Browning [Mon, 8 Feb 2021 07:17:09 +0000 (01:17 -0600)]
margin-cmd: copy to bup.cmd.margin

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agofeatures: convert to internal command
Rob Browning [Mon, 8 Feb 2021 07:07:15 +0000 (01:07 -0600)]
features: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agofeatures-cmd: copy to bup.cmd.features
Rob Browning [Mon, 8 Feb 2021 07:07:15 +0000 (01:07 -0600)]
features-cmd: copy to bup.cmd.features

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agosplit: convert to internal command
Rob Browning [Mon, 8 Feb 2021 07:00:32 +0000 (01:00 -0600)]
split: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agosplit-cmd: copy to bup.cmd.split
Rob Browning [Mon, 8 Feb 2021 07:00:32 +0000 (01:00 -0600)]
split-cmd: copy to bup.cmd.split

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoinit: convert to internal command
Rob Browning [Mon, 8 Feb 2021 04:09:54 +0000 (22:09 -0600)]
init: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoinit-cmd: copy to bup.cmd.init
Rob Browning [Mon, 8 Feb 2021 04:09:54 +0000 (22:09 -0600)]
init-cmd: copy to bup.cmd.init

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agogc: convert to internal command
Rob Browning [Mon, 8 Feb 2021 04:02:27 +0000 (22:02 -0600)]
gc: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agogc-cmd: copy to bup.cmd.gc
Rob Browning [Mon, 8 Feb 2021 04:02:27 +0000 (22:02 -0600)]
gc-cmd: copy to bup.cmd.gc

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agorm: convert to internal command
Rob Browning [Mon, 8 Feb 2021 03:50:55 +0000 (21:50 -0600)]
rm: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agorm-cmd: copy to bup.cmd.rm
Rob Browning [Mon, 8 Feb 2021 03:50:55 +0000 (21:50 -0600)]
rm-cmd: copy to bup.cmd.rm

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoindex: convert to internal command
Rob Browning [Sun, 7 Feb 2021 23:01:20 +0000 (17:01 -0600)]
index: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoindex-cmd: copy to bup.cmd.index
Rob Browning [Sun, 7 Feb 2021 23:01:20 +0000 (17:01 -0600)]
index-cmd: copy to bup.cmd.index

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agojoin: convert to internal command
Rob Browning [Fri, 12 Feb 2021 23:40:20 +0000 (17:40 -0600)]
join: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agojoin-cmd: copy to bup.cmd.join
Rob Browning [Sun, 7 Feb 2021 22:54:13 +0000 (16:54 -0600)]
join-cmd: copy to bup.cmd.join

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agohelp: convert to internal command
Rob Browning [Sun, 7 Feb 2021 22:44:44 +0000 (16:44 -0600)]
help: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agohelp-cmd: copy to bup.cmd.help
Rob Browning [Sun, 7 Feb 2021 22:44:44 +0000 (16:44 -0600)]
help-cmd: copy to bup.cmd.help

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agobloom: convert to internal command
Rob Browning [Sun, 7 Feb 2021 22:36:53 +0000 (16:36 -0600)]
bloom: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agobloom-cmd: copy to bup.cmd.bloom
Rob Browning [Sun, 7 Feb 2021 22:36:53 +0000 (16:36 -0600)]
bloom-cmd: copy to bup.cmd.bloom

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoMakefile: check for bup version failures
Rob Browning [Sat, 13 Feb 2021 20:48:37 +0000 (14:48 -0600)]
Makefile: check for bup version failures

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoversion: convert to internal command
Rob Browning [Sat, 6 Feb 2021 19:45:44 +0000 (13:45 -0600)]
version: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoversion-cmd: copy to bup.cmd.version
Rob Browning [Sat, 6 Feb 2021 19:45:44 +0000 (13:45 -0600)]
version-cmd: copy to bup.cmd.version

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoxstat: convert to internal command
Rob Browning [Sat, 6 Feb 2021 19:42:39 +0000 (13:42 -0600)]
xstat: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoxstat-cmd: copy to bup.cmd.xstat
Rob Browning [Sat, 6 Feb 2021 19:42:39 +0000 (13:42 -0600)]
xstat-cmd: copy to bup.cmd.xstat

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agometa: convert to internal command
Rob Browning [Sat, 6 Feb 2021 19:07:28 +0000 (13:07 -0600)]
meta: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agometa-cmd: copy to bup.cmd.meta
Rob Browning [Sat, 6 Feb 2021 19:07:28 +0000 (13:07 -0600)]
meta-cmd: copy to bup.cmd.meta

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agols: convert to internal command
Rob Browning [Sat, 6 Feb 2021 18:52:35 +0000 (12:52 -0600)]
ls: convert to internal command

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agols-cmd: copy to bup.cmd.ls
Rob Browning [Sat, 6 Feb 2021 18:52:35 +0000 (12:52 -0600)]
ls-cmd: copy to bup.cmd.ls

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agocat-file-cmd: migrate to internal bup.cmd.cat_file
Rob Browning [Sun, 13 Dec 2020 02:24:20 +0000 (20:24 -0600)]
cat-file-cmd: migrate to internal bup.cmd.cat_file

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agocat-file-cmd: copy to bup.cmd.cat_file
Rob Browning [Sat, 6 Feb 2021 18:04:24 +0000 (12:04 -0600)]
cat-file-cmd: copy to bup.cmd.cat_file

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoRemove $(dirname "$0") from sys.path
Rob Browning [Tue, 9 Feb 2021 06:13:04 +0000 (00:13 -0600)]
Remove $(dirname "$0") from sys.path

Python adds $(dirname "$0") to the sys.path, which we definitely don't
want (why would we?), so remove it early in the startup process.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agobup: include built-in subcommands in help
Rob Browning [Sun, 13 Dec 2020 17:05:52 +0000 (11:05 -0600)]
bup: include built-in subcommands in help

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agobup: filter stdout/stderr via thread/pipe for internal subcommands
Rob Browning [Sat, 12 Dec 2020 19:14:41 +0000 (13:14 -0600)]
bup: filter stdout/stderr via thread/pipe for internal subcommands

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 years agofilter_output: handle multiple srcs/dests as lists
Rob Browning [Fri, 11 Dec 2020 01:17:51 +0000 (19:17 -0600)]
filter_output: handle multiple srcs/dests as lists

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoconfigure-sampledata: cp lib/bup/*.py, not cmd/*.py
Rob Browning [Sat, 5 Dec 2020 08:02:12 +0000 (02:02 -0600)]
configure-sampledata: cp lib/bup/*.py, not cmd/*.py

So the tests won't depend on the location of the subcommands, in
preparation for their move to lib/bup/cmd.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 years agoMake it possible to close all catpipes
Rob Browning [Thu, 10 Dec 2020 07:56:00 +0000 (01:56 -0600)]
Make it possible to close all catpipes

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agooptions: add parse_bytes
Rob Browning [Sun, 13 Dec 2020 02:14:56 +0000 (20:14 -0600)]
options: add parse_bytes

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agogit: explicitly request that Popen close_fds
Rob Browning [Thu, 10 Dec 2020 01:42:14 +0000 (19:42 -0600)]
git: explicitly request that Popen close_fds

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoAdd --import-py-module
Rob Browning [Fri, 4 Dec 2020 23:55:00 +0000 (17:55 -0600)]
Add --import-py-module

This can be used by tests (and will be used by test-save-errors) to
override functions for error injection, etc.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 years agoAdd handle_ctrl_c to bup itself
Rob Browning [Wed, 2 Dec 2020 07:48:42 +0000 (01:48 -0600)]
Add handle_ctrl_c to bup itself

Signed-off-by: Rob Browning <rlb@defaultvalue.org>