Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stretch initvm build fails on buster #233

Closed
AndreySV opened this issue Aug 20, 2019 · 10 comments
Closed

Stretch initvm build fails on buster #233

AndreySV opened this issue Aug 20, 2019 · 10 comments

Comments

@AndreySV
Copy link
Contributor

command elbe initvm create elbe-init-big-machine.xml fails at step 14 'Select and install software'. According to syslog d-i complains that elbe-* packages are unauthenticated, because of missing public key for elbe repositories.

Host system:
Debian Buster (amd64),
ELBE 10 (from linuxtronix debian repo)

I've used <noauth> tag as a workaround for this problem.

@bgermann
Copy link
Contributor

I cannot reproduce the issue. The public key is referenced in the file and the packages are signed. Please try again. Maybe it was just a connection issue on your side.

@AndreySV
Copy link
Contributor Author

AndreySV commented Aug 21, 2019

I tried three times and build fails always with the same error. I'm expecting default configuration to work and the problem is probably on my side.

Exact version used for build:

$ dpkg -l '*elbe*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version           Architecture Description
+++-===================-=================-============-============================================
ii  elbe                10+deb10+build691 all          Embedded Linux Build Environment
un  elbe-common         <none>            <none>       (no description available)
un  elbe-control        <none>            <none>       (no description available)
ii  elbe-debianize      10+deb10+build691 all          Wizard for debian foler generation
ii  elbe-doc            10+deb10+build691 all          man-pages, examples and documentation
ii  elbe-schema         10+deb10+build691 all          xml schema files
ii  python-elbe-bin     10+deb10+build691 all          elbe executable
ii  python-elbe-common  10+deb10+build691 all          common files
ii  python-elbe-control 10+deb10+build691 all          Commandline Tool to control an elbe buildenv

Keyring is available on file system of installer:

# ls -l /usr/share/keyrings/
lrwxrwxrwx    1 root     root            26 Aug 21 08:18 archive.gpg -> debian-archive-keyring.gpg
-rw-r--r--    1 root     root         36941 May 25  2017 debian-archive-keyring.gpg
-rw-r--r--    1 1001     1001      33161342 Aug 21 08:17 elbe-keyring.gpg
# md5sum /usr/share/keyrings/*
7b3f0258ee06be36641ddb945a7aa1e1  /usr/share/keyrings/archive.gpg
7b3f0258ee06be36641ddb945a7aa1e1  /usr/share/keyrings/debian-archive-keyring.gpg
002ec45c009c21d1d47dbea566f9d771  /usr/share/keyrings/elbe-keyring.gpg

In installer syslog I see following messages:

