Skip to content

Commit

Permalink
feat: add tuned-ppd, use systemctl enable --offline
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Brue <ryanbrue@gmail.com>
  • Loading branch information
ryanabx committed Jul 26, 2024
1 parent 2ac8dd9 commit d5a4ba5
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@ ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
COPY greetd-workaround.service /usr/lib/systemd/system/greetd-workaround.service

# Build in one step
RUN bash -c "if [[ ${FEDORA_MAJOR_VERSION} == "rawhide" ]]; then \
# Install tuned/tuned-ppd if the image is a base one
RUN if [[ "${FEDORA_MAJOR_VERSION}" == "rawhide" ]]; then \
curl -Lo /etc/yum.repos.d/_copr_ryanabx-cosmic.repo \
https://copr.fedorainfracloud.org/coprs/ryanabx/cosmic-epoch/repo/fedora-rawhide/ryanabx-cosmic-epoch-fedora-rawhide.repo \
;else curl -Lo /etc/yum.repos.d/_copr_ryanabx-cosmic.repo \
https://copr.fedorainfracloud.org/coprs/ryanabx/cosmic-epoch/repo/fedora-$(rpm -E %fedora)/ryanabx-cosmic-epoch-fedora-$(rpm -E %fedora).repo \
; fi" && \
; else curl -Lo /etc/yum.repos.d/_copr_ryanabx-cosmic.repo \
https://copr.fedorainfracloud.org/coprs/ryanabx/cosmic-epoch/repo/fedora-$(rpm -E %fedora)/ryanabx-cosmic-epoch-fedora-$(rpm -E %fedora).repo \
; fi && \
if [[ "${SOURCE_IMAGE}" == "~base" ]]; then \
rpm-ostree install tuned-ppd && \
systemctl enable tuned && \
systemctl enable tuned-ppd \
; fi && \
rpm-ostree install \
cosmic-desktop && \
rpm-ostree remove --idempotent \
power-profiles-daemon && \
rpm-ostree install \
tuned \
gnome-keyring && \
rm -f /etc/systemd/system/display-manager.service && \
ln -s /usr/lib/systemd/system/cosmic-greeter.service /etc/systemd/system/display-manager.service && \
ln -s /usr/lib/systemd/system/greetd-workaround.service /etc/systemd/system/multi-user.target.wants/greetd-workaround.service && \
systemctl enable --force cosmic-greeter && \
systemctl enable --force greetd-workaround && \
ostree container commit && \
mkdir -p /var/tmp && chmod -R 1777 /var/tmp

0 comments on commit d5a4ba5

Please sign in to comment.