Introduce %post and remove SRPM (wrongly committed)

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
David Abdurachmanov 2019-01-16 20:50:46 +01:00
parent b29a48af8c
commit 420cb51711
Signed by: davidlt
GPG Key ID: 7108702C938B13C1
2 changed files with 14 additions and 7 deletions

View File

@ -4,7 +4,7 @@
Name: fedora-bbl
# The last part is short hash
Version: 2019.01.16.66c13fd
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Berkeley Boot Loader (BBL) with embedded Fedora kernel
License: BSD
@ -57,20 +57,27 @@ popd
%install
pushd build
machine_id=$(cat /etc/machine-id)
kernel_vra=$(rpm -q --queryformat='%{RPMTAG_VERSION}-%{RPMTAG_RELEASE}.%{ARCH}' kernel-core)
images_dir="/boot/$machine_id/$kernel_vra"
mkdir -p %{buildroot}${images_dir}
cp bbl %{buildroot}${images_dir}
mkdir -p %{buildroot}/boot
cp bbl %{buildroot}/boot/bbl
popd
%files
%license LICENSE LICENSE.Batten LICENSE.riscv_logo.txt
%doc README.md
/boot/*
/boot/bbl
%post
machine_id=$(cat /etc/machine-id)
kernel_vra=$(rpm -q --queryformat='%{RPMTAG_VERSION}-%{RPMTAG_RELEASE}.%{ARCH}' kernel-core)
images_dir="/boot/$machine_id/$kernel_vra"
cp -f /boot/bbl "/boot/$machine_id/$kernel_vra/bbl"
rm -f /boot/bbl
%changelog
* Wed Jan 16 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> 2019.01.16.66c13fd-2
- Introduce %post to move BBL into proper directory (/boot/machine_id/kernel_version/bbl)
* Wed Jan 16 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> 2019.01.16.66c13fd-1
- Modify to follow: https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault