打包时,“包没有%描述:”

时间:2013-11-06 17:44:24

标签: rpmbuild rpm-spec

我正在打包一个非常简单的redmine插件rpm,供内部使用,而且我遇到了“Package has no%description:”错误。

.spec有描述,我在inet上找不到任何相关内容。这是我的.spec:

codeName:           redmine_knowledgebase
Version:        2.2.1
Release:        1%{?dist}
Summary:        Redmine plugin to add knowledgbase functionality
Group:          redmine-plugins
License:        MIT
URL:            https://github.com/alexbevi/redmine_knowledgebase
Source0:        redmine_knowledgebase.tar.gz
BuildRoot:      %(mktemp -ud %{tmp/%{name}-%{version}-%{release})
BuildRequires:
Requires:       redmine, ruby, rubygems

%description
Redmine plugin to add knowledgbase functionality
%prep
%setup -q -n redmine_knowledgebase

%build

%install
rm -rf %{buildroot}
install -m 0755 / /var/www/redmine/plugins/
bundle install
rake redmine:plugins:migrate NAME=redmine_knowledgebase

%clean
rm -rf %{buildroot}

%files
%defattr(-,apache,apache,-)
/var/www/redmine/plugins/*
%post
echo " "
echo "This will display after rpm installs the package!"
echo "If the plugin does not work, check the permissions ans ownership of the newly created ../redmine/plugins/redmine_knowledgebase"

rpmlint给了我以下错误:

rpmlint ../SPECS/redmine_knowledgebase.spec 
../SPECS/redmine_knowledgebase.spec:5: W: non-standard-group redmine-plugins
../SPECS/redmine_knowledgebase.spec: E: specfile-error error: Package has no %description: redmine_knowledgebase
../SPECS/redmine_knowledgebase.spec: E: specfile-error error: query of specfile ../SPECS/redmine_knowledgebase.spec failed, can't parse
0 packages and 1 specfiles checked; 2 errors, 1 warnings

2 个答案:

答案 0 :(得分:2)

当发生未识别的错误时,显然会弹出“包没有%描述”。 我通过更好地格式化.spec来解决这个问题: - 我已经给出了source0的路径 - 我提供了一个BuildRequired包(任何事都可以,我把gcc放在那里) - 我已经修复了缩进以仅使用标签

答案 1 :(得分:2)

也许是因为你的牙套没有平衡?

BuildRoot:      %(mktemp -ud %{tmp/%{name}-%{version}-%{release})

平衡:

BuildRoot:      %(mktemp -ud %{tmp}/%{name}-%{version}-%{release})