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

Add elemental-seedimage-hooks package #590

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion .obs/dockerfile/seedimage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARG SLE_VERSION
FROM suse/sle15:$SLE_VERSION as BASE

RUN mkdir -p /installroot && \
zypper --gpg-auto-import-keys --installroot /installroot in -y --no-recommends elemental-toolkit elemental-httpfy xorriso curl coreutils ca-certificates ca-certificates-mozilla gptfdisk squashfs util-linux dosfstools mtools e2fsprogs grub2
zypper --gpg-auto-import-keys --installroot /installroot in -y --no-recommends elemental-toolkit elemental-httpfy elemental-seedimage-hooks xorriso curl coreutils ca-certificates ca-certificates-mozilla gptfdisk squashfs util-linux dosfstools mtools e2fsprogs grub2


FROM scratch as SEEDIMAGE_BUILDER
Expand Down
19 changes: 19 additions & 0 deletions .obs/specfile/elemental-operator.spec
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ BuildRequires: compiler(go-compiler) >= 1.20

BuildRoot: %{_tmppath}/%{name}-%{version}-build

%define systemdir /system
%define oemdir %{systemdir}/oem

%package -n elemental-register
Summary: The registration client

Expand All @@ -75,6 +78,12 @@ Summary: Simple http server
%description -n elemental-httpfy
httpfy starts a simple http server, serving files from the current dir.

%package -n elemental-seedimage-hooks
Summary: Hooks used in SeedImage builder

%description -n elemental-seedimage-hooks
Hooks used in SeedImage builder to copy firmware when building disk-images.

%prep
%setup -q -n %{name}-%{version}
cp %{S:1} .
Expand Down Expand Up @@ -116,6 +125,9 @@ make httpfy
%{__install} -m 755 build/elemental-support %{buildroot}%{_sbindir}
%{__install} -m 755 build/elemental-httpfy %{buildroot}%{_sbindir}

# hooks
%{__install} -m 755 hooks/*.yaml %{buildroot}%{oemdir}

%files
%defattr(-,root,root,-)
%license LICENSE
Expand All @@ -137,4 +149,11 @@ make httpfy
%license LICENSE
%{_sbindir}/elemental-httpfy

%files -n elemental-seedimage-hooks
%defattr(-,root,root,-)
%license LICENSE
%dir %{systemdir}
%dir %{oemdir}
%{oemdir}/*

%changelog
6 changes: 6 additions & 0 deletions hooks/01_rpi-firmware.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: "Raspberry Pi post disk hook"
stages:
after-disk:
- name: "Copy firmware to EFI partition"
commands:
- cp -r /iso/build/recovery.img.root/boot/vc/* /iso/build/efi/
Loading