On Fri, Jan 14, 2022 at 10:29:20AM +0100, Claudio Jeker wrote: > On Thu, Jan 13, 2022 at 10:51:33PM +0100, Theo Buehler wrote: > > On Thu, Jan 13, 2022 at 05:05:57PM +0100, Claudio Jeker wrote: > > > This diff adds a new cache subdir called "valid". This is the place where > > > all verified and good files are stored after a run. It makes -n work a lot > > > better since -n will now only look at what's inside "valid" and ignore > > > "rsync" and "rrdp". > > > > > > The trust anchors are still stored in "ta" even if valid. > > > The rsync repo will only hold temporary files and be empty otherwise. > > > The rrdp repo still may contain some superfluous files that people > > > included in their snapshots. Not keeping them could result in extra > > > snapshot downloads since delta updates could refer to these files. > > > Since there is a valid repo, rrdp no longer needs an additional temp > > > directory for its sync. > > > > > > With this rsync will use the --compare-dest feature and use the valid > > > cache as a base. > > > > > > The file cleanup at the end got more complex. There is now > > > repo_move_valid() and repo_cleanup_rrdp() to do two initial steps of > > > cleanup before the tree traversal starts. The fts function now uses > > > some fts features to find a) empty directories and b) superfluous files. > > > > > > I think the code changes outside of repo.c should be straight forward. > > > > > > To the rpki connoisseur, this currently only implements a simple newest > > > file wins startegy. The handling of .mft and their serial number will > > > follow once this is in. > > > > I have made a first pass over this. I will need to sleep on this and > > think through the repo.c changes in more detail with a fresh head. > > > > Couple leaks and a few stylistic remarks noted inline. > > Adjusted diff below. Thanks for the review of this and also for all the > previous diffs.
This looks good to me now. Couldn't find anything of substance to complain about. Let's get it in so we can make further progress in tree. ok tb
