Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > b50d8ee6d7871fcc13c0677a9364ed59 > files > 387

bcfg2-doc-1.3.0-1.fc17.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Building RPM packages from source &mdash; Bcfg2 1.3.0 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.3.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="top" title="Bcfg2 1.3.0 documentation" href="../index.html" />
    <link rel="up" title="Installation" href="index.html" />
    <link rel="next" title="Distribution-specific notes" href="distributions.html" />
    <link rel="prev" title="Installation from source" href="source.html" />
 
<link rel="stylesheet" href="../_static/bcfg2.css" type=""/>

  </head>
  <body>

<div style="text-align: left; padding: 10px 10px 15px 15px">
<a href="../index.html"><img src="../_static/bcfg2_logo.png" border="0" alt="sampledoc"/></a>
</div>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="distributions.html" title="Distribution-specific notes"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="source.html" title="Installation from source"
             accesskey="P">previous</a> |</li>
	<li><a href="../index.html">home</a> |&nbsp;</li>
	<!--<li><a href="../search.html">search</a> |&nbsp;</li>-->
	<li><a href="../help/index.html">help</a> |&nbsp;</li>
	<li><a href="../contents.html">documentation </a> &raquo;</li>

          <li><a href="../contents.html" >Bcfg2 documentation 1.3.0</a> &raquo;</li>
          <li><a href="index.html" accesskey="U">Installation</a> &raquo;</li> 
      </ul>
    </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="building-rpm-packages-from-source">
<h1>Building RPM packages from source<a class="headerlink" href="#building-rpm-packages-from-source" title="Permalink to this headline">¶</a></h1>
<p>The Bcfg2 distribution contains two different spec files.</p>
<div class="section" id="building-from-tarball">
<h2>Building from Tarball<a class="headerlink" href="#building-from-tarball" title="Permalink to this headline">¶</a></h2>
<ul>
<li><p class="first">Copy the tarball to <tt class="docutils literal"><span class="pre">/usr/src/packages/SOURCES/</span></tt></p>
</li>
<li><p class="first">Extract another copy of it somewhere else (eg: <tt class="docutils literal"><span class="pre">/tmp</span></tt>) and retrieve
the <tt class="docutils literal"><span class="pre">misc/bcfg2.spec</span></tt> file</p>
</li>
<li><p class="first">Run</p>
<div class="highlight-python"><pre>rpmbuild -ba bcfg2.spec</pre>
</div>
</li>
<li><p class="first">The resulting RPMs will be in <tt class="docutils literal"><span class="pre">/usr/src/packages/RPMS/</span></tt> and SRPMs
in <tt class="docutils literal"><span class="pre">/usr/src/packages/SRPMS</span></tt></p>
</li>
</ul>
</div>
<div class="section" id="building-from-an-git-checkout">
<h2>Building from an GIT Checkout<a class="headerlink" href="#building-from-an-git-checkout" title="Permalink to this headline">¶</a></h2>
<ul>
<li><p class="first">Change to the <tt class="docutils literal"><span class="pre">redhat/</span></tt> directory in the working copy</p>
</li>
<li><p class="first">Run</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">make</span>
</pre></div>
</div>
</li>
<li><p class="first">The resulting RPMs will be in <tt class="docutils literal"><span class="pre">/usr/src/redhat/RPMS/</span></tt> and SRPMs
in <tt class="docutils literal"><span class="pre">/usr/src/redhat/SRPMS</span></tt> and will have the SVN revision appended</p>
</li>
</ul>
</div>
<div class="section" id="building-rpm-packages-with-rpmbuild">
<h2>Building RPM packages with <tt class="docutils literal"><span class="pre">rpmbuild</span></tt><a class="headerlink" href="#building-rpm-packages-with-rpmbuild" title="Permalink to this headline">¶</a></h2>
<p>While you can go about building all these things from source, this
how to will try and meet the dependencies using packages from <a class="reference external" href="http://fedoraproject.org/wiki/EPEL">EPEL</a>.
The <em>el5</em> and the <em>el6</em> package should be compatible with CentOS 5.x.</p>
<ul>
<li><p class="first">Installation of the <a class="reference external" href="http://fedoraproject.org/wiki/EPEL">EPEL</a> repository package</p>
<div class="highlight-python"><pre>[root@centos ~]# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-6.noarch.rpm</pre>
</div>
</li>
<li><p class="first">Now you can install the rest of the prerequisites</p>
<div class="highlight-python"><pre>[root@centos ~]# yum install python-genshi python-cheetah python-lxml</pre>
</div>
</li>
<li><p class="first">After installing git, check out the master branch</p>
<div class="highlight-python"><pre>[root@centos redhat]# git clone git://git.mcs.anl.gov/bcfg2.git</pre>
</div>
</li>
<li><p class="first">Install the <tt class="docutils literal"><span class="pre">fedora-packager</span></tt> package</p>
<div class="highlight-python"><pre>[root@centos ~]# yum install fedora-packager</pre>
</div>
</li>
<li><p class="first">A directory structure for the RPM build process has to be established.</p>
<div class="highlight-python"><pre>[you@centos ~]$ rpmdev-setuptree</pre>
</div>
</li>
<li><p class="first">Change to the <em>redhat</em> directory of the checked out Bcfg2 source:</p>
<div class="highlight-python"><pre>[you@centos ~]$ cd bcfg2/redhat/</pre>
</div>
</li>
<li><p class="first">In the particular directory is a <tt class="docutils literal"><span class="pre">Makefile</span></tt> which will do the job of
building the RPM packages. You can do this as root, but it&#8217;s not
recommended:</p>
<div class="highlight-python"><pre>[you@centos redhat]$ make</pre>
</div>
</li>
<li><p class="first">Now the new RPM package can be installed. Please adjust the path to
your RPM package</p>
<div class="highlight-python"><pre>[root@centos ~]# rpm -ihv /home/YOU/rpmbuild/RPMS/noarch/bcfg2-server-1.0.0-0.2r5835.noarch.rpm</pre>
</div>
</li>
</ul>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Building RPM packages from source</a><ul>
<li><a class="reference internal" href="#building-from-tarball">Building from Tarball</a></li>
<li><a class="reference internal" href="#building-from-an-git-checkout">Building from an GIT Checkout</a></li>
<li><a class="reference internal" href="#building-rpm-packages-with-rpmbuild">Building RPM packages with <tt class="docutils literal"><span class="pre">rpmbuild</span></tt></a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="source.html"
                        title="previous chapter">Installation from source</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="distributions.html"
                        title="next chapter">Distribution-specific notes</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/installation/packages.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="distributions.html" title="Distribution-specific notes"
             >next</a> |</li>
        <li class="right" >
          <a href="source.html" title="Installation from source"
             >previous</a> |</li>
	<li><a href="../index.html">home</a> |&nbsp;</li>
	<!--<li><a href="../search.html">search</a> |&nbsp;</li>-->
	<li><a href="../help/index.html">help</a> |&nbsp;</li>
	<li><a href="../contents.html">documentation </a> &raquo;</li>

          <li><a href="../contents.html" >Bcfg2 documentation 1.3.0</a> &raquo;</li>
          <li><a href="index.html" >Installation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2013, Narayan Desai.
      Last updated on Mar 20, 2013.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>