按照网上的所有随机指南,甚至在这里: What is the minimum I have to do to create an RPM file?
Centos 7似乎没什么用(惊喜!)
看起来如果你在你的spec文件中留下%prep,rpmbuild会尽力尝试./configure并制作一些东西。我不确定的是什么。 这是一个超级基本的.spec文件我试图让rpm只是复制到一个文件中。
$more newpackage.spec
Name: hello
Version: 1.2
Release: 1%{?dist}
Summary: Testing testing 1 2 3
License: Beer
URL: No
#so apparently now you have to have version numbers everywhere, even the tar files, uhg
Source0: hello-1.2.tar.gz
#and the breaking begins :-( why everything broke with you centos 7?
# BuildRoot: %{_tmppath}/%{name}-%{version}-root
# BuildRequires:
# Requires:
%description
nothing to see here folks
#well here is some of the confusion
#%prep
%setup -q
# ./configure missing? um yeahhhh
# %build
# %configure
# make %{?_smp_mflags}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
%files
#/usr/bin/hello.sh
%{_bindir}/hello.sh
# %doc
# %changelog
tar文件中的是/usr/bin/hello.sh 这是一个只运行echo" hello world"
的shell脚本如果我评论%prep rpmbuild抱怨找不到./configure。
rpmbuild -v -bb newpackage.spec
答案 0 :(得分:0)
看起来评论%build并不会实际阻止rpmbuild尝试构建源代码...... 所以,如果我删除%build和%configure,那就行了。事情有效