67 Commits

Author SHA1 Message Date
Christoph Reiter
a19180130b pkgextra: allow multiple values for reference mapping
Since we added PURLs instead of key->value we map to key->list[value]
since the keys are not longer unique.
2025-02-16 19:12:52 +01:00
Christoph Reiter
7f4f822e9b make newer mypy happy
it can't figure out that .version can never be None there,
so refactor to add asserts
2025-02-07 16:11:13 +01:00
Christoph Reiter
bf40a8d007 pypi: stop guessing the pypi name based on the package name
To avoid false positives in case there is "python-foo" and "foo" in the repo.
Also rename/comment some things to make them more clear.
2025-01-17 11:06:18 +01:00
Christoph Reiter
fd3925efa0 Only show an outdated banner if the git version is too old
And not the version in the repo.
If the new version is in git, there is usually nothing to do, except
waiting for it to reach the repo.
2024-07-23 00:14:27 +02:00
Christoph Reiter
0daf0070de Add a link to the "source-only tarball" 2024-07-20 16:46:25 +02:00
Christoph Reiter
8b69672ee7 Fix error in case all vulns of a package have been ignored
We guarded in various places by whether vulns exist and then used
worst_vulnerability to select a color, but in case all are ignored
worst_vulnerability is None and things fail.

Introduce all_vulnerabilities/active_vulnerabilities/worst_active_vulnerability
properties and make sure that worst_active_vulnerability is always guarded
properly.
2024-06-30 16:01:53 +02:00
Christoph Reiter
44a4f46ec6 anitya: don't link if explicitely disabled
If the PKGBUILD contains an empty anitya entry don't try to guess
the project based on the package name, just skip it.
2024-05-25 18:22:19 +02:00
Christoph Reiter
16c621476e security: use the vuln sort key for sorting the package, not just the severity
At least for CVEs this gives us the critical CVEs for the newest year first,
since they are sorted by ID also.
2024-03-29 14:34:35 +01:00
Christoph Reiter
02d3a1bd02 Respect the new ignore_vulnerabilities field
It'a a list of CVE IDs or GHSA IDs which whould be ignored.
In lists we still show them, but at the end and with strike through.
For picking the worst for the tooltip button color we ignore them.
On the security page, of all are ignored, the package is skipped.
2024-03-28 11:28:12 +01:00
Christoph Reiter
7a4ce7cb15 Add anitya links to packages
In case the package has a anitya ID we use that, otherwise we
use the realname, which might not work or might show a list
of all matches, but better then nothing.
2024-03-27 17:51:04 +01:00
Christoph Reiter
4ef880434b Add a page listing all found vulnerabilities
Also add some info to the package base if there is enough metadata
available for vulnerability matching.
2024-03-27 10:30:12 +01:00
Christoph Reiter
3c569263fd Make ExtInfo.version optional instead of special casing an empty version
In case the version is an empty string it is considered newer by pacman
than for example "r123".

Instead make it optional and handle the None version everywhere.

Fixes #68
2024-03-26 13:41:57 +01:00
Christoph Reiter
bd0fe0bcfb Arch repos have started dropping MD5SUM from packages 2024-03-24 16:39:48 +01:00
Christoph Reiter
9bdd3d22b1 Expose matched CVEs on the outofdate and the package pages 2024-03-24 11:34:00 +01:00
Christoph Reiter
1c1d538324 pkgextra: get rid of internal flag 2024-01-24 08:36:46 +01:00
Christoph Reiter
d401a04bb0 Add a repology link to each package
There is no way to override the mapping and no version info,
we just re-use the mapping repology has for our packages.
But it's a start.
2024-01-12 17:56:18 +01:00
Christoph Reiter
c746ac14b9 Remove pgp support
With the signatures being removed from the package DBs this is not needed
anymore
2023-11-04 18:51:59 +01:00
Christoph Reiter
76d4b4d39b Run pyupgrade
upgrade everything to 3.10+
2023-11-01 19:28:08 +01:00
Christoph Reiter
4f5dad3f86 Handle missing package signatures correctly
They are optional now, which means they are availabel as detached signatures
and no longer available in the package database.
2023-11-01 19:14:42 +01:00
Christoph Reiter
f2ed76293f Rename pkgmeta to pkgextra
So things are consistent
2023-09-17 18:59:12 +02:00
Christoph Reiter
f1459923ca base packages: pull the "base" package description from the SRCINFO
When parsing the SRCINFO we only get out the sub packages and the
package fields override the base fields, but the base description
has some vlaue on its own, as it is a description for all contained
packages.

Store the base description away and when fetching the description
for the pacman DB package we look up the description from the SRCINFO
base package if possible.

The onyl downside here is that they come from different sources, so
might be out of sync, but still better then before I guess.
2023-08-18 06:55:38 +02:00
Christoph Reiter
03f3583d2b Only compare to the main external version when showing the update note
Since we now have a concept of main and fallback versions we shouldn't
compare the repo version to all versions, but ignore the fallback ones
if there are others.
2023-07-22 18:34:30 +02:00
Christoph Reiter
0149efb907 pkgmeta: add multiple URL fields
This allows us to specifiy multiple URLs for each project in addition
to the homepage that is defined by the PKGBUILD.

