diff --git a/0000-disable-update-version-check.patch b/0000-disable-update-version-check.patch index 2d5828b..4a77733 100644 --- a/0000-disable-update-version-check.patch +++ b/0000-disable-update-version-check.patch @@ -2,7 +2,7 @@ diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 5a14bb17507..38dcb55db7f 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php -@@ -214,15 +214,17 @@ class Updater extends BasicEmitter { +@@ -174,10 +174,13 @@ $this->config->setAppValue('core', 'vendor', $currentVendor); } @@ -13,15 +13,9 @@ index 5a14bb17507..38dcb55db7f 100644 + */ if ($currentVendor === 'nextcloud') { - return isset($allowedPreviousVersions[$currentVendor][$majorMinor]) -- && (version_compare($oldVersion, $newVersion, '<=') || -- $this->config->getSystemValueBool('debug', false)); +- && (version_compare($oldVersion, $newVersion, '<=') +- || $this->config->getSystemValueBool('debug', false)); + return true; } // Check if the instance can be migrated -- return isset($allowedPreviousVersions[$currentVendor][$majorMinor]) || -- isset($allowedPreviousVersions[$currentVendor][$oldVersion]); -+ return true; - } - - /** diff --git a/nextcloud-integritycheck-exclusion.patch b/nextcloud-integritycheck-exclusion.patch index 766cf1c..eeb7ee5 100644 --- a/nextcloud-integritycheck-exclusion.patch +++ b/nextcloud-integritycheck-exclusion.patch @@ -12,7 +12,7 @@ index a6de3cf6030d7..3974483601b08 100644 --- a/lib/private/IntegrityCheck/Checker.php +++ b/lib/private/IntegrityCheck/Checker.php @@ -337,7 +337,20 @@ private function verify(string $signaturePath, string $basePath, string $certifi - $differencesB = array_diff($currentInstanceHashes, $expectedHashes); + $differencesB = array_diff_assoc($currentInstanceHashes, $expectedHashes); $differences = array_unique(array_merge($differencesA, $differencesB)); $differenceArray = []; + diff --git a/nextcloud.spec b/nextcloud.spec index 0d4fecd..2b4260b 100644 --- a/nextcloud.spec +++ b/nextcloud.spec @@ -5,7 +5,7 @@ %endif Name: nextcloud -Version: 29.0.9 +Version: 34.0.3 Release: %autorelease Summary: Private file sync and share server # Automatically converted from old format: AGPLv3+ and MIT and BSD and ASL 2.0 and WTFPL and CC-BY-SA and GPLv3+ and Adobe - review is highly recommended. @@ -40,17 +40,19 @@ Source303: %{name}-MIGRATION.fedora # Remove updater version check, we know that updates across more than one # version are possible Patch0: 0000-disable-update-version-check.patch -# Change occ shebang to /usr/bin/php -Patch1: 0001-mangle-shebang.patch # Add the ability to exclude files we specify from the nextcloud integrity checker -Patch2: nextcloud-integritycheck-exclusion.patch +Patch1: nextcloud-integritycheck-exclusion.patch BuildArch: noarch # Set this to the minimum supported php version Nextcloud will run on # Exists to prevent accidental building on distros with outdated php's -BuildRequires: php(language) >= 8.0 +BuildRequires: php(language) >= 8.2 BuildRequires: systemd-rpm-macros +BuildRequires: sed + +# Auto-generate Provides from bundled php-composer libraries +BuildRequires: composer-generators # expand pear macros on install BuildRequires: php-pear @@ -92,142 +94,12 @@ Requires: php-xmlwriter Requires: php-zip # For systemd support during install/uninstall %{?systemd_requires} -# the CA cert bundle is linked to from the config dir -Requires: %{_sysconfdir}/pki/tls/certs/ca-bundle.crt +# Fedora dropped legacy CA cert bundle symlinks +# See https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile +Requires: %{_sysconfdir}/pki/ca-trust/extracted/pem/tls-ca-bundle.pem -# Bundled composer libraries -# generated with utils/get-bundled-versions.py -# tar xf nextcloud-28.0.6.tar.bz2 -# cd nextcloud -# ../utils/get-bundled-versions.py -# many of these can be unbundled -# I think utils/get-composer-requires.py is a tool to check if these are available on Fedora -Provides: bundled(php-composer(christian-riesen/base32)) = 1.6.0 -Provides: bundled(php-composer(rullzer/easytotp)) = 0.1.4 -Provides: bundled(php-composer(adhocore/cli)) = 1.6.2 -Provides: bundled(php-composer(nextcloud/openapi-extractor)) = dev-main -Provides: bundled(php-composer(nikic/php-parser)) = 4.18.0 -Provides: bundled(php-composer(phpstan/phpdoc-parser)) = 1.25.0 -Provides: bundled(php-composer(icewind/smb)) = 3.5.4 -Provides: bundled(php-composer(icewind/streams)) = 0.7.7 -Provides: bundled(php-composer(bamarni/composer-bin-plugin)) = 1.8.2 -Provides: bundled(php-composer(hexogen/kdtree)) = 0.2.5 -Provides: bundled(php-composer(amphp/amp)) = 2.6.2 -Provides: bundled(php-composer(amphp/byte-stream)) = 1.8.1 -Provides: bundled(php-composer(amphp/parallel)) = 1.4.3 -Provides: bundled(php-composer(amphp/parser)) = 1.1.0 -Provides: bundled(php-composer(amphp/process)) = 1.1.4 -Provides: bundled(php-composer(amphp/serialization)) = 1.0.0 -Provides: bundled(php-composer(amphp/sync)) = 1.4.2 -Provides: bundled(php-composer(league/flysystem)) = 2.5.0 -Provides: bundled(php-composer(league/mime-type-detection)) = 1.11.0 -Provides: bundled(php-composer(psr/log)) = 1.1.4 -Provides: bundled(php-composer(rubix/ml)) = 2.1.1 -Provides: bundled(php-composer(rubix/tensor)) = 2.2.3 -Provides: bundled(php-composer(symfony/polyfill-mbstring)) = 1.27.0 -Provides: bundled(php-composer(symfony/polyfill-php73)) = 1.26.0 -Provides: bundled(php-composer(symfony/polyfill-php80)) = 1.27.0 -Provides: bundled(php-composer(aws/aws-crt-php)) = 1.2.6 -Provides: bundled(php-composer(aws/aws-sdk-php)) = 3.322.4 -Provides: bundled(php-composer(bantu/ini-get-wrapper)) = 1.0.1 -Provides: bundled(php-composer(beberlei/assert)) = 3.3.1 -Provides: bundled(php-composer(brick/math)) = 0.9.2 -Provides: bundled(php-composer(cweagans/composer-patches)) = 1.7.3 -Provides: bundled(php-composer(deepdiver/zipstreamer)) = 2.0.3 -Provides: bundled(php-composer(deepdiver1975/tarstreamer)) = 2.1.0 -Provides: bundled(php-composer(doctrine/cache)) = 2.2.0 -Provides: bundled(php-composer(doctrine/dbal)) = 3.8.3 -Provides: bundled(php-composer(doctrine/deprecations)) = 1.1.2 -Provides: bundled(php-composer(doctrine/event-manager)) = 1.2.0 -Provides: bundled(php-composer(doctrine/lexer)) = 2.1.0 -Provides: bundled(php-composer(egulias/email-validator)) = 3.2.6 -Provides: bundled(php-composer(fgrosse/phpasn1)) = 2.3.0 -Provides: bundled(php-composer(fusonic/linq)) = 1.1.0 -Provides: bundled(php-composer(fusonic/opengraph)) = 2.2.0 -Provides: bundled(php-composer(giggsey/libphonenumber-for-php-lite)) = 8.13.27 -Provides: bundled(php-composer(guzzlehttp/guzzle)) = 7.8.1 -Provides: bundled(php-composer(guzzlehttp/promises)) = 1.5.3 -Provides: bundled(php-composer(guzzlehttp/psr7)) = 2.6.2 -Provides: bundled(php-composer(guzzlehttp/uri-template)) = 0.2.0 -Provides: bundled(php-composer(icewind/searchdav)) = 3.1.0 -Provides: bundled(php-composer(icewind/streams)) = 0.7.7 -Provides: bundled(php-composer(justinrainbow/json-schema)) = 5.2.13 -Provides: bundled(php-composer(kornrunner/blurhash)) = 1.2.2 -Provides: bundled(php-composer(laravel/serializable-closure)) = 1.3.3 -Provides: bundled(php-composer(league/uri)) = 6.4.0 -Provides: bundled(php-composer(league/uri-interfaces)) = 2.2.0 -Provides: bundled(php-composer(mexitek/phpcolors)) = 1.0.4 -Provides: bundled(php-composer(microsoft/azure-storage-blob)) = 1.5.4 -Provides: bundled(php-composer(microsoft/azure-storage-common)) = 1.5.2 -Provides: bundled(php-composer(mlocati/ip-lib)) = 1.18.0 -Provides: bundled(php-composer(mtdowling/jmespath.php)) = 2.6.1 -Provides: bundled(php-composer(nextcloud/lognormalizer)) = 1.0.0 -Provides: bundled(php-composer(pear/archive_tar)) = 1.4.14 -Provides: bundled(php-composer(pear/console_getopt)) = 1.4.3 -Provides: bundled(php-composer(pear/pear-core-minimal)) = 1.10.14 -Provides: bundled(php-composer(pear/pear_exception)) = 1.0.2 -Provides: bundled(php-composer(php-http/guzzle7-adapter)) = 1.0.0 -Provides: bundled(php-composer(php-http/httplug)) = 2.2.0 -Provides: bundled(php-composer(php-http/promise)) = 1.1.0 -Provides: bundled(php-composer(php-opencloud/openstack)) = 3.2.1 -Provides: bundled(php-composer(phpseclib/phpseclib)) = 2.0.47 -Provides: bundled(php-composer(pimple/pimple)) = 3.5.0 -Provides: bundled(php-composer(psr/cache)) = 3.0.0 -Provides: bundled(php-composer(psr/clock)) = 1.0.0 -Provides: bundled(php-composer(psr/container)) = 2.0.2 -Provides: bundled(php-composer(psr/event-dispatcher)) = 1.0.0 -Provides: bundled(php-composer(psr/http-client)) = 1.0.3 -Provides: bundled(php-composer(psr/http-factory)) = 1.0.2 -Provides: bundled(php-composer(psr/http-message)) = 1.1 -Provides: bundled(php-composer(psr/log)) = 1.1.4 -Provides: bundled(php-composer(punic/punic)) = 3.8.1 -Provides: bundled(php-composer(ralouphie/getallheaders)) = 3.0.3 -Provides: bundled(php-composer(ramsey/collection)) = 1.1.3 -Provides: bundled(php-composer(ramsey/uuid)) = 4.1.1 -Provides: bundled(php-composer(sabre/dav)) = 4.5.0 -Provides: bundled(php-composer(sabre/event)) = 5.1.4 -Provides: bundled(php-composer(sabre/http)) = 5.1.10 -Provides: bundled(php-composer(sabre/uri)) = 2.3.3 -Provides: bundled(php-composer(sabre/vobject)) = 4.5.4 -Provides: bundled(php-composer(sabre/xml)) = 2.2.6 -Provides: bundled(php-composer(scssphp/scssphp)) = 1.12.1 -Provides: bundled(php-composer(spomky-labs/base64url)) = 2.0.4 -Provides: bundled(php-composer(spomky-labs/cbor-php)) = 2.0.1 -Provides: bundled(php-composer(stecman/symfony-console-completion)) = 0.11.0 -Provides: bundled(php-composer(symfony/console)) = 5.4.35 -Provides: bundled(php-composer(symfony/css-selector)) = 5.4.11 -Provides: bundled(php-composer(symfony/deprecation-contracts)) = 3.0.2 -Provides: bundled(php-composer(symfony/dom-crawler)) = 5.4.11 -Provides: bundled(php-composer(symfony/event-dispatcher)) = 5.4.26 -Provides: bundled(php-composer(symfony/event-dispatcher-contracts)) = 3.0.2 -Provides: bundled(php-composer(symfony/http-foundation)) = 5.4.25 -Provides: bundled(php-composer(symfony/mailer)) = 5.4.22 -Provides: bundled(php-composer(symfony/mime)) = 5.4.19 -Provides: bundled(php-composer(symfony/polyfill-ctype)) = 1.28.0 -Provides: bundled(php-composer(symfony/polyfill-intl-grapheme)) = 1.28.0 -Provides: bundled(php-composer(symfony/polyfill-intl-idn)) = 1.28.0 -Provides: bundled(php-composer(symfony/polyfill-intl-normalizer)) = 1.28.0 -Provides: bundled(php-composer(symfony/polyfill-mbstring)) = 1.28.0 -Provides: bundled(php-composer(symfony/polyfill-php72)) = 1.28.0 -Provides: bundled(php-composer(symfony/polyfill-php73)) = 1.28.0 -Provides: bundled(php-composer(symfony/polyfill-php80)) = 1.28.0 -Provides: bundled(php-composer(symfony/process)) = 5.4.34 -Provides: bundled(php-composer(symfony/routing)) = 5.4.25 -Provides: bundled(php-composer(symfony/service-contracts)) = 3.0.2 -Provides: bundled(php-composer(symfony/string)) = 6.0.19 -Provides: bundled(php-composer(symfony/translation)) = 5.4.24 -Provides: bundled(php-composer(symfony/translation-contracts)) = 2.4.0 -Provides: bundled(php-composer(thecodingmachine/safe)) = 1.3.3 -Provides: bundled(php-composer(wapmorgan/mp3info)) = 0.1.0 -Provides: bundled(php-composer(web-auth/cose-lib)) = 3.3.9 -Provides: bundled(php-composer(web-auth/metadata-service)) = 3.3.9 -Provides: bundled(php-composer(web-auth/webauthn-lib)) = 3.3.9 -# OpenIconic icons bundled via sabre-dav -Provides: bundled(openiconic-fonts) = 1.0.0 -# jscolor bundled via themeing app -Provides: bundled(jscolor) = 2.0.4 # jquery-ui-multiselect bundled via user_ldap app -Provides: bundled(jquery-ui-multiselect) = 0.3.1 +Provides: bundled(jquery-ui-multiselect) = 1.13 # zxcvbn bundled via core Provides: bundled(zxcvbn) = 4.4.2 @@ -278,6 +150,7 @@ If you want the database to be on the same system as NextCloud itself, you must also install and enable a MySQL / MariaDB server package. See README.mysql for more details. + %package postgresql Summary: PostgreSQL database support for NextCloud Provides: %{name}-database = %{version}-%{release} @@ -306,17 +179,24 @@ Requires: %{name} = %{version}-%{release} This package ensures the necessary dependencies are in place for NextCloud to work with an SQLite 3 database stored on the local system. - %prep %autosetup -n %{name} -p1 +# Fix php shebang in occ +sed -ri 's\^#!/usr/bin/env php$\#!%{_bindir}/php\' occ + # patch backup files and .git stuff find . -name \*.orig -type f -delete -print find . -name .gitignore -type f -delete -print find . -name .github -type d -prune -exec rm -r {} \; -print -# fix CLI upgrade advise on splash screen -sed -i -e 's#./\(occ upgrade\)#sudo -u apache php /usr/share/nextcloud/\1#' core/templates/update.admin.php +# fix CLI upgrade advice on splash screen +if ! file=$(grep -l 'occ upgrade' dist/*.map); then + echo "Could not find the occ upgrade instructions in dist/*.map" + exit 1 +fi +echo "Updating occ upgrade instructions in $file" +sed -i -e 's#\./\(occ upgrade\)#sudo -u apache php /usr/share/nextcloud/\1#' $file # prepare package doc cp %{SOURCE300} README.%{distro} @@ -411,7 +291,7 @@ install -pm 755 occ %{buildroot}%{_datadir}/%{name} ln -s ../../../%{_sysconfdir}/%{name} %{buildroot}%{_datadir}/%{name}/config # nextcloud looks for ca-bundle.crt in config dir -ln -s ../pki/tls/certs/ca-bundle.crt %{buildroot}%{_sysconfdir}/%{name}/ca-bundle.crt +ln -s ../pki/ca-trust/extracted/pem/tls-ca-bundle.pem %{buildroot}%{_sysconfdir}/%{name}/ca-bundle.crt # set default config install -pm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/config.php diff --git a/sources b/sources index 5a60ce5..95997de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nextcloud-29.0.9.tar.bz2) = e0acd458ee87f9269f6e80c0b3b8b68226a80dc49aae9fc084cefdf156060edc983ac8f88b1ce15a3eead9eff8b60dc2ec69920a5499a923cad8496e8fa8bd7a +SHA512 (nextcloud-34.0.3.tar.bz2) = 3463dbbdeae5275a0791b115cf86aed41c5a138fdd19bb32ec12837a6698106b6f172e24fb1264a2d4e20b2b805bcf7841b2338e4e02f1fd5394fbed830cc695