[PATCH] cmd/lib/bup.c: Don't use sysctl kern.proc.pathname on NetBSD

3 views
Skip to first unread message

Greg Troxel

unread,
Jul 6, 2022, 9:21:03 AM7/6/22
to bup-...@googlegroups.com, Greg Troxel
This doesn't work, and I have no idea why the code asks for it.
Removing NetBSD from this ifdef branch makes executing bup within the
build tree work again.

Signed-off-by: Greg Troxel <g...@lexort.com>
---
lib/cmd/bup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/cmd/bup.c b/lib/cmd/bup.c
index 7f69291b..bb0ebd1b 100644
--- a/lib/cmd/bup.c
+++ b/lib/cmd/bup.c
@@ -141,7 +141,7 @@ static char *exe_parent_dir(const char * const argv_0) {
return abs_parent;
}

-#elif defined(__FreeBSD__) || defined(__NetBSD__)
+#elif defined(__FreeBSD__)

static char *exe_path ()
{
@@ -166,7 +166,7 @@ static char *exe_parent_dir(const char * const argv_0)
return parent;
}

-#else // not defined(__FreeBSD__) || defined(__NetBSD__)
+#else // not defined(__FreeBSD__)

/// Use /proc if possible, and if all else fails, search in the PATH

--
2.36.1

Greg Troxel

unread,
Jul 6, 2022, 9:33:55 AM7/6/22
to bup-...@googlegroups.com

Regarding the patch I just sent; I ran into this long ago and it was
fairly tricky to track down, and apparently I never got around to
cleaning it up and sending it in. I just went to test the window
optimization PR, and tests failed hard early: even "./bup features" did
not work.

The patch is based on the previous commit that I had a valid test run
(with uncommitted changes that include what's in the patch plus a bunch
of debugging code).

A test run of

0.32-275-g37b8e2e3

with the patch had a single failure, but that's pretty clearly unrelated.

(The failure was test_prune_older, which has an related issue having to do with dates
that are technically invalid, expressed in local time during the DST
forward jump. I now remember that I set TZ=UTC to take that out of the
equation.)
signature.asc

Rob Browning

unread,
Jul 9, 2022, 2:47:04 PM7/9/22
to Greg Troxel, bup-...@googlegroups.com, Greg Troxel
Greg Troxel <g...@lexort.com> writes:

> This doesn't work, and I have no idea why the code asks for it.
> Removing NetBSD from this ifdef branch makes executing bup within the
> build tree work again.
>
> Signed-off-by: Greg Troxel <g...@lexort.com>

Pushed.

--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
Reply all
Reply to author
Forward
0 new messages