fedora软件仓库

生命周期

参考
https://docs.fedoraproject.org/zh_CN/releases/lifecycle/
fedora有个每日构建的分支,称为Rawhide,这是个永不停歇的分支,每日都会在更新。
要发行的某个稳定版就是从Rawhide分离出来的,分离出来之后称之为Branched分支,用于预发布。
Branched测试没有问题之后就会发布稳定版本,比如fedora38.

稳定版本默认的软件仓库有4个:

fedora.repo
fedora-updates.repo
fedora-modular.repo
fedora-updates-modular.repo

第一个是安装新软件,第二个更新已有软件,带modular的是模块化的rpm包。

fedora还有个带testing的仓库,给发布稳定版之前的Branched分支用的,进入Branched分支后的软件更新在这个分支。稳定版默认是不会开启的

fedora-updates-testing.repo
fedora-updates-testing-modular.repo

可以使用下面的命令启用:

dnf config-manager --set-enabled updates-testing
dnf config-manager --set-enabled updates-testing-modular

或者禁用

dnf config-manager --set-disabled updates-testing
dnf config-manager --set-disabled updates-testing-modular

fedora的仓库列表

https://admin.fedoraproject.org/mirrormanager/

默认仓库比较稳定,但是软件相对较少,而且不是最新的(不过肯定会比centos新)。为此fedora支持添加第三方软件源, https://rpmfusion.org/FedoraThirdPartyRepos
不建议混合使用大量第三方存储库,因为它们可能会相互冲突,从而导致不稳定和难以调试的问题。

RPM Fusion

RPM Fusion项目是一个社区维护的软件存储库,提供了Fedora没有分发的额外软件包,比如vlc等很多多媒体相关的软件
官网 https://rpmfusion.org/
启用及其说明 https://docs.fedoraproject.org/en-US/quick-docs/setup_rpmfusion/

同时启用free和non-free仓库, 参考 https://rpmfusion.org/Configuration

sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

上面是用bash执行,如果用zsh可能会报错,因为转义字符的原因,如果是zsh可以用下边的命令,去掉左括号前边的转义斜杠

sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

启用之后,/etc/yum.repo.d会新增如下文件

rpmfusion-free.repo
rpmfusion-free-updates.repo
rpmfusion-free-updates-testing.repo
rpmfusion-nonfree.repo
rpmfusion-nonfree-updates.repo
rpmfusion-nonfree-updates-testing.repo

rpm fusion也是可以更换国内源的,比如清华 https://mirrors.tuna.tsinghua.edu.cn/help/rpmfusion/

EPEL

Extra Packages for Enterprise Linux
EPEL并不是给fedora用的,而是fedora社区打造为centos提供比较新的软件的
cenots想要开启rpm fusion需要先开启EPEL

Flatpaks

flatpak和ubuntu上的snap一样,在一个包中含有软件的二进制文件和其所需的所有依赖和库,所以可以在无视软件版本、在任意 Linux 发行版上安装软件
在fedora上我们可以直接使用,默认已经安装了,如果没有,可以执行sudo dnf install flatpak安装,用法可以通过help看到:

# kun @ Fedora in /etc/yum.repos.d [19:14:32] 
$ flatpak --help
用法:
  flatpak [选项…] 命令

内置命令:
 管理已安装的应用程序和运行时
  install                安装应用程序或运行时
  update                 更新已安装的应用程序或运行时
  uninstall              卸载已安装的应用程序或运行时
  mask                   屏蔽更新和自动安装
  pin                    置顶运行时以避免自动移除
  list                   列出已安装的应用和/或运行时
  info                   显示已安装应用或运行时的信息
  history                显示历史
  config                 配置 flatpak
  repair                 修复 flatpak 安装
  create-usb             将应用程序或运行时放到可移动媒体上

查找应用程序和运行时
  search                 搜索远程仓库的应用/运行时

...


