openSUSE / osc

The Command Line Interface to work with an Open Build Service
http://openbuildservice.org/
GNU General Public License v2.0
170 stars 183 forks source link

Can not build s390x on x86_64 host #1618

Open bitstreamout opened 1 month ago

bitstreamout commented 1 month ago

Describe the bug On a Slowroll in a checkout of clisp

werner/clisp> cat .osc/_p*
clisp
devel:languages:misc

I run the command

osc -A extern build --vm-type=qemu --verbose-mode=vm openSUSE_Factory s390x --clean

all went well upto

[   67s] [FAILED] Failed to start Switch Root.

entering the maintenance mode I have just done

systemctl status initrd-switch-root.service -l

and see

[  159s] × initrd-switch-root.service - Switch Root
[  159s]      Loaded: loaded (/usr/lib/systemd/system/initrd-switch-root.service; static)
[  159s]      Active: failed (Result: exit-code) since Fri 2024-08-30 07:10:58 UTC; 1min 32s ago
[  159s]  Invocation: 73867392643e49938a39d19ddd277218
[  159s]     Process: 509 ExecStart=systemctl --no-block switch-root (code=exited, status=1/FAILURE)
[  159s]    Main PID: 509 (code=exited, status=1/FAILURE)
[  159s]    Mem peak: 1M
[  159s]         CPU: 402ms
[  159s] 
[  159s] Aug 30 07:10:57 localhost systemd[1]: Starting Switch Root...
[  159s] Aug 30 07:10:58 localhost @ystemctl[509]: Failed to switch root: Specified switch root path '/sysroot' does not seem to be an OS tree. os-release file is missing.
[  159s] Aug 30 07:10:58 localhost systemd[1]: initrd-switch-root.service: Main process exited, code=exited, status=1/FAILURE
[  159s] Aug 30 07:10:58 localhost systemd[1]: initrd-switch-root.service: Failed with result 'exit-code'.
[  159s] Aug 30 07:10:58 localhost systemd[1]: Failed to start Switch Root.
[  159s] Aug 30 07:10:58 localhost systemd[1]: initrd-switch-root.service: Triggering OnFailure= dependencies.

Versions

To Reproduce see above

Expected behavior a running build of clisp.spec upto the error seen on OBS

Screenshots, console outputs see above

bitstreamout commented 4 weeks ago

The fault is that one has decided to drop /etc/os-release but the build with qemu with different architecture requires a root switch

Failed to switch root: Specified switch root path '/sysroot' does not seem to be an OS tree. os-release file is missing.
bitstreamout commented 4 weeks ago

Hmmm

losetup --find --show openSUSE_Factory-s390x.image
mount /dev/loop0 /mnt
cp /etc/os-release /mnt/etc/os-release
umount /mnt 
losetup --detach /dev/loop0

skipp --clean from osc build and redo ... currently it seems to work

dmach commented 3 weeks ago

osc-1.6.1 is a bit outdated, but that shouldn't be a problem, it only passes arguments to the build (obs-build) tool. I've tested the build on Tumbleweed and it works fine. Maybe there was a problem with the build root content, possibly not installing package with /etc/os-release as you suggested above.

Since I can't reproduce it, would you mind me closing this issue?