Commit b3310dc
[antlir2][packager] create separate build appliance for packaging use cases
Summary:
This diff creates a separate build appliance for packaging rules that is independent of the target image OS.
Changes:
1. Created a new `packager-appliance` layer and rule in `//antlir/antlir2/antlir2_packager/facebook/` that includes the `build-appliance-features` for packaging
2. Added `msdk.builder` for the packager-appliance for better performance
3. Updated the package rules attrs to use this new packager-appliance as the default `build_appliance` for packaging operations (internally)
4. Created `default_attrs_base` in attrs.bzl to separate attrs that don't include the packager-specific build_appliance
5. Updated `unprivileged_dir` to use `default_attrs_base` combined with `attrs_selected_by_cfg` (OS-specific build appliance) since it needs to build dot_meta layers
6. Removed the packager `build-appliance-features` from the layer build appliance features since packaging now uses its own appliance
This allows packaging to be done with a consistent build appliance regardless of the target image OS, while still allowing users to customize it if needed.
[Session trajectory link](https://www.internalfb.com/intern/devai/devmate/inspector/?id=a5c24bee-ebf3-45f5-a42c-adb356739e9e)
Test Plan:
Built the packager-appliance successfully:
```
buck2 build fbcode//antlir/antlir2/antlir2_packager/facebook:packager-appliance
```
Ran package tests that passed:
```
buck2 test fbcode//antlir/antlir2/test_images/package/unprivileged_dir/...
buck2 test fbcode//antlir/antlir2/test_images/package/tar/...
buck2 test fbcode//antlir/antlir2/test_images/package/cpio/...
buck2 test fbcode//antlir/antlir2/test_images/package/ext3/...
buck2 test fbcode//antlir/antlir2/test_images/package/ext4/...
buck2 test fbcode//antlir/antlir2/test_images/package/rpm/...
```
(Some sendstream tests fail due to infrastructure issues with BTRFS ioctl permissions in Sandcastle, not related to these changes)
Reviewed By: justintrudell
Differential Revision: D94938828
fbshipit-source-id: e36dd3fbadc75f46f3d17dfbc8306c5cf8ced9491 parent a7d7b60 commit b3310dc
File tree
4 files changed
+42
-8
lines changed- antlir/antlir2
- antlir2_packager
- build_appliance
- bzl/package
4 files changed
+42
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
| |||
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
80 | | - | |
| 83 | + | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| |||
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | | - | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
0 commit comments