diff options
author | Dominik Heidler <dominik@heidler.eu> | 2023-07-20 17:37:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-20 17:37:31 +0200 |
commit | 2e128dd1fc4ee55cd6a93795a010d9f7e98ed5cd (patch) | |
tree | 1884a7da46be1d0a730e0b12b3010cd465010a25 | |
parent | af22f33a932c7b2a4a27298ca6b1f4a168e85fd3 (diff) | |
download | gitea-2e128dd1fc4ee55cd6a93795a010d9f7e98ed5cd.tar.gz gitea-2e128dd1fc4ee55cd6a93795a010d9f7e98ed5cd.zip |
RPM Registry: Show zypper commands for SUSE based distros as well (#25981)
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: Giteabot <teabot@gitea.io>
-rw-r--r-- | docs/content/doc/usage/packages/overview.en-us.md | 2 | ||||
-rw-r--r-- | docs/content/doc/usage/packages/overview.zh-cn.md | 2 | ||||
-rw-r--r-- | docs/content/doc/usage/packages/rpm.en-us.md | 4 | ||||
-rw-r--r-- | docs/content/doc/usage/packages/rpm.zh-cn.md | 2 | ||||
-rw-r--r-- | options/locale/locale_en-US.ini | 2 | ||||
-rw-r--r-- | templates/package/content/rpm.tmpl | 12 |
6 files changed, 17 insertions, 7 deletions
diff --git a/docs/content/doc/usage/packages/overview.en-us.md b/docs/content/doc/usage/packages/overview.en-us.md index 944505a04a..bf33ea627d 100644 --- a/docs/content/doc/usage/packages/overview.en-us.md +++ b/docs/content/doc/usage/packages/overview.en-us.md @@ -44,7 +44,7 @@ The following package managers are currently supported: | [NuGet]({{< relref "doc/usage/packages/nuget.en-us.md" >}}) | .NET | `nuget` | | [Pub]({{< relref "doc/usage/packages/pub.en-us.md" >}}) | Dart | `dart`, `flutter` | | [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` | | [Swift]({{< relref "doc/usage/packages/rubygems.en-us.md" >}}) | Swift | `swift` | | [Vagrant]({{< relref "doc/usage/packages/vagrant.en-us.md" >}}) | - | `vagrant` | diff --git a/docs/content/doc/usage/packages/overview.zh-cn.md b/docs/content/doc/usage/packages/overview.zh-cn.md index 70851fa2ea..9d24a733fd 100644 --- a/docs/content/doc/usage/packages/overview.zh-cn.md +++ b/docs/content/doc/usage/packages/overview.zh-cn.md @@ -44,7 +44,7 @@ menu: | [NuGet]({{< relref "doc/usage/packages/nuget.zh-cn.md" >}}) | .NET | `nuget` | | [Pub]({{< relref "doc/usage/packages/pub.zh-cn.md" >}}) | Dart | `dart`, `flutter` | | [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` | | [Swift]({{< relref "doc/usage/packages/rubygems.zh-cn.md" >}}) | Swift | `swift` | | [Vagrant]({{< relref "doc/usage/packages/vagrant.zh-cn.md" >}}) | - | `vagrant` | diff --git a/docs/content/doc/usage/packages/rpm.en-us.md b/docs/content/doc/usage/packages/rpm.en-us.md index d4ff727ade..7a258f5c03 100644 --- a/docs/content/doc/usage/packages/rpm.en-us.md +++ b/docs/content/doc/usage/packages/rpm.en-us.md @@ -22,7 +22,7 @@ Publish [RPM](https://rpm.org/) packages for your user or organization. ## 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`. @@ -79,7 +79,7 @@ The server responds with the following HTTP Status codes. ## 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} diff --git a/docs/content/doc/usage/packages/rpm.zh-cn.md b/docs/content/doc/usage/packages/rpm.zh-cn.md index 405e141afd..f76273e5a8 100644 --- a/docs/content/doc/usage/packages/rpm.zh-cn.md +++ b/docs/content/doc/usage/packages/rpm.zh-cn.md @@ -22,7 +22,7 @@ menu: ## 要求 -要使用RPM注册表,您需要使用像 `yum` 或 `dnf` 这样的软件包管理器来消费软件包。 +要使用RPM注册表,您需要使用像 `yum`, `dnf` 或 `zypper` 这样的软件包管理器来消费软件包。 以下示例使用 `dnf`。 diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index d00a2d8386..5f671676b5 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3328,6 +3328,8 @@ pub.install = To install the package using Dart, run the following command: pypi.requires = Requires Python pypi.install = To install the package using pip, run the following command: 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: rubygems.install = To install the package using gem, run the following command: rubygems.install2 = or add it to the Gemfile: diff --git a/templates/package/content/rpm.tmpl b/templates/package/content/rpm.tmpl index 42965c3271..4da2abff39 100644 --- a/templates/package/content/rpm.tmpl +++ b/templates/package/content/rpm.tmpl @@ -4,12 +4,20 @@ <div class="ui form"> <div class="field"> <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 class="field"> <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.rpm.install"}}</label> <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 class="field"> |