nextcloud/nextcloud.spec
Eric Schirra c9465c0ffd - Update to 30.0.3
- Fix: Move cloud id into readonly input (server#48978)
  - Fix(settings): Align contents of profile picture heading (server#48981)
  - Build(deps-dev): bump cypress from 13.13.2 to 13.13.3 (server#49047)
  - Fix(caldav): duration handling in the event reader class (server#49066)
  - Clear pending two factor tokens also from configuration (server#49098)
  - Fix(net/security): Handle IPv6 zone IDs in link-local addresses (server#49107)
  - Fix(TaskProcessingApiController): Don’t use + to merge non-assoc. arrays (server#49110)
  - Fix(files): multiselect and filters store declaration (server#49136)
  - Fix(theming): Return default theme if the user never selected a theme (server#49138)
  - Fix(SharingEntryLink): Show default password before create if any (server#49149)
  - Fix(files_sharing): note icon color on public pages (server#49153)
  - Fix(files): open sidebar on sharing tab by default for files (server#49157)
  - Fix: undefined variable $response in DAV storage (server#49160)
  - Fix(files): edit locally buttons and description (server#49161)
  - Chore(deps-dev): Bump @pinia/testing from 0.1.5 to 0.1.7 (server#49174)
  - Fix(files): view-in-folder enabled conditions (server#49180)
  - Feat(testing): Add a fake summary task provider (server#49195)
  - Fix: log a warning when we can’t build a background job (server#49207)
  - Chore(github): Update groupware code owners (server#49214)
  - Fix(files_external): cast storage id int (server#49222)
  - Docs: Adjust taiwan translators (server#49230)
  - Feat: Add X-NC-Disable-Scheduling property to allow skipping scheduling (server#49234)
  - Fx(dav): file request guest nickname encoding (server#49239)
  - Fix remaining readdir() calls in loops with undesirable false evaluation potential (server#49241)
  - Fix(Middleware): log deprecation when annotation was actually used (server#49242)
  - Chore: Update `@nextcloud/upload` and `@nextcloud/files` (server#49250)
  - Feat: mail provider settings (server#49254)
  - Chore(deps): Add SabreDav Patch for iTip Broker (server#49264)
  - Fix: override iTip Broker to fix several issues (server#49268)
  - DNS: do not query CNAME if A succeeded already (server#49277)
  - Textprocessing] Fix: Accept scheduling a task if there are equivalent taskprocessing providers only (server#49280)
  - Fix: use invokePrivate for test (server#49292)
  - Fix: RDATE and EXDATE property instances (server#49302)
  - Fix: Do not check for strict cookie when running webcron (server#49310)
  - Build(deps-dev): bump jsdoc from 4.0.3 to 4.0.4 (server#49321)
  - Build(deps-dev): bump @types/jest from 29.5.13 to 29.5.14 (server#49330)
  - Fix(files): Allow downloading multiple nodes not from same base (server#49344)
  - Test(fakeAI): Allow to specify whether the fake providers should fail (server#49358)
  - Fix(core): Do not use `v-html` for translation output (server#49363)
  - Fix(files): improve delete display name when trashbin is disabled (server#49369)
  - Fix(SetupChecks): Make sure array key is set (server#49373)
  - Feat(settings): add big file upload setup checks (server#49384)
  - Fix(job): Check if carddata is resource and read it to string (server#49400)
  - Fix: Properly calculate intermediate icon for touch icon generation (server#49405)
  - Fix(storage): Try to delete existing target (server#49410)
  - Fix(files): Restore page title (folder – view – product) (server#49419)
  - Fix: (CalDav) Delete invitation link when deleting Calendars or Events (server#49429)
  - Fix(BackgroundJobs): Adjust intervals and time sensitivities (server#49461)
  - Fix(external_storage): Cast id to int (server#49468)
  - Fix(OCMDiscoveryService): Also cache error results during discovery (server#49472)
  - Fix: invalid usage of IQueryBuilder::createNamedParameter() (server#49480)
  - Fix(TaskProcessing): Set up fs in getFileContentsInternal (server#49491)
  - Fix: throw correct exception type when we can’t verify if an s3 bucket exists (server#49497)
  - Fix(security): Update CA certificate bundle (server#49509)
  - Fix(activity): Fix activity object type warnings (server#49522)
  - Fix(migration): Decrypt ownCloud secrets v2 (server#49537)
  - Chore: stricter access to testremote endpoint (server#49544)
  - Feat: Use inline password confirmation in external storage settings (server#49547)
  - Fix(setupcheck): Disable PhpMaxFileSize setupcheck for now (server#49642)
  - Add SabreDav Patch for iTip Broker (3rdparty#1983)
  - Backport/stable30/430/manual (app_api#434)
  - Check healthcheck and heartbeat after ExApp container start [backport] (app_api#440)
  - Stable30: updated CI to use actions/upload-artifact@v4 (app_api#444)
  - Fix): do not expose haproxy password to UI (app_api#449)
  - Fix): Encrypt sensitive values(haproxy_password) in the DB (app_api#454)
  - Fix migration for postgres support. (app_api#458)
  - Remove caching for shares (circles#1750)
  - Fix(notification): Make sure the action URL is an absolute URL (circles#1762)
  - Fix(CoreQueryBuilder): Use correct member entry for circle as initiator (circles#1765)
  - Fix(FederatedUserService): Increase cache TTL for singleId to one week (circles#1774)
  - New daily maintenance to delete old federated events (circles#1777)
  - Bypass user condition on cli (circles#1782)
  - Fix duplicate name on fedcircle (circles#1783)
  - Fix(activity): ensure absolute URL are used (circles#1786)
  - Chore(deps-dev): Bump vite from 5.4.10 to 5.4.11 (firstrunwizard#1438)
  - Build(deps): for NC 30 support PHP>=8.1 (logreader#1415)
  - Fix(SetupCheck): remove debug(?) output (logreader#1418)
  - Chore(deps): Bump vue-material-design-icons from 5.3.0 to 5.3.1 (notifications#2077)
  - Chore(deps): Bump @nextcloud/dialogs from 5.3.7 to 5.3.8 (notifications#2094)
  - Fix: use NcCheckboxRadioSwitch in settings (recommendations#820)
  - Fix: add missing description to command (recommendations#824)
  - Update nextcloud/ocp dependency (serverinfo#695)
  - Chore(deps): update dependency cypress-visual-regression to ^5.2.2 (text#6470)
  - Chore(deps): update dependency cypress-split to ^1.24.5 (text#6589)
  - Chore(deps): update dependency vite to ^5.4.10 (text#6590)
  - Fix(deps): update dependency @nextcloud/files to ^3.9.1 (text#6591)
  - Fix(deps): update dependency mermaid to ^10.9.3 (text#6592)
  - Fix(deps): update dependency vue-material-design-icons to ^5.3.1 (text#6594)
  - Fix(css): Set page `size: auto` instead of `size: A4` (text#6595)
  - Fix some JS console errors (text#6600)
  - Test(cypress): More specific selector for viewer header in links test (text#6604)
  - Fix(addContent): only process addExtensions once (text#6605)
  - Feat(debug): Expose yjs debug function in editor API (text#6608)
  - Fix(files): set focus on image description right after inserting (text#6611)
  - Fix(files): Reduce spacing between image and description a bit (text#6615)
  - Fix(deps): update dependency @nextcloud/dialogs to ^5.3.8 (text#6620)
  - Fix(deps): update tiptap to ^2.9.1 (text#6621)
  - Fix(deps): update yjs (text#6622)
  - Chore(deps): update dependency @rollup/rollup-linux-x64-gnu to ^4.24.4 (text#6623)
  - Chore(deps): update dependency eslint-plugin-cypress to ^3.6.0 (text#6624)
  - Chore(deps): update dependency rollup-plugin-webpack-stats to ^1.1.1 (text#6625)
  - Chore(deps): update dependency @rollup/rollup-linux-x64-gnu to ^4.25.0 (text#6627)
  - Fix(deps): update dependency debounce to ^2.2.0 (text#6628)
  - Fix npm audit (text#6644)
  - Chore(deps): update dependency vite to ^5.4.11 (text#6658)
  - Chore(deps): update dependency @rollup/rollup-linux-x64-gnu to ^4.27.2 (text#6659)
  - Fix(deps): update dependency @nextcloud/files to ^3.10.0 (text#6662)
  - Fix(deps): update dependency @nextcloud/vue to ^8.20.0 (text#6663)
  - Revert “fix(css): Set page `size: auto` instead of `size: A4`” (text#6669)
  - Fix: log ignored workspace propfind exceptions at debug (text#6677)
  - Fix npm audit (text#6691)
  - Send one full update from y-websocket (text#6697)
  - Ci: Run cypress on ubuntu-latest (text#6702)
  - Feat: render text inserted from assistant (text#6704)
  - Fix: catch all errors when getting rich workspace file (text#6705)

OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=255
2024-12-06 07:15:46 +00:00

334 lines
11 KiB
RPMSpec

#
# spec file for package nextcloud
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
#
%if 0%{?suse_version}
%define apache_myserverroot %{apache_serverroot}/htdocs
%define apache_confdir %{apache_sysconfdir}/conf.d
%define apache_docdir /usr/share/doc/packages
%else
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
%define apache_myserverroot /var/www/html
%define apache_confdir /etc/httpd/conf.d
%define apache_user apache
%define apache_group apache
%define __jar_repack 0
%else
%define apache_myserverroot /var/www
%define apache_confdir /etc/httpd/conf.d
%define apache_user www
%define apache_group www
%endif
%endif
%define nc_user %{apache_user}
%define nc_dir %{apache_myserverroot}/%{name}
%define ocphp_bin /usr/bin
%if 0%{?rhel} == 600 || 0%{?rhel_version} == 600 || 0%{?centos_version} == 600
%define statedir /var/run
%else
%define statedir /run
%endif
Name: nextcloud
Version: 30.0.3
Release: 0
Summary: File hosting service
License: AGPL-3.0-only
Group: Productivity/Networking/Web/Utilities
URL: https://nextcloud.com
Source0: https://download.nextcloud.com/server/releases/%{name}-%{version}.tar.bz2
Source1: apache_secure_data
Source2: README
Source3: README.SELinux
Source4: README.SUSE
Source5: robots.txt
Source10: %{name}-cron
Source11: %{name}-cron.service
Source12: %{name}-cron.timer
Source99: %{name}-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: apache-rpm-macros
BuildRequires: cron
BuildRequires: fdupes
BuildRequires: unzip
#
Requires: cron
Requires: curl
Requires: libxml2-2
Requires: mariadb >= 10.3
Requires: php-bz2
Requires: php-dom
Requires: php-gd
Requires: php-intl
Requires: php-json
Requires: php-mbstring
Requires: php-mysql
Requires: php-posix
Requires: php-zip
#
%if 0%{?fedora_version} || 0%{?rhel} || 0%{?rhel_version} || 0%{?centos_version}
Requires: php < 8.4.0
Requires: php >= 8.1.0
Requires: php-process
Requires: php-xml
Recommends: sqlite
%endif
#
%if 0%{?suse_version}
Requires: php-ctype
Requires: php-curl
# SUSE does not include the fileinfo module in php-common.
Requires: php-fileinfo
Requires: php-iconv
Requires: php-opcache
Requires: php-openssl
Requires: php-pear
Requires: php-xmlreader
Requires: php-xmlwriter
Requires: php-zip
Requires: php-zlib
Recommends: sqlite3
%{?systemd_requires}
%endif
Recommends: php-sysvsem
# Database connectors:
Recommends: php-sqlite
#Recommends: php-pgsql
# Require for specific apps:
Requires: php-ftp
Requires: php-ldap
#Requires: php-imap
#Requires: php-smbclient
# Recommend for specific apps:
Recommends: php-exif
Recommends: php-gmp
# For enhanced server performance:
Recommends: php-APCu
Recommends: php-bcmath
# For preview generation:
Recommends: php-imagick
Recommends: php-ffmpeg
#Recommends: libreoffice
# For command line processing:
Recommends: php-pcntl
%description
Nextcloud is a suite of client-server software for creating file
hosting services and using them.
%package apache
Summary: Apache configuration for %{name}
Group: Productivity/Networking/Web/Utilities
BuildRequires: apache2 >= 2.4
Requires: %{name} = %{version}
Requires: apache2
Requires: mod_php_any < 8.4.0
Requires: mod_php_any >= 8.1.0
Supplements: packageand(apache2:%name)
%description apache
This subpackage contains the Apache configuration files
%prep
%setup -q -n %{name}
cp %{SOURCE2} .
cp %{SOURCE3} .
cp %{SOURCE4} .
cp %{SOURCE5} .
### Don't remove git files!!
### git files should not be removed, otherwise nextcloud rise up integrity check failure in some situations.
###
## delete unneeded gitfiles
#rm -r `find . -name ".gitignore" -or -name ".gitkeep" -or -name ".github"`
## remove entries in signature.json to prevent integrity check failure
#find . -iname signature.json \
# -exec sed -i "/\/.gitignore\": ./d" "{}" \; \
# -exec sed -i "/\/.gitkeep\": ./d" "{}" \; \
# -exec sed -i "/\/.github\": ./d" "{}" \;
#rm -f 3rdparty/symfony/debug/Resources/ext/*.{c,h}
%build
%install
# no server side java code contained, alarm is false
idir=$RPM_BUILD_ROOT/%{apache_myserverroot}/%{name}
mkdir -p $idir
mkdir -p $idir/data
mkdir -p $idir/search
cp -aRf * $idir
cp -aRf .reuse $idir
cp -aRf .htaccess $idir
cp -aRf .user.ini $idir
# $idir/l10n to disappear in future
#rm -f $idir/l10n/l10n.pl
if [ ! -f $idir/robots.txt ]; then
install -p -D -m 644 %{SOURCE5} $idir/robots.txt
fi
# create the AllowOverride directive
install -p -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{apache_confdir}/nextcloud.conf
ncpath="%{apache_myserverroot}/%{name}"
sed -i -e"s|@DATAPATH@|${ncpath}|g" $RPM_BUILD_ROOT/%{apache_confdir}/nextcloud.conf
# not needed for distro packages
rm -f ${idir}/indie.json
%if 0%{?suse_version}
# link duplicate doc files
%fdupes -s $RPM_BUILD_ROOT/%{apache_myserverroot}/%{name}
%endif
# CronJob
install -d -m 0755 %{buildroot}%{_sysconfdir}/cron.d
install -D -m 0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/cron.d/%{name}
install -D -m 0644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}-cron.service
install -D -m 0644 %{SOURCE12} %{buildroot}%{_unitdir}/%{name}-cron.timer
sed -i -e"s|@APACHE_USER@|%{apache_user}|g" %{buildroot}%{_sysconfdir}/cron.d/%{name}
sed -i -e"s|@APACHE_MYSERVERROOT@|%{apache_myserverroot}|g" %{buildroot}%{_sysconfdir}/cron.d/%{name}
sed -i -e"s|@APACHE_USER@|%{apache_user}|g" %{buildroot}%{_unitdir}/%{name}-cron.service
sed -i -e"s|@APACHE_MYSERVERROOT@|%{apache_myserverroot}|g" %{buildroot}%{_unitdir}/%{name}-cron.service
mkdir -p %{buildroot}%{_sbindir}
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-cron
%pre
%service_add_pre %{name}-cron.timer %{name}-cron.service
# avoid fatal php errors, while we are changing files
# https://github.com/nextcloud
#
# We don't do this for new installs. Only for updates.
# If the first argument to pre is 1, the RPM operation is an initial installation. If the argument is 2,
# the operation is an upgrade from an existing version to a new one.
if [ $1 -gt 1 -a ! -s %{statedir}/apache_stopped_during_nextcloud_install ]; then
echo "o %{name} pre-install: Checking for running Apache"
# FIXME: this above should make it idempotent -- a requirement with openSUSE.
# it does not work.
%if 0%{?suse_version} && 0
service apache2 status | grep running > %{statedir}/apache_stopped_during_nextcloud_install
service apache2 stop
%endif
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
service httpd status | grep running > %{statedir}/apache_stopped_during_nextcloud_install
service httpd stop
%endif
fi
if [ -s %{statedir}/apache_stopped_during_nextcloud_install ]; then
echo "o %{name} pre-install: Stopping Apache"
fi
if [ $1 -eq 1 ]; then
echo "o %{name} pre-install: First install starting"
else
echo "o %{name} pre-install: Upgrade starting ..."
fi
# https://github.com/nextcloud
if [ -x %{ocphp_bin}/php -a -f %{nc_dir}/occ ]; then
echo "o %{name} pre-install: occ maintenance:mode --on"
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ maintenance:mode --on" || true
echo yes > %{statedir}/occ_maintenance_mode_during_nextcloud_install
fi
%post
%service_add_post %{name}-cron.timer %{name}-cron.service
if [ $1 -eq 1 ]; then
%if 0%{?suse_version}
%if 0%{?sle_version} >= 150400 || 0%{?suse_version} > 1500
a2enmod php8
%else
a2enmod php7
%endif
%endif
fi
if [ -s %{statedir}/apache_stopped_during_nextcloud_install ]; then
echo "o %{name} post-install: Restarting Apache"
## If we stopped apache in pre section, we now should restart. -- but *ONLY* then!
## Maybe delegate that task to occ upgrade? They also need to handle this, somehow.
%if 0%{?suse_version}
service apache2 start
%endif
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
service httpd start
%endif
fi
if [ -s %{statedir}/occ_maintenance_mode_during_nextcloud_install ]; then
echo "o %{name} post-install: occ maintenance:repair (fix possible errors)"
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ maintenance:repair" || true
echo "o %{name} post-install: occ db:add-missing-* (add missing db things)"
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ maintenance:mimetype:update-db" || true
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ db:add-missing-columns" || true
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ db:add-missing-indices" || true
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ db:add-missing-primary-keys" || true
echo "o %{name} post-install: occ update apps"
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ app:update --all" || true
echo "o %{name} post-install: occ upgrade"
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ upgrade" || true
echo "o %{name} post-install: occ maintenance:mode --off"
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ maintenance:mode --off" || true
fi
rm -f %{statedir}/apache_stopped_during_nextcloud_install
rm -f %{statedir}/occ_maintenance_mode_during_nextcloud_install
if [ $1 -eq 1 ]; then
echo "o %{name} post-install: First install complete"
else
echo "o %{name} post-install: Upgrade complete"
fi
%preun
%service_del_preun %{name}-cron.timer %{name}-cron.service
%postun
%service_del_postun %{name}-cron.timer %{name}-cron.service
%files
%defattr(644,root,root,755)
%exclude %{apache_myserverroot}/%{name}/README
%exclude %{apache_myserverroot}/%{name}/README.SUSE
%exclude %{apache_myserverroot}/%{name}/README.SELinux
%doc README README.SUSE README.SELinux
%config(noreplace) %{_sysconfdir}/cron.d/%{name}
%{_sbindir}/rc%{name}-cron
%{_unitdir}/%{name}-cron.service
%{_unitdir}/%{name}-cron.timer
%dir %{apache_serverroot}
%dir %{apache_myserverroot}
%{apache_myserverroot}/%{name}
%attr(-,%{apache_user},%{apache_group}) %{apache_myserverroot}/%{name}/occ
%config(noreplace) %{apache_myserverroot}/%{name}/.user.ini
%defattr(664,%{apache_user},%{apache_group},775)
%{apache_myserverroot}/%{name}/apps
%{apache_myserverroot}/%{name}/core/js/mimetypelist.js
%dir %{apache_myserverroot}/%{name}/core/img/filetypes
%{apache_myserverroot}/%{name}/core/img/filetypes/*
%defattr(660,%{apache_user},%{apache_group},770)
%{apache_myserverroot}/%{name}/config
%{apache_myserverroot}/%{name}/data
%files apache
%config(noreplace) %{apache_confdir}/nextcloud.conf
%changelog