Skip to content

Commit

Permalink
fedora: Adjust for DNF5
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed Jan 7, 2025
1 parent cc00270 commit e89bbd5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
10 changes: 7 additions & 3 deletions dnf-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sudo dnf install -y \
glibc-langpack-en glibc-all-langpacks \
rpl psmisc procps-ng \
bash-completion \
dnf-automatic dnf-plugins-core \
dnf-automatic dnf5-plugin-automatic dnf-plugins-core dnf5-plugins \
golang git htop \
java-21-openjdk-devel java-21-openjdk-src java-21-openjdk-javadoc java-21-openjdk-javadoc-zip java-21-openjdk-jmods \
trash-cli ShellCheck tmux wipe wl-clipboard \
Expand Down Expand Up @@ -53,12 +53,16 @@ sudo dnf install 'dnf-command(config-manager)'
sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
sudo dnf install -y gh

sudo echo '[commands]
apply_updates = yes
' | sudo tee -a /etc/dnf/automatic.conf

# Also in setup.sh
if [ $(ps --no-headers -o comm 1) = "systemd" ]; then
sudo systemctl enable --now dnf-automatic-install.timer
sudo systemctl enable --now dnf5-automatic.timer
systemctl status dnf-automatic-install.timer
else
echo "Not enabling dnf-automatic-install.timer, because no systemd"
echo "Not enabling dnf5-automatic.timer, because no systemd"
fi

./flatpack-install.sh
Expand Down
15 changes: 11 additions & 4 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@ set -euxo pipefail

# *install.sh package and other software installation, this is config (non-UI only; UI is in gnome-settings.sh)

if [ -e /usr/bin/dnf ]; then
sudo dnf install -y dnf-automatic podman-docker toolbox
if [ -e /usr/bin/dnf5 ]; then
sudo dnf install -y dnf5-plugin-automatic podman-docker toolbox

# also in dnf-install.sh
sudo systemctl enable --now dnf-automatic-install.timer
sudo systemctl enable --now dnf5-automatic.timer

sudo loginctl enable-linger $USER
sudo echo '[commands]
apply_updates = yes
' | sudo tee -a /etc/dnf/automatic.conf

else
echo "Not enabling dnf5-automatic.timer, because no /usr/bin/dnf5"
fi

sudo loginctl enable-linger $USER

# also used in container/sshd/Dockerfile
sudo cp container/sshd/01-local.conf /etc/ssh/sshd_config.d/
sudo systemctl enable --now sshd
Expand Down

0 comments on commit e89bbd5

Please sign in to comment.