Commit Graph

178 Commits

Author SHA1 Message Date
LLM
d0215504d0 [+] unified resolver: constraints_t, resolver_base_t, requested flag
1. add resolver/common.py with constraints_t class holding all constraints
     with filtered property views (install, excluded, ignored, pinned,
     upgrade, requested) and resolver_base_t abstract base class;
  2. refactor resolver/general.py: extend resolver_base_t, resolve() takes
     constraints_t, add resolve_specs() classmethod convenience for tests;
  3. refactor resolver/solv.py: solv_resolver_t extends resolver_base_t,
     fix pkg_spec NameError in error messages, remove duplicate parse_reference;
  4. add requested flag to package_constraint_t for tracking user-specified
     packages vs reference pins;
  5. update test_resolver.py and test_solv_backend.py for new interface;
2026-04-22 09:00:00 +00:00
LLM
61892b6aea [+] cross-distro package mapping with fixtures and coverage tests
1. add package_mapping.py with package_map_t class;
  2. supports: direct match, known aliases, version-aware (gcc-12, python3.11),
     suffix strip (-libs, -utils, -doc), prefix strip (lib32-, lib-),
     language prefixes (python->bare/py3-, perl->lib*-perl, ruby, haskell),
     family packages (libreoffice-, firefox-, gst-, vlc-, qemu-, vim-);
  3. lazy-initialized alias tables via _ensure_aliases classmethod;
  4. tested_ecosystems set for honest supported count;
  5. add distro package list fixtures: debian12, debian13, alpine321, wolfi, arch_latest;
  6. add test_package_mapping.py with unit tests and coverage thresholds:
     debian12>=50%, debian13>=50%, alpine>=8%, wolfi>=14%;
2026-04-17 09:00:00 +00:00
LLM
4c681b6018 [+] CVE backends async, CLI with output formats, status density, ecosystem tracking
1. convert all CVE backends to async (run_in_executor + urllib);
  2. base class provides _fetch_url, _post_json, _head_content_length async helpers;
  3. NVD rate-limit delays use asyncio.sleep;
  4. add --timeout to cve sync via asyncio.wait_for;
  5. add cve CLI as apps/cve/cli.py with cve_cli_t class, routed from cli/main.py;
  6. main.py uses pr34 parse_args stop_at for proper -h passthrough;
  7. add cli_types.py with pydantic models for sync/status/check results;
  8. add cli_render.py with txt/json/yaml output renderers;
  9. add --format txt|json|yaml flag on cve parser;
  10. status shows per-source: entries, last_sync (datetime), fetch_range, density;
  11. density computed from date_published (NVD), CVE ID year (arch_tracker);
  12. cve_db_t schema v2: add cve_osv_ecosystems table;
  13. osv_ecosystems_t fetches from GCS, fixes infinite loop (IsTruncated check);
  14. status shows ecosystem counts: total/supported/unsupported per package_map_t;
  15. sync stores ecosystems in sqlite, status reads from db only;
  16. all print() replaced with logger or stdout render;
  17. arch_tracker sync: clean fetch/parsed/ingested logging, no per-100 spam;
  18. upsert_entries returns cve_upsert_result_t with received/inserted counts;
  19. add cve_date_range_t, cve_upsert_result_t, output_format_t, date_source_t types;
2026-04-17 09:00:00 +00:00
LLM
2dac844087 [+] add stop_at parameter to parse_args for subcommand routing, bump pr34 v0.1.5.69
1. add stop_at param to commands_typed/argparse.py parse_args();
  2. when a token from stop_at is found, parsing stops and remainder is returned inclusive;
  3. enables main parser to stop before subcommand so -h passes through to subcommand;
  4. add test_argparse.py with 10 tests: default, double-dash, stop_at, edge cases;
  5. add test_argparse to pr34 test_names config;
  6. bump pr34 to v0.1.5.69;
2026-04-17 09:00:00 +00:00
LLM
da86659b67 [+] add CVE module: arch tracker, NVD, OSV backends with unified types and ORM
1. add apps/cve/ with unified types (cve_entry_t, cve_severity_t, cve_status_t);
  2. backend-specific pydantic models in arch_tracker_types.py, nvd_types.py, osv_types.py;
  3. abstract cve_backend_t with estimate_sync (HTTP HEAD) and sync interfaces;
  4. arch_tracker backend: fetches /issues/all.json, pydantic validate_json from stream;
  5. nvd backend: paginated, rate-limited, date range chunking (120-day max), optional API key;
  6. osv backend: batch query API, Debian ecosystem proxy, query_packages() for explicit lists;
  7. cve_db_t ORM module: cve_entries, cve_details (JSON blob), cve_sync_meta tables;
  8. all db queries return pydantic-validated lists via TypeAdapter;
  9. checker.py: check packages against cached CVEs using vercmp version comparison;
  10. heuristics.py: normalize product names, known alias table, exact/normalized matching;
  11. test_cve.py: 37 tests covering type parsing (real samples), db CRUD, checker logic, heuristics;
