Skip to content

Commit 363d043

Browse files
adamperlincpuguy83
authored andcommitted
Update docs to clarify file extensions for gpg key file names
Update http source docs now that digest verification and file permissions are supported options
1 parent fd21ce4 commit 363d043

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

website/docs/examples/repos/msft-ubuntu.yml.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@ dependencies:
88
msft-golang:
99
extra_repos:
1010
- keys:
11-
msft.gpg: # Note: This must currently use a `.gpg` suffix or apt will not be happy
11+
# Note: The name for the key must use the proper `.gpg` (binary) or `.asc` (ascii)
12+
# extension, or apt will not be able to import the key properly
13+
msft.asc:
1214
http:
1315
url: https://packages.microsoft.com/keys/microsoft.asc
1416
digest: sha256:2cfd20a306b2fa5e25522d78f2ef50a1f429d35fd30bd983e2ebffc2b80944fa
1517
config:
1618
microsoft-prod.list:
1719
inline:
1820
file:
19-
# Note the `signed-by` path is always going to be `/usr/share/keyrings/<source key name>` for Ubuntu, in this case our source key name is `msft.gpg`
20-
contents: deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/msft.gpg] https://packages.microsoft.com/ubuntu/22.04/prod jammy main
21+
# Note the `signed-by` path is always going to be `/usr/share/keyrings/<source key name>` for Ubuntu, in this case our source key name is `msft.asc`
22+
contents: deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/msft.asc] https://packages.microsoft.com/ubuntu/22.04/prod jammy main
2123
envs:
2224
# The repository will only be available when installing build dependencies
2325
- build

website/docs/repositories.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ structure:
1414
A map of keys required to enable the configured repositories. Each key in
1515
this map is associated with a specific source and must be imported to allow
1616
the repositories to function as expected. The content of this is a
17-
[source](sources.md) just like in the sources section.
17+
[source](sources.md) just like in the sources section.
1818

1919
- **`config`**
2020
A collection of repository configurations to add to the environment. The
@@ -43,6 +43,11 @@ structure:
4343

4444
These configurations are highly distribution specific.
4545

46+
:::tip
47+
Be careful to name the key files properly depending on whether they are ascii armored (`*.asc`) or binary (`*.gpg`).
48+
Some package managers such as `apt` do not handle keys properly if they are not named with the correct extension.
49+
:::
50+
4651
### Examples:
4752

4853
import MsftUbuntuRepo from './examples/repos/msft-ubuntu.yml.md'

website/docs/sources.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,23 @@ by the client, not the actual secret values.
9797

9898
### HTTP
9999

100-
HTTP sources fetch a file from an HTTP URL.
101-
HTTP content is not verified by digest today, but it is in the roadmap.
100+
HTTP sources fetch a file from an HTTP URL. The HTTP source type is considered to be a "file" source.
101+
102+
The fetched file can be verified against a digest
103+
if one is supplied. There is also a `permissions` field that can set the octal permissions
104+
of the fetched file.
102105

103106
```yaml
104107
sources:
105108
someSource1:
106109
http:
107-
# No Digest verification
108110
url: https://example.com/someFile.txt
111+
# optional digest field
112+
digest: sha256:1234567890abcdef
113+
# optional permissions field
114+
permissions: 0644
109115
```
110116

111-
The HTTP source type is considered to be a "file" source.
112117

113118
### Build context
114119

0 commit comments

Comments
 (0)