aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorTim Orling <ticotimo@gmail.com>2019-11-29 17:01:53 -0800
committerTim Orling <ticotimo@gmail.com>2019-12-01 17:04:59 -0800
commit15aaeda06e84576c4b54115c5191ae98981edbd4 (patch)
tree20972200b55704090490a71765648b6e6c958185 /recipes-extended
parent8960f9269a27f72eb4a5671ef77901fdb7f2217d (diff)
downloadmeta-python2-15aaeda06e84576c4b54115c5191ae98981edbd4.tar.gz
recipes-extended: cleanup and merge bb and inc
Since we no longer need to support two python versions, merge inc and bb. This makes maintenance easier with AUH and devtool. While we are at it, drop dangling directories and inc files and general recipe cleanup, including adding SUMMARY and HOMEPAGE. Signed-off-by: Tim Orling <ticotimo@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch148
-rw-r--r--recipes-extended/python-pykickstart/files/0002-pykickstart-parser.py-add-lock-for-readKickstart-and.patch68
-rw-r--r--recipes-extended/python-pykickstart/files/0003-comment-out-sections-shutdown-and-environment-in-gen.patch48
-rw-r--r--recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch83
-rw-r--r--recipes-extended/python-pyparted/python-pyparted.inc22
-rw-r--r--recipes-extended/python-pyparted/python-pyparted_3.11.3.bb26
-rw-r--r--recipes-extended/pywbem/python-pywbem.inc48
-rw-r--r--recipes-extended/pywbem/python-pywbem_0.11.0.bb49
8 files changed, 72 insertions, 420 deletions
diff --git a/recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch b/recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch
deleted file mode 100644
index e7533f4..0000000
--- a/recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From f05f5fc363e2510f6943532f3e14a6423f6a2cf1 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Tue, 31 Jul 2018 17:24:47 +0800
-Subject: [PATCH 1/4] support authentication for kickstart
-
-While download kickstart file from web server,
-we support basic/digest authentication.
-
-Add KickstartAuthError to report authentication failure,
-which the invoker could parse this specific error.
-
-Upstream-Status: inappropriate [oe specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- pykickstart/errors.py | 17 +++++++++++++++++
- pykickstart/load.py | 34 ++++++++++++++++++++++++++++------
- pykickstart/parser.py | 4 ++--
- 3 files changed, 47 insertions(+), 8 deletions(-)
-
-diff --git a/pykickstart/errors.py b/pykickstart/errors.py
-index bf08ac5..aada7aa 100644
---- a/pykickstart/errors.py
-+++ b/pykickstart/errors.py
-@@ -32,6 +32,9 @@ This module exports several exception classes:
- KickstartVersionError - An exception for errors relating to unsupported
- syntax versions.
-
-+ KickstartAuthError - An exception for errors relating to authentication
-+ failed while downloading kickstart from web server
-+
- And some warning classes:
-
- KickstartWarning - A generic warning class.
-@@ -131,3 +134,17 @@ class KickstartDeprecationWarning(KickstartParseWarning, DeprecationWarning):
- commands and options.
- """
- pass
-+
-+class KickstartAuthError(KickstartError):
-+ """An exception for errors relating to authentication failed while
-+ downloading kickstart from web server
-+ """
-+ def __init__(self, msg):
-+ """Create a new KickstartAuthError exception instance with the
-+ descriptive message val. val should be the return value of
-+ formatErrorMsg.
-+ """
-+ KickstartError.__init__(self, msg)
-+
-+ def __str__(self):
-+ return self.value
-diff --git a/pykickstart/load.py b/pykickstart/load.py
-index fb935f2..41a2e9e 100644
---- a/pykickstart/load.py
-+++ b/pykickstart/load.py
-@@ -18,10 +18,13 @@
- # with the express permission of Red Hat, Inc.
- #
- import requests
-+from requests.auth import HTTPDigestAuth
-+from requests.auth import HTTPBasicAuth
-+
- import shutil
- import six
-
--from pykickstart.errors import KickstartError
-+from pykickstart.errors import KickstartError, KickstartAuthError
- from pykickstart.i18n import _
- from requests.exceptions import SSLError, RequestException
-
-@@ -29,7 +32,7 @@ _is_url = lambda location: '://' in location # RFC 3986
-
- SSL_VERIFY = True
-
--def load_to_str(location):
-+def load_to_str(location, user=None, passwd=None):
- '''Load a destination URL or file into a string.
- Type of input is inferred automatically.
-
-@@ -40,7 +43,7 @@ def load_to_str(location):
- Raises: KickstartError on error reading'''
-
- if _is_url(location):
-- return _load_url(location)
-+ return _load_url(location, user=user, passwd=passwd)
- else:
- return _load_file(location)
-
-@@ -70,11 +73,30 @@ def load_to_file(location, destination):
- _copy_file(location, destination)
- return destination
-
--def _load_url(location):
-- '''Load a location (URL or filename) and return contents as string'''
-+def _get_auth(location, user=None, passwd=None):
-+
-+ auth = None
-+ request = requests.get(location, verify=SSL_VERIFY)
-+ if request.status_code == requests.codes.unauthorized:
-+ if user is None or passwd is None:
-+ log.info("Require Authentication")
-+ raise KickstartAuthError("Require Authentication.\nAppend 'ksuser=<username> kspasswd=<password>' to boot command")
-
-+ reasons = request.headers.get("WWW-Authenticate", "").split()
-+ if reasons:
-+ auth_type = reasons[0]
-+ if auth_type == "Basic":
-+ auth = HTTPBasicAuth(user, passwd)
-+ elif auth_type == "Digest":
-+ auth=HTTPDigestAuth(user, passwd)
-+
-+ return auth
-+
-+def _load_url(location, user=None, passwd=None):
-+ '''Load a location (URL or filename) and return contents as string'''
-+ auth = _get_auth(location, user=user, passwd=passwd)
- try:
-- request = requests.get(location, verify=SSL_VERIFY)
-+ request = requests.get(location, verify=SSL_VERIFY, auth=auth)
- except SSLError as e:
- raise KickstartError(_('Error securely accessing URL "%s"') % location + ': {e}'.format(e=str(e)))
- except RequestException as e:
-diff --git a/pykickstart/parser.py b/pykickstart/parser.py
-index d8880eb..22d14cb 100644
---- a/pykickstart/parser.py
-+++ b/pykickstart/parser.py
-@@ -787,7 +787,7 @@ class KickstartParser(object):
- i = PutBackIterator(s.splitlines(True) + [""])
- self._stateMachine(i)
-
-- def readKickstart(self, f, reset=True):
-+ def readKickstart(self, f, reset=True, username=None, password=None):
- """Process a kickstart file, given by the filename f."""
- if reset:
- self._reset()
-@@ -808,7 +808,7 @@ class KickstartParser(object):
- self.currentdir[self._includeDepth] = cd
-
- try:
-- s = load_to_str(f)
-+ s = load_to_str(f, user=username, passwd=password)
- except KickstartError as e:
- raise KickstartError(_("Unable to open input kickstart file: %s") % str(e), lineno=0)
-
---
-2.7.4
-
diff --git a/recipes-extended/python-pykickstart/files/0002-pykickstart-parser.py-add-lock-for-readKickstart-and.patch b/recipes-extended/python-pykickstart/files/0002-pykickstart-parser.py-add-lock-for-readKickstart-and.patch
deleted file mode 100644
index 4a001f3..0000000
--- a/recipes-extended/python-pykickstart/files/0002-pykickstart-parser.py-add-lock-for-readKickstart-and.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 62fdead139edb0f29b2f222efcb8f39be15b057e Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Mon, 30 Jul 2018 15:47:13 +0800
-Subject: [PATCH 2/4] pykickstart/parser.py: add lock for readKickstart and
- support https without certification
-
-- Add lock for readKickstart to fix race issue
-
-- Support to download kickstart file through https without certification
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- pykickstart/load.py | 2 +-
- pykickstart/parser.py | 18 ++++++++++++++++++
- 2 files changed, 19 insertions(+), 1 deletion(-)
-
-diff --git a/pykickstart/load.py b/pykickstart/load.py
-index c6f013f..7adb751 100644
---- a/pykickstart/load.py
-+++ b/pykickstart/load.py
-@@ -30,7 +30,7 @@ from requests.exceptions import SSLError, RequestException
-
- _is_url = lambda location: '://' in location # RFC 3986
-
--SSL_VERIFY = True
-+SSL_VERIFY = False
-
- def load_to_str(location, user=None, passwd=None):
- '''Load a destination URL or file into a string.
-diff --git a/pykickstart/parser.py b/pykickstart/parser.py
-index e44099b..e68174d 100644
---- a/pykickstart/parser.py
-+++ b/pykickstart/parser.py
-@@ -55,6 +55,20 @@ from pykickstart.i18n import _
- STATE_END = "end"
- STATE_COMMANDS = "commands"
-
-+import threading
-+_private_ks_lock = threading.RLock()
-+
-+class KsLock(object):
-+ def __enter__(self):
-+ _private_ks_lock.acquire()
-+ return _private_ks_lock
-+
-+ def __exit__(self, exc_type, exc_val, exc_tb):
-+ _private_ks_lock.release()
-+
-+
-+_ks_lock = KsLock()
-+
- def _preprocessStateMachine(lineIter):
- l = None
- lineno = 0
-@@ -788,6 +802,10 @@ class KickstartParser(object):
- self._stateMachine(i)
-
- def readKickstart(self, f, reset=True, username=None, password=None):
-+ with _ks_lock:
-+ self._readKickstart(f, reset=reset, username=username, password=password)
-+
-+ def _readKickstart(self, f, reset=True, username=None, password=None):
- """Process a kickstart file, given by the filename f."""
- if reset:
- self._reset()
---
-2.7.4
-
diff --git a/recipes-extended/python-pykickstart/files/0003-comment-out-sections-shutdown-and-environment-in-gen.patch b/recipes-extended/python-pykickstart/files/0003-comment-out-sections-shutdown-and-environment-in-gen.patch
deleted file mode 100644
index 7ab7346..0000000
--- a/recipes-extended/python-pykickstart/files/0003-comment-out-sections-shutdown-and-environment-in-gen.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 44226393812399c61de9ca9281efa002ad4f4c01 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 1 Jun 2017 15:15:15 +0800
-Subject: [PATCH 3/4] comment out sections shutdown and environment in
- generated kickstart file
-
-Both of them is disabled by default.
-
-Upstream-Status: Inappropriate[oe specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
-fixup! add comments of shutdown for user
----
- pykickstart/commands/reboot.py | 3 +++
- pykickstart/parser.py | 2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/pykickstart/commands/reboot.py b/pykickstart/commands/reboot.py
-index 75a6d916..edfe83ff 100644
---- a/pykickstart/commands/reboot.py
-+++ b/pykickstart/commands/reboot.py
-@@ -43,6 +43,9 @@ class FC3_Reboot(KickstartCommand):
- elif self.action == KS_SHUTDOWN:
- retval += "# Shutdown after installation\nshutdown"
- retval += self._getArgsAsStr() + "\n"
-+ else:
-+ retval += "# Shutdown after installation\n#shutdown"
-+ retval += self._getArgsAsStr() + "\n"
-
- return retval
-
-diff --git a/pykickstart/parser.py b/pykickstart/parser.py
-index bc59131b..b2d09d45 100644
---- a/pykickstart/parser.py
-+++ b/pykickstart/parser.py
-@@ -428,7 +428,7 @@ class Packages(KickstartObject):
-
- if not self.default:
- if self.environment:
-- pkgs += "@^%s\n" % self.environment
-+ pkgs += "#@^%s\n" % self.environment
-
- grps = self.groupList
- grps.sort()
---
-2.7.4
-
diff --git a/recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch b/recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch
deleted file mode 100644
index 6ed15ab..0000000
--- a/recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From ffe06c6dd812b604d6482e4353d5564fad78bc90 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Mon, 30 Jul 2018 15:52:21 +0800
-Subject: [PATCH 4/4] load.py: retry to invoke request with timeout
-
-While networkless, use request to fetch kickstart file from
-network, it failed and wait 300s to break, we should retry
-to invoke request with timeout explicitly. So if it the
-network is up, the fetch works.
-
-Upstream-Status: inappropriate [oe specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- pykickstart/load.py | 31 +++++++++++++++++++++++++++++++
- 1 file changed, 31 insertions(+)
-
-diff --git a/pykickstart/load.py b/pykickstart/load.py
-index ad3bad1..a5cbbc5 100644
---- a/pykickstart/load.py
-+++ b/pykickstart/load.py
-@@ -21,6 +21,7 @@ import requests
- from requests.auth import HTTPDigestAuth
- from requests.auth import HTTPBasicAuth
-
-+import time
- import shutil
- import six
-
-@@ -28,6 +29,9 @@ from pykickstart.errors import KickstartError, KickstartAuthError
- from pykickstart.i18n import _
- from requests.exceptions import SSLError, RequestException
-
-+import logging
-+log = logging.getLogger("anaconda.main")
-+
- _is_url = lambda location: '://' in location # RFC 3986
-
- SSL_VERIFY = False
-@@ -73,6 +77,29 @@ def load_to_file(location, destination):
- _copy_file(location, destination)
- return destination
-
-+def _access_url(location):
-+ status = False
-+
-+ # Retry 45 times, wait 45s~135s
-+ i = 0
-+ while i < 45:
-+
-+ try:
-+ request = requests.get(location, verify=SSL_VERIFY, timeout=2)
-+ except RequestException as e:
-+ log.info("Try '%s' %d times, %s" % (location, i, str(e)))
-+ status = False
-+ i += 1
-+ time.sleep(1)
-+ continue
-+
-+ else:
-+ status = True
-+ return status
-+
-+ return status
-+
-+
- def _get_auth(location, user=None, passwd=None):
-
- auth = None
-@@ -94,6 +121,10 @@ def _get_auth(location, user=None, passwd=None):
-
- def _load_url(location, user=None, passwd=None):
- '''Load a location (URL or filename) and return contents as string'''
-+
-+ if not _access_url(location):
-+ raise KickstartError(_("Connection %s failed" % location))
-+
- auth = _get_auth(location, user=user, passwd=passwd)
- try:
- request = requests.get(location, verify=SSL_VERIFY, auth=auth)
---
-2.7.4
-
diff --git a/recipes-extended/python-pyparted/python-pyparted.inc b/recipes-extended/python-pyparted/python-pyparted.inc
deleted file mode 100644
index 9705448..0000000
--- a/recipes-extended/python-pyparted/python-pyparted.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "pyparted is a set of Python modules that provide Python programmers \
-an interface to libparted, the GNU parted library for disk partitioning and \
-filesystem manipulation."
-SUMMARY = "Python bindings for libparted"
-HOMEPAGE = "https://github.com/rhinstaller/pyparted"
-LICENSE = "GPL-2.0+"
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
- file://src/_pedmodule.c;beginline=10;endline=22;md5=9e53304db812b80d0939e11bb69dcab2 \
-"
-DEPENDS += "parted"
-
-# upstream only publishes releases in github archives which are discouraged
-SRCREV = "481510c10866851844b19f3d2ffcdaa37efc0cf8"
-SRC_URI = "git://github.com/rhinstaller/pyparted.git;protocol=https"
-
-S = "${WORKDIR}/git"
-
-RDEPENDS_${PN}_class-target += " \
- parted (>= 2.3) \
-"
-RDEPENDS_${PN}_class-native = ""
diff --git a/recipes-extended/python-pyparted/python-pyparted_3.11.3.bb b/recipes-extended/python-pyparted/python-pyparted_3.11.3.bb
index 32aa378..86caf2a 100644
--- a/recipes-extended/python-pyparted/python-pyparted_3.11.3.bb
+++ b/recipes-extended/python-pyparted/python-pyparted_3.11.3.bb
@@ -1,4 +1,28 @@
-require python-pyparted.inc
+SUMMARY = "Python bindings for libparted"
+DESCRIPTION = "pyparted is a set of Python modules that provide Python programmers \
+an interface to libparted, the GNU parted library for disk partitioning and \
+filesystem manipulation."
+HOMEPAGE = "https://github.com/rhinstaller/pyparted"
+SECTION = "devel/python"
+
+LICENSE = "GPL-2.0+"
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
+ file://src/_pedmodule.c;beginline=10;endline=22;md5=9e53304db812b80d0939e11bb69dcab2 \
+"
+
+# upstream only publishes releases in github archives which are discouraged
+SRCREV = "481510c10866851844b19f3d2ffcdaa37efc0cf8"
+SRC_URI = "git://github.com/rhinstaller/pyparted.git;protocol=https"
+
+DEPENDS += "parted"
+
+S = "${WORKDIR}/git"
+
+RDEPENDS_${PN}_class-target += " \
+ parted (>= 2.3) \
+"
+RDEPENDS_${PN}_class-native = ""
inherit distutils
diff --git a/recipes-extended/pywbem/python-pywbem.inc b/recipes-extended/pywbem/python-pywbem.inc
deleted file mode 100644
index 5151c33..0000000
--- a/recipes-extended/pywbem/python-pywbem.inc
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "Python WBEM Client and Provider Interface"
-DESCRIPTION = "\
-A Python library for making CIM (Common Information Model) operations over \
-HTTP using the WBEM CIM-XML protocol. It is based on the idea that a good \
-WBEM client should be easy to use and not necessarily require a large amount \
-of programming knowledge. It is suitable for a large range of tasks from \
-simply poking around to writing web and GUI applications. \
-\
-WBEM, or Web Based Enterprise Management is a manageability protocol, like \
-SNMP, standardised by the Distributed Management Task Force (DMTF) available \
-at http://www.dmtf.org/standards/wbem. \
-\
-It also provides a Python provider interface, and is the fastest and easiest \
-way to write providers on the planet."
-HOMEPAGE = "http://pywbem.github.io"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://pywbem/LICENSE.txt;md5=fbc093901857fcd118f065f900982c24"
-SRC_URI[md5sum] = "1465dfa92e4cbe558c773838b9b00711"
-SRC_URI[sha256sum] = "2a05f2c1a6ab4b08560a6da55fdaabd0f52f4d1e6df6e288b9ed927bf5c289ed"
-
-inherit pypi
-
-DEPENDS += " \
- ${PYTHON_PN}-ply-native \
- ${PYTHON_PN}-pyyaml-native \
- ${PYTHON_PN}-six-native \
-"
-
-do_install_append() {
- mv ${D}${bindir}/wbemcli.py ${D}${bindir}/pywbemcli
-
- rm -f ${D}${bindir}/*.bat
-}
-
-RDEPENDS_${PN}_class-target += "\
- ${PYTHON_PN}-datetime \
- ${PYTHON_PN}-io \
- ${PYTHON_PN}-netclient \
- ${PYTHON_PN}-ply \
- ${PYTHON_PN}-pyyaml \
- ${PYTHON_PN}-six \
- ${PYTHON_PN}-stringold \
- ${PYTHON_PN}-threading \
- ${PYTHON_PN}-unixadmin \
- ${PYTHON_PN}-xml \
-"
-
-BBCLASSEXTEND = "native"
diff --git a/recipes-extended/pywbem/python-pywbem_0.11.0.bb b/recipes-extended/pywbem/python-pywbem_0.11.0.bb
index a699f1c..ef5cc57 100644
--- a/recipes-extended/pywbem/python-pywbem_0.11.0.bb
+++ b/recipes-extended/pywbem/python-pywbem_0.11.0.bb
@@ -1,15 +1,58 @@
-require python-pywbem.inc
-inherit setuptools update-alternatives
+
+SUMMARY = "Python WBEM Client and Provider Interface"
+DESCRIPTION = "\
+A Python library for making CIM (Common Information Model) operations over \
+HTTP using the WBEM CIM-XML protocol. It is based on the idea that a good \
+WBEM client should be easy to use and not necessarily require a large amount \
+of programming knowledge. It is suitable for a large range of tasks from \
+simply poking around to writing web and GUI applications. \
+\
+WBEM, or Web Based Enterprise Management is a manageability protocol, like \
+SNMP, standardised by the Distributed Management Task Force (DMTF) available \
+at http://www.dmtf.org/standards/wbem. \
+\
+It also provides a Python provider interface, and is the fastest and easiest \
+way to write providers on the planet."
+HOMEPAGE = "http://pywbem.github.io"
+SECTION = "devel/python"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://pywbem/LICENSE.txt;md5=fbc093901857fcd118f065f900982c24"
+
+SRC_URI[md5sum] = "1465dfa92e4cbe558c773838b9b00711"
+SRC_URI[sha256sum] = "2a05f2c1a6ab4b08560a6da55fdaabd0f52f4d1e6df6e288b9ed927bf5c289ed"
+
DEPENDS += " \
${PYTHON_PN}-m2crypto-native \
+ ${PYTHON_PN}-ply-native \
+ ${PYTHON_PN}-pyyaml-native \
+ ${PYTHON_PN}-six-native \
${PYTHON_PN}-typing-native \
"
+inherit pypi setuptools update-alternatives
+
+do_install_append() {
+ mv ${D}${bindir}/wbemcli.py ${D}${bindir}/pywbemcli
+
+ rm -f ${D}${bindir}/*.bat
+}
+
RDEPENDS_${PN}_class-target += "\
${PYTHON_PN}-argparse \
+ ${PYTHON_PN}-datetime \
+ ${PYTHON_PN}-io \
${PYTHON_PN}-m2crypto \
+ ${PYTHON_PN}-netclient \
+ ${PYTHON_PN}-ply \
+ ${PYTHON_PN}-pyyaml \
+ ${PYTHON_PN}-six \
+ ${PYTHON_PN}-stringold \
${PYTHON_PN}-subprocess \
+ ${PYTHON_PN}-threading \
+ ${PYTHON_PN}-unixadmin \
+ ${PYTHON_PN}-xml \
"
ALTERNATIVE_${PN} = "mof_compiler pywbemcli wbemcli"
@@ -18,3 +61,5 @@ ALTERNATIVE_TARGET[pywbemcli] = "${bindir}/pywbemcli"
ALTERNATIVE_TARGET[wbemcli] = "${bindir}/wbemcli"
ALTERNATIVE_PRIORITY = "30"
+
+BBCLASSEXTEND = "native"