Bug 200245 - comms/owfs: Update to 3.1p0
Summary: comms/owfs: Update to 3.1p0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dmitry Marakasov
URL:
Keywords: needs-patch, patch
Depends on:
Blocks:
 
Reported: 2015-05-16 17:24 UTC by admin
Modified: 2015-08-26 16:30 UTC (History)
3 users (show)

See Also:
johan: maintainer-feedback+


Attachments
diff -Nru comms/owfs.orig comms/owfs (3.21 KB, patch)
2015-05-16 17:24 UTC, admin
no flags Details | Diff
new diff, add missed USES=pkgconfig (3.37 KB, patch)
2015-05-17 19:42 UTC, admin
no flags Details | Diff
unset X options, code clean (4.88 KB, patch)
2015-05-17 20:25 UTC, admin
no flags Details | Diff
revert pkg-plist (4.29 KB, patch)
2015-05-18 06:51 UTC, admin
no flags Details | Diff
poudriere bulk -t log (581.61 KB, text/x-log)
2015-05-18 07:31 UTC, Andrey Fesenko
no flags Details
fix files/patch-module_owfs_src_c_owfs.c (398 bytes, text/x-csrc)
2015-05-18 07:54 UTC, Andrey Fesenko
no flags Details
Patch for broken ow_rwlock.c (334 bytes, patch)
2015-05-18 18:17 UTC, Johan Ström
no flags Details | Diff
poudriere bulk -t log (584.97 KB, text/x-log)
2015-05-21 05:08 UTC, Andrey Fesenko
no flags Details
combined patch (5.04 KB, patch)
2015-06-11 19:24 UTC, admin
no flags Details | Diff
combined with pyo, -O and without do-build (5.35 KB, patch)
2015-06-17 06:32 UTC, admin
no flags Details | Diff
Final port patch (5.52 KB, patch)
2015-06-17 08:08 UTC, Johan Ström
johan: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description admin 2015-05-16 17:24:58 UTC
Created attachment 156834 [details]
diff -Nru comms/owfs.orig comms/owfs

update owfs port to version 3.1p0

see attachment
Comment 1 admin 2015-05-17 19:42:08 UTC
Created attachment 156859 [details]
new diff, add missed USES=pkgconfig

add missed USES=pkgconfig
Comment 2 admin 2015-05-17 20:25:30 UTC
Created attachment 156861 [details]
unset X options, code clean

third version =)
Comment 3 Johan Ström 2015-05-18 06:29:58 UTC
Hi,