This is similar to what Python packages can do, which then gets
exposed on pypi. But while they allow free form text we specify
a fixed set with a specific purpose, so we can pontentially re-use them
in the future, and also to make it more clear what we expect them to
point to.
2023-07-22 18:15:48 +02:00
Christoph Reiter
b5a6db9025 Split the pkgmeta code into its own file 2023-07-22 17:43:47 +02:00
Christoph Reiter
7bd958cca3 Link to pypi if we know the pypi name 2023-07-02 14:45:22 +02:00
Christoph Reiter
75872f30e3 fetch: don't download the db including the package files
there really is no need to, we only need the version really.
2023-05-21 21:05:46 +02:00
Christoph Reiter
78a636b3c8 Always prefer Arch versions over AUR and Cygwin
AUR contains dev versions we don't care about and cywin
sometimes uses a different versioning scheme.

Only if there is no matching Arch package consider the other ones
2023-05-12 21:35:11 +02:00
Christoph Reiter
37bf16b7d3 oops
fixes arch versions not being updated
2023-04-25 09:41:13 +02:00
Christoph Reiter
5569252cee Generalize external references and handle AUR separately
Remove all cygwin/arch specific code from the core models to make
it easier to add more references.
2023-04-11 20:02:55 +02:00
Christoph Reiter
6b244070f8 Merge data structures for cygwin/arch infos 2023-04-11 19:33:08 +02:00
Christoph Reiter
99b6fa73a0 ExtInfo: add an explicit label for the URLs 2023-04-11 19:14:10 +02:00
Christoph Reiter
3ee1d07e63 pkgmeta: allow None in references
to mean the package doesn't exist there
2023-04-09 17:30:33 +02:00
Christoph Reiter
8137b0468f Update the etag when the sourceinfos change
missed this somehow. this leads to stale caches in case only
the srcinfos have changed since the last non-cache visit.
2023-01-12 20:44:14 +01:00
Christoph Reiter
4a65e2d54b Be more explicit about showing virtual packages
Up until now we would show a list of packages and providing
packages. That's confusing when you don't scroll down and not
really obvious.

Instead if it's a virtual package show a simple page listing
the providing packages.

And in case a package of that name exists, show the other packages
providing the same name inline ("Provided By")
2023-01-06 07:59:29 +01:00
Christoph Reiter
9c609e66d4 queue: don't use the srcpkg to display information
Instead just use the srcinfo and the packages. In case a package moves between bases
it would look up the old srcpkg and display outdated names.

This is a leftover from when we had no srcinfo data.
2023-01-05 19:24:05 +01:00
Christoph Reiter
9c6be6c7e3 Switch to new mapping format
This adds the following things:

* the mapping data is now sourced from the package repositories
* cygwin mapping works too (for example see "msys2-runtime")
* packages can be marked internal so they are never linked
  to arch or cygwin (for example see "base")
2022-12-29 13:53:29 +01:00
Christoph Reiter
0aaa362d5a Remove skipped packages
With multiple sources, including cygwin, this doesn't make much sense.
We can mark some packages as internal in the future.
2022-12-29 06:49:39 +01:00
Christoph Reiter
acb1a0c397 remove unused skipped mapping
it now uses "null" to indicate that the external source shouldn't
be mapped
2022-12-29 06:39:06 +01:00
Christoph Reiter
256514bc41 Less guessing with the arch name mapping
Instead of doing regex and using the extracted package name, just
use the real pkgbase everywhere. This might mean more mappings are needed,
but it's more clear what it changes.

The next step is to move the mapping into the packaging repos.
2022-12-29 06:05:39 +01:00
Christoph Reiter
498a10897f Use the new repo package prefix in more places
instead of special casing based on repo and package names
2022-12-28 17:37:05 +01:00
Christoph Reiter
7b09145e9a Handle the new build status format
Changed in https://github.com/msys2/msys2-autobuild/commit/307799fd271fdfeeffec30c8
2022-12-27 16:19:21 +01:00
Christoph Reiter
7b399e56bc Show base groups instead of groups for base packages 2022-12-26 16:57:02 +01:00
Christoph Reiter
e0b0ae48da Add a base group collection
This is conceptionally similar to a pkgbase, but for groups.
Something like this doesn't really exist on the PKGBUILD level,
but end users can't really work with pkgbase with pacman either,
so for them that doesn't matter.

It still gives the end user the same structure as with packages,
there is a base thing that has multiple instances for each environment,
and searching might be a bit easier.

The UX could be improved, but the basics are there at least.

Fixes #47
2022-12-26 12:00:45 +01:00
Christoph Reiter
e8eaa08e31 Use the new issue template for the bug report link 2022-09-05 07:45:21 +02:00
Christoph Reiter
1ec7244b13 Rename arch_mapping to external_mapping
we might extend it with cygwin mappings in the future
2022-08-01 07:16:43 +02:00
Christoph Reiter
ec9760f6d4 Extract the upstream versions at parsing time
It was a mix of everything right now, make sure we only work
with upstream versions after parsing.
2022-07-31 08:59:22 +02:00
Christoph Reiter
08e58bb9b8 Don't error out on packages without a license
They would fail to show with a 500
2022-04-17 22:12:35 +02:00
Christoph Reiter
1e7b8167aa Add links for spdx licenses
Do some very basic parsing of spdx expressions and add links
to the respective license pages.

Multiple licenses in a package are combined with "OR".
2022-01-15 18:42:09 +01:00
Christoph Reiter
bd6fd47cc9 Use mirror.msys2.org for direct download URLs 2021-07-02 11:16:23 +02:00
Christoph Reiter
aca608d697 Fix detection of mingw repos
The code assumed it always started with "mingw"
2021-05-23 19:57:47 +02:00