Repository navigation
Commit 7b970f0
committed
ostree-ext: copy /usr metadata to root on merge commit
When building the merge commit in `write_merge_commit_impl()`,
`write_dfd_to_mtree()` inherits the root dir metadata from the temp
checkout dir, which causes its mode to be 0o755 rather than 0o555.
Since systemd v261, this triggers a systemd-tmpfiles error on systems
with read-only root: "fchmod() of / failed: Read-only file system".
OCI images don't reliably include root directory metadata, so to match
the approach used by composefs-rs [1], let's copy the metadata from /usr
to the root.
See:
- coreos/fedora-coreos-tracker#2238
-
coreos/fedora-coreos-tracker#2238 (comment)
[1]: https://docs.rs/composefs/0.9.4/composefs/generic_tree/struct.FileSystem.html#method.copy_root_metadata_from_usr
Assisted-by: llm
Signed-off-by: Rolv Apneseth <rolv.apneseth@gmail.com>1 parent 1a04bf2 commit 7b970f0
2 files changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
627 | 645 | | |
628 | 646 | | |
629 | 647 | | |
| |||
1307 | 1325 | | |
1308 | 1326 | | |
1309 | 1327 | | |
| 1328 | + | |
| 1329 | + | |
1310 | 1330 | | |
1311 | 1331 | | |
1312 | 1332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
61 | 79 | | |
62 | 80 | | |
63 | 81 | | |
| |||
707 | 725 | | |
708 | 726 | | |
709 | 727 | | |
| 728 | + | |
710 | 729 | | |
711 | 730 | | |
712 | 731 | | |
| |||
1558 | 1577 | | |
1559 | 1578 | | |
1560 | 1579 | | |
| 1580 | + | |
1561 | 1581 | | |
1562 | 1582 | | |
1563 | 1583 | | |
| |||
0 commit comments