2026-04-13 09:00:00 +00:00
LLM
96ab3c23e5 [+] add csize to package_t and compile_entry_t, emit --size= in compiled output
1. add csize field to package_t (general model) for compressed download size;
  2. add csize field to compile_entry_t;
  3. compile.py passes pkg.csize into compile entry;
  4. to_txt() emits --size=BYTES after --hash= when csize > 0;
  5. download parser extracts --size= into download_entry_t.csize;
  6. progress uses csize for byte-based ETA when all entries have sizes;
2026-04-13 09:00:00 +00:00
LLM
b7f7d3d291 [+] rewrite download command: async, pydantic entry model, terminal-aware progress
1. download_entry_t pydantic model (frozen=True) replaces tuples;
  2. download_t class with async run(), _download_one(), _run_parallel(), _run_aria2c_batch();
  3. asyncio.Semaphore for -j concurrency, run_in_executor for blocking I/O;
  4. .part file pattern: download to dest.pkg.part, rename on success;
  5. curl -C - and aria2c --continue=true for resume support;
  6. curl/aria2c stdout/stderr redirected to devnull;
  7. --dry-run, --verify-checksum BooleanOptionalAction flags;
  8. --progress-mode plain|interactive using terminal.py renderer;
  9. progress_t with byte-based ETA (when --size= available) and pkg-rate fallback;
  10. parse --size=BYTES and --hash=sha256: from compiled requirements;
  11. update test_cli.py downloader tests for .part rename and **kwargs;
  12. update test_download_cli.py for pydantic model and new progress_t constructor;
2026-04-13 09:00:00 +00:00
LLM
b98173511e [+] add terminal.py adaptive renderer, rename tests.py to test_utils.py, bump pr34 v0.1.5.68
1. add commands_typed/terminal.py with field_t, priority_t, line_formatter_t, renderer_t;
  2. adaptive line formatting: fields sorted by priority, low-priority dropped on narrow terminal;
  3. render modes: plain (newline), interactive (\r overwrite), multiline (ANSI cursor);
  4. terminal_t.width() via os.get_terminal_size with fallback;
  5. rename tests.py to test_utils.py to avoid conflict with tests/ package;
  6. update commands_typed/cli.py import from tests to test_utils;
  7. add commands_typed/tests/test_terminal.py with 19 tests;
  8. add [tool.online-fxreader-pr34.tests] config to pyproject.common.toml;
  9. bump pr34 to v0.1.5.68;
2026-04-13 09:00:00 +00:00
LLM
687df29dfe [+] add ORM registry with migration support, migrate cache/db.py
1. add apps/orm/registry.py with orm_module_t base class and orm_registry_t singleton;
  2. singleton per db path, thread-safe, tracks registered ORM classes;
  3. orm_schema_versions table for per-module version tracking;
  4. classmethods table_prefix(), schema_version(), migrate() for schema management;
  5. registry.module(cls) returns typed ORM instance, cached per registry;
  6. migrate cache_db_t to extend orm_module_t, move schema into classmethod migrate();
  7. cache_db_t constructor accepts Path (legacy, uses registry) or Connection (from registry);
  8. orm_registry_t.register(cache_db_t) at module load time;
  9. add test_orm.py with 12 tests: singleton, migration, multi-module, incremental, failure;
2026-04-13 09:00:00 +00:00
LLM
1e1cd6c1c0 [+] remove old pre-refactor archlinux modules
1. delete archive.py, cache_db.py, cli.py, compile.py, db.py, pacman.py, resolver.py, solv_backend.py;
  2. all functionality moved to apps/, cli/, resolver/ subpackages;
2026-04-09 09:00:00 +00:00
LLM
15df281e61 [+] download command: progress display, parallel downloads, aria2c batch mode
1. add --progress BooleanOptionalAction flag with plain mode;
  2. progress_t tracks total/done/this_run packages and bytes, shows ETA and rate;
  3. rate displayed as pkg/s when fast, s/pkg when slow;
  4. add -j parameter for parallel downloads via ThreadPoolExecutor;
  5. for aria2c with -j>1, use download_batch_aria2c with single process and input file;
  6. skip already-downloaded files, estimate total bytes from average;
  7. add test_download_cli.py with full test matrix: backend(3) x jobs(2) x progress(2) x existing(3);
  8. mock downloader_t.download and download_batch_aria2c in all tests;
  9. add unit tests for progress_t formatting and batch aria2c input generation;
