Commit Graph

37 Commits

Author SHA1 Message Date
Marc Wrobel
fa1eab8d21 [apple] Add 2020-2021 and 2022-2023 security update pages (#467) 2025-07-13 13:08:03 +02:00
Marc Wrobel
391d65ad8a Simplify argument parsing (#459)
With the current state of automation scripts, this is not possible anymore to launch script with multiple auto configs.
2025-07-06 22:42:01 +02:00
Marc Wrobel
c78d1fe2b5 Refactor scripts arguments handling (#456)
- remove the use of environment variables to get directory paths,
- make use of arguments / argparse instead of environment variables in `update.py` and `report.py`,
- automatically guess the data directory in `latest.py` based on the script's location,
- propagate log level to auto scripts,
- move `list_configs_from_argv` from `endoflife` module to `releasedata` module,
- use `list_products` in `latest.py` to load the product's frontmatters.
2025-06-28 19:05:07 +02:00
Marc Wrobel
3beb0f6e34 Respect HTTP Cache-Control header if available (#450)
Allow stale responses in case of error in order to reduce the number of temporary errors.

Note that the cache will be reset on the first build of every week in any cases, see .github/workflows/update.yml.
2025-06-28 12:57:41 +02:00
Marc Wrobel
f404274310 Align custom scripts with generic scripts (#445)
Align custom scripts with generic scripts, making them configurable. This has a few advantages:

- script code is more unified,
- no more hard-coded method names in scripts, which is less error prone and make it easier to rename scripts,
- no more hard coded product names in scripts, which is less error prone and make it easier to rename products,
- less hard-coded URLs and regexes in scripts, which makes auto-configuration more expressive / updatable,

Also added method `endoflife.list_configs_from_argv()` so that it is easier to manipulate scripts arguments.
2025-06-07 17:25:05 +02:00
Marc Wrobel
2d5145444b [apple] Adapt script for single-product usage (#317)
Make the Apple script compatible with the way update.py now works, which is 'product' oriented, meaning the script will be called once for each product.

To minimize the impacts the responses are now cached to avoid rate-limiting by support.apple.com.

Version patterns have also been moved to product's auto configuration to make future changes simpler.
2024-02-21 00:21:07 +01:00
Marc Wrobel
a0ba2d687e Improve scripts execution orchestration (#299)
Until now products could declare multiple auto-update methods, but they all had to be of the same kind.
For example if you used the git auto-update method, you could not use an additional github_releases or custom auto-update method.
This is an issue as it prevents us to extend the auto-update process, for example by having a product using the 'git' auto-update method to retrieve all the versions, and a custom script to retrieve support and EOL dates.

This improve the scripts execution orchestration to be able to support auto configurations using a mix of methods, meaning:

- multiple kind of methods, such as git and github_release,
- or multiple custom methods.

A side-effect of those changes is that now a failure in a generic script does not cancel the update of subsequent products.

Another side-effect, unwanted this time, is that now custom scripts managing multiple products, such as apple.py, are now executed multiple times instead of once.
2024-02-11 15:28:26 +01:00
Marc Wrobel
56cc29b49d Make releasedata.Product usable in 'with' expression (#294)
This way the writing of the JSON file is handled automatically if the update does not fail.
It pave the way to further global improvements, such as a better error handling.
2024-02-04 14:48:05 +01:00
Marc Wrobel
651666f594 Remove releasedata.py's Product.has_version method
This method is hardly used, so using Product.get_version instead is a better choice.
2024-01-29 22:38:54 +01:00
Marc Wrobel
42165ea287 Preserve all version fields (#286)
Up to now extra version fields were ignored: only name and date fields were accepted. This changes that by retaining the full JSON data when reading the file, making it possible in the future to support custom fields.

This also fixes a bug with versions having released on the same date: they was not ordered as expected (reverse order).
2024-01-28 23:46:41 +01:00
Marc Wrobel
b339c81ead Split endoflife.date and releasedata models in separate files (#276)
This makes the code easier to read.
2024-01-07 20:22:46 +01:00
Marc Wrobel
f6a8349c46 Centralize GitHub Workflow groups declaration (#272)
It may not be the best place for that (gha.py would have been better), but it's the shorter / faster way to do it for now.

Moreover it now uses logging for writing the group. The logger format has been updated for this to work. This was done to fix issues on GitHub Action logs, where groups were declared after the logs.
2023-12-31 17:00:11 +01:00
Marc Wrobel
7458563fec Enable flake8-simplify linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-simplify-sim.
2023-12-30 14:29:24 +01:00
Marc Wrobel
b32cb09494 Fix a few Intellij IDEA warnings 2023-12-30 14:29:24 +01:00
Marc Wrobel
6002cbdb26 Enable isort linting rules (#267)
See https://docs.astral.sh/ruff/rules/#isort-i.
2023-12-30 14:29:24 +01:00
Marc Wrobel
758b204ada [artifactory] Refactor script (#214)
Make the script more readable, mostly by:

- using the endoflife.Product class,
- removing the unnecessary use of functions,
- a little bit of renaming.
2023-12-10 14:14:03 +01:00
Marc Wrobel
b122ed40fe [apple] Refactor script (#213)
Make the script more readable, mostly by:

- using the endoflife.Product class,
- removing the unnecessary use of functions,
- a little bit of renaming.
2023-12-10 13:44:59 +01:00
Marc Wrobel
7cf62c2355 Refactor HTTP common code (#207)
- move to common/http.py,
- make fetch_url return a Response.
2023-12-02 22:52:12 +01:00
Marc Wrobel
0d17306872 Simplify date parsing (#195)
Create common functions parse_date, parse_month_year_date and parse_datetime.

Those functions support trying multiple formats, and come with default formats lists that support most of the date format encountered so far.

Notable change: year-month dates are now set to the end of month (impacted couchbase-server and ibm-aix).
2023-11-26 21:01:35 +01:00
Marc Wrobel
1e8a84ec77 [apple] Add back web.archive.org links (#190)
The issue was with couchbase, for which the webarchive.org link is now dead.
2023-11-26 14:18:33 +01:00
Marc Wrobel
7907243967 [apple] Make HTTP requests in parallel (#185)
Use the new endoflife.fetch_urls to fetch URLs. This is a bit more efficient, especially when network is slow.

Also update the way rows without a proper date format are excluded by checking the format first. I don't know why, but this fixed a bit the script, as now the 6.2.1 is properly retrieved and parsed.
2023-11-26 13:59:22 +01:00
Marc Wrobel
600e77e212 Sort versions by date then version for all products (#179) 2023-11-15 22:30:31 +01:00
Marc Wrobel
6f375c47ba Disable web.archive.org links
They cause too much timeout lately, and the main purpose of those script is to get new releases anyway.
2023-11-08 00:01:50 +01:00
Nemo
11a4f2109f [apple] Fix slight html change 2023-08-11 11:27:58 +05:30
Nemo
2dc21b52c5 [apple] Fix URLs for archived apple pages.
Apple is still linking to these, but they are now
404s. So we switch to the Web Archive links.
2023-07-12 16:37:02 +05:30
Marc Wrobel
208ab8e2f8 Apply various minor refactorings
Improve readability and fix a few Python warnings (line too long, exception too broad...) through various minor refactorings.
2023-06-11 12:45:59 +02:00
Marc Wrobel
70f20da616 Refactor apple.py
Split the script into multiple functions to improve its readability.
2023-06-11 12:45:59 +02:00
Marc Wrobel
6ba7828f96 Refactor product releases writing
Create a common function to write resulting JSON files to the releases directory.
It makes this task simpler to read and maintain, while making it modifiable at a central point in the future.
One example of such modification could be the sorting of the versions in a uniform way for all the scripts.
2023-06-11 12:45:59 +02:00
Marc Wrobel
a16d9090d3 Refactor HTTP URL fetching scripts
This creates a common function to fetch HTTP URLs, with enhanced capabilities (retry, use of a known User-Agent).
It makes scripts that need those capabilities simpler, while improving other scripts.

This commit also fixes some scripts that did not log properly (cos.py, eks.py, haproxy.py, palo-alto-networks.py, rhel.py, ros.py, unrealircd.py).
2023-06-11 12:45:59 +02:00
Nemo
819dba26dd [apple] Fix regex to exclude non-macos releases
This also drops 11.0 and 12.0, which is okay since the dates
we have are technically for 11.0.1 and 12.0.1 anyway.
2023-03-16 17:24:35 +05:30
Robin Laurén
aed62e8f5e [apple] Fix regex for macOS Sierra and beyond (fixes #76)
Apple changed the format or made a mistake for MacOS Ventura 13.2 : it is labeled 'MacOS 13.2.1' on https://support.apple.com/en-us/HT201222.
2023-02-17 21:00:56 +01:00
Marc Wrobel
1e45de3c58 [macOS] Accept all kind of spaces in regexes (fixes #47)
There were two issues with the macOS regexes:

- The regexex accepted only spaces separator. But non-breakable spaces are also used from time to time. Replacing spaces by \s fixed the issue (other product regexes were also updated - never know).
- The first regex, the one that accepted major releases with no minor version, were not useful (covered by the second regex) and partly catched valid versions (such as 13.1), who was then ignored. I removed it.
2022-12-20 15:25:55 +05:30
Marc Wrobel
b65b5ad4ee Cleanup code (#37)
* [apple,distrowatch,pypi] Remove unused imports

* [maven] use snake_case for variable names

* [eks,palo-alto-networks] Rename variables shadowing names from outer scopes

* [eks,palo-alto-networks] Remove unused variables

* [apple,haproxy,palo-alto-networks,rhel,ros,unrealircd] Rename variables shadowing built-in names
2022-12-14 09:20:45 +05:30
Nemo
92864aab8b [apple] Update Mac regex to support Ventura
No dots in the version number was tripping the regex
2022-11-08 16:56:12 +05:30
Nemo
fac9620241 [py] Fix styling 2022-10-17 14:21:36 +05:30
Nemo
8e31ed037d Fix release dates for old apple releases
Some dates with 4 character months weren't parsing correctly
2022-06-02 18:58:11 +05:30
Nemo
ea0306b95a Track Apple OS releases (#5) 2022-06-02 09:03:42 +00:00