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

编程入门 行业动态 更新时间:2024-10-26 09:23:09
本文介绍了通过添加前缀使 RPM 规范可重定位,但在安装时我没有看到安装的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

总结:一个小小的lighttpd名称: lighttpd版本:1.4.28发布:1000许可证:LGPL组:应用程序/网络服务器网址:www.lighttpd/来源:www.lighttpd/lighttpd-%{version}.tar.gzBuildRoot: %{name}-%{version}前缀:/opt/src/Opensource/lighttpd-1.4.28/install#如果buildroot中有文件没有打包进rpm就不要终止.%define _unpackaged_files_terminate_build 0#如果 buildroot 目录中缺少任何文件且未打包,则不终止%define _missing_doc_files_terminate_build 0%描述一个小尺寸的网络服务器%个文件%defattr(-, 根, 根, 0755)#%doc 自述文件/sbin/lighttd/lib/mod_auth.so/lib/mod_cgi.so/lib/mod_cml.so/lib/mod_compress.so

鉴于此,我使用以下命令构建我的 rpmrpmbuild -bb --buildroot/opt/src/Opensource/lighttpd-1.4.28/install lightppd.specrpm -qpi 在生成的 rpm 上给我以下输出名称:lighttpd 重定位:/opt/src/Opensource/lighttpd-1.4.28/install版本:1.4.28 供应商:存储库发布:1000 构建日期:2011 年 7 月 19 日星期二 05:17:44 PM PDT安装日期:(未安装)构建主机:组:应用程序/网络服务器源 RPM:lighttpd-1.4.28-1000.src.rpm尺寸:259873 许可证:LGPL签名:(无)安装时我发出命令rpm -ivh --prefix/opt/components/--dbpath/opt/rpm/database我安装了 rpm但我没有看到/opt/components 位置中安装了任何安装目录或文件

解决方案

查看 www.rpm/max-rpm/s1-rpm-reloc-wrinkles.html,特别是第一个说%files 部分中的文件应该以前缀标记行".

尝试在 %files 部分中使用/opt/src/Opensource/lighttpd-1.4.28/install"作为文件名的前缀,重建 rpm,然后再次尝试安装.

Summary: A small lighttpd Name: lighttpd Version: 1.4.28 Release: 1000 License: LGPL Group: Applications/Webserver URL: www.lighttpd/ Source: www.lighttpd/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

解决方案

Check out www.rpm/max-rpm/s1-rpm-reloc-wrinkles.html, in particular the first bullet that says "files in the %files section should start with the prefix tag line".

Try prefixing your file names in your %files section with '/opt/src/Opensource/lighttpd-1.4.28/install', rebuild the rpm and then try the installation again.

更多推荐

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

本文发布于:2023-10-04 15:53:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1467187.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:但在   前缀   文件   RPM

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!