展望美好 發表於 2023-4-26 19:36:00

fedora软件仓库

<h2 id="生命周期">生命周期</h2>
<p>参考<br>
https://docs.fedoraproject.org/zh_CN/releases/lifecycle/<br>
fedora有个每日构建的分支,称为Rawhide,这是个永不停歇的分支,每日都会在更新。<br>
要发行的某个稳定版就是从Rawhide分离出来的,分离出来之后称之为Branched分支,用于预发布。<br>
Branched测试没有问题之后就会发布稳定版本,比如fedora38.</p>
<p>稳定版本默认的软件仓库有4个:</p>
<pre><code>fedora.repo
fedora-updates.repo
fedora-modular.repo
fedora-updates-modular.repo
</code></pre>
<p>第一个是安装新软件,第二个更新已有软件,带modular的是模块化的rpm包。</p>
<p>fedora还有个带testing的仓库,给发布稳定版之前的Branched分支用的,进入Branched分支后的软件更新在这个分支。稳定版默认是不会开启的</p>
<pre><code>fedora-updates-testing.repo
fedora-updates-testing-modular.repo
</code></pre>
<p>可以使用下面的命令启用:</p>
<pre><code>dnf config-manager --set-enabled updates-testing
dnf config-manager --set-enabled updates-testing-modular
</code></pre>
<p>或者禁用</p>
<pre><code>dnf config-manager --set-disabled updates-testing
dnf config-manager --set-disabled updates-testing-modular
</code></pre>
<h2 id="fedora的仓库列表">fedora的仓库列表</h2>
<p>https://admin.fedoraproject.org/mirrormanager/</p>
<p>默认仓库比较稳定,但是软件相对较少,而且不是最新的(不过肯定会比centos新)。为此fedora支持添加第三方软件源, https://rpmfusion.org/FedoraThirdPartyRepos<br>
不建议混合使用大量第三方存储库,因为它们可能会相互冲突,从而导致不稳定和难以调试的问题。</p>
<h2 id="rpm-fusion">RPM Fusion</h2>
<p>RPM Fusion项目是一个社区维护的软件存储库,提供了Fedora没有分发的额外软件包,比如vlc等很多多媒体相关的软件<br>
官网 https://rpmfusion.org/<br>
启用及其说明 https://docs.fedoraproject.org/en-US/quick-docs/setup_rpmfusion/</p>
<p>同时启用free和non-free仓库, 参考 https://rpmfusion.org/Configuration</p>
<pre><code>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
</code></pre>
<p>上面是用bash执行,如果用zsh可能会报错,因为转义字符的原因,如果是zsh可以用下边的命令,去掉左括号前边的转义斜杠</p>
<pre><code>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
</code></pre>
<p>启用之后,<code>/etc/yum.repo.d</code>会新增如下文件</p>
<pre><code>rpmfusion-free.repo
rpmfusion-free-updates.repo
rpmfusion-free-updates-testing.repo
rpmfusion-nonfree.repo
rpmfusion-nonfree-updates.repo
rpmfusion-nonfree-updates-testing.repo
</code></pre>
<p>rpm fusion也是可以更换国内源的,比如清华 https://mirrors.tuna.tsinghua.edu.cn/help/rpmfusion/</p>
<h2 id="epel">EPEL</h2>
<p>Extra Packages for Enterprise Linux<br>
EPEL并不是给fedora用的,而是fedora社区打造为centos提供比较新的软件的<br>
cenots想要开启rpm fusion需要先开启EPEL</p>
<h2 id="flatpaks">Flatpaks</h2>
<p>flatpak和ubuntu上的snap一样,在一个包中含有软件的二进制文件和其所需的所有依赖和库,所以可以在无视软件版本、在任意 Linux 发行版上安装软件<br>
在fedora上我们可以直接使用,默认已经安装了,如果没有,可以执行<code>sudo dnf install flatpak</code>安装,用法可以通过help看到:</p>
<pre><code># kun @ Fedora in /etc/yum.repos.d
$ flatpak --help
用法:
flatpak [选项…] 命令

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

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

...


# kun @ Fedora in /etc/yum.repos.d 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

</code></pre>
<p>flatpak官方文档 https://docs.flatpak.org/en/latest/using-flatpak.html</p>
<h3 id="flathub">Flathub</h3>
<p>flatpak是与dnf同类型的软件,安装以后需要为flatpak配置软件仓库,常用的是flathub,配置好以后就可以用flatpak命令安装软件了<br>
官网 https://flathub.org/</p>
<p>参考flatpak官方文档,添加flathub仓库,这里同样建议用bash,用zsh可能会有这样那样的问题,字符解析什么的<br>
<img src="https://img2023.cnblogs.com/blog/871381/202304/871381-20230426192327809-56069081.png" alt="" loading="lazy"></p>
<pre><code>flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
</code></pre>
<p>flathub国内源 https://mirrors.sjtug.sjtu.edu.cn/docs/flathub</p>
<p>安装qq音乐示例</p>
<pre><code># kun @ Fedora in /etc/yum.repos.d
$ flatpak search qqmusic
名称         描述                                 应用程序 ID          版本      分支         远程仓库
QQmusic      Online music streaming service       com.qq.QQmusic       1.1.5       stable       flathub

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

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

    org.freedesktop.Notifications
    org.kde.*, org.mpris.MediaPlayer2.chromium.*


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

正在安装 2/4…

</code></pre>
<p>看起来不是那么完美,我用的是fedora38,估计是字体不支持<br>
<img src="https://img2023.cnblogs.com/blog/871381/202304/871381-20230426193524569-821277159.png" alt="" loading="lazy"><br>
安装了个微软雅黑,设置为系统字体以后正常了<br>
<img src="https://img2023.cnblogs.com/blog/871381/202304/871381-20230427093932369-1736726164.png" alt="" loading="lazy"></p>
<p>腾讯会议等软件也是有的</p>
<pre><code>$ 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.402stable flathub
QQmusicOnline 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
</code></pre><br><br>
来源:https://www.cnblogs.com/feipeng8848/p/17357074.html
頁: [1]
查看完整版本: fedora软件仓库