Linutronix / elbe

Embedded Linux Build Environment
https://elbe-rfs.org
GNU General Public License v3.0
163 stars 59 forks source link

Syntax Error during ELBE Dockerfile Build #327

Closed phschulth closed 2 years ago

phschulth commented 2 years ago

Hi all,

i want to run ELBE Image Build Process in Git Pipeline. Therefor i tried to create a ELBE Container with the provided Dockerfile from /elbe/contrib/dockerfile. I'm using a Debian 9 Buster.

make build
Adding user libvirt-qemu to group libvirt-qemu
Created symlink /etc/systemd/system/multi-user.target.wants/libvirt-guests.service → /lib/systemd/system/libvirt-guests.service.
Created symlink /etc/systemd/system/multi-user.target.wants/libvirtd.service → /lib/systemd/system/libvirtd.service.
Created symlink /etc/systemd/system/sockets.target.wants/virtlockd.socket → /lib/systemd/system/virtlockd.socket.
Created symlink /etc/systemd/system/sockets.target.wants/virtlogd.socket → /lib/systemd/system/virtlogd.socket.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: could not determine current runlevel
invoke-rc.d: could not determine current runlevel
Processing triggers for sgml-base (1.29) ...
Setting up elbe-schema (14.2+deb9+build1021) ...
Setting up python3-elbe-common (14.2+deb9+build1021) ...
  File "/usr/lib/python3/dist-packages/elbepack/hdimg.py", line 403
    do(f'dd if="{tmp}" of="{loopdev}"')
                                     ^
SyntaxError: invalid syntax

dpkg: error processing package python3-elbe-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-elbe-control:
 python3-elbe-control depends on python3-elbe-common (= 14.2+deb9+build1021); however:
  Package python3-elbe-common is not configured yet.

dpkg: error processing package python3-elbe-control (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-elbe-bin:
 python3-elbe-bin depends on python3-elbe-common (= 14.2+deb9+build1021); however:
  Package python3-elbe-common is not configured yet.

dpkg: error processing package python3-elbe-bin (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of elbe:
 elbe depends on python3-elbe-bin (= 14.2+deb9+build1021); however:
  Package python3-elbe-bin is not configured yet.
 elbe depends on python3-elbe-control (= 14.2+deb9+build1021); however:
  Package python3-elbe-control is not configured yet.

dpkg: error processing package elbe (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u13) ...
Processing triggers for dbus (1.10.32-0+deb9u1) ...
Errors were encountered while processing:
 python3-elbe-common
 python3-elbe-control
 python3-elbe-bin
 elbe
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/sh -c apt-get install -y --no-install-recommends         elbe         elbe-doc' returned a non-zero code: 100
make: *** [Makefile:18: build] Fehler 100

I tried to modify the local package, but it downloads the package each time i want to install so each modification is erased.

The Package is downloaded from here during build process: Get:4 http://debian.linutronix.de/elbe stretch/main amd64 python3-elbe-common all 14.2+deb9+build1021 [73.3 kB]

I checked hdimg.py and the code has not changed.

Is there a way to fix this?

bgermann commented 2 years ago

Debian 9 is called stretch and this applies to stretch (Python 3.5) only. The syntax error stems from a Python 3.5 syntax check.

Installing v14.0 will work. This will be fixed with the next release by https://lists.linutronix.de/pipermail/elbe-devel/2022-May/005640.html