99 Commits

Author SHA1 Message Date
Christoph Reiter
4ad9115d46 security: show the fixed versions for each vuln
the data quality is bad, but let's see
2025-09-07 10:13:00 +02:00
Christoph Reiter
86984be540 Upgrade code with ruff 2025-08-29 14:05:46 +02:00
Christoph Reiter
809daefa3f Add some more MCP tools
One for listing the repos, and one for searching packages
2025-07-07 20:07:25 +02:00
Christoph Reiter
457d9817d8 clean up _licenses_to_html
don't require a request object, it's not needed there
2025-06-29 11:04:19 +02:00
Christoph Reiter
279d81c584 some more perf fixes 2025-06-29 11:02:06 +02:00
Christoph Reiter
7e2db84064 Update deps
and fix some new flake8 warnings
2025-04-01 19:34:55 +02:00
Christoph Reiter
863b35e117 Higher prio to WAITING_FOR_BUILD 2025-01-17 19:01:17 +01:00
Christoph Reiter
04fbe06c18 Fix queue sorting for real
It was passing the display text to the sort function, not the
enum value, so only worked by accident. Refactor/rename things a
bit to make this more clear.

Also give the unknown/unprocessed state a higher priority, so it
shows up before the finished builds. Same for manual builds, since
they require user action.
2025-01-17 18:51:34 +01:00
Christoph Reiter
2adcca84ae queue: sort by status first
It was sorted by change date before, which does not say when
something was merged but when it was commited.

At least for me, I want to see if there are any problems and what is
currently building when looking at the queue, and only then what already
is there. Might be different for other users.

Sort by the status priority instead. The priority is the same one used to
decide the most important build status to show in the list for the
different build types.
2025-01-17 13:25:14 +01:00
Christoph Reiter
04fc810176 flake8 2025-01-17 11:35:41 +01:00
Christoph Reiter
b4dd495b8d base: add option to filter by repo
mostly useful to show only cygwin packages for example
2025-01-17 11:29:38 +01:00
Christoph Reiter
73aa5d60bf outofdate: fix total package number in case a repo filter is active
only count packages for the active filter
2024-12-14 10:48:46 +01:00
Christoph Reiter
b6190a960b package -> packages
for consistency
2024-09-15 17:07:03 +02:00
Christoph Reiter
3c7444c0a3 Get rid of the repo query param for single packages
We keep package names unique, and if for some reason they wouldn't be
we show both packages on that page then.

Let's not add a query param to every URL for such an edge case.
2024-09-15 17:06:51 +02:00
Christoph Reiter
106f1e42ec More 404 reponses when things couldn't be found 2024-09-15 16:35:03 +02:00
Christoph Reiter
b6ecb4abae Use the correct template for when no package with the name is found
The virtual package template doesn't cover that case
2024-09-15 16:16:38 +02:00
Christoph Reiter
aee5de581e Fix TemplateResponse deprecation warning
the request should be passed as the first arg now
2024-09-15 16:13:40 +02:00
Christoph Reiter
1178edde11 Sort repos by priority and not by name
Use the order of the repos in the config as the order for everything else.
selection inputs, package groupes etc
2024-09-15 15:42:14 +02:00
Christoph Reiter
461f08c905 package removals: show more context
add links, and show the dependency type
2024-07-23 09:33:11 +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
f0d1065951 base: group binary packages by repo
since it's not obvious which package name prefix belongs
to which repo/env
2024-06-30 15:31:15 +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
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
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
76d4b4d39b Run pyupgrade
upgrade everything to 3.10+
2023-11-01 19:28:08 +01:00
Christoph Reiter
39b6214728 licenses: stop deduplicating licenses and sorting them
just output them as they are in the file.
2023-10-06 19:09:58 +02:00
Christoph Reiter
f2ed76293f Rename pkgmeta to pkgextra
So things are consistent
2023-09-17 18:59:12 +02:00
Christoph Reiter
9842240ba7 Revert "Hide the version epoch in most places"
This reverts commit 05a8bba0a8405b4521015ab35a4259fe176fa642.
2023-08-18 08:05:43 +02:00
Christoph Reiter
05a8bba0a8 Hide the version epoch in most places
It's only relevant for schema changes and downgrades and only
useful for deciding if a version is newer, which website users
rarely need to do.

Let's just hide it by default. It's still part of the package file name
if really needed.
2023-08-18 07:21:34 +02:00
Christoph Reiter
7bd958cca3 Link to pypi if we know the pypi name 2023-07-02 14:45:22 +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
d006089bdd queue: filter on build types instead of repos
previously the src build types were merged with the repos
they were connected with, so msys-src with msys etc.

Usually when filtering for "mingw64" one doesn't want to know the
build status of "mingw-src", so skip all that and just leak the
build types to the frontend as is.
2023-05-06 11:53:17 +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
5bc7ddc3c3 Update deps 2023-03-24 13:50:56 +01:00
Christoph Reiter
9faa93f697 Try to avoid google crawling the search
There is no point, every page is accessible without the search.
2023-01-22 11:48:12 +01:00
Christoph Reiter
eeac72400b queue: show active cycles 2023-01-20 09:57:12 +01:00
Christoph Reiter
6a1303be83 Partly revert 9c609e66d413013
we still want to link to the base package in the queue if possible
2023-01-06 09:19:32 +01:00
Christoph Reiter
e66f96801a Remove package_name() function
We now parse/split all PKGBUILD fields properly, so all package names
that end up in the templates should be valid already.
2023-01-06 08:10:45 +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
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
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
290ee4440d Rename group -> groups
my initial naming wasn't the best. base/package remains, but that is
trickier to change

I mainly wanted to see how to handle renames with fastapi here
2022-12-26 12:00:45 +01:00