Commit d498321
[antlir2][debian] step towards proper automated build of debian-trixie build appliance
Summary:
Add a proper impl() build appliance for debian-trixie that builds itself from
features (like centos appliances do), while keeping the existing
manually-bootstrapped `trixie.tar.gz` archive to build the new one until this
diff lands and we can bump MSDK safely.
This required making several BUCK files OS-aware via select() on the package_manager constraint:
- build_appliance/BUCK: select between apt and dnf package manager features, and skip dnf-specific cleanup (yum.repos.d, dnf.conf removal) for apt
- antlir2_packager/BUCK: select between apt_install and rpms_install for packager tools, with appropriate package names for each ecosystem
- New apt/build_appliance/BUCK: apt-equivalent of the dnf build_appliance features (apt, dpkg, python3, mount)
- debian-trixie/BUCK: add impl() call with rpm2extents=False and bootstrap_build_appliance pointing to the existing tarball-based appliance
Test Plan:
```
❯ buck build fbcode//antlir/antlir2/facebook/images/build_appliance/debian-trixie:antlir2_build_appliance_debian_trixie'[out]'
fbcode//antlir/antlir2/facebook/images/build_appliance/debian-trixie:antlir2_build_appliance_debian_trixie[out] buck-out/v2/art/fbcode/db9872a2533ba461/antlir/antlir2/facebook/images/build_appliance/debian-trixie/__antlir2_build_appliance_debian_trixie__/out
❯ tree -l buck-out/v2/art/fbcode/db9872a2533ba461/antlir/antlir2/facebook/images/build_appliance/debian-trixie/__antlir2_build_appliance_debian_trixie__/out | head
buck-out/v2/art/fbcode/db9872a2533ba461/antlir/antlir2/facebook/images/build_appliance/debian-trixie/__antlir2_build_appliance_debian_trixie__/out
└── dir -> ../../../../../../../../../488708e8759f923e/antlir/antlir2/facebook/images/build_appliance/debian-trixie/__build-appliance.impl.dir__/build-appliance.impl.dir
├── __antlir2__
│ ├── build_appliance
│ ├── out
│ ├── root
│ └── working_directory
├── etc
│ ├── adduser.conf
│ ├── alternatives
```
And it can pass the apt feature tests
```
❯ buck2 test fbcode//antlir/antlir2/features/apt/...
Buck UI: https://www.internalfb.com/buck2/4ba36879-f97c-4d44-81a5-aa5e37d39723
Tests finished: Pass 6. Fail 0. Fatal 0. Skip 0. Omit 0. Infra Failure 0. Build failure 0
```
https://www.internalfb.com/intern/testinfra/testrun/10977524245798669
Make sure centos build still works:
```
❯ buck2 build --show-output fbcode//antlir/antlir2/facebook/images/build_appliance/centos9:
BUILD SUCCEEDED
fbcode//antlir/antlir2/facebook/images/build_appliance/centos9:build-appliance.impl.dir buck-out/v2/art/fbcode/381139113463cae0/antlir/antlir2/facebook/images/build_appliance/centos9/__build-appliance.impl.dir__/build-appliance.impl.dir
fbcode//antlir/antlir2/facebook/images/build_appliance/centos9:build-appliance.impl.layer buck-out/v2/art/fbcode/381139113463cae0/antlir/antlir2/facebook/images/build_appliance/centos9/__build-appliance.impl.layer__/compile/subvol_symlink
fbcode//antlir/antlir2/facebook/images/build_appliance/centos9:rpm2extents buck-out/v2/art-anon/anon_msdk/2035dc5044ef1a7dantlir/antlir2/facebook/images/build_appliance/centos9/msdk/5c3efc3b28aadb5a/__rpm2extents__/extracted/rpm2extents
fbcode//antlir/antlir2/facebook/images/build_appliance/centos9:rpm2extents.impl buck-out/v2/art/fbcode/381139113463cae0/antlir/antlir2/facebook/images/build_appliance/centos9/__rpm2extents.impl__/compile/subvol_symlink
fbcode//antlir/antlir2/facebook/images/build_appliance/centos9:rpm2extents.impl.xar buck-out/v2/art/fbcode/381139113463cae0/antlir/antlir2/facebook/images/build_appliance/centos9/__rpm2extents.impl.xar__/rpm2extents.impl.xar
```
Reviewed By: justintrudell
Differential Revision: D93776524
fbshipit-source-id: da5ecf56d8cc58959b395f39e13b8f10bb20fbc81 parent da94960 commit d498321
File tree
6 files changed
+102
-14
lines changed- antlir/antlir2
- antlir2_packager
- build_appliance
- bzl/feature
- features/package_install
- package_managers/apt/build_appliance
6 files changed
+102
-14
lines changedLines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
| |||
87 | 96 | | |
88 | 97 | | |
89 | 98 | | |
| 99 | + | |
90 | 100 | | |
91 | 101 | | |
92 | 102 | | |
| |||
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
103 | | - | |
| 113 | + | |
104 | 114 | | |
105 | 115 | | |
106 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| |||
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
35 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments