euscan-ng/README.rst

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

167 lines
6.9 KiB
ReStructuredText
Raw Normal View History

2020-09-11 14:48:42 +02:00
What is euscan-ng ?
===================
2020-09-11 14:48:42 +02:00
dev-portage/euscan-ng
=====================
euscan-ng is a fork of Bernard Cafarelli's euscan: https://github.com/voyageur/euscan
which is a fork of Corentin Chary's euscan: https://github.com/iksaif/euscan
2020-09-11 21:03:34 +02:00
Right now euscan-ng and (legacy) euscan cannot be installed (system-wide) on the same system.
euscan-ng is available in src_prepare overlay as a dev package (app-portage/euscan-ng-9999).
This tool allows to check if a given package has new upstream versions or not.
It will use different heuristic to scan upstream and grab new versions and related urls.
This tool was designed to mimic debian's uscan, but there is a major
2012-05-01 13:50:53 +02:00
difference between the two: uscan uses a specific "watch" file that describes
2020-09-11 21:03:34 +02:00
how it should scan packages, while euscan-ng uses only what can already be found
in ebuilds. Of course, we could later add some informations in metadata.xml
2020-09-11 21:03:34 +02:00
to help euscan-ng do its job more efficiently.
2020-09-11 21:03:34 +02:00
euscan-ng heuristics are described in the "How does-it works?" section.
2012-05-01 14:29:40 +02:00
Examples
--------
::
$ euscan amatch
* dev-ruby/amatch-0.2.7 [gentoo]
2012-05-01 14:29:40 +02:00
Ebuild: /home/euscan/local/usr/portage/dev-ruby/amatch/amatch-0.2.7.ebuild
Repository: gentoo
Homepage: http://flori.github.com/amatch/
Description: Approximate Matching Extension for Ruby
2012-05-01 14:29:40 +02:00
* SRC_URI is 'mirror://rubygems/amatch-0.2.7.gem'
* Using: http://rubygems.org/api/v1/versions/amatch.json
2012-05-01 14:29:40 +02:00
Upstream Version: 0.2.8 http://rubygems.org/gems/amatch-0.2.8.gem
2012-05-01 14:29:40 +02:00
::
2012-05-01 14:29:40 +02:00
$ euscan rsyslog
2012-05-01 14:29:40 +02:00
* app-admin/rsyslog-5.8.5 [gentoo]
2012-05-01 14:29:40 +02:00
Ebuild: /home/euscan/local/usr/portage/app-admin/rsyslog/rsyslog-5.8.5.ebuild
Repository: gentoo
Homepage: http://www.rsyslog.com/
Description: An enhanced multi-threaded syslogd with database support and more.
2012-05-01 14:29:40 +02:00
* SRC_URI is 'http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.8.5.tar.gz'
* Scanning: http://www.rsyslog.com/files/download/rsyslog/rsyslog-${PV}.tar.gz
* Scanning: http://www.rsyslog.com/files/download/rsyslog
* Generating version from 5.8.5
* Brute forcing: http://www.rsyslog.com/files/download/rsyslog/rsyslog-${PV}.tar.gz
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.8.6.tar.gz ... [ !! ]
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.8.7.tar.gz ... [ !! ]
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.8.8.tar.gz ... [ !! ]
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.9.0.tar.gz ... [ ok ]
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.10.0.tar.gz ... [ !! ]
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.11.0.tar.gz ... [ !! ]
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.9.1.tar.gz ... [ ok ]
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.9.2.tar.gz ... [ ok ]
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.9.3.tar.gz ... [ ok ]
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.12.0.tar.gz ... [ !! ]
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.9.4.tar.gz ... [ !! ]
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.9.5.tar.gz ... [ !! ]
* Trying: http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.9.6.tar.gz ... [ !! ]
2012-05-01 14:29:40 +02:00
Upstream Version: 5.9.1 http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.9.1.tar.gz
Upstream Version: 5.9.0 http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.9.0.tar.gz
Upstream Version: 5.9.3 http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.9.3.tar.gz
Upstream Version: 5.9.2 http://www.rsyslog.com/files/download/rsyslog/rsyslog-5.9.2.tar.gz
2012-05-01 14:29:40 +02:00
Hidden settings
---------------
You can configure some settings using the command line, but the __init__.py
file of the euscan package contains more settings, including blacklists and
default settings.
Maybe we should add the ability to use /etc/euscan.conf and
~/.config/euscan/euscan.conf to override these settings.
How does it work ?
==================
euscan has different heuristics to scan upstream and provides multiple
"handlers". First, here is a description of the generic handler.
Scanning directories
--------------------
The first thing to do is to scan directories. It's also what uscan do, but it
uses a file that describe what url and regexp to use to match packages.
euscan uses SRC_URI and tries to find the current version (or part of this version)
in the resolved SRC_URI and generate a regexp from that.
2012-05-01 14:29:40 +02:00
For example for app-accessibility/dash-4.10.1, SRC_URI is::
mirror://gnome/sources/dasher/4.10/dasher-4.10.1.tar.bz2
2012-05-01 14:29:40 +02:00
euscan will scan pages based on this template::
http://ftp.gnome.org/pub/gnome/sources/dasher/${0}.${1}/dasher-${PV}.tar.bz2
Then, from that, it will scan the top-most directory that doesn't depend on
the version, and try to go deeper from here.
Brute force
-----------
Like when scanning directories, a template of SRC_URI is built. Then euscan
generate next possible version numbers, and tries to download the url generated
from the template and the new version number.
2012-05-01 14:29:40 +02:00
For example, running euscan on portage/app-accessibility/festival-freebsoft-utils-0.6::
SRC_URI is 'http://www.freebsoft.org/pub/projects/festival-freebsoft-utils/festival-freebsoft-utils-0.6.tar.gz'
Template is http://www.freebsoft.org/pub/projects/festival-freebsoft-utils/festival-freebsoft-utils-${PV}.tar.gz
Generate version from 0.6: 0.7, 0.8, 0.10, ...
Try new urls: http://www.freebsoft.org/pub/projects/festival-freebsoft-utils/festival-freebsoft-utils-0.7.tar.gz, etc..
Blacklists
----------
euscan uses blacklist for multiple purposes.
2012-05-01 14:29:40 +02:00
BLACKLIST_VERSIONS
For versions that should not be checked at all. sys-libs/libstdc++-v3-3.4
is good example because it's a package which version will always be 3.4
(Compatibility package for running binaries linked against a pre gcc 3.4 libstdc++).
2012-05-01 14:29:40 +02:00
BLACKLIST_PACKAGES
Some packages are dead, but SRC_URI refers to sources that are still being
updated, for example: sys-kernel/xbox-sources that uses the same sources as
vanilla-sources but is not updated the same way.
2012-05-01 14:29:40 +02:00
SCANDIR_BLACKLIST_URLS
For urls that are not browsable. mirror://gentoo/ is a good example: it's
both stupid to scan it and very long/expensive.
2012-05-01 14:29:40 +02:00
BRUTEFORCE_BLACKLIST_PACKAGES and BRUTEFORCE_BLACKLIST_URLS
Disable brute force on those packages and urls. Most of the time it's because
upstream is broken and will answer HTTP 200 even if the file doesn't exist.
2012-05-01 14:29:40 +02:00
ROBOTS_TXT_BLACKLIST_DOMAINS
Don't respect robots.txt for these domains (sourcefourge, berlios, github.com).
Site handlers
-------------
2012-05-01 14:29:40 +02:00
Pecl/PEAR
A site handler that uses the Pecl/PEAR rest API
(http://pear.php.net/manual/en/core.rest.php).
2012-05-01 14:29:40 +02:00
Rubygems
This one uses rubygems's json API
(http://guides.rubygems.org/rubygems-org-api/)
2012-05-01 14:29:40 +02:00
PyPI
2012-05-01 16:56:48 +02:00
Uses PyPI's XML rpc API.