Fixes to enable bootc #11
@ -354,7 +354,13 @@ find %{buildroot}/usr/include \
|
|||||||
|
|
||||||
|
|
||||||
%posttrans kernel%{?ksuffix}
|
%posttrans kernel%{?ksuffix}
|
||||||
if [ -d /boot ]; then
|
if [ -d /usr/lib/ostree-boot ]; then
|
||||||
|
mv /usr/lib/ostree-boot/config-%{version}-%{release} /usr/lib/modules/%{version}-%{release}
|
||||||
|
|||||||
|
mv /usr/lib/ostree-boot/config-kernel-%{version}-%{release}.inc /usr/lib/modules/%{version}-%{release}
|
||||||
|
mv /usr/lib/ostree-boot/initramfs-%{version}-%{release}.img /usr/lib/modules/%{version}-%{release}/initramfs
|
||||||
|
mv /usr/lib/ostree-boot/kernel-%{version}-%{release}.img /usr/lib/modules/%{version}-%{release}/vmlinuz
|
||||||
|
ls /usr/lib/modules/%{version}-%{release}
|
||||||
|
elif [ -d /boot ]; then
|
||||||
if [ -f /boot/kernel%{armtarget}.img ] || [ ! -f /boot/config-kernel.inc ];then
|
if [ -f /boot/kernel%{armtarget}.img ] || [ ! -f /boot/config-kernel.inc ];then
|
||||||
# if nothing exists, fall back to generating the file, but don't create it
|
# if nothing exists, fall back to generating the file, but don't create it
|
||||||
# if we have moved to initramfs
|
# if we have moved to initramfs
|
||||||
@ -365,12 +371,6 @@ if [ -d /boot ]; then
|
|||||||
cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays/README /boot/overlays/
|
cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays/README /boot/overlays/
|
||||||
/usr/bin/dracut /boot/initramfs-%{version}-%{release}.img %{version}-%{release}
|
/usr/bin/dracut /boot/initramfs-%{version}-%{release}.img %{version}-%{release}
|
||||||
metalefty
commented
I'm afraid this doesn't work as intended. The
I'm afraid this doesn't work as intended. The `almalinux-bootc` image has `/boot` directory so it will never reach `elif [ -d /usr/lib/ostree-boot ]; then` block.
```
$ podman run --rm -it quay.io/almalinuxorg/almalinux-bootc ls -l /
total 36
lrwxrwxrwx. 2 root root 7 Jan 1 1970 bin -> usr/bin
drwxr-xr-x. 2 root root 4096 Jan 1 1970 boot
drwxr-xr-x. 5 root root 360 Nov 14 08:51 dev
drwxr-xr-x. 1 root root 4096 Nov 12 03:18 etc
lrwxrwxrwx. 2 root root 8 Jan 1 1970 home -> var/home
lrwxrwxrwx. 2 root root 7 Jan 1 1970 lib -> usr/lib
lrwxrwxrwx. 2 root root 9 Jan 1 1970 lib64 -> usr/lib64
lrwxrwxrwx. 2 root root 9 Jan 1 1970 media -> run/media
lrwxrwxrwx. 2 root root 7 Jan 1 1970 mnt -> var/mnt
drwxr-xr-x. 2 root root 4096 Jan 1 1970 opt
lrwxrwxrwx. 2 root root 14 Jan 1 1970 ostree -> sysroot/ostree
dr-xr-xr-x. 209 root root 0 Nov 14 08:51 proc
lrwxrwxrwx. 2 root root 12 Jan 1 1970 root -> var/roothome
drwxr-xr-x. 1 root root 4096 Nov 14 08:51 run
lrwxrwxrwx. 2 root root 8 Jan 1 1970 sbin -> usr/sbin
lrwxrwxrwx. 2 root root 7 Jan 1 1970 srv -> var/srv
dr-xr-xr-x. 12 root root 0 Oct 17 00:00 sys
drwxr-xr-x. 1 root root 4096 Jan 1 1970 sysroot
drwxrwxrwt. 2 root root 4096 Jan 1 1970 tmp
drwxr-xr-x. 1 root root 4096 Nov 14 00:47 usr
drwxr-xr-x. 3 root root 4096 Jan 1 1970 var
```
metalefty
commented
Also,
Also, `/boot` always exists because the directory is created during install stage.
```
%install
%if %{with_up}
# kernel
mkdir -p %{buildroot}/boot/overlays/
```
kfox1111
commented
Actually, it did work when I created the pr. somehow it diverted the files from /boot away. by the time the script ran there wasnt a /boot. But, I'll rearrange it to check for bootc and go down that path if its there. Actually, it did work when I created the pr. somehow it diverted the files from /boot away. by the time the script ran there wasnt a /boot. But, I'll rearrange it to check for bootc and go down that path if its there.
kfox1111
commented
I was able to build a 9.5 based image from this flipped around patch. I was able to build a 9.5 based image from this flipped around patch.
|
|||||||
cp /boot/config-kernel-%{version}-%{release}.inc /boot/config-kernel.inc
|
cp /boot/config-kernel-%{version}-%{release}.inc /boot/config-kernel.inc
|
||||||
elif [ -d /usr/lib/ostree-boot ]; then
|
|
||||||
mv /usr/lib/ostree-boot/config-%{version}-%{release} /usr/lib/modules/%{version}-%{release}
|
|
||||||
mv /usr/lib/ostree-boot/config-kernel-%{version}-%{release}.inc /usr/lib/modules/%{version}-%{release}
|
|
||||||
mv /usr/lib/ostree-boot/initramfs-%{version}-%{release}.img /usr/lib/modules/%{version}-%{release}/initramfs
|
|
||||||
mv /usr/lib/ostree-boot/kernel-%{version}-%{release}.img /usr/lib/modules/%{version}-%{release}/vmlinuz
|
|
||||||
ls /usr/lib/modules/%{version}-%{release}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun kernel%{?ksuffix}
|
%postun kernel%{?ksuffix}
|
||||||
|
Loading…
Reference in New Issue
Block a user
I don't think this will work. There's nothing to
mv
at the time. You must put/usr/lib/ostree-boot/kernel-%{version}-%{release}.img
before moving them to/usr/lib/modules
.Please check the status of the plain
almalinux-bootc
container. We're trying to install the kernel for RPi to the bootc container, right?It does work.... I'm running this kernel from this spec. I dont know what kind of games they played with installation as I did not expect it to work either, but they do something between when they extract the files to disk, and when the rpm scripts run that moves files around. By the time the script runs the files are where the scriplet expects.
We can't extend the existing container with the new kernel. That would end up shipping two kernels due to the way container images layer. We have to build a new image with the kernel switched out in the config of the base image.
It didn't work.
How did you install it. Did you try from the bootc tarball I sent?