Commit 13cb153
ostree-ext/store: Label layers of plain OCI images using booted policy
When importing layers from a plain OCI image (i.e. without `/ostree`),
right now we don't do any initial labeling. So all the real labeling
happens during the merge commit. This causes a lot of file duplication.
We'll fix that more categorically in a later patch, but as a first pass
let's at least do the initial import with _an_ SELinux policy; a natural
choice is to use the one from the booted deployment. In the common case
where we're upgrading, the policies are likely similar enough and so
this significantly reduces file duplication in the first place.
(There's also the case at install time where we're not yet in a booted
commit but may have an SELinux policy lying around; I didn't bother
trying to support that because it seems fine to be a bit less efficient
there for simpler code.)
See also #1637.
Signed-off-by: Jonathan Lebon <jonathan@jlebon.com>1 parent 850ce55 commit 13cb153
File tree
4 files changed
+82
-15
lines changed- crates
- lib/src
- ostree-ext/src/container
4 files changed
+82
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
1103 | | - | |
| 1103 | + | |
| 1104 | + | |
1104 | 1105 | | |
1105 | 1106 | | |
1106 | 1107 | | |
| |||
1125 | 1126 | | |
1126 | 1127 | | |
1127 | 1128 | | |
1128 | | - | |
1129 | | - | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
1130 | 1139 | | |
1131 | | - | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
1132 | 1149 | | |
1133 | 1150 | | |
1134 | 1151 | | |
| |||
1289 | 1306 | | |
1290 | 1307 | | |
1291 | 1308 | | |
1292 | | - | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
1293 | 1319 | | |
1294 | | - | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
1295 | 1329 | | |
1296 | 1330 | | |
1297 | 1331 | | |
| |||
1428 | 1462 | | |
1429 | 1463 | | |
1430 | 1464 | | |
1431 | | - | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
1432 | 1474 | | |
1433 | 1475 | | |
1434 | 1476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
| |||
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
120 | 128 | | |
121 | 129 | | |
122 | 130 | | |
| |||
459 | 467 | | |
460 | 468 | | |
461 | 469 | | |
| 470 | + | |
462 | 471 | | |
463 | 472 | | |
464 | 473 | | |
465 | 474 | | |
466 | | - | |
| 475 | + | |
467 | 476 | | |
468 | 477 | | |
469 | 478 | | |
| |||
517 | 526 | | |
518 | 527 | | |
519 | 528 | | |
| 529 | + | |
520 | 530 | | |
521 | 531 | | |
522 | 532 | | |
| |||
562 | 572 | | |
563 | 573 | | |
564 | 574 | | |
565 | | - | |
| 575 | + | |
566 | 576 | | |
567 | 577 | | |
568 | 578 | | |
| |||
613 | 623 | | |
614 | 624 | | |
615 | 625 | | |
| 626 | + | |
616 | 627 | | |
617 | | - | |
| 628 | + | |
618 | 629 | | |
619 | 630 | | |
620 | 631 | | |
| |||
726 | 737 | | |
727 | 738 | | |
728 | 739 | | |
| 740 | + | |
729 | 741 | | |
730 | | - | |
| 742 | + | |
731 | 743 | | |
732 | 744 | | |
733 | 745 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
| 1077 | + | |
1077 | 1078 | | |
1078 | 1079 | | |
1079 | 1080 | | |
1080 | | - | |
| 1081 | + | |
1081 | 1082 | | |
1082 | 1083 | | |
1083 | 1084 | | |
| |||
2764 | 2765 | | |
2765 | 2766 | | |
2766 | 2767 | | |
| 2768 | + | |
2767 | 2769 | | |
2768 | 2770 | | |
2769 | 2771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
| |||
653 | 655 | | |
654 | 656 | | |
655 | 657 | | |
| 658 | + | |
656 | 659 | | |
657 | 660 | | |
658 | 661 | | |
| |||
694 | 697 | | |
695 | 698 | | |
696 | 699 | | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
697 | 707 | | |
698 | 708 | | |
699 | 709 | | |
| |||
1373 | 1383 | | |
1374 | 1384 | | |
1375 | 1385 | | |
1376 | | - | |
1377 | | - | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
1378 | 1389 | | |
1379 | | - | |
| 1390 | + | |
1380 | 1391 | | |
1381 | 1392 | | |
1382 | 1393 | | |
| |||
0 commit comments