Commit 1de42b9
committed
cmd-build: only copy allowed files into final build dir
Over time we seem to have accumulated all sorts of crud in the build dir
that were never meant to be uploaded:
```
$ aws s3 ls s3://.../$buildid/x86_64/
...
2024-10-26 10:49:16 1027 cmd.sh
2024-10-26 10:49:15 540 image.json
2024-10-26 10:49:15 8436 manifest.json
2024-10-26 10:49:15 2267 platforms.json
2024-10-26 10:49:15 2621 platforms.json.all
2024-10-26 10:49:16 2 rc
2024-10-26 10:49:16 97896 runvm-console.txt
```
There are no secrets in there, but still we should be more conscious of
what we upload and keep artifacts in public build dirs to strictly what
we intend.
Historically, `$tmp_builddir` was meant to be the staging area for the
final contents of the build dir we would move into place and `$TMPDIR`
was the truly temporary directory for that build. Over time, that
distinction has been lost a bit and things that shouldn't have been
placed there were.
In the end, I think it's cleaner to instead operate on an allowlist of
files we know belong in the build dir, so let's do that.1 parent 6813e3f commit 1de42b9
1 file changed
+16
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | 626 | | |
| 627 | + | |
636 | 628 | | |
637 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
638 | 644 | | |
639 | 645 | | |
640 | 646 | | |
| |||
643 | 649 | | |
644 | 650 | | |
645 | 651 | | |
646 | | - | |
647 | 652 | | |
648 | 653 | | |
649 | 654 | | |
| |||
0 commit comments