Skip to content

Commit

Permalink
Merge branch 'hotfix/v3.0.1' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeySafronov committed Nov 28, 2024
2 parents 6ed4ef8 + 23eae24 commit 855a711
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 43 deletions.
2 changes: 1 addition & 1 deletion config/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
"csp": {
"default": {
"def": ["'self'", "data:"],
"script": ["'self'", "'unsafe-inline'", "'unsafe-eval'"],
"script": ["'self'", "'unsafe-inline'", "'unsafe-eval'", "blob:"],
"style": ["'self'", "'unsafe-inline'"],
"img": ["'self'", "data:", "blob:"],
"frame": ["'self'"],
Expand Down
8 changes: 0 additions & 8 deletions install/OneClickInstall/install-RedHat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ RES_QUESTIONS="In case you have any questions contact us via http://support.only
RES_MARIADB="To continue the installation, you need to remove MariaDB"
INSTALL_FLUENT_BIT="true"

res_unsupported_version () {
RES_CHOICE="Please, enter Y or N"
RES_CHOICE_INSTALLATION="Continue installation [Y/N]? "
RES_UNSPPORTED_VERSION="You have an unsupported version of $DIST installed"
RES_SELECT_INSTALLATION="Select 'N' to cancel the ONLYOFFICE installation (recommended). Select 'Y' to continue installing ONLYOFFICE"
RES_ERROR_REMINDER="Please note, that if you continue with the installation, there may be errors"
}

while [ "$1" != "" ]; do
case $1 in

Expand Down
18 changes: 2 additions & 16 deletions install/OneClickInstall/install-RedHat/install-preq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,12 @@ ${package_manager} -y install yum-utils
{ yum check-update postgresql; PSQLExitCode=$?; } || true #Checking for postgresql update
{ yum check-update $DIST*-release; exitCode=$?; } || true #Checking for distribution update

UPDATE_AVAILABLE_CODE=100
if [[ $exitCode -eq $UPDATE_AVAILABLE_CODE ]]; then
res_unsupported_version
echo $RES_UNSPPORTED_VERSION
echo $RES_SELECT_INSTALLATION
echo $RES_ERROR_REMINDER
echo $RES_QUESTIONS
read_unsupported_installation
fi

if rpm -qa | grep mariadb.*config >/dev/null 2>&1; then
echo $RES_MARIADB && exit 0
fi

#Add repositories: EPEL, REMI and RPMFUSION
#Add repository EPEL
[ "$DIST" != "fedora" ] && { rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-$REV.noarch.rpm || true; }
rpm -ivh https://rpms.remirepo.net/$REMI_DISTR_NAME/remi-release-$REV.rpm || true
yum install -y --nogpgcheck https://download1.rpmfusion.org/free/$RPMFUSION_DISTR_NAME/rpmfusion-free-release-$REV.noarch.rpm

[ "$REV" = "9" ] && update-crypto-policies --set DEFAULT:SHA1 && ${package_manager} -y install xorg-x11-font-utils
[ "$DIST" = "centos" ] && TESTING_REPO="--enablerepo=$( [ "$REV" = "9" ] && echo "crb" || echo "powertools" )"
[ "$DIST" = "redhat" ] && { /usr/bin/crb enable && yum repolist enabled | grep -qi -e crb -e codeready || echo "Failed to enable or verify CRB repository."; exit 1; }
Expand Down Expand Up @@ -100,8 +87,7 @@ ${package_manager} -y install $([ $DIST != "fedora" ] && echo "epel-release") \
SDL2 \
expect \
java-${JAVA_VERSION}-openjdk-headless \
ffmpeg \
--enablerepo=opensearch-2.x --enablerepo=remi $TESTING_REPO
--enablerepo=opensearch-2.x $TESTING_REPO

# Set Java ${JAVA_VERSION} as the default version
JAVA_PATH=$(find /usr/lib/jvm/ -name "java" -path "*java-${JAVA_VERSION}*" | head -1)
Expand Down
16 changes: 1 addition & 15 deletions install/OneClickInstall/install-RedHat/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,7 @@ if [ "$SKIP_HARDWARE_CHECK" != "true" ]; then
check_hardware
fi

read_unsupported_installation () {
read -p "$RES_CHOICE_INSTALLATION " CHOICE_INSTALLATION
case "$CHOICE_INSTALLATION" in
y|Y ) yum -y install $DIST*-release
;;

n|N ) exit 0;
;;

* ) echo $RES_CHOICE;
read_unsupported_installation
;;
esac
}

UPDATE_AVAILABLE_CODE=100
DIST=$(rpm -qa --queryformat '%{NAME}\n' | grep -E 'centos-release|redhat-release|fedora-release' | awk -F '-' '{print $1}' | head -n 1)
DIST=${DIST:-$(awk -F= '/^ID=/ {gsub(/"/, "", $2); print tolower($2)}' /etc/os-release)};
[[ "$DIST" =~ ^(centos|redhat|fedora)$ ]] || DIST="centos"
Expand Down
4 changes: 2 additions & 2 deletions install/common/product-configuration
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ setup_openresty(){
PROXY_CONF="${OPENRESTY_DIR}/conf.d/${PACKAGE_SYSNAME}-proxy.conf"
if [ ! -z "${PROXY_CONF}" ]; then
DOMAIN=$(json -f ${USER_CONF} files.docservice.url.portal | awk -F[/:] '{print ($1 == "https") ? $4 : ""}')
CERTIFICATE_PATH=$(grep -oP 'ssl_certificate\s+\K\S+(?=;)' "${PROXY_CONF}")
CERTIFICATE_KEY_PATH=$(grep -oP 'ssl_certificate_key\s+\K\S+(?=;)' "${PROXY_CONF}")
CERTIFICATE_PATH=$(grep -oP 'ssl_certificate\s+\K\S+' "${PROXY_CONF}" | tr -d ';')
CERTIFICATE_KEY_PATH=$(grep -oP 'ssl_certificate_key\s+\K\S+' "${PROXY_CONF}" | tr -d ';')

# (DS v3.0.0) Fix the problem related to environment change
[[ -f "${APP_DIR}/appsettings.production.json" ]] && DOMAIN=${DOMAIN:-$(json -f "$APP_DIR/appsettings.production.json" files.docservice.url.portal | awk -F[/:] '{print ($1 == "https") ? $4 : ""}')}
Expand Down
2 changes: 1 addition & 1 deletion install/rpm/SPECS/package.spec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Summary: Files-services
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-8.0
Requires: ffmpeg
Requires: ffmpeg-free
AutoReqProv: no
BuildArch: noarch
%description files-services
Expand Down

0 comments on commit 855a711

Please sign in to comment.