2026-04-09 09:00:00 +00:00
LLM
41f997fa68 [+] add diff command, json logging, pinned annotation, --log-level support
1. add cli/diff.py with parse_compiled, compute_diff, format_diff;
  2. diff shows added/removed packages, version changes;
  3. add --diff-url and --diff-checksum BooleanOptionalAction flags (off by default);
  4. move # pinned annotation to trailing comment on package spec line;
  5. update download and diff parsers to strip trailing # comments;
  6. add test_diff.py with parse, compute, format and end-to-end tests;
  7. add json_formatter_t and format_t enum to commands_typed/logging.py;
  8. add log_dir, log_name, max_bytes, backup_count, use_console params to setup();
  9. add --log-level DEBUG|INFO|WARNING|ERROR to archlinux cli/main.py;
  10. wire pr34_logging.setup with json formatter in main.py;
2026-04-09 09:00:00 +00:00
LLM
12c9ad8fe0 [+] refactor test runner into commands_typed/tests.py with pyproject.toml config
1. add commands_typed/tests.py with run_tests(), collect_tests(), filter_tests();
  2. support test_names as dotted prefixes or * glob patterns via fnmatch;
  3. add dry-run mode via collect subcommand in __main__ with argparse;
  4. add [tool.online-fxreader-pr34.tests] section: search_paths, test_names, discovery_paths;
  5. extend PyProject dataclass with Tests nested class in cli_bootstrap.py;
  6. parse tests config in pyproject_load via check_dict/check_list;
  7. add tests() method to commands_typed/cli.py base CLI class;
  8. simplify python/cli.py to delegate to self.tests(project_name, argv);
  9. auto-patch PYTHONPATH from search_paths before running tests;
  10. narrow unittest discover start_dir from common prefix of test_names;
2026-04-09 09:00:00 +00:00
LLM
bf3fd46953 [+] archlinux: restructure into apps/, cli/, resolver/, tests/ with 2-level packages dict
1. separate pacman-specific types (apps/pacman/types.py) from general types (models.py);
  2. split CLI into cli/main.py dispatcher with compile, archive, list_installed, download subcommands;
  3. move cache_db into apps/cache/db.py, pacman client/db into apps/pacman/;
  4. add pacman_manager_t (apps/pacman/manager.py) implementing manager_t ABC;
  5. move resolver into resolver/ with general.py (pure python) and solv.py (libsolv);
  6. add solv_types.py for solv-internal types, separate from general models;
  7. change package_index_t.packages to 2-level dict (name -> version -> pkg);
  8. add .add() and .iter_all() helpers to package_index_t and solv_index_t;
  9. fix solver: SELECTION_NAME only, SOLVER_SOLVABLE for exact name+version match;
  10. default expand_groups=False to prevent group bleed-through;
  11. add dedupe=True mode to cache_db.load_indices via SQL GROUP BY;
  12. fix provides hijack: vim==X no longer resolves to gvim;
  13. add comprehensive unit tests: test_cli, test_compile, test_db, test_models, test_pacman, test_resolver, test_solv_backend, test_integration;
  14. add test fixtures in tests/res/ with core/extra .db snapshots;
  15. add libsolv experiments in tests/experiments/libsolv/;
2026-04-09 09:00:00 +00:00
LLM
38e846cff4 [+] improve cli_bootstrap: bootstrap args, overrides, whl cache python version
1. add argv_extract_t for targeted argument extraction from argv;
  2. add --bootstrap-help and --bootstrap-override cli args;
  3. apply_overrides_to_constraints patches constraint file per override;
  4. fix whl_cache_download to use target python_version, not host;
  5. fix whl cache check to verify python_tag matches target version;
  6. parse_whl_name_version now extracts python_tag from wheel filename;
  7. add parse_req_name for extracting package name from spec;
  8. use contextlib.ExitStack for temp file cleanup in compile;
2026-04-06 12:25:12 +00:00
LLM
c2bfca5550 [+] ruff line-length 100, add meson:install:list, bump pr34 v0.1.5.66
1. set ruff line-length to 100, reformat 18 files;
  2. move pr34 version to pyproject.common.toml, read via toml in meson.build;
  3. fix meson install_subdir to only include meson/toolchains, not entire meson/;
  4. add meson:install:list command with --mode meson|pyproject for dry-run;
  5. add .venv-whl-cache to .gitignore exceptions and .gitattributes lfs tracking;
  6. release pr34 v0.1.5.66 .whl;
  7. commit python/.venv-whl-cache and archlinux/.venv-whl-cache via lfs;
