-
Notifications
You must be signed in to change notification settings - Fork 55
Add RPM and DEB package support to build system and CI/CD pipeline #1201
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
Conversation
Co-authored-by: SteveL-MSFT <11859881+SteveL-MSFT@users.noreply.github.com>
…c dependencies Co-authored-by: SteveL-MSFT <11859881+SteveL-MSFT@users.noreply.github.com>
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.
Pull Request Overview
This PR adds RPM package creation support to the build system, enabling DSC distribution on RPM-based Linux systems. The implementation follows the existing tgz packaging pattern and includes proper validation and error handling.
Key Changes:
- Added
rpmas a valid package type option with comprehensive build logic - Created RPM spec file using environment variables for broad distribution compatibility
- Implemented architecture mapping from Rust targets to RPM architectures
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| build.ps1 | Added RPM package type validation and complete packaging logic including platform checks, directory structure creation, and rpmbuild integration |
| packaging/rpm/dsc.spec | New RPM specification file defining package metadata, installation paths, and file listings using environment variables for compatibility |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot do the same changes to support |
Co-authored-by: SteveL-MSFT <11859881+SteveL-MSFT@users.noreply.github.com>
DEB package support has been added in commit 03a0eb0. The implementation follows the same pattern as RPM packaging:
Usage: ./build.ps1 -packageType deb -architecture x86_64-unknown-linux-musl |
Co-authored-by: SteveL-MSFT <11859881+SteveL-MSFT@users.noreply.github.com>
|
@copilot update the https://github.com/PowerShell/DSC/blob/main/.pipelines/DSC-Official.yml pipeline to create the deb and rpm packages |
Co-authored-by: SteveL-MSFT <11859881+SteveL-MSFT@users.noreply.github.com>
Updated the DSC-Official.yml pipeline in commit 06c79d1 to create RPM and DEB packages: Changes made:
The pipeline now creates and publishes:
|
|
Test run worked |
This PR implements RPM and DEB package creation support for DSC, addressing issue #1200.
Overview
The build system and CI/CD pipeline now support creating RPM and DEB packages for Linux distributions using the
-packageType rpmor-packageType debparameters. This enables easier installation and distribution of DSC on both RPM-based Linux systems (like Fedora, RHEL, SUSE) and Debian-based systems (like Ubuntu, Debian).Changes
build.ps1
'rpm'and'deb'as valid options for the-packageTypeparameteruname -muname -mpackaging/rpm/dsc.spec
$RPM_BUILD_ROOT,$RPM_SOURCE_DIR) instead of macros to ensure compatibility across all RPM-based distributions, not just RedHat/Fedora/opt/dscwith a symlink at/usr/bin/dscfor easy accesspackaging/deb/control
/opt/dscwith a symlink at/usr/bin/dscfor easy access (same as RPM).pipelines/DSC-Official.yml
BuildLinuxMuslandBuildLinuxArm64Musljobs to install rpm, dpkg, and build-essential packagesReleasePreparationstage to download and include*.rpmand*.debartifactsReleasestage to include RPM and DEB packages in GitHub releasesdsc-{version}-1.x86_64.rpmdsc_{version}-1_amd64.debdsc-{version}-1.aarch64.rpmdsc_{version}-1_arm64.debUsage
The RPM will be created in the
bin/directory asdsc-{version}-1.{arch}.rpmThe DEB will be created in the
bin/directory asdsc_{version}-1_{arch}.debSupported Architectures
RPM:
DEB:
Installation
Users can install the RPM package using:
sudo rpm -i dsc-{version}-1.{arch}.rpm # Or with package managers sudo dnf install dsc-{version}-1.{arch}.rpmUsers can install the DEB package using:
sudo dpkg -i dsc_{version}-1_{arch}.deb # Or with package managers sudo apt install ./dsc_{version}-1_{arch}.debTesting
This implementation follows the same patterns as the existing
tgzpackaging, ensuring consistency and maintainability. RPM and DEB packages are now automatically built and released through the CI/CD pipeline alongside existing package formats.Fixes #1200
Original prompt
Fixes #1200
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.