Skip to content

Commit

Permalink
migrates vso container to debian sid repos
Browse files Browse the repository at this point in the history
  • Loading branch information
taukakao committed Nov 29, 2024
1 parent ea324e9 commit b4e8619
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
10 changes: 10 additions & 0 deletions includes.container/usr/lib/systemd/user/vso-migrate-repo.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=VSO Repo migration
After=vso-pre-run.service

[Service]
Type=oneshot
ExecStart=/usr/bin/bash /usr/libexec/vso/migrate-repo

[Install]
WantedBy=default.target
2 changes: 2 additions & 0 deletions includes.container/usr/lib/systemd/user/vso-pre-run.service
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[Unit]
Description=VSO Shell Pre-Run
After=podman.service podman-restart.service podman-auto-update.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/bin/wait-for-connection
ExecStart=/usr/bin/vso run -n -- echo vso container started

Expand Down
5 changes: 5 additions & 0 deletions includes.container/usr/libexec/vso/debian.sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Types: deb
URIs: http://deb.debian.org/debian
Suites: sid
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
11 changes: 11 additions & 0 deletions includes.container/usr/libexec/vso/migrate-repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

/usr/share/apx/distrobox/distrobox enter --name apx-vso-pico -- ls /etc/apt/sources.list.d/debian.sources
if [ "$?" -ne 2 ]; then
echo "already migrated"
exit 0
fi

set -e
/usr/share/apx/distrobox/distrobox enter --name apx-vso-pico -- sudo cp /run/host/usr/libexec/vso/debian.sources /etc/apt/sources.list.d/debian.sources
/usr/share/apx/distrobox/distrobox enter --name apx-vso-pico -- sudo rm /etc/apt/sources.list.d/vanilla-base.sources
1 change: 1 addition & 0 deletions modules/00-vanilla-system-operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,5 @@ modules:
- ln -s /usr/lib/systemd/system/vanilla-updates.timer /etc/systemd/system/timers.target.wants/vanilla-updates.timer
- mkdir -p /usr/lib/systemd/user/default.target.wants
- ln -s /usr/lib/systemd/user/vso-pre-run.service /usr/lib/systemd/user/default.target.wants/vso-pre-run.service
- ln -s /usr/lib/systemd/user/vso-migrate-repo.service /usr/lib/systemd/user/default.target.wants/vso-migrate-repo.service
- ln -s /usr/lib/systemd/user/vso-tasks-rotation.service /usr/lib/systemd/user/default.target.wants/vso-tasks-rotation.service

0 comments on commit b4e8619

Please sign in to comment.