rpm打包

开源项目打rpm包

1.系统环境安装git gcc并解压centos7.5系统

cd /tmp
yum -y install git gcc 
git clone https://github.com/oVirt/ovirt-engine

2.使用普通用户打包rpm

useradd centos || passwd centos
su centos || cd ~/

3.创建rpm环境

mkdir -pv rpmbuild/{SOURCES,SPECS,BUILD,BUILDROOT,RPMS}
cat ~/.rpmmacros
  %_topdir    /home/centos/rpmbuild
 rpmbuild --showrc | grep topdir

  

       -14: _builddir %{_topdir}/BUILD
       -14: _buildrootdir %{_topdir}/BUILDROOT
       -14: _rpmdir %{_topdir}/RPMS
       -14: _sourcedir %{_topdir}/SOURCES
       -14: _specdir %{_topdir}/SPECS
       -14: _srcrpmdir %{_topdir}/SRPMS
       -14: _topdir /home/centos/rpmbuild

4.切换root用户开始安装ovirt-engine环境

cd /tmp/ovirt-engine
make dist
yum -y install python-daemon unzip bind-utils \
postgresql-server postgresql postgresql-contrib \
python-dateutil python-m2crypto \
libxml2-python python-psycopg2 otopi ansible \ 
ovirt-engine-metrics ovirt-ansible-role \
sovirt-host-deploy ovirt-setup-lib maven-3 \
python-ovirt-engine-sdk4 \
python-flake8 python-pep8 \
python-docker-py python2-isort
yum -y install ovirt-engine-wildfly ovirt-engine-wildfly-overlay
yum install -y http://resources.ovirt.org/pub/yum-repo/ovirt-release-master.rpm 
sudo yum install -y $(cat automation/check-patch.packages)
yum install -y ovirt-engine-nodejs ovirt-engine-nodejs-modules ovirt-engine-yarn automake autoconf ant cp .
/ovirt-engine-4.4.0_master.tar.gz /home/centos/rpmbuild/SOURCES cp ./ovirt-engine.spec /home/centos/rpmbuild/SPECS chown -R centos.centos /home/centos/
yum -y install assertj-core  archaius-core hystrix-core hystrix-metrics-event-stream rxjava ovirt-jboss-modules-maven-plugin

5.切换centos用户开始build rpm

su centos && cd ~/rpmbuild/SPECS
rpmbuild -bb ovirt-engine.spec

 

转载于:https://www.cnblogs.com/zhenhui/p/10818199.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值