RPM 规范通过添加前缀可重新定位,但在安装时我看不到已安装的文件

2024-02-18

Summary: A small lighttpd
Name: lighttpd
Version: 1.4.28
Release: 1000

License: LGPL
Group: Applications/Webserver
URL: http://www.lighttpd.com/
Source: http://www.lighttpd.com/lighttpd-%{version}.tar.gz
BuildRoot: %{name}-%{version}
Prefix: /opt/src/Opensource/lighttpd-1.4.28/install
#Do not terminate if there are files in the buildroot that are not packed into the rpm.
%define _unpackaged_files_terminate_build       0
#Do not terminate if there are any documents missing in the buildroot dir and not      packaged
%define _missing_doc_files_terminate_build      0
%description
A small foot print webserver
%files
%defattr(-, root, root, 0755)
#%doc README
/sbin/lighttpd
/lib/mod_auth.so
/lib/mod_cgi.so
/lib/mod_cml.so
/lib/mod_compress.so


Given this i build my rpm using the following command
rpmbuild -bb --buildroot /opt/src/Opensource/lighttpd-1.4.28/install  lightppd.spec
rpm -qpi  on the generated rpm gives me the following output
Name        : lighttpd               Relocations:/opt/src/Opensource/lighttpd-1.4.28/install
Version     : 1.4.28                            Vendor:  Repository
Release     : 1000                          Build Date: Tue 19 Jul 2011 05:17:44 PM PDT
Install Date: (not installed)               Build Host: 
Group       : Applications/Webserver        Source RPM: lighttpd-1.4.28-1000.src.rpm
Size        : 259873                           License: LGPL
Signature   : (none)

while installing i issue the command

rpm -ivh --prefix /opt/components/  --dbpath /opt/rpm/database

I get the rpm installed 

but i dont see any installtion directory or files installed in the location /opt/components
  

查看http://www.rpm.org/max-rpm/s1-rpm-reloc-wrinkles.html http://www.rpm.org/max-rpm/s1-rpm-reloc-wrinkles.html,特别是第一个项目符号“%files 部分中的文件应以前缀标记行开头”。

尝试在 %files 部分中的文件名前添加“/opt/src/Opensource/lighttpd-1.4.28/install”前缀,重建 rpm,然后再次尝试安装。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

RPM 规范通过添加前缀可重新定位,但在安装时我看不到已安装的文件 的相关文章

  • 如何在特定接口上打开套接字并接收 IPv4 和 IPv6 流量

    使用 IPv4 我可以将 绑定到特定地址来选择将用于接收数据包的接口 在某些情况下 也用于发送数据包 但这不是重点 在双栈 IPv6 IPV4 机器上 我遇到这个问题 我可以创建一个 6 套接字并使用它接收 4 个流量 但如果我想绑定到特定

随机推荐