2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Add file to show the rpm versions at build time of genesis

This commit is contained in:
Jarrod Johnson 2022-04-25 13:04:45 -04:00
parent f6a16a89f2
commit 8947ab08da
2 changed files with 12 additions and 1 deletions

View File

@ -5,11 +5,21 @@ chmod +x /usr/lib/dracut/modules.d/97genesis/install /usr/lib/dracut/modules.d/9
mkdir -p boot/initramfs
mkdir -p boot/efi/boot
dracut --no-early-microcode --xz -N -m "genesis base" -f boot/initramfs/distribution $(uname -r)
tdir=$(mktemp -d)
tfile=$(mktemp)
cp boot/initramfs/distribution $tdir
cd $tdir
xzcat distribution|cpio -dumi
rm distribution
find . -type f -exec rpm -qf /{} \; 2> /dev/null | grep -v 'not owned' | sort -u > $tfile
cd -
rm -rf $tdir
cp $tfile rpmlist
cp -f /boot/vmlinuz-$(uname -r) boot/kernel
cp /boot/efi/EFI/BOOT/BOOTX64.EFI boot/efi/boot
cp /boot/efi/EFI/centos/grubx64.efi boot/efi/boot/grubx64.efi
mkdir -p ~/rpmbuild/SOURCES/
tar cf ~/rpmbuild/SOURCES/confluent-genesis.tar boot
tar cf ~/rpmbuild/SOURCES/confluent-genesis.tar boot rpmlist
rpmbuild -bb confluent-genesis.spec
rm -rf /usr/lib/dracut/modules.d/97genesis
cd -

View File

@ -28,6 +28,7 @@ find . -type f -exec chmod o+r {} +
find . -type f -exec chmod -x {} +
%files
/opt/confluent/genesis/%{arch}/rpmlist
/opt/confluent/genesis/%{arch}/boot/efi/boot/BOOTX64.EFI
/opt/confluent/genesis/%{arch}/boot/efi/boot/grubx64.efi
/opt/confluent/genesis/%{arch}/boot/initramfs/distribution