Skip to content

Commit

Permalink
ufw: port to setuptools, use setuptools_legacy
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
rossburton authored and kraj committed Mar 5, 2022
1 parent 06c810a commit 3e2ed1d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
20 changes: 20 additions & 0 deletions meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>

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
3 changes: 2 additions & 1 deletion meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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://0002-add-an-option-to-specify-iptables-location.patch \
file://0003-only-make-one-reference-to-env.patch \
file://setuptools.patch \
"
SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c"

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} = " \
iptables \
Expand Down

0 comments on commit 3e2ed1d

Please sign in to comment.