aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2026-10-17 04:10:16 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2026-10-17 04:10:16 +0000
commit6ada80ed7e45ed630e4d9877a9b11e2dfddb4758 (patch)
tree61d28af958e9922d1a2380b42b8137a0ac64be51 /src/include
parentdb3fb428599c9c8fe105dcf4ba8d1c914c54cc26 (diff)
downloads6-rc-6ada80ed7e45ed630e4d9877a9b11e2dfddb4758.tar.gz
Third part of the format-upgrade inclusion: add support in s6-rc-set-install
Now that everything is in place, we go for the main thing: add snapshot support to s6-rc-set install. The workflow is: - check the major version of the old db against the current s6-rc - if the old db is up to date, nothing changes - otherwise: + find the snapshot corresponding to the old db + compile it + copy the snapshot db to the bootdir + call s6-rc-format-upgrade on it + atomically switch the bootdb to it. At this point the snapshot is the new bootdb: same as the old db, but with the correct major version. + unconditionally remove the old db + and now we can perform the regular s6-rc-update with the wanted set, since they have the same major. We also add --no-snapshot options to s6-rc-set-commit and s6-rc-set-install, and propagate them in the supporting functions, so users can manually skip all this bloat (and this is important for the initial install). All that remains is cleaning up obsolete snapshots. This will probably go at the end of s6-rc-set-install as well.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/s6-rc/repo.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/s6-rc/repo.h b/src/include/s6-rc/repo.h
index 6c9b17b..5cd5674 100644
--- a/src/include/s6-rc/repo.h
+++ b/src/include/s6-rc/repo.h
@@ -43,7 +43,7 @@ extern int s6rc_repo_lock (char const *, int) ;
extern int s6rc_repo_touch (char const *) ;
extern int s6rc_repo_touchset (char const *, char const *) ;
extern int s6rc_repo_checkset (char const *, char const *) ;
-extern int s6rc_repo_setuptodate (char const *, char const *) ;
+extern int s6rc_repo_setuptodate (char const *, char const *, unsigned int) ;
extern int s6rc_repo_setcopy (char const *, char const *, char const *, unsigned int) ;
extern void s6rc_repo_setdelete (char const *, char const *) ;
@@ -51,9 +51,9 @@ extern int s6rc_repo_makesetbundles (char const *, char const *, unsigned int) ;
extern int s6rc_repo_makedefbundle (char const *, char const *, char const *) ;
#define S6RC_REPO_COMPILE_BUFLEN(repolen, setlen) ((repolen) + (setlen) + 45)
-extern int s6rc_repo_compile (char const *, char const *, char const *const *, uint8_t, char *, unsigned int, char const *, char const *) ;
+extern int s6rc_repo_compile (char const *, char const *, char const *const *, uint8_t, char *, unsigned int, char const *, char const *, char const *, unsigned int) ;
extern int s6rc_repo_refcompile (char const *, char *, unsigned int, char const *) ;
-extern int s6rc_repo_setcompile (char const *, char const *, char const *, char *, unsigned int, char const *, char const *) ;
+extern int s6rc_repo_setcompile (char const *, char const *, char const *, char *, unsigned int, char const *, char const *, unsigned int) ;
extern int s6rc_repo_list_sets (char const *, stralloc *, genalloc *) ;
extern int s6rc_repo_listrx (char const *, char const *, char const *, stralloc *, genalloc *) ;