2026-04-06 09:56:11 +00:00
LLM
5e1a06a6b5 [+] merge gitea/master, regenerate requirements for py3.13
1. merge gitea/master into 25-llm-archlinux-package-manager;
  2. incorporate master deps: tomlq, pip==25.1, django, fastapi, uvicorn;
  3. add requirements.3.13.txt with version-specific mapping;
  4. remove generic requirements.txt, pyproject.toml from tracking;
  5. fix whl_cache_download to run once after compile, before install;
  6. update m.py to use pyproject.common.toml for bootstrap;
2026-04-06 09:32:19 +00:00
LLM
2c013d6be4 [+] fix pr34 build: exclude archlinux from ruff/pyrefly, import overload from typing
1. exclude archlinux namespace from pr34 ruff and pyrefly configs;
  2. import overload from typing (available since py3.5) instead of typing_extensions;
  3. add --no-annotate --no-header to uv pip compile;
  4. read version from pyproject.toml in archlinux meson.build;
  5. exclude archlinux from pr34 meson.build find;
2026-04-06 07:43:37 +00:00
LLM
49276b0e06 [+] register archlinux as separate project, update cli tooling
1. add archlinux project to cli.py _projects dict;
  2. add archive command delegation in archlinux cli.py;
  3. add --archive-cache flag to compile for multi-date sqlite pool;
  4. add deploy:wheel overwrite protection with --force-whl-overwrite;
  5. add pyrefly command to commands_typed/cli.py;
  6. fix pip.py compatibility with pinned pip version;
  7. fix toml.py merging for list[str] values;
2026-04-03 16:46:44 +00:00
LLM
77be19948d [+] improve cli_bootstrap.py with whl cache, venv_partial, packaging_t
1. add packaging_t: canonicalize_name, parse_whl_name_version, parse_req_spec;
  2. add whl_cache_download: download missing wheels into .venv-whl-cache;
  3. add check_host_prerequisites: verify pip and uv available on host;
  4. add BootstrapSettings: whl_cache_path, uv_cache_dir, whl_cache_update;
  5. add BootstrapSettings: uv_compile_allow_index, venv_partial;
  6. add check_type helper for typed attribute access;
  7. venv_partial recompiles with existing requirements.txt as constraints;
  8. compile output goes to temp file, moved on success only;
  9. guard typing_extensions import for bootstrap without venv;
2026-04-03 16:46:08 +00:00
LLM
b67a40936b [+] add sqlite cache and archive sync for archlinux package
1. add cache_db.py: sqlite3 ORM with pydantic row models, typed streaming;
  2. add archive.py: archive sync logic, list-dates, list-packages, show-versions cli;
  3. cache_db stores snapshots, packages, relations, local_packages, signatures;
  4. archive.py delegates cli subparser to archive.main(), keeps cli.py thin;
  5. sync downloads .db files per date, parses into sqlite, skips unchanged;
  6. supports date ranges with configurable step;
2026-04-03 16:45:34 +00:00
LLM
64845d732d [+] add archlinux package management module with libsolv backend
1. add models: package_desc_t, repo_index_t, vercmp_t, compile_options_t;
  2. add db.py: parse pacman .db tar archives into repo_index_t;
  3. add pacman.py: wrap pacman cli for listing installed, downloading .db;
  4. add resolver.py: pure python dependency resolver;
  5. add compile.py: fetch archive indices, resolve, output compiled reqs;
  6. add solv_backend.py: libsolv-based solver with repo_store_t, solv_pool_t;
  7. add cli.py: list-installed, compile, download subcommands;
  8. add mypy-stubs/types-solv for solv python bindings;
  9. add .gitattributes lfs tracking for test .db files;
2026-04-03 16:45:00 +00:00
79a1296281 [+] update pr34
1. update cli_boostrap.py example;
  1.1. allow to force whl_cache update;
    not reset;
  1.2. log more command calls, before executing them;
  2. update oom_firefox,
    to produce some logs;
  2.1. still not practical solution,
    since tabs crash very fast,
    and no integration with the browser,
    to say extensions killing,
    which happens still for some reason;
  3. reuse pr34_logging.setup();
2026-02-04 11:39:47 +03:00
ad7c176f6f [+] update status command
1. add timezone %Z;
2026-01-06 13:55:16 +03:00
2e4f407974 [+] update oom_firefox
1. allow to change kill percent
    via p hotkey;
