Lorax 24.3 Documentation

This commit is contained in:
Brian C. Lane 2015-10-07 11:28:08 -07:00
parent 0d0dc77b7d
commit 1a076ff29a
37 changed files with 170 additions and 252 deletions

View File

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a09c162d23fb15b626e4b201ce80537f
config: 84f72fa8a4daf7d19bfd5ac195b5abab
tags: 645f666f9bcd5a90fca523b33c5a78b7

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Overview: module code &mdash; Lorax 24.1 documentation</title>
<title>Overview: module code &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../index.html"/>
<script src="_static/js/modernizr.min.js"></script>
@ -195,7 +195,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax &mdash; Lorax 24.1 documentation</title>
<title>pylorax &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../index.html"/>
<link rel="up" title="Module code" href="index.html"/>
@ -480,7 +480,7 @@
<span class="n">workdir</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">workdir</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s">&quot;rebuilding initramfs images&quot;</span><span class="p">)</span>
<span class="n">dracut_args</span> <span class="o">=</span> <span class="p">[</span><span class="s">&quot;--xz&quot;</span><span class="p">,</span> <span class="s">&quot;--install&quot;</span><span class="p">,</span> <span class="s">&quot;/.buildstamp&quot;</span><span class="p">]</span>
<span class="n">dracut_args</span> <span class="o">=</span> <span class="p">[</span><span class="s">&quot;--xz&quot;</span><span class="p">,</span> <span class="s">&quot;--install&quot;</span><span class="p">,</span> <span class="s">&quot;/.buildstamp&quot;</span><span class="p">,</span> <span class="s">&quot;--no-early-microcode&quot;</span><span class="p">]</span>
<span class="n">anaconda_args</span> <span class="o">=</span> <span class="n">dracut_args</span> <span class="o">+</span> <span class="p">[</span><span class="s">&quot;--add&quot;</span><span class="p">,</span> <span class="s">&quot;anaconda pollcdrom&quot;</span><span class="p">]</span>
<span class="c"># ppc64 cannot boot an initrd &gt; 32MiB so remove some drivers</span>
@ -493,21 +493,6 @@
<span class="n">treebuilder</span><span class="o">.</span><span class="n">rebuild_initrds</span><span class="p">(</span><span class="n">add_args</span><span class="o">=</span><span class="n">anaconda_args</span><span class="p">)</span>
<span class="k">if</span> <span class="n">doupgrade</span><span class="p">:</span>
<span class="c"># Build upgrade.img. It&#39;d be nice if these could coexist in the same</span>
<span class="c"># image, but that would increase the size of the anaconda initramfs,</span>
<span class="c"># which worries some people (esp. PPC tftpboot). So they&#39;re separate.</span>
<span class="k">try</span><span class="p">:</span>
<span class="c"># If possible, use the &#39;fedup&#39; plymouth theme</span>
<span class="n">themes</span> <span class="o">=</span> <span class="n">runcmd_output</span><span class="p">([</span><span class="s">&#39;plymouth-set-default-theme&#39;</span><span class="p">,</span> <span class="s">&#39;--list&#39;</span><span class="p">],</span>
<span class="n">root</span><span class="o">=</span><span class="n">installroot</span><span class="p">)</span>
<span class="k">if</span> <span class="s">&#39;fedup&#39;</span> <span class="ow">in</span> <span class="n">themes</span><span class="o">.</span><span class="n">splitlines</span><span class="p">():</span>
<span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s">&#39;PLYMOUTH_THEME_NAME&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s">&#39;fedup&#39;</span>
<span class="k">except</span> <span class="ne">RuntimeError</span><span class="p">:</span>
<span class="k">pass</span>
<span class="n">upgrade_args</span> <span class="o">=</span> <span class="n">dracut_args</span> <span class="o">+</span> <span class="p">[</span><span class="s">&quot;--add&quot;</span><span class="p">,</span> <span class="s">&quot;system-upgrade&quot;</span><span class="p">]</span>
<span class="n">treebuilder</span><span class="o">.</span><span class="n">rebuild_initrds</span><span class="p">(</span><span class="n">add_args</span><span class="o">=</span><span class="n">upgrade_args</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s">&quot;upgrade&quot;</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s">&quot;populating output tree and building boot images&quot;</span><span class="p">)</span>
<span class="n">treebuilder</span><span class="o">.</span><span class="n">build</span><span class="p">()</span>
@ -606,7 +591,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.base &mdash; Lorax 24.1 documentation</title>
<title>pylorax.base &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -250,7 +250,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.buildstamp &mdash; Lorax 24.1 documentation</title>
<title>pylorax.buildstamp &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -244,7 +244,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.decorators &mdash; Lorax 24.1 documentation</title>
<title>pylorax.decorators &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -216,7 +216,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.discinfo &mdash; Lorax 24.1 documentation</title>
<title>pylorax.discinfo &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -225,7 +225,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.dnfhelper &mdash; Lorax 24.1 documentation</title>
<title>pylorax.dnfhelper &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -242,26 +242,26 @@
<span class="bp">self</span><span class="o">.</span><span class="n">total_size</span> <span class="o">=</span> <span class="n">total_size</span>
</div></div>
<div class="viewcode-block" id="LoraxRpmCallback"><a class="viewcode-back" href="../../pylorax.html#pylorax.dnfhelper.LoraxRpmCallback">[docs]</a><span class="k">class</span> <span class="nc">LoraxRpmCallback</span><span class="p">(</span><span class="n">dnf</span><span class="o">.</span><span class="n">callback</span><span class="o">.</span><span class="n">LoggingTransactionDisplay</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">queue</span><span class="p">):</span>
<div class="viewcode-block" id="LoraxRpmCallback"><a class="viewcode-back" href="../../pylorax.html#pylorax.dnfhelper.LoraxRpmCallback">[docs]</a><span class="k">class</span> <span class="nc">LoraxRpmCallback</span><span class="p">(</span><span class="n">dnf</span><span class="o">.</span><span class="n">callback</span><span class="o">.</span><span class="n">TransactionProgress</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="nb">super</span><span class="p">(</span><span class="n">LoraxRpmCallback</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_queue</span> <span class="o">=</span> <span class="n">queue</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_last_ts</span> <span class="o">=</span> <span class="bp">None</span>
<span class="bp">self</span><span class="o">.</span><span class="n">cnt</span> <span class="o">=</span> <span class="mi">0</span>
<div class="viewcode-block" id="LoraxRpmCallback.event"><a class="viewcode-back" href="../../pylorax.html#pylorax.dnfhelper.LoraxRpmCallback.event">[docs]</a> <span class="k">def</span> <span class="nf">event</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">package</span><span class="p">,</span> <span class="n">action</span><span class="p">,</span> <span class="n">te_current</span><span class="p">,</span> <span class="n">te_total</span><span class="p">,</span> <span class="n">ts_current</span><span class="p">,</span> <span class="n">ts_total</span><span class="p">):</span>
<span class="k">if</span> <span class="n">action</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">PKG_INSTALL</span> <span class="ow">and</span> <span class="n">te_current</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<div class="viewcode-block" id="LoraxRpmCallback.progress"><a class="viewcode-back" href="../../pylorax.html#pylorax.dnfhelper.LoraxRpmCallback.progress">[docs]</a> <span class="k">def</span> <span class="nf">progress</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">package</span><span class="p">,</span> <span class="n">action</span><span class="p">,</span> <span class="n">ti_done</span><span class="p">,</span> <span class="n">ti_total</span><span class="p">,</span> <span class="n">ts_done</span><span class="p">,</span> <span class="n">ts_total</span><span class="p">):</span>
<span class="k">if</span> <span class="n">action</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">PKG_INSTALL</span><span class="p">:</span>
<span class="c"># do not report same package twice</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_last_ts</span> <span class="o">==</span> <span class="n">ts_current</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_last_ts</span> <span class="o">==</span> <span class="n">ts_done</span><span class="p">:</span>
<span class="k">return</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_last_ts</span> <span class="o">=</span> <span class="n">ts_current</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_last_ts</span> <span class="o">=</span> <span class="n">ts_done</span>
<span class="n">msg</span> <span class="o">=</span> <span class="s">&#39;(</span><span class="si">%d</span><span class="s">/</span><span class="si">%d</span><span class="s">) </span><span class="si">%s</span><span class="s">.</span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> \
<span class="p">(</span><span class="n">ts_current</span><span class="p">,</span> <span class="n">ts_total</span><span class="p">,</span> <span class="n">package</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">package</span><span class="o">.</span><span class="n">arch</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">cnt</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_queue</span><span class="o">.</span><span class="n">put</span><span class="p">((</span><span class="s">&#39;install&#39;</span><span class="p">,</span> <span class="n">msg</span><span class="p">))</span>
<span class="n">msg</span> <span class="o">=</span> <span class="s">&#39;(</span><span class="si">%d</span><span class="s">/</span><span class="si">%d</span><span class="s">) </span><span class="si">%s</span><span class="s">.</span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">ts_done</span><span class="p">,</span> <span class="n">ts_total</span><span class="p">,</span> <span class="n">package</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">package</span><span class="o">.</span><span class="n">arch</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">action</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">TRANS_POST</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_queue</span><span class="o">.</span><span class="n">put</span><span class="p">((</span><span class="s">&#39;post&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">))</span></div></div>
<span class="n">msg</span> <span class="o">=</span> <span class="s">&quot;Performing post-installation setup tasks&quot;</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
</div>
<div class="viewcode-block" id="LoraxRpmCallback.error"><a class="viewcode-back" href="../../pylorax.html#pylorax.dnfhelper.LoraxRpmCallback.error">[docs]</a> <span class="k">def</span> <span class="nf">error</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">err_msg</span><span class="p">):</span>
<span class="n">logger</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="n">err_msg</span><span class="p">)</span></div></div>
</pre></div>
</div>
@ -293,7 +293,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.executils &mdash; Lorax 24.1 documentation</title>
<title>pylorax.executils &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -352,7 +352,7 @@
<span class="n">program_log</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s">&quot;Return code: </span><span class="si">%d</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">proc</span><span class="o">.</span><span class="n">returncode</span><span class="p">)</span>
<span class="k">if</span> <span class="n">proc</span><span class="o">.</span><span class="n">returncode</span> <span class="ow">and</span> <span class="n">raise_err</span><span class="p">:</span>
<span class="n">output</span> <span class="o">=</span> <span class="n">output_string</span> <span class="ow">or</span> <span class="s">&quot;&quot;</span> <span class="o">+</span> <span class="n">err_string</span> <span class="ow">or</span> <span class="s">&quot;&quot;</span>
<span class="n">output</span> <span class="o">=</span> <span class="p">(</span><span class="n">output_string</span> <span class="ow">or</span> <span class="s">&quot;&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="p">(</span><span class="n">err_string</span> <span class="ow">or</span> <span class="s">&quot;&quot;</span><span class="p">)</span>
<span class="k">raise</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">CalledProcessError</span><span class="p">(</span><span class="n">proc</span><span class="o">.</span><span class="n">returncode</span><span class="p">,</span> <span class="n">argv</span><span class="p">,</span> <span class="n">output</span><span class="p">)</span>
<span class="k">return</span> <span class="p">(</span><span class="n">proc</span><span class="o">.</span><span class="n">returncode</span><span class="p">,</span> <span class="n">output_string</span><span class="p">)</span>
@ -531,7 +531,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.imgutils &mdash; Lorax 24.1 documentation</title>
<title>pylorax.imgutils &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -603,7 +603,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.ltmpl &mdash; Lorax 24.1 documentation</title>
<title>pylorax.ltmpl &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -189,15 +189,12 @@
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="kn">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="kn">import</span> <span class="n">runcmd</span><span class="p">,</span> <span class="n">runcmd_output</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">mkcpio</span>
<span class="kn">import</span> <span class="nn">pylorax.output</span> <span class="kn">as</span> <span class="nn">output</span>
<span class="kn">from</span> <span class="nn">mako.lookup</span> <span class="kn">import</span> <span class="n">TemplateLookup</span>
<span class="kn">from</span> <span class="nn">mako.exceptions</span> <span class="kn">import</span> <span class="n">text_error_template</span>
<span class="kn">import</span> <span class="nn">sys</span><span class="o">,</span> <span class="nn">traceback</span>
<span class="kn">import</span> <span class="nn">struct</span>
<span class="kn">import</span> <span class="nn">dnf</span>
<span class="kn">import</span> <span class="nn">multiprocessing</span>
<span class="kn">import</span> <span class="nn">queue</span>
<span class="kn">import</span> <span class="nn">collections</span>
<div class="viewcode-block" id="LoraxTemplate"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LoraxTemplate">[docs]</a><span class="k">class</span> <span class="nc">LoraxTemplate</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
@ -658,40 +655,12 @@
<span class="k">else</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s">&quot;removepkg </span><span class="si">%s</span><span class="s">: no files to remove!&quot;</span><span class="p">,</span> <span class="n">p</span><span class="p">)</span>
</div>
<div class="viewcode-block" id="LoraxTemplateRunner.get_token_checked"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.get_token_checked">[docs]</a> <span class="k">def</span> <span class="nf">get_token_checked</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">process</span><span class="p">,</span> <span class="n">token_queue</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Try to get token from queue checking that process is still alive&quot;&quot;&quot;</span>
<span class="k">try</span><span class="p">:</span>
<span class="c"># wait at most a minute for the token</span>
<span class="p">(</span><span class="n">token</span><span class="p">,</span> <span class="n">msg</span><span class="p">)</span> <span class="o">=</span> <span class="n">token_queue</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">timeout</span><span class="o">=</span><span class="mi">60</span><span class="p">)</span>
<span class="k">except</span> <span class="n">queue</span><span class="o">.</span><span class="n">Empty</span><span class="p">:</span>
<span class="k">if</span> <span class="n">process</span><span class="o">.</span><span class="n">is_alive</span><span class="p">():</span>
<span class="k">try</span><span class="p">:</span>
<span class="c"># process still alive, give it 2 minutes more</span>
<span class="p">(</span><span class="n">token</span><span class="p">,</span> <span class="n">msg</span><span class="p">)</span> <span class="o">=</span> <span class="n">token_queue</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">timeout</span><span class="o">=</span><span class="mi">120</span><span class="p">)</span>
<span class="k">except</span> <span class="n">queue</span><span class="o">.</span><span class="n">Empty</span><span class="p">:</span>
<span class="c"># waited for 3 minutes and got nothing</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s">&quot;The transaction process got stuck somewhere (no message from it in 3 minutes)&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s">&quot;The transaction process has ended abruptly&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="p">(</span><span class="n">token</span><span class="p">,</span> <span class="n">msg</span><span class="p">)</span>
</div>
<div class="viewcode-block" id="LoraxTemplateRunner.run_pkg_transaction"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.run_pkg_transaction">[docs]</a> <span class="k">def</span> <span class="nf">run_pkg_transaction</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> run_pkg_transaction</span>
<span class="sd"> Actually install all the packages requested by previous &#39;installpkg&#39;</span>
<span class="sd"> commands.</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">def</span> <span class="nf">do_transaction</span><span class="p">(</span><span class="n">base</span><span class="p">,</span> <span class="n">token_queue</span><span class="p">):</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">display</span> <span class="o">=</span> <span class="n">LoraxRpmCallback</span><span class="p">(</span><span class="n">token_queue</span><span class="p">)</span>
<span class="n">base</span><span class="o">.</span><span class="n">do_transaction</span><span class="p">(</span><span class="n">display</span><span class="o">=</span><span class="n">display</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">BaseException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s">&quot;The transaction process has ended abruptly: </span><span class="si">%s</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
<span class="n">token_queue</span><span class="o">.</span><span class="n">put</span><span class="p">((</span><span class="s">&#39;quit&#39;</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)))</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s">&quot;Checking dependencies&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">resolve</span><span class="p">()</span>
@ -712,24 +681,12 @@
<span class="k">raise</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s">&quot;Preparing transaction from installation source&quot;</span><span class="p">)</span>
<span class="n">token_queue</span> <span class="o">=</span> <span class="n">multiprocessing</span><span class="o">.</span><span class="n">Queue</span><span class="p">()</span>
<span class="n">msgout</span> <span class="o">=</span> <span class="n">output</span><span class="o">.</span><span class="n">LoraxOutput</span><span class="p">()</span>
<span class="n">process</span> <span class="o">=</span> <span class="n">multiprocessing</span><span class="o">.</span><span class="n">Process</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">do_transaction</span><span class="p">,</span> <span class="n">args</span><span class="o">=</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="p">,</span> <span class="n">token_queue</span><span class="p">))</span>
<span class="n">process</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="p">(</span><span class="n">token</span><span class="p">,</span> <span class="n">msg</span><span class="p">)</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_token_checked</span><span class="p">(</span><span class="n">process</span><span class="p">,</span> <span class="n">token_queue</span><span class="p">)</span>
<span class="k">while</span> <span class="n">token</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">(</span><span class="s">&#39;post&#39;</span><span class="p">,</span> <span class="s">&#39;quit&#39;</span><span class="p">):</span>
<span class="k">if</span> <span class="n">token</span> <span class="o">==</span> <span class="s">&#39;install&#39;</span><span class="p">:</span>
<span class="n">logging</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%s</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">msg</span><span class="p">)</span>
<span class="n">msgout</span><span class="o">.</span><span class="n">writeline</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
<span class="p">(</span><span class="n">token</span><span class="p">,</span> <span class="n">msg</span><span class="p">)</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_token_checked</span><span class="p">(</span><span class="n">process</span><span class="p">,</span> <span class="n">token_queue</span><span class="p">)</span>
<span class="k">if</span> <span class="n">token</span> <span class="o">==</span> <span class="s">&#39;quit&#39;</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s">&quot;Transaction failed.&quot;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s">&quot;Transaction failed&quot;</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s">&quot;Performing post-installation setup tasks&quot;</span><span class="p">)</span>
<span class="n">process</span><span class="o">.</span><span class="n">join</span><span class="p">()</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">display</span> <span class="o">=</span> <span class="n">LoraxRpmCallback</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">do_transaction</span><span class="p">(</span><span class="n">display</span><span class="o">=</span><span class="n">display</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">BaseException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s">&quot;The transaction process has ended abruptly: </span><span class="si">%s</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
<span class="k">raise</span>
<span class="c"># Reset the package sack to pick up the installed packages</span>
<span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">reset</span><span class="p">(</span><span class="n">repos</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
@ -900,7 +857,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.monitor &mdash; Lorax 24.1 documentation</title>
<title>pylorax.monitor &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -262,6 +262,7 @@
<span class="s">&quot;insufficient disk space:&quot;</span><span class="p">,</span>
<span class="s">&quot;error populating transaction after&quot;</span><span class="p">,</span>
<span class="s">&quot;traceback script(s) have been run&quot;</span><span class="p">,</span>
<span class="s">&quot;crashed on signal&quot;</span><span class="p">,</span>
<span class="s">&quot;packaging: Missed: NoSuchPackage&quot;</span><span class="p">]</span>
<span class="n">re_tests</span> <span class="o">=</span> <span class="p">[</span><span class="s">r&quot;packaging: base repo .* not valid&quot;</span><span class="p">,</span>
<span class="s">r&quot;packaging: .* requires .*&quot;</span><span class="p">]</span>
@ -377,7 +378,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.mount &mdash; Lorax 24.1 documentation</title>
<title>pylorax.mount &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -282,7 +282,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.sysutils &mdash; Lorax 24.1 documentation</title>
<title>pylorax.sysutils &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -294,7 +294,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.treebuilder &mdash; Lorax 24.1 documentation</title>
<title>pylorax.treebuilder &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -575,7 +575,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.treeinfo &mdash; Lorax 24.1 documentation</title>
<title>pylorax.treeinfo &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="../../index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="../../index.html"/>
<link rel="up" title="pylorax" href="../pylorax.html"/>
@ -243,7 +243,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -149,9 +149,13 @@ changes. Here are the steps I used to convert the Fedora XFCE spin.
there is no /etc/fstab
11. Don't delete initramfs files from /boot in %post
12. Have dracut-config-generic, grub-efi, memtest86+ and syslinux in the package
list.
13. Omit dracut-config-rescue from the %package list: ``-dracut-config-rescue``
12. When creating live iso's you need to have, at least, these packages in the %package section::
dracut-config-generic
dracut-live
-dracut-config-rescue
grub-efi
memtest86+
syslinux
One drawback to using virt-install is that it pulls the packages from
the repo each time you run it. To speed things up you either need a local
@ -163,7 +167,7 @@ you pass it to livemedia-creator like this:
You also need to use a specific mirror instead of mirrormanager so that the
packages will get cached, so your kickstart url would look like:
``url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/17/x86_64/os/"``
``url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/"``
You can also add an update repo, but don't name it updates. Add --proxy to
it as well.
@ -335,11 +339,11 @@ Using Mock to Create Images
---------------------------
As of lorax version 22.2 you can use livemedia-creator and anaconda version
22.15 inside of a mock chroot with --make-iso and --make-fsimage. Note that
this requires bind mounting the host's /dev/ directory into the mock, which
could be dangerous since it includes the host's drives. You can work around
this by /dev/loopX nodes before running livemedia-creator. This example does
not do that.
22.15 inside of a mock chroot with --make-iso and --make-fsimage.
.. note::
As of mock 1.2.12 you no longer need to bind mount ``/dev/``, loop devices are setup
as part of the standard mock ``/dev/`` creation.
On the host system:
@ -347,54 +351,36 @@ On the host system:
2. Add a user to the mock group to use for running mock. eg. builder
3. Edit the /etc/mock/site-defaults.cfg file to change:
``config_opts['internal_dev_setup'] = False``
The loop devices are needed for the installation, so it needs to mount the
host's /dev/ inside the mock.
This is fairly dangerous. I would recommend using a dedicated build host and
making sure you have backups just in case something goes wrong and it
modifies the host system. You can avoid this if you setup the /dev/loopX
device nodes yourself.
4. Create a new /etc/mock/ config file based on the rawhide one, or modify the
3. Create a new /etc/mock/ config file based on the rawhide one, or modify the
existing one so that the following options are setup::
config_opts['chroot_setup_cmd'] = 'install @buildsys-build anaconda-tui lorax'
# NOTE that this actually needs to be set in site-defaults.cfg
config_opts['internal_dev_setup'] = False
# Mount the relevant host paths inside the mock /dev/
config_opts['plugin_conf']['bind_mount_enable'] = True
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('/dev','/dev/'))
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('/dev/pts','/dev/pts/'))
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('/dev/shm','/dev/shm/'))
# build results go into /home/builder/results/
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('/home/builder/results','/results/'))
If you are creating images for a branched release of Fedora you should also enable
the updates-testing repository so that you get the latest builds in your mock chroot.
The following steps are run as the builder user who is a member of the mock
group.
5. Make a directory for results matching the bind mount above
4. Make a directory for results matching the bind mount above
``mkdir ~/results/``
6. Copy the example kickstarts
5. Copy the example kickstarts
``cp /usr/share/docs/lorax/*ks .``
7. Make sure tar and dracut-network are in the %packages section and that the
6. Make sure tar and dracut-network are in the %packages section and that the
``url points to the correct repo``
8. Init the mock
7. Init the mock
``mock -r fedora-rawhide-x86_64 --init``
9. Copy the kickstart inside the mock
8. Copy the kickstart inside the mock
``mock -r fedora-rawhide-x86_64 --copyin ./fedora-minimal.ks /root/``
10. Make a minimal iso::
9. Make a minimal iso::
mock -r fedora-rawhide-x86_64 --chroot -- livemedia-creator --no-virt \
--resultdir=/results/try-1 --logfile=/results/logs/try-1/try-1.log \

View File

@ -9,7 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; Lorax 24.1 documentation</title>
<title>Index &mdash; Lorax 24.3 documentation</title>
@ -31,7 +31,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
@ -330,11 +330,11 @@
</dt>
<dt><a href="pylorax.html#pylorax.imgutils.estimate_size">estimate_size() (in module pylorax.imgutils)</a>
<dt><a href="pylorax.html#pylorax.dnfhelper.LoraxRpmCallback.error">error() (pylorax.dnfhelper.LoraxRpmCallback method)</a>
</dt>
<dt><a href="pylorax.html#pylorax.dnfhelper.LoraxRpmCallback.event">event() (pylorax.dnfhelper.LoraxRpmCallback method)</a>
<dt><a href="pylorax.html#pylorax.imgutils.estimate_size">estimate_size() (in module pylorax.imgutils)</a>
</dt>
@ -393,12 +393,12 @@
<dt><a href="pylorax.html#pylorax.treebuilder.generate_module_info">generate_module_info() (in module pylorax.treebuilder)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="pylorax.html#pylorax.get_buildarch">get_buildarch() (in module pylorax)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="pylorax.html#pylorax.mount.IsoMountpoint.get_iso_label">get_iso_label() (pylorax.mount.IsoMountpoint method)</a>
</dt>
@ -407,10 +407,6 @@
<dt><a href="pylorax.html#pylorax.imgutils.get_loop_name">get_loop_name() (in module pylorax.imgutils)</a>
</dt>
<dt><a href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.get_token_checked">get_token_checked() (pylorax.ltmpl.LoraxTemplateRunner method)</a>
</dt>
</dl></td>
</tr></table>
@ -679,6 +675,12 @@
<dt><a href="pylorax.html#pylorax.dnfhelper.LoraxDownloadCallback.progress">progress() (pylorax.dnfhelper.LoraxDownloadCallback method)</a>
</dt>
<dd><dl>
<dt><a href="pylorax.html#pylorax.dnfhelper.LoraxRpmCallback.progress">(pylorax.dnfhelper.LoraxRpmCallback method)</a>
</dt>
</dl></dd>
<dt><a href="pylorax.html#pylorax.base.BaseLoraxClass.pwarning">pwarning() (pylorax.base.BaseLoraxClass method)</a>
</dt>
@ -1009,7 +1011,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to Loraxs documentation! &mdash; Lorax 24.1 documentation</title>
<title>Welcome to Loraxs documentation! &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="#"/>
<link rel="top" title="Lorax 24.3 documentation" href="#"/>
<link rel="next" title="Introduction to Lorax" href="intro.html"/>
@ -212,7 +212,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Introduction to Lorax &mdash; Lorax 24.1 documentation</title>
<title>Introduction to Lorax &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="index.html"/>
<link rel="next" title="lorax" href="lorax.html"/>
<link rel="prev" title="Welcome to Loraxs documentation!" href="index.html"/>
@ -244,7 +244,7 @@ upd-instroot and mk-images* scripts.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>livemedia-creator &mdash; Lorax 24.1 documentation</title>
<title>livemedia-creator &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="index.html"/>
<link rel="next" title="Product and Updates Images" href="product-images.html"/>
<link rel="prev" title="lorax" href="lorax.html"/>
@ -290,10 +290,13 @@ there is no /etc/fstab</p>
</li>
<li><p class="first">Don&#8217;t delete initramfs files from /boot in %post</p>
</li>
<li><p class="first">Have dracut-config-generic, grub-efi, memtest86+ and syslinux in the package
list.</p>
</li>
<li><p class="first">Omit dracut-config-rescue from the %package list: <tt class="docutils literal"><span class="pre">-dracut-config-rescue</span></tt></p>
<li><p class="first">When creating live iso&#8217;s you need to have, at least, these packages in the %package section::
dracut-config-generic
dracut-live
-dracut-config-rescue
grub-efi
memtest86+
syslinux</p>
</li>
</ol>
<p>One drawback to using virt-install is that it pulls the packages from
@ -305,7 +308,7 @@ you pass it to livemedia-creator like this:</p>
<p>You also need to use a specific mirror instead of mirrormanager so that the
packages will get cached, so your kickstart url would look like:</p>
<blockquote>
<div><tt class="docutils literal"><span class="pre">url</span> <span class="pre">--url=&quot;http://dl.fedoraproject.org/pub/fedora/linux/development/17/x86_64/os/&quot;</span></tt></div></blockquote>
<div><tt class="docutils literal"><span class="pre">url</span> <span class="pre">--url=&quot;http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/&quot;</span></tt></div></blockquote>
<p>You can also add an update repo, but don&#8217;t name it updates. Add &#8211;proxy to
it as well.</p>
</div>
@ -437,48 +440,33 @@ in docs/rhel-atomic-pxe-live.ks.</p>
<div class="section" id="using-mock-to-create-images">
<h2>Using Mock to Create Images<a class="headerlink" href="#using-mock-to-create-images" title="Permalink to this headline"></a></h2>
<p>As of lorax version 22.2 you can use livemedia-creator and anaconda version
22.15 inside of a mock chroot with &#8211;make-iso and &#8211;make-fsimage. Note that
this requires bind mounting the host&#8217;s /dev/ directory into the mock, which
could be dangerous since it includes the host&#8217;s drives. You can work around
this by /dev/loopX nodes before running livemedia-creator. This example does
not do that.</p>
22.15 inside of a mock chroot with &#8211;make-iso and &#8211;make-fsimage.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">As of mock 1.2.12 you no longer need to bind mount <tt class="docutils literal"><span class="pre">/dev/</span></tt>, loop devices are setup
as part of the standard mock <tt class="docutils literal"><span class="pre">/dev/</span></tt> creation.</p>
</div>
<p>On the host system:</p>
<ol class="arabic">
<li><p class="first">yum install -y mock</p>
</li>
<li><p class="first">Add a user to the mock group to use for running mock. eg. builder</p>
</li>
<li><p class="first">Edit the /etc/mock/site-defaults.cfg file to change:</p>
<p><tt class="docutils literal"><span class="pre">config_opts['internal_dev_setup']</span> <span class="pre">=</span> <span class="pre">False</span></tt></p>
<p>The loop devices are needed for the installation, so it needs to mount the
host&#8217;s /dev/ inside the mock.</p>
<p>This is fairly dangerous. I would recommend using a dedicated build host and
making sure you have backups just in case something goes wrong and it
modifies the host system. You can avoid this if you setup the /dev/loopX
device nodes yourself.</p>
</li>
<li><p class="first">Create a new /etc/mock/ config file based on the rawhide one, or modify the
existing one so that the following options are setup:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">config_opts</span><span class="p">[</span><span class="s">&#39;chroot_setup_cmd&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s">&#39;install @buildsys-build anaconda-tui lorax&#39;</span>
<span class="c"># NOTE that this actually needs to be set in site-defaults.cfg</span>
<span class="n">config_opts</span><span class="p">[</span><span class="s">&#39;internal_dev_setup&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">False</span>
<span class="c"># Mount the relevant host paths inside the mock /dev/</span>
<span class="n">config_opts</span><span class="p">[</span><span class="s">&#39;plugin_conf&#39;</span><span class="p">][</span><span class="s">&#39;bind_mount_enable&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">True</span>
<span class="n">config_opts</span><span class="p">[</span><span class="s">&#39;plugin_conf&#39;</span><span class="p">][</span><span class="s">&#39;bind_mount_opts&#39;</span><span class="p">][</span><span class="s">&#39;dirs&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="s">&#39;/dev&#39;</span><span class="p">,</span><span class="s">&#39;/dev/&#39;</span><span class="p">))</span>
<span class="n">config_opts</span><span class="p">[</span><span class="s">&#39;plugin_conf&#39;</span><span class="p">][</span><span class="s">&#39;bind_mount_opts&#39;</span><span class="p">][</span><span class="s">&#39;dirs&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="s">&#39;/dev/pts&#39;</span><span class="p">,</span><span class="s">&#39;/dev/pts/&#39;</span><span class="p">))</span>
<span class="n">config_opts</span><span class="p">[</span><span class="s">&#39;plugin_conf&#39;</span><span class="p">][</span><span class="s">&#39;bind_mount_opts&#39;</span><span class="p">][</span><span class="s">&#39;dirs&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="s">&#39;/dev/shm&#39;</span><span class="p">,</span><span class="s">&#39;/dev/shm/&#39;</span><span class="p">))</span>
<span class="c"># build results go into /home/builder/results/</span>
<span class="n">config_opts</span><span class="p">[</span><span class="s">&#39;plugin_conf&#39;</span><span class="p">][</span><span class="s">&#39;bind_mount_opts&#39;</span><span class="p">][</span><span class="s">&#39;dirs&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="s">&#39;/home/builder/results&#39;</span><span class="p">,</span><span class="s">&#39;/results/&#39;</span><span class="p">))</span>
</pre></div>
</div>
<p>If you are creating images for a branched release of Fedora you should also enable
the updates-testing repository so that you get the latest builds in your mock chroot.</p>
</li>
</ol>
<p>The following steps are run as the builder user who is a member of the mock
group.</p>
<ol class="arabic" start="5">
<ol class="arabic" start="4">
<li><p class="first">Make a directory for results matching the bind mount above
<tt class="docutils literal"><span class="pre">mkdir</span> <span class="pre">~/results/</span></tt></p>
</li>
@ -623,7 +611,7 @@ report bugs against the lorax component.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>lorax &mdash; Lorax 24.1 documentation</title>
<title>lorax &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="index.html"/>
<link rel="next" title="livemedia-creator" href="livemedia-creator.html"/>
<link rel="prev" title="Introduction to Lorax" href="intro.html"/>
@ -197,7 +197,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax &mdash; Lorax 24.1 documentation</title>
<title>pylorax &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="index.html"/>
<link rel="next" title="pylorax package" href="pylorax.html"/>
<link rel="prev" title="Product and Updates Images" href="product-images.html"/>
@ -219,7 +219,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

Binary file not shown.

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Product and Updates Images &mdash; Lorax 24.1 documentation</title>
<title>Product and Updates Images &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="index.html"/>
<link rel="next" title="pylorax" href="modules.html"/>
<link rel="prev" title="livemedia-creator" href="livemedia-creator.html"/>
@ -213,7 +213,7 @@ command or the installpkgs paramater of <a class="reference internal" href="pylo
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Python Module Index &mdash; Lorax 24.1 documentation</title>
<title>Python Module Index &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="index.html"/>
@ -271,7 +271,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax package &mdash; Lorax 24.1 documentation</title>
<title>pylorax package &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="index.html"/>
<link rel="up" title="pylorax" href="modules.html"/>
<link rel="prev" title="pylorax" href="modules.html"/>
@ -266,11 +266,16 @@
<dl class="class">
<dt id="pylorax.dnfhelper.LoraxRpmCallback">
<em class="property">class </em><tt class="descclassname">pylorax.dnfhelper.</tt><tt class="descname">LoraxRpmCallback</tt><big>(</big><em>queue</em><big>)</big><a class="reference internal" href="_modules/pylorax/dnfhelper.html#LoraxRpmCallback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.dnfhelper.LoraxRpmCallback" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">builtins.LoggingTransactionDisplay</span></tt></p>
<em class="property">class </em><tt class="descclassname">pylorax.dnfhelper.</tt><tt class="descname">LoraxRpmCallback</tt><a class="reference internal" href="_modules/pylorax/dnfhelper.html#LoraxRpmCallback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.dnfhelper.LoraxRpmCallback" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">builtins.TransactionProgress</span></tt></p>
<dl class="method">
<dt id="pylorax.dnfhelper.LoraxRpmCallback.event">
<tt class="descname">event</tt><big>(</big><em>package</em>, <em>action</em>, <em>te_current</em>, <em>te_total</em>, <em>ts_current</em>, <em>ts_total</em><big>)</big><a class="reference internal" href="_modules/pylorax/dnfhelper.html#LoraxRpmCallback.event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.dnfhelper.LoraxRpmCallback.event" title="Permalink to this definition"></a></dt>
<dt id="pylorax.dnfhelper.LoraxRpmCallback.error">
<tt class="descname">error</tt><big>(</big><em>err_msg</em><big>)</big><a class="reference internal" href="_modules/pylorax/dnfhelper.html#LoraxRpmCallback.error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.dnfhelper.LoraxRpmCallback.error" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pylorax.dnfhelper.LoraxRpmCallback.progress">
<tt class="descname">progress</tt><big>(</big><em>package</em>, <em>action</em>, <em>ti_done</em>, <em>ti_total</em>, <em>ts_done</em>, <em>ts_total</em><big>)</big><a class="reference internal" href="_modules/pylorax/dnfhelper.html#LoraxRpmCallback.progress"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.dnfhelper.LoraxRpmCallback.progress" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -291,7 +296,7 @@
<dl class="function">
<dt id="pylorax.executils.execReadlines">
<tt class="descclassname">pylorax.executils.</tt><tt class="descname">execReadlines</tt><big>(</big><em>command</em>, <em>argv</em>, <em>stdin=None</em>, <em>root='/'</em>, <em>env_prune=None</em>, <em>filter_stderr=False</em>, <em>callback=&lt;function &lt;lambda&gt; at 0x7f21026ac048&gt;</em>, <em>env_add=None</em>, <em>reset_handlers=True</em>, <em>reset_lang=True</em><big>)</big><a class="reference internal" href="_modules/pylorax/executils.html#execReadlines"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.executils.execReadlines" title="Permalink to this definition"></a></dt>
<tt class="descclassname">pylorax.executils.</tt><tt class="descname">execReadlines</tt><big>(</big><em>command</em>, <em>argv</em>, <em>stdin=None</em>, <em>root='/'</em>, <em>env_prune=None</em>, <em>filter_stderr=False</em>, <em>callback=&lt;function &lt;lambda&gt; at 0x7feb4d341400&gt;</em>, <em>env_add=None</em>, <em>reset_handlers=True</em>, <em>reset_lang=True</em><big>)</big><a class="reference internal" href="_modules/pylorax/executils.html#execReadlines"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.executils.execReadlines" title="Permalink to this definition"></a></dt>
<dd><p>Execute an external command and return the line output of the command
in real-time.</p>
<p>This method assumes that there is a reasonably low delay between the
@ -414,8 +419,8 @@ variable name, the old value is overwritten.</p>
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.4)"><em>str</em></a>) &#8211; The name of the environment variable</li>
<li><strong>value</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.4)"><em>str</em></a>) &#8211; The value of the environment variable</li>
<li><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.5)"><em>str</em></a>) &#8211; The name of the environment variable</li>
<li><strong>value</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.5)"><em>str</em></a>) &#8211; The value of the environment variable</li>
</ul>
</td>
</tr>
@ -604,11 +609,11 @@ in options.</p>
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>rootdir</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.4)"><em>str</em></a>) &#8211; Root directory</li>
<li><strong>outfile</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.4)"><em>str</em></a>) &#8211; Path of output image file</li>
<li><strong>label</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.4)"><em>str</em></a>) &#8211; Filesystem label</li>
<li><strong>size</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.4)"><em>int</em></a>) &#8211; Size of the image in GiB, if None computed automatically</li>
<li><strong>sysroot</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.4)"><em>str</em></a>) &#8211; path to system (deployment) root relative to physical root</li>
<li><strong>rootdir</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.5)"><em>str</em></a>) &#8211; Root directory</li>
<li><strong>outfile</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.5)"><em>str</em></a>) &#8211; Path of output image file</li>
<li><strong>label</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.5)"><em>str</em></a>) &#8211; Filesystem label</li>
<li><strong>size</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.5)"><em>int</em></a>) &#8211; Size of the image in GiB, if None computed automatically</li>
<li><strong>sysroot</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.5)"><em>str</em></a>) &#8211; path to system (deployment) root relative to physical root</li>
</ul>
</td>
</tr>
@ -781,12 +786,6 @@ Example:</p>
</dl>
</dd></dl>
<dl class="method">
<dt id="pylorax.ltmpl.LoraxTemplateRunner.get_token_checked">
<tt class="descname">get_token_checked</tt><big>(</big><em>process</em>, <em>token_queue</em><big>)</big><a class="reference internal" href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.get_token_checked"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.ltmpl.LoraxTemplateRunner.get_token_checked" title="Permalink to this definition"></a></dt>
<dd><p>Try to get token from queue checking that process is still alive</p>
</dd></dl>
<dl class="method">
<dt id="pylorax.ltmpl.LoraxTemplateRunner.hardlink">
<tt class="descname">hardlink</tt><big>(</big><em>src</em>, <em>dest</em><big>)</big><a class="reference internal" href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.hardlink"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.ltmpl.LoraxTemplateRunner.hardlink" title="Permalink to this definition"></a></dt>
@ -1136,7 +1135,7 @@ errors that indicate that the install failed.</p>
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>line</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.4)"><em>str</em></a>) &#8211; log line to check for failure</td>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>line</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.5)"><em>str</em></a>) &#8211; log line to check for failure</td>
</tr>
</tbody>
</table>
@ -1419,7 +1418,7 @@ image is built with the filename &#8220;${prefix}-${kernel.version}.img&#8221;</
<dd><p>Bases: <a class="reference internal" href="#pylorax.base.DataHolder" title="pylorax.base.DataHolder"><tt class="xref py py-class docutils literal"><span class="pre">pylorax.base.DataHolder</span></tt></a></p>
<dl class="attribute">
<dt id="pylorax.ArchData.bcj_arch">
<tt class="descname">bcj_arch</tt><em class="property"> = {'i386': 'x86', 'arm': 'arm', 'ppc64': 'powerpc', 'ppc': 'powerpc', 'armhfp': 'arm', 'x86_64': 'x86', 'ppc64le': 'powerpc'}</em><a class="headerlink" href="#pylorax.ArchData.bcj_arch" title="Permalink to this definition"></a></dt>
<tt class="descname">bcj_arch</tt><em class="property"> = {'ppc64': 'powerpc', 'i386': 'x86', 'ppc': 'powerpc', 'ppc64le': 'powerpc', 'x86_64': 'x86', 'arm': 'arm', 'armhfp': 'arm'}</em><a class="headerlink" href="#pylorax.ArchData.bcj_arch" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
@ -1469,8 +1468,8 @@ image is built with the filename &#8220;${prefix}-${kernel.version}.img&#8221;</
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>logfile</strong> (<a class="reference external" href="https://docs.python.org/3/library/string.html#module-string" title="(in Python v3.4)"><em>string</em></a>) &#8211; filename to write the log to</li>
<li><strong>theLogger</strong> (<a class="reference external" href="https://docs.python.org/3/library/logging.html#logging.Logger" title="(in Python v3.4)"><em>logging.Logger</em></a>) &#8211; top-level logger</li>
<li><strong>logfile</strong> (<a class="reference external" href="https://docs.python.org/3/library/string.html#module-string" title="(in Python v3.5)"><em>string</em></a>) &#8211; filename to write the log to</li>
<li><strong>theLogger</strong> (<a class="reference external" href="https://docs.python.org/3/library/logging.html#logging.Logger" title="(in Python v3.5)"><em>logging.Logger</em></a>) &#8211; top-level logger</li>
</ul>
</td>
</tr>
@ -1518,7 +1517,7 @@ image is built with the filename &#8220;${prefix}-${kernel.version}.img&#8221;</
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search &mdash; Lorax 24.1 documentation</title>
<title>Search &mdash; Lorax 24.3 documentation</title>
@ -30,7 +30,7 @@
<link rel="top" title="Lorax 24.1 documentation" href="index.html"/>
<link rel="top" title="Lorax 24.3 documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
@ -190,7 +190,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'24.1',
VERSION:'24.3',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true

File diff suppressed because one or more lines are too long