Bug 211102 - www/nextcloud: Update to 10.0.0
Summary: www/nextcloud: Update to 10.0.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Bernard Spil
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2016-07-14 01:22 UTC by joshruehlig
Modified: 2016-08-26 16:48 UTC (History)
2 users (show)

See Also:
loic.blot: maintainer-feedback+
koobs: merge-quarterly?


Attachments
nextcloud diff (489 bytes, patch)
2016-07-15 01:38 UTC, joshruehlig
no flags Details | Diff
svn diff for www/nextcloud (222.60 KB, patch)
2016-08-26 10:34 UTC, Bernard Spil
no flags Details | Diff
svn diff for www/nextcloud (223.23 KB, patch)
2016-08-26 13:29 UTC, Bernard Spil
brnrd: maintainer-approval? (loic.blot)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description joshruehlig 2016-07-14 01:22:44 UTC
Nextcloud needs to be able to write to .user.ini to change the upload size if using PHP-FPM.

Nexcloud appends to it's .htaccess upon installation (during lib/private/setup.php) if it sees the apache 'env' and 'rewrite' modules are available. This is needed to get "Pretty URLs" working properly.

The fix would be changing the first two lines of pkg-plist to...
@dir(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,644) %%WWWDIR%%/.htaccess
@dir(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,644) %%WWWDIR%%/.user.ini
Comment 1 joshruehlig 2016-07-14 01:23:59 UTC
Sorry... not @dir(), just @()
The lines should be...

@(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,644) %%WWWDIR%%/.htaccess
@(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,644) %%WWWDIR%%/.user.ini
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-14 12:20:12 UTC
@Josh, could you please provide a unified diff/patch against the port?
Comment 3 loic.blot 2016-07-14 14:15:56 UTC
Please note the current diff version is okay for me except the mentionned points with htaccess and user.ini
Comment 4 joshruehlig 2016-07-14 14:19:56 UTC
Ok, let me test to make certain the changes I propose work as expected.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-14 14:42:24 UTC
@loic.blot After Josh attaches a proposed patch, please set maintainer-approval to +
Comment 6 joshruehlig 2016-07-15 01:38:29 UTC
Created attachment 172543 [details]
nextcloud diff

Ok tested and patch attached.
Comment 7 Bernard Spil freebsd_committer freebsd_triage 2016-08-26 10:34:57 UTC
Created attachment 174094 [details]
svn diff for www/nextcloud

Wanted to try the new 10.0 version so I modified the port. Discovered this PR so included the fix into the 10.0 upgrade.

I had problems with the upgrade that are likely to stem from an earlier manual upgrade from owncloud to nextcloud from upstream tarball.

> Updating <federation> ... An unhandled exception has been thrown: Error: Call to undefined method OCA\Federation\AppInfo\Application::setupCron()                                                        
This was solved by backing up the config.php file, deleting everything from %%WWWDIR%%/nextcloud dir (not the user data and config dir) and re-installing the package. If other users encounter this as well a pkg-message would be required.
Comment 8 loic.blot 2016-08-26 10:47:27 UTC
Comment on attachment 174094 [details]
svn diff for www/nextcloud

Thanks for your report, i was working on this upgrade atm.

I noticed in my diff i have this at the end:

@@ -10839,7 +10933,6 @@
 %%WWWDIR%%/updater/vendor/symfony/process/composer.json
 %%WWWDIR%%/updater/vendor/symfony/process/phpunit.xml.dist
 %%WWWDIR%%/version.php
-@dir %%WWWDIR%%/apps/gallery/build/documentation/reports/code coverage
 @dir %%WWWDIR%%/apps/gallery/documentation/wiki
 @dir(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,) %%WWWDIR%%/apps
 @dir(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,) %%WWWDIR%%/config


Why it's not present in your diff

Thanks !
Comment 9 loic.blot 2016-08-26 10:58:01 UTC
Can you also modify the pkg-message.in to add this part at the end ?
This is due to an upgrade process modification which require user manipulations when you are using MySQL or PostgreSQL:

https://lut.im/hsJ4IkHr5A/I8bVrnyAKtzkUChP.png

At Nextcloud 11.0, if it doesn't come too shortly we will remove the owncloud => nextcloud part




***********************************************************************
*                       NEXTCLOUD VERSION UPGRADE                     *
***********************************************************************

After a version migration you should upgrade your nextcloud instance
using command line:

* cd /usr/local/www/nextcloud
* su -m www -c "php ./occ upgrade"
Comment 10 loic.blot 2016-08-26 11:03:18 UTC
Except the two issues mentioned before the patch is okay for me. Awaiting your answer
Comment 11 Bernard Spil freebsd_committer freebsd_triage 2016-08-26 13:29:08 UTC
Created attachment 174096 [details]
svn diff for www/nextcloud

Updated the diff as per your request.
Comment 12 Bernard Spil freebsd_committer freebsd_triage 2016-08-26 13:30:33 UTC
(In reply to loic.blot from comment #8)
I have that dir still in my installation

> drwxr-xr-x  2 root  wheel  3 Aug 25 06:00 apps/gallery/build/documentation/reports/code coverage/
> -r--r--r--  1 www  www  0 Aug 25 06:00 apps/gallery/build/documentation/reports/code coverage/index.html

Contains an empty index.html?
Comment 13 loic.blot 2016-08-26 13:33:42 UTC
I think we should remove it to have cleaner install. If you agree, then update diff, else this is good for me
Comment 14 Bernard Spil freebsd_committer freebsd_triage 2016-08-26 15:35:44 UTC
(In reply to loic.blot from comment #13)
Just checked, no check-plist issues with

> @dir %%WWWDIR%%/apps/gallery/build/documentation/reports/code coverage
removed

Committing!
Comment 15 commit-hook freebsd_committer freebsd_triage 2016-08-26 15:41:33 UTC
A commit references this bug:

Author: brnrd
Date: Fri Aug 26 15:40:58 UTC 2016
New revision: 420927
URL: https://svnweb.freebsd.org/changeset/ports/420927

Log:
  www/nextcloud: Update to 10.0.0

    - Update to new major release 10.0.0
    - Add upgrade instruction to pkg-message
    - Fix mode on .htaccess / .user.ini [1]
    - Switch USE_OPENSSL to USES= ssl
    - Update pkg-plist for new version

  PR:             211102
  Submitted by:   Josh Ruehlich <joshruehlig@gmail.com> [1]
  Reported by:    Josh Ruehlich <joshruehlig@gmail.com> [1]
  Approved by:    Loic Blot <loic.blot@unix-experience.fr>
  MFH:            2016Q3

Changes:
  head/www/nextcloud/Makefile
  head/www/nextcloud/distinfo
  head/www/nextcloud/files/pkg-message.in
  head/www/nextcloud/pkg-plist