]>
arthur.barton.de Git - bup.git/log
Johannes Berg [Sun, 24 Jan 2021 20:28:35 +0000 (21:28 +0100)]
midx: correct path_msg() use in an error path
pathmsg() doesn't exist, it should be path_msg(). Fix that.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Rob Browning [Sun, 11 Apr 2021 20:06:37 +0000 (15:06 -0500)]
ftp: fix tab completion
We need the 'repo' variable in enter_completion() which assumes
it's global, so make it global.
Fixes: c4d10541ed1e ("ftp: convert to internal command")
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Rob Browning [Sun, 11 Apr 2021 19:53:21 +0000 (14:53 -0500)]
helpers: adjust macos linkage
Apparently macos needs -bundle and -undefined dynamic_lookup since
around 2003. cpython does something similar via its own sysconfig
LDSHARED command.
Thanks to Johannes Berg for finding the solution.
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Rob Browning [Sat, 3 Apr 2021 20:17:01 +0000 (15:17 -0500)]
Convert bup to binary executable and run python subcommands directly
Don't execute python subcommands in a child process, run them
directly. Convert bup (and dev/python, etc.) to be C executables.
See the commit messages, comments, and doc changes (e.g. DESIGN) for
more information.
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Rob Browning [Sun, 28 Mar 2021 21:11:03 +0000 (16:11 -0500)]
wvtest-bup.sh: set _wvtop to the physical path
The previous fix was insufficient:
96da3f0142c8f41fc379db4e4e31df2426d466b5
The problem can be demonstrated via:
ln -s bup-real bup
cd bup
make check
cf.
7a8f8d91501525d4710918a1638b5df1fd4c54a5
Thanks to Johannes Berg for tracking down the solution.
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Rob Browning [Sun, 28 Mar 2021 20:30:54 +0000 (15:30 -0500)]
cirrus: drop py2 on freebsd
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Rob Browning [Sun, 28 Mar 2021 19:22:50 +0000 (14:22 -0500)]
cirrus: drop py2 on macos since brew did
Homebrew provided a python@2 formula until the end of 2019, at which
point it was removed due to the Python 2 deprecation.
-- https://docs.brew.sh/Homebrew-and-Python
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Rob Browning [Sun, 28 Mar 2021 18:14:26 +0000 (13:14 -0500)]
id-other-than: pass strings to getpwnam/getgrnam
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Johannes Berg [Sun, 21 Mar 2021 14:23:33 +0000 (15:23 +0100)]
bup: cat-file: fix error print
Some variable renaming and bytes issues, if a target cannot
be found in cat-file.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Rob Browning [Sun, 28 Mar 2021 17:01:07 +0000 (12:01 -0500)]
exe_parent_dir: allow arbitrary proc readlink path lengths
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Rob Browning [Sun, 28 Mar 2021 17:00:12 +0000 (12:00 -0500)]
exe_parent_dir: allow arbritrary macos path lengths
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>