2025-12-06 19:32:31 +01:00
|
|
|
Name: package-manager
|
2025-12-09 21:03:24 +01:00
|
|
|
Version: 0.7.8
|
2025-12-06 19:32:31 +01:00
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: Wrapper that runs Kevin's package-manager via Nix flake
|
|
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/kevinveenbirkenbach/package-manager
|
|
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
2025-12-08 15:08:42 +01:00
|
|
|
|
|
|
|
|
# NOTE:
|
|
|
|
|
# Nix is a runtime requirement, but it is *not* declared here as a hard
|
|
|
|
|
# RPM dependency, because many distributions do not ship a "nix" RPM.
|
|
|
|
|
# Instead, Nix is installed and initialized by init-nix.sh, which is
|
|
|
|
|
# called in the %post scriptlet below.
|
2025-12-06 19:32:31 +01:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
This package provides the `pkgmgr` command, which runs Kevin's package
|
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
|
|
|
manager via a local Nix flake:
|
2025-12-06 19:32:31 +01:00
|
|
|
|
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
|
|
|
nix run /usr/lib/package-manager#pkgmgr -- ...
|
2025-12-06 19:32:31 +01:00
|
|
|
|
2025-12-08 15:08:42 +01:00
|
|
|
Nix is a runtime requirement and is installed/initialized by the
|
|
|
|
|
init-nix.sh helper during package installation if it is not yet
|
|
|
|
|
available on the system.
|
2025-12-06 19:32:31 +01:00
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
|
|
%build
|
2025-12-08 15:08:42 +01:00
|
|
|
# No build step required; we ship the project tree as-is.
|
2025-12-06 19:32:31 +01:00
|
|
|
:
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
install -d %{buildroot}%{_bindir}
|
2025-12-09 05:50:08 +01:00
|
|
|
# Install project tree into a fixed, architecture-independent location.
|
|
|
|
|
install -d %{buildroot}/usr/lib/package-manager
|
2025-12-06 19:32:31 +01:00
|
|
|
|
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
|
|
|
# Copy full project source into /usr/lib/package-manager
|
2025-12-09 05:50:08 +01:00
|
|
|
cp -a . %{buildroot}/usr/lib/package-manager/
|
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
|
|
|
|
2025-12-06 19:32:31 +01:00
|
|
|
# Wrapper
|
|
|
|
|
install -m0755 scripts/pkgmgr-wrapper.sh %{buildroot}%{_bindir}/pkgmgr
|
|
|
|
|
|
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
|
|
|
# Shared Nix init script (ensure it is executable in the installed tree)
|
2025-12-09 05:50:08 +01:00
|
|
|
install -m0755 scripts/init-nix.sh %{buildroot}/usr/lib/package-manager/init-nix.sh
|
2025-12-06 19:32:31 +01:00
|
|
|
|
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
|
|
|
# Remove packaging-only and development artefacts from the installed tree
|
|
|
|
|
rm -rf \
|
2025-12-09 05:50:08 +01:00
|
|
|
%{buildroot}/usr/lib/package-manager/PKGBUILD \
|
|
|
|
|
%{buildroot}/usr/lib/package-manager/Dockerfile \
|
|
|
|
|
%{buildroot}/usr/lib/package-manager/debian \
|
|
|
|
|
%{buildroot}/usr/lib/package-manager/.git \
|
|
|
|
|
%{buildroot}/usr/lib/package-manager/.github \
|
|
|
|
|
%{buildroot}/usr/lib/package-manager/tests \
|
|
|
|
|
%{buildroot}/usr/lib/package-manager/.gitignore \
|
|
|
|
|
%{buildroot}/usr/lib/package-manager/__pycache__ \
|
|
|
|
|
%{buildroot}/usr/lib/package-manager/.gitkeep || true
|
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
|
|
|
|
2025-12-06 19:32:31 +01:00
|
|
|
%post
|
2025-12-08 15:08:42 +01:00
|
|
|
# Initialize Nix (if needed) after installing the package-manager files.
|
2025-12-09 05:50:08 +01:00
|
|
|
if [ -x /usr/lib/package-manager/init-nix.sh ]; then
|
|
|
|
|
/usr/lib/package-manager/init-nix.sh || true
|
2025-12-06 19:32:31 +01:00
|
|
|
else
|
2025-12-09 05:50:08 +01:00
|
|
|
echo ">>> Warning: /usr/lib/package-manager/init-nix.sh not found or not executable."
|
2025-12-06 19:32:31 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
echo ">>> package-manager removed. Nix itself was not removed."
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc README.md
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{_bindir}/pkgmgr
|
2025-12-09 05:50:08 +01:00
|
|
|
/usr/lib/package-manager/
|
2025-12-06 19:32:31 +01:00
|
|
|
|
|
|
|
|
%changelog
|
2025-12-09 21:03:24 +01:00
|
|
|
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.8-1
|
|
|
|
|
- Missing pyproject.toml doesn't lead to an error during release
|
|
|
|
|
|
2025-12-09 17:54:41 +01:00
|
|
|
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.7-1
|
|
|
|
|
- Added TEST_PATTERN parameter to execute dedicated tests
|
|
|
|
|
|
2025-12-09 17:14:22 +01:00
|
|
|
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.6-1
|
|
|
|
|
- Fixed pull --preview bug in e2e test
|
|
|
|
|
|
2025-12-09 16:45:45 +01:00
|
|
|
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.5-1
|
|
|
|
|
- Fixed wrong directory permissions for nix
|
|
|
|
|
|
2025-12-09 16:22:03 +01:00
|
|
|
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.4-1
|
|
|
|
|
- Fixed missing build in test workflow -> Tests pass now
|
|
|
|
|
|
2025-12-09 16:08:34 +01:00
|
|
|
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.3-1
|
|
|
|
|
- Fixed bug: Ignored packages are now ignored
|
|
|
|
|
|
2025-12-09 15:49:01 +01:00
|
|
|
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.2-1
|
|
|
|
|
- Implemented Changelog Support for Fedora and Debian
|
|
|
|
|
|
2025-12-06 19:32:31 +01:00
|
|
|
* Sat Dec 06 2025 Kevin Veen-Birkenbach <info@veen.world> - 0.1.1-1
|
|
|
|
|
- Initial RPM packaging for package-manager
|