Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-02 21:08:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-02 21:08:48 +0300
commitfa06c9a675d9c028905276e7d0a11aacc9f8f8ac (patch)
treee84c88aa04b4a94a144cd2d3b4d1a6fd632828b7 /doc/api/packages
parent6f998d352988f93f875db862353e814e95db1fe3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/packages')
-rw-r--r--doc/api/packages/debian.md101
1 files changed, 94 insertions, 7 deletions
diff --git a/doc/api/packages/debian.md b/doc/api/packages/debian.md
index 797955ea600..0912f894fa3 100644
--- a/doc/api/packages/debian.md
+++ b/doc/api/packages/debian.md
@@ -74,6 +74,38 @@ curl --request PUT \
"https://gitlab.example.com/api/v4/projects/1/packages/debian/mypkg.deb"
```
+## Download a package
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64923) in GitLab 14.2.
+
+Download a package file.
+
+```plaintext
+GET projects/:id/packages/debian/pool/:distribution/:letter/:package_name/:package_version/:file_name
+```
+
+| Attribute | Type | Required | Description |
+| ----------------- | ------ | -------- | ----------- |
+| `distribution` | string | yes | The codename or suite of the Debian distribution. |
+| `letter` | string | yes | The Debian Classification (first-letter or lib-first-letter). |
+| `package_name` | string | yes | The source package name. |
+| `package_version` | string | yes | The source package version. |
+| `file_name` | string | yes | The file name. |
+
+```shell
+curl --header "Private-Token: <personal_access_token>" "https://gitlab.example.com/api/v4/projects/1/packages/pool/my-distro/a/my-pkg/1.0.0/example_1.0.0~alpha2_amd64.deb"
+```
+
+Write the output to a file:
+
+```shell
+curl --header "Private-Token: <personal_access_token>" \
+ "https://gitlab.example.com/api/v4/projects/1/packages/pool/my-distro/a/my-pkg/1.0.0/example_1.0.0~alpha2_amd64.deb" \
+ --remote-name
+```
+
+This writes the downloaded file using the remote file name in the current directory.
+
## Route prefix
The remaining endpoints described are two sets of identical routes that each make requests in
@@ -108,7 +140,7 @@ The examples in this document all use the project-level prefix.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64067) in GitLab 14.1.
-Download a Debian package file.
+Download a Debian distribution file.
```plaintext
GET <route-prefix>/dists/*distribution/Release
@@ -130,16 +162,13 @@ curl --header "Private-Token: <personal_access_token>" \
--remote-name
```
-This writes the downloaded file to `Release` in the current directory.
+This writes the downloaded file using the remote file name in the current directory.
## Download a signed distribution Release file
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64067) in GitLab 14.1.
-Download a Debian package file.
-
-Signed releases are [not supported](https://gitlab.com/groups/gitlab-org/-/epics/6057#note_582697034).
-Therefore, this endpoint downloads the unsigned release file.
+Download a signed Debian distribution file.
```plaintext
GET <route-prefix>/dists/*distribution/InRelease
@@ -161,4 +190,62 @@ curl --header "Private-Token: <personal_access_token>" \
--remote-name
```
-This writes the downloaded file to `InRelease` in the current directory.
+This writes the downloaded file using the remote file name in the current directory.
+
+## Download a release file signature
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64923) in GitLab 14.2.
+
+Download a Debian release file signature.
+
+```plaintext
+GET <route-prefix>/dists/*distribution/Release.gpg
+```
+
+| Attribute | Type | Required | Description |
+| ----------------- | ------ | -------- | ----------- |
+| `distribution` | string | yes | The codename or suite of the Debian distribution. |
+
+```shell
+curl --header "Private-Token: <personal_access_token>" "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/Release.gpg"
+```
+
+Write the output to a file:
+
+```shell
+curl --header "Private-Token: <personal_access_token>" \
+ "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/Release.gpg" \
+ --remote-name
+```
+
+This writes the downloaded file using the remote file name in the current directory.
+
+## Download a binary file's index
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64923) in GitLab 14.2.
+
+Download a distribution index.
+
+```plaintext
+GET <route-prefix>/dists/*distribution/:component/binary-:architecture/Packages
+```
+
+| Attribute | Type | Required | Description |
+| ----------------- | ------ | -------- | ----------- |
+| `distribution` | string | yes | The codename or suite of the Debian distribution. |
+| `component` | string | yes | The distribution component name. |
+| `architecture` | string | yes | The distribution architecture type. |
+
+```shell
+curl --header "Private-Token: <personal_access_token>" "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/amd64/Packages"
+```
+
+Write the output to a file:
+
+```shell
+curl --header "Private-Token: <personal_access_token>" \
+ "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/amd64/Packages" \
+ --remote-name
+```
+
+This writes the downloaded file using the remote file name in the current directory.