Fixes to enable bootc #11

Open
kfox1111 wants to merge 2 commits from kfox1111/raspberrypi2:a9-bootc into a9
First-time contributor

Signed-off-by: Kevin Fox Kevin.Fox@pnnl.gov

Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
kfox1111 added 1 commit 2024-10-12 02:47:34 +00:00
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
eabdullin requested review from alukoshko 2024-10-16 09:32:42 +00:00
alukoshko approved these changes 2024-10-22 20:30:52 +00:00
metalefty requested changes 2024-10-23 02:55:54 +00:00
metalefty left a comment
Contributor

Let's merge when bootc image creation process is ready. Not now.

Let's merge when bootc image creation process is ready. Not now.
metalefty reviewed 2024-11-14 08:52:30 +00:00
@ -360,0 +369,4 @@
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}
Contributor

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
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 ```
Contributor

Also, /boot always exists because the directory is created during install stage.

%install
%if %{with_up}
# kernel
mkdir -p %{buildroot}/boot/overlays/
Also, `/boot` always exists because the directory is created during install stage. ``` %install %if %{with_up} # kernel mkdir -p %{buildroot}/boot/overlays/ ```
Author
First-time contributor

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.
Author
First-time contributor

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.
Author
First-time contributor

Ah, ok. So, maybe we trigger the other way around then? if -d /usr/lib/ostree-boot, do that first, otherwise, fall back.

Ah, ok. So, maybe we trigger the other way around then? if -d /usr/lib/ostree-boot, do that first, otherwise, fall back.
kfox1111 force-pushed a9-bootc from 53d21a7b93 to ab62994e26 2024-11-21 02:41:08 +00:00 Compare
kfox1111 added 1 commit 2024-11-21 02:44:25 +00:00
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u a9-bootc:kfox1111-a9-bootc
git checkout kfox1111-a9-bootc
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: rpms/raspberrypi2#11
No description provided.