Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Sep 6, 2025

This PR implements support for creating Debian packages (.deb files) alongside the existing tar.gz and zip binary archives, addressing the request to "pack python3 binary in also deb file".

Changes Made

Workflow Enhancements

  • Added deb packaging dependencies: Both build.yml and build-glibc236.yml workflows now install dpkg-deb and fakeroot tools required for creating Debian packages
  • Implemented deb package creation: New workflow steps create proper Debian package structure with DEBIAN control files containing package metadata, dependencies, and descriptions
  • Updated release artifacts: GitHub releases now include .deb files alongside existing formats, with SHA256 checksums for all package types

Package Details

  • Regular build: Creates packages named python<major.minor>-custom (e.g., python3.11-custom) installed to /opt/python-<version>/
  • glibc236 build: Creates packages named python<major.minor>-custom-glibc236 installed to /opt/python-<version>-glibc236/
  • Proper dependencies: Control files include appropriate system dependencies (libc6, libssl, zlib1g, etc.) for Debian/Ubuntu compatibility
  • Professional packaging: Follows Debian package standards with proper metadata and descriptions

Documentation Updates

  • Enhanced README: Added comprehensive installation instructions for deb packages
  • Multiple installation methods: Clear guidance for both deb package installation and manual extraction
  • Uninstallation instructions: Added section explaining how to remove installed deb packages

Usage Examples

Installing a deb package:

sudo dpkg -i python-3.11.7-linux-x86_64.deb
/opt/python-3.11.7/bin/python3 --version

Uninstalling:

sudo dpkg -r python3.11-custom

Benefits

  • Easy installation on Debian/Ubuntu systems with proper dependency management
  • Clean uninstallation through APT package management
  • Backward compatibility - existing tar.gz/zip workflows remain unchanged
  • Professional packaging following Debian standards

The implementation maintains minimal changes to existing workflows while adding comprehensive deb package support that integrates seamlessly with the current build process.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits September 6, 2025 11:40
@Copilot Copilot AI changed the title [WIP] pack python3 binary in also deb file Add Debian package (.deb) support to Python binary builds Sep 6, 2025
@Copilot Copilot AI requested a review from anubhavkrishna1 September 6, 2025 11:44
Copilot finished work on behalf of anubhavkrishna1 September 6, 2025 11:44
Copy link
Owner

@anubhavkrishna1 anubhavkrishna1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good

@anubhavkrishna1 anubhavkrishna1 marked this pull request as ready for review September 6, 2025 14:28
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Debian package (.deb) support to the existing Python binary build system, allowing users to install Python binaries as proper Debian packages alongside the existing tar.gz and zip archives.

  • Added .deb package creation to both standard and glibc236 build workflows
  • Updated README with comprehensive installation and uninstallation instructions for deb packages
  • Enhanced release artifacts to include .deb files with SHA256 checksums

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
README.md Added deb package installation instructions and uninstallation section
.github/workflows/build.yml Added deb packaging tools and deb package creation step
.github/workflows/build-glibc236.yml Added deb packaging tools and deb package creation step for glibc236 builds

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

echo "Priority: optional" >> deb_package/DEBIAN/control
echo "Architecture: amd64" >> deb_package/DEBIAN/control
echo "Installed-Size: $INSTALLED_SIZE" >> deb_package/DEBIAN/control
echo "Depends: libc6 (>= 2.17), libssl3 | libssl1.1, zlib1g, libbz2-1.0, libffi8 | libffi7 | libffi6, libgdbm6 | libgdbm5, liblzma5, libncurses6 | libncurses5, libreadline8 | libreadline7 | libreadline6, libsqlite3-0, uuid-runtime" >> deb_package/DEBIAN/control
Copy link
Preview

Copilot AI Sep 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This long dependency line is difficult to read and maintain. Consider breaking it into multiple echo statements or using a multi-line approach for better readability.

Copilot uses AI. Check for mistakes.

echo "Priority: optional" >> deb_package/DEBIAN/control
echo "Architecture: amd64" >> deb_package/DEBIAN/control
echo "Installed-Size: $INSTALLED_SIZE" >> deb_package/DEBIAN/control
echo "Depends: libc6 (>= 2.17), libssl3 | libssl1.1 | libssl1.0.0, zlib1g, libbz2-1.0, libffi8 | libffi7 | libffi6, libgdbm6 | libgdbm5 | libgdbm3, liblzma5, libncurses6 | libncurses5, libreadline8 | libreadline7 | libreadline6, libsqlite3-0, uuid-runtime" >> deb_package/DEBIAN/control
Copy link
Preview

Copilot AI Sep 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This long dependency line is difficult to read and maintain. Consider breaking it into multiple echo statements or using a multi-line approach for better readability.

Suggested change
echo "Depends: libc6 (>= 2.17), libssl3 | libssl1.1 | libssl1.0.0, zlib1g, libbz2-1.0, libffi8 | libffi7 | libffi6, libgdbm6 | libgdbm5 | libgdbm3, liblzma5, libncurses6 | libncurses5, libreadline8 | libreadline7 | libreadline6, libsqlite3-0, uuid-runtime" >> deb_package/DEBIAN/control
DEPENDS="libc6 (>= 2.17),"
DEPENDS="$DEPENDS libssl3 | libssl1.1 | libssl1.0.0,"
DEPENDS="$DEPENDS zlib1g,"
DEPENDS="$DEPENDS libbz2-1.0,"
DEPENDS="$DEPENDS libffi8 | libffi7 | libffi6,"
DEPENDS="$DEPENDS libgdbm6 | libgdbm5 | libgdbm3,"
DEPENDS="$DEPENDS liblzma5,"
DEPENDS="$DEPENDS libncurses6 | libncurses5,"
DEPENDS="$DEPENDS libreadline8 | libreadline7 | libreadline6,"
DEPENDS="$DEPENDS libsqlite3-0,"
DEPENDS="$DEPENDS uuid-runtime"
echo "Depends: $DEPENDS" >> deb_package/DEBIAN/control

Copilot uses AI. Check for mistakes.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unnecessary dependencies just keep important ones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants