Skip to contentSkip to conversation

python-m2crypto: Use PYTHON_PN instead of hardcoding python name

PATCH In review Khem Raj 2 participants 14 messages Jan 22, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/12 python-m2crypto: Use PYTHON_PN instead of hardcoding python name

Lets this inc file become usable for py3 module as well

---
 meta-python/recipes-devtools/python/python-m2crypto.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-python/recipes-devtools/python/python-m2crypto.inc +1 -1
index 5f5444f37e..76dd58ce04 100644
@@ -17,7 +17,7 @@ PYPI_PACKAGE = "M2Crypto"
 inherit pypi siteinfo
 
 DEPENDS += "openssl swig-native"
-RDEPENDS_${PN} += "python-typing"
+RDEPENDS_${PN} += "${PYTHON_PN}-typing"
 
 DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR} -I${STAGING_INCDIR}"
 DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}"
Signature · 1 line
2.25.0
author
#1 lore raw

PATCH 2/12 crda: Fix build with python3

---
 .../crda/crda/crda-4.14-python-3.patch        | 101 ++++++++++++++++++
 .../recipes-connectivity/crda/crda_3.18.bb    |   3 +-
 2 files changed, 103 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch
meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch new file +101 -0
new file mode 100644
index 0000000000..9125d0ab97
@@ -0,0 +1,101 @@
+Imported from Gentoo
+https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c50acec16bc7c33d6dc122c007d713e7fbecf9c
+
+Signed-off-by: Khem Raj <[email protected]>
+
+--- a/utils/key2pub.py
++++ b/utils/key2pub.py
+@@ -1,22 +1,22 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ 
+ import sys
+ try:
+        from M2Crypto import RSA
+-except ImportError, e:
++except ImportError as e:
+        sys.stderr.write('ERROR: Failed to import the "M2Crypto" module: %s\n' % e.message)
+        sys.stderr.write('Please install the "M2Crypto" Python module.\n')
+        sys.stderr.write('On Debian GNU/Linux the package is called "python-m2crypto".\n')
+        sys.exit(1)
+ 
+ def print_ssl_64(output, name, val):
+-    while val[0] == '\0':
++    while val[0:1] == b'\0':
+         val = val[1:]
+     while len(val) % 8:
+-        val = '\0' + val
++        val = b'\0' + val
+     vnew = []
+     while len(val):
+-        vnew.append((val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7]))
++        vnew.append((val[0:1], val[1:2], val[2:3], val[3:4], val[4:5], val[5:6], val[6:7], val[7:8]))
+         val = val[8:]
+     vnew.reverse()
+     output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew)))
+@@ -34,13 +34,13 @@ def print_ssl_64(output, name, val):
+     output.write('};\n\n')
+ 
+ def print_ssl_32(output, name, val):
+-    while val[0] == '\0':
++    while val[0:1] == b'\0':
+         val = val[1:]
+     while len(val) % 4:
+-        val = '\0' + val
++        val = b'\0' + val
+     vnew = []
+     while len(val):
+-        vnew.append((val[0], val[1], val[2], val[3], ))
++        vnew.append((val[0:1], val[1:2], val[2:3], val[3:4]))
+         val = val[4:]
+     vnew.reverse()
+     output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew)))
+@@ -81,21 +81,21 @@ struct pubkey {
+ 
+ static struct pubkey keys[] __attribute__((unused))= {
+ ''')
+-    for n in xrange(n + 1):
++    for n in range(n + 1):
+         output.write('	KEYS(e_%d, n_%d),\n' % (n, n))
+     output.write('};\n')
+     pass
+ 
+ def print_gcrypt(output, name, val):
+     output.write('#include <stdint.h>\n')
+-    while val[0] == '\0':
++    while val[0:1] == b'\0':
+         val = val[1:]
+     output.write('static const uint8_t %s[%d] = {\n' % (name, len(val)))
+     idx = 0
+     for v in val:
+         if not idx:
+             output.write('\t')
+-        output.write('0x%.2x, ' % ord(v))
++        output.write('0x%.2x, ' % (v if sys.version_info[0] >=3 else ord(v)))
+         idx += 1
+         if idx == 8:
+             idx = 0
+@@ -118,7 +118,7 @@ struct key_params {
+ 
+ static const struct key_params keys[] __attribute__((unused))= {
+ ''')
+-    for n in xrange(n + 1):
++    for n in range(n + 1):
+         output.write('	KEYS(e_%d, n_%d),\n' % (n, n))
+     output.write('};\n')
+     
+@@ -136,7 +136,7 @@ except IndexError:
+     mode = None
+ 
+ if not mode in modes:
+-    print 'Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys()))
++    print('Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys())))
+     sys.exit(2)
+ 
+ output = open(outfile, 'w')
+@@ -154,3 +154,5 @@ for f in files:
+     idx += 1
+ 
+ modes[mode][1](output, idx - 1)
++
++output.close()
meta-networking/recipes-connectivity/crda/crda_3.18.bb +2 -1
index d3c00424db..b380eaf94e 100644
@@ -4,7 +4,7 @@ SECTION = "net"
 LICENSE = "copyleft-next-0.3.0"
 LIC_FILES_CHKSUM = "file://copyleft-next-0.3.0;md5=8743a2c359037d4d329a31e79eabeffe"
 
-DEPENDS = "python-m2crypto-native python-typing-native python-native libnl libgcrypt"
+DEPENDS = "python3-m2crypto-native libnl libgcrypt"
 
 SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \
            file://do-not-run-ldconfig-if-destdir-is-set.patch \
@@ -14,6 +14,7 @@ SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \
            file://make.patch \
            file://use-target-word-size-instead-of-host-s.patch \
            file://fix-issues-when-USE_OPENSSL-1.patch \
+           file://crda-4.14-python-3.patch \
 "
 SRC_URI[md5sum] = "0431fef3067bf503dfb464069f06163a"
 SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf"
Signature · 1 line
2.25.0
author
#2 lore raw

PATCH 3/12 lio-utils: Make it visible only with meta-py2 in BBFILE_COLLECTIONS

In reply to Khem Raj
---
 .../recipes-core/packagegroups/packagegroup-meta-oe.bb    | 3 ++-
 meta-oe/recipes-support/lio-utils/lio-utils_4.1.bb        | 8 +++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +2 -1
index 59f1703f4d..cb4be4a8a1 100644
@@ -241,7 +241,7 @@ RDEPENDS_packagegroup-meta-oe-support ="\
     libgpiod libiio libjs-jquery libjs-sizzle liblinebreak libmicrohttpd \
     libmxml liboauth libol liboop libp11 libraw1394 libsmi libsoc libssh2 \
     libssh libtar libteam libtinyxml2 libtinyxml libusbg libusb-compat libutempter \
-    links lio-utils lockdev log4c log4cpp logwarn libdevmapper lvm2 \
+    links lockdev log4c log4cpp logwarn libdevmapper lvm2 \
     mailcap mbuffer mg minini \
     multipath-tools nano neon nmon numactl onig openct openldap \
     opensc wbxml2 p910nd pcsc-lite picocom libotr pidgin \
@@ -260,6 +260,7 @@ RDEPENDS_packagegroup-meta-oe-support ="\
     procmail \
     ${@bb.utils.contains("DISTRO_FEATURES", "polkit", "udisks2 upower", "", d)} \
     ${NE10} \
+    ${@bb.utils.contains("BBPATH", "meta-python2", "lio-utils", "", d)} \
     "
 
 RDEPENDS_packagegroup-meta-oe-support_remove_arm ="numactl"
meta-oe/recipes-support/lio-utils/lio-utils_4.1.bb +7 -1
index 058117ed83..8e5986bd9e 100644
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/Datera/lio-utils.git \
 SRCREV = "0ac9091c1ff7a52d5435a4f4449e82637142e06e"
 S = "${WORKDIR}/git"
 
-inherit distutils3
+inherit distutils
 
 EXTRA_OEMAKE += "DESTDIR=${D}"
 
@@ -64,3 +64,9 @@ FILES_${PN} += "${sbindir}/* /etc/init.d/* /etc/target/*"
 # http://errors.yoctoproject.org/Errors/Details/184712/
 # python-native/python: can't open file 'setup.py': [Errno 2] No such file or directory
 CLEANBROKEN = "1"
+
+python() {
+    if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+        raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
+
Signature · 1 line
2.25.0
author
#3 lore raw

PATCH 4/12 openlmi: Make it visible when meta-py2 is in layermix

In reply to Khem Raj
---
 meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | 2 +-
 meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +1 -1
index cb4be4a8a1..baf1fa1d61 100644
@@ -153,7 +153,7 @@ RDEPENDS_packagegroup-meta-oe-extended ="\
     ${@bb.utils.contains("DISTRO_FEATURES", "pam", "pam-ssh-agent-auth openwsman sblim-sfcb ", "", d)} \
     ${@bb.utils.contains("DISTRO_FEATURES", "polkit", "polkit polkit-group-rule-datetime ", "", d)} \
     ${@bb.utils.contains("DISTRO_FEATURES", "polkit", "polkit-group-rule-network ", "", d)} \
-    ${@bb.utils.contains("BBPATH", "meta-python", "openlmi-tools", "", d)} \
+    ${@bb.utils.contains("BBPATH", "meta-python2", "openlmi-tools", "", d)} \
     "
 RDEPENDS_packagegroup-meta-oe-extended_remove_mipsarch = "upm mraa tiptop"
 RDEPENDS_packagegroup-meta-oe-extended_remove_powerpc = "upm mraa"
meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb +3 -3
index 513bd11acf..e1f376d0f3 100644
@@ -5,7 +5,7 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://../COPYING;md5=75859989545e37968a99b631ef42722e"
 SECTION = "System/Management"
 
-inherit setuptools3
+inherit setuptools
 
 DEPENDS = "python3-native python3-pywbem-native python3-m2crypto python-pywbem"
 
@@ -21,6 +21,6 @@ do_configure_prepend() {
 }
 
 python() {
-    if 'meta-python' not in d.getVar('BBFILE_COLLECTIONS').split():
-        raise bb.parse.SkipRecipe('Requires meta-python to be present.')
+    if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+        raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
 }
Signature · 1 line
2.25.0
author
#4 lore raw

PATCH 5/12 rrdtool: Disable python packageconfig by default

In reply to Khem Raj

This needs python2 which is in another layer

---
 meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb +1 -1
index c7dbb6e39e..d96fe8131f 100644
@@ -24,7 +24,7 @@ SYSTEMD_SERVICE_rrdcached = "rrdcached.socket rrdcached.service"
 
 EXTRA_AUTORECONF = "-I m4 --exclude=autopoint"
 
-PACKAGECONFIG ??= "python perl ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG ??= "perl ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
 
 PACKAGECONFIG[python] = "--enable-python=yes \
 am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \
Signature · 1 line
2.25.0
author
#5 lore raw

PATCH 6/12 telepathy-idle: Disable when meta-py2 is not present

In reply to Khem Raj
---
 .../recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb | 7 ++++++-
 meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | 3 ++-
 2 files changed, 8 insertions(+), 2 deletions(-)
meta-oe/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb +6 -1
index 5eb00aefbe..42ce3301f5 100644
@@ -11,7 +11,12 @@ SRC_URI = "http://telepathy.freedesktop.org/releases/${BPN}/${BPN}-${PV}.tar.gz
 SRC_URI[md5sum] = "92a2de5198284cbd3c430b0d1a971a86"
 SRC_URI[sha256sum] = "3013ad4b38d14ee630b8cc8ada5e95ccaa849b9a6fe15d2eaf6d0717d76f2fab"
 
-inherit autotools pkgconfig python3native
+inherit autotools pkgconfig pythonnative
 
 FILES_${PN} += "${datadir}/telepathy \
                 ${datadir}/dbus-1"
+
+python() {
+    if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+        raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +2 -1
index baf1fa1d61..f045167e8e 100644
@@ -65,11 +65,12 @@ RDEPENDS_packagegroup-meta-oe-connectivity ="\
     libuv libwebsockets linuxptp lirc loudmouth \
     modemmanager mosh  \
     paho-mqtt-c phonet-utils rabbitmq-c rfkill rtorrent \
-    ser2net smstools3 telepathy-glib telepathy-idle thrift \
+    ser2net smstools3 telepathy-glib thrift \
     usbmuxd zabbix zeromq \
     ${@bb.utils.contains("DISTRO_FEATURES", "x11", "obex-data-server", "", d)} \
     libmikmod \
     obexftp openobex libnet \
+    ${@bb.utils.contains("BBPATH", "meta-python2", "telepathy-idle", "", d)} \
     "
 RDEPENDS_packagegroup-meta-oe-connectivity_append_libc-glibc = " wvstreams wvdial"
 
Signature · 1 line
2.25.0
author
#6 lore raw

PATCH 7/12 mysql-python: Enable only when meta-py2 is present

In reply to Khem Raj
---
 meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | 3 ++-
 meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb            | 7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +2 -1
index f045167e8e..6dda3005e7 100644
@@ -101,8 +101,9 @@ RDEPENDS_packagegroup-meta-oe-bsp_remove_riscv32 = "efivar efibootmgr"
 
 RDEPENDS_packagegroup-meta-oe-dbs ="\
     leveldb libdbi mariadb mariadb-native \
-    mysql-python postgresql psqlodbc rocksdb soci \
+    postgresql psqlodbc rocksdb soci \
     sqlite \
+    ${@bb.utils.contains("BBPATH", "meta-python2", "mysql-python", "", d)} \
     "
 
 RDEPENDS_packagegroup-meta-oe-devtools ="\
meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb +6 -1
index 6d52222ce4..f1c2b7701c 100644
@@ -16,4 +16,9 @@ SRC_URI[sha256sum] = "811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
-inherit setuptools3
+inherit setuptools
+
+python() {
+    if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+        raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
Signature · 1 line
2.25.0
author
#7 lore raw

PATCH 8/12 hplip: Upgrade to 3.19.12

In reply to Khem Raj

Use python3 instead of py2
Apply patches from openwrt to fix crosscompile and musl builds

---
 ...ps-ppd.h-for-missing-ppd-definitions.patch |  42 --
 .../hplip/hplip-3.12.6/configure.patch        |  14 -
 .../hplip/hplip-3.12.6/cups-1.6.patch         | 395 ------------------
 .../hplip/hplip-3.12.6/fix-libusb-paths.patch |  35 --
 .../setup-add-sleep-after-cups-reset.patch    |  12 -
 ...0-replace_unsafe_memcpy_with_memmove.patch |  15 +
 .../hplip/hplip/050-fix-glibcisms.patch       |  17 +
 .../hplip/hplip/600-fix.patch                 |  10 +
 .../hplip/999-remove-lImageProcessor.patch    |  69 +++
 .../hplip/hplip/configure.patch               |  12 +
 .../hplip/hplip/fix-libusb-paths.patch        |  33 ++
 .../recipes-extended/hplip/hplip_3.12.6.bb    |  75 ----
 .../recipes-extended/hplip/hplip_3.19.12.bb   |  87 ++++
 13 files changed, 243 insertions(+), 573 deletions(-)
 delete mode 100644 meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch
 delete mode 100644 meta-oe/recipes-extended/hplip/hplip-3.12.6/configure.patch
 delete mode 100644 meta-oe/recipes-extended/hplip/hplip-3.12.6/cups-1.6.patch
 delete mode 100644 meta-oe/recipes-extended/hplip/hplip-3.12.6/fix-libusb-paths.patch
 delete mode 100644 meta-oe/recipes-extended/hplip/hplip-3.12.6/setup-add-sleep-after-cups-reset.patch
 create mode 100644 meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch
 create mode 100644 meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch
 create mode 100644 meta-oe/recipes-extended/hplip/hplip/600-fix.patch
 create mode 100644 meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch
 create mode 100644 meta-oe/recipes-extended/hplip/hplip/configure.patch
 create mode 100644 meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch
 delete mode 100644 meta-oe/recipes-extended/hplip/hplip_3.12.6.bb
 create mode 100644 meta-oe/recipes-extended/hplip/hplip_3.19.12.bb
meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch deleted +0 -42
deleted file mode 100644
index f259b5f05d..0000000000
@@ -1,42 +0,0 @@
-From 7ef9c040dd959105c16d4dc67e14f3bbea25e77f Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Fri, 16 Dec 2016 19:51:19 +0000
-Subject: [PATCH] include cups/ppd.h for missing ppd definitions
-
-Fixes errors spotted by clang
-
-| prnt/hpcups/HPCupsFilter.cpp:365:18: error: use of undeclared identifier 'ppdFindAttr'
-|     if (((attr = ppdFindAttr(m_ppd, "hpPrinterLanguage", NULL)) == NULL) ||
-|                  ^
-| prnt/hpcups/HPCupsFilter.cpp:368:13: error: use of undeclared identifier 'ppdClose'
-|             ppdClose(m_ppd);
-|             ^
-| prnt/hpcups/HPCupsFilter.cpp:444:9: error: use of undeclared identifier 'ppdClose'
-|         ppdClose(m_ppd);
-|         ^
-| prnt/hpcups/HPCupsFilter.cpp:497:13: error: use of undeclared identifier 'ppdOpenFile'
-|     m_ppd = ppdOpenFile(getenv("PPD"));
-|             ^
-
-Signed-off-by: Khem Raj <[email protected]>
----
-Upstream-Status: Pending
-
- prnt/hpcups/HPCupsFilter.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/prnt/hpcups/HPCupsFilter.h b/prnt/hpcups/HPCupsFilter.h
-index 0431a7a..eb0cad6 100644
---- a/prnt/hpcups/HPCupsFilter.h
-+++ b/prnt/hpcups/HPCupsFilter.h
-@@ -37,6 +37,7 @@
- #include "Job.h"
- 
- #include "dbuscomm.h"
-+#include <cups/ppd.h>
- 
- #define		DBITMAPFILEHEADER		14
- #define		DBITMAPINFOHEADER		40
--- 
-1.9.1
-
meta-oe/recipes-extended/hplip/hplip-3.12.6/configure.patch deleted +0 -14
deleted file mode 100644
index 31c005c60c..0000000000
@@ -1,14 +0,0 @@
-Index: hplip-3.12.6/configure.in
-===================================================================
---- hplip-3.12.6.orig/configure.in	2014-07-16 20:03:51.310044196 +0000
-+++ hplip-3.12.6/configure.in	2014-07-18 07:53:31.589559192 +0000
-@@ -27,8 +27,7 @@
- 
- #AC_PREREQ(2.59)
- AC_INIT([HP Linux Imaging and Printing], [3.12.6], [3.12.6], [hplip])
--#AM_INIT_AUTOMAKE([1.9 foreign])
--AM_INIT_AUTOMAKE
-+AM_INIT_AUTOMAKE([1.9 foreign])
- AC_DISABLE_STATIC
- 
- # Checks for programs.
meta-oe/recipes-extended/hplip/hplip-3.12.6/cups-1.6.patch deleted +0 -395

395 lines not on this page · raw message

meta-oe/recipes-extended/hplip/hplip-3.12.6/fix-libusb-paths.patch deleted +0 -35
deleted file mode 100644
index b347f831cb..0000000000
@@ -1,35 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-diff -rupN hplip-3.12.6_orig/configure.in hplip-3.12.6/configure.in
---- hplip-3.12.6_orig/configure.in	2012-06-18 20:44:24.000000000 +1000
-+++ hplip-3.12.6/configure.in	2012-08-16 13:40:07.259927650 +1000
-@@ -524,6 +524,8 @@ if test "$hpijs_only_build" = "no"; then
-       AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
-    else
-       AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)])
-+      LIBUSBINCLUDEROOT?="/usr/include/"
-+      AC_ARG_VAR(LIBUSBINCLUDEROOT, [path to libusb-1.0 folder])
-       AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)])
-    fi
- fi
-diff -rupN hplip-3.12.6_orig/Makefile.am hplip-3.12.6/Makefile.am
---- hplip-3.12.6_orig/Makefile.am	2012-06-18 20:44:13.000000000 +1000
-+++ hplip-3.12.6/Makefile.am	2012-08-16 13:41:12.307932822 +1000
-@@ -72,7 +72,7 @@ libhpmud_la_SOURCES = io/hpmud/hpmud.c i
- 	  io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \
- 	  io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb_libusb01.c
- else
--libhpmud_la_CFLAGS = -I/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
-+libhpmud_la_CFLAGS = -I/$(LIBUSBINCLUDEROOT)/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
- libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/pml.c \
- 	  io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \
- 	  io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb.c
-@@ -286,7 +286,7 @@ hpmudext_la_LIBADD = libhpmud.la
- if LIBUSB01_BUILD
- hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
- else
--hpmudext_la_CFLAGS =-I/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR)
-+hpmudext_la_CFLAGS =-I$(LIBUSBINCLUDEROOT)/libusb-1.0 -I$(PYTHONINCLUDEDIR)
- endif
- 
- # ui (qt3)
meta-oe/recipes-extended/hplip/hplip-3.12.6/setup-add-sleep-after-cups-reset.patch deleted +0 -12
deleted file mode 100644
index 0e1b6c4ed3..0000000000
@@ -1,12 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
---- hplip-3.11.10/setup.py.orig	2011-10-02 14:06:19.000000000 +1100
-+++ hplip-3.11.10/setup.py	2012-02-29 08:21:39.167999938 +1100
-@@ -573,6 +573,7 @@
- 
-             log.debug("Restarting CUPS...")
-             status, output = utils.run(restart_cups())
-+            time.sleep(3)
-             log.debug("Restart CUPS returned: exit=%d output=%s" % (status, output))
- 
-             cups.setPasswordPrompt("You do not have permission to add a printer.")
meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch new file +15 -0
new file mode 100644
index 0000000000..2babb2b67a
@@ -0,0 +1,15 @@
+https://bugs.launchpad.net/hplip/+bug/1672256
+
+memcpy should never be used with overlapping memory regions
+
+--- a/io/hpmud/musb.c
++++ b/io/hpmud/musb.c
+@@ -775,7 +775,7 @@ static int device_id(int fd, unsigned ch
+         len = size-1;   /* leave byte for zero termination */
+     if (len > 2)
+         len -= 2;
+-    memcpy(buffer, buffer+2, len);    /* remove length */
++    memmove(buffer, buffer+2, len);    /* remove length */
+     buffer[len]=0;
+     DBG("read actual device_id successfully fd=%d len=%d\n", fd, len);
+ 
meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch new file +17 -0
new file mode 100644
index 0000000000..e020bd4642
@@ -0,0 +1,17 @@
+diff --git a/scan/sane/OrbliteScan/LinuxCommon.h b/scan/sane/OrbliteScan/LinuxCommon.h
+index 6605dd9..55c7110 100644
+--- a/scan/sane/OrbliteScan/LinuxCommon.h
++++ b/scan/sane/OrbliteScan/LinuxCommon.h
+@@ -18,10 +18,8 @@ typedef u_int32_t			UInt32;
+ typedef int32_t				SInt32;
+ //typedef unsigned long			UInt32;
+ //typedef signed long			SInt32;
+-typedef __S64_TYPE			SInt64;
+-typedef __U64_TYPE			UInt64;
+-typedef __S64_TYPE			int64_t;
+-typedef __U64_TYPE			uint64_t;
++typedef int64_t 			SInt64;
++typedef uint64_t			UInt64;
+ 
+ //typedef unsigned long	ULONG;
+ //typedef void*			LPVOID;
meta-oe/recipes-extended/hplip/hplip/600-fix.patch new file +10 -0
new file mode 100644
index 0000000000..91a5035ae9
@@ -0,0 +1,10 @@
+--- a/configure.in
++++ b/configure.in
+@@ -254,7 +254,6 @@ if test "$class_driver" = "yes"; then
+    test `sh ./createPPD.sh -f` == 0
+ else
+    AC_MSG_RESULT(no)
+-   test `sh ./createPPD.sh -q` == 0
+ fi
+ AM_CONDITIONAL(HPLIP_CLASS_DRIVER, test x$class_driver = xyes)
+ 
meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch new file +69 -0

69 lines not on this page · raw message

meta-oe/recipes-extended/hplip/hplip/configure.patch new file +12 -0
new file mode 100644
index 0000000000..8fe77c5edf
@@ -0,0 +1,12 @@
+--- a/configure.in
++++ b/configure.in
+@@ -27,8 +27,7 @@
+ 
+ #AC_PREREQ(2.59)
+ AC_INIT([HP Linux Imaging and Printing], [3.19.12], [3.19.12], [hplip])
+-#AM_INIT_AUTOMAKE([1.9 foreign])
+-AM_INIT_AUTOMAKE
++AM_INIT_AUTOMAKE([foreign])
+ AC_DISABLE_STATIC
+ 
+ # Checks for programs.
meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch new file +33 -0
new file mode 100644
index 0000000000..6aa1de0a8a
@@ -0,0 +1,33 @@
+Upstream-Status: Inappropriate [configuration]
+
+--- a/configure.in
++++ b/configure.in
+@@ -599,6 +599,8 @@ if test "$class_driver" = "no" && test "
+       AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
+    else
+       AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)])
++      LIBUSBINCLUDEROOT?="/usr/include/"
++      AC_ARG_VAR(LIBUSBINCLUDEROOT, [path to libusb-1.0 folder])
+       AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)])
+    fi
+ fi
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -109,7 +109,7 @@ libhpmud_la_SOURCES += io/hpmud/musb_lib
+ libhpmud_la_LDFLAGS += -lusb
+ else
+ libhpmud_la_SOURCES += io/hpmud/musb.c 
+-libhpmud_la_CFLAGS  += -I/usr/include/libusb-1.0
++libhpmud_la_CFLAGS  += -I$(LIBUSBINCLUDEROOT)/libusb-1.0
+ libhpmud_la_LDFLAGS += -lusb-1.0
+ endif
+ 
+@@ -362,7 +362,7 @@ hpmudext_la_CFLAGS += -Iprotocol/discove
+ endif
+ 
+ if !LIBUSB01_BUILD
+-hpmudext_la_CFLAGS +=-I/usr/include/libusb-1.0 
++hpmudext_la_CFLAGS +=-I$(LIBUSBINCLUDEROOT)/libusb-1.0 
+ endif
+ endif #!HPLIP_CLASS_DRIVER
+ # ui (qt3)
meta-oe/recipes-extended/hplip/hplip_3.12.6.bb deleted +0 -75

