@@ -27,17 +27,19 @@ The following examples use `dnf`.
2727To register the RPM registry add the url to the list of known apt sources:
2828
2929``` shell
30- dnf config-manager --add-repo https://gitea.example.com/api/packages/{owner}/rpm.repo
30+ dnf config-manager --add-repo https://gitea.example.com/api/packages/{owner}/rpm/{distribution}/{component} .repo
3131```
3232
33- | Placeholder | Description |
34- | ----------- | ----------- |
35- | ` owner ` | The owner of the package. |
33+ | Placeholder | Description |
34+ | ----------- | ----------------------------------------------------|
35+ | ` owner ` | The owner of the package. |
36+ | ` distribution ` | System Name, e.g. ` centos ` , ` suse ` , ` rockylinux ` . |
37+ | ` component ` | System version, e.g. ` el7 ` , ` el9 ` , ` fc38 ` . |
3638
3739If the registry is private, provide credentials in the url. You can use a password or a [ personal access token] ( development/api-usage.md#authentication ) :
3840
3941``` shell
40- dnf config-manager --add-repo https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/rpm.repo
42+ dnf config-manager --add-repo https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/rpm/{distribution}/{component} .repo
4143```
4244
4345You have to add the credentials to the urls in the ` rpm.repo ` file in ` /etc/yum.repos.d ` too.
@@ -47,19 +49,21 @@ You have to add the credentials to the urls in the `rpm.repo` file in `/etc/yum.
4749To publish a RPM package (` *.rpm ` ), perform a HTTP PUT operation with the package content in the request body.
4850
4951```
50- PUT https://gitea.example.com/api/packages/{owner}/rpm/upload
52+ PUT https://gitea.example.com/api/packages/{owner}/rpm/{distribution}/{component}/ upload
5153```
5254
5355| Parameter | Description |
5456| --------- | ----------- |
5557| ` owner ` | The owner of the package. |
58+ | ` distribution ` | System Name, e.g. ` centos ` , ` suse ` , ` rockylinux ` . |
59+ | ` component ` | System version, e.g. ` el7 ` , ` el9 ` , ` fc38 ` . |
5660
5761Example request using HTTP Basic authentication:
5862
5963``` shell
6064curl --user your_username:your_password_or_token \
6165 --upload-file path/to/file.rpm \
62- https://gitea.example.com/api/packages/testuser/rpm/upload
66+ https://gitea.example.com/api/packages/testuser/rpm/centos/el7/ upload
6367```
6468
6569If you are using 2FA or OAuth use a [ personal access token] ( development/api-usage.md#authentication ) instead of the password.
@@ -78,21 +82,23 @@ The server responds with the following HTTP Status codes.
7882To delete an RPM package perform a HTTP DELETE operation. This will delete the package version too if there is no file left.
7983
8084```
81- DELETE https://gitea.example.com/api/packages/{owner}/rpm/{package_name}/{package_version}/{architecture}
85+ DELETE https://gitea.example.com/api/packages/{owner}/rpm/{distribution}/package/{ package_name}/{package_version}/{architecture}
8286```
8387
84- | Parameter | Description |
85- | ----------------- | ----------- |
86- | ` owner ` | The owner of the package. |
87- | ` package_name ` | The package name. |
88- | ` package_version ` | The package version. |
89- | ` architecture ` | The package architecture. |
88+ | Parameter | Description |
89+ | -------------------| ----------------------------|
90+ | ` owner ` | The owner of the package. |
91+ | ` distribution ` | The package distribution. |
92+ | ` component ` | The package group version. |
93+ | ` package_name ` | The package name. |
94+ | ` package_version ` | The package version. |
95+ | ` architecture ` | The package architecture. |
9096
9197Example request using HTTP Basic authentication:
9298
9399``` shell
94100curl --user your_username:your_token_or_password -X DELETE \
95- https://gitea.example.com/api/packages/testuser/rpm/test-package/1.0.0/x86_64
101+ https://gitea.example.com/api/packages/testuser/rpm/centos/el7/package/ test-package/1.0.0/x86_64
96102```
97103
98104The server responds with the following HTTP Status codes.
0 commit comments