# kun @ Fedora in /etc/yum.repos.d [19:16:42] C:127
$ flatpak list
名称                          应用程序 ID                                  版本               分支                来源            安装
Wemeet                        com.tencent.wemeet                           3.14.0.402         stable              flathub         system
Fedora Platform               org.fedoraproject.Platform                   38                 f38                 fedora          system
Freedesktop Platform          org.freedesktop.Platform                     22.08.11           22.08               flathub         system
Mesa                          org.freedesktop.Platform.GL.default          21.3.9             21.08               flathub         system
Mesa                          org.freedesktop.Platform.GL.default          23.0.2             22.08               flathub         system
Mesa (Extra)                  org.freedesktop.Platform.GL.default          23.0.2             22.08-extra         flathub         system
freedesktop 平台 翻译         org.freedesktop.Platform.Locale                                 21.08               flathub         system
Intel                         org.freedesktop.Platform.VAAPI.Intel                            22.08               flathub         system
openh264                      org.freedesktop.Platform.openh264            2.1.0              2.2.0               flathub         system
扩展                          org.gnome.Extensions                         44.0               stable              fedora          system

flatpak官方文档 https://docs.flatpak.org/en/latest/using-flatpak.html

Flathub

flatpak是与dnf同类型的软件,安装以后需要为flatpak配置软件仓库,常用的是flathub,配置好以后就可以用flatpak命令安装软件了
官网 https://flathub.org/

参考flatpak官方文档,添加flathub仓库,这里同样建议用bash,用zsh可能会有这样那样的问题,字符解析什么的

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

flathub国内源 https://mirrors.sjtug.sjtu.edu.cn/docs/flathub

安装qq音乐示例

# kun @ Fedora in /etc/yum.repos.d [19:25:47] 
$ flatpak search qqmusic
名称           描述                                 应用程序 ID          版本        分支         远程仓库
QQmusic        Online music streaming service       com.qq.QQmusic       1.1.5       stable       flathub

# kun @ Fedora in /etc/yum.repos.d [19:26:01] 
$ flatpak install qqmusic
寻找匹配项…
在远程仓库“flathub”(system)中找到引用“app/com.qq.QQmusic/x86_64/stable”。
使用该引用吗? [Y/n]: Y
在远程仓库 flathub 中找到 com.qq.QQmusic/x86_64/stable(runtime/org.freedesktop.Platform/x86_64/21.08)需要的运行时
您想要安装它吗? [Y/n]: Y

com.qq.QQmusic permissions:
    ipc      network      pulseaudio      wayland      x11      dri      dbus access [1]     bus ownership [2]

    [1] org.freedesktop.Notifications
    [2] org.kde.*, org.mpris.MediaPlayer2.chromium.*


        ID                                              分支              操作            远程              下载
 1. [✓] org.freedesktop.Platform.VAAPI.Intel            21.08             i               flathub              12.0 MB / 11.9 MB
 2. [|] org.freedesktop.Platform.openh264               2.0               i               flathub             < 1.5 MB
 3. [ ] org.freedesktop.Platform                        21.08             i               flathub           < 201.6 MB
 4. [ ] com.qq.QQmusic                                  stable            i               flathub            < 79.5 MB

正在安装 2/4…

看起来不是那么完美,我用的是fedora38,估计是字体不支持

安装了个微软雅黑,设置为系统字体以后正常了

腾讯会议等软件也是有的

$ flatpak search tencent
名称     描述                                                                                                             应用程序 ID        版本        分支   远程仓库
Wemeet   A cloud-based HD conferencing product leveraging Tencent's 20+ years of experience in audiovisual communications com.tencent.wemeet 3.14.0.402  stable flathub
QQmusic  Online music streaming service                                                                                   com.qq.QQmusic     1.1.5       stable flathub
Linux QQ Online instant messaging service                                                                                 com.qq.QQ          3.1.1-11223 stable flathub
posted @ 2023-04-26 19:36  feipeng8848  阅读(273)  评论(0编辑  收藏  举报