Zom*_*ies 26 rpm arch-linux software-installation
我想在 Arch Linux 上从 Oracle 安装 sqldeveloper。唯一的 Linux 下载选项是 RPM。我对使用 arch 存储库安装 sqldeveloper 不感兴趣。我只能使用供应商提供的东西。
Hal*_*ost 25
Jasonwryan(像往常一样)对他最初的评论是正确的。
Arch 的包应该尽可能接近“vanilla”。现在,虽然您可以使用rpmextract
or alien
,但确实没有充分的理由这样做。您应该做的是创建一个PKGBUILD
使用 RPM 作为源文件的文件,然后将所需的所有内容安装在package()
函数中应有的位置。如果您不确定如何执行此操作,请查看ArchLinux 用户存储库中的一些软件包;有很多做类似的事情。
现在,由于bsdtar
(由 用于源文件的默认提取器makepkg
)支持毫无问题地提取 RPM,因此没有理由使用rpmextract
- 它添加了 makedependency 而不添加任何实际功能。
来自维基的一些相关阅读:
Kev*_*all 12
我真的对缺乏例子感到惊讶!Arch 在 中捆绑了一些 make/configure 示例/usr/share/pacman
,但仅此而已。HalosGhost 的答案中的模板链接现在重定向到仅涵盖 PKGBUILD 内的变量的页面。所以我发现自己有动力在这里帮助别人:
PKGBUILD
:
# Metadata; be sure to set this to reasonable values to not confuse your
# package manager or cause name conflicts with the repositories.
pkgname="rpm-package-name"
pkgver="0.0.1"
pkgrel="1"
pkgdesc="Short description of rpm package"
arch=("x86_64")
# The RPM file you want to install; place in the same directory as this file.
source=("filename.rpm")
# Assuming you're not going to push this to AUR or whatever, you can just skip
# the integrity check here. Otherwise, replace SKIP with the output of
# "sha -a 256 filename.rpm".
sha256sums=("SKIP")
package() {
# Copy all directories from $srcdir into $pkgdir. $srcdir will already have
# been populated with the contents of package.rpm, but it also contains a
# symlink to it, which we don't want to copy; anything in $pkgdir after this
# command will be installed to your root directory.
find $srcdir/ -mindepth 1 -maxdepth 1 -type d | xargs cp -r -t "$pkgdir"
}
Run Code Online (Sandbox Code Playgroud)
请务必根据包的需要编辑模板中的变量。您至少需要更换rpm-package-name
并filename.rpm
使其正常工作。
创建此PKGBUILD
文件并在其旁边放置所需的 rpm 后,makepkg
从同一目录运行。如果一切顺利,您应该能够通过检查生成的文件来验证生成的包文件是否包含您期望的内容tar tf <package_name>.pkg.*
。做一个sudo pacman -U <package_name>.pkg.*
瞧!享受现在安装的 rpm 软件。
当然,如果您遇到任何错误,我相信 Arch 论坛上的人们会愿意向您指出一些手册供您阅读......