summaryrefslogtreecommitdiffstats
path: root/recipes-extra
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:19:54 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:19:54 +0200
commitc158582c0fc7f4bd73980fe9adad446855f4d61b (patch)
tree31b701a2367cb983e76e76cd7c2ba176ad33e5ac /recipes-extra
downloadmeta-vt-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'recipes-extra')
-rw-r--r--recipes-extra/python-urlgrabber/python-urlgrabber/pycurl-curl.patch288
-rw-r--r--recipes-extra/python-urlgrabber/python-urlgrabber_3.10.1.bb37
-rw-r--r--recipes-extra/virt-manager/virt-manager_1.0.0.bb72
3 files changed, 397 insertions, 0 deletions
diff --git a/recipes-extra/python-urlgrabber/python-urlgrabber/pycurl-curl.patch b/recipes-extra/python-urlgrabber/python-urlgrabber/pycurl-curl.patch
new file mode 100644
index 0000000..50f87e8
--- /dev/null
+++ b/recipes-extra/python-urlgrabber/python-urlgrabber/pycurl-curl.patch
@@ -0,0 +1,288 @@
1It seems that pycurl has been renamed to curl.
2
3Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com>
4Upstream-Status: Pending
5diff -uNrp urlgrabber-3.10.1.orig/urlgrabber/grabber.py urlgrabber-3.10.1/urlgrabber/grabber.py
6--- urlgrabber-3.10.1.orig/urlgrabber/grabber.py 2014-03-04 17:08:52.345678844 +0100
7+++ urlgrabber-3.10.1/urlgrabber/grabber.py 2014-03-04 17:09:49.074595399 +0100
8@@ -88,7 +88,7 @@ GENERAL ARGUMENTS (kwargs)
9 a positive integer expressing the number of seconds to wait before
10 timing out attempts to connect to a server. If the value is None
11 or 0, connection attempts will not time out. The timeout is passed
12- to the underlying pycurl object as its CONNECTTIMEOUT option, see
13+ to the underlying curl object as its CONNECTTIMEOUT option, see
14 the curl documentation on CURLOPT_CONNECTTIMEOUT for more information.
15 http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTCONNECTTIMEOUT
16
17@@ -509,7 +509,7 @@ import mimetools
18 import thread
19 import types
20 import stat
21-import pycurl
22+import curl
23 from ftplib import parse150
24 from StringIO import StringIO
25 from httplib import HTTPException
26@@ -821,7 +821,7 @@ class URLParser:
27
28 def process_http(self, parts, url):
29 (scheme, host, path, parm, query, frag) = parts
30- # TODO: auth-parsing here, maybe? pycurl doesn't really need it
31+ # TODO: auth-parsing here, maybe? curl doesn't really need it
32 return (scheme, host, path, parm, query, frag)
33
34 def quote(self, parts):
35@@ -983,7 +983,7 @@ class URLGrabberOptions:
36 self.username = None
37 self.password = None
38 self.ssl_ca_cert = None # sets SSL_CAINFO - path to certdb
39- self.ssl_context = None # no-op in pycurl
40+ self.ssl_context = None # no-op in curl
41 self.ssl_verify_peer = True # check peer's cert for authenticityb
42 self.ssl_verify_host = True # make sure who they are and who the cert is for matches
43 self.ssl_key = None # client key
44@@ -1355,7 +1355,7 @@ class PyCurlFileObject(object):
45
46 return len(buf)
47 except KeyboardInterrupt:
48- return pycurl.READFUNC_ABORT
49+ return curl.READFUNC_ABORT
50
51 def _return_hdr_obj(self):
52 if self._parsed_hdr:
53@@ -1370,7 +1370,7 @@ class PyCurlFileObject(object):
54
55 hdr = property(_return_hdr_obj)
56 http_code = property(fget=
57- lambda self: self.curl_obj.getinfo(pycurl.RESPONSE_CODE))
58+ lambda self: self.curl_obj.getinfo(curl.RESPONSE_CODE))
59
60 def _set_opts(self, opts={}):
61 # XXX
62@@ -1379,109 +1379,109 @@ class PyCurlFileObject(object):
63
64 # keepalives
65 if not opts.keepalive:
66- self.curl_obj.setopt(pycurl.FORBID_REUSE, 1)
67+ self.curl_obj.setopt(curl.FORBID_REUSE, 1)
68
69 # defaults we're always going to set
70- self.curl_obj.setopt(pycurl.NOPROGRESS, False)
71- self.curl_obj.setopt(pycurl.NOSIGNAL, True)
72- self.curl_obj.setopt(pycurl.WRITEFUNCTION, self._retrieve)
73- self.curl_obj.setopt(pycurl.HEADERFUNCTION, self._hdr_retrieve)
74- self.curl_obj.setopt(pycurl.PROGRESSFUNCTION, self._progress_update)
75- self.curl_obj.setopt(pycurl.FAILONERROR, True)
76- self.curl_obj.setopt(pycurl.OPT_FILETIME, True)
77- self.curl_obj.setopt(pycurl.FOLLOWLOCATION, True)
78+ self.curl_obj.setopt(curl.NOPROGRESS, False)
79+ self.curl_obj.setopt(curl.NOSIGNAL, True)
80+ self.curl_obj.setopt(curl.WRITEFUNCTION, self._retrieve)
81+ self.curl_obj.setopt(curl.HEADERFUNCTION, self._hdr_retrieve)
82+ self.curl_obj.setopt(curl.PROGRESSFUNCTION, self._progress_update)
83+ self.curl_obj.setopt(curl.FAILONERROR, True)
84+ self.curl_obj.setopt(curl.OPT_FILETIME, True)
85+ self.curl_obj.setopt(curl.FOLLOWLOCATION, True)
86
87 if DEBUG and DEBUG.level <= 10:
88- self.curl_obj.setopt(pycurl.VERBOSE, True)
89+ self.curl_obj.setopt(curl.VERBOSE, True)
90 if opts.user_agent:
91- self.curl_obj.setopt(pycurl.USERAGENT, opts.user_agent)
92+ self.curl_obj.setopt(curl.USERAGENT, opts.user_agent)
93 if opts.ip_resolve:
94 # Default is: IPRESOLVE_WHATEVER
95 ipr = opts.ip_resolve.lower()
96 if ipr == 'whatever': # Do we need this?
97- self.curl_obj.setopt(pycurl.IPRESOLVE,pycurl.IPRESOLVE_WHATEVER)
98+ self.curl_obj.setopt(curl.IPRESOLVE,curl.IPRESOLVE_WHATEVER)
99 if ipr == 'ipv4':
100- self.curl_obj.setopt(pycurl.IPRESOLVE, pycurl.IPRESOLVE_V4)
101+ self.curl_obj.setopt(curl.IPRESOLVE, curl.IPRESOLVE_V4)
102 if ipr == 'ipv6':
103- self.curl_obj.setopt(pycurl.IPRESOLVE, pycurl.IPRESOLVE_V6)
104+ self.curl_obj.setopt(curl.IPRESOLVE, curl.IPRESOLVE_V6)
105
106 # maybe to be options later
107- self.curl_obj.setopt(pycurl.FOLLOWLOCATION, True)
108- self.curl_obj.setopt(pycurl.MAXREDIRS, 5)
109+ self.curl_obj.setopt(curl.FOLLOWLOCATION, True)
110+ self.curl_obj.setopt(curl.MAXREDIRS, 5)
111
112 # timeouts
113 timeout = 300
114 if hasattr(opts, 'timeout'):
115 timeout = int(opts.timeout or 0)
116- self.curl_obj.setopt(pycurl.CONNECTTIMEOUT, timeout)
117- self.curl_obj.setopt(pycurl.LOW_SPEED_LIMIT, opts.minrate or 1000)
118- self.curl_obj.setopt(pycurl.LOW_SPEED_TIME, timeout)
119+ self.curl_obj.setopt(curl.CONNECTTIMEOUT, timeout)
120+ self.curl_obj.setopt(curl.LOW_SPEED_LIMIT, opts.minrate or 1000)
121+ self.curl_obj.setopt(curl.LOW_SPEED_TIME, timeout)
122
123 # ssl options
124 if self.scheme == 'https':
125 if opts.ssl_ca_cert: # this may do ZERO with nss according to curl docs
126- self.curl_obj.setopt(pycurl.CAPATH, opts.ssl_ca_cert)
127- self.curl_obj.setopt(pycurl.CAINFO, opts.ssl_ca_cert)
128- self.curl_obj.setopt(pycurl.SSL_VERIFYPEER, opts.ssl_verify_peer)
129+ self.curl_obj.setopt(curl.CAPATH, opts.ssl_ca_cert)
130+ self.curl_obj.setopt(curl.CAINFO, opts.ssl_ca_cert)
131+ self.curl_obj.setopt(curl.SSL_VERIFYPEER, opts.ssl_verify_peer)
132 if opts.ssl_verify_host: # 1 is meaningless to curl
133- self.curl_obj.setopt(pycurl.SSL_VERIFYHOST, 2)
134+ self.curl_obj.setopt(curl.SSL_VERIFYHOST, 2)
135 if opts.ssl_key:
136- self.curl_obj.setopt(pycurl.SSLKEY, opts.ssl_key)
137+ self.curl_obj.setopt(curl.SSLKEY, opts.ssl_key)
138 if opts.ssl_key_type:
139- self.curl_obj.setopt(pycurl.SSLKEYTYPE, opts.ssl_key_type)
140+ self.curl_obj.setopt(curl.SSLKEYTYPE, opts.ssl_key_type)
141 if opts.ssl_cert:
142- self.curl_obj.setopt(pycurl.SSLCERT, opts.ssl_cert)
143+ self.curl_obj.setopt(curl.SSLCERT, opts.ssl_cert)
144 # if we have a client side cert - turn off reuse b/c nss is odd
145- self.curl_obj.setopt(pycurl.FORBID_REUSE, 1)
146+ self.curl_obj.setopt(curl.FORBID_REUSE, 1)
147 if opts.ssl_cert_type:
148- self.curl_obj.setopt(pycurl.SSLCERTTYPE, opts.ssl_cert_type)
149+ self.curl_obj.setopt(curl.SSLCERTTYPE, opts.ssl_cert_type)
150 if opts.ssl_key_pass:
151- self.curl_obj.setopt(pycurl.SSLKEYPASSWD, opts.ssl_key_pass)
152+ self.curl_obj.setopt(curl.SSLKEYPASSWD, opts.ssl_key_pass)
153
154 #headers:
155 if opts.http_headers and self.scheme in ('http', 'https'):
156 headers = []
157 for (tag, content) in opts.http_headers:
158 headers.append('%s:%s' % (tag, content))
159- self.curl_obj.setopt(pycurl.HTTPHEADER, headers)
160+ self.curl_obj.setopt(curl.HTTPHEADER, headers)
161
162 # ranges:
163 if opts.range or opts.reget:
164 range_str = self._build_range()
165 if range_str:
166- self.curl_obj.setopt(pycurl.RANGE, range_str)
167+ self.curl_obj.setopt(curl.RANGE, range_str)
168
169 # throttle/bandwidth
170 if hasattr(opts, 'raw_throttle') and opts.raw_throttle():
171- self.curl_obj.setopt(pycurl.MAX_RECV_SPEED_LARGE, int(opts.raw_throttle()))
172+ self.curl_obj.setopt(curl.MAX_RECV_SPEED_LARGE, int(opts.raw_throttle()))
173
174 # proxy
175 if opts.proxy is not None:
176- self.curl_obj.setopt(pycurl.PROXY, opts.proxy)
177- self.curl_obj.setopt(pycurl.PROXYAUTH,
178+ self.curl_obj.setopt(curl.PROXY, opts.proxy)
179+ self.curl_obj.setopt(curl.PROXYAUTH,
180 # All but Kerberos. BZ 769254
181- pycurl.HTTPAUTH_ANY - pycurl.HTTPAUTH_GSSNEGOTIATE)
182+ curl.HTTPAUTH_ANY - curl.HTTPAUTH_GSSNEGOTIATE)
183
184 if opts.username and opts.password:
185 if self.scheme in ('http', 'https'):
186- self.curl_obj.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_ANY)
187+ self.curl_obj.setopt(curl.HTTPAUTH, curl.HTTPAUTH_ANY)
188
189 if opts.username and opts.password:
190 # apparently when applying them as curlopts they do not require quoting of any kind
191 userpwd = '%s:%s' % (opts.username, opts.password)
192- self.curl_obj.setopt(pycurl.USERPWD, userpwd)
193+ self.curl_obj.setopt(curl.USERPWD, userpwd)
194
195 #posts - simple - expects the fields as they are
196 if opts.data:
197- self.curl_obj.setopt(pycurl.POST, True)
198- self.curl_obj.setopt(pycurl.POSTFIELDS, _to_utf8(opts.data))
199+ self.curl_obj.setopt(curl.POST, True)
200+ self.curl_obj.setopt(curl.POSTFIELDS, _to_utf8(opts.data))
201
202 # ftp
203 if opts.ftp_disable_epsv:
204- self.curl_obj.setopt(pycurl.FTP_USE_EPSV, False)
205+ self.curl_obj.setopt(curl.FTP_USE_EPSV, False)
206
207 # our url
208- self.curl_obj.setopt(pycurl.URL, self.url)
209+ self.curl_obj.setopt(curl.URL, self.url)
210
211
212 def _do_perform(self):
213@@ -1490,7 +1490,7 @@ class PyCurlFileObject(object):
214
215 try:
216 self.curl_obj.perform()
217- except pycurl.error, e:
218+ except curl.error, e:
219 # XXX - break some of these out a bit more clearly
220 # to other URLGrabErrors from
221 # http://curl.haxx.se/libcurl/c/libcurl-errors.html
222@@ -1505,11 +1505,11 @@ class PyCurlFileObject(object):
223
224 if errcode == 23 and 200 <= code <= 299:
225 # this is probably wrong but ultimately this is what happens
226- # we have a legit http code and a pycurl 'writer failed' code
227+ # we have a legit http code and a curl 'writer failed' code
228 # which almost always means something aborted it from outside
229 # since we cannot know what it is -I'm banking on it being
230 # a ctrl-c. XXXX - if there's a way of going back two raises to
231- # figure out what aborted the pycurl process FIXME
232+ # figure out what aborted the curl process FIXME
233 raise getattr(self, '_cb_error', KeyboardInterrupt)
234
235 elif errcode == 28:
236@@ -1519,11 +1519,11 @@ class PyCurlFileObject(object):
237
238 elif errcode == 42:
239 # this is probably wrong but ultimately this is what happens
240- # we have a legit http code and a pycurl 'writer failed' code
241+ # we have a legit http code and a curl 'writer failed' code
242 # which almost always means something aborted it from outside
243 # since we cannot know what it is -I'm banking on it being
244 # a ctrl-c. XXXX - if there's a way of going back two raises to
245- # figure out what aborted the pycurl process FIXME
246+ # figure out what aborted the curl process FIXME
247 raise KeyboardInterrupt
248
249 else:
250@@ -1750,7 +1750,7 @@ class PyCurlFileObject(object):
251 pass # URL too long. = IOError ... ignore everything.
252
253 # set the time
254- mod_time = self.curl_obj.getinfo(pycurl.INFO_FILETIME)
255+ mod_time = self.curl_obj.getinfo(curl.INFO_FILETIME)
256 if mod_time != -1:
257 try:
258 os.utime(self.filename, (mod_time, mod_time))
259@@ -1863,7 +1863,7 @@ class PyCurlFileObject(object):
260
261 msg = _("Downloaded more than max size for %s: %s > %s") \
262 % (self.url, cur, max_size)
263- self._error = (pycurl.E_FILESIZE_EXCEEDED, msg)
264+ self._error = (curl.E_FILESIZE_EXCEEDED, msg)
265 return True
266 return False
267
268@@ -1903,16 +1903,16 @@ class PyCurlFileObject(object):
269 urllib.addinfourl, via. urllib.URLopener.* """
270 return self.url
271
272-if hasattr(pycurl, 'GLOBAL_ACK_EINTR'):
273+if hasattr(curl, 'GLOBAL_ACK_EINTR'):
274 # fail immediately on ctrl-c
275- pycurl.global_init(pycurl.GLOBAL_DEFAULT | pycurl.GLOBAL_ACK_EINTR)
276-_curl_cache = pycurl.Curl() # make one and reuse it over and over and over
277+ curl.global_init(curl.GLOBAL_DEFAULT | curl.GLOBAL_ACK_EINTR)
278+_curl_cache = curl.Curl() # make one and reuse it over and over and over
279
280 def reset_curl_obj():
281 """To make sure curl has reread the network/dns info we force a reload"""
282 global _curl_cache
283 _curl_cache.close()
284- _curl_cache = pycurl.Curl()
285+ _curl_cache = curl.Curl()
286
287 _libproxy_cache = None
288
diff --git a/recipes-extra/python-urlgrabber/python-urlgrabber_3.10.1.bb b/recipes-extra/python-urlgrabber/python-urlgrabber_3.10.1.bb
new file mode 100644
index 0000000..97dab20
--- /dev/null
+++ b/recipes-extra/python-urlgrabber/python-urlgrabber_3.10.1.bb
@@ -0,0 +1,37 @@
1DESCRIPTION = "urlgrabber is a pure python package that drastically simplifies the fetching of files."
2
3HOMEPAGE = "http://urlgrabber.baseurl.org/"
4SECTION = "devel/python"
5PRIORITY = "optional"
6LICENSE = "LGPL2.1+"
7PR = "r1"
8
9LIC_FILES_CHKSUM = "file://LICENSE;md5=68ad62c64cc6c620126241fd429e68fe"
10
11SRC_URI = "http://urlgrabber.baseurl.org/download/urlgrabber-${PV}.tar.gz \
12 file://pycurl-curl.patch"
13
14S = "${WORKDIR}/urlgrabber-${PV}"
15
16SRC_URI[md5sum] = "1f5dc63805623cc473e06204fd240bb2"
17SRC_URI[sha256sum] = "06b13ff8d527dba3aee04069681b2c09c03117592d5485a80ae4b807cdf33476"
18
19RDEPENDS_${PN} = "python-pycurl"
20
21inherit distutils
22
23FILES_${PN} += "/usr/share/libexec"
24
25# setup.py will try to include the urlgrabber package, which fails since we
26# don't have pycurl in the native sysroot. It's included just to get the
27# version and description text strings for inclusion in the package. Avoid this
28# by dynamically creating a version of urlgrabber that does not include the
29# actual urlgrabber features, that setup.py can include.
30do_patch() {
31 # Create a non-importing version of urlgrabber for the setup script
32 mkdir ${S}/urlgrabber_version
33 sed 's/^from grabber import.*//' ${S}/urlgrabber/__init__.py > ${S}/urlgrabber_version/__init__.py
34
35 # Make sure the setup script uses the version-only urlgrabber
36 sed -i 's/import urlgrabber/&_version/' ${S}/setup.py
37}
diff --git a/recipes-extra/virt-manager/virt-manager_1.0.0.bb b/recipes-extra/virt-manager/virt-manager_1.0.0.bb
new file mode 100644
index 0000000..21ad3bb
--- /dev/null
+++ b/recipes-extra/virt-manager/virt-manager_1.0.0.bb
@@ -0,0 +1,72 @@
1SUMMARY = "virt-manager"
2DESCRIPTION = "virt-manager"
3HOMEPAGE = "http://virt-manager.org"
4SECTION = "devel"
5
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
8
9SRC_URI = "https://fedorahosted.org/released/virt-manager/virt-manager-${PV}.tar.gz"
10SRC_URI[sha256sum] = "2b2f59f7fccd2fcfbaf4306e33342e5d2be8f0ddd71af9eeca0c1f215e1e29aa"
11SRC_URI[md5sum] = "8a0585de48d8060a5394aae912342c95"
12
13sharedir = "${datadir}"
14
15FILES_${PN} = " \
16 ${bindir}/virt-clone \
17 ${bindir}/virt-image \
18 ${bindir}/virt-install \
19 ${bindir}/virt-convert \
20 ${bindir}/virt-xml \
21 ${sharedir}/virt-manager/virt-clone \
22 ${sharedir}/virt-manager/virt-image \
23 ${sharedir}/virt-manager/virt-install \
24 ${sharedir}/virt-manager/virt-convert \
25 ${sharedir}/virt-manager/virt-xml \
26 ${sharedir}/virt-manager/virtinst \
27 ${sharedir}/virt-manager/virtconv \
28 ${sharedir}/virt-manager/virtcli \
29 \
30 ${sharedir}/virt-manager/virt-manager \
31 ${sharedir}/virt-manager/virtManager \
32 ${sharedir}/virt-manager/ui \
33 ${sharedir}/virt-manager/icons \
34 ${sharedir}/icons \
35 ${sharedir}/appdata \
36 ${sharedir}/applications \
37 ${sharedir}/glib-2.0 \
38 ${@base_contains('DISTRO_FEATURES', 'x11', '${bindir}/virt-manager', '', d)} \
39 "
40
41DEPENDS = "nativesdk-perl"
42
43RDEPENDS_${PN} = " \
44 libvirt-python \
45 python-urlgrabber \
46 libxml2-python \
47 ${@base_contains('DISTRO_FEATURES', 'x11', 'python-pygtk', '', d)} \
48 "
49
50
51do_configure() {
52 python setup.py configure
53}
54
55do_build() {
56 python setup.py build --prefix=${prefix}
57}
58
59# virt-manager is the only command that requires graphical libraries. The
60# package does however not supply a --no-graphics argument or such to the
61# install program, which is understandable since distutils (which is
62# undocumented to a large degree) seems to be called with the complete file
63# list before the argument parsing is performed. To avoid that this command is
64# available when the package is built as part of a non-x11 distro, remove the
65# /usr/bin/virt-manager file.
66
67REMOVE_COMMAND = "${@base_contains('DISTRO_FEATURES', 'x11', '', 'rm ${D}${bindir}/virt-manager', d)}"
68do_install() {
69 python setup.py install --prefix=${prefix} --root=${D}
70
71 sh -c "${REMOVE_COMMAND}"
72}