Bug 206045 - deskutils/gcalcli: Backport fix for oauth2client > 1.4.12
Summary: deskutils/gcalcli: Backport fix for oauth2client > 1.4.12
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: Kubilay Kocak
URL: https://github.com/insanum/gcalcli/is...
Keywords: easy, patch
Depends on:
Blocks:
 
Reported: 2016-01-08 20:25 UTC by Henrik Hudson
Modified: 2016-07-30 11:03 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback? (ports)
koobs: merge-quarterly+


Attachments
proposed patch (783 bytes, patch)
2016-01-22 15:12 UTC, Lawrence Chen
koobs: maintainer-approval+
Details | Diff
updated proposed patch (1.59 KB, patch)
2016-01-23 01:43 UTC, Lawrence Chen
koobs: maintainer-approval? (ports)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Hudson 2016-01-08 20:25:08 UTC
It looks like the current dependency on the oauth2client requires a version
<=1.4.12 to properly work. oauth2client current is at 1.5.2 in
ports.

According to this:
https://github.com/insanum/gcalcli/issues/204

Upstream developer suggests the move from gflags to argparse will be complete in version 3.4 and port can re-enabled then.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2016-01-08 20:25:08 UTC
Maintainer informed via mail
Comment 2 Lawrence Chen 2016-01-22 15:12:14 UTC
Created attachment 165961 [details]
proposed patch

In the upstream py-oauth2client code, on August 25, 2015: 

The old_run [old run()] module was removed, had been deprecated since July 2, 2013.

  """This module holds the old run() function which is deprecated, the
  tools.run_flow() function should be used in its place."""

I made this patch (import run_flow as run) to get things working again.

The issue is still present in upstream gcalcli master (last commit Jan 21, 2016).  

Incidentally, gcalcli has tagged releases to v3.3.2 (Sep 14, 2015), 4 commits behind master.  v3.2 was Dec 16, 2014.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-22 15:47:24 UTC
Thank you Lawrence!

Could you submit this as an upstream PR please and reply with the link so I can use it in the port commit (so upstream seems the reference ;])
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-22 15:48:15 UTC
Comment on attachment 165961 [details]
proposed patch

maintainer timeout (14 days)
Comment 5 Henrik Hudson 2016-01-22 18:48:02 UTC
Sweet. Thanks. 

note: I'm the maintainer, so I can rebuild once that patch goes in upstream.
Comment 6 Lawrence Chen 2016-01-23 01:43:23 UTC
Created attachment 165983 [details]
updated proposed patch

In further testing, the patch doesn't work when authentication is needed, as run() took at least 2 parameters, while run_flow takes at least 3 parameters.  It only worked since I had already authenticated.

Updated the patch to address this.  Not sure if upstream will like my proposed patch....
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-23 07:17:19 UTC
(In reply to rhavenn from comment #5)

Maintainer of the port? If so, please update your Bugzilla account email to match so the system can recognize it
Comment 8 Henrik Hudson 2016-01-28 04:10:59 UTC
thanks. I'll work on getting in tomorrow or over the weekend.
Comment 9 Lawrence Chen 2016-02-04 16:01:11 UTC
FYI, upstream closed my issue #229 as duplicate of #211 -- which was similar to my earlier patch (import run_flow as run).  Still preferring that a switch to using argparse over gflags is the way it'll get done.  That branch has commits between September 7-9....
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-28 12:15:01 UTC
Huge apologies for the delay, I will be committing this shortly
Comment 11 commit-hook freebsd_committer freebsd_triage 2016-07-30 10:52:47 UTC
A commit references this bug:

Author: koobs
Date: Sat Jul 30 10:51:47 UTC 2016
New revision: 419306
URL: https://svnweb.freebsd.org/changeset/ports/419306

Log:
  deskutils/gcalcli: Fix for oauth2client > 1.4.12

  gcalcli requires a dependency on oauth2client <= 1.4.12 to work
  correctly, as higher versions replaced the run() method with run_flow().

  The version of oauth2client in ports is 2.2.0 at the time of writing.

  Fixes for the issue [1][2][3] have been submitted upstream in multiple
  cases, although upstream has closed them as duplicates of a refactor
  issue [4] that is yet to be committed/resolved.

  This commit commits the proposed change in issue #229 [2].

  While I'm here:

  * Explicitly specify (and limit) supported Python versions to -2.x
  * Add python to CATEGORIES
  * Group, re-order and sort USE{s}, NO_* and files/plist sections
  * Capitalize OPTIONS descriptions

  [1] https://github.com/insanum/gcalcli/pull/211
  [2] https://github.com/insanum/gcalcli/issues/229
  [3] https://github.com/insanum/gcalcli/issues/244
  [4] https://github.com/insanum/gcalcli/issues/165

  PR:		206045
  Submitted by:	Lawrence Chen <beastie tardisi com>
  Approved by:	portmgr (maintainer timeout, 6+ months)
  MFH:		2016Q3

Changes:
  head/deskutils/gcalcli/Makefile
  head/deskutils/gcalcli/files/
  head/deskutils/gcalcli/files/patch-gcalcli
Comment 12 commit-hook freebsd_committer freebsd_triage 2016-07-30 10:57:50 UTC
A commit references this bug:

Author: koobs
Date: Sat Jul 30 10:57:14 UTC 2016
New revision: 419307
URL: https://svnweb.freebsd.org/changeset/ports/419307

Log:
  MFH: r419306: deskutils/gcalcli: Fix for oauth2client > 1.4.12

  gcalcli requires a dependency on oauth2client <= 1.4.12 to work
  correctly, as higher versions replaced the run() method with run_flow().

  The version of oauth2client in ports is 2.2.0 at the time of writing.

  Fixes for the issue [1][2][3] have been submitted upstream in multiple
  cases, although upstream has closed them as duplicates of a refactor
  issue [4] that is yet to be committed/resolved.

  This commit commits the proposed change in issue #229 [2].

  While I'm here:

  * Explicitly specify (and limit) supported Python versions to -2.x
  * Add python to CATEGORIES
  * Group, re-order and sort USE{s}, NO_* and files/plist sections
  * Capitalize OPTIONS descriptions

  [1] https://github.com/insanum/gcalcli/pull/211
  [2] https://github.com/insanum/gcalcli/issues/229
  [3] https://github.com/insanum/gcalcli/issues/244
  [4] https://github.com/insanum/gcalcli/issues/165

  PR:		206045
  Submitted by:	Lawrence Chen <beastie tardisi com>
  Approved by:	portmgr (maintainer timeout, 6+ months)

  Approved by:	ports-secteam (blanket)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/deskutils/gcalcli/Makefile
  branches/2016Q3/deskutils/gcalcli/files/
Comment 13 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-30 11:03:39 UTC
Committed with minor changes and merged to latest quarterly.

Thank you again for the fix Lawrence