<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>standard-repository on SOW</title>
    <link>https://sow.pgsty.com/zh/tags/standard-repository/</link>
    <description>Recent content in standard-repository on SOW</description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    
    
    
      <lastBuildDate>Wed, 02 Dec 2026 10:23:33 +0800</lastBuildDate>
    
    
      <atom:link href="https://sow.pgsty.com/zh/tags/standard-repository/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
        <title>sow build</title>
        <link>https://sow.pgsty.com/zh/docs/command/build/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/command/build/</guid>
        <description>&lt;p&gt;&lt;code&gt;sow build&lt;/code&gt; 重新应用当前的 &lt;code&gt;limit&lt;/code&gt; 与 &lt;code&gt;exclude&lt;/code&gt; 策略，为受影响的 Dist 生成索引和已配置的签名。软件包在 &lt;code&gt;pool/&lt;/code&gt; 就位后，SOW 逐个原子切换 Dist 目录，完成后记录仓库的构建快照（Generation）。&lt;code&gt;add&lt;/code&gt; 和 &lt;code&gt;rm&lt;/code&gt; 默认会自动构建。使用 &lt;code&gt;add --skip&lt;/code&gt;、&lt;code&gt;rm --skip&lt;/code&gt;，修改工作区配置，或需要继续中断的构建时，可以手动运行 &lt;code&gt;sow build&lt;/code&gt;。交付前运行 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/check/&#34;&gt;&lt;code&gt;sow check&lt;/code&gt;&lt;/a&gt;。&lt;/p&gt;</description>
      </item>
    <item>
        <title>sow status</title>
        <link>https://sow.pgsty.com/zh/docs/command/status/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/command/status/</guid>
        <description>&lt;p&gt;&lt;code&gt;sow status&lt;/code&gt; 告诉你仓库是否需要构建、待构建区里有多少数据，以及是否有写操作持有锁。它只读已记录的状态，&#xA;从不计算包文件哈希，开销很小，适合在每次构建前或监控循环里运行。需要校验文件本身时，用&#xA;&lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/check/&#34;&gt;&lt;code&gt;sow check&lt;/code&gt;&lt;/a&gt;。&lt;/p&gt;</description>
      </item>
    <item>
        <title>sow where</title>
        <link>https://sow.pgsty.com/zh/docs/command/where/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/command/where/</guid>
        <description>&lt;p&gt;&lt;code&gt;sow where&lt;/code&gt; 回答“这个包在工作区里的哪些仓库、哪些 Dist 中”。删除或替换一个被多个仓库共用的包之前，&#xA;或者想确认 &lt;code&gt;add&lt;/code&gt; 是否放到了预期位置时，用它查一下。与 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/show/&#34;&gt;&lt;code&gt;sow show&lt;/code&gt;&lt;/a&gt; 不同，&#xA;它默认搜索全部仓库，输出的是位置，而不是完整的软件包记录。&lt;/p&gt;</description>
      </item>
    <item>
        <title>sow show</title>
        <link>https://sow.pgsty.com/zh/docs/command/show/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/command/show/</guid>
        <description>&lt;p&gt;&lt;code&gt;sow show&lt;/code&gt; 输出 SOW 对仓库中某个软件包所掌握的信息：精确坐标与 SHA-256、包文件在包池中的位置，&#xA;以及哪些 Dist 在期望状态和当前构建中收录了它。手里只有包名、需要精确引用时用它；想弄清某个包为什么&#xA;在（或不在）索引里，也用它。要一次搜索全部仓库，用 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/where/&#34;&gt;&lt;code&gt;sow where&lt;/code&gt;&lt;/a&gt;；要列出&#xA;整个 Dist，用 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/ls/&#34;&gt;&lt;code&gt;sow ls&lt;/code&gt;&lt;/a&gt;。&lt;/p&gt;</description>
      </item>
    <item>
        <title>sow ls</title>
        <link>https://sow.pgsty.com/zh/docs/command/ls/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/command/ls/</guid>
        <description>&lt;p&gt;&lt;code&gt;sow ls&lt;/code&gt; 列出所选 Dist 的期望成员，并对每个包说明哪些 Dist 想要它、哪些 Dist 在当前构建快照中已经包含它。&#xA;需要为 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/show/&#34;&gt;&lt;code&gt;show&lt;/code&gt;&lt;/a&gt; 或 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/rm/&#34;&gt;&lt;code&gt;rm&lt;/code&gt;&lt;/a&gt; 复制精确引用，或者想找出还在等待构建的包时，就用它。&#xA;要在整个工作区里查找某个包，用 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/where/&#34;&gt;&lt;code&gt;sow where&lt;/code&gt;&lt;/a&gt;。&lt;/p&gt;</description>
      </item>
    <item>
        <title>sow rm</title>
        <link>https://sow.pgsty.com/zh/docs/command/rm/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/command/rm/</guid>
        <description>&lt;p&gt;&lt;code&gt;sow rm&lt;/code&gt; 把软件包从所选 Dist 的期望成员中移除，并重建这些 Dist 的本地索引。需要撤下有问题或不再需要的包时就用它：&#xA;可以先用 &lt;code&gt;--check&lt;/code&gt; 预览结果，也可以用 &lt;code&gt;--skip&lt;/code&gt; 暂存多次移除、最后统一构建。包文件仍留在 &lt;code&gt;pool/&lt;/code&gt; 中，因为其他 Dist 或被保留的构建快照&#xA;可能还在用它们，直到 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/gc/&#34;&gt;&lt;code&gt;sow gc&lt;/code&gt;&lt;/a&gt; 能够回收为止。要删除整个 Dist，用 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/dist/#sow-dist-rm&#34;&gt;&lt;code&gt;sow dist rm&lt;/code&gt;&lt;/a&gt;。&lt;/p&gt;</description>
      </item>
    <item>
        <title>sow add</title>
        <link>https://sow.pgsty.com/zh/docs/command/add/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/command/add/</guid>
        <description>&lt;p&gt;软件包通过 &lt;code&gt;sow add&lt;/code&gt; 进入&lt;a href=&#34;https://sow.pgsty.com/zh/docs/start/concepts/#plain-or-managed&#34;&gt;标准仓库&lt;/a&gt;。它从包头读取每个文件的格式和架构，把文件在仓库包池中只存一份，&#xA;加入所选 Dist 的期望成员，应用各 Dist 的 &lt;code&gt;exclude&lt;/code&gt; 与 &lt;code&gt;limit&lt;/code&gt; 策略，然后构建这些 Dist 的本地索引。&#xA;要分几批导入、最后统一构建，使用 &lt;code&gt;--skip&lt;/code&gt;；之后运行 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/publish/&#34;&gt;&lt;code&gt;sow publish&lt;/code&gt;&lt;/a&gt; 更新远程目标。&#xA;只想就地给一个软件包目录建索引、不需要工作区时，改用 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/create/&#34;&gt;&lt;code&gt;sow create&lt;/code&gt;&lt;/a&gt;。&lt;/p&gt;</description>
      </item>
    <item>
        <title>演练构建 pigsty-infra 仓库</title>
        <link>https://sow.pgsty.com/zh/docs/tutorial/infra-repo/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/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; 为 x86-64 与 ARM64 构建 Pigsty Infra 的 RPM 与 DEB 软件包。&#xA;这些包的用户需要三类频道：随新版本滚动的 &lt;em&gt;latest&lt;/em&gt;，只在你明确晋升版本时才变化的 &lt;em&gt;stable&lt;/em&gt;，以及内容固定不变的 &lt;em&gt;月度快照&lt;/em&gt;。&#xA;本教程用已构建的软件包把 &lt;code&gt;infra&lt;/code&gt; 搭建成一个&lt;a href=&#34;https://sow.pgsty.com/zh/docs/start/concepts/#plain-or-managed&#34;&gt;标准仓库&lt;/a&gt;。每个频道是一对 Dist，每种格式一个；Dist 是带有自己索引的软件包集合，&#xA;所有 Dist 共用同一个包池。容器中真实的 &lt;code&gt;dnf&lt;/code&gt; 与 &lt;code&gt;apt&lt;/code&gt; 客户端会验证每个阶段。&lt;/p&gt;</description>
      </item>
    <item>
        <title>成员策略</title>
        <link>https://sow.pgsty.com/zh/docs/feature/policy/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/feature/policy/</guid>
        <description>&lt;p&gt;上游构建产物里通常有一些你并不想发布的包：&lt;code&gt;-debuginfo&lt;/code&gt; 与 &lt;code&gt;-debugsource&lt;/code&gt; RPM、PostgreSQL 的 &lt;code&gt;-llvmjit&lt;/code&gt; 子包、&#xA;Debian 的 &lt;code&gt;-dbgsym&lt;/code&gt; 包。另一方面，一个持续加包的仓库会把收到过的每个版本都留着，客户端每次下载的索引也就随着每次发版越来越大。&#xA;在&lt;a href=&#34;https://sow.pgsty.com/zh/docs/start/concepts/#plain-or-managed&#34;&gt;标准仓库&lt;/a&gt;中，每个 Dist（&lt;code&gt;el9&lt;/code&gt; 这样的具名软件包集合）都有两项设置解决这两个问题：&lt;code&gt;exclude&lt;/code&gt; 剔除匹配规则的包，&lt;code&gt;limit&lt;/code&gt; 让每个包只保留最新的几个版本。&lt;/p&gt;</description>
      </item>
    <item>
        <title>sow dist</title>
        <link>https://sow.pgsty.com/zh/docs/command/dist/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/command/dist/</guid>
        <description>&lt;p&gt;Dist 是客户端眼中的一个发行版，例如 &lt;code&gt;el9&lt;/code&gt; 或 &lt;code&gt;trixie&lt;/code&gt;。它只能是 RPM 或 DEB 中的一种，有自己的架构视图、&#xA;策略（&lt;code&gt;limit&lt;/code&gt;、&lt;code&gt;exclude&lt;/code&gt;）和 &lt;code&gt;dists/&lt;/code&gt; 下的索引，同时与同一个&lt;a href=&#34;https://sow.pgsty.com/zh/docs/feature/managed/&#34;&gt;标准仓库&lt;/a&gt;中的其他 Dist 共用 &lt;code&gt;pool/&lt;/code&gt;。&lt;code&gt;sow dist&lt;/code&gt; 负责创建、列出、查看和删除 Dist。&#xA;要修改 Dist 的架构或策略，编辑 &lt;code&gt;sow.yml&lt;/code&gt;，再运行 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/config/&#34;&gt;&lt;code&gt;sow config check&lt;/code&gt;&lt;/a&gt; 和 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/build/&#34;&gt;&lt;code&gt;sow build&lt;/code&gt;&lt;/a&gt;。&lt;/p&gt;</description>
      </item>
    <item>
        <title>核心概念</title>
        <link>https://sow.pgsty.com/zh/docs/start/concepts/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/start/concepts/</guid>
        <description>&lt;p&gt;SOW 能构建两种仓库，涉及的概念也只有少数几个。读完第一节就足以做出选择；后面几节解释标准仓库是怎么搭起来的，以及为什么这样设计。&lt;/p&gt;&#xA;&lt;p&gt;&lt;span id=&#34;选择模式&#34; data-td-print-local&gt;&lt;/span&gt;&#xA;&lt;span id=&#34;plain-还是-managed&#34; data-td-print-local&gt;&lt;/span&gt;&#xA;&lt;span id=&#34;choose-a-mode&#34; data-td-print-local&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;plain-or-managed&#34;&gt;简易仓库还是标准仓库&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;两种仓库的区别在于：仓库的&amp;quot;真相&amp;quot;保存在哪里。&lt;/p&gt;</description>
      </item>
    <item>
        <title>服务与发布仓库</title>
        <link>https://sow.pgsty.com/zh/docs/tutorial/serving/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/tutorial/serving/</guid>
        <description>&lt;p&gt;把仓库放上 Web 服务器，不只是复制一个目录。更新进行到一半时，客户端可能先读到新索引、而它引用的软件包还没传到；&#xA;也可能还在用缓存的旧索引，而你已经删掉了它引用的软件包。两种情况在 &lt;code&gt;dnf&lt;/code&gt; 和 &lt;code&gt;apt&lt;/code&gt; 里都表现为 404 或校验和错误。&#xA;手写的复制脚本也没法续传上传了一半的内容，更说不清服务器上实际有什么。&lt;/p&gt;</description>
      </item>
    <item>
        <title>sow repo</title>
        <link>https://sow.pgsty.com/zh/docs/command/repo/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/command/repo/</guid>
        <description>&lt;p&gt;&lt;a href=&#34;https://sow.pgsty.com/zh/docs/start/concepts/#plain-or-managed&#34;&gt;标准仓库&lt;/a&gt;是工作区里的一棵目录树，有自己的包池（&lt;code&gt;pool/&lt;/code&gt;）、索引（&lt;code&gt;dists/&lt;/code&gt;）、数据库和构建历史。&#xA;仓库内的各个 Dist 共用包池，所以多个 Dist 用到的同一个包只存一份。&lt;code&gt;sow repo&lt;/code&gt; 负责创建、列出、查看、升级和删除这类仓库。&#xA;需要不同的签名、删除保护或发布目标时，把软件包分到不同仓库；否则就在同一个仓库里用 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/dist/&#34;&gt;&lt;code&gt;sow dist&lt;/code&gt;&lt;/a&gt; 增加 Dist。&lt;/p&gt;</description>
      </item>
    <item>
        <title>功能</title>
        <link>https://sow.pgsty.com/zh/docs/feature/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/feature/</guid>
        <description>&lt;p&gt;生成一次索引并不难，难的是在仓库不断变化时让它始终正确：每天都有新构建进来，旧版本和调试包越积越多，&#xA;同一个包要供好几个发行版使用，客户端要求签名，而且任何一次更新都不能让 &lt;code&gt;dnf&lt;/code&gt; 或 &lt;code&gt;apt&lt;/code&gt; 读到一份包还没到位的索引。&#xA;本节每一页对应其中一个问题，讲清 SOW 怎么处理、为什么这样设计。&lt;/p&gt;</description>
      </item>
    <item>
        <title>第一个标准仓库</title>
        <link>https://sow.pgsty.com/zh/docs/start/workspace/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/start/workspace/</guid>
        <description>&lt;p&gt;本文搭建一个&lt;a href=&#34;https://sow.pgsty.com/zh/docs/start/concepts/#plain-or-managed&#34;&gt;标准仓库&lt;/a&gt;，同时服务两类客户端：EL9 主机通过 YUM 索引访问，Debian 主机通过 APT 索引访问。&#xA;过程中你会看到标准仓库比简易仓库多出的三样东西：具名软件包集合（Dist）、共享包池，以及一份在任何人下载之前就能校验的构建记录。&lt;/p&gt;</description>
      </item>
    <item>
        <title>标准仓库</title>
        <link>https://sow.pgsty.com/zh/docs/feature/managed/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/feature/managed/</guid>
        <description>&lt;p&gt;在简易仓库里，目录中有什么文件，仓库就是什么，这是唯一的事实来源。只要有别的东西负责决定目录里该放什么，这样没问题，&#xA;但它表达不了意图：你没法说“el9 收录这些包，每个包保留最新两个版本”；想移除一个包，就得删掉文件，而缓存了旧索引的客户端可能还在请求它；&#xA;改动之后，也没有任何东西告诉你客户端看到的是不是你想发布的内容。&lt;/p&gt;</description>
      </item>
    <item>
        <title>sow.yml 配置参考</title>
        <link>https://sow.pgsty.com/zh/docs/reference/config/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/reference/config/</guid>
        <description>&lt;p&gt;&lt;code&gt;sow.yml&lt;/code&gt; 是工作区的配置文件，工作区就是存放&lt;a href=&#34;https://sow.pgsty.com/zh/docs/start/concepts/#plain-or-managed&#34;&gt;标准仓库&lt;/a&gt;的目录。它声明有哪些仓库，&#xA;每个仓库提供哪些 Dist、各用什么包策略，索引和软件包怎么签名，构建结果发布到哪里。手工编辑这个文件，或者需要查某个字段的确切默认值、&#xA;校验规则时，查这一页。简易仓库没有配置文件，&lt;code&gt;sow create&lt;/code&gt; 与 &lt;code&gt;sow prune&lt;/code&gt; 从不读取它。&lt;/p&gt;</description>
      </item>
    <item>
        <title>搭建 APT 仓库</title>
        <link>https://sow.pgsty.com/zh/docs/tutorial/apt-repo/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/tutorial/apt-repo/</guid>
        <description>&lt;p&gt;你手上有给 Debian 或 Ubuntu 主机用的 DEB，希望 &lt;code&gt;apt install&lt;/code&gt; 能从自己的仓库安装，更新时的表现也和公共软件源一样可靠。&#xA;本教程构建一个 APT &lt;a href=&#34;https://sow.pgsty.com/zh/docs/start/concepts/#plain-or-managed&#34;&gt;标准仓库&lt;/a&gt;，由 SOW 在工作区中维护：一个名为 &lt;code&gt;trixie&lt;/code&gt; 的 suite，带 &lt;code&gt;amd64&lt;/code&gt; 与 &lt;code&gt;arm64&lt;/code&gt; 两套索引，共用同一个包池；&#xA;以及一个从中安装软件包的 &lt;code&gt;apt&lt;/code&gt; 客户端。&lt;/p&gt;</description>
      </item>
    <item>
        <title>sow init</title>
        <link>https://sow.pgsty.com/zh/docs/command/init/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/command/init/</guid>
        <description>&lt;p&gt;&lt;code&gt;sow init&lt;/code&gt; 把一个目录变成工作区，用来存放一个或多个&lt;a href=&#34;https://sow.pgsty.com/zh/docs/start/concepts/#plain-or-managed&#34;&gt;标准仓库&lt;/a&gt;：它创建私有状态目录 &lt;code&gt;.sow/&lt;/code&gt;，并读取已有的 &lt;code&gt;sow.yml&lt;/code&gt; 或 &lt;code&gt;sow.yaml&lt;/code&gt;。两个配置文件都不存在时，才写入默认的 &lt;code&gt;sow.yml&lt;/code&gt;。&#xA;如果配置里已经声明了仓库和 Dist，它会把缺少的那些创建出来。所以你可以先写好 &lt;code&gt;sow.yml&lt;/code&gt;（或者把它放进版本控制），&#xA;再让 &lt;code&gt;init&lt;/code&gt; 把其中描述的一切建好。它随时可以重复运行。只想给已有工作区加一个仓库或 Dist 时，&#xA;&lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/repo/&#34;&gt;&lt;code&gt;sow repo new&lt;/code&gt;&lt;/a&gt; 和 &lt;a href=&#34;https://sow.pgsty.com/zh/docs/command/dist/&#34;&gt;&lt;code&gt;sow dist new&lt;/code&gt;&lt;/a&gt; 针对单个对象做同样的事。&lt;/p&gt;</description>
      </item>
    <item>
        <title>上手</title>
        <link>https://sow.pgsty.com/zh/docs/start/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/start/</guid>
        <description>&lt;p&gt;这一部分带你从零开始，得到一个 &lt;code&gt;dnf&lt;/code&gt; 和 &lt;code&gt;apt&lt;/code&gt; 能直接安装的软件仓库。SOW 只是一个可执行文件，不需要常驻服务，安装只要一分钟。&#xA;装好以后，按你手头的情况选一条路：&lt;/p&gt;</description>
      </item>
    <item>
        <title>搭建 YUM 仓库</title>
        <link>https://sow.pgsty.com/zh/docs/tutorial/yum-repo/</link>
        
        
        
        <guid>https://sow.pgsty.com/zh/docs/tutorial/yum-repo/</guid>
        <description>&lt;p&gt;你为 EL 主机构建或收集了一批 RPM，希望 &lt;code&gt;dnf install&lt;/code&gt; 能从自己的仓库安装，并且以后每次更新之后也照样能用。&#xA;本教程构建一个 YUM &lt;a href=&#34;https://sow.pgsty.com/zh/docs/start/concepts/#plain-or-managed&#34;&gt;标准仓库&lt;/a&gt;，由 SOW 在工作区中维护：一个名为 &lt;code&gt;el9&lt;/code&gt; 的软件包集合，&#xA;带 &lt;code&gt;x86_64&lt;/code&gt; 与 &lt;code&gt;aarch64&lt;/code&gt; 两套索引，共用同一个包池；一条只保留最新版本、剔除调试包的策略；以及一个从中安装软件包的 &lt;code&gt;dnf&lt;/code&gt; 客户端。&lt;/p&gt;</description>
      </item>
    
  </channel>
</rss>
