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

ZCS-14464:Install p7zip-plugins from EPEL repo for RHEL9 #270

Merged
merged 1 commit into from
Feb 15, 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
1 change: 1 addition & 0 deletions rpmconf/Install/Util/modules/packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ installPackages() {
fi

removeExistingInstall
installEPELRepo

if [ "${#repo_pkg_names[@]}" -gt 0 ]
then
Expand Down
78 changes: 78 additions & 0 deletions rpmconf/Install/Util/utilfunc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2502,6 +2502,7 @@ getInstallPackages() {
if [ x"$ZMTYPE_INSTALLABLE" = "xNETWORK" ]; then
selectChatVideo
fi
isp7zipRequired
checkRequiredSpace

isInstalled zimbra-store
Expand All @@ -2520,6 +2521,83 @@ getInstallPackages() {
done
}

isp7zipRequired() {
P7ZIPREQUIRED=no
if [[ $MTA_SELECTED == "yes" && $PLATFORM = "RHEL9_64" ]]; then
isInstalled p7zip-plugins
if [ x$PKGINSTALLED = "x" ]; then
askYN "Install p7zip-plugins from epel-release repository (without p7zip-plugins, some decoders for Amavis may not be available)." "Y"
if [ $response = "yes" ]; then
P7ZIPREQUIRED=yes
fi
fi
fi
}

installEPELRepo() {
if [ $P7ZIPREQUIRED = "yes" ]; then
OS_NAME=`grep -E '^(NAME)=' /etc/os-release | cut -d = -f 2 | tr -d '"'`
case "$OS_NAME" in
"Red Hat"*)
isInstalled epel-release-latest-9
if [ x$PKGINSTALLED = "x" ]; then
echo -n "Installing epel-release-latest-9..."
if ! yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y >>$LOGFILE 2>&1 ; then
echo "failed to install epel-release."
exit 1
else
echo "done."
fi
fi
echo -n "Installing p7zip-plugins..."
if ! yum install p7zip-plugins --enablerepo=epel -y >>$LOGFILE 2>&1 ; then
echo "failed to install p7zip-plugins."
exit 1
else
echo "done."
fi
;;
"Oracle"*)
isInstalled oracle-epel-release-el9
if [ x$PKGINSTALLED = "x" ]; then
echo -n "Installing oracle-epel-release-el9..."
if ! yum install oracle-epel-release-el9 -y >>$LOGFILE 2>&1 ; then
echo "failed to install epel-release."
exit 1
else
echo "done."
fi
fi
echo -n "Installing p7zip-plugins..."
if ! yum install p7zip-plugins --enablerepo=ol9_developer_EPEL -y >>$LOGFILE 2>&1 ; then
echo "failed to install p7zip-plugins."
exit 1
else
echo "done."
fi
;;
"Rocky"*|"CentOS"*)
isInstalled epel-release
if [ x$PKGINSTALLED = "x" ]; then
echo -n "Installing epel-release..."
if ! yum install epel-release -y > /dev/null >>$LOGFILE 2>&1 ; then
echo "failed to install epel-release."
exit 1
else
echo "done."
fi
fi
echo -n "Installing p7zip-plugins..."
if ! yum install p7zip-plugins --enablerepo=epel -y >>$LOGFILE 2>&1; then
echo "failed to install p7zip-plugins."
exit 1
else
echo "done."
fi
;;
esac
fi
}
selectChatVideo() {
# install chat-video extension and chat-video classic, modern zimlets
if [ $STORE_SELECTED = "yes" ] ; then
Expand Down