From eada0fb9ccd5578e1faf409fc3d34522bec425c0 Mon Sep 17 00:00:00 2001 From: Jo Zzsi Date: Sun, 10 Aug 2025 08:20:09 -0400 Subject: [PATCH] feat(configure): autoconfigure configprofile The original motivation of this PR was to set the openSUSE config inside the openSUSE CI container. This commit will autoconfigure those configprofiles that are maintained upstream for fedora, debian and opensuse based distro's. One notable change from this commit is that it would now allow testing hostonly_cmdline=yes configuration which is currently untested on the CI. --- configure | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/configure b/configure index e7560a7ce..b01b5fae3 100755 --- a/configure +++ b/configure @@ -22,8 +22,27 @@ fi CC="${CC:-cc}" PKG_CONFIG="${PKG_CONFIG:-pkg-config}" -# set hostonly by default -configprofile="${configprofile:-hostonly}" +# set configprofile based on ID and ID_LIKE from os-release +if [[ -f /etc/os-release ]]; then + . /etc/os-release +elif [[ -f /usr/lib/os-release ]]; then + . /usr/lib/os-release +fi + +case " $ID $ID_LIKE " in + *" debian "*) + configprofile=debian + ;; + *" fedora "*) + configprofile=fedora + ;; + *" suse "*) + configprofile=opensuse + ;; + *) + configprofile=hostonly + ;; +esac # Little helper function for reading args from the commandline. # it automatically handles -a b and -a=b variants, and returns 1 if -- 2.47.3