diff --git a/Containerfile.base b/Containerfile.base index 4bc8fed..5d15e2c 100644 --- a/Containerfile.base +++ b/Containerfile.base @@ -8,6 +8,11 @@ FROM quay.io/fedora/fedora-bootc:45 COPY --from=nushell /usr/bin/nu /usr/bin/nu RUN printf '/bin/nu\n/usr/bin/nu\n' >> /etc/shells +# Weekly bootc update fetch +COPY systemd/bootc-fetch-updates.service /usr/lib/systemd/system/ +COPY systemd/bootc-fetch-updates.timer /usr/lib/systemd/system/ +RUN systemctl enable bootc-fetch-updates.timer + COPY yum-repos/custom.repo /etc/yum.repos.d/custom.repo RUN --mount=type=bind,from=ctx,source=/,target=/ctx \ diff --git a/Containerfile.desktop b/Containerfile.desktop index 5e6af24..27f0861 100644 --- a/Containerfile.desktop +++ b/Containerfile.desktop @@ -8,6 +8,11 @@ FROM quay.io/fedora/fedora-kinoite:45 COPY --from=nushell /usr/bin/nu /usr/bin/nu RUN printf '/bin/nu\n/usr/bin/nu\n' >> /etc/shells +# Weekly bootc update fetch +COPY systemd/bootc-fetch-updates.service /usr/lib/systemd/system/ +COPY systemd/bootc-fetch-updates.timer /usr/lib/systemd/system/ +RUN systemctl enable bootc-fetch-updates.timer + COPY yum-repos/custom.repo /etc/yum.repos.d/custom.repo RUN --mount=type=bind,from=ctx,source=/,target=/ctx \ diff --git a/Containerfile.laptop b/Containerfile.laptop index 5a5f23e..8c71639 100644 --- a/Containerfile.laptop +++ b/Containerfile.laptop @@ -10,6 +10,11 @@ COPY dracut.conf /usr/lib/dracut/dracut.conf.d/50-custom-ostree.conf COPY --from=nushell /usr/bin/nu /usr/bin/nu RUN printf '/bin/nu\n/usr/bin/nu\n' >> /etc/shells +# Weekly bootc update fetch +COPY systemd/bootc-fetch-updates.service /usr/lib/systemd/system/ +COPY systemd/bootc-fetch-updates.timer /usr/lib/systemd/system/ +RUN systemctl enable bootc-fetch-updates.timer + COPY yum-repos/custom.repo /etc/yum.repos.d/custom.repo RUN --mount=type=bind,from=ctx,source=/,target=/ctx \ diff --git a/systemd/bootc-fetch-updates.service b/systemd/bootc-fetch-updates.service new file mode 100644 index 0000000..199faff --- /dev/null +++ b/systemd/bootc-fetch-updates.service @@ -0,0 +1,8 @@ +[Unit] +Description=Fetch bootc updates +Documentation=man:bootc(8) +ConditionPathExists=/run/ostree-booted + +[Service] +Type=oneshot +ExecStart=/usr/bin/bootc upgrade --quiet diff --git a/systemd/bootc-fetch-updates.timer b/systemd/bootc-fetch-updates.timer new file mode 100644 index 0000000..5f8e0e4 --- /dev/null +++ b/systemd/bootc-fetch-updates.timer @@ -0,0 +1,12 @@ +[Unit] +Description=Weekly bootc update fetch +Documentation=man:bootc(8) +ConditionPathExists=/run/ostree-booted + +[Timer] +OnCalendar=Mon +Persistent=true +RandomizedDelaySec=15min + +[Install] +WantedBy=timers.target