3

我正在打包一个非常简单的 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
4

2 回答 2

3

显然,当发生不明错误时,会弹出“Package has no %description”。我通过更好地格式化 .spec 解决了这个问题: -我已经给出了 source0 的路径 -我已经提供了一个 BuildRequired 包(任何东西都可以,我把 gcc 放在那里) -我已经修复了缩进以仅使用制表符

于 2013-11-08T12:35:37.190 回答
3

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

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

均衡:

BuildRoot:      %(mktemp -ud %{tmp}/%{name}-%{version}-%{release})
于 2014-03-07T00:41:06.240 回答