Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added DNF configuration and Multimedia Support for fedora and other Redhat Distros #438

Merged
merged 8 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions tabs/system-setup/fedora/configure-dnf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh -e

. ../../common-script.sh

configureDNF() {
case $PACKAGER in
dnf)
printf "%b\n" ${YELLOW}"Configuring DNF...${RC}"
$ESCALATION_TOOL sed -i '/^max_parallel_downloads=/c\max_parallel_downloads=10' /etc/dnf/dnf.conf || echo 'max_parallel_downloads=10' >> /etc/dnf/dnf.conf
echo "fastestmirror=True" | $ESCALATION_TOOL tee -a /etc/dnf/dnf.conf > /dev/null
echo "defaultyes=True" | $ESCALATION_TOOL tee -a /etc/dnf/dnf.conf > /dev/null
$ESCALATION_TOOL "$PACKAGER" -y install dnf-plugins-core
printf "%b\n" "${GREEN}DNF Configured Succesfully...${RC}"
;;
*)
printf "%b\n" "${RED}Unsupported distribution: $DTYPE${RC}"
;;
esac
}

checkEnv
checkEscalationTool
configureDNF
26 changes: 26 additions & 0 deletions tabs/system-setup/fedora/multimedia-codecs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh -e

. ../../common-script.sh

multimedia() {
case $PACKAGER in
dnf)
if [ -e /etc/yum.repos.d/rpmfusion-free.repo ] && [ -e /etc/yum.repos.d/rpmfusion-nonfree.repo ]; then
printf "%b\n" "${YELLOW}Installing Multimedia Codecs...${RC}"
$ESCALATION_TOOL "$PACKAGER" swap ffmpeg-free ffmpeg --allowerasing -y
$ESCALATION_TOOL "$PACKAGER" update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin -y
$ESCALATION_TOOL "$PACKAGER" update @sound-and-video -y
printf "%b\n" "${GREEN}Multimedia Codecs Installed...${RC}"
else
printf "%b\n" "${RED}RPM Fusion repositories not found. Please set up RPM Fusion first!${RC}"
fi
;;
*)
printf "%b\n" "${RED}Unsupported distribution: $DTYPE${RC}"
;;
esac
}

checkEnv
checkEscalationTool
multimedia
3 changes: 2 additions & 1 deletion tabs/system-setup/fedora/rpm-fusion-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ installRPMFusion() {
fi
;;
*)
echo "Unsupported distribution: $DTYPE"
printf "%b\n" "${RED}Unsupported distribution: $DTYPE${RC}"
;;
esac
}

checkEnv
checkEscalationTool
installRPMFusion
8 changes: 8 additions & 0 deletions tabs/system-setup/tab_data.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ values = ["dnf"]
name = "RPM Fusion Setup"
script = "fedora/rpm-fusion-setup.sh"

[[data.entries]]
name = "Configure DNF"
script = "fedora/configure-dnf.sh"

[[data.entries]]
name = "Multimedia Setup"
script = "fedora/multimedia-codecs.sh"

[[data]]
name = "Full System Update"
script = "system-update.sh"
Expand Down