mirror of
https://github.com/clearlinux/clear-linux-documentation.git
synced 2026-05-01 12:33:44 +00:00
333 lines
21 KiB
HTML
333 lines
21 KiB
HTML
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en" data-content_root="../../">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<title>Query package info from upstream repository — Documentation for Clear Linux* project</title>
|
|
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
|
|
<link rel="stylesheet" type="text/css" href="../../_static/bizstyle.css?v=5283bb3d" />
|
|
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
|
|
|
|
<script src="../../_static/documentation_options.js?v=5929fcd5"></script>
|
|
<script src="../../_static/doctools.js?v=9bcbadda"></script>
|
|
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
|
<script src="../../_static/clipboard.min.js?v=a7894cd8"></script>
|
|
<script src="../../_static/copybutton.js?v=a56c686a"></script>
|
|
<script src="../../_static/bizstyle.js"></script>
|
|
<link rel="canonical" href="https://clearlinux.github.io/clear-linux-documentation/guides/maintenance/query-upstream.html" />
|
|
<link rel="icon" href="../../_static/favicon.ico"/>
|
|
<link rel="author" title="About these documents" href="../../about.html" />
|
|
<link rel="index" title="Index" href="../../genindex.html" />
|
|
<link rel="search" title="Search" href="../../search.html" />
|
|
<link rel="next" title="Resource limits" href="resource-limits.html" />
|
|
<link rel="prev" title="Modify hostname" href="hostname.html" />
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
<!--[if lt IE 9]>
|
|
<script src="_static/css3-mediaqueries.js"></script>
|
|
<![endif]-->
|
|
</head><body>
|
|
<div class="related" role="navigation" aria-label="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="resource-limits.html" title="Resource limits"
|
|
accesskey="N">next</a> |</li>
|
|
<li class="right" >
|
|
<a href="hostname.html" title="Modify hostname"
|
|
accesskey="P">previous</a> |</li>
|
|
<li class="nav-item nav-item-0"><a href="../../index.html">Documentation for Clear Linux* project</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Guides</a> »</li>
|
|
<li class="nav-item nav-item-this"><a href="">Query package info from upstream repository</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body" role="main">
|
|
|
|
<section id="query-package-info-from-upstream-repository">
|
|
<span id="query-upstream"></span><h1>Query package info from upstream repository<a class="headerlink" href="#query-package-info-from-upstream-repository" title="Link to this heading">¶</a></h1>
|
|
<p>This guide describes how to query package information from the Clear Linux OS upstream
|
|
repositories. This guide is intended for developers and advanced users.</p>
|
|
<nav class="contents local" id="contents">
|
|
<ul class="simple">
|
|
<li><p><a class="reference internal" href="#overview" id="id2">Overview</a></p></li>
|
|
<li><p><a class="reference internal" href="#prerequisites" id="id3">Prerequisites</a></p></li>
|
|
<li><p><a class="reference internal" href="#configure-dnf" id="id4">Configure DNF</a></p></li>
|
|
<li><p><a class="reference internal" href="#dnf-command-usage-examples" id="id5">DNF command usage examples</a></p></li>
|
|
</ul>
|
|
</nav>
|
|
<section id="overview">
|
|
<h2><a class="toc-backref" href="#contents" role="doc-backlink">Overview</a><a class="headerlink" href="#overview" title="Link to this heading">¶</a></h2>
|
|
<p>In Clear Linux* OS, the <a class="reference internal" href="../clear/swupd.html#swupd-guide"><span class="std std-ref">swupd</span></a> tool manages software
|
|
dependencies and installs bundles instead of packages. Although a bundle is
|
|
a collection of one or more packages, Clear Linux OS does not work with packages on
|
|
the client side. However, on the upstream/factory side, Clear Linux OS does work with
|
|
packages using a process called <em>mixing</em>.</p>
|
|
<p>Currently, <strong class="command">swupd</strong> does not report which packages are installed,
|
|
provide package version information, or return other package details. This
|
|
guide describes a method for retrieving package information from the Clear Linux OS
|
|
upstream repositories using <abbr title="Dandified Yum">DNF</abbr> commands.</p>
|
|
</section>
|
|
<section id="prerequisites">
|
|
<h2><a class="toc-backref" href="#contents" role="doc-backlink">Prerequisites</a><a class="headerlink" href="#prerequisites" title="Link to this heading">¶</a></h2>
|
|
<p>This guide assumes you have installed Clear Linux OS on your host system.
|
|
For detailed instructions on installing Clear Linux OS on a bare metal system, visit
|
|
the <a class="reference internal" href="../../get-started/bare-metal-install-desktop.html#bare-metal-install-desktop"><span class="std std-ref">bare metal installation guide</span></a>.</p>
|
|
<p>Before you install any new packages, update Clear Linux OS with the following command:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>swupd<span class="w"> </span>update
|
|
</pre></div>
|
|
</div>
|
|
</section>
|
|
<section id="configure-dnf">
|
|
<h2><a class="toc-backref" href="#contents" role="doc-backlink">Configure DNF</a><a class="headerlink" href="#configure-dnf" title="Link to this heading">¶</a></h2>
|
|
<ol class="arabic">
|
|
<li><p>Install the DNF bundle with the command:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>swupd<span class="w"> </span>bundle-add<span class="w"> </span>dnf
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p>Create a <code class="file docutils literal notranslate"><span class="pre">dnf.conf</span></code> file with the commands:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/dnf
|
|
sudo<span class="w"> </span>curl<span class="w"> </span>-L<span class="w"> </span>https://github.com/clearlinux/common/raw/master/conf/dnf.conf<span class="w"> </span>--output<span class="w"> </span>/etc/dnf/dnf.conf
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p>Edit the <code class="file docutils literal notranslate"><span class="pre">/etc/dnf/dnf.conf</span></code> file and set the <strong>baseurl</strong> variable
|
|
for binary and source RPMs as shown in lines 3 and 9 in the following
|
|
example.</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="o">[</span>clear<span class="o">]</span>
|
|
<span class="linenos"> 2</span><span class="nv">name</span><span class="o">=</span>Clear
|
|
<span class="hll"><span class="linenos"> 3</span><span class="nv">baseurl</span><span class="o">=</span>https://cdn.download.clearlinux.org/releases/<span class="nv">$releasever</span>/clear/x86_64/os/
|
|
</span><span class="linenos"> 4</span><span class="nv">enabled</span><span class="o">=</span><span class="m">1</span>
|
|
<span class="linenos"> 5</span><span class="nv">gpgcheck</span><span class="o">=</span><span class="m">0</span>
|
|
<span class="linenos"> 6</span><span class="o">[</span>clear-source<span class="o">]</span>
|
|
<span class="linenos"> 7</span><span class="nv">name</span><span class="o">=</span>Clear<span class="w"> </span>sources
|
|
<span class="linenos"> 8</span><span class="nv">failovermethod</span><span class="o">=</span>priority
|
|
<span class="hll"><span class="linenos"> 9</span><span class="nv">baseurl</span><span class="o">=</span>https://cdn.download.clearlinux.org/releases/<span class="nv">$releasever</span>/clear/source/SRPMS/
|
|
</span><span class="linenos">10</span><span class="nv">enabled</span><span class="o">=</span><span class="m">1</span>
|
|
<span class="linenos">11</span><span class="nv">gpgcheck</span><span class="o">=</span><span class="m">0</span>
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p>Initialize the RPM database with the command:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>rpm<span class="w"> </span>--initdb
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
</section>
|
|
<section id="dnf-command-usage-examples">
|
|
<h2><a class="toc-backref" href="#contents" role="doc-backlink">DNF command usage examples</a><a class="headerlink" href="#dnf-command-usage-examples" title="Link to this heading">¶</a></h2>
|
|
<nav class="contents local" id="id1">
|
|
<ul class="simple">
|
|
<li><p><a class="reference internal" href="#list-all-binary-and-source-rpms-in-the-current-release" id="id6">List all binary and source RPMs in the current release</a></p></li>
|
|
<li><p><a class="reference internal" href="#show-version-information-for-a-package-in-current-release" id="id7">Show version information for a package in current release</a></p></li>
|
|
<li><p><a class="reference internal" href="#show-version-information-for-a-package-in-a-specific-release" id="id8">Show version information for a package in a specific release</a></p></li>
|
|
<li><p><a class="reference internal" href="#show-only-version-and-release-information-for-a-package-in-a-specific-release" id="id9">Show only version and release information for a package in a specific release</a></p></li>
|
|
<li><p><a class="reference internal" href="#show-the-binary-package-for-a-specified-binary-file" id="id10">Show the binary package for a specified binary file</a></p></li>
|
|
<li><p><a class="reference internal" href="#show-the-source-package-for-a-specified-binary-file" id="id11">Show the source package for a specified binary file</a></p></li>
|
|
</ul>
|
|
</nav>
|
|
<section id="list-all-binary-and-source-rpms-in-the-current-release">
|
|
<h3><a class="toc-backref" href="#id1" role="doc-backlink">List all binary and source RPMs in the current release</a><a class="headerlink" href="#list-all-binary-and-source-rpms-in-the-current-release" title="Link to this heading">¶</a></h3>
|
|
<p>Command:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>dnf<span class="w"> </span>repoquery<span class="w"> </span>--releasever<span class="o">=</span>current
|
|
</pre></div>
|
|
</div>
|
|
<p>Sample output:</p>
|
|
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Clear 5.1 MB/s | 13 MB 00:02</span>
|
|
<span class="go">Clear sources 1.8 MB/s | 1.7 MB 00:00</span>
|
|
<span class="go">AVB-AudioModules-0:4.1.0-1.src</span>
|
|
<span class="go">AVB-AudioModules-0:4.1.0-1.x86_64</span>
|
|
<span class="go">AVB-AudioModules-data-0:4.1.0-1.x86_64</span>
|
|
<span class="go">AVB-AudioModules-dev-0:4.1.0-1.x86_64</span>
|
|
<span class="go">AVB-AudioModules-lib-0:4.1.0-1.x86_64</span>
|
|
<span class="go">AVB-AudioModules-license-0:4.1.0-1.x86_64</span>
|
|
<span class="go">AVBStreamHandler-0:1.1.0-21.src</span>
|
|
<span class="go">AVBStreamHandler-0:1.1.0-21.x86_64</span>
|
|
<span class="go">AVBStreamHandler-abi-0:1.1.0-21.x86_64</span>
|
|
<span class="go">AVBStreamHandler-bin-0:1.1.0-21.x86_64</span>
|
|
<span class="go">AVBStreamHandler-data-0:1.1.0-21.x86_64</span>
|
|
<span class="go">AVBStreamHandler-dev-0:1.1.0-21.x86_64</span>
|
|
<span class="go">AVBStreamHandler-lib-0:1.1.0-21.x86_64</span>
|
|
<span class="go">AVBStreamHandler-license-0:1.1.0-21.x86_64</span>
|
|
<span class="go">...</span>
|
|
<span class="go"><trimmed></span>
|
|
</pre></div>
|
|
</div>
|
|
</section>
|
|
<section id="show-version-information-for-a-package-in-current-release">
|
|
<h3><a class="toc-backref" href="#id1" role="doc-backlink">Show version information for a package in current release</a><a class="headerlink" href="#show-version-information-for-a-package-in-current-release" title="Link to this heading">¶</a></h3>
|
|
<p>This example queries version information for the zstd package.</p>
|
|
<p>Command:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>dnf<span class="w"> </span>repoquery<span class="w"> </span>--releasever<span class="o">=</span>current<span class="w"> </span>zstd
|
|
</pre></div>
|
|
</div>
|
|
<p>Sample output:</p>
|
|
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Last metadata expiration check: 0:02:30 ago on Tue 16 Jul 2019 03:03:34 PM PDT.</span>
|
|
<span class="go">zstd-0:1.4.0-46.src</span>
|
|
<span class="go">zstd-0:1.4.0-46.x86_64</span>
|
|
</pre></div>
|
|
</div>
|
|
</section>
|
|
<section id="show-version-information-for-a-package-in-a-specific-release">
|
|
<h3><a class="toc-backref" href="#id1" role="doc-backlink">Show version information for a package in a specific release</a><a class="headerlink" href="#show-version-information-for-a-package-in-a-specific-release" title="Link to this heading">¶</a></h3>
|
|
<p>This example queries version information for the zstd package in release
|
|
21000.</p>
|
|
<p>Command:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>dnf<span class="w"> </span>repoquery<span class="w"> </span>--releasever<span class="o">=</span><span class="m">21000</span><span class="w"> </span>zstd
|
|
</pre></div>
|
|
</div>
|
|
<p>Sample output:</p>
|
|
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Clear</span>
|
|
<span class="go">2.7 MB/s | 3.9 MB 00:01</span>
|
|
<span class="go">Clear sources</span>
|
|
<span class="go">628 kB/s | 559 kB 00:00</span>
|
|
<span class="go">zstd-0:1.3.3-20.src</span>
|
|
<span class="go">zstd-0:1.3.3-20.x86_64</span>
|
|
</pre></div>
|
|
</div>
|
|
</section>
|
|
<section id="show-only-version-and-release-information-for-a-package-in-a-specific-release">
|
|
<h3><a class="toc-backref" href="#id1" role="doc-backlink">Show only version and release information for a package in a specific release</a><a class="headerlink" href="#show-only-version-and-release-information-for-a-package-in-a-specific-release" title="Link to this heading">¶</a></h3>
|
|
<p>This example queries version and release information for the zstd package in
|
|
release 15000.</p>
|
|
<p>Command:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>dnf<span class="w"> </span>repoquery<span class="w"> </span>--releasever<span class="o">=</span><span class="m">15000</span><span class="w"> </span>--qf<span class="o">=</span><span class="s2">"%{VERSION}\n%{RELEASE}"</span><span class="w"> </span>zstd
|
|
</pre></div>
|
|
</div>
|
|
<p>Sample output:</p>
|
|
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Clear</span>
|
|
<span class="go">3.4 MB/s | 3.9 MB 00:01</span>
|
|
<span class="go">Clear sources</span>
|
|
<span class="go">345 kB/s | 528 kB 00:01</span>
|
|
<span class="go">1.1.4</span>
|
|
<span class="go">5</span>
|
|
</pre></div>
|
|
</div>
|
|
</section>
|
|
<section id="show-the-binary-package-for-a-specified-binary-file">
|
|
<h3><a class="toc-backref" href="#id1" role="doc-backlink">Show the binary package for a specified binary file</a><a class="headerlink" href="#show-the-binary-package-for-a-specified-binary-file" title="Link to this heading">¶</a></h3>
|
|
<p>This example returns the binary package that contains the
|
|
<code class="file docutils literal notranslate"><span class="pre">/usr/bin/zip</span></code> binary file.</p>
|
|
<p>Command:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>dnf<span class="w"> </span>repoquery<span class="w"> </span>--releasever<span class="o">=</span>current<span class="w"> </span>--whatprovides<span class="w"> </span>/usr/bin/zip
|
|
</pre></div>
|
|
</div>
|
|
<p>Sample output:</p>
|
|
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Last metadata expiration check: 0:04:47 ago on Tue 16 Jul 2019 03:03:34 PM PDT.</span>
|
|
<span class="go">zip-bin-0:3.0-23.x86_64</span>
|
|
</pre></div>
|
|
</div>
|
|
</section>
|
|
<section id="show-the-source-package-for-a-specified-binary-file">
|
|
<h3><a class="toc-backref" href="#id1" role="doc-backlink">Show the source package for a specified binary file</a><a class="headerlink" href="#show-the-source-package-for-a-specified-binary-file" title="Link to this heading">¶</a></h3>
|
|
<p>This example returns the source package that contains the
|
|
<code class="file docutils literal notranslate"><span class="pre">/usr/bin/zip</span></code> binary file.</p>
|
|
<p>Command:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>dnf<span class="w"> </span>repoquery<span class="w"> </span>--releasever<span class="o">=</span>current<span class="w"> </span>--whatprovides<span class="w"> </span>/usr/bin/zip<span class="w"> </span>--srpm
|
|
</pre></div>
|
|
</div>
|
|
<p>Sample output:</p>
|
|
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Last metadata expiration check: 0:05:50 ago on Tue 16 Jul 2019 03:03:34 PM PDT.</span>
|
|
<span class="go">zip-0:3.0-23.src</span>
|
|
</pre></div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
<div class="clearer"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
|
<div class="sphinxsidebarwrapper">
|
|
<p class="logo"><a href="../../index.html">
|
|
<img class="logo" src="../../_static/clearlinux.png" alt="Logo of Clear Linux* Project Docs"/>
|
|
</a></p>
|
|
<div>
|
|
<h3><a href="../../index.html">Table of Contents</a></h3>
|
|
<ul>
|
|
<li><a class="reference internal" href="#">Query package info from upstream repository</a><ul>
|
|
<li><a class="reference internal" href="#overview">Overview</a></li>
|
|
<li><a class="reference internal" href="#prerequisites">Prerequisites</a></li>
|
|
<li><a class="reference internal" href="#configure-dnf">Configure DNF</a></li>
|
|
<li><a class="reference internal" href="#dnf-command-usage-examples">DNF command usage examples</a><ul>
|
|
<li><a class="reference internal" href="#list-all-binary-and-source-rpms-in-the-current-release">List all binary and source RPMs in the current release</a></li>
|
|
<li><a class="reference internal" href="#show-version-information-for-a-package-in-current-release">Show version information for a package in current release</a></li>
|
|
<li><a class="reference internal" href="#show-version-information-for-a-package-in-a-specific-release">Show version information for a package in a specific release</a></li>
|
|
<li><a class="reference internal" href="#show-only-version-and-release-information-for-a-package-in-a-specific-release">Show only version and release information for a package in a specific release</a></li>
|
|
<li><a class="reference internal" href="#show-the-binary-package-for-a-specified-binary-file">Show the binary package for a specified binary file</a></li>
|
|
<li><a class="reference internal" href="#show-the-source-package-for-a-specified-binary-file">Show the source package for a specified binary file</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
<div>
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="hostname.html"
|
|
title="previous chapter">Modify hostname</a></p>
|
|
</div>
|
|
<div>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="resource-limits.html"
|
|
title="next chapter">Resource limits</a></p>
|
|
</div>
|
|
<div role="note" aria-label="source link">
|
|
<h3>This Page</h3>
|
|
<ul class="this-page-menu">
|
|
<li><a href="../../_sources/guides/maintenance/query-upstream.rst.txt"
|
|
rel="nofollow">Show Source</a></li>
|
|
</ul>
|
|
</div>
|
|
<search id="searchbox" style="display: none" role="search">
|
|
<h3 id="searchlabel">Quick search</h3>
|
|
<div class="searchformwrapper">
|
|
<form class="search" action="../../search.html" method="get">
|
|
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
|
<input type="submit" value="Go" />
|
|
</form>
|
|
</div>
|
|
</search>
|
|
<script>document.getElementById('searchbox').style.display = "block"</script>
|
|
</div>
|
|
</div>
|
|
<div class="clearer"></div>
|
|
</div>
|
|
<div class="related" role="navigation" aria-label="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="resource-limits.html" title="Resource limits"
|
|
>next</a> |</li>
|
|
<li class="right" >
|
|
<a href="hostname.html" title="Modify hostname"
|
|
>previous</a> |</li>
|
|
<li class="nav-item nav-item-0"><a href="../../index.html">Documentation for Clear Linux* project</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="../index.html" >Guides</a> »</li>
|
|
<li class="nav-item nav-item-this"><a href="">Query package info from upstream repository</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="footer" role="contentinfo">
|
|
© Copyright 2022 Intel Corporation. All Rights Reserved..
|
|
Last updated on Nov 04, 2024.
|
|
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
|
|
</div>
|
|
</body>
|
|
</html> |