-
-
Notifications
You must be signed in to change notification settings - Fork 52
feat(packaging): Add Debian package infrastructure #660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| include README.md | ||
| include LICENSE | ||
| recursive-include LLM *.py | ||
| recursive-include cortex *.py | ||
| include LLM/requirements.txt | ||
| recursive-include cortex/i18n/locales *.yaml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| cortex-linux (0.1.0) unstable; urgency=medium | ||
|
|
||
| * Initial release. | ||
| * AI-powered package manager with natural language support | ||
| * Multiple LLM provider support (Anthropic, OpenAI) | ||
| * Secure sandbox execution environment | ||
| * Rich terminal UI with interactive dashboard | ||
|
|
||
| -- Cortex Linux <mike@cortexlinux.com> Tue, 21 Jan 2025 00:00:00 +0000 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| Source: cortex-linux | ||
| Section: admin | ||
| Priority: optional | ||
| Maintainer: Cortex Linux <mike@cortexlinux.com> | ||
| Build-Depends: debhelper-compat (= 13), | ||
| dh-virtualenv (>= 1.2), | ||
| python3, | ||
| python3-dev, | ||
| python3-venv, | ||
| python3-pip, | ||
| python3-setuptools | ||
| Standards-Version: 4.6.0 | ||
| Homepage: https://github.com/cortexlinux/cortex | ||
| Vcs-Browser: https://github.com/cortexlinux/cortex | ||
| Vcs-Git: https://github.com/cortexlinux/cortex.git | ||
|
|
||
| Package: cortex-linux | ||
| Architecture: any | ||
| Depends: ${misc:Depends}, python3 | ||
| Description: AI-powered package manager for Debian/Ubuntu | ||
| Cortex is an AI-powered package manager that understands natural language | ||
| commands for installing, updating, and managing packages on Debian and | ||
| Ubuntu systems. | ||
| . | ||
| Features: | ||
| - Natural language package management | ||
| - AI-assisted dependency resolution | ||
| - Hardware profiling for optimal package selection | ||
| - Integration with apt, snap, and flatpak |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
| Upstream-Name: cortex-linux | ||
| Upstream-Contact: Cortex Linux <mike@cortexlinux.com> | ||
| Source: https://github.com/cortexlinux/cortex | ||
|
|
||
| Files: * | ||
| Copyright: 2024-2025 Cortex Linux | ||
| License: BUSL-1.1 | ||
|
|
||
| License: BUSL-1.1 | ||
| Business Source License 1.1 | ||
| . | ||
| Licensor: Cortex Linux | ||
| . | ||
| Licensed Work: Cortex | ||
| . | ||
| Additional Use Grant: None | ||
| . | ||
| Change Date: Four years from the date the Licensed Work is published. | ||
| . | ||
| Change License: Apache License, Version 2.0 | ||
| . | ||
| For information about the Business Source License, please see | ||
| https://mariadb.com/bsl11/ | ||
| . | ||
| The full license text is available in the LICENSE file in the source | ||
| distribution or at https://github.com/cortexlinux/cortex/blob/main/LICENSE |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| opt/venvs/cortex-linux/bin/cortex usr/bin/cortex | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Scope the symlink to cortex-linux to avoid package file conflicts. Line 1 in 🔧 Proposed fix- opt/venvs/cortex-linux/bin/cortex usr/bin/cortexCreate a new file: 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| if [ "$1" = "purge" ]; then | ||
| rm -rf /opt/venvs/cortex-linux | ||
| fi | ||
|
|
||
| #DEBHELPER# |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| usr/bin |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| #!/usr/bin/make -f | ||
|
|
||
| # Debian rules file for cortex-linux | ||
| # Uses dh-virtualenv for Python packaging | ||
|
|
||
| export DH_VERBOSE = 1 | ||
| export DEB_BUILD_MAINT_OPTIONS = hardening=+all | ||
| export PYBUILD_NAME = cortex-linux | ||
|
|
||
| # Virtualenv installation directory | ||
| VENV_DIR = /opt/venvs/cortex-linux | ||
|
|
||
| # Package directory | ||
| DESTDIR = debian/cortex-linux | ||
|
|
||
| %: | ||
| dh $@ --with python-virtualenv | ||
|
|
||
| override_dh_virtualenv: | ||
| dh_virtualenv \ | ||
| --install-suffix cortex-linux \ | ||
| --python /usr/bin/python3 \ | ||
| --upgrade-pip \ | ||
| --preinstall setuptools \ | ||
| --preinstall wheel \ | ||
| --builtin-venv | ||
|
|
||
| override_dh_auto_test: | ||
| # Skip tests during package build | ||
| # Tests should be run separately in CI | ||
|
|
||
| override_dh_strip: | ||
| dh_strip --no-automatic-dbgsym | ||
|
|
||
| override_dh_shlibdeps: | ||
| dh_shlibdeps -l$(DESTDIR)$(VENV_DIR)/lib |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.0 (native) | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add robust version extraction + validation in release workflow.
The current grep/sed can return empty or wrong VERSION, leading to a malformed changelog and bad package versioning during releases.
✅ Suggested fix
- name: Update changelog for release run: | + set -euo pipefail # Get version from tag or pyproject.toml if [ -n "${{ github.event.release.tag_name }}" ]; then VERSION="${{ github.event.release.tag_name }}" VERSION="${VERSION#v}" # Remove 'v' prefix if present else - VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/') + VERSION=$( + awk ' + /^\[project\]/{in_proj=1; next} + /^\[/{in_proj=0} + in_proj && $0 ~ /^version[[:space:]]*=/ { + if (match($0, /"([^"]+)"/, m)) { print m[1]; exit } + } + ' pyproject.toml + ) fi + if [ -z "${VERSION:-}" ]; then + echo "Error: version not found in [project] section of pyproject.toml" >&2 + exit 1 + fi📝 Committable suggestion
🤖 Prompt for AI Agents