...
Aug 21 08:22:25 in-target: Get:1 http://debian.linutronix.de/elbe stretch InRelease [41.2 kB]
Aug 21 08:22:25 in-target: Ign:1 http://debian.linutronix.de/elbe stretch InRelease
Aug 21 08:22:25 in-target: Get:2 http://debian.linutronix.de/elbe stretch/main amd64 Packages [59.3 kB]
Aug 21 08:22:25 in-target: Fetched 101 kB in 0s (226 kB/s)
Aug 21 08:22:25 in-target: Reading package lists...
Aug 21 08:22:25 in-target: 
Aug 21 08:22:25 in-target: W: GPG error: http://debian.linutronix.de/elbe stretey is not available: NO_PUBKEY 36AA35FF22BB8F84 be verified because the
Aug 21 08:22:25 in-target: W: The repository 'http://debian.linutronix.de/elbe stretch InRelease' is not signed.
Aug 21 08:22:26 in-target: Get:1 http://debian.linutronix.de/elbe stretch InRelease [41.2 kB]
Aug 21 08:22:26 in-target: Ign:1 http://debian.linutronix.de/elbe stretch InRelease
Aug 21 08:22:25 in-target: Fetched 101 kB in 0s (226 kB/s)
Aug 21 08:22:25 in-target: Reading package lists...
Aug 21 08:22:25 in-target: 
Aug 21 08:22:25 in-target: W: GPG error: http://debian.linutronix.de/elbe stretey is not available: NO_PUBKEY 36AA35FF22BB8F84 be verified because the
Aug 21 08:22:25 in-target: W: The repository 'http://debian.linutronix.de/elbe stretch InRelease' is not signed.
Aug 21 08:22:26 in-target: Get:1 http://debian.linutronix.de/elbe stretch InRelease [41.2 kB]
Aug 21 08:22:26 in-target: Ign:1 http://debian.linutronix.de/elbe stretch InRelease
Aug 21 08:22:26 in-target: Get:2 http://debian.linutronix.de/elbe stretch/main S--More-- 
ources [10.3 kB]
Aug 21 08:22:26 in-target: Fetched 51.5 kB in 0s (168 kB/s)
Aug 21 08:22:26 in-target: Reading package lists...
Aug 21 08:22:26 in-target: 
Aug 21 08:22:26 in-target: W: GPG error: http://debian.linutronix.de/elbe stretey is not available: NO_PUBKEY 36AA35FF22BB8F84 be verified because the
Aug 21 08:22:26 in-target: W: The repository 'http://debian.linutronix.de/elbe stretch InRelease' is not signed.
Aug 21 08:22:26 in-target: Get:1 http://debian.linutronix.de/elbe-common stretch InRelease [41.2 kB]
Aug 21 08:22:27 in-target: Ign:1 http://debian.linutronix.de/elbe-common stretch InRelease
Aug 21 08:22:27 in-target: Get:2 http://debian.linutronix.de/elbe-common stretch/main amd64 Packages [10.6 kB]
Aug 21 08:22:27 in-target: Fetched 51.8 kB in 0s (187 kB/s)
Aug 21 08:22:27 in-target: Reading package lists...
Aug 21 08:22:27 in-target: 
Aug 21 08:22:27 in-target: W: GPG error: http://debian.linutronix.de/elbe-commoublic key is not available: NO_PUBKEY 36AA35FF22BB8F84 be verified becu
Aug 21 08:22:26 in-target: W: The repository 'http://debian.linutronix.de/elbe stretch InRelease' is not signed.
Aug 21 08:22:26 in-target: Get:1 http://debian.linutronix.de/elbe-common stretch InRelease [41.2 kB]
Aug 21 08:22:27 in-target: Ign:1 http://debian.linutronix.de/elbe-common stretch InRelease
Aug 21 08:22:27 in-target: Get:2 http://debian.linutronix.de/elbe-common stretch/main amd64 Packages [10.6 kB]
Aug 21 08:22:27 in-target: Fetched 51.8 kB in 0s (187 kB/s)
Aug 21 08:22:27 in-target: Reading package lists...
Aug 21 08:22:27 in-target: 
Aug 21 08:22:27 in-target: W: GPG error: http://debian.linutronix.de/elbe-commoublic key is not available: NO_PUBKEY 36AA35FF22BB8F84 be verified becu
Aug 21 08:22:27 in-target: W: The repository 'http://debian.linutronix.de/elbe-c--More-- 
ommon stretch InRelease' is not signed.
Aug 21 08:22:27 in-target: Get:1 http://debian.linutronix.de/elbe-common stretch InRelease [41.2 kB]
Aug 21 08:22:27 in-target: Ign:1 http://debian.linutronix.de/elbe-common stretch InRelease
Aug 21 08:22:27 in-target: Get:2 http://debian.linutronix.de/elbe-common stretch/main Sources [19.1 kB]
Aug 21 08:22:27 in-target: Fetched 60.3 kB in 0s (184 kB/s)
Aug 21 08:22:27 in-target: Reading package lists...
Aug 21 08:22:27 in-target: 
Aug 21 08:22:27 in-target: W: GPG error: http://debian.linutronix.de/elbe-commoublic key is not available: NO_PUBKEY 36AA35FF22BB8F84 be verified becu
Aug 21 08:22:27 in-target: W: The repository 'http://debian.linutronix.de/elbe-common stretch InRelease' is not signed.
Aug 21 08:22:28 in-target: Get:1 http://ftp.de.debian.org/debian stretch-backports InRelease [91.8 kB]
Aug 21 08:22:28 in-target: Get:2 http://ftp.de.debian.org/debian stretch-backports/main amd64 Packages [603 kB]
Aug 21 08:22:28 in-target: Get:3 http://ftp.de.debian.org/debian stretch-backports/main Translation-en [461 kB]
Aug 21 08:22:29 in-target: Fetched 1,156 kB in 1s (900 kB/s)
...
Aug 21 08:23:19 in-target:   ucf x11-common x11-xserver-utils xml-core xz-utils
Aug 21 08:23:19 in-target: 0 upgraded, 159 newly installed, 0 to remove and 0 not upgraded.
Aug 21 08:23:19 in-target: Need to get 79.2 MB of archives.
Aug 21 08:23:19 in-target: After this operation, 387 MB of additional disk space will be used.
Aug 21 08:23:19 in-target: WARNING: The following packages cannot be authenticated!
Aug 21 08:23:19 in-target:   elbe-schema python-elbe-bin python-elbe-common python-elbe-buildenv
Aug 21 08:23:19 in-target:   elbe-daemon elbe-soap debathena-transform-lighttpd
d without --allow-unauthenticatedre were unauthenticated packages and -y was use--More-- 
Aug 21 08:23:20 main-menu[2765]: WARNING **: Configuring 'pkgsel' failed with error code 100
Aug 21 08:23:20 main-menu[2765]: WARNING **: Menu item 'pkgsel' failed.
...

