Bug 194457 - www/calendarserver various issues on FreeBSD10
Summary: www/calendarserver various issues on FreeBSD10
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-18 21:15 UTC by holger
Modified: 2014-11-19 19:48 UTC (History)
2 users (show)

See Also:


Attachments
Patch to fix the reported issues in 10.x (6.89 KB, patch)
2014-10-27 16:46 UTC, Axel.Rau
Axel.Rau: maintainer-approval+
Details | Diff
svn patch against head 372677 (11.85 KB, patch)
2014-11-17 18:58 UTC, Axel.Rau
Axel.Rau: maintainer-approval+
Details | Diff
svn patch against 372801 (9.75 KB, patch)
2014-11-19 18:06 UTC, Axel.Rau
Axel.Rau: maintainer-approval+
Details | Diff
poudriere testport log (658.27 KB, text/plain)
2014-11-19 18:09 UTC, Axel.Rau
Axel.Rau: maintainer-approval+
Details
patch against svn head 372802 (9.74 KB, patch)
2014-11-19 18:31 UTC, Axel.Rau
Axel.Rau: maintainer-approval+
Details | Diff
svn patch rev 372802 (9.74 KB, patch)
2014-11-19 18:36 UTC, Axel.Rau
Axel.Rau: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description holger 2014-10-18 21:15:25 UTC
* txdav/base/propertystore/xattr.py handles FreeBSD8, FreeBSD9 and it needs an ntry for FreeBSD10 too..

* The start script doesn't work on FreeBSD10 for various reasons (using rc_var, caldavd not finding bash due the path, issues with python due the path)

* All calendarserver_* scripts need a bangpath that work with the "python2/python2.7" installation.

* The port should probably install the caldavd.plist to /usr/local/etc/caldavd
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-10-18 21:35:09 UTC
Fix synopsis and notify maintainer.
Comment 2 Axel.Rau 2014-10-19 16:48:05 UTC
>* txdav/base/propertystore/xattr.py handles FreeBSD8, FreeBSD9 and it needs an ntry for FreeBSD10 too..
This should be reported against devel/py-xattr.

> * The port should probably install the caldavd.plist to /usr/local/etc/caldavd
Port option EXAMPLES installs caldavd.plist in ${EXAMPLESDIR}

I will look for the other issues.
Comment 3 holger 2014-10-19 20:50:37 UTC
(In reply to Axel.Rau from comment #2)
> >* txdav/base/propertystore/xattr.py handles FreeBSD8, FreeBSD9 and it needs an ntry for FreeBSD10 too..
> This should be reported against devel/py-xattr.

/usr/local/lib/python2.7/site-packages/txdav/base/propertystore/xattr.py is part of calendarserver. It needs the freebsd10. Upstream is rather slow in picking up patches. Do you have a better contact with them?



> 
> > * The port should probably install the caldavd.plist to /usr/local/etc/caldavd
> Port option EXAMPLES installs caldavd.plist in ${EXAMPLESDIR}
> 
> I will look for the other issues.

thanks!
Comment 4 Axel.Rau 2014-10-27 16:46:48 UTC
Created attachment 148706 [details]
Patch to fix the reported issues in 10.x

> * txdav/base/propertystore/xattr.py handles FreeBSD8, FreeBSD9 and it needs an ntry for FreeBSD10 too..
Changed txdav/base/propertystore/xattr.py to be version independant.
Informed upstream.

> * The start script doesn't work on FreeBSD10 for various reasons (using rc_var, caldavd not finding bash due the path, issues with python due the path)
Startscript fixed.

> * All calendarserver_* scripts need a bangpath that work with the "python2/python2.7" installation.
Added new rundependency 'python' to let the bangpathes work.
Comment 5 John Marino freebsd_committer freebsd_triage 2014-11-01 15:18:16 UTC
maintainer provided fix for reported problem, moving to patch-ready status.
Comment 6 John Marino freebsd_committer freebsd_triage 2014-11-14 08:35:30 UTC
I doubt this is correct:

RUN_DEPENDS+= python:${PORTSDIR}/lang/python

This probably should be "USES+= python:run"  (or equivalent)


Can somebody test that and update the patch?
Comment 7 Axel.Rau 2014-11-15 16:54:20 UTC
(In reply to John Marino from comment #6)
> I doubt this is correct:
> 
> RUN_DEPENDS+= python:${PORTSDIR}/lang/python
This was the only way to get /usr/local/bin/python
linked to python2.
The application scripts have a shebang of
#!/usr/bin/env python 
> 
> This probably should be "USES+= python:run"  (or equivalent)
Just links python2 to interpreter.
> 
> Can somebody test that and update the patch?
Please advice.
Comment 8 John Marino freebsd_committer freebsd_triage 2014-11-15 16:57:44 UTC
this is the first time I'm hearing python version 2 is specifically required.

USES+= python:2,run

Please look in Mk/Uses/python.mk for more information.
Comment 9 Axel.Rau 2014-11-17 18:58:56 UTC
Created attachment 149529 [details]
svn patch against head 372677

Revised patch removes requirement for meta port python by fixing all bang paths.
Reported issues with 10.0 fixed. Tested with 9.2 and 10.1
Comment 10 John Marino freebsd_committer freebsd_triage 2014-11-19 09:36:45 UTC
I see two potential issues so far.

1) SHEBANG_FILES is based on ${WRKSRC}, so "${WRKSRC}/bin/calendarserver_backup" should be "bin/calendarserver_backup"

so all of those need to be fixed.

2) SHEBANG_FILES accepts wildcards, something like

