<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Tutorial on SOW</title>
    <link>https://sow.pgsty.com/categories/tutorial/</link>
    <description>Recent content in Tutorial on SOW</description>
    <generator>Hugo</generator>
    <language>en</language>
    
    
    
      <lastBuildDate>Fri, 28 Aug 2026 18:32:04 +0800</lastBuildDate>
    
    
      <atom:link href="https://sow.pgsty.com/categories/tutorial/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
        <title>Build a YUM Repository</title>
        <link>https://sow.pgsty.com/docs/tutorial/yum-repo/</link>
        <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
        
        <guid>https://sow.pgsty.com/docs/tutorial/yum-repo/</guid>
        <description>&lt;p&gt;This tutorial creates a new Managed RPM repository. You need a writable&#xA;directory, and one or more RPM files.&lt;/p&gt;&#xA;&lt;h2 id=&#34;1-create-the-workspace&#34;&gt;1. Create the workspace&#xA;&lt;/h2&gt;&#xA;&lt;div class=&#34;td-code td-code--untitled&#34; id=&#34;td-code-3f9e4bd7-fence-0&#34; data-td-code data-td-code-auto-id&#xA;     data-td-language=&#34;bash&#34; data-td-line-count=&#34;5&#34;&gt;&#xA;  &lt;div class=&#34;td-code__viewport&#34; id=&#34;td-code-3f9e4bd7-fence-0-viewport&#34; data-td-code-viewport&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mkdir -p /srv/sow&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; /srv/sow&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sow init .&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sow repo new pigsty&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sow dist new el9 --format rpm -r pigsty&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;The Dist name is an identifier chosen by you. SOW does not infer an operating-system&#xA;release from &lt;code&gt;el9&lt;/code&gt;.&lt;/p&gt;</description>
      </item>
    <item>
        <title>Build an APT Repository</title>
        <link>https://sow.pgsty.com/docs/tutorial/apt-repo/</link>
        <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
        
        <guid>https://sow.pgsty.com/docs/tutorial/apt-repo/</guid>
        <description>&lt;p&gt;This tutorial creates a new Managed DEB repository. You need a writable&#xA;directory, and one or more DEB files.&lt;/p&gt;&#xA;&lt;h2 id=&#34;1-create-the-workspace&#34;&gt;1. Create the workspace&#xA;&lt;/h2&gt;&#xA;&lt;div class=&#34;td-code td-code--untitled&#34; id=&#34;td-code-35f1bee1-fence-0&#34; data-td-code data-td-code-auto-id&#xA;     data-td-language=&#34;bash&#34; data-td-line-count=&#34;5&#34;&gt;&#xA;  &lt;div class=&#34;td-code__viewport&#34; id=&#34;td-code-35f1bee1-fence-0-viewport&#34; data-td-code-viewport&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mkdir -p /srv/sow&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; /srv/sow&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sow init .&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sow repo new pigsty&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sow dist new trixie --format deb -r pigsty&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;The Dist name becomes the APT suite. It is an identifier chosen by you; SOW does not infer&#xA;distribution semantics from &lt;code&gt;trixie&lt;/code&gt;.&lt;/p&gt;</description>
      </item>
    <item>
        <title>Tutorials</title>
        <link>https://sow.pgsty.com/docs/tutorial/</link>
        <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
        
        <guid>https://sow.pgsty.com/docs/tutorial/</guid>
        <description>&lt;p&gt;Each tutorial starts from a new workspace. Commands are intended to be run in order;&#xA;replace uppercase placeholders and package paths for your environment.&lt;/p&gt;&#xA;&lt;p&gt;If you have not installed SOW yet, start with &lt;a href=&#34;https://sow.pgsty.com/docs/start/install/&#34;&gt;Installation&lt;/a&gt; and&#xA;&lt;a href=&#34;https://sow.pgsty.com/docs/start/quickstart/&#34;&gt;Quick Start&lt;/a&gt;. The tutorials below cover the managed repository path.&lt;/p&gt;&#xA;&lt;div class=&#34;td-content-cards td-content-cards--auto&#34; id=&#34;td-cards-b3843302-0&#34;&gt;&#xA;&#xA;&lt;article id=&#34;td-card-b3843302-cards-0-0&#34; class=&#34;td-content-card&#34;&gt;&#xA;&lt;div class=&#34;td-content-card__body&#34;&gt;&#xA;&lt;div class=&#34;td-content-card__head&#34;&gt;&lt;a class=&#34;td-content-card__title&#34; href=&#34;https://sow.pgsty.com/docs/tutorial/yum-repo/&#34;&gt;Build a YUM Repository&lt;/a&gt;&lt;/div&gt;&#xA;&lt;div class=&#34;td-content-card__description&#34;&gt;&lt;p&gt;A managed RPM repository with per-architecture views, &lt;code&gt;noarch&lt;/code&gt; projection, debuginfo filtering,&#xA;version limits, and a working &lt;code&gt;dnf&lt;/code&gt; client configuration.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/article&gt;&#xA;&lt;article id=&#34;td-card-b3843302-cards-0-1&#34; class=&#34;td-content-card&#34;&gt;&#xA;&lt;div class=&#34;td-content-card__body&#34;&gt;&#xA;&lt;div class=&#34;td-content-card__head&#34;&gt;&lt;a class=&#34;td-content-card__title&#34; href=&#34;https://sow.pgsty.com/docs/tutorial/apt-repo/&#34;&gt;Build an APT Repository&lt;/a&gt;&lt;/div&gt;&#xA;&lt;div class=&#34;td-content-card__description&#34;&gt;&lt;p&gt;A managed DEB repository with a Debian-style pool, &lt;code&gt;by-hash&lt;/code&gt; indexes, and a deb822 client&#xA;configuration.&lt;/p&gt;</description>
      </item>
    <item>
        <title>Sign Your Repository</title>
        <link>https://sow.pgsty.com/docs/tutorial/signing/</link>
        <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
        
        <guid>https://sow.pgsty.com/docs/tutorial/signing/</guid>
        <description>&lt;p&gt;SOW has two independent signing paths:&lt;/p&gt;&#xA;&lt;div class=&#34;td-table-scroll td-table-scroll--static&#34;&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;th scope=&#34;col&#34;&gt;Path&lt;/th&gt;&#xA;      &lt;th scope=&#34;col&#34;&gt;Output&lt;/th&gt;&#xA;      &lt;th scope=&#34;col&#34;&gt;Client control&lt;/th&gt;&#xA;    &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;td&gt;RPM metadata&lt;/td&gt;&#xA;      &lt;td&gt;&lt;code&gt;repodata/repomd.xml.asc&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;td&gt;&lt;code&gt;repo_gpgcheck=1&lt;/code&gt;&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;td&gt;APT metadata&lt;/td&gt;&#xA;      &lt;td&gt;&lt;code&gt;InRelease&lt;/code&gt; and &lt;code&gt;Release.gpg&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;td&gt;&lt;code&gt;Signed-By&lt;/code&gt;&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;td&gt;RPM package body&lt;/td&gt;&#xA;      &lt;td&gt;embedded RPM signature&lt;/td&gt;&#xA;      &lt;td&gt;&lt;code&gt;gpgcheck=1&lt;/code&gt;&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;APT trusts package hashes through the signed &lt;code&gt;Release&lt;/code&gt;; SOW does not re-sign DEB package&#xA;bodies. Start with metadata signing. Add RPM package signing only when you own the signing&#xA;policy for those package bytes.&lt;/p&gt;&#xA;&lt;h2 id=&#34;1-create-a-dedicated-key&#34;&gt;1. Create a dedicated key&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;The commands below create an unencrypted example key. Use a protected key and a&#xA;&lt;code&gt;passphrase&lt;/code&gt; reference for production; see the &lt;a href=&#34;https://sow.pgsty.com/docs/reference/config/#passphrase-references&#34;&gt;configuration reference&lt;/a&gt;.&lt;/p&gt;</description>
      </item>
    <item>
        <title>Serve and Publish Repositories</title>
        <link>https://sow.pgsty.com/docs/tutorial/serving/</link>
        <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
        
        <guid>https://sow.pgsty.com/docs/tutorial/serving/</guid>
        <description>&lt;p&gt;SOW writes static files; it is not an HTTP server. This guide keeps the writable Workspace&#xA;separate from the path Nginx serves.&lt;/p&gt;&#xA;&lt;h2 id=&#34;public-and-private-paths&#34;&gt;Public and private paths&#xA;&lt;/h2&gt;&#xA;&lt;div class=&#34;td-table-scroll td-table-scroll--static&#34;&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;th scope=&#34;col&#34;&gt;Mode&lt;/th&gt;&#xA;      &lt;th scope=&#34;col&#34;&gt;Public unit&lt;/th&gt;&#xA;      &lt;th scope=&#34;col&#34;&gt;Never serve&lt;/th&gt;&#xA;    &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;td&gt;Plain&lt;/td&gt;&#xA;      &lt;td&gt;the directory passed to &lt;code&gt;sow create&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;td&gt;transient &lt;code&gt;.sow-plain-stage-*&lt;/code&gt; output; no durable journal&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;td&gt;Managed&lt;/td&gt;&#xA;      &lt;td&gt;one Repository&amp;rsquo;s complete &lt;code&gt;pool/ + dists/&lt;/code&gt; tree&lt;/td&gt;&#xA;      &lt;td&gt;Workspace &lt;code&gt;sow.yml&lt;/code&gt;, &lt;code&gt;.sow/&lt;/code&gt;, SQLite, locks, journals, staging&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;For the workspace in &lt;a href=&#34;https://sow.pgsty.com/docs/start/workspace/&#34;&gt;First Workspace&lt;/a&gt;, the source Repository is&#xA;&lt;code&gt;/srv/sow/local&lt;/code&gt;. Do not make &lt;code&gt;/srv/sow&lt;/code&gt; the document root.&lt;/p&gt;</description>
      </item>
    <item>
        <title>Build the pigsty-infra Repository</title>
        <link>https://sow.pgsty.com/docs/tutorial/infra-repo/</link>
        <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
        
        <guid>https://sow.pgsty.com/docs/tutorial/infra-repo/</guid>
        <description>&lt;p&gt;&lt;a href=&#34;https://github.com/pgsty/infra-pkg&#34;&gt;&lt;code&gt;pgsty/infra-pkg&lt;/code&gt;&lt;/a&gt; is the upstream build source for Pigsty Infra packages.&#xA;This tutorial assumes the dual-architecture RPMs and DEBs already exist and covers the second half of the job: turning that pile of packages into a real, consumable, maintainable SOW repository named &lt;code&gt;infra&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;1-put-the-packages-under-repo&#34;&gt;1. Put the packages under ~/repo&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;This tutorial uses the fixed path &lt;code&gt;~/repo&lt;/code&gt; throughout. Copy the existing packages into two input directories:&lt;/p&gt;&#xA;&lt;div class=&#34;td-code td-code--untitled&#34; id=&#34;td-code-df876e1d-fence-0&#34; data-td-code data-td-code-auto-id&#xA;     data-td-language=&#34;bash&#34; data-td-line-count=&#34;3&#34;&gt;&#xA;  &lt;div class=&#34;td-code__viewport&#34; id=&#34;td-code-df876e1d-fence-0-viewport&#34; data-td-code-viewport&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mkdir -p ~/repo/packages/rpm ~/repo/packages/deb&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cp ~/pgsty/infra-pkg/dist/rpm/*.rpm ~/repo/packages/rpm/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cp ~/pgsty/infra-pkg/dist/deb/*.deb ~/repo/packages/deb/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Confirm that all four format-by-architecture cells contain real payloads:&lt;/p&gt;</description>
      </item>
    
  </channel>
</rss>
