Untitled

🧩 Syntax:
$ bash run.sh -v image A20-OLinuXino bullseye minimal A20-OLinuXino-bullseye-minimal-$(date +%Y%m%d-%H%M%S).img
Sending build context to Docker daemon  3.584kB
Step 1/6 : FROM ubuntu:focal
 ---> 53df61775e88
Step 2/6 : ENV LANG=C.UTF-8
 ---> Using cache
 ---> b414710d695f
Step 3/6 : ENV LC_ALL=C.UTF-8
 ---> Using cache
 ---> fcd087fae708
Step 4/6 : ENV DEBIAN_FRONTEND noninteractive
 ---> Using cache
 ---> 68c1b9ad605a
Step 5/6 : RUN apt-get update &&     apt-get install -y         debootstrap         gdisk         kpartx         parted         python-dev         python3         python3-gdbm         python3-pip         python3-tk         python3-cerberus         python3-click         python3-jinja2         python3-yaml         python3-cliapp         rsync         qemu-user-static         qemu-utils         u-boot-tools         udev &&     rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 445363797c50
Step 6/6 : RUN pip3 install     halo     pinject
 ---> Using cache
 ---> 9e1a7cc154e4
Successfully built 9e1a7cc154e4
Successfully tagged olimage:latest
I: Creating 'minimal' filesystem...
I: Build
Found existing stamp: /olimage/output/a20-olinuxino/filesystem/.stamp-bullseye-minimal_build. Skipping
I: Configure
I: Extracting archive: bullseye-minimal.build.tar.gz
Extracting /olimage/output/a20-olinuxino/filesystem/bullseye-minimal.build.tar.gz to /olimage/output/a20-olinuxino/filesystem/bullseye-minimal
run external command: [['tar', '-axpf', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal.build.tar.gz', '-C', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal']]
I: Copying /etc/resolv.conf
run external command: [['rm', '-vf', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/etc/resolv.conf']]
removed '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/etc/resolv.conf'
run external command: [['cp', '-vf', '/etc/resolv.conf', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/etc/resolv.conf']]
'/etc/resolv.conf' -> '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/etc/resolv.conf'
I: Configuring the APT repositories
I: Installing packages
run external command: [['mount', '-t', 'proc', 'proc', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/proc']]
run external command: [['mount', '--bind', '/dev', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/dev']]
run external command: [['mount', '--bind', '/dev/pts', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/dev/pts']]
run external command: [['mount', '--bind', '/sys', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/sys']]
run external command: [['chroot', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal', 'apt-get', 'install', '-y', 'apt-transport-https', 'ca-certificates', 'gnupg']]
Reading package lists...

Building dependency tree...

The following additional packages will be installed:
  dirmngr gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server
  gpgconf gpgsm libassuan0 libksba8 libldap-2.4-2 libldap-common libnpth0
  libsasl2-2 libsasl2-modules libsasl2-modules-db libsqlite3-0 openssl
  pinentry-curses
Suggested packages:
  dbus-user-session libpam-systemd pinentry-gnome3 tor parcimonie xloadimage
  scdaemon libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal
  libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql pinentry-doc
The following NEW packages will be installed:
  apt-transport-https ca-certificates dirmngr gnupg gnupg-l10n gnupg-utils gpg
  gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libassuan0 libksba8
  libldap-2.4-2 libldap-common libnpth0 libsasl2-2 libsasl2-modules
  libsasl2-modules-db libsqlite3-0 openssl pinentry-curses
0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.
Need to get 9783 kB of archives.
After this operation, 17.4 MB of additional disk space will be used.
Get:1 http://httpredir.debian.org/debian bullseye/main armhf openssl armhf 1.1.1n-0+deb11u1 [828 kB]
Get:2 http://httpredir.debian.org/debian bullseye/main armhf ca-certificates all 20210119 [158 kB]
Get:3 http://httpredir.debian.org/debian bullseye/main armhf apt-transport-https all 2.2.4 [160 kB]
Get:4 http://httpredir.debian.org/debian bullseye/main armhf libassuan0 armhf 2.5.3-7.1 [44.2 kB]
Get:5 http://httpredir.debian.org/debian bullseye/main armhf gpgconf armhf 2.2.27-2+deb11u1 [532 kB]
Get:6 http://httpredir.debian.org/debian bullseye/main armhf libksba8 armhf 1.5.0-3 [105 kB]
Get:7 http://httpredir.debian.org/debian bullseye/main armhf libsasl2-modules-db armhf 2.1.27+dfsg-2.1+deb11u1 [67.7 kB]
Get:8 http://httpredir.debian.org/debian bullseye/main armhf libsasl2-2 armhf 2.1.27+dfsg-2.1+deb11u1 [99.2 kB]
Get:9 http://httpredir.debian.org/debian bullseye/main armhf libldap-2.4-2 armhf 2.4.57+dfsg-3 [210 kB]
Get:10 http://httpredir.debian.org/debian bullseye/main armhf libnpth0 armhf 1.6-3 [17.8 kB]
Get:11 http://httpredir.debian.org/debian bullseye/main armhf dirmngr armhf 2.2.27-2+deb11u1 [722 kB]
Get:12 http://httpredir.debian.org/debian bullseye/main armhf gnupg-l10n all 2.2.27-2+deb11u1 [1085 kB]
Get:13 http://httpredir.debian.org/debian bullseye/main armhf gnupg-utils armhf 2.2.27-2+deb11u1 [835 kB]
Get:14 http://httpredir.debian.org/debian bullseye/main armhf libsqlite3-0 armhf 3.34.1-3 [713 kB]
Get:15 http://httpredir.debian.org/debian bullseye/main armhf gpg armhf 2.2.27-2+deb11u1 [868 kB]
Get:16 http://httpredir.debian.org/debian bullseye/main armhf pinentry-curses armhf 1.1.0-4 [60.6 kB]
Get:17 http://httpredir.debian.org/debian bullseye/main armhf gpg-agent armhf 2.2.27-2+deb11u1 [630 kB]
Get:18 http://httpredir.debian.org/debian bullseye/main armhf gpg-wks-client armhf 2.2.27-2+deb11u1 [509 kB]
Get:19 http://httpredir.debian.org/debian bullseye/main armhf gpg-wks-server armhf 2.2.27-2+deb11u1 [503 kB]
Get:20 http://httpredir.debian.org/debian bullseye/main armhf gpgsm armhf 2.2.27-2+deb11u1 [617 kB]
Get:21 http://httpredir.debian.org/debian bullseye/main armhf gnupg all 2.2.27-2+deb11u1 [825 kB]
Get:22 http://httpredir.debian.org/debian bullseye/main armhf libldap-common all 2.4.57+dfsg-3 [95.9 kB]
Get:23 http://httpredir.debian.org/debian bullseye/main armhf libsasl2-modules armhf 2.1.27+dfsg-2.1+deb11u1 [96.8 kB]
Preconfiguring packages ...
Fetched 9783 kB in 11s (879 kB/s)
Selecting previously unselected package openssl.
(Reading database ...
(Reading database ... 5%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
9198 files and directories currently installed.)
Preparing to unpack .../00-openssl_1.1.1n-0+deb11u1_armhf.deb ...
Unpacking openssl (1.1.1n-0+deb11u1) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../01-ca-certificates_20210119_all.deb ...
Unpacking ca-certificates (20210119) ...
Selecting previously unselected package apt-transport-https.
Preparing to unpack .../02-apt-transport-https_2.2.4_all.deb ...
Unpacking apt-transport-https (2.2.4) ...
Selecting previously unselected package libassuan0:armhf.
Preparing to unpack .../03-libassuan0_2.5.3-7.1_armhf.deb ...
Unpacking libassuan0:armhf (2.5.3-7.1) ...
Selecting previously unselected package gpgconf.
Preparing to unpack .../04-gpgconf_2.2.27-2+deb11u1_armhf.deb ...
Unpacking gpgconf (2.2.27-2+deb11u1) ...
Selecting previously unselected package libksba8:armhf.
Preparing to unpack .../05-libksba8_1.5.0-3_armhf.deb ...
Unpacking libksba8:armhf (1.5.0-3) ...
Selecting previously unselected package libsasl2-modules-db:armhf.
Preparing to unpack .../06-libsasl2-modules-db_2.1.27+dfsg-2.1+deb11u1_armhf.deb ...
Unpacking libsasl2-modules-db:armhf (2.1.27+dfsg-2.1+deb11u1) ...
Selecting previously unselected package libsasl2-2:armhf.
Preparing to unpack .../07-libsasl2-2_2.1.27+dfsg-2.1+deb11u1_armhf.deb ...
Unpacking libsasl2-2:armhf (2.1.27+dfsg-2.1+deb11u1) ...
Selecting previously unselected package libldap-2.4-2:armhf.
Preparing to unpack .../08-libldap-2.4-2_2.4.57+dfsg-3_armhf.deb ...
Unpacking libldap-2.4-2:armhf (2.4.57+dfsg-3) ...
Selecting previously unselected package libnpth0:armhf.
Preparing to unpack .../09-libnpth0_1.6-3_armhf.deb ...
Unpacking libnpth0:armhf (1.6-3) ...
Selecting previously unselected package dirmngr.
Preparing to unpack .../10-dirmngr_2.2.27-2+deb11u1_armhf.deb ...
Unpacking dirmngr (2.2.27-2+deb11u1) ...
Selecting previously unselected package gnupg-l10n.
Preparing to unpack .../11-gnupg-l10n_2.2.27-2+deb11u1_all.deb ...
Unpacking gnupg-l10n (2.2.27-2+deb11u1) ...
Selecting previously unselected package gnupg-utils.
Preparing to unpack .../12-gnupg-utils_2.2.27-2+deb11u1_armhf.deb ...
Unpacking gnupg-utils (2.2.27-2+deb11u1) ...
Selecting previously unselected package libsqlite3-0:armhf.
Preparing to unpack .../13-libsqlite3-0_3.34.1-3_armhf.deb ...
Unpacking libsqlite3-0:armhf (3.34.1-3) ...
Selecting previously unselected package gpg.
Preparing to unpack .../14-gpg_2.2.27-2+deb11u1_armhf.deb ...
Unpacking gpg (2.2.27-2+deb11u1) ...
Selecting previously unselected package pinentry-curses.
Preparing to unpack .../15-pinentry-curses_1.1.0-4_armhf.deb ...
Unpacking pinentry-curses (1.1.0-4) ...
Selecting previously unselected package gpg-agent.
Preparing to unpack .../16-gpg-agent_2.2.27-2+deb11u1_armhf.deb ...
Unpacking gpg-agent (2.2.27-2+deb11u1) ...
Selecting previously unselected package gpg-wks-client.
Preparing to unpack .../17-gpg-wks-client_2.2.27-2+deb11u1_armhf.deb ...
Unpacking gpg-wks-client (2.2.27-2+deb11u1) ...
Selecting previously unselected package gpg-wks-server.
Preparing to unpack .../18-gpg-wks-server_2.2.27-2+deb11u1_armhf.deb ...
Unpacking gpg-wks-server (2.2.27-2+deb11u1) ...
Selecting previously unselected package gpgsm.
Preparing to unpack .../19-gpgsm_2.2.27-2+deb11u1_armhf.deb ...
Unpacking gpgsm (2.2.27-2+deb11u1) ...
Selecting previously unselected package gnupg.
Preparing to unpack .../20-gnupg_2.2.27-2+deb11u1_all.deb ...
Unpacking gnupg (2.2.27-2+deb11u1) ...
Selecting previously unselected package libldap-common.
Preparing to unpack .../21-libldap-common_2.4.57+dfsg-3_all.deb ...
Unpacking libldap-common (2.4.57+dfsg-3) ...
Selecting previously unselected package libsasl2-modules:armhf.
Preparing to unpack .../22-libsasl2-modules_2.1.27+dfsg-2.1+deb11u1_armhf.deb ...
Unpacking libsasl2-modules:armhf (2.1.27+dfsg-2.1+deb11u1) ...
Setting up libksba8:armhf (1.5.0-3) ...
Setting up apt-transport-https (2.2.4) ...
Setting up libsqlite3-0:armhf (3.34.1-3) ...
Setting up libsasl2-modules:armhf (2.1.27+dfsg-2.1+deb11u1) ...
Setting up libnpth0:armhf (1.6-3) ...
Setting up libassuan0:armhf (2.5.3-7.1) ...
Setting up libldap-common (2.4.57+dfsg-3) ...
Setting up libsasl2-modules-db:armhf (2.1.27+dfsg-2.1+deb11u1) ...
Setting up gnupg-l10n (2.2.27-2+deb11u1) ...
Setting up libsasl2-2:armhf (2.1.27+dfsg-2.1+deb11u1) ...
Setting up gpgconf (2.2.27-2+deb11u1) ...
Setting up openssl (1.1.1n-0+deb11u1) ...
Setting up gpg (2.2.27-2+deb11u1) ...
Setting up gnupg-utils (2.2.27-2+deb11u1) ...
Setting up pinentry-curses (1.1.0-4) ...
Setting up gpg-agent (2.2.27-2+deb11u1) ...
Created symlink /etc/systemd/user/sockets.target.wants/gpg-agent-browser.socket -> /usr/lib/systemd/user/gpg-agent-browser.socket.
Created symlink /etc/systemd/user/sockets.target.wants/gpg-agent-extra.socket -> /usr/lib/systemd/user/gpg-agent-extra.socket.
Created symlink /etc/systemd/user/sockets.target.wants/gpg-agent-ssh.socket -> /usr/lib/systemd/user/gpg-agent-ssh.socket.
Created symlink /etc/systemd/user/sockets.target.wants/gpg-agent.socket -> /usr/lib/systemd/user/gpg-agent.socket.
Setting up gpgsm (2.2.27-2+deb11u1) ...
Setting up libldap-2.4-2:armhf (2.4.57+dfsg-3) ...
Setting up dirmngr (2.2.27-2+deb11u1) ...
Created symlink /etc/systemd/user/sockets.target.wants/dirmngr.socket -> /usr/lib/systemd/user/dirmngr.socket.
Setting up ca-certificates (20210119) ...
Updating certificates in /etc/ssl/certs...
129 added, 0 removed; done.
Setting up gpg-wks-server (2.2.27-2+deb11u1) ...
Setting up gpg-wks-client (2.2.27-2+deb11u1) ...
Setting up gnupg (2.2.27-2+deb11u1) ...
Processing triggers for libc-bin (2.31-13+deb11u3) ...
Processing triggers for ca-certificates (20210119) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
I: Adding: 'http://repository.olimex.com'
run external command: [['install', '-m', '644', '/olimage/overlay/etc/apt/sources.list.d/default.list', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/etc/apt/sources.list.d/olimex.list']]
Installing template files: /olimage/output/a20-olinuxino/filesystem/bullseye-minimal/etc/apt/sources.list.d/olimex.list
Generating template file : /olimage/output/a20-olinuxino/filesystem/bullseye-minimal/etc/apt/sources.list.d/olimex.list
run external command: [['chroot', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal', 'apt-key', 'adv', '--keyserver', 'keyserver.ubuntu.com', '--recv-keys', '23087A958C1908B20B16FDB70BCE9CE97FCB605C']]
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.8FZRdm2rOj/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 23087A958C1908B20B16FDB70BCE9CE97FCB605C
gpg: keyserver receive failed: Server indicated a failure

Command failed: chroot /olimage/output/a20-olinuxino/filesystem/bullseye-minimal apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 23087A958C1908B20B16FDB70BCE9CE97FCB605C
b'Executing: /tmp/apt-key-gpghome.8FZRdm2rOj/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 23087A958C1908B20B16FDB70BCE9CE97FCB605C\n'
b'Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).\ngpg: keyserver receive failed: Server indicated a failure\n'
Traceback (most recent call last):
  File "/olimage/olimage/__main__.py", line 119, in <module>
    sys.exit(cli())
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/olimage/olimage/image/__init__.py", line 28, in build_image
    ctx.invoke(olimage.filesystem.build_filesystem, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/olimage/olimage/filesystem/__init__.py", line 80, in build_filesystem
    method()
  File "/olimage/olimage/filesystem/decorators.py", line 137, in wrapper
    ret = func(*args, **kwargs)
  File "/olimage/olimage/filesystem/decorators.py", line 22, in wrapper
    ret = func(*args, **kwargs)
  File "/olimage/olimage/filesystem/decorators.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/olimage/olimage/filesystem/variants/minimal.py", line 54, in configure
    Setup.apt(env.options['release'])
  File "/olimage/olimage/core/setup/apt.py", line 35, in setup
    Utils.shell.chroot('apt-key adv --keyserver {} --recv-keys {}'.format(repo.keyserver, repo.key))
  File "/olimage/olimage/core/utils/shell.py", line 97, in chroot
    raise _e
  File "/olimage/olimage/core/utils/shell.py", line 90, in chroot
    Shell.run("chroot {} ".format(path) + command, **kwargs)
  File "/olimage/olimage/core/utils/shell.py", line 46, in run
    raise _e
Exception: Command failed: chroot /olimage/output/a20-olinuxino/filesystem/bullseye-minimal apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 23087A958C1908B20B16FDB70BCE9CE97FCB605C
E: Command failed: chroot /olimage/output/a20-olinuxino/filesystem/bullseye-minimal apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 23087A958C1908B20B16FDB70BCE9CE97FCB605C
run external command: [['umount', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/sys']]
run external command: [['umount', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/dev/pts']]
run external command: [['umount', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/dev']]
run external command: [['umount', '/olimage/output/a20-olinuxino/filesystem/bullseye-minimal/proc']]