博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

Forward Everyday

如果有一天累了,我就回去养鸡养鸭
hantsy.cublog.cn
在Redhat 9创建自己的rpm 打包环境
原文参见:HOWTO: How to create rpmbuild directory

方法1:
[hantsy@localhost hantsy]$cd ~
[hantsy@localhost hantsy]$mkdir rpmbuild
[hantsy@localhost hantsy]$cp -a /usr/src/redhat/ rpmbuild
[hantsy@localhost hantsy]$echo '%_topdir %(echo $HOME)/rpmbuild' >> .rpmmacros
如果不想编译debug包,向.rpmmacros中追加%debug_package %{nil}
[hantsy@localhost hantsy]$echo '%debug_package %{nil}' >> .rpmmacros

方法2
也可直接安装现成的rpm文件:
[hantsy@localhost hantsy]$sudo rpm -ivh http://download.fedora.us/fedora/fedora/1/i386/RPMS.stable/fedora-rpmdevtools-0.1.7-0.fdr.5.noarch.rpm
[hantsy@localhost hantsy]$fedora-buildrpmtree

使用sudo 取得root权限

编辑/etc/sudoers文件
root ALL=(ALL) ALL
hantsy ALL=(ALL) ALL

例子,重新为redhat 9打AdobeReader 7.0 rpms包 参见 HOWTO: Buiding a custom Adobe Reader 7.0 RPM for FC3

[hantsy@localhost hantsy]$ cd rpmbuild/SOURCE
[hantsy@localhost hantsy]$wget -c ftp://ftp.adobe.com/pub/adobe/reader/unix/7x/7.0/enu/AdbeRdr70_linux_enu.tar.gz
[hantsy@localhost hantsy]$cd ../SPECS
[hantsy@localhost hantsy]$wget -c http://fedoranews.org/tchung/AdobeReader/7.0/AdobeReader.spec
[hantsy@localhost hantsy]$sudo rpmbuild -ba AdobeReader.spec

安装自己的rpm包
[hantsy@localhost hantsy]$sudo rpm -ivh ~/rpmbuild/RPMS/i386/AdobeReader-7.0-1.rh9.i386.rpm


参考资料:
1.你可以从这里下载我修改过的specs文件specs.tar.gz
2.www.fedoranews.org 上有大量有关redhat和fedora的教程。

发表于: 2005-03-31,修改于: 2005-03-31 21:51,已浏览1961次,有评论4条 推荐 投诉
网友: 匿名网友 时间:2005-04-02 03:24:18 IP地址:218.12.167.★


网友: ronald chen 时间:2005-06-18 10:55:13 IP地址:222.78.165.★
我一直在使用rh9,对升级内核是一窍不通,才编译一个文件就挂了,现在连u盘、光盘都无法挂载,我多么祈盼有一这么一个rpm包,能让我点几下mouse,就升级完毕,呵呵

网友: ronald chen 时间:2005-06-18 10:55:13 IP地址:222.78.165.★
我一直在使用rh9,对升级内核是一窍不通,才编译一个文件就挂了,现在连u盘、光盘都无法挂载,我多么祈盼有一这么一个rpm包,能让我点几下mouse,就升级完毕,呵呵

网友: 本站网友 时间:2007-08-21 08:46:44 IP地址:58.50.186.★
可以说下如何写spec文件么?


给我留言
版权所有 ChinaUnix.net 页面生成时间:0.07278