Files
nextcloud/nextcloud.spec

334 lines
11 KiB
RPMSpec
Raw Permalink Normal View History

- Update to 31.0.7 * server - Fix(singularandpluralfiles):implemented ternary operator to handle si… (server#51419) - Fix(core): correctly show displayname when picking a file (server#53347) - Fix(imip): dont compare events for the reply message (server#53349) - Fix(user_ldap): Harmonize parameter obfuscation and serialization accross logging methods (server#53357) - Docs(caldav): improve documentation of CalDavBackend::getCalendarsForUserCount (server#53358) - Fix(notifications): Fix check for hasNotifiers when all apps use Regi… (server#53365) - Fix: Run cleanByMoundId query on all shards (server#53380) - Fix(settings): show group label instead of gid in accounts management (server#53411) - Test: files_sharing add test for LoadAdditionalListener (server#53416) - Test: run all files_external tests for S3 (server#53425) - Fix: unblock ffmpeg on some broken videos (server#53431) - Fix: allow hinting the shard keys for joined tables (server#53452) - Fix(UserRow): fallback to group name in case of undefined availableGroup (server#53509) - Fix(files_versions): only handle path updates when there is path (server#53518) - Fix(encryption): Do not register user key related event listeners (server#53520) - Fix: refactor request token handling and do not update with invalid result (server#53522) - Fix(ObjectStore): Make S3 "connect_timeout" option configurable (server#53532) - Fix: Fix Undefined array key "flags" on upgrade (server#53536) - Fix(core): getRequestToken import typo (server#53543) - Fix(files): auto reload sidebar tags on update (server#53545) - Fix: hide guests group when searching for principals (server#53546) - Fix: do not extract fields for blank template (server#53547) - Fix: Set public link upload email notification to opt-in (server#53549) - Fix(files_sharing): Hide link shares for users in excluded groups (server#53554) - FilesList] Use the correct theming instance name from capabilities (server#53571) - Files_versions] Fix sidebar version item style (server#53577) - Fix(s3): retry failed multipart uploads with decreased concurrency (server#53581) - Fix(files): add plural form for selected nodes (server#53589) - Fix: clear opcache after app extraction (server#53591) - Feat: add ocs route to get apps enabled for current user (server#53599) - Fix(files_sharing): do not double escape the share title (server#53604) - Fix: reload login page after password reset (server#53609) - Feat: improve logging of fopen failures for smb (server#53612) - Fix(core): Make --password-from-env work with NC_PASS everywhere (server#53618) - Fix(files_reminders): Join the reminders with the file system metadata (server#53642) - Fix CSRF token not being refreshed while a two-factor challenge is ongoing (server#53646) - Fix: make Rotate a TimedJob and run every hour (server#53655) - Fix: revive always storing lowercased email addresses (server#53660) - Fix(admin_audit): Avoid crash when rename event fileid changes (server#53664) - Fix(encryption): Catch exceptions in encrypt-all command and continue (server#53666) - Feat(occ): Add commands to list all routes and match a single one (server#53672) - Fix: don't scan the same storage multiple times (server#53675) - Fix(dav): catch exception on non local account (server#53681) - Fix(profile): Consistent email confirmation pages (server#53686) - Fix(settings): use correct scope for translations (server#53704) - Fix(files_sharing): add mime fallback to public preview too (server#53715) - Fix(files_sharing): Stop hiding delete share button in advanced settings menu (server#53724) - Perf(dav): Preload dav search with tags/favorites (server#53730) - Fix(files_sharing): Hide own reshares (server#53743) - Chore(public): Remove unused union type for user mount events (server#53745) - Fix: don't try to get fileid for non exising nodes when serializing events file (server#53748) - Fix(ROS): Document hide-download option on files (server#53749) - Fix(syslog): open syslog channel on write (server#53758) - Perf: Skip photos related properties in custom properties (server#53769) - Fix(cypress): add missing PublicShareUtils.ts (server#53772) - Fix(files_versions): Log failure to compute node path (server#53782) - Feat(taskprocessing): add toggle for AI guest restriction (server#53784) - Fix(files): provide boundaries for FileListTableHeaderActions element (server#53786) - Fix(files_versions): Log error instead of crashing when event listeners get called on non-existing files (server#53793) - Revert "fix(dav): only consider user's principal for unsharing entries" (server#53891) * activity - Fix(FilesHooks): Catch all exceptions when looking up unrelated users (activity#2063) * circles - Update displayname on new member (circles#2033) - Fix: Get Sanitized Name (circles#2036) - Ignore eventual duplicate entries (circles#2038) * files_pdfviewer - Fix: Fix content size (files_pdfviewer#1232) * photos - Fix: Set version number to stable and add migration to fix configvalues (photos#3095) * suspicious_login - Fix(php): suppress notice of JsonSerializable::jsonSerialize (suspicious_login#1012) - Ci: add fixup check (suspicious_login#997) * text - Fix: Replace attachment file IDs when copying markdown files (text#7307) - Fix(files): Add smooth animation via clicking on heading (text#7320) - Fix(deps): bump psr/log to v3 for NC 31 (text#7346) - Fix(character-count): use the NcActionTexts name prop (text#7373) - Debug(SessionMiddleware): Log if we have an invalid session (text#7374) - Fix/out of sync (text#7379) - Fixed issue nextcloud/notes/#1538 (text#7382) - Fix(links): Use custom link handling only for text-only links (text#7387) - Revert "debug(SessionMiddleware): Log if we have an invalid session" (text#7392) * viewer - Fix: add route query for image editor (viewer#2862) - Fix: image editor focus trap (viewer#2899) OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=277
2025-07-11 11:48:05 +00:00
#
# spec file for package nextcloud
#
# Copyright (c) 2025 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: 31.0.7
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.5.0
Requires: php >= 8.2.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.5.0
Requires: mod_php_any >= 8.2.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}
%fdupes %buildroot%{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
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ maintenance:repair --include-expensive" || 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 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 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