Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b5ba493c
Commit
b5ba493c
authored
Aug 02, 2021
by
Steve Abrams
Committed by
Nick Gaskill
Aug 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Debian installation docs
parent
83888b9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
10 deletions
+128
-10
doc/api/packages/debian.md
doc/api/packages/debian.md
+94
-7
doc/user/packages/debian_repository/index.md
doc/user/packages/debian_repository/index.md
+34
-3
No files found.
doc/api/packages/debian.md
View file @
b5ba493c
...
...
@@ -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.
doc/user/packages/debian_repository/index.md
View file @
b5ba493c
...
...
@@ -61,6 +61,15 @@ Feature.disable(:debian_group_packages)
Creating a Debian package is documented
[
on the Debian Wiki
](
https://wiki.debian.org/Packaging
)
.
## Authenticate to the Package Registry
To create a distribution, publish a package, or install a private package, you need one of the
following:
-
[
Personal access token
](
../../../api/index.md#personalproject-access-tokens
)
-
[
CI/CD job token
](
../../../api/index.md#gitlab-cicd-job-token
)
-
[
Deploy token
](
../../project/deploy_tokens/index.md
)
## Create a Distribution
On the project-level, Debian packages are published using
*Debian Distributions*
. To publish
...
...
@@ -116,7 +125,7 @@ To upload these files, you can use `dput-ng >= 1.32` (Debian bullseye):
cat
<<
EOF
> dput.cf
[gitlab]
method = https
fqdn = <
login
>:<your_access_token>@gitlab.example.com
fqdn = <
username
>:<your_access_token>@gitlab.example.com
incoming = /api/v4/projects/<project_id>/packages/debian
EOF
...
...
@@ -125,5 +134,27 @@ dput --config=dput.cf --unchecked --no-upload-log gitlab <your_package>.changes
## Install a package
The Debian package registry for GitLab is under development, and isn't ready for production use. You
cannot install packages from the registry. However, you can download files directly from the UI.
To install a package:
1.
Configure the repository:
If you are using a private project, add your [credentials](#authenticate-to-the-package-registry) to your apt config:
```shell
echo 'machine gitlab.example.com login <username> password <your_access_token>' \
| sudo tee /etc/apt/auth.conf.d/gitlab_project.conf
```
Add your project as a source:
```shell
echo 'deb [trusted=yes] https://gitlab.example.com/api/v4/projects/<project_id>/packages/debian <codename> <component1> <component2>' \
| sudo tee /etc/apt/sources.list.d/gitlab_project.list
sudo apt-get update
```
1.
Install the package:
```shell
sudo apt-get -y install -t <codename> <package-name>
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment