在为 Fedora 编写 .spec 文件时,我遇到了一个问题。我似乎根本做不到fedpkg mockbuild
。无论我使用什么源,HTTPS 或本地,我都会遇到此错误:
Failed to get repository name from Git url or pushurl
Failed to get ns from Git url or pushurl
Could not execute mockbuild: ('Could not download sources: %s', AttributeError("'NoneType' object has no attribute 'head'"))
这是怎么回事?我的 .spec 文件的相关部分:
Name: purple-telegram-tdlib
# The main maintainer has not merged #154 for TDLib 1.8.0
Version: 0.8.1-BenWiederhake
Release: 1%{?dist}
Summary: New libpurple plugin for Telegram
License: GPLv2
URL: https://github.com/ars3niy/tdlib-purple
Source0: tdlib-purple-BenWiederhake-master.zip
BuildRequires: gcc-c++
BuildRequires: git
BuildRequires: make
BuildRequires: cmake
BuildRequires: tdlib-devel == 1.8.0
BuildRequires: tdlib-static == 1.8.0
BuildRequires: libpurple-devel
BuildRequires: libwebp-devel
BuildRequires: libpng-devel
BuildRequires: gettext-devel
-
您正在使用版本中的字符。根据规范:不要将波浪号 (
~
) 与破折号 (-
) 混淆!破折号不是有效字符。在这种情况下,您应该^
改为使用,如下所示:它是在该更改之后构建的。