"GOT", but the "O" is a cute, smiling sun Index | Thread

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: split up pack_create.c
To:
Stefan Sperling <stsp@stsp.name>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 16 Oct 2022 12:43:55 +0200

Download raw body.

On 2022/10/16 12:31:59 +0200, Stefan Sperling <stsp@stsp.name> wrote:
> Some code in pack_create.c depends on privsep.c, which makes
> future gotd(8) error out during the build like this:
> 
> ld: error: undefined symbol: got_privsep_recv_reused_deltas
> ld: error: undefined symbol: got_privsep_init_commit_painting
> ld: error: undefined symbol: got_privsep_send_painting_commits_done
> ld: error: undefined symbol: got_privsep_send_painting_request
> ld: error: undefined symbol: got_privsep_recv_painted_commits
> ld: error: undefined symbol: got_privsep_send_object_idlist
> ld: error: undefined symbol: got_privsep_send_object_idlist_done
> ld: error: undefined symbol: got_privsep_send_raw_delta_outfd
> ld: error: undefined symbol: got_privsep_send_delta_reuse_req
> 
> To allow me to fix this, move relevant code to a new file, called
> pack_create_privsep.c, and link to this file where neeed.
> 
> gotd will then have to implement its own versions of got_pack_search_deltas(),
> got_pack_paint_commits(), and got_pack_load_packed_object_ids(), avoiding
> the privsep dance (instead, gotd reads objects directly inside a chroot).
> 
> ok?

haven't really double-checked that all the deletions and additions
matches, i'll trust your copy-paste and the fact that compiles and
regress is happy :)

ok op@


to be fair i'm not sure i'm 100% happy about having different
implementations of the same function in different parts, i fear that
some code may end up relying on implementations details of one version
and fail with the others, but it's also not too bad and seems the
easiest way (at least for now.)