QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4408|回复: 7

请教我在rpmbuild的时候出现问题如何解决?

[复制链接]
发表于 2005-1-5 23:02:27 | 显示全部楼层 |阅读模式
Processing files: socks5-v1.0r-11
error: Two files on one line: /usr
error: Two files on one line: /usr/bin
error: Two files on one line: /usr/lib
error: Two files on one line: /usr/include
error: Two files on one line: /usr/share
error: Two files on one line: /usr/share/man


RPM build errors:
    Two files on one line: /usr
    Two files on one line: /usr/bin
    Two files on one line: /usr/lib
    Two files on one line: /usr/include
    Two files on one line: /usr/share
    Two files on one line: /usr/share/man


下面是我的.spec

Summary: socks5 is a tool about proxy.
Name: socks5
Version: v1.0r
Release: 11
Copyright: GPL
Group: Applications/Internet
#BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Source: %{name}-%{version}-%{release}.tar.gz
URL: http://www.ourlinux.net/
Vendor: ourlinux.net
Packager: Jianhong Xu ([email protected])

%description
socks5 is a tool about proxy.

%prep
%setup -q -n %{name}-%{version}

%build
./configure --prefix=%{_prefix} --with-threads
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/%{name}-%{version}


%files
%defattr(-,root,root)
%_prefix /usr/local
%{_bindir} %{_exec_prefix}/bin
%{_libdir} %{_exec_prefix}/lib
%_includedir %{_prefix}/include
%_datadir %{_prefix}/share
%_mandir %{_prefix}/man

%changelog
* Wed Jan 5 2005 bixuan <[email protected]>
- fix the spec file and rebuild


先谢过了!
发表于 2005-1-6 08:52:02 | 显示全部楼层
%files
%defattr(-,root,root)
%_prefix /usr/local
%{_bindir} %{_exec_prefix}/bin
%{_libdir} %{_exec_prefix}/lib
%_includedir %{_prefix}/include
%_datadir %{_prefix}/share
%_mandir %{_prefix}/man
有问题,因为%{_bindir} 可能与%{_exec_prefix}/bin 是指两个文件夹而不能放在一行上。你种写法叫画X不成反类Y
可以写成下面:
%files
%defattr(-,root,root)
  %{_bindir}
%{_libdir}  
%{_includedir}  
%{_datadir}
%{_mandir}
回复

使用道具 举报

 楼主| 发表于 2005-1-6 12:51:54 | 显示全部楼层
谢谢指正!
我刚从新打包,在打包的过�
回复

使用道具 举报

发表于 2005-1-6 18:21:14 | 显示全部楼层
没有关系的,warning 一般没有问题。
回复

使用道具 举报

发表于 2005-1-6 20:53:27 | 显示全部楼层
请教一下,
%{_mandir}
是/usr/man还是/usr/share/man
我看macro里是/usr/man
但是我在spec里加入它,提示file not find /usr/share/man
回复

使用道具 举报

 楼主| 发表于 2005-1-6 21:04:50 | 显示全部楼层
这个包偶打包不成功! :-(
回复

使用道具 举报

发表于 2005-1-6 22:24:42 | 显示全部楼层
可以用下面这个简单写法:
%files
%defattr(-,root,root)
/usr
%exclude /usr/*/debug*
回复

使用道具 举报

发表于 2005-1-7 13:34:37 | 显示全部楼层
[quote:a861b53154="tingxx"]请教一下,
%{_mandir}
是/usr/man还是/usr/share/man
我看macro里是/usr/man
但是我在spec里加入它,提示file not find /usr/share/man
[/quote]

仅当你使用标准配置宏 %configure 的时候,文件才会被指定到标准位置上,否则 %file 字段使用标准宏不一定找得到文件,因为它们可能默认安装到了别处。我在《rpm 建包原理》里谈到了如何判断文件到底安装到了什么位置上。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-25 17:04 , Processed in 0.079392 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表