Просмотр исходного кода

Fix/libzip4 fix upgrade (#3244)

* Update version

* Fix dependencies Ubuntu 20.04 to 22.04
Jaap Marcus 3 лет назад
Родитель
Сommit
cbdb1326b8

+ 2 - 3
install/hst-install-ubuntu.sh

@@ -52,7 +52,7 @@ software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
     php$fpm_v-opcache php$fpm_v-pspell php$fpm_v-readline php$fpm_v-xml
     postgresql postgresql-contrib proftpd-basic quota rrdtool spamassassin sudo hestia=${HESTIA_INSTALL_VER}
     hestia-nginx hestia-php vim-common vsftpd whois unzip zip acl sysstat setpriv rsyslog
-    ipset libonig5 libzip5 openssh-server lsb-release zstd jq"
+    ipset libonig5 libzip4 openssh-server lsb-release zstd jq"
 
 installer_dependencies="apt-transport-https curl dirmngr gnupg wget software-properties-common ca-certificates"
 
@@ -934,14 +934,13 @@ if [ -d "$withdebs" ]; then
 fi
 if [ "$release" = '18.04' ]; then
 	software=$(echo "$software" | sed -e "s/libonig5/libonig4/")
-	software=$(echo "$software" | sed -e "s/libzip5/libzip4/")
 fi
 if [ "$release" = '20.04' ]; then
 	software=$(echo "$software" | sed -e "s/setpriv/util-linux/")
+	software=$(echo "$software" | sed -e "s/libzip4/libzip5/")
 fi
 if [ "$release" = '22.04' ]; then
 	software=$(echo "$software" | sed -e "s/setpriv/util-linux/")
-	software=$(echo "$software" | sed -e "s/libzip5/libzip4/")
 fi
 
 #----------------------------------------------------------#

+ 1 - 1
src/deb/hestia/copyright

@@ -3,7 +3,7 @@ Upstream-Name: hestia
 Source: https://www.hestiacp.com
 
 Files: *
-Copyright: 2018-2022, Hestia Control Panel <info@hestiacp.com>
+Copyright: 2018-2023, Hestia Control Panel <info@hestiacp.com>
 License: GPL-3.0+
 Remarks: Hestia Control Panel is a fork from VestaCP, special thanks to vestacp.com and Serghey Rodin
 

+ 1 - 1
src/deb/nginx/copyright

@@ -3,7 +3,7 @@ Upstream-Name: hestia
 Source: https://www.hestiacp.com
 
 Files: *
-Copyright: 2018-2022, Hestia Control Panel <info@hestiacp.com>
+Copyright: 2018-2023, Hestia Control Panel <info@hestiacp.com>
 License: GPL-3.0+
 Remarks: Hestia is a fork from VestaCP, special thanks to vestacp.com and Serghey Rodin
 

+ 3 - 2
src/deb/php/control

@@ -1,12 +1,13 @@
 Source: hestia-php
 Package: hestia-php
 Priority: optional
-Version: 8.2.0
+Version: 8.2.1
 Section: admin
 Maintainer: HestaCP <info@hestiacp.com>
 Homepage: https://www.hestiacp.com
 Architecture: amd64
-Depends: hestia, libzip5 | libzip4, unzip, libonig5 | libonig4 | libonig2
+Depends: hestia, libzip4, unzip, libonig5 | libonig4 | libonig2
+Conflct: libzip5
 Description: hestia php-fpm
  hestia is an open source hosting control panel.
  hestia has a clean and focused interface without the clutter.

+ 1 - 1
src/deb/php/copyright

@@ -3,7 +3,7 @@ Upstream-Name: hestia
 Source: https://www.hestiacp.com
 
 Files: *
-Copyright: 2018-2022, Hestia Control Panel <info@hestiacp.com>
+Copyright: 2018-2023, Hestia Control Panel <info@hestiacp.com>
 License: GPL-3.0+
 Remarks: Hestia is a fork from VestaCP, special thanks to vestacp.com and Serghey Rodin
 

+ 9 - 1
src/hst_autocompile.sh

@@ -258,7 +258,7 @@ if [ "$dontinstalldeps" != 'true' ]; then
 		dnf install -y -q $SOFTWARE
 	else
 		# Set package dependencies for compiling
-		SOFTWARE='build-essential libxml2-dev libz-dev libzip-dev libgmp-dev libcurl4-gnutls-dev unzip openssl libssl-dev pkg-config libsqlite3-dev libonig-dev rpm'
+		SOFTWARE='build-essential libxml2-dev libz-dev libzip-dev libgmp-dev libcurl4-gnutls-dev unzip openssl libssl-dev pkg-config libsqlite3-dev libonig-dev rpm lsb-release'
 
 		echo "Updating system APT repositories..."
 		apt-get -qq update > /dev/null 2>&1
@@ -555,6 +555,14 @@ if [ "$PHP_B" = true ]; then
 		if [ "$BUILD_ARCH" != "amd64" ]; then
 			sed -i "s/amd64/${BUILD_ARCH}/g" "$BUILD_DIR_HESTIAPHP/DEBIAN/control"
 		fi
+
+		os=$(lsb_release -is)
+		release=$(lsb_release -rs)
+		if [[ "$os" = "Ubuntu" ]] && [[ "$release" = "20.04" ]]; then
+			sed -i "/Conflicts: libzip5/d" "$BUILD_DIR_HESTIAPHP/DEBIAN/control"
+			sed -i "s/libzip4/libzip5/g" "$BUILD_DIR_HESTIAPHP/DEBIAN/control"
+		fi
+
 		get_branch_file 'src/deb/php/copyright' "$BUILD_DIR_HESTIAPHP/DEBIAN/copyright"
 		get_branch_file 'src/deb/php/postinst' "$BUILD_DIR_HESTIAPHP/DEBIAN/postinst"
 		chmod +x $BUILD_DIR_HESTIAPHP/DEBIAN/postinst