--- rpms/nextcloud/contribs10/nextcloud.spec 2022/07/08 05:14:39 1.5 +++ rpms/nextcloud/contribs10/nextcloud.spec 2024/01/29 03:13:37 1.8 @@ -1,4 +1,4 @@ -%define version 24.0.2 +%define version 26.0.11 %define release 1 %define apache_serverroot /usr/share @@ -28,26 +28,25 @@ BuildRequires: httpd Requires: httpd # Required php packages -Requires: php74 -Requires: php74-php-fpm -Requires: php74-php-gd -Requires: php74-php-pdo -Requires: php74-php-mbstring -Requires: php74-php-pecl-zip -Requires: php74-php-imagick +Requires: php81 +Requires: php81-php-fpm +Requires: php81-php-gd +Requires: php81-php-pdo +Requires: php81-php-mbstring +Requires: php81-php-pecl-zip +Requires: php81-php-imagick # Recommended php packages -Requires: php74-php-intl -Requires: php74-php-mcrypt +Requires: php81-php-intl +Requires: php81-php-mcrypt # Required php packages for specific apps -Requires: php74-php-ldap +Requires: php81-php-ldap # Required php packages for MariaDB -Requires: php74-php-mysqlnd +Requires: php81-php-mysqlnd #rh-php71-php-pdo_mysql -# Conflicts: nextcloud < 15 %description Nextcloud files and configuration. @@ -68,81 +67,9 @@ nc_dir: %{nc_dir} nc_data_dir: %{nc_data_dir} nc_config_dir: %{nc_config_dir} - - %pre -# true if $1 is greater than or equal $2 -verlte() { - [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ] -} - -verlt() { - [ "$1" = "$2" ] && return 1 || verlte $1 $2 -} -# if there is already an installed version -if [ -f /usr/share/nextcloud/version.php ] -then - echo "version.php found, already installed" - # get version number - installedver=`php -r 'require("/usr/share/nextcloud/version.php"); print "$OC_VersionString";'`; - majvers=`echo %{version} | cut -d. -f1` - majcurvers=`echo $installedver | cut -d. -f1` - # we should fail with exit 1 if - # installed version > rpm version - if ( verlte %{version} $installedver ) - then - echo "Installed version has $installedver been upgraded and is most recent than this rpm %{version} version" -# echo "backup current install to /usr/share/nextcloud_back" -# mkdir /usr/share/nextcloud_back -# rsync -ar /usr/share/nextcloud/ /usr/share/nextcloud_back - exit 1 - elif [ $(($majvers-1)) -gt $majcurvers ] - then # installed version < rpm version -1 - echo "can not upgrade from $installedver to %{version}, please do a manual or web update with intermediate version" -# echo "backup current install to /usr/share/nextcloud_back" -# mkdir /usr/share/nextcloud_back -# rsync -ar /usr/share/nextcloud/ /usr/share/nextcloud_back - exit 1 - fi -fi %postun -# true if $1 is greater than or equal $2 -verlte() { - [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ] -} - -verlt() { - [ "$1" = "$2" ] && return 1 || verlte $1 $2 -} - -if [ $1 == 1 ]; then -# if there is already an installed version -if [ -f /usr/share/nextcloud/version.php ] -then -# echo "version.php found, already installed" - # get version number - installedver=`php -r 'require("/usr/share/nextcloud/version.php"); print "$OC_VersionString";'`; - majvers=`echo %{version} | cut -d. -f1` - majcurvers=`echo $installedver | cut -d. -f1` -# echo "and the version is $installedver" - # we should fail with exit 1 if - # installed version > rpm version - if ( verlte %{version} $installedver ) - then -# echo "reverting content" -# rsync -ar /usr/share/nextcloud_back/ /usr/share/nextcloud_back -# rm -rf /usr/share/nextcloud_back - exit 0 - elif [ $(($majvers-1)) -gt $majcurvers ] - then # installed version < rpm version -1 -# echo "reverting content" -# rsync -ar /usr/share/nextcloud_back/ /usr/share/nextcloud_back -# rm -rf /usr/share/nextcloud_back - exit 0 - fi -fi -fi %install rm -rf %{buildroot} @@ -185,7 +112,7 @@ cp %{SOURCE1} %{buildroot}/etc/httpd/con %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/index.html %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/robots.txt %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/.htaccess -%attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/dist +%attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/dist %config(noreplace) %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/.user.ini %config(noreplace) %attr(0644,root,root) /etc/httpd/conf.d/nextcloud.conf @@ -194,6 +121,13 @@ cp %{SOURCE1} %{buildroot}/etc/httpd/con %changelog +* Sun Jan 28 2024 Jean-Philippe Pialasse 26.0.11-1.sme +- update to release 26.0.11 + +* Fri Jul 08 2022 Jean-Philippe Pialasse 24.0.2-3.sme +- removing pre and postun scripts +- fix dist permissions + * Fri Jul 08 2022 Jean-Philippe Pialasse 24.0.2-2.sme - update to release 24.0.2 - make rpm a -src to avoid conflict between webupdates and rpm