75 lines not on this page · raw message

meta-oe/recipes-extended/hplip/hplip_3.19.12.bb new file +87 -0

87 lines not on this page · raw message

Signature · 1 line
2.25.0
author
#8 lore raw

PATCH 9/12 fontforge: Link with libpython3

In reply to Khem Raj

Helps building with python3

---
 meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb +5 -2
index c12d01e2d6..1863f95f0f 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = " \
     file://LICENSE;md5=d042f3d2a8fd7208b704a499168e3c89 \
 "
 
-DEPENDS = "glib-2.0 pango giflib tiff libxml2 jpeg libtool uthash gettext-native"
+DEPENDS = "python3 glib-2.0 pango giflib tiff libxml2 jpeg libtool uthash gettext-native"
 DEPENDS_append_class-target = " libxi"
 
 inherit autotools pkgconfig python3native features_check gettext gtk-icon-cache mime mime-xdg
@@ -20,9 +20,12 @@ SRC_URI = "git://github.com/${BPN}/${BPN}.git \
 "
 S = "${WORKDIR}/git"
 
-EXTRA_OECONF += "--without-libuninameslist"
+EXTRA_OECONF += "--without-libuninameslist  --enable-python-scripting --enable-python-extension"
 EXTRA_OECONF_append_class-native = " with_x=no"
 
+LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI}"
+BUILD_LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI}"
+
 #do_configure_prepend() {
 # uthash sources are expected in uthash/src
 #    mkdir -p ${S}/uthash/src
Signature · 1 line
2.25.0
author
#9 lore raw

PATCH 10/12 nodejs: Build only when meta-py2 is included

In reply to Khem Raj
---
 meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | 3 ++-
 meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb          | 7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +2 -1
index 6dda3005e7..60276468fd 100644
@@ -113,13 +113,14 @@ RDEPENDS_packagegroup-meta-oe-devtools ="\
     giflib icon-slicer iptraf-ng jq jsoncpp jsonrpc json-spirit \
     kconfig-frontends lemon libedit libgee libsombok3 \
     libubox log4cplus lshw ltrace lua mcpp memstat mercurial \
-    mpich msgpack-c nlohmann-json nodejs openocd pax-utils \
+    mpich msgpack-c nlohmann-json openocd pax-utils \
     ipc-run libdbd-mysql-perl libdbi-perl libio-pty-perl php \
     protobuf protobuf-c python3-distutils-extra \
     python-cpuset python-distutils-extra python-futures python-pygobject \
     rapidjson serialcheck sip3 sip tclap uftrace uw-imap valijson \
     xmlrpc-c yajl yasm \
     ${@bb.utils.contains("DISTRO_FEATURES", "x11", "geany geany-plugins glade tk", "", d)} \
+    ${@bb.utils.contains("BBPATH", "meta-python2", "nodejs", "", d)} \
     "
 
 RDEPENDS_packagegroup-meta-oe-devtools_remove_armv5 = "uftrace nodejs"
meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb +6 -1
index 5c50187253..d87a7513da 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=be4d5107c64dc3d7c57e3797e1a0674b"
 DEPENDS = "openssl"
 DEPENDS_append_class-target = " nodejs-native"
 
-inherit pkgconfig python3native
+inherit pkgconfig pythonnative
 
 COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
 COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
@@ -150,3 +150,8 @@ FILES_${PN}-systemtap = "${datadir}/systemtap"
 
 
 BBCLASSEXTEND = "native"
+
+python() {
+    if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+        raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
Signature · 1 line
2.25.0
author
#10 lore raw

PATCH 11/12 cherokee: Only build with meta-py2 is in layermix

In reply to Khem Raj
---
 .../packagesgroups/packagegroup-meta-webserver.bb          | 3 ++-
 meta-webserver/recipes-httpd/cherokee/cherokee_git.bb      | 7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
meta-webserver/recipes-core/packagesgroups/packagegroup-meta-webserver.bb +2 -1
index fc117850b4..089c325252 100644
@@ -19,8 +19,9 @@ RDEPENDS_packagegroup-meta-webserver = "\
 "
 
 RDEPENDS_packagegroup-meta-webserver-http = "\
-    nginx monkey cherokee hiawatha nostromo apache-websocket \
+    nginx monkey hiawatha nostromo apache-websocket \
     apache2 sthttpd \
+    ${@bb.utils.contains("BBPATH", "meta-python2", "cherokee", "", d)} \
     "
 
 RDEPENDS_packagegroup-meta-webserver-php = "\
meta-webserver/recipes-httpd/cherokee/cherokee_git.bb +6 -1
index d16e04e6b1..81805891a4 100644
@@ -20,7 +20,7 @@ SRC_URI = "git://github.com/cherokee/webserver \
 
 S = "${WORKDIR}/git"
 
-inherit autotools-brokensep pkgconfig binconfig update-rc.d systemd python3native
+inherit autotools-brokensep pkgconfig binconfig update-rc.d systemd pythonnative
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 PACKAGECONFIG[ffmpeg] = "--with-ffmpeg,--without-ffmpeg,libav"
@@ -70,3 +70,8 @@ RPROVIDES_${PN} += "${PN}-systemd"
 RREPLACES_${PN} += "${PN}-systemd"
 RCONFLICTS_${PN} += "${PN}-systemd"
 SYSTEMD_SERVICE_${PN} = "cherokee.service"
+
+python() {
+    if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+        raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
Signature · 1 line
2.25.0
author
#11 lore raw

PATCH 12/12 sip: Delete python2 version

In reply to Khem Raj
---
 .../packagegroups/packagegroup-meta-oe.bb             |  2 +-
 meta-oe/recipes-devtools/sip/sip_4.19.19.bb           | 11 -----------
 2 files changed, 1 insertion(+), 12 deletions(-)
 delete mode 100644 meta-oe/recipes-devtools/sip/sip_4.19.19.bb
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +1 -1
index 60276468fd..e5001c3974 100644
@@ -117,7 +117,7 @@ RDEPENDS_packagegroup-meta-oe-devtools ="\
     ipc-run libdbd-mysql-perl libdbi-perl libio-pty-perl php \
     protobuf protobuf-c python3-distutils-extra \
     python-cpuset python-distutils-extra python-futures python-pygobject \
-    rapidjson serialcheck sip3 sip tclap uftrace uw-imap valijson \
+    rapidjson serialcheck sip3 tclap uftrace uw-imap valijson \
     xmlrpc-c yajl yasm \
     ${@bb.utils.contains("DISTRO_FEATURES", "x11", "geany geany-plugins glade tk", "", d)} \
     ${@bb.utils.contains("BBPATH", "meta-python2", "nodejs", "", d)} \
meta-oe/recipes-devtools/sip/sip_4.19.19.bb deleted +0 -11
deleted file mode 100644
index 6299de4874..0000000000
@@ -1,11 +0,0 @@
-require sip.inc
-
-DEPENDS = "python"
-
-inherit python3-dir python3native
-
-PACKAGES += "python-sip"
-
-FILES_python-sip = "${libdir}/${PYTHON_DIR}/site-packages/"
-FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug"
-
Signature · 1 line
2.25.0
#12 lore raw
In reply to Khem Raj

We should start merging the inc and bb files now that we do not need to support more than one python version.

Quoted 31 lines · Khem Raj

Lets this inc file become usable for py3 module as well

---
 meta-python/recipes-devtools/python/python-m2crypto.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-python/recipes-devtools/python/python-m2crypto.inc +1 -3
index 5f5444f37e..76dd58ce04 100644
@@ -17,7 +17,7 @@ PYPI_PACKAGE = "M2Crypto"
 inherit pypi siteinfo
 
 DEPENDS += "openssl swig-native"
-RDEPENDS_${PN} += "python-typing"
+RDEPENDS_${PN} += "${PYTHON_PN}-typing"
 
 DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}
-I${STAGING_INCDIR}"
 DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}"
--

2.25.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

author
#13 lore raw
Quoted 3 lines · Tim Orling

We should start merging the inc and bb files now that we do not need to support more than one python version.

certainly, a good idea, before they decide to do py4 :), I am knee deep in ensuring py2 is not needed on meta-openembedded layers but if you are cooking patches for this cleanup thats good.

Quoted 30 lines · Khem Raj
Quoted 29 lines

Lets this inc file become usable for py3 module as well

---
 meta-python/recipes-devtools/python/python-m2crypto.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-python/recipes-devtools/python/python-m2crypto.inc +1 -2
index 5f5444f37e..76dd58ce04 100644
@@ -17,7 +17,7 @@ PYPI_PACKAGE = "M2Crypto"
 inherit pypi siteinfo
 
 DEPENDS += "openssl swig-native"
-RDEPENDS_${PN} += "python-typing"
+RDEPENDS_${PN} += "${PYTHON_PN}-typing"
 
 DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR} -I${STAGING_INCDIR}"
 DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}"
--

2.25.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel