【发布时间】:2023-03-02 22:26:01
【问题描述】:
我正在尝试创建一个仅更新系统上文件的软件包,但在运行 rpmbuild 时我不断收到错误消息。该错误表示文件丢失。
我在 CentOS 5 和 6 上试过这个,结果相同。
我使用rpmdev-setuptree 设置文件系统,同时设置~/.rpmmacros 文件。然后我使用rpmdev-newspec 来初始化规范文件。
我以非 root 用户身份运行。
我在~/rpmbuild/SPECS/test.spec 中有规范文件,我的来源是:~/rpmbuild/SOURCES/test-1.tar.gz。提取此文件会创建一个名为 test-1 的目录,其中包含 2 个文件。当我尝试构建包时,我已经确认它确实被提取到~/rpmbuild/BUILD/test-1。
我跑:rpmbuild -ba ~/rpmbuild/SPECS/test.spec
然后我得到这个错误:
- ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/ usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir =/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info /home/ me/rpmbuild/tmp/rpm-tmp.58942: line 37: ./configure: No such file or directory error: Bad exit status from /home/me/rpmbuild/tmp/rpm-tmp.58942 (%build)
RPM 构建错误: /home/me/rpmbuild/tmp/rpm-tmp.58942 (%build) 的错误退出状态
这是我的规范文件:
Name: test
Version: 1
Release: 1%{?dist}
Summary: Test
Group: Test
License: GPL
URL: http://example.com
Source0: test-1.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#BuildRequires:
#Requires:
%description
This is a test to push files.
%prep
%setup -q
%build
#%configure
#make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
#make install DESTDIR=$RPM_BUILD_ROOT
install -m 0755 -d $RPM_BUILD_ROOT/opt/test
%clean
rm -rf $RPM_BUILD_ROOT
%files
%dir /opt/test
%defattr(-,root,root,-)
%doc
关于我可能做错了什么有什么想法吗?
【问题讨论】: