<feed xmlns='http://www.w3.org/2005/Atom'>
<title>s6-rc/src/repo/s6rc_repo_setcopy.c, branch main</title>
<subtitle>The skarnet.org service manager</subtitle>
<id>https://git.skarnet.org/cgit/s6-rc/atom/src/repo/s6rc_repo_setcopy.c?h=main</id>
<link rel='self' href='https://git.skarnet.org/cgit/s6-rc/atom/src/repo/s6rc_repo_setcopy.c?h=main'/>
<link rel='alternate' type='text/html' href='https://git.skarnet.org/cgit/s6-rc/'/>
<updated>2026-10-02T02:22:28Z</updated>
<entry>
<title> First part of the format-upgrade support in repo</title>
<updated>2026-10-02T02:22:28Z</updated>
<author>
<name>Laurent Bercot</name>
<email>ska-skaware@skarnet.org</email>
</author>
<published>2026-10-02T02:22:28Z</published>
<link rel='alternate' type='text/html' href='https://git.skarnet.org/cgit/s6-rc/commit/?id=7c93a058c8d7e21aea2aad8f3114c8422bf6faf7'/>
<id>urn:sha1:7c93a058c8d7e21aea2aad8f3114c8422bf6faf7</id>
<content type='text'>
 In order to work across major bumps, we need to add a call to
s6-rc-format-upgrade before s6-rc-update in the s6-rc-set-install
sequence of commands.
 s6-rc-format-upgrade only works when the db is exactly the same
across s6-rc versions. That means we need to have the source version
of the current live set at all times, in order to compile it with
the new s6-rc version before upgrading and then updating.
 So:
 1. we take a snapshot of the source version of a set every time
we commit.
 2. we refuse to install if we don't have the snapshot.
 3. we add s6-rc-format-upgrade to the processing chain
 4. for cleanup: after installing, we delete all the snapshots of
the set except the one that corresponds to the newly
installed live set.

 This commit implements 1: taking the snapshot. It's a regular
s6-rc-set-copy, using an internal name. We refactor
s6-rc-set-copy and s6-rc-set-delete to have primitives we can
use internally.

 Wait for later commits before using repo, else you'll fill
your repository with snapshots that won't get cleaned up.

 TBD: how to store the s6-rc version in the compiled db. We
probably need to add a small file in there.
</content>
</entry>
</feed>
