Johannes Berg [Fri, 7 May 2021 20:06:34 +0000 (22:06 +0200)]
GNUmakefile: use correct dev/python path when installing bup
$(bup_python) no longer exists, we should use dev/python.
But since we change working directory, that needs a fully
qualified path.
Reported-by: Quaddle Me <quaddle.me@gmail.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
[rlb@defaultvalue.org: use $(CURDIR) instead of $(PWD); add . target dir] Reviewed-by: Rob Browning <rlb@defaultvalue.org> Tested-by: Rob Browning <rlb@defaultvalue.org>
Johannes Berg [Tue, 28 Jul 2020 20:42:46 +0000 (22:42 +0200)]
ls: make multiple arguments match real ls
Currently, passing multiple arguments to ls causes it to print
them all in a single list, which can be very confusing as it'll
even columnate them together.
Make this match real ls behaviour (at least as observed on my
system) that prints which path it's giving the output for.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Johannes Berg [Tue, 28 Jul 2020 20:33:43 +0000 (22:33 +0200)]
ftp: print pwd as part of the prompt
Print the current directory as part of the prompt.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Rob Browning <rlb@defaultvalue.org> Tested-by: Rob Browning <rlb@defaultvalue.org>
Johannes Berg [Tue, 28 Jul 2020 20:38:01 +0000 (22:38 +0200)]
ftp: honour pwd for ls
Honour the current working directory for 'ls' by changing
ls.within_repo() to get the pwd, and using posixpath to
build the correct path to do the ls for.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Johannes Berg [Mon, 28 Dec 2020 21:56:02 +0000 (22:56 +0100)]
git: remove get_commit_dates()
This function is unused.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Rob Browning <rlb@defaultvalue.org>
[rlb@defaultvalue.org: likely orphaned by vfs overhaul]
Johannes Berg [Wed, 30 Dec 2020 22:00:31 +0000 (23:00 +0100)]
git: remove all_packdirs()
This really never made sense - if you have a local repository
and want to run midx/bloom on it, then it doesn't make sense
to touch the index caches for other remote repositories.
And if you want to operate manually on the cache for some odd
reason (it's maintained automatically) then you anyway need to
(and should) pass the --dir option for it explicitly.
Remove this to make things easier to reason about.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Rob Browning <rlb@defaultvalue.org>
[rlb@defaultvalue.org: previous behavior also didn't respect the
documentation in bup-bloom(1).]
Johannes Berg [Sun, 24 Jan 2021 20:22:32 +0000 (21:22 +0100)]
configure: fix readline.h detection
Unfortunately, readline.h requires stdio.h to be included first,
except where it has been patched (e.g. Debian). Do that in the
configure script so we correctly detect readline.h on systems
that have an unpatched readline version.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-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 [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 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 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 [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 [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>