Browse Source

RPM Registry: Show zypper commands for SUSE based distros as well (#25981) (#26020)

Backport #25981 by @asdil12

After RPM is supported with https://github.com/go-gitea/gitea/pull/23380
let's show the user
how to add the repo and install the RPM via all common package managers.

Co-authored-by: Dominik Heidler <dominik@heidler.eu>
tags/v1.20.1
Giteabot 10 months ago
parent
commit
dfd371a363
No account linked to committer's email address

+ 1
- 1
docs/content/doc/usage/packages/overview.en-us.md View File

| [NuGet]({{< relref "doc/usage/packages/nuget.en-us.md" >}}) | .NET | `nuget` | | [NuGet]({{< relref "doc/usage/packages/nuget.en-us.md" >}}) | .NET | `nuget` |
| [Pub]({{< relref "doc/usage/packages/pub.en-us.md" >}}) | Dart | `dart`, `flutter` | | [Pub]({{< relref "doc/usage/packages/pub.en-us.md" >}}) | Dart | `dart`, `flutter` |
| [PyPI]({{< relref "doc/usage/packages/pypi.en-us.md" >}}) | Python | `pip`, `twine` | | [PyPI]({{< relref "doc/usage/packages/pypi.en-us.md" >}}) | Python | `pip`, `twine` |
| [RPM]({{< relref "doc/usage/packages/rpm.en-us.md" >}}) | - | `yum`, `dnf` |
| [RPM]({{< relref "doc/usage/packages/rpm.en-us.md" >}}) | - | `yum`, `dnf`, `zypper` |
| [RubyGems]({{< relref "doc/usage/packages/rubygems.en-us.md" >}}) | Ruby | `gem`, `Bundler` | | [RubyGems]({{< relref "doc/usage/packages/rubygems.en-us.md" >}}) | Ruby | `gem`, `Bundler` |
| [Swift]({{< relref "doc/usage/packages/rubygems.en-us.md" >}}) | Swift | `swift` | | [Swift]({{< relref "doc/usage/packages/rubygems.en-us.md" >}}) | Swift | `swift` |
| [Vagrant]({{< relref "doc/usage/packages/vagrant.en-us.md" >}}) | - | `vagrant` | | [Vagrant]({{< relref "doc/usage/packages/vagrant.en-us.md" >}}) | - | `vagrant` |

+ 1
- 1
docs/content/doc/usage/packages/overview.zh-cn.md View File

| [NuGet]({{< relref "doc/usage/packages/nuget.zh-cn.md" >}}) | .NET | `nuget` | | [NuGet]({{< relref "doc/usage/packages/nuget.zh-cn.md" >}}) | .NET | `nuget` |
| [Pub]({{< relref "doc/usage/packages/pub.zh-cn.md" >}}) | Dart | `dart`, `flutter` | | [Pub]({{< relref "doc/usage/packages/pub.zh-cn.md" >}}) | Dart | `dart`, `flutter` |
| [PyPI]({{< relref "doc/usage/packages/pypi.zh-cn.md" >}}) | Python | `pip`, `twine` | | [PyPI]({{< relref "doc/usage/packages/pypi.zh-cn.md" >}}) | Python | `pip`, `twine` |
| [RPM]({{< relref "doc/usage/packages/rpm.zh-cn.md" >}}) | - | `yum`, `dnf` |
| [RPM]({{< relref "doc/usage/packages/rpm.zh-cn.md" >}}) | - | `yum`, `dnf`, `zypper` |
| [RubyGems]({{< relref "doc/usage/packages/rubygems.zh-cn.md" >}}) | Ruby | `gem`, `Bundler` | | [RubyGems]({{< relref "doc/usage/packages/rubygems.zh-cn.md" >}}) | Ruby | `gem`, `Bundler` |
| [Swift]({{< relref "doc/usage/packages/rubygems.zh-cn.md" >}}) | Swift | `swift` | | [Swift]({{< relref "doc/usage/packages/rubygems.zh-cn.md" >}}) | Swift | `swift` |
| [Vagrant]({{< relref "doc/usage/packages/vagrant.zh-cn.md" >}}) | - | `vagrant` | | [Vagrant]({{< relref "doc/usage/packages/vagrant.zh-cn.md" >}}) | - | `vagrant` |

+ 2
- 2
docs/content/doc/usage/packages/rpm.en-us.md View File



## Requirements ## Requirements


To work with the RPM registry, you need to use a package manager like `yum` or `dnf` to consume packages.
To work with the RPM registry, you need to use a package manager like `yum`, `dnf` or `zypper` to consume packages.


The following examples use `dnf`. The following examples use `dnf`.




## Delete a package ## Delete a package


To delete a Debian package perform a HTTP DELETE operation. This will delete the package version too if there is no file left.
To delete an RPM package perform a HTTP DELETE operation. This will delete the package version too if there is no file left.


``` ```
DELETE https://gitea.example.com/api/packages/{owner}/rpm/{package_name}/{package_version}/{architecture} DELETE https://gitea.example.com/api/packages/{owner}/rpm/{package_name}/{package_version}/{architecture}

+ 1
- 1
docs/content/doc/usage/packages/rpm.zh-cn.md View File



## 要求 ## 要求


要使用RPM注册表,您需要使用像 `yum` 或 `dnf` 这样的软件包管理器来消费软件包。
要使用RPM注册表,您需要使用像 `yum`, `dnf` 或 `zypper` 这样的软件包管理器来消费软件包。


以下示例使用 `dnf`。 以下示例使用 `dnf`。



+ 2
- 0
options/locale/locale_en-US.ini View File

pypi.install = To install the package using pip, run the following command: pypi.install = To install the package using pip, run the following command:
pypi.documentation = For more information on the PyPI registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. pypi.documentation = For more information on the PyPI registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>.
rpm.registry = Setup this registry from the command line: rpm.registry = Setup this registry from the command line:
rpm.distros.redhat = on RedHat based distributions
rpm.distros.suse = on SUSE based distributions
rpm.install = To install the package, run the following command: rpm.install = To install the package, run the following command:
rpm.documentation = For more information on the RPM registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. rpm.documentation = For more information on the RPM registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>.
rubygems.install = To install the package using gem, run the following command: rubygems.install = To install the package using gem, run the following command:

+ 10
- 2
templates/package/content/rpm.tmpl View File

<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.rpm.registry"}}</label> <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.rpm.registry"}}</label>
<div class="markup"><pre class="code-block"><code>dnf config-manager --add-repo <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm.repo"></gitea-origin-url></code></pre></div>
<div class="markup"><pre class="code-block"><code># {{.locale.Tr "packages.rpm.distro.redhat"}}
dnf config-manager --add-repo <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm.repo"></gitea-origin-url>

# {{.locale.Tr "packages.rpm.distro.suse"}}
zypper addrepo <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm.repo"></gitea-origin-url></code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.rpm.install"}}</label> <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.rpm.install"}}</label>
<div class="markup"> <div class="markup">
<pre class="code-block"><code>dnf install {{$.PackageDescriptor.Package.Name}}</code></pre>
<pre class="code-block"><code># {{.locale.Tr "packages.rpm.distro.redhat"}}
dnf install {{$.PackageDescriptor.Package.Name}}

# {{.locale.Tr "packages.rpm.distro.suse"}}
zypper install {{$.PackageDescriptor.Package.Name}}</code></pre>
</div> </div>
</div> </div>
<div class="field"> <div class="field">

Loading…
Cancel
Save