Use the proper python version in the libpython dependency on Debian.

The configure script already detects the python version, we just need
to use it.
This commit is contained in:
Todd C. Miller
2020-05-05 17:21:36 -06:00
parent f261d58af8
commit 5d3f635ae8
2 changed files with 8 additions and 1 deletions

View File

@@ -53,6 +53,9 @@ sudoers_gid = @SUDOERS_GID@
sudoers_mode = @SUDOERS_MODE@
shlib_mode = @SHLIB_MODE@
# Version of python detected by configure (major.minor)
python_version = @PYTHON_VERSION@
SUBDIRS = lib/util @ZLIB_SRC@ lib/iolog @LOGSRV@ @LOGSRVD@ \
plugins/audit_json plugins/group_file plugins/sample_approval \
plugins/sudoers plugins/system_group @PYTHON_PLUGIN_SRC@ src \
@@ -391,6 +394,7 @@ package: @PPFILES@
sudoers_gid=$(sudoers_gid) \
sudoers_mode=$(sudoers_mode) \
shlib_mode=$(shlib_mode) \
python_version=$(python_version) \
version=$(VERSION) $(PPVARS); \
done

View File

@@ -115,9 +115,12 @@
fi
%depend [deb]
libc6, libpython3.6, sudo
libc6, libpython@PYTHON_VERSION@, sudo
%fixup [deb]
cp -p %{pp_wrkdir}/%{name}/DEBIAN/control %{pp_wrkdir}/%{name}/DEBIAN/control.$$
sed "s/@PYTHON_VERSION@/%{python_version}/g" %{pp_wrkdir}/%{name}/DEBIAN/control.$$ > %{pp_wrkdir}/%{name}/DEBIAN/control
rm -f %{pp_wrkdir}/%{name}/DEBIAN/control.$$
echo "Homepage: https://www.sudo.ws" >> %{pp_wrkdir}/%{name}/DEBIAN/control
echo "Bugs: https://bugzilla.sudo.ws" >> %{pp_wrkdir}/%{name}/DEBIAN/control