2020-08-10 15:39:03 +00:00
cd $( dirname $0 )
cp -a 97genesis /usr/lib/dracut/modules.d/
cat /usr/lib/dracut/modules.d/97genesis/install-* > /usr/lib/dracut/modules.d/97genesis/install
2020-08-10 18:49:30 +00:00
chmod +x /usr/lib/dracut/modules.d/97genesis/install /usr/lib/dracut/modules.d/97genesis/installkernel
2020-08-10 15:39:03 +00:00
mkdir -p boot/initramfs
mkdir -p boot/efi/boot
2021-06-24 18:00:19 +00:00
dracut --no-early-microcode --xz -N -m "genesis base" -f boot/initramfs/distribution $( uname -r)
2022-04-25 17:04:45 +00:00
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
2020-08-10 15:39:03 +00:00
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
2022-02-15 15:32:39 +00:00
mkdir -p ~/rpmbuild/SOURCES/
2022-04-25 17:04:45 +00:00
tar cf ~/rpmbuild/SOURCES/confluent-genesis.tar boot rpmlist
2020-08-11 13:54:53 +00:00
rpmbuild -bb confluent-genesis.spec
2020-08-10 15:39:03 +00:00
rm -rf /usr/lib/dracut/modules.d/97genesis
cd -
2020-08-11 13:54:53 +00:00
# getting src rpms would be nice, but centos isn't consistent..
2020-10-30 16:34:42 +00:00
# /usr/lib/dracut/skipcpio /opt/confluent/genesis/x86_64/boot/initramfs/distribution | xzcat | cpio -dumiv
# rpm -qf $(find . -type f | sed -e 's/^.//') |sort -u|grep -v 'not owned' > ../rpmlist
# for f in $(find . -type f | sed -e 's/^.//'); do echo -n $f:; rpm -qf $f ; done > ../annotedrprmlist
2020-08-13 11:55:28 +00:00
# for i in $(cat rpmlist); do rpm -qi $i|grep Source; done |awk '{print $4}'|sort -u > srcrpmlist
2020-10-30 16:34:42 +00:00
# for i in $(cat ../srcrpmlist); do wget --continue http://vault.centos.org/8.2.2004/BaseOS/Source/SPackages/$i; done
# ls > downloadedsrcpmlist
# diff -u srcpmlist downloadedsrcrpmlist
# diff -u srcrpmlist downloadedsrcpmrlist |grep ^-|grep -v srcrpmlist
# for i in $(diff -u srcrpmlist downloadedsrcpmrlist |grep ^-|grep -v srcrpmlist|sed -e s/-//); do wget --continue http://vault.centos.org/8.2.2004/AppStream/Source/SPackages/$i; done
2020-08-13 11:55:28 +00:00
2020-08-11 13:54:53 +00:00