Update the way of searching for OpenSSL

OpenSSL used to have a "exec_prefix" pkg-config variable that allowed us
to figure out where the "openssl" binary could be found.

As of OpenSSL 3.3, this pkg-config variable no longer exists, so we
can't use it anymore.

Migrate to AC_PATH_PROG to avoid that issue.

While here, remove the "c_rehash" fallback that we used to require for
older distributions, as none of the distributions that require it are
supported anymore.
This commit is contained in:
Wouter Verhelst 2024-10-22 10:54:46 +02:00
parent cfb9c649cb
commit af7a568624
6 changed files with 5 additions and 44 deletions

View file

@ -204,9 +204,9 @@ AM_CONDITIONAL([JPEG], [test x$HAVE_JPEGLIB = x1])
AC_DEFINE_UNQUOTED([HAVE_JPEGLIB], $HAVE_JPEGLIB, [Define to 1 if you have libjpeg installed])
PKG_CHECK_MODULES(SSL, "openssl", [HAVE_OPENSSL=1])
PKG_CHECK_VAR(SSL_PREFIX, "openssl", "exec_prefix",, AC_MSG_ERROR([Could not find exec_prefix for openssl]))
AC_PATH_PROG(OPENSSL_PATH, openssl)
AC_DEFINE_UNQUOTED([HAVE_OPENSSL], $HAVE_OPENSSL, [Define to 1 if you have OpenSSL installed])
AC_SUBST(SSL_PREFIX)
AC_SUBST(OPENSSL_PATH)
PKG_CHECK_MODULES(CURL, "libcurl", [HAVE_CURL=1])
MAINVERSION=$(echo $PACKAGE_VERSION|sed -e 's/-.*$//')

View file

@ -3,4 +3,4 @@
/etc/ld.so.conf.d/* r,
/run/pcscd/pcscd.comm rw,
/usr/lib/eid-mw/* ix,
/usr/bin/pinentry ix,
/usr/bin/pinentry* ix,

View file

@ -1 +1 @@
debian/apparmor-profiles/beid etc/apparmor.d/abstractions/
debian/apparmor-profiles/beid etc/apparmor.d/abstractions/ubuntu-browsers.d/

View file

@ -1,37 +0,0 @@
#!/bin/bash
set -e
#DEBHELPER#
# ensure that beid AppArmor profile is enabled if it exists
if [ -f /etc/apparmor.d/usr.bin.firefox ]; then
if [ -f /etc/apparmor.d/local/usr.bin.firefox ]; then
if ! grep -q abstractions/beid /etc/apparmor.d/local/usr.bin.firefox; then
cat >> /etc/apparmor.d/local/usr.bin.firefox <<EOF
# For BeID
#include <abstractions/beid>
EOF
apparmor_parser -r -W -T /etc/apparmor.d/usr.bin.firefox || true
fi
else
echo "IEK: usr.bin.firefox apparmor profile exists, but local/usr.bin.firefox does not. Can't fix up firefox profile!" >&2
exit 1;
fi
fi
if [ -f /etc/apparmor.d/usr.bin.firefox-esr ]; then
if [ -f /etc/apparmor.d/local/usr.bin.firefox-esr ]; then
if ! grep -q abstractions/beid /etc/apparmor.d/local/usr.bin.firefox-esr; then
cat >> /etc/apparmor.d/local/usr.bin.firefox-esr <<EOF
# For BeID
#include <abstractions/beid>
EOF
apparmor_parser -r -W -T /etc/apparmor.d/usr.bin.firefox-esr || true
fi
else
echo "IEK: usr.bin.firefox-esr apparmor profile exists, but local/usr.bin.firefox-esr does not. Can't fix up firefox-esr profile!" >&2
exit 1;
fi
fi

View file

@ -1,2 +0,0 @@
interest /etc/apparmor.d/usr.bin.firefox
interest /etc/apparmor.d/usr.bin.firefox-esr

View file

@ -217,7 +217,7 @@ dist_trust_DATA = \
certs/belgiumrca6.pem
install-data-hook:
if ( $(SSL_PREFIX)/bin/openssl help 2>&1 | grep -q rehash); then $(SSL_PREFIX)/bin/openssl rehash $(DESTDIR)/$(trustdir); else $(SSL_PREFIX)/bin/c_rehash $(DESTDIR)/$(trustdir); fi
$(OPENSSL_PATH) rehash $(DESTDIR)/$(trustdir)
gtk/viewer_glade.h: gtk/viewer.glade
$(top_srcdir)/plugins_tools/aboutmw/gtk/gen.sh VIEWER_GLADE_H VIEWER_GLADE_STRING < $^ > $@