apache2-ssl [2.4.23-r6]: Install fails on post-install script
Installing apache2-ssl on a fresh Alpine system results in an error running the post-install script:
(7/7) Installing apache2-ssl (2.4.23-r6)
Executing apache2-ssl-2.4.23-r6.post-install
ERROR: apache2-ssl-2.4.23-r6.post-install: script exited with error 1
This is a side-effect of the LibreSSL change. The post-install script creates a key and self-signed certificate if one does not already exist. LibreSSL does not have a -rand option on the openssl genrsa command, resulting in an error.
Removing the -rand option and the list of files would fix this error, but may have an impact on install time since it would depend on the kernel’s entropy pool.
--- apache2-ssl.post-install.orig
+++ apache2-ssl.post-install
@@ -7,7 +7,7 @@
umask 077
if [ ! -f ${sslkey} ] ; then
- openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > ${sslkey} 2> /dev/null
+ openssl genrsa 1024 > ${sslkey} 2> /dev/null
fi
FQDN=`hostname -f`
(from redmine: issue id 6376, created on 2016-10-21, closed on 2017-04-07)