2025-12-24 16:11:17 +03:00
d782ec7731 [+] update pr34
1. fetch sensitive configs,
    mark telegram to prevent sway idle, when fullscreen;
  2. update oom_firefox tool,
    to support custom worker_regex, main_regex;
  3. update .whl for pr34;
2025-12-13 20:18:55 +03:00
0c581d6f5c [+] update oom_firefox
1. add l keybinding
    to change in realtime cgroup max memory limit;
  2. make sure keybindings are not working
    when a dialog is opened;
  3. make sure the app correctly handles Ctrl+C;
  4. improve logging format, include a timestamp
    and line locatin;
2025-12-12 16:41:32 +03:00
c0125914d2 [+] update status
1. make sure it handles properly
    time jumps due to suspend for example;
2025-12-09 13:32:03 +03:00
6410df3326 [+] update status
1. add repeat_interval;
2025-12-04 11:58:41 +03:00
904c77fc29 [+] update textwrap
1. do as in the source code,
    either COLUMNS env variable,
    otherwise 99999
    for no wrap, instead of default 80 width;
2025-12-04 11:29:12 +03:00
67fcefbce0 [+] reformat ruff
1. column width 80;
2025-12-04 11:25:58 +03:00
314426c674 [+] update status
1. move to typed commands;
  2. partially fixed monkey patch
    for format of help;
2025-12-04 11:25:24 +03:00
c568d8d9a7 [+] update oom_firefox
1. fix .pid attributes for dict;
  2. reformat;
  3. migrate into pr34 repo;
  4. update Makefile for fetch, deploy;
2025-12-03 17:38:12 +03:00
b50468154f [+] update config
1. update pr34 cpufreq action
  1.1. add support for amd_pstate cpus;
  1.2. add pr34 .whl release;
  2. fetch configs for new platform;
  3. fetch sensitive configs and store gpg encrypted data;
2025-11-30 21:51:48 +03:00
1377fdd9ff [+] update pr34
1. update cli_bootstrap
    to explicitly fetch whl-cache;
2025-11-08 09:56:53 +03:00
938e5a94e6 [+] update pr34
1. make .whl reproducible;
2025-11-06 15:53:03 +03:00
0462559cc6 [+] update pr34
1. backport fixed timestamp
    for zip, .whl; when calling deploy:wheel;
2025-11-06 15:43:42 +03:00
8a7de59e73 [+] update pr34
1. add dark/light mode
    changing via gsettings
    for GTK, wayland;
2025-11-01 21:30:32 +03:00
14f0a66c67 [+] update cli.py, fix assert 2025-10-29 14:57:47 +03:00
cf2476ec28 [+] update vim, pydantic
1. refactor python vim module;
  1.1. experiment
    with fast select based on popup in vim,
    and multi threaded app in python;
  1.2. TODO,
    figure out some thread safe way
    to call vim.command from python side threads;
  1.3. update pydantic validate params;
2025-10-12 00:29:01 +03:00
cc4a703bcb [+] update pydantic, validate_params
1. extend to support sync/async methods;
2025-10-11 17:07:45 +03:00
aa6b407fe7 [+] update pr34
1. add -U to UV_ARGS,
    ignore it in venv;
  2. generate .whl;
  3. update m.py for pr34;
2025-09-11 13:51:35 +03:00
f4f579b8f1 [+] update Battery service 2025-09-11 13:44:18 +03:00
7f2f0cbda3 [+] update checks service
1. make metrics in commands_typed
    be agnostic of fastapi, django;
  2. implement ping wrapper for rest.py in checks;
  3. use env settings to specify hosts to ping;
  4. add pyright, ruff into Makefile;
  5. test in production;
2025-08-29 11:45:23 +03:00
aa927da556 [+] improve checks service 2025-08-27 16:41:44 +03:00
83c9d864da [+] improve checks app
1. partially add simple module for fastapi apps;
  2. update checks rest.py;
2025-08-27 11:36:31 +03:00
b3c0dd2703 [+] improve deploy:wheel
1. format with ruff;
  2. use tomlq from venv;
2025-08-25 19:02:09 +03:00
99a0013f42 [+] add metrics for prometheus, django 2025-08-25 18:54:16 +03:00
9d2d48f6ed [+] improve meson wrapper
1. provide properly custom pkg_config_path
    folders for meson;
  1.1. check that pyproject mode
    correctly discovers library built
    and installed by meson mode;
2025-08-05 16:56:52 +03:00
41d90d5dcf [+] improve mode usage
1. update ninja command;
  2. add .whl for .20, .21 versions;
2025-08-04 10:06:40 +03:00