thanks for the patch! My only objection is the changes made to pkg-plist, a lot of conditionals have been removed, and some files have been removed totally (i.e. python, tcl). If this is adjusted, I see no problem with accepting it (haven't tested it myself though).


Johan
Comment 4 Andrey Fesenko 2015-05-18 06:49:19 UTC
(In reply to johan from comment #3)
Yes, pkg-plist my fault, too relied on automation (make makeplist)
need use first version https://bugs.freebsd.org/bugzilla/attachment.cgi?id=156834&action=diff simple change 2.8->3.0
Comment 5 admin 2015-05-18 06:51:40 UTC
Created attachment 156863 [details]
revert pkg-plist

I revert pkg-plist to previous patch version
Comment 6 Johan Ström 2015-05-18 06:54:36 UTC
156863 looks good to me!

The porter admins usually want the output of 'portlint -A' and a poudriere testport log, can you provide this as well?
Comment 7 admin 2015-05-18 07:06:06 UTC
lissyara# portlint -A
WARN: Makefile: [59]: possible direct use of command "python" found. use ${PYTHON_CMD} instead.
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
WARN: /usr/ports/comms/owfs/files/patch-module_owfs_src_c_owfs.c: patch was not generated using ``make makepatch''.  It is recommended to use ``make makepatch'' to ensure proper patch format.
WARN: Consider to set DEVELOPER=yes in /etc/make.conf
0 fatal errors and 4 warnings found.
lissyara#
Comment 8 Andrey Fesenko 2015-05-18 07:31:12 UTC
Created attachment 156864 [details]
poudriere bulk -t log

for Comment 5 version patch
Comment 9 Andrey Fesenko 2015-05-18 07:54:34 UTC
Created attachment 156865 [details]
fix files/patch-module_owfs_src_c_owfs.c

regenerate files/patch-module_owfs_src_c_owfs.c "make makepatch" for remove warning portlint
Comment 10 Johan Ström 2015-05-18 18:17:14 UTC
I've found two problems:

a) OWFS does not build without EXTENDED_RWLOCK_DEBUG enabled. Patch attached & also commited upstream (https://sourceforge.net/p/owfs/code/ci/289eaf2329b8cc8b80aa85c6e8572bd6be124629/)

b) The Makefile patch removes some python magic. The result is failed testport QA:

====> Running Q/A tests (stage-qa)
Error: 'lib/python2.7/site-packages/ownet/connection.pyc' is referring to /wrkdirs/usr/ports/comms/owfs/work/stage
Error: 'lib/python2.7/site-packages/ownet/__init__.pyc' is referring to /wrkdirs/usr/ports/comms/owfs/work/stage
Error: 'lib/python2.7/site-packages/ow/__init__.pyc' is referring to /wrkdirs/usr/ports/comms/owfs/work/stage
*** Error code 1


Any specific reason for changing that part of the Makefile?
Comment 11 Johan Ström 2015-05-18 18:17:49 UTC
Created attachment 156889 [details]
Patch for broken ow_rwlock.c
Comment 12 Andrey Fesenko 2015-05-21 05:08:14 UTC
Created attachment 156994 [details]
poudriere bulk -t log

Сonfirm need revert python magic for build with python option.

I'm test new patch, build success without any DEBUG (OWDEBUG and OWMUTEXDEBUG)

Log success build without DEBUGS
https://bitbucket.org/f_andrey/redports_andrey/src/23e12be3f844ba20834addb4f7e63bf4e186c34c?at=owfs
Comment 13 Johan Ström 2015-05-21 06:38:52 UTC
Great!

Now my only question left is, why compile python two times? The do-build compileall calls are rendered moot by doing it in post-install, I would think? 

For the record, the post-install python cmd comes from this page: https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/using-python.html
Comment 14 Kubilay Kocak freebsd_committer freebsd_triage 2015-05-21 10:32:22 UTC
Thanks for following up and progressing this issue Johan.

Submitter, can you combine all patches to the current port and attach a single attachment produced via svn diff, diff -U or port diff (porttools) please.

Please also ensure you obsolete all previous patches so that it's clear what needs to be committed. You can do so by clicking on Attachment "Details", clicking "Edit Details" then ticking "Obsolete".

Let's also ensure that the the QA results (poudriere logs) are updated to account for all of the latest changes.

Johan, when this issue is ready to commit, please mention which "attachment xxxxx is approved" and set maintainer-feedback to +
Comment 15 admin 2015-06-11 19:23:59 UTC
sorry for long response.
see new combined patch
Comment 16 admin 2015-06-11 19:24:44 UTC
Created attachment 157649 [details]
combined patch
Comment 17 Johan Ström 2015-06-14 21:17:07 UTC
Thanks!
I'm still unclear on why the do-build step is added on line 119? The compile-all step is done in post-install, why add it in do-build too?
Comment 18 admin 2015-06-15 05:09:17 UTC
I think, Andrey Fesenko
Comment 19 Andrey Fesenko 2015-06-16 13:08:34 UTC
(In reply to johan from comment #17)

I do not insist on keeping my patch, but many ports carry a clear procedure for compiling python, therefore, it has been added to section do-build:

when discussing the need for this section, in IRC #freebsd-python came the proposal
(12:22:08) koobs: faa: you probably want distversion for that version string
Comment 20 Johan Ström 2015-06-16 16:54:44 UTC
Okay. If I understand correct, the same compilation is done later in post-install anyway, since we have to build with the specific hack from https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/using-python.html.

I did some testing. The optimized files (-O) are not actually built at all, maybe erased somehow? If I add the following...

	(cd ${STAGEDIR}${PREFIX} \
		 && ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
		-d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;})

..I get the following errors:

Error: Orphaned: %%PYTHON_SITELIBDIR%%/ow/__init__.pyo
Error: Orphaned: %%PYTHON_SITELIBDIR%%/ownet/__init__.pyo
Error: Orphaned: %%PYTHON_SITELIBDIR%%/ownet/connection.pyo

Without the above change (only having @${PYTHON_CMD} -O -m compileall ${WRKSRC}), the .pyo files are never installed and thus never orphaned.


My vote is to do the following:

* Remove the do-build section python calls
* Add the above compileall with the -O flag to post-install
* Add .pyo files for each .pyc file in pkg-plist

With those changes, it builds fine here, with .pyo files installed.

To admin@lissyara.su, could you add those minor changes to the patch you've already created please? Then I think we're good for maintainer-approval.
Comment 21 admin 2015-06-17 06:31:21 UTC
see attachment
Comment 22 admin 2015-06-17 06:32:44 UTC
Created attachment 157826 [details]
combined with pyo, -O and without do-build

combined v2
Comment 23 Johan Ström 2015-06-17 08:08:06 UTC
Created attachment 157827 [details]
Final port patch

Thanks! Almost correct, the -O section was supposed to be in addition to the previous one, not instead of. This attached patch corrects this (and also my email address).

This should be the final one, I think. I cannot mark your patch as obsolete though.

Marked maintainer-approval +!
Comment 24 admin 2015-07-12 13:27:16 UTC
maybe somebody commit this?
Comment 25 admin 2015-07-24 06:30:00 UTC
maybe somebody commit this?
Comment 26 Johan Ström 2015-07-28 08:46:45 UTC
Not sure how to "call out" for commits.. 
If you remove the 'needs-patch' keyword and add a 'patch-ready' keyword, it might help?
Comment 27 admin 2015-07-28 08:51:04 UTC
I cannot modify  "Keywords" field...
Comment 28 Johan Ström 2015-07-28 16:58:27 UTC
Oh, ok. I assumed that the creator of the issue would be able to...
Don't know what else I can do except setting "maintainer-approval +"
Comment 29 admin 2015-08-14 05:52:52 UTC
maybe somebody commit this?
Comment 30 commit-hook freebsd_committer freebsd_triage 2015-08-26 16:30:26 UTC
A commit references this bug:

Author: amdmi3
Date: Wed Aug 26 16:29:57 UTC 2015
New revision: 395372
URL: https://svnweb.freebsd.org/changeset/ports/395372

Log:
  - Update to 3.1p0

  PR:		200245
  Submitted by:	johan@stromnet.se (maintainer)
  Reported by:	admin@lissyara.su

Changes:
  head/comms/owfs/Makefile
  head/comms/owfs/Makefile.options
  head/comms/owfs/distinfo
  head/comms/owfs/files/patch-module_owfs_src_c_owfs.c
  head/comms/owfs/files/patch-module_owlib_src_c_ow__rwlock.c
  head/comms/owfs/pkg-plist