Skip to content

Commit

Permalink
ZCS-14464:Install p7zip-plugins from EPEL repo (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
umagmrit committed May 2, 2024
1 parent d81c0f6 commit 7909592
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
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 @@ -2497,6 +2497,7 @@ getInstallPackages() {
if [ x"$ZMTYPE_INSTALLABLE" = "xNETWORK" ]; then
selectChatVideo
fi
isp7zipRequired
checkRequiredSpace

isInstalled zimbra-store
Expand All @@ -2515,6 +2516,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

0 comments on commit 7909592

Please sign in to comment.