kumquat-buildroot/package/libselinux
Thomas Petazzoni 3fce6f1c15 package/libselinux: fix the build with Python 3.8
Following the switch to Python 3.8, the libselinux Python extension
started to fail building. This is fixed by upstream commit
2efa06857575e4118e91ca250b6b92da68b130d5, which we backport as
0003-libselinux-Use-Python-distutils-to-install-SELinux-p.patch.

This patch has the nice merit of switching to using distutils to build
the Python extension of libselinux, instead of some custom logic. This
allows to significantly simplify our libselinux.mk: we can rely on
PKG_PYTHON_DISTUTILS_ENV and HOST_PKG_PYTHON_DISTUTILS_ENV instead of
lots of custom variables.

However, upstream commit 2efa06857575e4118e91ca250b6b92da68b130d5 had
its own issues:

 * Hardcode of -I $(DESTDIR)/$(INCLUDEDIR) -L $(DESTDIR)/$(LIBDIR) at
   build time, while DESTDIR is normally empty at build time, causing
   bogus -I /usr/include -L /usr/lib to be used

   This is fixed in
   0004-src-Makefile-don-t-pass-bogus-I-and-L-to-python-setu.patch

 * New usage of ln --relative, which is not supported in older
   distributions.

   This is fixed in
   0005-Remove-ln-relative-usage-in-install-pywrap.patch

 * Usage of the host Python "imp" module to query the extension used
   for native Python module, but that returns an incorrect result when
   cross-compiling. We chose to simplify the code to not have to query
   for this information.

   This is fixed in
   0006-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch

With this patch, the libselinux Python module was built-tested with
Python 2 and Python 3, and run-time tested as well in both
configurations, for both the target and host variants of libselinux.

Fixes:

  http://autobuild.buildroot.net/results/aeb58de7ad674b980258e6ed30c7da3949a04452/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-10-26 12:36:54 +02:00
..
0001-fix-musl-build.patch
0002-revert-ln-relative.patch
0003-libselinux-Use-Python-distutils-to-install-SELinux-p.patch package/libselinux: fix the build with Python 3.8 2019-10-26 12:36:54 +02:00
0004-src-Makefile-don-t-pass-bogus-I-and-L-to-python-setu.patch package/libselinux: fix the build with Python 3.8 2019-10-26 12:36:54 +02:00
0005-Remove-ln-relative-usage-in-install-pywrap.patch package/libselinux: fix the build with Python 3.8 2019-10-26 12:36:54 +02:00
0006-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch package/libselinux: fix the build with Python 3.8 2019-10-26 12:36:54 +02:00
Config.in
libselinux.hash
libselinux.mk package/libselinux: fix the build with Python 3.8 2019-10-26 12:36:54 +02:00