ufw: port to setuptools, use setuptools_legacy

This package has a traditional setup.py which has a custom install command,
which isn't supported with the modern wheel/pip installation method.

Until upstream has moved away from distutils, use setuptools_legacy so
the installation is correct.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Ross Burton 2022-03-04 13:42:20 +00:00 committed by Khem Raj
parent 06c810a80e
commit 3e2ed1dcc0
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,20 @@
Move to setuptools as distutils is now deprecated.
Upstream-Status: Submitted [https://code.launchpad.net/~tgamblin/ufw/distutils-to-setuptools]
Signed-off-by: Ross Burton <ross.burton@arm.com>
diff --git a/setup.py b/setup.py
index cb67a6a..de648d3 100644
--- a/setup.py
+++ b/setup.py
@@ -25,8 +25,8 @@
#
from __future__ import print_function
-from distutils.command.install import install as _install
-from distutils.core import setup
+from setuptools.command.install import install as _install
+from setuptools import setup
import errno
import os
import re

View File

@ -12,12 +12,13 @@ SRC_URI = "https://launchpad.net/ufw/0.36/0.36.1/+download/ufw-0.36.1.tar.gz \
file://0001-optimize-boot.patch \ file://0001-optimize-boot.patch \
file://0002-add-an-option-to-specify-iptables-location.patch \ file://0002-add-an-option-to-specify-iptables-location.patch \
file://0003-only-make-one-reference-to-env.patch \ file://0003-only-make-one-reference-to-env.patch \
file://setuptools.patch \
" "
SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c" SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c"
UPSTREAM_CHECK_URI = "https://launchpad.net/ufw" UPSTREAM_CHECK_URI = "https://launchpad.net/ufw"
inherit distutils3 features_check systemd update-rc.d inherit setuptools3_legacy features_check systemd update-rc.d
RDEPENDS:${PN} = " \ RDEPENDS:${PN} = " \
iptables \ iptables \