@bgermann
Copy link
Contributor

You have a "stretey" (not stretch) repo defined. Maybe this causes the issue.

@bgermann
Copy link
Contributor

Ah, I see. There are just some characters missing, right?

@AndreySV
Copy link
Contributor Author

I'm using default configuration without any changes at all. These are artifact because of copying from installer console. I've checked syslog with nano extra for this. Messages contains 'stretch', not 'stretey'.

Do you know any way to copy logs from installer?

@AndreySV
Copy link
Contributor Author

AndreySV commented Aug 21, 2019

I've checked contents of elbe-keyring.gpg in initrd for missing key (36AA35FF22BB8F84).

$ gpg2 --no-default-keyring --keyring elbe-keyring.gpg --list-keys | grep 36AA

Nothing is found.

In my system it's available on trusted keyring.

$ gpg2 --no-default-keyring --keyring /etc/apt/trusted.gpg --list-keys | grep 36AA
gpg: please do a --check-trustdb
pub   rsa2048/0x36AA35FF22BB8F84 2012-11-23 [SC] [expires: 2022-12-10]
      Key fingerprint = 10E0 A535 5609 F7C6 A55A  17F6 36AA 35FF 22BB 8F84

@bgermann
Copy link
Contributor

What is your host system? Maybe, if it is too old it does not support the hashing/signing algorithms that are used.

@AndreySV
Copy link
Contributor Author

Host system is debian Buster. I'm still investigating why elbe-keyring doesn't contain any actual ELBE keys.

AndreySV added a commit to AndreySV/elbe that referenced this issue Aug 21, 2019
if user's gnupg configuration file contained options to include
other keyrings, then 'elbe-keyring' wasn't created at all

gpg error message if gnupg conf has keyring option:
gpg: keyblock resource
'.../elbe/initvm/.elbe-in/elbe-keyring':
No such file or directory
gpg: key 0x36AA35FF22BB8F84: 1 signature not checked due to a missing key
gpg: no writable keyring found: Not found
gpg: error reading '[stdin]': General error
gpg: import from '[stdin]' failed: General error
gpg: Total number processed: 0

Because of that resulting 'elbe-keyring.gpg' didn't had any
PGP keys specified in initvm.xml file.

Another problem is that without '--no-options' keys from other
user-defined keyrings leaked into resulting elbe-keyring.gpg installed
into build vm.

Closes Linutronix#233

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
@bgermann
Copy link
Contributor

Okay, I can reproduce the issue now. Thanks for the patch!

@AndreySV
Copy link
Contributor Author

Thanks for merging.

torbenh3 pushed a commit that referenced this issue Aug 27, 2019
if user's gnupg configuration file contained options to include
other keyrings, then 'elbe-keyring' wasn't created at all

gpg error message if gnupg conf has keyring option:
gpg: keyblock resource
'.../elbe/initvm/.elbe-in/elbe-keyring':
No such file or directory
gpg: key 0x36AA35FF22BB8F84: 1 signature not checked due to a missing key
gpg: no writable keyring found: Not found
gpg: error reading '[stdin]': General error
gpg: import from '[stdin]' failed: General error
gpg: Total number processed: 0

Because of that resulting 'elbe-keyring.gpg' didn't had any
PGP keys specified in initvm.xml file.

Another problem is that without '--no-options' keys from other
user-defined keyrings leaked into resulting elbe-keyring.gpg installed
into build vm.

Closes #233

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Signed-off-by: Bastian Germann <bage@linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn@linutronix.de>
torbenh3 added a commit that referenced this issue Aug 27, 2019
  * move <src-opts> into <src-cdrom> node
  * Update Debian codenames (buster is stable now)
  * command init: don't use user's gnupg configuration file (Fixes: #233)
  * grubinstaller: enable UEFI (secure) boot with shim
  * fix grubinstall, when /var is separate partition (Fixes: #230)

Signed-off-by: Torben Hohn <torben.hohn@linutronix.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants