Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH next v2 0/5] New pkg-stats script, with version information
@ 2018-02-21 22:13 Thomas Petazzoni
  2018-02-21 22:13 ` [Buildroot] [PATCH next v2 1/5] support/scripts/pkg-stats-new: rewrite in Python Thomas Petazzoni
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: Thomas Petazzoni @ 2018-02-21 22:13 UTC (permalink / raw)
  To: buildroot

Hello,

This series rewrites the pkg-stats script in Python, and adds two new
very useful information to it:

 - The current version of each package in Buildroot

 - The latest upstream version of each package, as provided by the
   release-monitoring.org web site.

The script then compares the current version in Buildroot with the
latest upstream version, and tells whether they are different.

You can see the script output at:

 https://bootlin.com/~thomas/stats.html

The code is available at:

 https://git.free-electrons.com/users/thomas-petazzoni/buildroot/log/?h=pkg-stats-v2

Changes since v1
================

This version mainly focuses on fixing the numerous comments and issues
pointed out by Ricardo Martincoski (many thanks for his very detailed
and useful review!), and also fixes a few other things:

 - Added copyright notice in the new script

 - Fixed all flake8 warnings (I still personally find the "let's force
   to have two empty lines between every function" a very silly rule,
   but well)

 - Pass the package path to the Package() constructor directly

 - Only introduce CSS properties when they are really needed (some
   were introduced in PATCH 1, but they were only really used by later
   patches)

 - Fix the broken #results internal link, which now properly points to
   the statistics table.

 - Remove double </table> tag.

 - Fix the sorting of the table by defining __eq__ and __lt__ in
   Package(), and make 'packages' a list rather than a dict.

 - Add the build date and git commit in the HTML page footer

 - Pass BR2_HAVE_DOT_CONFIG=y when calling make, in order to fake
   having a .config. This allows "printvars" to dump all variables
   even without a .config.

 - Add newlines in the HTML to make it readable.

More details
============

release-monitoring.org is a very useful web site, monitoring more than
16000 projects. It is also very easy to add new projects to be
monitored. It supports monitoring projects on popular hosting
platforms such as Github, but can also monitor plain HTTP folders, or
even web pages using a regexp to identify what is a version number
within the HTML blurb.

Projects can be found by regular search, but it is also possible to
add a mapping between the name of a package in a given distribution,
and the name of the package as known by release-monitoring.org. For
example in Buildroot "samba" is not named "samba" but "samba4", and
this mapping mechanism allows release-monitoring.org to reply to
requests for samba4 within the Buildroot distribution.

I had very good interactions with the release-monitoring.org
maintainers:

 - They are easily available on IRC

 - They created the "Buildroot" distribution within minutes,
   https://release-monitoring.org/distro/Buildroot/.

 - They have been very responsive to fix issues in existing packages.

It doesn't provide CVE related information for security, so it would
still be useful to extend this mechanism with another CVE related
database. But as we discussed during the last Buildroot meeting in
Brussels, the NIST database is not very up to date, while
release-monitoring.org, thanks to the process being fully automated.

Before people start sending gazillions of patches to update packages,
I would like us to focus on:

 - Adding missing projects on release-monitoring.org

 - Adding missing mappings for the Buildroot distribution on
   release-monitoring.org

 - Deciding how to handle packages such as all python-* packages or
   all x11r7 packages, for which the name never matches with the
   release-monitoring.org package name.

   Do we create a mapping for each of them on release-monitoring.org
   (which we would have to do for every new python package) or do we
   make the script smarter, and attempt to search the package without
   its python- prefix (which won't always work either) ?

Basically, I would like to focus on making the output of the script
more useful/relevant, and then only start getting gazillions of
patches updating packages.

Thanks for your review, and contributions!

Thomas


Thomas Petazzoni (5):
  support/scripts/pkg-stats-new: rewrite in Python
  support/scripts/pkg-stats-new: add -n and -p options
  support/scripts/pkg-stats-new: add current version information
  support/scripts/pkg-stats-new: add latest upstream version information
  support/scripts/pkg-stats: replace with new Python version

 support/scripts/pkg-stats | 1001 +++++++++++++++++++++++++++------------------
 1 file changed, 607 insertions(+), 394 deletions(-)

-- 
2.14.3

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2018-03-22 10:01 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-21 22:13 [Buildroot] [PATCH next v2 0/5] New pkg-stats script, with version information Thomas Petazzoni
2018-02-21 22:13 ` [Buildroot] [PATCH next v2 1/5] support/scripts/pkg-stats-new: rewrite in Python Thomas Petazzoni
2018-02-22  1:58   ` Ricardo Martincoski
2018-03-07 22:35     ` Thomas Petazzoni
2018-02-21 22:13 ` [Buildroot] [PATCH next v2 2/5] support/scripts/pkg-stats-new: add -n and -p options Thomas Petazzoni
2018-02-24  4:54   ` Ricardo Martincoski
2018-03-07 22:35     ` Thomas Petazzoni
2018-02-21 22:13 ` [Buildroot] [PATCH next v2 3/5] support/scripts/pkg-stats-new: add current version information Thomas Petazzoni
2018-02-26  0:47   ` Ricardo Martincoski
2018-03-07 22:25     ` Thomas Petazzoni
2018-03-08  3:14       ` Ricardo Martincoski
2018-03-08  7:48         ` Thomas Petazzoni
2018-02-21 22:13 ` [Buildroot] [PATCH next v2 4/5] support/scripts/pkg-stats-new: add latest upstream " Thomas Petazzoni
2018-02-28  3:03   ` Ricardo Martincoski
2018-03-07 22:41     ` Thomas Petazzoni
2018-03-08  9:52       ` Ricardo Martincoski
2018-03-08  9:56         ` Thomas Petazzoni
2018-03-09  2:41           ` Ricardo Martincoski
2018-03-21 20:58     ` Thomas Petazzoni
2018-03-22  3:11       ` Ricardo Martincoski
2018-03-22  7:53         ` Thomas Petazzoni
2018-03-21 21:35     ` Thomas Petazzoni
2018-03-22  3:17       ` Ricardo Martincoski
2018-03-22 10:01         ` Thomas Petazzoni
2018-02-21 22:13 ` [Buildroot] [PATCH next v2 5/5] support/scripts/pkg-stats: replace with new Python version Thomas Petazzoni
2018-02-24 17:55 ` [Buildroot] [PATCH next v2 0/5] New pkg-stats script, with version information Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox