Commit fb400d5
authored
[ABLD-28] Backport upstream macOS multiarch support (#240)
While looking at the macOS installation script, I realized no architecture was passed to the `dd-agent` [query string](https://github.com/DataDog/datadog-agent/blob/711ec69670e90a5066d5672a6ac8a9783871a37b/cmd/agent/install_mac_os.sh#L78):
```bash
curl "https://s3.amazonaws.com/dd-agent?prefix=datadog-agent-${major_minor}."
```
There was no architecture disambiguation so far because our PKGs and DMGs had been primarily targeting x86_64/AMD64, and relying on Rosetta 2 translation for AArch64/ARM64.
The present change is therefore to backport (`git cherry-pick`) upstream efforts on the matter, i.e.:
1. chef/omnibus@2b1b503
2. chef/omnibus@6173b5f
[Without](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1031599309#L1387)/[with](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1032219779#L2302) an architecture qualifier:
```diff
-datadog-agent-7.70.0-devel.git.75.d018f55.pipeline.70720451-1.dmg
+datadog-agent-7.70.0-devel.git.79.1816262.pipeline.70752546-1.x86_64.dmg
```
(examples from development pipelines)
Squashed here:
* Add support for macOS 11 and multiple architectures
* Provide the correct platform version (11 vs 11.x) for macOS.
* Add the architecture (x86_64, arm64) to the file name
Cherry-picked-from: chef/omnibus@2b1b503
Co-authored-by: Régis Desgroppes <regis.desgroppes@datadoghq.com>
* Add hostArchitectures to macOS Distribution file
Unless hostArchitectures is set, macOS 11 will assume that the package
is x86_64 and require Rosetta 2.
* https://scriptingosx.com/2020/12/platform-support-in-macos-installer-packages-pkg/
* https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html#//apple_ref/doc/uid/TP40005370-CH100-SW7
Cherry-picked-from: chef/omnibus@6173b5f
Co-authored-by: Régis Desgroppes <regis.desgroppes@datadoghq.com>1 parent dbb1b9b commit fb400d5
7 files changed
Lines changed: 50 additions & 18 deletions
File tree
- lib/omnibus
- packagers
- resources/pkg
- spec/unit
- compressors
- packagers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
| 173 | + | |
| 174 | + | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
176 | 180 | | |
177 | 181 | | |
178 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
| |||
276 | 277 | | |
277 | 278 | | |
278 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
279 | 289 | | |
280 | 290 | | |
281 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
142 | 158 | | |
143 | 159 | | |
144 | 160 | | |
| |||
148 | 164 | | |
149 | 165 | | |
150 | 166 | | |
151 | | - | |
| 167 | + | |
152 | 168 | | |
153 | 169 | | |
154 | 170 | | |
| |||
166 | 182 | | |
167 | 183 | | |
168 | 184 | | |
169 | | - | |
| 185 | + | |
170 | 186 | | |
171 | 187 | | |
172 | 188 | | |
| |||
0 commit comments