+    ${WRKSRC}/bin/calendarserver_backup \
+    ${WRKSRC}/bin/calendarserver_bootstrap_database \
+    ${WRKSRC}/bin/calendarserver_command_gateway \
+    (etc)

can be replaced by "bin/calendarserver_*" probably

(review Mk/Uses/shebangfix.mk)



Can you take a look and resubmit?
Also, I'd like to see the output of portlint, "make check-plist", and "make stage-qa".  poudriere logs would be even better, but I'll settle for the former.
Comment 11 Axel.Rau 2014-11-19 18:06:22 UTC
Created attachment 149592 [details]
svn patch against 372801

Revised patch with SHEBANG_FILES fixed as suggested.
Comment 12 John Marino freebsd_committer freebsd_triage 2014-11-19 18:08:52 UTC
I hate being picky, but this is important for make:

+    bin/calendarserver_* \
+    bin/icalendar_split \
+    bin/proxyclean \

Those are separated by 4 spaces, not by tabs.
Make expects tabs, and only tabs.

Can you fix and resubmit?  I think it will be okay after that.
Comment 13 Axel.Rau 2014-11-19 18:09:37 UTC
Created attachment 149593 [details]
poudriere testport log

poudriere testport run with patch (attachment 149592 [details]) applied.
Comment 14 John Marino freebsd_committer freebsd_triage 2014-11-19 18:15:16 UTC
in the case of line continuation the spaces aren't breaking anything, but for consistency with the rest of this port and all ports, we still need the tabs.
Comment 15 Axel.Rau 2014-11-19 18:31:26 UTC
Created attachment 149595 [details]
patch against svn head 372802

Replaced spaces by tabs in SHEBANG_FILES
Comment 16 John Marino freebsd_committer freebsd_triage 2014-11-19 18:34:32 UTC
thanks, looks good!

I never moved it out of patch-ready pool (I should have), but I think this is again ready for commit (based on your poudriere log).
Comment 17 Axel.Rau 2014-11-19 18:36:07 UTC
Created attachment 149597 [details]
svn patch rev 372802

Converted spaces to tabs in SHEBANG_FILES
Comment 18 John Marino freebsd_committer freebsd_triage 2014-11-19 19:26:20 UTC
i'll take the PR, but I need to work on it more, unfortunately.


See portlint?

====>> Portlint check
WARN: /disk1/poudriere/data/build/92amd64-default/ref/usr/ports/www/calendarserver/pkg-plist: [122]: @dirrm[try] is deprecated.  If you require special directory handling, use @dir instead and consult the porter's handbook.
WARN: /disk1/poudriere/data/build/92amd64-default/ref/usr/ports/www/calendarserver/pkg-plist: [123]: @dirrm[try] is deprecated.  If you require special directory handling, use @dir instead and consult the porter's handbook.
WARN: /disk1/poudriere/data/build/92amd64-default/ref/usr/ports/www/calendarserver/pkg-plist: [124]: @dirrm[try] is deprecated.  If you require special directory handling, use @dir instead and consult the porter's handbook.


We need to fix that.
Comment 19 commit-hook freebsd_committer freebsd_triage 2014-11-19 19:45:46 UTC
A commit references this bug:

Author: marino
Date: Wed Nov 19 19:45:10 UTC 2014
New revision: 372810
URL: https://svnweb.freebsd.org/changeset/ports/372810

Log:
  www/calendarserver: Fix issues on FreeBSD 10

   * fix RC script
   * Limit to python 2
   * update txdav/base/propertystore for FreeBSD 10
   * clean up and remove @dir* (by marino)

  PR:		194457
  Submitted by:	holger (freyther.de)
  Final fix:	Axel Rau (maintainer)

Changes:
  head/www/calendarserver/Makefile
  head/www/calendarserver/files/caldavd.in
  head/www/calendarserver/files/patch-twext__python__log.py
  head/www/calendarserver/files/patch-twext_python_log.py
  head/www/calendarserver/files/patch-txdav__base__propertystore__xattr.py
  head/www/calendarserver/pkg-plist
Comment 20 John Marino freebsd_committer freebsd_triage 2014-11-19 19:48:21 UTC
Okay, I fixed the pkg-plist, removed an extraneous mkdir, used (), tabbed things.... all passes in poudriere.

Thanks guys!