zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    在日志中记录Java异常信息的正确姿势
    基于Spring Boot架构的前后端完全分离项目API路径问题
    Spring生态简介
    WebSocket协议入门介绍
    Spring Boot程序正确停止的姿势
    python 中 __init__方法
    python中的if __name__ == 'main'
    python 类和实例
    内建模块 datetime使用
    内建模块collections的使用
  • 原文地址:https://www.cnblogs.com/zhenhui/p/10818199.html
Copyright © 2011-2022 走看看