Skip to content
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

feat: Create a COPR build of blue-build #356

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ installer:
DO --pass-args +SAVE_IMAGE --SUFFIX="-installer"
SAVE ARTIFACT /out/bluebuild

rpm-build:
FROM fedora
RUN dnf -y install --refresh gcc rpm-build rpm-devel rpmlint mock make python3 bash coreutils diffutils patch rpmdevtools cargo
RUN rpmdev-setuptree
COPY bluebuild.spec $HOME/rpmbuild/SPECS/
RUN rpmbuild -ba ~/rpmbuild/SPECS/bluebuild.spec
RUN mock -r fedora-rawhide-x86_64 --buildsrpm --spec ~/rpmbuild/SPECS/myprogram.spec --resultdir=~/rpmbuild/results

cosign:
FROM ghcr.io/sigstore/cosign/cosign:v2.4.2
SAVE ARTIFACT /ko-app/cosign
Expand Down
26 changes: 26 additions & 0 deletions bluebuild.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Name: bluebuild
Version: 0.9.6
Release: 1%{?dist}
Summary: BlueBuild's command line program that builds Containerfiles and custom images based on your recipe.yml.
License: Apache-2.0
URL: https://github.com/blue-build
Source0: https://github.com/blue-build/cli/archive/refs/tags/v%{version}.tar.gz
BuildRequires: cargo
Requires: podman,buildah

%description
%{summary}

%prep
tar -xf %{SOURCE0}
cd v%{version}/

%build
cargo build --release

%install
mkdir -p $RPM_BUILD_ROOT/usr/bin
install -Dm 755 target/release/bluebuild $RPM_BUILD_ROOT/usr/bin/bluebuild

%clean
rm -rf $RPM_BUILD_ROOT
Loading