skywalker_cjy
(skywalker_cjy)
注册会员

一般会员
UID 18635
精华
1
积分 56
帖子 36
金钱 46 喜悦币
威望 10
人脉 0
阅读权限 20
注册 2003-3-1
状态 离线
|
[广告]: q
m
谁知道如何制作rpm软件包?
很急的问题:
我正在学习制作rpm软件包包装我的软件
按照制作rpm软件包的顺序
我先将代码放到/usr/src/redhat/SOURCES/
然后编写spec文件,放到/usr/src/redhat/SPECS/
然后rpm -ba helloworld-1.0-1.spec
在生成shell命令的时候出错
我的spec文件如下:
****************************************
Summary: Simple Example for RPM Building DEMO.
Name: helloworld
Version: 1.0
Release: 1
Copyright: Open Source
Group: Extensions/Chinese
Source: helloworld-1.0-1.tgz
Packager: Penelope Marr
%description
This package is used as
a demo for RPM building only.
%changelog
* Thu Jul 16 1998 Penelope Marr
- build for the first time.
%prep
%setup -c
%build make helloworld
%install install -m 755 helloworld /usr/local/bin/helloworld
%files
%doc README
/usr/local/bin/helloworld
**********************************************
生成的tmp文件如下:
#!/bin/sh
RPM_SOURCE_DIR="/usr/src/redhat/SOURCES"
RPM_BUILD_DIR="/usr/src/redhat/BUILD"
RPM_OPT_FLAGS="-O2 -g -pipe -march=i386 -mcpu=i686"
RPM_ARCH="i386"
RPM_OS="linux"
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
RPM_DOC_DIR="/usr/share/doc"
export RPM_DOC_DIR
RPM_PACKAGE_NAME="helloworld"
RPM_PACKAGE_VERSION="1.0"
RPM_PACKAGE_RELEASE="1"
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
set -x
umask 022
cd /usr/src/redhat/BUILD
LANG=C
export LANG
cd /usr/src/redhat/BUILD
rm -rf helloworld-1.0
/bin/mkdir -p helloworld-1.0
cd helloworld-1.0
/usr/bin/gzip -dc /usr/src/redhat/SOURCES/helloworld-1.0-1.tgz | tar -xvvf -
STATUS=$?
if [ $STATUS -ne 0 ]; then
exit $STATUS
fi
[ `/usr/bin/id -u` = '0' ] && /bin/chown -Rhf root .
[ `/usr/bin/id -u` = '0' ] && /bin/chgrp -Rhf root .
/bin/chmod -Rf a+rX,g-w,o-w .
exit 0
************************************************
提示信息是第23行,就是export LANG的下一行,提示command no foundxxx:line 23
...
我发现生成的shell中的23行是一个奇怪的字符,编码为0x20
我怀疑是否是因为我的spec文件是在windows下编写,然后拷贝到linux下的问题.
很急的问题,大家快来帮忙!
|
|