Commit Graph

22 Commits

Author SHA1 Message Date
Kevin Veen-Birkenbach
1b53263f87 Release version 0.4.0 2025-12-08 23:02:43 +01:00
Kevin Veen-Birkenbach
bc3ff5b67f Release version 2.1.0 2025-12-08 20:15:13 +01:00
Kevin Veen-Birkenbach
b9b64fed7d Add branch CLI command and tests (see ChatGPT conversation: https://chatgpt.com/share/69370ce1-8090-800f-8b08-8ecfa5089a74)
Signed-off-by: Kevin Veen-Birkenbach <kevin@veen.world>
2025-12-08 18:37:59 +01:00
Kevin Veen-Birkenbach
22b65f83d3 Add changelog CLI command and tests (see ChatGPT conversation 2025-12-08) https://chatgpt.com/share/69370663-4eb8-800f-bba9-4f5c42682450 2025-12-08 18:11:39 +01:00
Kevin Veen-Birkenbach
0b96270f78 Refactor pkgmgr CLI into modular core and add E2E tests for config/release/make/tools (see ChatGPT conversation 2025-12-08 https://chatgpt.com/share/6936ffa5-4868-800f-ab63-6e367093adce) 2025-12-08 17:41:27 +01:00
Kevin Veen-Birkenbach
0933e73e1c Extend 'pkgmgr version' command with multi-source version detection (pyproject, flake, PKGBUILD, debian, spec, AnsibleGalaxy), implement SemVer parsing, consistency warnings, full E2E + unit test coverage.
Ref: https://chatgpt.com/share/6936ef7e-ad5c-800f-96b2-e5d0f32b39ca
2025-12-08 16:32:38 +01:00
Kevin Veen-Birkenbach
ef23e14ae4 Add Git utilities, semantic version helpers, and unit tests
Ref: https://chatgpt.com/share/6936c64b-ae80-800f-ae7e-ed0a692ec3fc
2025-12-08 13:36:40 +01:00
Kevin Veen-Birkenbach
15f3c1bcba Refine command resolution and symlink creation (see ChatGPT conversation: https://chatgpt.com/share/6936be2d-952c-800f-a1cd-7ce5438014ff) 2025-12-08 13:02:05 +01:00
Kevin Veen-Birkenbach
f641b95d81 Add recursive capability resolver, integration tests, and GitHub workflow (see: https://chatgpt.com/share/6936abc9-87cc-800f-97e6-f7429fb1a910) 2025-12-08 11:43:39 +01:00
Kevin Veen-Birkenbach
775c30149c Improve MakefileInstaller: only run 'make install' if an install target exists
- Added parsing of Makefile to detect real 'install' target
- Added safe fallback when Makefile cannot be read
- Added informative skip message when install target is missing
- Updated unit tests to cover: install present, install missing, file read
- Removed circular self-import causing test import failures

Conversation reference: https://chatgpt.com/share/6936a2bf-6aa4-800f-a1bc-7c8eac66bc18
2025-12-08 11:05:08 +01:00
Kevin Veen-Birkenbach
26ba3c50cd Improve installer debugging and enhance E2E test diagnostics
- Added rich error reporting to install_repos() for clearer installer failure context
  (repository identifier, repo directory, installer name, exit code).
- Updated E2E test 'install_all_shallow' to show additional diagnostics,
  including Nix profile dumps and contextual SystemExit handling.
- Removed outdated/deactivated test file.
- New test now mirrors the robust debugging flow of the pkgmgr-only test.

See conversation for full context:
https://chatgpt.com/share/6936241b-52ec-800f-9859-1734a581c002
2025-12-08 02:05:03 +01:00
Kevin Veen-Birkenbach
9648be4a26 Refactor test pipeline: introduce separate unit/e2e workflows, fix Dockerfile, update Makefile test targets, and move integration tests to tests/e2e.
Conversation reference:
https://chatgpt.com/share/69361e70-4d74-800f-acd7-51548ac3fa37
2025-12-08 01:40:36 +01:00
Kevin Veen-Birkenbach
225d6a84b7 Added error code 2025-12-07 21:02:55 +01:00
Kevin Veen-Birkenbach
16a9d55d4f Refactor pkgmgr installers, introduce capability-based execution, and replace manifest layer
References:
- Current ChatGPT conversation: https://chatgpt.com/share/6935d6d7-0ae4-800f-988a-44a50c17ba48
- Extended discussion: https://chatgpt.com/share/6935d734-fd84-800f-9755-290902b8cee8

Summary:
This commit performs a major cleanup and modernization of the installation pipeline:

1. Introduced a new capability-detection subsystem:
   - Capabilities (python-runtime, make-install, nix-flake) are detected per installer/layer.
   - Installers run only when they add new capabilities.
   - Prevents duplicated work such as Python installers running when Nix already provides the runtime.

2. Removed deprecated pkgmgr.yml manifest installer:
   - Dependency resolution is now delegated entirely to real package managers (Nix, pip, make, distro build tools).
   - Simplifies layering and avoids unnecessary recursion.

3. Reworked OS-specific installers:
   - Arch PKGBUILD now uses 'makepkg --syncdeps --cleanbuild --install --noconfirm'.
   - Debian installer now builds proper .deb packages via dpkg-buildpackage + installs them.
   - RPM installer now builds packages using rpmbuild and installs them via rpm.

4. Switched from remote GitHub flakes to local-flake execution:
   - Wrapper now executes: nix run /usr/lib/package-manager#pkgmgr
   - Avoids lock-file write attempts and improves reliability in CI.

5. Added bash -i based integration test:
   - Correctly sources ~/.bashrc and evaluates alias + venv activation.
   - ‘pkgmgr --help’ is now printed for debugging without failing tests.

6. Updated unit tests across all installers:
   - Removed references to manifest installer.
   - Adjusted expectations for new behaviors (makepkg, dpkg-buildpackage, rpmbuild).
   - Added capability subsystem tests.

7. Improved flake.nix packaging logic:
   - The entire project source tree is copied into the runtime closure.
   - pkgmgr wrapper now executes runpy inside the packaged directory.

Together, these changes create a predictable, layered, capability-driven installer pipeline with consistent behavior across Arch, Debian, RPM, Nix, and Python layers.
2025-12-07 20:36:39 +01:00
Kevin Veen-Birkenbach
aaf20da0a0 Add cross-distribution OS package installers (Arch PKGBUILD, Debian control, RPM spec) and restructure tests.
Remove deprecated AUR and Ansible requirements installers.
Introduce Nix init + wrapper scripts and full packaging (Arch/DEB/RPM).
Associated conversation: https://chatgpt.com/share/693476a8-b9f0-800f-8e0c-ea5151295ce2
2025-12-06 19:32:31 +01:00
Kevin Veen-Birkenbach
f57ab0c2d1 Refactor pkgmgr self-install handling, add pip-enabled Python env to flake, and fix Nix/pip integration
- Rename requirements.txt to _requirements.txt to avoid unintended self-install via PythonInstaller.
- Update flake.nix to provide Python with pip in both devShell and runtime closure.
- Generate a wrapper for pkgmgr that uses the pip-enabled interpreter.
- Adjust NixFlakeInstaller to correctly handle old profile removal and install outputs.
- Update run_command to support string commands and allow_failure.
- Improve integration test by adding nix profile cleanup and debugging output.

Reference: https://chatgpt.com/share/69345df2-a960-800f-8395-92a7c3a6629f
2025-12-06 17:47:46 +01:00
Kevin Veen-Birkenbach
96a0409dbb Enhance Nix flake installer to remove old profile entries before installation and update unit tests accordingly.
Includes:
- Added best-effort removal of existing 'package-manager' Nix profile entry.
- Updated install logic to avoid file conflicts.
- Extended unit tests to verify removal behavior and SystemExit-safe handling.

Conversation reference: https://chatgpt.com/share/69332bc4-a128-800f-a69c-fdc24c4cc7fe
2025-12-06 15:47:31 +01:00
Kevin Veen-Birkenbach
218c6a4a82 Make pkgmgr installers fail hard and integrate Nix-based test pipeline (see https://chatgpt.com/share/69332bc4-a128-800f-a69c-fdc24c4cc7fe) 2025-12-05 22:33:49 +01:00
Kevin Veen-Birkenbach
42212b8cb0 Add Nix configuration defaults and new shallow-clone integration test
- Enable 'nix-command' and 'flakes' globally via flake.nix nixConfig
- Improve .gitignore by excluding *.log files
- Add integration test for shallow clone mode using pkgmgr install pipeline
- Ensures pkgmgr works end-to-end inside test container with --clone-mode shallow

See: https://chatgpt.com/share/69332bc4-a128-800f-a69c-fdc24c4cc7fe
2025-12-05 20:20:33 +01:00
Kevin Veen-Birkenbach
a435745c02 Enforce Ansible availability via Nix and validate requirements.yml
- Add ansiblePkg as propagated dependency in flake.nix so ansible-galaxy is available on host
- Introduce strict requirements.yml validator for AnsibleRequirementsInstaller
- Accept roles entries with either 'name' or 'src'
- Ensure run() always validates requirements before installing dependencies
- Extend unit tests to cover valid, invalid and warning-only requirements.yml cases

See: https://chatgpt.com/share/69332bc4-a128-800f-a69c-fdc24c4cc7fe
2025-12-05 20:00:47 +01:00
Kevin Veen-Birkenbach
f5475d86e2 Refactor pkgmgr into modular installer pipeline with Nix flake support, PKGBUILD build workflow, local Nix cache, and full test suite restructuring.
See conversation: https://chatgpt.com/share/69332519-7ff4-800f-bc21-7fcd24a66c10
2025-12-05 19:32:42 +01:00
Kevin Veen-Birkenbach
c4395a4764 Add Arch-based Docker test setup, shallow clone mode support and pkgmgr tests (see ChatGPT conversation: https://chatgpt.com/share/693052a1-edd0-800f-a9d6-c154b8e7d8e0) 2025-12-03 16:09:42 +01:00