我在 .txt 文件中有所有 fedora 软件包的列表,并且想要检索所有这些软件包的项目 URL 和项目下载 URL。
该命令dnf info <package>
确实会生成一个下载 URL,可用于下载该包的最新版本。示例如下:
Last metadata expiration check: 1:33:08 ago on Tue Aug 9 12:58:18 2022.
Installed Packages
Name : alternatives
Version : 1.19
Release : 2.fc36
Architecture : x86_64
Size : 62 k
Source : chkconfig-1.19-2.fc36.src.rpm
Repository : @System
From repo : anaconda
Summary : A tool to maintain symbolic links determining default commands
URL : https://github.com/fedora-sysv/chkconfig
License : GPLv2
Description : alternatives creates, removes, maintains and displays information about the
: symbolic links comprising the alternatives system. It is possible for several
: programs fulfilling the same or similar functions to be installed on a single
: system at the same time.
但是,我想获取实际正在进行的项目本身的 URL。有什么简单的方法可以做到吗?帮助深表感谢!
另一个例子:
Name : audit-libs
Version : 3.0.8
Release : 1.fc36
Architecture : x86_64
Size : 299 k
Source : audit-3.0.8-1.fc36.src.rpm
Repository : @System
From repo : anaconda
Summary : Dynamic library for libaudit
URL : http://people.redhat.com/sgrubb/audit/
License : LGPLv2+
Description : The audit-libs package contains the dynamic libraries needed for
: applications to use the audit framework.
答案1
URL
字段中给出的 URL是“正在进行的项目”的 URL:https://github.com/fedora-sysv/chkconfig是chkconfig
托管位置,并且http://people.redhat.com/sgrubb/audit/是审计的举办地;尽管 URL 表明它们分别是 Fedora 特定的和 Red Hat 特定的,但这些确实是项目的页面。您可以将 URL 与其他项目中的引用进行比较;例如,Debian 审计包还指出http://people.redhat.com/sgrubb/audit/(查找“主页”链接)。
其他软件包可能会使这一点更加明显;考虑
$ dnf info libevdev
Available Packages
Name : libevdev
Version : 1.10.0
Release : 1.el8
Architecture : i686
Size : 43 k
Source : libevdev-1.10.0-1.el8.src.rpm
Repository : rhel-8-for-x86_64-appstream-rpms
Summary : Kernel Evdev Device Wrapper Library
URL : http://www.freedesktop.org/wiki/Software/libevdev
License : MIT
Description : libevdev is a library to wrap kernel evdev devices and provide a proper API
: to interact with those devices.
这指向libevdev
FDO页面, 或者
$ dnf info gcc
Installed Packages
Name : gcc
Version : 8.5.0
Release : 10.1.el8_6
Architecture : x86_64
Size : 59 M
Source : gcc-8.5.0-10.1.el8_6.src.rpm
Repository : @System
From repo : rhel-8-for-x86_64-appstream-rpms
Summary : Various compilers (C, C++, Objective-C, ...)
URL : http://gcc.gnu.org
License : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
Description : The gcc package contains the GNU Compiler Collection version 8.
: You'll need this package in order to compile C code.
这指向海湾合作委员会项目页面。