|
用 RPM 行话来讲,“python3” 是“主包”,因此该 spec 文件将称为 python3.spec。所有其他软件包均为“子软件包”。你可以下载 python3 的源 RPM,并查看其中的内容。(提示:补丁也是源代码的一部分):
$ dnf download --source python3python3-3.7.4-1.fc30.src.rpm-
$ rpm -qpl ./python3-3.7.4-1.fc30.src.rpm00001-rpath.patch00102-lib64.patch00111-no-static-lib.patch00155-avoid-ctypes-thunks.patch00170-gc-assertions.patch00178-dont-duplicate-flags-in-sysconfig.patch00189-use-rpm-wheels.patch00205-make-libpl-respect-lib64.patch00251-change-user-install-location.patch00274-fix-arch-names.patch00316-mark-bdist_wininst-unsupported.patchPython-3.7.4.tar.xzcheck-pyc-timestamps.pyidle3.appdata.xmlidle3.desktoppython3.spec
从源 RPM 构建 RPM
现在我们有了源 RPM,并且其中有什么内容,我们可以从中重建 RPM。但是,在执行此操作之前,我们应该设置系统以构建 RPM。首先,我们安装必需的工具:
$ sudo dnf install fedora-packager
这将安装 rpmbuild 工具。rpmbuild 需要一个默认布局,以便它知道源 RPM 中每个必需组件的位置。让我们看看它们是什么:
# spec 文件将出现在哪里?$ rpm -E %{_specdir}/home/asinha/rpmbuild/SPECS-
# 源代码将出现在哪里?$ rpm -E %{_sourcedir}/home/asinha/rpmbuild/SOURCES-
# 临时构建目录是哪里?$ rpm -E %{_builddir}/home/asinha/rpmbuild/BUILD-
# 构建根目录是哪里?$ rpm -E %{_buildrootdir}/home/asinha/rpmbuild/BUILDROOT-
# 源 RPM 将放在哪里?$ rpm -E %{_srcrpmdir}/home/asinha/rpmbuild/SRPMS-
# 构建的 RPM 将放在哪里?$ rpm -E %{_rpmdir}/home/asinha/rpmbuild/RPMS
(编辑:成都站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|