pmbootstrap install fails on Fedora
$ ./pmbootstrap.py install
[18:22:49] *** (1/5) PREPARE NATIVE CHROOT ***
[18:22:49] Download https://nl.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
[18:22:50] Download https://nl.alpinelinux.org/alpine/edge/main/x86_64/apk-tools-static-2.8.0-r0.apk
[18:22:50] (native) install alpine-base
[18:22:51] NOTE: The failed command's output is above the ^^^ line in the logfile: /home/vashirov/.local/var/pmbootstrap/log.txt
[18:22:51] ERROR: Command failed: % sudo /home/vashirov/.local/var/pmbootstrap/apk.static -U --root /home/vashirov/.local/var/pmbootstrap/chroot_native --cache-dir /home/vashirov/.local/var/pmbootstrap/cache_apk_x86_64 --initdb --arch x86_64 add alpine-base
[18:22:51] Run 'pmbootstrap log' for details.
[18:22:51] See also: <https://postmarketos.org/troubleshooting>
(031800) [18:22:50] % sudo /home/vashirov/.local/var/pmbootstrap/apk.static -U --root /home/vashirov/.local/var/pmbootstrap/chroot_native --cache-dir /home/vashirov/.local/var/pmbootstrap/cache_apk_x86_64 --initdb --arch x86_64 add alpine-base
WARNING: Ignoring /home/user/packages/user/x86_64/APKINDEX.tar.gz: No such file or directory
fetch https://nl.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
140596080811196:error:14007086:SSL routines:CONNECT_CR_CERT:certificate verify failed:ssl_clnt.c:1037:
ERROR: https://nl.alpinelinux.org/alpine/edge/main: Permission denied
WARNING: Ignoring APKINDEX.65bdaf85.tar.gz: No such file or directory
fetch https://nl.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
140596080811196:error:14007086:SSL routines:CONNECT_CR_CERT:certificate verify failed:ssl_clnt.c:1037:
ERROR: https://nl.alpinelinux.org/alpine/edge/community: Permission denied
WARNING: Ignoring APKINDEX.4cd38d2c.tar.gz: No such file or directory
fetch https://nl.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
140596080811196:error:14007086:SSL routines:CONNECT_CR_CERT:certificate verify failed:ssl_clnt.c:1037:
ERROR: https://nl.alpinelinux.org/alpine/edge/testing: Permission denied
WARNING: Ignoring APKINDEX.865a153c.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
alpine-base (missing):
required by: world[alpine-base]
apk.static
fails to verify server certificate. Running it under strace shows that it tries to open file that doesn't exist:
open("/etc/ssl/cert.pem", O_RDONLY) = -1 ENOENT (No such file or directory)
140118856395964:error:14007086:SSL routines:CONNECT_CR_CERT:certificate verify failed:ssl_clnt.c:1037:
Apparently, it comes from a hardcoded value from libressl
, which is statically linked with apk.static
binary.
In Fedora there is a different location for SSL certificates: /etc/pki/tls/cert.pem
So a workaround would be to create a symlink /etc/ssl/cert.pem
pointing to the real location.
# ln -sf /etc/pki/tls/cert.pem /etc/ssl/cert.pem