Skip to content

Commit

Permalink
Merge pull request openembedded#6 from Aclima/forward-compatibility
Browse files Browse the repository at this point in the history
Update UFW to Python 3 for forward compatibility
  • Loading branch information
eigendude authored Apr 18, 2024
2 parents bda3c51 + 80e52dc commit 1ad1126
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 16 deletions.
2 changes: 1 addition & 1 deletion meta-networking/recipes-connectivity/crda/crda_3.18.bb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \
SRC_URI[md5sum] = "0431fef3067bf503dfb464069f06163a"
SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf"

inherit python-dir pythonnative siteinfo
inherit python3-dir python3native siteinfo

# Recursive make problem
EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg' \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ PACKAGECONFIG[rlm-eap-pwd] = "--with-rlm_eap_pwd, --without-rlm_eap_pwd"
inherit useradd autotools-brokensep update-rc.d systemd

# This is not a cpan or python based package, but it needs some definitions
# from cpan-base and python-dir bbclasses for building rlm_perl and rlm_python
# from cpan-base and python3-dir bbclasses for building rlm_perl and rlm_python
# correctly.
inherit cpan-base python-dir
inherit cpan-base python3-dir

# The modules subdirs also need to be processed by autoreconf. Use autogen.sh
# in order to handle the subdirs correctly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ SRC_URI[md5sum] = "f638d854a3639fb37c0e06d1092a771e"
SRC_URI[sha256sum] = "aef1e34d98d7bec7cc368e0ca0f2e97493f9b5ebe6d7103f8f6460cfca3dc6fc"

PYPI_PACKAGE = "python-networkmanager"
inherit pypi setuptools
inherit pypi setuptools3

RDEPENDS_${PN} = "networkmanager python-dbus python-six"
RDEPENDS_${PN} = "networkmanager python3-dbus python3-six"
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From cc07a44f717bb7bdd71c07a7ad84caf6d8ed5c8c Mon Sep 17 00:00:00 2001
From: Garrett Brown <[email protected]>
Date: Tue, 2 Apr 2024 14:12:46 -0700
Subject: [PATCH] Change ufw to use Python 3

---
src/ufw | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ufw b/src/ufw
index c9e80e9..6ae28fa 100755
--- a/src/ufw
+++ b/src/ufw
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
#
# ufw: front-end for Linux firewalling (cli)
#
--
2.34.1

10 changes: 7 additions & 3 deletions meta-networking/recipes-connectivity/ufw/ufw_0.33.bb
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ SRC_URI = " \
file://0003-fix-typeerror-on-error.patch \
file://0004-lp1039729.patch \
file://0005-lp1191197.patch \
file://0006-Change-ufw-to-use-Python-3.patch \
"

UPSTREAM_CHECK_URI = "https://launchpad.net/ufw"

SRC_URI[md5sum] = "3747b453d76709e5a99da209fc0bb5f5"
SRC_URI[sha256sum] = "5f85a8084ad3539b547bec097286948233188c971f498890316dec170bdd1da8"

inherit setuptools distro_features_check
inherit setuptools3 distro_features_check

RDEPENDS_${PN} = " \
iptables \
python \
python-modules \
python3 \
python3-modules \
"

RRECOMMENDS_${PN} = " \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RDEPENDS_packagegroup-meta-networking-connectivity = "\
libdnet ufw civetweb freeradius kea daq \
mbedtls relayd snort dhcpcd rdate vlan vpnc \
inetutils wolfssl lftp miniupnpd networkmanager \
networkmanager-openvpn rdist nanomsg python-networkmanager \
networkmanager-openvpn rdist nanomsg python3-networkmanager \
${@bb.utils.contains("DISTRO_FEATURES", "bluetooth x11", "blueman", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "pam", "samba", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "pam", "samba", "", d)} \
Expand All @@ -51,7 +51,7 @@ RDEPENDS_packagegroup-meta-networking-daemons = "\
"

RDEPENDS_packagegroup-meta-networking-devtools = "\
python-ldap grpc \
python3-ldap grpc \
"

RDEPENDS_packagegroup-meta-networking-extended = "\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ HOMEPAGE = "http://www.python-ldap.org/"
DEPENDS = "python openldap cyrus-sasl"

PYPI_PACKAGE = "python-ldap"
inherit pypi setuptools
inherit pypi setuptools3

LIC_FILES_CHKSUM = "file://LICENCE;md5=36ce9d726d0321b73c1521704d07db1b"
SRC_URI[md5sum] = "fe22522208dc9b06d16eb70f8553eaab"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz \
SRC_URI[md5sum] = "c2b836a919cdd4ec53b06b70e0aa3e63"
SRC_URI[sha256sum] = "3f33f11dd08c3e8cc3e9d18eec686b1626d4818f4d5a72791507bbc4dce6a9a0"

inherit autotools gettext python-dir pythonnative
inherit autotools gettext python3-dir python3native

EXTRA_OECONF = "--with-ssl=${STAGING_DIR_HOST}${prefix}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SRCREV = "1c2d8674cc6f4b1166a066e8822e295c105ae7a2"

S = "${WORKDIR}/git"

inherit autotools python-dir pkgconfig
inherit autotools python3-dir pkgconfig

CACHED_CONFIGUREVARS += "am_cv_python_pythondir=${PYTHON_SITEPACKAGES_DIR}/lowpan-tools"

Expand Down
2 changes: 1 addition & 1 deletion meta-networking/recipes-support/ntop/ntop_5.0.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SRC_URI[sha256sum] = "7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45

UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/ntop/files/ntop/Stable"

inherit autotools-brokensep useradd pythonnative pkgconfig systemd
inherit autotools-brokensep useradd python3native pkgconfig systemd

DEPENDS = "geoip rrdtool python zlib libpcap gdbm"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ S = "${WORKDIR}/OpenIPMI-${PV}"
SRC_URI[md5sum] = "d525ceaa07df5440674e7e68a6772fe7"
SRC_URI[sha256sum] = "f3b1fafaaec2e2bac32fec5a86941ad8b8cb64543470bd6d819d7b166713d20b"

inherit autotools-brokensep pkgconfig pythonnative perlnative update-rc.d systemd cpan-base
inherit autotools-brokensep pkgconfig python3native perlnative update-rc.d systemd cpan-base

EXTRA_OECONF = "--disable-static \
--with-perl='${STAGING_BINDIR_NATIVE}/perl-native/perl' \
Expand Down
2 changes: 1 addition & 1 deletion meta-networking/recipes-support/spice/spice_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SRC_URI = " \

S = "${WORKDIR}/git"

inherit autotools gettext pythonnative python-dir pkgconfig
inherit autotools gettext python3native python3-dir pkgconfig

DEPENDS += "spice-protocol jpeg pixman alsa-lib glib-2.0 python-pyparsing-native python-six-native glib-2.0-native"
DEPENDS_append_class-nativesdk = "nativesdk-openssl"
Expand Down

0 comments on commit 1ad1126

Please sign in to comment.