Commit Graph

20 Commits

Author SHA1 Message Date
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
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
b124166205 Fix Nix devShell tests for multi-distro Docker images
- Enable test matrix for arch, debian, ubuntu, fedora, centos
- Mount /nix Docker volume only on Arch so image-local Nix installs remain visible on other distros
- Keep shared Nix cache volume for all distros

Details: https://chatgpt.com/share/69361196-e950-800f-ad3d-670156337b7e
2025-12-08 00:49:36 +01:00
Kevin Veen-Birkenbach
0286cb44e0 Refactor multi-distro Dockerfile and Makefile:
- Add dynamic BASE_IMAGE selection via ARG for Arch, Debian, Ubuntu, Fedora, CentOS
- Introduce conditional package installation and unified Nix installer logic
- Implement single-user Nix install without build-users-group for Debian/Ubuntu/Fedora/CentOS
- Add Nix environment preparation and PATH fixes
- Restore Arch-only makepkg build stage
- Extend Makefile with multi-distro build/test workflow
- Add base image mappings (arch/debian/ubuntu/fedora/centos)
- Add test runner logic for each distro, including Nix devShell fallback scanning
- Improve structure with clear section headers and comments

https://chatgpt.com/share/69360c94-ef04-800f-afd2-75bc6cd33d4d
2025-12-08 00:24:22 +01:00
Kevin Veen-Birkenbach
7760c77952 Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
  - Declare setuptools build backend (setuptools.build_meta) and wheel
  - Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
  - Define PyYAML as a base runtime dependency

- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
  - Use format = "pyproject" and src = ./. (current git checkout)
  - Add setuptools and wheel to nativeBuildInputs for the backend
  - Add pyyaml to propagatedBuildInputs to match pyproject dependencies
  - Provide a devShell that includes the built pkgmgr, git, and Ansible
  - Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps

- Fix Makefile install target for Nix shells
  - Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
  - In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
    wire automatic activation into shell rc files
  - Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check

- Adjust PKGBUILD prepare() to correctly copy the full project tree
  - Stop excluding the top-level src directory from rsync
  - Still exclude .git, .github, pkg, and srcpkg

This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.

Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
Kevin Veen-Birkenbach
8e80dc5fd7 Fixed tests in container 2025-12-07 21:52:04 +01:00
Kevin Veen-Birkenbach
9679478353 Improve Docker-based build & test pipeline for pkgmgr
- Add .dockerignore rules to prevent Arch package artifacts from entering the build context
- Rework Dockerfile to remove stale package artifacts before makepkg and use a dev entry script
- Introduce docker-entry-dev.sh to always rebuild pkgmgr from the mounted /src tree
- Update Makefile 'test' target to rebuild pkgmgr inside the container before running tests
- Fix predictable makepkg failures caused by residual *.pkg.tar.* files

Conversation reference: https://chatgpt.com/share/6935e6e8-f3fc-800f-a4e9-7537114f13d1
2025-12-07 21:43:38 +01:00
Kevin Veen-Birkenbach
6e52e875aa Added ENV to Dockerfile 2025-12-07 20:58:49 +01:00
Kevin Veen-Birkenbach
d6a7ce0aa0 Fix: Skip venv/pip installation inside Nix shell and add fallback for _requirements.txt (see conversation: https://chatgpt.com/share/69345df2-a960-800f-8395-92a7c3a6629f) 2025-12-06 17:57:05 +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
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
Kevin Veen-Birkenbach
19c2abc117 Add automatic aur_builder and yay setup for Arch-based systems
- Added aur_builder_setup target to Makefile
- Automatically detects Arch/Manjaro via pacman
- Creates aur_builder user and group with sudoers permissions
- Installs yay if not already present
- Skips AUR setup gracefully on non-Arch systems

https://chatgpt.com/share/68f2a922-63f8-800f-a6d6-18b8d06b7139
2025-10-17 23:01:34 +02:00
Kevin Veen-Birkenbach
88b34e83a3 Fix Makefile to use python3 for venv creation and pip installation
- Replaced 'python' with 'python3' for better compatibility on Arch-based systems
- Added ensurepip call to guarantee pip availability inside virtual environment
- Improved venv creation logic and ensured setuptools/wheel upgrade
- Fixed potential 'pip not found' (Error 127) issue during installation

https://chatgpt.com/share/68f2a922-63f8-800f-a6d6-18b8d06b7139
2025-10-17 22:38:32 +02:00
Kevin Veen-Birkenbach
598d455e6b Activated python venv for zsh und bash 2025-08-08 09:38:18 +02:00
Kevin Veen-Birkenbach
20065e88a0 (Hopefully) Optimized python venv integration. If it leads to bugs, you know wehere to find them. 2025-07-24 18:46:39 +02:00
Kevin Veen-Birkenbach
c7f9b546a6 Added creation of .bashrc file when not existing 2025-07-13 20:05:53 +02:00
Kevin Veen-Birkenbach
e20b8cd884 Added virtual environment for python 2025-04-27 22:38:52 +02:00
Kevin Veen-Birkenbach
be9bfb46c6 added --break-system-packages to Makefile 2025-04-01 15:43:32 +02:00
Kevin Veen-Birkenbach
baa604f7ba Optimized setup procedure 2025-04-01 15:37:07 +02:00