Skip to content
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 @@ -246,6 +246,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.3
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