notbugAs an Amazon Associate I earn from qualifying purchases.
Want a good read? Try FreeBSD Mastery: Jails (IT Mastery Book 15)
All times are UTC
non port: ports-mgmt/portscout/files/

Number of commits found: 2

Monday, 4 Jan 2016
16:50 koobs search for other commits by this committer
ports-mgmt/portscout: Make GitHub ports work, fix bugs

A number of people reported no updates being detected for ports using
USE_GITHUB=yes, even after originally adding the GitHub site handler in
r401037 [1]. Investigation revealed that the FindNewestFile subroutine
and the vercompare() method assumed (or are designed so) that responses
returned from site handlers will be in a normalised version format. For
site handlers that return 'versions', this works well. For the github
handler, in the fallback use of the API for fetching repository tags, it
does not.

Additionally it turns out, portscout currently only uses/stores a
normalized version ('ver') in its database, in its general design
attempt to be a generic version comparison tool

In particular, portscout does not reference or store PORTVERSION
or DISTVERSION{FULL}, so we have nothing 'canonical' to compare
the responses from Github (tags) against.

This change special-cases Github in the FindNewestFile subroutine, which
was obtained via Portroach [2] (OpenBSD's portscout fork).

Extending this, we also now only match version-esque looking strings
from the tag, in an attempt to normalise, because they come in many
forms, including {foo-}X.Y.Z{-bar}, foo_X_Y_Z, among others.

While I'm here,

* Fix copypasta of $github_client_id, when $github_client_secret was
* Add code to use authenticated requests for Github project tags in the
  fallback (to /releases) case.
* Add and update some more debug messages to help diagnosis of future

Special thank you's to:

 * matthew, allanjude, mandree, des, Brendan Molloy for your regex, perl
   help and moral support.


Differential Revision:	D4780
Original commitRevision:405250 
Sunday, 8 Nov 2015
07:37 koobs search for other commits by this committer
ports-mgmt/portscout: Add GitHub and PyPI site handlers & MORE!

Over the past several months appears to have been
more frequently NOT finding updates, particularly for ports that use

Portscout has also never worked for ports using GitHub for distribution
files due to the following:

  a) Portscout, prior to 'guessing', requests a randomly named file
     from the Site and expects a 4xx (404) in response. If it doesn't
     receive a 4xx response, it increments a 'lie counter' and does not
     check the site again in the next run.
  b) The GitHUB handlers (SUBDIR/MASTER_SITES) in
     construct a URL that ends in a a dummy query paramater (for the
     filename), so that fetch saves the correct filename to DISTDIR.
     This means for any DISTFILE name provided, a 200 OK response is

These two factors unfortunately leave us in a position where there is no
good way to workaround this in the ports framework, including overriding
reasons (not matching distinfo, file conflicts in DISTDIR, etc)

Fortunately, the portroach project (OpenBSD's fork of portscout)
contains a site handler for GitHub and PyPI (among others) already [1].

These site handlers use API endpoints at GitHub and PyPI that respond
JSON respectively, providing a faster and more accurate way to determine
the latest version of a package, without having to go through the
'guessing' process.

This commit:

- Adds GitHub and PyPI site handlers, and modifies or extends them to
  accept/match our MASTER_SITES URL's.
- Adds authenticated API request support and two settings for the
  GitHub site handler
- Add p5-JSON to RUN_DEPENDS (needed by new site handlers)
- Add HTTPS option for supporting https:// MASTER_SITES. Currently
  portscout does not check (fails) https:// MASTER_SITES [2]
- Take MAINTAINER'ship
- Adds badly needed logging/debugging messages to key parts of the
  process retaining the conditional logic that ties the verbosity to
  "quiet" or "debug" portscout.conf settings.
- Renables the SQLITE3 option (previously commented out) and renames it
  to SQLITE (the standard, as per
- Creates a DATABASE option group allowing either/or SQLITE or
  POSTGRESQL to be selected
- Switches option conditionals where possible to options helpers
- Backport a fix for maintainer matching/mapping [3]
- Updates and sorts pkg-plist

This change was tested again ports maintained by me, and resulted in
'new versions' being found and reported for 42 of my ports (of 123).

[2] Reported by: truckman

PR:			203996
Approved by:		maintainer (timeout, 15 days)
Differential Revision:
Original commitRevision:401037 

Number of commits found: 2