slimtoolkit / slim

Slim(toolkit): Don't change anything in your container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)
Apache License 2.0
18.85k stars 702 forks source link

Create RPM packaging for slim #603

Closed Rohansjamadagni closed 6 months ago

Rohansjamadagni commented 8 months ago

What

Add support for building source and binary rpms

Why

I saw it on the roadmap and thought I'd contribute. Should be useful for a lot of folks running on RHEL based distros.

How Tested

Tested on fedora and almalinux containers. Steps followed for testing:

dnf install -y git golang rpmdevtools
cd && git clone https://github.com/Rohansjamadagni/slim && cd slim
spectool -g -R packaging/slim.spec
rpmbuild -ba  packaging/slim.spec
dnf install -y /root/rpmbuild/RPMS/x86_64/slim-1.40.6-1.el9.x86_64.rpm
slim --version

I could probably add a GitHub action to automatically build the rpm and publish the artifacts. Please let me know if this would be helpful or if you have any other questions.

kcq commented 7 months ago

thank you @Rohansjamadagni ! reviewing the PR