当前时区 GMT+8, 现在时间是 2008-9-8 18:02 游客: 注册 登录 仅登录论坛 | 搜索 帮助


标题: 帮忙看一下偶的spec写的哪不对
alpher
公社版主



UID 165067
精华 6
积分 3627
帖子 1450
阅读权限 225
注册 2004-11-4
来自 China
状态 离线
发表于 2005-3-30 00:15  资料  主页 短消息  加为好友 
帮忙看一下偶的spec写的哪不对

Name:   vsftpd
Summary: A Very Secure FTP Server Software.
Summary(zh_CN): 一个非常安全的FTP服务器端软件.
Version: 2.0.3
Release: 1mgc
Group:  Applications/System
License: GPL
URL:  http://vsftpd.beasts.org/
Source: ftp://vsftpd.beasts.org/users/cevans/vsftpd-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
#Vendor: MGC Group
#Distribution: Magic Linux
Prefix:  %{_prefix}
Prefix:  %{_sysconfdir}
#Requires:
#BuildRequires:
Packager:        Alpher<alpher>
%description
vsftpd is an FTP server, or daemon. The "vs" stands for Very Secure. Obviously
this is not a guarantee, but a reflection that I have written the entire
codebase with security in mind, and carefully designed the program to be
resilient to attack.

Recent evidence shows that vsftpd is also extremely fast and scalable. vsftpd
has achieved ~4000 concurrent users on a single machine, in a production
environment.

vsftpd is now a proven stable solution. Of particular note, RedHat used vsftpd
to enable ftp.redhat.com to support 15,000 concurrent users across their
server pool. This extreme load was generated by the release of RedHat 7.2 to
the world.
vsftpd now powers some of the largest and most prestigious sites on the
internet.

%description -l zh_CN.GB2312
vsftpd是一个FTP服务器端,“vs”代表非常安全。

%prep
%setup -n %{name}

%configure
%build
make

%install
rm -rf $RPM_BUILD_ROOT

%makeinstall

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

%post
#添加ftp配置需要的用户和目录
useradd nobody
mkdir /usr/share/empty
mkdir /var/ftp
useradd -d /var/ftp ftp
chown root /var/ftp
chmod og-w /var/ftp
%postun
rm /etc/vsftpd.conf
rm -rf /var/ftp
%files
%defattr(-,root,root)
"/usr/local/sbin/vsftpd"
"/usr/local/man/man5/vsftpd.conf.5"
"/usr/local/man/man8/vsftpd.8"
"/etc/vsftpd.conf"
"/etc/vsftpd.chroot_list"
"/etc/rc.d/init.d/VsFTPd"





%changelog
* Thu Mar 29 2005 alpher <alpher@pku.org.cn>
- initialize the first spec file

顶部
alpher
公社版主



UID 165067
精华 6
积分 3627
帖子 1450
阅读权限 225
注册 2004-11-4
来自 China
状态 离线
发表于 2005-3-30 00:15  资料  主页 短消息  加为好友 
出错信息如下
++ find . -name config.guess -o -name config.sub
+ ./configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=i686-magic-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/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info
/var/tmp/rpm-tmp.26981: line 42: ./configure: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.26981 (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.26981 (%prep)





开发计划: llk_linux-2.2版 已经发布,欢迎使用 个人主页:http://zhaomingxian.googlepages.com
顶部
KDE
超级版主



UID 527
精华 27
积分 11717
帖子 4795
阅读权限 245
注册 2002-7-4
来自 China
状态 离线
发表于 2005-3-30 06:02  资料  短消息  加为好友  添加 KDE 为MSN好友 通过MSN和 KDE 交谈 QQ ICQ 状态
%setup -n %{name}
问题出在这,-n 后面指定的参数代表 tar 包展开后生成的目录名,一般是不需要的,除非 tar 包名称和展开后生成的目录名不符,或者你要处理多个tar 包。打包时报告找不到 ./configure 说明 -n 参数指定的目录不对,或者软件源代码目录里没有 configure 脚本 (比如你的代码是从 cvs 里 commit out 出来的)。

顶部
alpher
公社版主



UID 165067
精华 6
积分 3627
帖子 1450
阅读权限 225
注册 2004-11-4
来自 China
状态 离线
发表于 2005-3-30 09:36  资料  主页 短消息  加为好友 
makefile里面执行这样的操作:
if [ -x /usr/local/sbin ]; then \
        install -m 755 vsftpd /usr/local/sbin/vsftpd; \
        install -m 755 vsftpd.conf /etc/vsftpd.conf; \
        install -m 755 vsftpd.chroot_list /etc/vsftpd.chroot_list; \
        install -m 755 VsFTPd /etc/rc.d/init.d/VsFTPd; \
else \
        install -m 755 vsftpd /usr/sbin/vsftpd; fi
if [ -x /usr/local/man ]; then \
        install -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \
        install -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \
elif [ -x /usr/share/man ]; then \
        install -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \
        install -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \
else \
        install -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \
        install -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi
if [ -x /etc/xinetd.d ]; then \
        install -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi


为什么执行完了之后/var/tmp/vsftp-2.0.3-root目录下面什么都没有,就一个src/debug的目录
难道makefile的操作不是对虚拟目录进行的?





开发计划: llk_linux-2.2版 已经发布,欢迎使用 个人主页:http://zhaomingxian.googlepages.com
顶部
KDE
超级版主



UID 527
精华 27
积分 11717
帖子 4795
阅读权限 245
注册 2002-7-4
来自 China
状态 离线
发表于 2005-3-31 07:11  资料  短消息  加为好友  添加 KDE 为MSN好友 通过MSN和 KDE 交谈 QQ ICQ 状态
ftp://vsftpd.beasts.org/users/cevans/untar/vsftpd-2.0.3/INSTALL
你应该首先阅读 readme 和 INSTALL 文件。

这个软件没有使用 GNU autotool 创建,而是自己写的 Makefile,这就导致不能按照常规方法打包,非常麻烦。

服务器软件通常都需要大量预配置工作,spec 打包绝非一两天能解决,需要深入研究很多东西和反复实践,建议初学者不要尝试。

顶部
alpher
公社版主



UID 165067
精华 6
积分 3627
帖子 1450
阅读权限 225
注册 2004-11-4
来自 China
状态 离线
发表于 2005-3-31 09:36  资料  主页 短消息  加为好友 
不是吧,我现在就是在用vsftp,其实很简单,就是把几个文件拷贝进去而已
没有那么复杂亚





开发计划: llk_linux-2.2版 已经发布,欢迎使用 个人主页:http://zhaomingxian.googlepages.com
顶部
KDE
超级版主



UID 527
精华 27
积分 11717
帖子 4795
阅读权限 245
注册 2002-7-4
来自 China
状态 离线
发表于 2005-3-31 11:24  资料  短消息  加为好友  添加 KDE 为MSN好友 通过MSN和 KDE 交谈 QQ ICQ 状态
你看看 fedora 的 src.rpm 就知道有多复杂了。服务器可没那么简单,因为涉及权限和安全问题!

顶部
alpher
公社版主



UID 165067
精华 6
积分 3627
帖子 1450
阅读权限 225
注册 2004-11-4
来自 China
状态 离线
发表于 2005-3-31 15:07  资料  主页 短消息  加为好友 
55555555
那我换一个软件看看





开发计划: llk_linux-2.2版 已经发布,欢迎使用 个人主页:http://zhaomingxian.googlepages.com
顶部
 


Powered by Discuz! 5.5.0  © 2001-2007 Comsenz Inc.
清除 Cookies - 联系我们 - 中国Linux公社 - WAP