mirror of
https://git.yoctoproject.org/poky
synced 2026-01-30 21:38:43 +01:00
Compare commits
192 Commits
master
...
dizzy-12.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dd21a9f15 | ||
|
|
b6e41cf744 | ||
|
|
cc6d968241 | ||
|
|
74bb618474 | ||
|
|
ab5c5e3a0e | ||
|
|
8e354428a2 | ||
|
|
a6f2e49038 | ||
|
|
63c0b4a441 | ||
|
|
9d20b675dd | ||
|
|
39e09709bf | ||
|
|
36e42c0ddb | ||
|
|
446acfb5a4 | ||
|
|
d7c61053da | ||
|
|
b52e2f4f2e | ||
|
|
4b7d844d84 | ||
|
|
510c27ad8c | ||
|
|
9ffc238025 | ||
|
|
7461790c39 | ||
|
|
69df8dc63f | ||
|
|
2658acef69 | ||
|
|
f20e4c0cf6 | ||
|
|
d77ee86680 | ||
|
|
36576c7087 | ||
|
|
7cacecf444 | ||
|
|
0b8a386a68 | ||
|
|
87f7ca2613 | ||
|
|
068a9f5cbe | ||
|
|
27a34b69a0 | ||
|
|
ec321182bd | ||
|
|
6540ecdb37 | ||
|
|
84d0b6fd98 | ||
|
|
37ca92bb2a | ||
|
|
8dde9d4bd4 | ||
|
|
b0feb20abc | ||
|
|
6ede9224f8 | ||
|
|
112c10ac64 | ||
|
|
484b928531 | ||
|
|
0fb10cf659 | ||
|
|
f7fd58319c | ||
|
|
554962b380 | ||
|
|
6a2ff9b067 | ||
|
|
b48b07f1fb | ||
|
|
b268f7cc93 | ||
|
|
8e9950dbaa | ||
|
|
4eab67dda8 | ||
|
|
89398c3e07 | ||
|
|
c54b9fb2ed | ||
|
|
64271845dc | ||
|
|
0d65f6c16d | ||
|
|
f8adeb08f1 | ||
|
|
e0cb09c6ac | ||
|
|
d04fdd5f9e | ||
|
|
b30db74cd8 | ||
|
|
7526e8d006 | ||
|
|
fb760567a3 | ||
|
|
b6079e0c71 | ||
|
|
8d0600569b | ||
|
|
dfd5bbdfa9 | ||
|
|
49ece9bb51 | ||
|
|
10710d7a92 | ||
|
|
527574602a | ||
|
|
25cdadb86b | ||
|
|
6b3673db74 | ||
|
|
e7d461a473 | ||
|
|
358794f2fb | ||
|
|
3c76f85d5f | ||
|
|
7e9d8bcada | ||
|
|
08613cc339 | ||
|
|
5381289530 | ||
|
|
d57978aafc | ||
|
|
7fe785d692 | ||
|
|
b3e9e56756 | ||
|
|
5d7fe4a07b | ||
|
|
6062cbe8db | ||
|
|
9f41c7df9e | ||
|
|
4e0180b746 | ||
|
|
fa75856b4b | ||
|
|
8d8e8d0a8e | ||
|
|
4157aa7c0b | ||
|
|
b0811fe4a2 | ||
|
|
8f21845460 | ||
|
|
3d101b429d | ||
|
|
a4814ac1b0 | ||
|
|
9b0df21b87 | ||
|
|
2d51c7e62c | ||
|
|
22861f8031 | ||
|
|
74dec87ce2 | ||
|
|
2558a15919 | ||
|
|
2c13c5d3fe | ||
|
|
769c4ebb4f | ||
|
|
69767a27cc | ||
|
|
c9a9e0199b | ||
|
|
c458dde820 | ||
|
|
9393fdbd7e | ||
|
|
0cfc7dd0a5 | ||
|
|
04ffa0b961 | ||
|
|
fdf882c091 | ||
|
|
2d40d3228d | ||
|
|
a832f18ac2 | ||
|
|
a0d91bbdef | ||
|
|
68f431e850 | ||
|
|
e5c3c1501b | ||
|
|
bb6990e057 | ||
|
|
2f2b081589 | ||
|
|
9d4df89e5b | ||
|
|
a6d7512b5e | ||
|
|
637580101c | ||
|
|
673bb3cffc | ||
|
|
09f6349eeb | ||
|
|
31f39a91e6 | ||
|
|
b8ea994e11 | ||
|
|
3725cdf43a | ||
|
|
3244f4540c | ||
|
|
ec853e4eea | ||
|
|
07fdc5a275 | ||
|
|
dda084e13c | ||
|
|
044039dc8e | ||
|
|
0bc80a3850 | ||
|
|
1020bc3de3 | ||
|
|
a291eb108b | ||
|
|
d0c969eeab | ||
|
|
6af63cc898 | ||
|
|
5211fb73f0 | ||
|
|
c8279678d4 | ||
|
|
21b15bc6cd | ||
|
|
de6e6a5a62 | ||
|
|
5e7218e8b0 | ||
|
|
bc6651cb31 | ||
|
|
a16aa96a08 | ||
|
|
59c7cb37bc | ||
|
|
1eceece8f6 | ||
|
|
0d9dd1d3da | ||
|
|
f09b49dd64 | ||
|
|
b9304ab75c | ||
|
|
28c4a4976d | ||
|
|
a6f13fe42f | ||
|
|
e8404413fe | ||
|
|
d6cbbee29c | ||
|
|
d6e0ea59b2 | ||
|
|
be22ea0314 | ||
|
|
3fc8d29953 | ||
|
|
becb32bb30 | ||
|
|
fa34c42d19 | ||
|
|
942e35d651 | ||
|
|
c35cecebc6 | ||
|
|
c72d8913b3 | ||
|
|
e3743bbe94 | ||
|
|
02627ad3d9 | ||
|
|
ecf1e3d1b1 | ||
|
|
2310ca25ed | ||
|
|
0185dcd883 | ||
|
|
b9e61a3203 | ||
|
|
e111bb329c | ||
|
|
28f6830a49 | ||
|
|
c292340b7a | ||
|
|
118cf7bc86 | ||
|
|
4d1745feb5 | ||
|
|
d6751f2293 | ||
|
|
880e8b26ed | ||
|
|
8d5259d953 | ||
|
|
9e8bb32215 | ||
|
|
aa8bfdfa22 | ||
|
|
5c69d24f56 | ||
|
|
b70ef7b95a | ||
|
|
bd00bc3d0d | ||
|
|
e741ebf210 | ||
|
|
db012b429f | ||
|
|
90a03e9c9d | ||
|
|
b466e00cf6 | ||
|
|
00af5317eb | ||
|
|
db7f4f31c9 | ||
|
|
33e95afc83 | ||
|
|
9bfb78bff6 | ||
|
|
cccad8c33f | ||
|
|
2138890fa6 | ||
|
|
19750cac36 | ||
|
|
5deb78802a | ||
|
|
ffdef91586 | ||
|
|
09430c66b3 | ||
|
|
929d04b404 | ||
|
|
081fddd3e4 | ||
|
|
9fcd5826d9 | ||
|
|
df87cb27ef | ||
|
|
2eb659d765 | ||
|
|
f3a177cf04 | ||
|
|
58a629a1a0 | ||
|
|
b9b5aeffa6 | ||
|
|
ff5510b3fa | ||
|
|
9aff3a4ec0 | ||
|
|
16ddd45421 | ||
|
|
1a6c3a385c | ||
|
|
e95863cee0 |
@@ -147,6 +147,8 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, taskdepdat
|
||||
pipein.close()
|
||||
|
||||
signal.signal(signal.SIGTERM, sigterm_handler)
|
||||
# Let SIGHUP exit as SIGTERM
|
||||
signal.signal(signal.SIGHUP, sigterm_handler)
|
||||
|
||||
# Save out the PID so that the event can include it the
|
||||
# events
|
||||
@@ -266,9 +268,14 @@ class BitbakeWorker(object):
|
||||
self.build_pipes = {}
|
||||
|
||||
signal.signal(signal.SIGTERM, self.sigterm_exception)
|
||||
# Let SIGHUP exit as SIGTERM
|
||||
signal.signal(signal.SIGHUP, self.sigterm_exception)
|
||||
|
||||
def sigterm_exception(self, signum, stackframe):
|
||||
bb.warn("Worker recieved SIGTERM, shutting down...")
|
||||
if signum == signal.SIGTERM:
|
||||
bb.warn("Worker recieved SIGTERM, shutting down...")
|
||||
elif signum == signal.SIGHUP:
|
||||
bb.warn("Worker recieved SIGHUP, shutting down...")
|
||||
self.handle_finishnow(None)
|
||||
signal.signal(signal.SIGTERM, signal.SIG_DFL)
|
||||
os.kill(os.getpid(), signal.SIGTERM)
|
||||
|
||||
@@ -1308,8 +1308,8 @@
|
||||
BitBake allows installation of event handlers within
|
||||
recipe and class files.
|
||||
Events are triggered at certain points during operation,
|
||||
such as the beginning of operation against a given
|
||||
<filename>.bb</filename>, the start of a given task,
|
||||
such as the beginning of an operation against a given recipe
|
||||
(<filename>*.bb</filename> file), the start of a given task,
|
||||
task failure, task success, and so forth.
|
||||
The intent is to make it easy to do things like email
|
||||
notification on build failure.
|
||||
@@ -1337,6 +1337,27 @@
|
||||
the name of the triggered event.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Because you probably are only interested in a subset of events,
|
||||
you would likely use the <filename>[eventmask]</filename> flag
|
||||
for your event handler to be sure that only certain events
|
||||
trigger the handler.
|
||||
Given the previous example, suppose you only wanted the
|
||||
<filename>bb.build.TaskFailed</filename> event to trigger that
|
||||
event handler.
|
||||
Use the flag as follows:
|
||||
<literallayout class='monospaced'>
|
||||
addhandler myclass_eventhandler
|
||||
myclass_eventhandler[eventmask] = "bb.build.TaskFailed"
|
||||
python myclass_eventhandler() {
|
||||
from bb.event import getName
|
||||
from bb import data
|
||||
print("The name of the Event is %s" % getName(e))
|
||||
print("The file we run for is %s" % data.getVar('FILE', e.data, True))
|
||||
}
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
During a standard build, the following common events might occur:
|
||||
<itemizedlist>
|
||||
@@ -1551,11 +1572,11 @@
|
||||
item runtime dependency which must have completed before that
|
||||
task can be executed.
|
||||
<literallayout class='monospaced'>
|
||||
do_package_write[rdeptask] = "do_package"
|
||||
do_package_qa[rdeptask] = "do_packagedata"
|
||||
</literallayout>
|
||||
In the previous example, the <filename>do_package</filename>
|
||||
In the previous example, the <filename>do_packagedata</filename>
|
||||
task of each item in <filename>RDEPENDS</filename> must have
|
||||
completed before <filename>do_package_write</filename> can execute.
|
||||
completed before <filename>do_package_qa</filename> can execute.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
-->
|
||||
|
||||
<copyright>
|
||||
<year>2004-2014</year>
|
||||
<year>2004-2015</year>
|
||||
<holder>Richard Purdie</holder>
|
||||
<holder>Chris Larson</holder>
|
||||
<holder>and Phil Blundell</holder>
|
||||
|
||||
@@ -153,9 +153,14 @@ class BBCooker:
|
||||
self.parser = None
|
||||
|
||||
signal.signal(signal.SIGTERM, self.sigterm_exception)
|
||||
# Let SIGHUP exit as SIGTERM
|
||||
signal.signal(signal.SIGHUP, self.sigterm_exception)
|
||||
|
||||
def sigterm_exception(self, signum, stackframe):
|
||||
bb.warn("Cooker recieved SIGTERM, shutting down...")
|
||||
if signum == signal.SIGTERM:
|
||||
bb.warn("Cooker recieved SIGTERM, shutting down...")
|
||||
elif signum == signal.SIGHUP:
|
||||
bb.warn("Cooker recieved SIGHUP, shutting down...")
|
||||
self.state = state.forceshutdown
|
||||
|
||||
def setFeatures(self, features):
|
||||
|
||||
@@ -219,6 +219,13 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
|
||||
|
||||
val = str(val)
|
||||
|
||||
if varExpanded.startswith("BASH_FUNC_"):
|
||||
varExpanded = varExpanded[10:-2]
|
||||
val = val[3:] # Strip off "() "
|
||||
o.write("%s() %s\n" % (varExpanded, val))
|
||||
o.write("export -f %s\n" % (varExpanded))
|
||||
return 1
|
||||
|
||||
if func:
|
||||
# NOTE: should probably check for unbalanced {} within the var
|
||||
o.write("%s() {\n%s\n}\n" % (varExpanded, val))
|
||||
|
||||
@@ -618,7 +618,7 @@ class DataSmart(MutableMapping):
|
||||
if value and flag == "_content" and local_var is not None and "_removeactive" in local_var:
|
||||
removes = [self.expand(r) for r in local_var["_removeactive"]]
|
||||
filtered = filter(lambda v: v not in removes,
|
||||
value.split(" "))
|
||||
value.split())
|
||||
value = " ".join(filtered)
|
||||
if expand:
|
||||
# We need to ensure the expand cache has the correct value
|
||||
|
||||
@@ -55,6 +55,7 @@ def get_class_handlers():
|
||||
return _handlers
|
||||
|
||||
def set_class_handlers(h):
|
||||
global _handlers
|
||||
_handlers = h
|
||||
|
||||
def clean_class_handlers():
|
||||
|
||||
@@ -339,7 +339,10 @@ class Git(FetchMethod):
|
||||
"""
|
||||
Compute the HEAD revision for the url
|
||||
"""
|
||||
search = "refs/heads/%s refs/tags/%s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name])
|
||||
if ud.unresolvedrev[name][:5] == "refs/":
|
||||
search = "%s %s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name])
|
||||
else:
|
||||
search = "refs/heads/%s refs/tags/%s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name])
|
||||
output = self._lsremote(ud, d, search)
|
||||
return output.split()[0]
|
||||
|
||||
|
||||
@@ -1064,7 +1064,7 @@ class RunQueue:
|
||||
retval = self.rqexe.execute()
|
||||
|
||||
if self.state is runQueueCleanUp:
|
||||
self.rqexe.finish()
|
||||
retval = self.rqexe.finish()
|
||||
|
||||
if (self.state is runQueueComplete or self.state is runQueueFailed) and self.rqexe:
|
||||
self.teardown_workers()
|
||||
@@ -1306,15 +1306,14 @@ class RunQueueExecute:
|
||||
if self.stats.active > 0:
|
||||
bb.event.fire(runQueueExitWait(self.stats.active), self.cfgData)
|
||||
self.rq.read_workers()
|
||||
|
||||
return
|
||||
return self.rq.active_fds()
|
||||
|
||||
if len(self.failed_fnids) != 0:
|
||||
self.rq.state = runQueueFailed
|
||||
return
|
||||
return True
|
||||
|
||||
self.rq.state = runQueueComplete
|
||||
return
|
||||
return True
|
||||
|
||||
def check_dependencies(self, task, taskdeps, setscene = False):
|
||||
if not self.rq.depvalidate:
|
||||
|
||||
@@ -295,10 +295,9 @@ def dump_this_task(outfile, d):
|
||||
bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile")
|
||||
|
||||
def clean_basepath(a):
|
||||
b = a.rsplit("/", 2)[1] + a.rsplit("/", 2)[2]
|
||||
if a.startswith("virtual:"):
|
||||
b = a.rsplit("/", 1)[1] + ":" + a.rsplit(":", 1)[0]
|
||||
else:
|
||||
b = a.rsplit("/", 1)[1]
|
||||
b = b + ":" + a.rsplit(":", 1)[0]
|
||||
return b
|
||||
|
||||
def clean_basepaths(a):
|
||||
|
||||
@@ -979,14 +979,12 @@ class BuildInfoHelper(object):
|
||||
|
||||
log_information = {}
|
||||
log_information['build'] = self.internal_state['build']
|
||||
if event.levelno >= format.ERROR:
|
||||
log_information['level'] = event.levelno
|
||||
if event.levelno == format.ERROR:
|
||||
log_information['level'] = LogMessage.ERROR
|
||||
elif event.levelno == format.WARNING:
|
||||
log_information['level'] = LogMessage.WARNING
|
||||
elif event.levelno == format.INFO:
|
||||
log_information['level'] = LogMessage.INFO
|
||||
else:
|
||||
log_information['level'] = event.levelno
|
||||
log_information['level'] = LogMessage.INFO
|
||||
|
||||
log_information['message'] = event.msg
|
||||
log_information['pathname'] = event.pathname
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: iso-8859-1 -*-
|
||||
#
|
||||
# progressbar - Text progressbar library for python.
|
||||
|
||||
@@ -19,6 +19,7 @@ class PRTable(object):
|
||||
def __init__(self, conn, table, nohist):
|
||||
self.conn = conn
|
||||
self.nohist = nohist
|
||||
self.dirty = False
|
||||
if nohist:
|
||||
self.table = "%s_nohist" % table
|
||||
else:
|
||||
@@ -47,6 +48,11 @@ class PRTable(object):
|
||||
self.conn.commit()
|
||||
self._execute("BEGIN EXCLUSIVE TRANSACTION")
|
||||
|
||||
def sync_if_dirty(self):
|
||||
if self.dirty:
|
||||
self.sync()
|
||||
self.dirty = False
|
||||
|
||||
def _getValueHist(self, version, pkgarch, checksum):
|
||||
data=self._execute("SELECT value FROM %s WHERE version=? AND pkgarch=? AND checksum=?;" % self.table,
|
||||
(version, pkgarch, checksum))
|
||||
@@ -62,6 +68,8 @@ class PRTable(object):
|
||||
except sqlite3.IntegrityError as exc:
|
||||
logger.error(str(exc))
|
||||
|
||||
self.dirty = True
|
||||
|
||||
data=self._execute("SELECT value FROM %s WHERE version=? AND pkgarch=? AND checksum=?;" % self.table,
|
||||
(version, pkgarch, checksum))
|
||||
row=data.fetchone()
|
||||
@@ -89,6 +97,8 @@ class PRTable(object):
|
||||
logger.error(str(exc))
|
||||
self.conn.rollback()
|
||||
|
||||
self.dirty = True
|
||||
|
||||
data=self._execute("SELECT value FROM %s WHERE version=? AND pkgarch=? AND checksum=?;" % self.table,
|
||||
(version, pkgarch, checksum))
|
||||
row=data.fetchone()
|
||||
@@ -118,6 +128,8 @@ class PRTable(object):
|
||||
except sqlite3.IntegrityError as exc:
|
||||
logger.error(str(exc))
|
||||
|
||||
self.dirty = True
|
||||
|
||||
data = self._execute("SELECT value FROM %s WHERE version=? AND pkgarch=? AND checksum=?;" % self.table,
|
||||
(version, pkgarch, checksum))
|
||||
row = data.fetchone()
|
||||
@@ -139,6 +151,8 @@ class PRTable(object):
|
||||
except sqlite3.IntegrityError as exc:
|
||||
logger.error(str(exc))
|
||||
|
||||
self.dirty = True
|
||||
|
||||
data = self._execute("SELECT value FROM %s WHERE version=? AND pkgarch=? AND checksum=? AND value>=?;" % self.table,
|
||||
(version,pkgarch,checksum,value))
|
||||
row=data.fetchone()
|
||||
@@ -221,6 +235,7 @@ class PRData(object):
|
||||
self.connection=sqlite3.connect(self.filename, isolation_level="EXCLUSIVE", check_same_thread = False)
|
||||
self.connection.row_factory=sqlite3.Row
|
||||
self.connection.execute("pragma synchronous = off;")
|
||||
self.connection.execute("PRAGMA journal_mode = WAL;")
|
||||
self._tables={}
|
||||
|
||||
def __del__(self):
|
||||
|
||||
@@ -76,11 +76,19 @@ class PRServer(SimpleXMLRPCServer):
|
||||
In addition, exception handling is done here.
|
||||
|
||||
"""
|
||||
iter_count = 1
|
||||
# With 60 iterations between syncs and a 0.5 second timeout between
|
||||
# iterations, this will sync if dirty every ~30 seconds.
|
||||
iterations_between_sync = 60
|
||||
|
||||
while True:
|
||||
(request, client_address) = self.requestqueue.get()
|
||||
try:
|
||||
self.finish_request(request, client_address)
|
||||
self.shutdown_request(request)
|
||||
iter_count = (iter_count + 1) % iterations_between_sync
|
||||
if iter_count == 0:
|
||||
self.table.sync_if_dirty()
|
||||
except:
|
||||
self.handle_error(request, client_address)
|
||||
self.shutdown_request(request)
|
||||
|
||||
@@ -81,6 +81,11 @@
|
||||
<date>October 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.7 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.7.1</revnumber>
|
||||
<date>January 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.1 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -93,6 +93,11 @@
|
||||
<date>October 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.7 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.7.1</revnumber>
|
||||
<date>January 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.1 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -1351,7 +1351,7 @@
|
||||
<listitem><para>By default, the script creates the new BSP Layer in the
|
||||
current working directory of the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
|
||||
which is <filename>poky</filename> in this case.
|
||||
(i.e. <filename>poky/build</filename>).
|
||||
</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
@@ -2549,7 +2549,7 @@
|
||||
machine or architecture at all (e.g. recipes
|
||||
that simply package script files or configuration
|
||||
files), you should use the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#allarch'><filename>allarch</filename></ulink>
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-allarch'><filename>allarch</filename></ulink>
|
||||
class to do this for you by adding this to your
|
||||
recipe:
|
||||
<literallayout class='monospaced'>
|
||||
@@ -6978,11 +6978,17 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
|
||||
and the testname can be any identifying string.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
A recipe is "ptest-enabled" if it inherits the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-ptest'><filename>ptest</filename></ulink>
|
||||
class.
|
||||
</note>
|
||||
<para>
|
||||
For a list of Yocto Project recipes that are already
|
||||
enabled with ptest, see the
|
||||
<ulink url='https://wiki.yoctoproject.org/wiki/Ptest'>Ptest</ulink>
|
||||
wiki page.
|
||||
<note>
|
||||
A recipe is "ptest-enabled" if it inherits the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-ptest'><filename>ptest</filename></ulink>
|
||||
class.
|
||||
</note>
|
||||
</para>
|
||||
|
||||
<section id='adding-ptest-to-your-build'>
|
||||
<title>Adding ptest to Your Build</title>
|
||||
@@ -7742,8 +7748,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
|
||||
<filename>TEST_TARGET</filename> to an appropriate value.
|
||||
For QEMU, you do not have to change anything, the default
|
||||
value is "QemuTarget".
|
||||
For running tests on hardware, two options exist:
|
||||
"SimpleRemoteTarget" and "GummibootTarget".
|
||||
For running tests on hardware, the following options exist:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>"SimpleRemoteTarget":</emphasis>
|
||||
Choose "SimpleRemoteTarget" if you are going to
|
||||
@@ -7770,6 +7775,45 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
|
||||
"<link linkend='selecting-gummiboottarget'>Selecting GummibootTarget</link>"
|
||||
section, which follows, for more information.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>"BeagleBoneTarget":</emphasis>
|
||||
Choose "BeagleBoneTarget" if you are deploying
|
||||
images and running tests on the BeagleBone
|
||||
"Black" or original "White" hardware.
|
||||
For information on how to use these tests, see the
|
||||
comments at the top of the BeagleBoneTarget
|
||||
<filename>meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py</filename>
|
||||
file.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>"EdgeRouterTarget":</emphasis>
|
||||
Choose "EdgeRouterTarget" is you are deploying
|
||||
images and running tests on the Ubiquiti Networks
|
||||
EdgeRouter Lite.
|
||||
For information on how to use these tests, see the
|
||||
comments at the top of the EdgeRouterTarget
|
||||
<filename>meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py</filename>
|
||||
file.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>"GrubTarget":</emphasis>
|
||||
Choose the "supports deploying images and running
|
||||
tests on any generic PC that boots using GRUB.
|
||||
For information on how to use these tests, see the
|
||||
comments at the top of the GrubTarget
|
||||
<filename>meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py</filename>
|
||||
file.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>"<replaceable>your-target</replaceable>":</emphasis>
|
||||
Create your own custom target if you want to run
|
||||
tests when you are deploying images and running
|
||||
tests on a custom machine within your BSP layer.
|
||||
To do this, you need to add a Python unit that
|
||||
defines the target class under
|
||||
<filename>lib/oeqa/controllers/</filename> within
|
||||
your layer.
|
||||
You must also provide an empty
|
||||
<filename>__init__.py</filename>.
|
||||
For examples, see files in
|
||||
<filename>meta-yocto-bsp/lib/oeqa/controllers/</filename>.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
@@ -7880,10 +7924,14 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
|
||||
</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='power-control'>
|
||||
<title>Power Control</title>
|
||||
|
||||
<para>
|
||||
Here is some additional information regarding running
|
||||
"GummibootTarget" as your test target:
|
||||
For most hardware targets other than SimpleRemoteTarget,
|
||||
you can control power:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
You can use
|
||||
@@ -7928,6 +7976,63 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
|
||||
some manual interaction is okay from time to time.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
If you have no hardware to automatically perform power
|
||||
control but still wish to experiment with automated
|
||||
hardware testing, you can use the dialog-power-control
|
||||
script that shows a dialog prompting you to perform the
|
||||
required power action.
|
||||
This script requires either KDialog or Zenity to be
|
||||
installed.
|
||||
To use this script, set the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_POWERCONTROL_CMD'><filename>TEST_POWERCONTROL_CMD</filename></ulink>
|
||||
variable as follows:
|
||||
<literallayout class='monospaced'>
|
||||
TEST_POWERCONTROL_CMD = "${COREBASE}/scripts/contrib/dialog-power-control"
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='serial-console-connection'>
|
||||
<title>Serial Console Connection</title>
|
||||
|
||||
<para>
|
||||
For test target classes requiring a serial console
|
||||
to interact with the bootloader (e.g. BeagleBoneTarget,
|
||||
EdgeRouterTarget, and GrubTarget), you need to
|
||||
specify a command to use to connect to the serial console
|
||||
of the target machine by using the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_POWERCONTROL_CMD'><filename>TEST_POWERCONTROL_CMD</filename></ulink>
|
||||
variable and optionally the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_SERIALCONTROL_EXTRA_ARGS'><filename>TEST_SERIALCONTROL_EXTRA_ARGS</filename></ulink>
|
||||
variable.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
These cases could be a serial terminal program if the
|
||||
machine is connected to a local serial port, or a
|
||||
<filename>telnet</filename> or
|
||||
<filename>ssh</filename> command connecting to a remote
|
||||
console server.
|
||||
Regardless of the case, the command simply needs to
|
||||
connect to the serial console and forward that connection
|
||||
to standard input and output as any normal terminal
|
||||
program does.
|
||||
For example, to use the picocom terminal program on
|
||||
serial device <filename>/dev/ttyUSB0</filename>
|
||||
at 115200bps, you would set the variable as follows:
|
||||
<literallayout class='monospaced'>
|
||||
TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
|
||||
</literallayout>
|
||||
For local devices where the serial port device disappears
|
||||
when the device reboots, an additional "serdevtry" wrapper
|
||||
script is provided.
|
||||
To use this wrapper, simply prefix the terminal command
|
||||
with
|
||||
<filename>${COREBASE}/scripts/contrib/serdevtry</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
TEST_SERIALCONTROL_CMD = "${COREBASE}/scripts/contrib/serdevtry picocom -b
|
||||
115200 /dev/ttyUSB0"
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -71,6 +71,11 @@
|
||||
<date>October 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.7 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.7.1</revnumber>
|
||||
<date>January 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.1 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -56,6 +56,11 @@
|
||||
<date>October 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.7 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.7.1</revnumber>
|
||||
<date>January 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.1 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<!ENTITY DISTRO "1.7">
|
||||
<!ENTITY DISTRO_COMPRESSED "17">
|
||||
<!ENTITY DISTRO "1.7.1">
|
||||
<!ENTITY DISTRO_COMPRESSED "171">
|
||||
<!ENTITY DISTRO_NAME "dizzy">
|
||||
<!ENTITY YOCTO_DOC_VERSION "1.7">
|
||||
<!ENTITY POKYVERSION "12.0.0">
|
||||
<!ENTITY POKYVERSION_COMPRESSED "1100">
|
||||
<!ENTITY YOCTO_DOC_VERSION "1.7.1">
|
||||
<!ENTITY POKYVERSION "12.0.1">
|
||||
<!ENTITY POKYVERSION_COMPRESSED "1201">
|
||||
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
|
||||
<!ENTITY COPYRIGHT_YEAR "2010-2014">
|
||||
<!ENTITY COPYRIGHT_YEAR "2010-2015">
|
||||
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
|
||||
<!ENTITY YOCTO_HOME_URL "http://www.yoctoproject.org">
|
||||
<!ENTITY YOCTO_LISTS_URL "http://lists.yoctoproject.org">
|
||||
@@ -14,7 +14,7 @@
|
||||
<!ENTITY YOCTO_AB_URL "http://autobuilder.yoctoproject.org">
|
||||
<!ENTITY YOCTO_GIT_URL "http://git.yoctoproject.org">
|
||||
<!ENTITY YOCTO_ADTREPO_URL "http://adtrepo.yoctoproject.org">
|
||||
<!ENTITY YOCTO_RELEASE_NOTES "&YOCTO_HOME_URL;/download/yocto-project-&DISTRO_COMPRESSED;-poky-&POKYVERSION_COMPRESSED;">
|
||||
<!ENTITY YOCTO_RELEASE_NOTES "&YOCTO_HOME_URL;/downloads/core/&DISTRO_NAME;&DISTRO_COMPRESSED;">
|
||||
<!ENTITY OE_HOME_URL "http://www.openembedded.org">
|
||||
<!ENTITY OE_LISTS_URL "http://lists.openembedded.org/mailman">
|
||||
<!ENTITY OE_DOCS_URL "http://docs.openembedded.org">
|
||||
|
||||
@@ -842,7 +842,7 @@
|
||||
idea. One of the first projects to do this was IBM's DProbes
|
||||
dpcc compiler, an ANSI C compiler which targeted a low-level
|
||||
assembly language running on an in-kernel interpreter on the
|
||||
target system. This is exactly analagous to what Sun's DTrace
|
||||
target system. This is exactly analogous to what Sun's DTrace
|
||||
did, except that DTrace invented its own language for the purpose.
|
||||
Systemtap, heavily inspired by DTrace, also created its own
|
||||
one-off language, but rather than running the product on an
|
||||
@@ -1275,7 +1275,7 @@
|
||||
</para>
|
||||
|
||||
<informalexample>
|
||||
<emphasis>Tying it Together:</emphasis> The trace events subsystem accomodate static
|
||||
<emphasis>Tying it Together:</emphasis> The trace events subsystem accommodate static
|
||||
and dynamic tracepoints in exactly the same way - there's no
|
||||
difference as far as the infrastructure is concerned. See the
|
||||
ftrace section for more details on the trace event subsystem.
|
||||
@@ -3257,15 +3257,25 @@
|
||||
<title>Documentation</title>
|
||||
|
||||
<para>
|
||||
There doesn't seem to be any current documentation covering
|
||||
LTTng 2.0, but maybe that's because the project is in transition.
|
||||
The LTTng 2.0 website, however, is here:
|
||||
<ulink url='http://lttng.org/lttng2.0'>LTTng Project</ulink>
|
||||
You can find the primary LTTng Documentation on the
|
||||
<ulink url='https://lttng.org/docs/'>LTTng Documentation</ulink>
|
||||
site.
|
||||
The documentation on this site is appropriate for intermediate to
|
||||
advanced software developers who are working in a Linux environment
|
||||
and are interested in efficient software tracing.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can access extensive help information on how to use the
|
||||
LTTng plug-in to search and analyze captured traces via the
|
||||
For information on LTTng in general, visit the
|
||||
<ulink url='http://lttng.org/lttng2.0'>LTTng Project</ulink>
|
||||
site.
|
||||
You can find a "Getting Started" link on this site that takes
|
||||
you to an LTTng Quick Start.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Finally, you can access extensive help information on how to use
|
||||
the LTTng plug-in to search and analyze captured traces via the
|
||||
Eclipse help system:
|
||||
<literallayout class='monospaced'>
|
||||
Help | Help Contents | LTTng Plug-in User Guide
|
||||
|
||||
@@ -56,6 +56,11 @@
|
||||
<date>October 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.7 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.7.1</revnumber>
|
||||
<date>January 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.1 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -168,6 +168,8 @@
|
||||
<listitem><para>Debian GNU/Linux 7.2 (Wheezy)</para></listitem>
|
||||
<listitem><para>Debian GNU/Linux 7.3 (Wheezy)</para></listitem>
|
||||
<listitem><para>Debian GNU/Linux 7.4 (Wheezy)</para></listitem>
|
||||
<listitem><para>Debian GNU/Linux 7.5 (Wheezy)</para></listitem>
|
||||
<listitem><para>Debian GNU/Linux 7.6 (Wheezy)</para></listitem>
|
||||
<!-- <listitem><para>openSUSE 11.4</para></listitem>
|
||||
<listitem><para>openSUSE 12.1</para></listitem> -->
|
||||
<listitem><para>openSUSE 12.2</para></listitem>
|
||||
|
||||
@@ -1701,6 +1701,45 @@
|
||||
Yocto Project 1.7 Release from the prior release.
|
||||
</para>
|
||||
|
||||
<section id='migration-1.7-changes-to-setting-qemu-packageconfig-options'>
|
||||
<title>Changes to Setting QEMU <filename>PACKAGECONFIG</filename> Options in <filename>local.conf</filename></title>
|
||||
|
||||
<para>
|
||||
The QEMU recipe now uses a number of
|
||||
<link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
|
||||
options to enable various optional features.
|
||||
The method used to set defaults for these options means that
|
||||
existing
|
||||
<filename>local.conf</filename> files will need to be be
|
||||
modified to append to <filename>PACKAGECONFIG</filename> for
|
||||
<filename>qemu-native</filename> and
|
||||
<filename>nativesdk-qemu</filename> instead of setting it.
|
||||
In other words, to enable graphical output for QEMU, you should
|
||||
now have these lines in <filename>local.conf</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
PACKAGECONFIG_append_pn-qemu-native = " sdl"
|
||||
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='migration-1.7-minimum-git-version'>
|
||||
<title>Minimum Git version</title>
|
||||
|
||||
<para>
|
||||
The minimum
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> version required
|
||||
on the build host is now 1.7.8 because the
|
||||
<filename>‐‐list</filename> option is now required by
|
||||
BitBake's Git fetcher.
|
||||
As always, if your host distribution does not provide a version of
|
||||
Git that meets this requirement, you can use the
|
||||
<filename>buildtools-tarball</filename> that does.
|
||||
See the
|
||||
"<link linkend='required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</link>"
|
||||
section for more information.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='migration-1.7-autotools-class-changes'>
|
||||
<title>Autotools Class Changes</title>
|
||||
@@ -1859,61 +1898,6 @@
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='migration-1.7-removed-recipes'>
|
||||
<title>Removed Recipes</title>
|
||||
|
||||
<para>
|
||||
The following recipes have been removed:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<filename>x-load</filename>:
|
||||
This recipe has been superseded by
|
||||
U-boot SPL for all Cortex-based TI SoCs.
|
||||
For legacy boards, the <filename>meta-ti</filename>
|
||||
layer, which contains a maintained recipe, should be used
|
||||
instead.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<filename>ubootchart</filename>:
|
||||
This recipe is obsolete.
|
||||
A <filename>bootchart2</filename> recipe has been added
|
||||
to functionally replace it.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<filename>linux-yocto 3.4</filename>:
|
||||
Support for the linux-yocto 3.4 kernel has been dropped.
|
||||
Support for the 3.10 and 3.14 kernels remains, while
|
||||
support for version 3.17 has been added.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<filename>eglibc</filename> has been removed in favor of
|
||||
<filename>glibc</filename>.
|
||||
See the
|
||||
"<link linkend='migration-1.7-glibc-replaces-eglibc'><filename>eglibc 2.19</filename> Replaced with <filename>glibc 2.20</filename></link>"
|
||||
section for more information.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='migration-1.7-minimum-git-version'>
|
||||
<title>Minimum Git version</title>
|
||||
|
||||
<para>
|
||||
The minimum
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> version required
|
||||
on the build host is now 1.7.8 because the
|
||||
<filename>‐‐list</filename> option is now required by
|
||||
BitBake's Git fetcher.
|
||||
As always, if your host distribution does not provide a version of
|
||||
Git that meets this requirement, you can use the
|
||||
<filename>buildtools-tarball</filename> that does.
|
||||
See the
|
||||
"<link linkend='required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</link>"
|
||||
section for more information.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='migration-1.7-qa-check-changes'>
|
||||
<title>QA Check Changes</title>
|
||||
|
||||
@@ -1951,7 +1935,55 @@
|
||||
Recipes should not be overwriting files written to the
|
||||
sysroot by other recipes.
|
||||
If you have these types of recipes, you need to alter them
|
||||
so that they do not overwrite these files.
|
||||
so that they do not overwrite these files.</para>
|
||||
<para>You might now receive this error after changes in
|
||||
configuration or metadata resulting in orphaned files
|
||||
being left in the sysroot.
|
||||
If you do receive this error, the way to resolve the issue
|
||||
is to delete your
|
||||
<link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
|
||||
or to move it out of the way and then re-start the build.
|
||||
Anything that has been fully built up to that point and
|
||||
does not need rebuilding will be restored from the shared
|
||||
state cache and the rest of the build will be able to
|
||||
proceed as normal.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='migration-1.7-removed-recipes'>
|
||||
<title>Removed Recipes</title>
|
||||
|
||||
<para>
|
||||
The following recipes have been removed:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<filename>x-load</filename>:
|
||||
This recipe has been superseded by
|
||||
U-boot SPL for all Cortex-based TI SoCs.
|
||||
For legacy boards, the <filename>meta-ti</filename>
|
||||
layer, which contains a maintained recipe, should be used
|
||||
instead.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<filename>ubootchart</filename>:
|
||||
This recipe is obsolete.
|
||||
A <filename>bootchart2</filename> recipe has been added
|
||||
to functionally replace it.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<filename>linux-yocto 3.4</filename>:
|
||||
Support for the linux-yocto 3.4 kernel has been dropped.
|
||||
Support for the 3.10 and 3.14 kernels remains, while
|
||||
support for version 3.17 has been added.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<filename>eglibc</filename> has been removed in favor of
|
||||
<filename>glibc</filename>.
|
||||
See the
|
||||
"<link linkend='migration-1.7-glibc-replaces-eglibc'><filename>eglibc 2.19</filename> Replaced with <filename>glibc 2.20</filename></link>"
|
||||
section for more information.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
@@ -87,6 +87,11 @@
|
||||
<date>October 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.7 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.7.1</revnumber>
|
||||
<date>January 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.1 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -9122,6 +9122,37 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id='var-TEST_POWERCONTROL_CMD'><glossterm>TEST_POWERCONTROL_CMD</glossterm>
|
||||
<glossdef>
|
||||
<para>
|
||||
For automated hardware testing, specifies the command to
|
||||
use to control the power of the target machine under test.
|
||||
Typically, this command would point to a script that
|
||||
performs the appropriate action (e.g. interacting
|
||||
with a web-enabled power strip).
|
||||
The specified command should expect to receive as the last
|
||||
argument "off", "on" or "cycle" specifying to power off,
|
||||
on, or cycle (power off and then power on) the device,
|
||||
respectively.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id='var-TEST_POWERCONTROL_EXTRA_ARGS'><glossterm>TEST_POWERCONTROL_EXTRA_ARGS</glossterm>
|
||||
<glossdef>
|
||||
<para>
|
||||
For automated hardware testing, specifies additional
|
||||
arguments to pass through to the command specified in
|
||||
<link linkend='var-TEST_POWERCONTROL_CMD'><filename>TEST_POWERCONTROL_CMD</filename></link>.
|
||||
Setting <filename>TEST_POWERCONTROL_EXTRA_ARGS</filename>
|
||||
is optional.
|
||||
You can use it if you wish, for example, to separate the
|
||||
machine-specific and non-machine-specific parts of the
|
||||
arguments.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id='var-TEST_QEMUBOOT_TIMEOUT'><glossterm>TEST_QEMUBOOT_TIMEOUT</glossterm>
|
||||
<glossdef>
|
||||
<para>
|
||||
@@ -9142,6 +9173,43 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id='var-TEST_SERIALCONTROL_CMD'><glossterm>TEST_SERIALCONTROL_CMD</glossterm>
|
||||
<glossdef>
|
||||
<para>
|
||||
For automated hardware testing, specifies the command
|
||||
to use to connect to the serial console of the target
|
||||
machine under test.
|
||||
This command simply needs to connect to the serial console
|
||||
and forward that connection to standard input and output
|
||||
as any normal terminal program does.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For example, to use the Picocom terminal program on
|
||||
serial device <filename>/dev/ttyUSB0</filename> at
|
||||
115200bps, you would set the variable as follows:
|
||||
<literallayout class='monospaced'>
|
||||
TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
|
||||
</literallayout>
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id='var-TEST_SERIALCONTROL_EXTRA_ARGS'><glossterm>TEST_SERIALCONTROL_EXTRA_ARGS</glossterm>
|
||||
<glossdef>
|
||||
<para>
|
||||
For automated hardware testing, specifies additional
|
||||
arguments to pass through to the command specified in
|
||||
<link linkend='var-TEST_SERIALCONTROL_CMD'><filename>TEST_SERIALCONTROL_CMD</filename></link>.
|
||||
Setting <filename>TEST_SERIALCONTROL_EXTRA_ARGS</filename>
|
||||
is optional.
|
||||
You can use it if you wish, for example, to separate the
|
||||
machine-specific and non-machine-specific parts of the
|
||||
command.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id='var-TEST_SERVER_IP'><glossterm>TEST_SERVER_IP</glossterm>
|
||||
<glossdef>
|
||||
<para>
|
||||
|
||||
@@ -2,30 +2,30 @@
|
||||
# This style is for manual folders like "yocto-project-qs" and "poky-ref-manual".
|
||||
# This is the old way that did it. Can't do that now that we have "bitbake-user-manual" strings
|
||||
# in the mega-manual.
|
||||
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
|
||||
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
|
||||
|
||||
# Processes all other manuals (<word>-<word> style) except for the BitBake User Manual because
|
||||
# it is not included in the mega-manual.
|
||||
# This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual").
|
||||
# This was the one-liner that worked before we introduced the BitBake User Manual, which is
|
||||
# not in the mega-manual.
|
||||
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/adt-manual\/adt-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/adt-manual\/adt-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
|
||||
|
||||
# Process cases where just an external manual is referenced without an id anchor
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.1\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
DISTRO_VERSION = "1.7"
|
||||
DISTRO_VERSION = "1.7.1"
|
||||
DISTRO_CODENAME = "dizzy"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
|
||||
@@ -91,6 +91,7 @@ SANITY_TESTED_DISTROS ?= " \
|
||||
Debian-7.4 \n \
|
||||
Debian-7.5 \n \
|
||||
Debian-7.6 \n \
|
||||
Debian-7.7 \n \
|
||||
SUSE-LINUX-12.2 \n \
|
||||
openSUSE-project-12.3 \n \
|
||||
openSUSE-project-13.1 \n \
|
||||
|
||||
@@ -9,10 +9,11 @@ addtask configure after do_unpack do_patch before do_compile
|
||||
|
||||
inherit terminal
|
||||
|
||||
OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES TERMINFO"
|
||||
OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO CROSS_CURSES_LIB CROSS_CURSES_INC"
|
||||
HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
|
||||
HOSTLDFLAGS = "${BUILD_LDFLAGS}"
|
||||
HOST_LOADLIBES = "-lncurses"
|
||||
CROSS_CURSES_LIB = "-lncurses -ltinfo"
|
||||
CROSS_CURSES_INC = '-DCURSES_LOC="<curses.h>"'
|
||||
TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
|
||||
|
||||
python do_menuconfig() {
|
||||
|
||||
@@ -29,7 +29,7 @@ DOC_DECOMPRESS_CMD[gz] ?= 'gunzip -v'
|
||||
DOC_DECOMPRESS_CMD[bz2] ?= "bunzip2 -v"
|
||||
DOC_DECOMPRESS_CMD[xz] ?= "unxz -v"
|
||||
|
||||
PACKAGE_PREPROCESS_FUNCS += "package_do_compress_doc"
|
||||
PACKAGE_PREPROCESS_FUNCS += "package_do_compress_doc compress_doc_updatealternatives"
|
||||
python package_do_compress_doc() {
|
||||
compress_mode = d.getVar('DOC_COMPRESS', True)
|
||||
compress_list = (d.getVar('DOC_COMPRESS_LIST', True) or '').split()
|
||||
@@ -211,3 +211,46 @@ def decompress_doc(topdir, compress_mode, decompress_cmds):
|
||||
|
||||
_process_hardlink(hardlink_dict, compress_mode, decompress_cmds, decompress)
|
||||
|
||||
python compress_doc_updatealternatives () {
|
||||
if not bb.data.inherits_class('update-alternatives', d):
|
||||
return
|
||||
|
||||
mandir = d.getVar("mandir", True)
|
||||
infodir = d.getVar("infodir", True)
|
||||
compress_mode = d.getVar('DOC_COMPRESS', True)
|
||||
for pkg in (d.getVar('PACKAGES', True) or "").split():
|
||||
old_names = (d.getVar('ALTERNATIVE_%s' % pkg, True) or "").split()
|
||||
new_names = []
|
||||
for old_name in old_names:
|
||||
old_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', old_name, True)
|
||||
old_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, old_name, True) or \
|
||||
d.getVarFlag('ALTERNATIVE_TARGET', old_name, True) or \
|
||||
d.getVar('ALTERNATIVE_TARGET_%s' % pkg, True) or \
|
||||
d.getVar('ALTERNATIVE_TARGET', True) or \
|
||||
old_link
|
||||
# Sometimes old_target is specified as relative to the link name.
|
||||
old_target = os.path.join(os.path.dirname(old_link), old_target)
|
||||
|
||||
# The updatealternatives used for compress doc
|
||||
if mandir in old_target or infodir in old_target:
|
||||
new_name = old_name + '.' + compress_mode
|
||||
new_link = old_link + '.' + compress_mode
|
||||
new_target = old_target + '.' + compress_mode
|
||||
d.delVarFlag('ALTERNATIVE_LINK_NAME', old_name)
|
||||
d.setVarFlag('ALTERNATIVE_LINK_NAME', new_name, new_link)
|
||||
if d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, old_name, True):
|
||||
d.delVarFlag('ALTERNATIVE_TARGET_%s' % pkg, old_name)
|
||||
d.setVarFlag('ALTERNATIVE_TARGET_%s' % pkg, new_name, new_target)
|
||||
elif d.getVarFlag('ALTERNATIVE_TARGET', old_name, True):
|
||||
d.delVarFlag('ALTERNATIVE_TARGET', old_name)
|
||||
d.setVarFlag('ALTERNATIVE_TARGET', new_name, new_target)
|
||||
elif d.getVar('ALTERNATIVE_TARGET_%s' % pkg, True):
|
||||
d.setVar('ALTERNATIVE_TARGET_%s' % pkg, new_target)
|
||||
elif d.getVar('ALTERNATIVE_TARGET', old_name, True):
|
||||
d.setVar('ALTERNATIVE_TARGET', new_target)
|
||||
|
||||
new_names.append(new_name)
|
||||
|
||||
if new_names:
|
||||
d.setVar('ALTERNATIVE_%s' % pkg, ' '.join(new_names))
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ mklibs_optimize_image_doit() {
|
||||
> ${WORKDIR}/mklibs/executables.list
|
||||
|
||||
case ${TARGET_ARCH} in
|
||||
powerpc | mips | microblaze )
|
||||
powerpc | mips | mipsel | microblaze )
|
||||
dynamic_loader="${base_libdir}/ld.so.1"
|
||||
;;
|
||||
powerpc64)
|
||||
|
||||
@@ -145,17 +145,6 @@ python () {
|
||||
|
||||
d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features)))
|
||||
|
||||
# Ensure we have the vendor list for complementary package handling
|
||||
ml_vendor_list = ""
|
||||
multilibs = d.getVar('MULTILIBS', True) or ""
|
||||
for ext in multilibs.split():
|
||||
eext = ext.split(':')
|
||||
if len(eext) > 1 and eext[0] == 'multilib':
|
||||
localdata = bb.data.createCopy(d)
|
||||
vendor = localdata.getVar("TARGET_VENDOR_virtclass-multilib-" + eext[1], False)
|
||||
ml_vendor_list += " " + vendor
|
||||
d.setVar('MULTILIB_VENDORS', ml_vendor_list)
|
||||
|
||||
check_image_features(d)
|
||||
initramfs_image = d.getVar('INITRAMFS_IMAGE', True) or ""
|
||||
if initramfs_image != "":
|
||||
@@ -186,7 +175,9 @@ IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
|
||||
|
||||
LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS', True).split()))}"
|
||||
|
||||
PSEUDO_PASSWD = "${IMAGE_ROOTFS}"
|
||||
# Prefer image, but use the fallback files for lookups if the image ones
|
||||
# aren't yet available.
|
||||
PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}"
|
||||
|
||||
do_rootfs[dirs] = "${TOPDIR}"
|
||||
do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock"
|
||||
@@ -419,6 +410,7 @@ do_compile[noexec] = "1"
|
||||
do_install[noexec] = "1"
|
||||
do_populate_sysroot[noexec] = "1"
|
||||
do_package[noexec] = "1"
|
||||
do_package_qa[noexec] = "1"
|
||||
do_packagedata[noexec] = "1"
|
||||
do_package_write_ipk[noexec] = "1"
|
||||
do_package_write_deb[noexec] = "1"
|
||||
|
||||
@@ -70,7 +70,11 @@ IMAGE_CMD_cpio () {
|
||||
(cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
|
||||
if [ ! -e ${IMAGE_ROOTFS}/init ]; then
|
||||
mkdir -p ${WORKDIR}/cpio_append
|
||||
touch ${WORKDIR}/cpio_append/init
|
||||
if [ -e ${IMAGE_ROOTFS}/sbin/init -o -L ${IMAGE_ROOTFS}/sbin/init ]; then
|
||||
ln -sf /sbin/init ${WORKDIR}/cpio_append/init
|
||||
else
|
||||
touch ${WORKDIR}/cpio_append/init
|
||||
fi
|
||||
(cd ${WORKDIR}/cpio_append && echo ./init | cpio -oA -H newc -F ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
|
||||
fi
|
||||
}
|
||||
@@ -97,6 +101,8 @@ IMAGE_CMD_ubi () {
|
||||
mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}
|
||||
ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg
|
||||
}
|
||||
IMAGE_TYPEDEP_ubi = "ubifs"
|
||||
|
||||
IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}"
|
||||
|
||||
EXTRA_IMAGECMD = ""
|
||||
|
||||
@@ -212,7 +212,7 @@ do_kernel_checkout() {
|
||||
machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
|
||||
git show-ref --quiet --verify -- "refs/heads/${machine_branch}"
|
||||
if [ $? -eq 0 ]; then
|
||||
machine_branch = "master"
|
||||
machine_branch="master"
|
||||
fi
|
||||
|
||||
# checkout and clobber any unimportant files
|
||||
|
||||
@@ -213,6 +213,7 @@ kernel_do_install() {
|
||||
#
|
||||
kerneldir=${D}${KERNEL_SRC_PATH}
|
||||
install -d $kerneldir
|
||||
mkdir -p ${D}/lib/modules/${KERNEL_VERSION}
|
||||
ln -sf ${KERNEL_SRC_PATH} "${D}/lib/modules/${KERNEL_VERSION}/build"
|
||||
|
||||
#
|
||||
@@ -390,7 +391,7 @@ python split_kernel_packages () {
|
||||
|
||||
do_strip() {
|
||||
if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then
|
||||
if [[ "${KERNEL_IMAGETYPE}" != "vmlinux" ]]; then
|
||||
if [ "${KERNEL_IMAGETYPE}" != "vmlinux" ]; then
|
||||
bbwarn "image type will not be stripped (not supported): ${KERNEL_IMAGETYPE}"
|
||||
return
|
||||
fi
|
||||
|
||||
@@ -274,9 +274,16 @@ def return_spdx(d, license):
|
||||
def canonical_license(d, license):
|
||||
"""
|
||||
Return the canonical (SPDX) form of the license if available (so GPLv3
|
||||
becomes GPL-3.0), or the passed license if there is no canonical form.
|
||||
becomes GPL-3.0), for the license named 'X+', return canonical form of
|
||||
'X' if availabel and the tailing '+' (so GPLv3+ becomes GPL-3.0+),
|
||||
or the passed license if there is no canonical form.
|
||||
"""
|
||||
return d.getVarFlag('SPDXLICENSEMAP', license, True) or license
|
||||
lic = d.getVarFlag('SPDXLICENSEMAP', license, True) or ""
|
||||
if not lic and license.endswith('+'):
|
||||
lic = d.getVarFlag('SPDXLICENSEMAP', license.rstrip('+'), True)
|
||||
if lic:
|
||||
lic += '+'
|
||||
return lic or license
|
||||
|
||||
def incompatible_license(d, dont_want_licenses, package=None):
|
||||
"""
|
||||
|
||||
@@ -60,7 +60,7 @@ def base_get_metadata_svn_revision(path, d):
|
||||
try:
|
||||
with open("%s/.svn/entries" % path) as f:
|
||||
revision = f.readlines()[3].strip()
|
||||
except IOError, IndexError:
|
||||
except (IOError, IndexError):
|
||||
pass
|
||||
return revision
|
||||
|
||||
|
||||
@@ -21,6 +21,9 @@ python multilib_virtclass_handler () {
|
||||
if bb.data.inherits_class('image', e.data):
|
||||
e.data.setVar("MLPREFIX", variant + "-")
|
||||
e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
|
||||
target_vendor = e.data.getVar("TARGET_VENDOR_" + "virtclass-multilib-" + variant, False)
|
||||
if target_vendor:
|
||||
e.data.setVar("TARGET_VENDOR", target_vendor)
|
||||
return
|
||||
|
||||
if bb.data.inherits_class('cross-canadian', e.data):
|
||||
@@ -60,6 +63,7 @@ python multilib_virtclass_handler () {
|
||||
newtune = e.data.getVar("DEFAULTTUNE_" + "virtclass-multilib-" + variant, False)
|
||||
if newtune:
|
||||
e.data.setVar("DEFAULTTUNE", newtune)
|
||||
e.data.setVar('DEFAULTTUNE_ML_%s' % variant, newtune)
|
||||
}
|
||||
|
||||
addhandler multilib_virtclass_handler
|
||||
|
||||
@@ -208,16 +208,18 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
|
||||
else:
|
||||
the_files.append(aux_files_pattern_verbatim % m.group(1))
|
||||
d.setVar('FILES_' + pkg, " ".join(the_files))
|
||||
if extra_depends != '':
|
||||
d.appendVar('RDEPENDS_' + pkg, ' ' + extra_depends)
|
||||
d.setVar('DESCRIPTION_' + pkg, description % on)
|
||||
d.setVar('SUMMARY_' + pkg, summary % on)
|
||||
if postinst:
|
||||
d.setVar('pkg_postinst_' + pkg, postinst)
|
||||
if postrm:
|
||||
d.setVar('pkg_postrm_' + pkg, postrm)
|
||||
else:
|
||||
d.setVar('FILES_' + pkg, oldfiles + " " + newfile)
|
||||
if extra_depends != '':
|
||||
d.appendVar('RDEPENDS_' + pkg, ' ' + extra_depends)
|
||||
if not d.getVar('DESCRIPTION_' + pkg, True):
|
||||
d.setVar('DESCRIPTION_' + pkg, description % on)
|
||||
if not d.getVar('SUMMARY_' + pkg, True):
|
||||
d.setVar('SUMMARY_' + pkg, summary % on)
|
||||
if postinst:
|
||||
d.setVar('pkg_postinst_' + pkg, postinst)
|
||||
if postrm:
|
||||
d.setVar('pkg_postrm_' + pkg, postrm)
|
||||
if callable(hook):
|
||||
hook(f, pkg, file_regex, output_pattern, m.group(1))
|
||||
|
||||
@@ -1554,6 +1556,8 @@ python package_do_shlibs() {
|
||||
if len(dep_pkg) == 2:
|
||||
lib_ver = dep_pkg[1]
|
||||
dep_pkg = dep_pkg[0]
|
||||
if l not in shlib_provider:
|
||||
shlib_provider[l] = {}
|
||||
shlib_provider[l][libdir] = (dep_pkg, lib_ver)
|
||||
|
||||
libsearchpath = [d.getVar('libdir', True), d.getVar('base_libdir', True)]
|
||||
|
||||
@@ -44,11 +44,14 @@ python errorreport_handler () {
|
||||
task = e.task
|
||||
taskdata={}
|
||||
log = e.data.getVar('BB_LOGFILE', True)
|
||||
logFile = open(log, 'r')
|
||||
taskdata['package'] = e.data.expand("${PF}")
|
||||
taskdata['task'] = task
|
||||
taskdata['log'] = logFile.read()
|
||||
logFile.close()
|
||||
if log:
|
||||
logFile = open(log, 'r')
|
||||
taskdata['log'] = logFile.read()
|
||||
logFile.close()
|
||||
else:
|
||||
taskdata['log'] = "No Log"
|
||||
jsondata = json.loads(errorreport_getdata(e))
|
||||
jsondata['failures'].append(taskdata)
|
||||
errorreport_savedata(e, jsondata, "error-report.txt")
|
||||
|
||||
@@ -97,3 +97,15 @@ do_rm_work_all () {
|
||||
}
|
||||
do_rm_work_all[recrdeptask] = "do_rm_work"
|
||||
addtask rm_work_all after do_rm_work
|
||||
|
||||
do_populate_sdk[postfuncs] += "rm_work_populatesdk"
|
||||
rm_work_populatesdk () {
|
||||
:
|
||||
}
|
||||
rm_work_populatesdk[cleandirs] = "${WORKDIR}/sdk"
|
||||
|
||||
do_rootfs[postfuncs] += "rm_work_rootfs"
|
||||
rm_work_rootfs () {
|
||||
:
|
||||
}
|
||||
rm_work_rootfs[cleandirs] = "${WORKDIR}/rootfs"
|
||||
|
||||
@@ -18,13 +18,13 @@ siteconfig_do_siteconfig_gencache () {
|
||||
>${WORKDIR}/site_config_${MACHINE}/configure.ac
|
||||
cd ${WORKDIR}/site_config_${MACHINE}
|
||||
autoconf
|
||||
rm -f ${PN}_cache
|
||||
CONFIG_SITE="" ${EXTRASITECONFIG} ./configure ${CONFIGUREOPTS} --cache-file ${PN}_cache
|
||||
rm -f ${BPN}_cache
|
||||
CONFIG_SITE="" ${EXTRASITECONFIG} ./configure ${CONFIGUREOPTS} --cache-file ${BPN}_cache
|
||||
sed -n -e "/ac_cv_c_bigendian/p" -e "/ac_cv_sizeof_/p" \
|
||||
-e "/ac_cv_type_/p" -e "/ac_cv_header_/p" -e "/ac_cv_func_/p" \
|
||||
< ${PN}_cache > ${PN}_config
|
||||
< ${BPN}_cache > ${BPN}_config
|
||||
mkdir -p ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
|
||||
cp ${PN}_config ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
|
||||
cp ${BPN}_config ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -143,10 +143,7 @@ python systemd_populate_packages() {
|
||||
if has_exactly_one_service:
|
||||
has_exactly_one_service = len(get_package_var(d, 'SYSTEMD_SERVICE', systemd_packages).split()) == 1
|
||||
|
||||
keys = 'Also' # Conflicts??
|
||||
if has_exactly_one_service:
|
||||
# single service gets also the /dev/null dummies
|
||||
keys = 'Also Conflicts'
|
||||
keys = 'Also'
|
||||
# scan for all in SYSTEMD_SERVICE[]
|
||||
for pkg_systemd in systemd_packages.split():
|
||||
for service in get_package_var(d, 'SYSTEMD_SERVICE', pkg_systemd).split():
|
||||
|
||||
@@ -187,8 +187,10 @@ python toaster_collect_task_stats() {
|
||||
def _read_stats(filename):
|
||||
cpu_usage = 0
|
||||
disk_io = 0
|
||||
startio = ''
|
||||
endio = ''
|
||||
startio = '0'
|
||||
endio = '0'
|
||||
started = '0'
|
||||
ended = '0'
|
||||
pn = ''
|
||||
taskname = ''
|
||||
statinfo = {}
|
||||
@@ -198,20 +200,28 @@ python toaster_collect_task_stats() {
|
||||
k,v = line.strip().split(": ", 1)
|
||||
statinfo[k] = v
|
||||
|
||||
try:
|
||||
cpu_usage = statinfo["CPU usage"]
|
||||
endio = statinfo["EndTimeIO"]
|
||||
startio = statinfo["StartTimeIO"]
|
||||
except KeyError:
|
||||
pass # we may have incomplete data here
|
||||
if "CPU usage" in statinfo:
|
||||
cpu_usage = str(statinfo["CPU usage"]).strip('% \n\r')
|
||||
|
||||
if startio and endio:
|
||||
disk_io = int(endio.strip('\n ')) - int(startio.strip('\n '))
|
||||
if "EndTimeIO" in statinfo:
|
||||
endio = str(statinfo["EndTimeIO"]).strip('% \n\r')
|
||||
|
||||
if cpu_usage:
|
||||
cpu_usage = float(cpu_usage.strip('% \n'))
|
||||
if "StartTimeIO" in statinfo:
|
||||
startio = str(statinfo["StartTimeIO"]).strip('% \n\r')
|
||||
|
||||
return {'cpu_usage': cpu_usage, 'disk_io': disk_io}
|
||||
if "Started" in statinfo:
|
||||
started = str(statinfo["Started"]).strip('% \n\r')
|
||||
|
||||
if "Ended" in statinfo:
|
||||
ended = str(statinfo["Ended"]).strip('% \n\r')
|
||||
|
||||
disk_io = int(endio) - int(startio)
|
||||
|
||||
elapsed_time = float(ended) - float(started)
|
||||
|
||||
cpu_usage = float(cpu_usage)
|
||||
|
||||
return {'cpu_usage': cpu_usage, 'disk_io': disk_io, 'elapsed_time': elapsed_time}
|
||||
|
||||
|
||||
if isinstance(e, (bb.build.TaskSucceeded, bb.build.TaskFailed)):
|
||||
|
||||
@@ -68,6 +68,7 @@ toolchain_shared_env_script () {
|
||||
echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
|
||||
echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
|
||||
echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
|
||||
echo 'export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"' >> $script
|
||||
echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
|
||||
echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
|
||||
echo 'export ARCH=${ARCH}' >> $script
|
||||
@@ -91,7 +92,7 @@ EOF
|
||||
|
||||
#we get the cached site config in the runtime
|
||||
TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d, True)}"
|
||||
TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d"
|
||||
TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
|
||||
TOOLCHAIN_NEED_CONFIGSITE_CACHE = "${TCLIBC} ncurses"
|
||||
|
||||
#This function create a site config file
|
||||
@@ -131,5 +132,7 @@ python __anonymous () {
|
||||
deps = ""
|
||||
for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split():
|
||||
deps += " %s:do_populate_sysroot" % dep
|
||||
for variant in (d.getVar('MULTILIB_VARIANTS', True) or "").split():
|
||||
deps += " %s-%s:do_populate_sysroot" % (variant, dep)
|
||||
d.appendVarFlag('do_configure', 'depends', deps)
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ if test "x$D" != "x"; then
|
||||
# Installing into a sysroot
|
||||
SYSROOT="$D"
|
||||
OPT="--root $D"
|
||||
# user/group lookups should match useradd/groupadd --root
|
||||
export PSEUDO_PASSWD="$SYSROOT:${STAGING_DIR_NATIVE}"
|
||||
fi
|
||||
|
||||
# If we're not doing a special SSTATE/SYSROOT install
|
||||
|
||||
@@ -586,7 +586,7 @@ SRC_URI = ""
|
||||
|
||||
# Use pseudo as the fakeroot implementation
|
||||
PSEUDO_LOCALSTATEDIR ?= "${WORKDIR}/pseudo/"
|
||||
PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}"
|
||||
PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}:${STAGING_DIR_NATIVE}"
|
||||
export PSEUDO_DISABLED = "1"
|
||||
#export PSEUDO_PREFIX = "${STAGING_DIR_NATIVE}${prefix_native}"
|
||||
#export PSEUDO_BINDIR = "${STAGING_DIR_NATIVE}${bindir_native}"
|
||||
|
||||
@@ -25,7 +25,7 @@ IMAGE_FEATURES ?= ""
|
||||
# directly part of the distribution.
|
||||
HOSTTOOLS_WHITELIST_GPL-3.0 ?= ""
|
||||
WHITELIST_GPL-3.0 ?= "less"
|
||||
LGPLv2_WHITELIST_GPL-3.0 ?= "libassuan gnutls libtasn1 libidn libgcc libgcc-initial gcc-runtime"
|
||||
LGPLv2_WHITELIST_GPL-3.0 ?= "libassuan gnutls libtasn1 libidn gcc-source libgcc libgcc-initial gcc-runtime"
|
||||
|
||||
COMMERCIAL_AUDIO_PLUGINS ?= ""
|
||||
# COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"
|
||||
|
||||
@@ -43,5 +43,6 @@ PREFERRED_PROVIDER_udev ?= "${@bb.utils.contains('DISTRO_FEATURES','systemd','sy
|
||||
# There are issues with runtime packages and PREFERRED_PROVIDER, see YOCTO #5044 for details
|
||||
# on this rather strange entry.
|
||||
PREFERRED_PROVIDER_bluez4 ?= "bluez4"
|
||||
PREFERRED_PROVIDER_bluez-hcidump ?= "bluez-hcidump"
|
||||
# Alternative is ltp-ddt in meta-oe: meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb
|
||||
PREFERRED_PROVIDER_ltp ?= "ltp"
|
||||
|
||||
@@ -19,7 +19,7 @@ SECURITY_CFLAGS_pn-beecrypt = "${SECURITY_NO_PIE_CFLAGS}"
|
||||
# Curl seems to check for FORTIFY_SOURCE in CFLAGS, but even assigned
|
||||
# to CPPFLAGS it gets picked into CFLAGS in bitbake.
|
||||
#TARGET_CPPFLAGS_pn-curl += "-D_FORTIFY_SOURCE=2"
|
||||
SECURITY_CFLAGS_pn-cups = "${SECURITY_NO_PIE_CLAGS}"
|
||||
SECURITY_CFLAGS_pn-cups = "${SECURITY_NO_PIE_CFLAGS}"
|
||||
SECURITY_CFLAGS_pn-curl = "-fstack-protector-all -pie -fpie"
|
||||
SECURITY_CFLAGS_pn-db = "${SECURITY_NO_PIE_CFLAGS}"
|
||||
SECURITY_CFLAGS_pn-directfb = "${SECURITY_NO_PIE_CFLAGS}"
|
||||
|
||||
@@ -36,6 +36,7 @@ PREFERRED_VERSION_gcc-crosssdk-${SDK_ARCH} ?= "${SDKGCCVERSION}"
|
||||
PREFERRED_VERSION_gcc-crosssdk-initial-${SDK_ARCH} ?= "${SDKGCCVERSION}"
|
||||
PREFERRED_VERSION_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${GCCVERSION}"
|
||||
PREFERRED_VERSION_gcc-runtime ?= "${GCCVERSION}"
|
||||
PREFERRED_VERSION_gcc-source ?= "${GCCVERSION}"
|
||||
PREFERRED_VERSION_nativesdk-gcc-runtime ?= "${SDKGCCVERSION}"
|
||||
PREFERRED_VERSION_libgcc ?= "${GCCVERSION}"
|
||||
PREFERRED_VERSION_libgcc-initial ?= "${GCCVERSION}"
|
||||
|
||||
@@ -132,7 +132,8 @@ if [ "$dl_path" = "" ] ; then
|
||||
echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"
|
||||
exit 1
|
||||
fi
|
||||
executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111 -printf "'%h/%f' ")
|
||||
executable_files=$($SUDO_EXEC find $native_sysroot -type f \
|
||||
\( -perm -0100 -o -perm -0010 -o -perm -0001 \) -printf "'%h/%f' ")
|
||||
|
||||
tdir=`mktemp -d`
|
||||
if [ x$tdir = x ] ; then
|
||||
@@ -153,7 +154,12 @@ if [ $relocate = 1 ] ; then
|
||||
fi
|
||||
|
||||
# replace @SDKPATH@ with the new prefix in all text files: configs/scripts/etc
|
||||
$SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\|source\).*text"|awk -F':' '{printf "\"%s\"\n", $1}'|$SUDO_EXEC xargs -n32 sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g"
|
||||
for replace in "$target_sdk_dir -maxdepth 1" "$native_sysroot"; do
|
||||
$SUDO_EXEC find $replace -type f -exec file '{}' \; | \
|
||||
grep ":.*\(ASCII\|script\|source\).*text" | \
|
||||
awk -F':' '{printf "\"%s\"\n", $1}' | \
|
||||
$SUDO_EXEC xargs -n32 sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g"
|
||||
done
|
||||
|
||||
# change all symlinks pointing to @SDKPATH@
|
||||
for l in $($SUDO_EXEC find $native_sysroot -type l); do
|
||||
@@ -162,7 +168,7 @@ done
|
||||
|
||||
# find out all perl scripts in $native_sysroot and modify them replacing the
|
||||
# host perl with SDK perl.
|
||||
for perl_script in $($SUDO_EXEC find $native_sysroot -type f -exec grep "^#!.*perl" -l '{}' \;); do
|
||||
for perl_script in $($SUDO_EXEC find $native_sysroot -type f -exec grep -l "^#!.*perl" '{}' \;); do
|
||||
$SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \
|
||||
"s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script
|
||||
done
|
||||
|
||||
@@ -57,6 +57,13 @@ class ClassExtender(object):
|
||||
if dep.endswith(("-native", "-native-runtime")) or ('nativesdk-' in dep) or ('cross-canadian' in dep) or ('-crosssdk-' in dep):
|
||||
return dep
|
||||
else:
|
||||
# Do not extend for that already have multilib prefix
|
||||
var = self.d.getVar("MULTILIB_VARIANTS", True)
|
||||
if var:
|
||||
var = var.split()
|
||||
for v in var:
|
||||
if dep.startswith(v):
|
||||
return dep
|
||||
return self.extend_name(dep)
|
||||
|
||||
def map_depends_variable(self, varname, suffix = ""):
|
||||
|
||||
@@ -109,7 +109,7 @@ class ImageDepGraph(object):
|
||||
# remove added nodes from deps_array
|
||||
for item in group:
|
||||
for node in self.graph:
|
||||
if item in self.graph[node]:
|
||||
if item in self.graph[node].split():
|
||||
self.deps_array[node][0] -= 1
|
||||
|
||||
self.deps_array.pop(item, None)
|
||||
|
||||
@@ -16,11 +16,14 @@ def create_index(arg):
|
||||
|
||||
try:
|
||||
bb.note("Executing '%s' ..." % index_cmd)
|
||||
subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True)
|
||||
result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
return("Index creation command '%s' failed with return code %d:\n%s" %
|
||||
(e.cmd, e.returncode, e.output))
|
||||
|
||||
if result:
|
||||
bb.note(result)
|
||||
|
||||
return None
|
||||
|
||||
|
||||
@@ -63,6 +66,9 @@ class RpmIndexer(Indexer):
|
||||
localdata = bb.data.createCopy(self.d)
|
||||
default_tune_key = "DEFAULTTUNE_virtclass-multilib-" + eext[1]
|
||||
default_tune = localdata.getVar(default_tune_key, False)
|
||||
if default_tune is None:
|
||||
default_tune_key = "DEFAULTTUNE_ML_" + eext[1]
|
||||
default_tune = localdata.getVar(default_tune_key, False)
|
||||
if default_tune:
|
||||
localdata.setVar("DEFAULTTUNE", default_tune)
|
||||
bb.data.update_data(localdata)
|
||||
@@ -117,7 +123,10 @@ class RpmIndexer(Indexer):
|
||||
bb.note("There are no packages in %s" % self.deploy_dir)
|
||||
return
|
||||
|
||||
oe.utils.multiprocess_exec(index_cmds, create_index)
|
||||
result = oe.utils.multiprocess_exec(index_cmds, create_index)
|
||||
if result:
|
||||
bb.fatal('%s' % ('\n'.join(result)))
|
||||
|
||||
|
||||
class OpkgIndexer(Indexer):
|
||||
def write_index(self):
|
||||
@@ -153,7 +162,10 @@ class OpkgIndexer(Indexer):
|
||||
bb.note("There are no packages in %s!" % self.deploy_dir)
|
||||
return
|
||||
|
||||
oe.utils.multiprocess_exec(index_cmds, create_index)
|
||||
result = oe.utils.multiprocess_exec(index_cmds, create_index)
|
||||
if result:
|
||||
bb.fatal('%s' % ('\n'.join(result)))
|
||||
|
||||
|
||||
|
||||
class DpkgIndexer(Indexer):
|
||||
@@ -197,7 +209,10 @@ class DpkgIndexer(Indexer):
|
||||
bb.note("There are no packages in %s" % self.deploy_dir)
|
||||
return
|
||||
|
||||
oe.utils.multiprocess_exec(index_cmds, create_index)
|
||||
result = oe.utils.multiprocess_exec(index_cmds, create_index)
|
||||
if result:
|
||||
bb.fatal('%s' % ('\n'.join(result)))
|
||||
|
||||
|
||||
|
||||
class PkgsList(object):
|
||||
@@ -1258,9 +1273,9 @@ class OpkgPM(PackageManager):
|
||||
|
||||
with open(cfg_file_name, "w+") as cfg_file:
|
||||
cfg_file.write("src/gz local-%s %s/%s" %
|
||||
arch,
|
||||
self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
|
||||
arch)
|
||||
(arch,
|
||||
self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
|
||||
arch))
|
||||
|
||||
def _create_config(self):
|
||||
with open(self.config_file, "w+") as config_file:
|
||||
@@ -1407,6 +1422,10 @@ class OpkgPM(PackageManager):
|
||||
else:
|
||||
status.write(line + "\n")
|
||||
|
||||
# Append a blank line after each package entry to ensure that it
|
||||
# is separated from the following entry
|
||||
status.write("\n")
|
||||
|
||||
'''
|
||||
The following function dummy installs pkgs and returns the log of output.
|
||||
'''
|
||||
@@ -1477,7 +1496,7 @@ class DpkgPM(PackageManager):
|
||||
|
||||
self.apt_args = d.getVar("APT_ARGS", True)
|
||||
|
||||
self.all_arch_list = self.d.getVar('PACKAGE_ARCHS', True).split()
|
||||
self.all_arch_list = archs.split()
|
||||
all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').split()
|
||||
self.all_arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in self.all_arch_list)
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.bz2 \
|
||||
SRC_URI[md5sum] = "425b1acad6854cc2bbb06ac8e48e76fc"
|
||||
SRC_URI[sha256sum] = "12d52b19042e2fd058af12e7d877bbbce72213cb3a0b5ec7ff0703ac09e3dcde"
|
||||
|
||||
inherit multilib_header
|
||||
|
||||
PARALLEL_MAKE = ""
|
||||
|
||||
PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes"
|
||||
@@ -49,6 +51,8 @@ do_install () {
|
||||
|
||||
install -d ${D}${bindir}
|
||||
ln -s ../sbin/lspci ${D}${bindir}/lspci
|
||||
|
||||
oe_multilib_header pci/config.h
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-ids libpci libpci-dev libpci-dbg"
|
||||
|
||||
@@ -0,0 +1,990 @@
|
||||
From 603a0e2637b35a2da820bc807f69bcf09c682dce Mon Sep 17 00:00:00 2001
|
||||
From: Evan Hunt <each@isc.org>
|
||||
Date: Mon, 17 Nov 2014 23:49:07 -0800
|
||||
Subject: [PATCH] [v9_9] limit recursion depth and iterative queries
|
||||
|
||||
4006. [security] A flaw in delegation handling could be exploited
|
||||
to put named into an infinite loop. This has
|
||||
been addressed by placing limits on the number
|
||||
of levels of recursion named will allow (default 7),
|
||||
and the number of iterative queries that it will
|
||||
send (default 50) before terminating a recursive
|
||||
query (CVE-2014-8500).
|
||||
|
||||
The recursion depth limit is configured via the
|
||||
"max-recursion-depth" option. [RT #35780]
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
|
||||
---
|
||||
bin/named/config.c | 3 +-
|
||||
bin/named/include/named/query.h | 2 -
|
||||
bin/named/query.c | 7 ++-
|
||||
bin/named/server.c | 5 ++
|
||||
bin/tests/system/many/clean.sh | 7 +++
|
||||
bin/tests/system/many/ns1/named.conf | 33 +++++++++++++
|
||||
bin/tests/system/many/ns2/named.conf | 30 ++++++++++++
|
||||
bin/tests/system/many/ns3/named.conf | 32 +++++++++++++
|
||||
bin/tests/system/many/ns4/named.conf | 30 ++++++++++++
|
||||
bin/tests/system/many/ns5/hints.db | 2 +
|
||||
bin/tests/system/many/ns5/named.conf | 29 ++++++++++++
|
||||
bin/tests/system/many/setup.sh | 75 ++++++++++++++++++++++++++++++
|
||||
bin/tests/system/many/tests.sh | 48 +++++++++++++++++++
|
||||
doc/arm/Bv9ARM-book.xml | 12 +++++
|
||||
lib/dns/adb.c | 58 ++++++++++++++++-------
|
||||
lib/dns/include/dns/adb.h | 8 ++++
|
||||
lib/dns/include/dns/resolver.h | 25 ++++++++++
|
||||
lib/dns/resolver.c | 90 ++++++++++++++++++++++++++++++------
|
||||
lib/isccfg/namedconf.c | 1 +
|
||||
20 files changed, 471 insertions(+), 37 deletions(-)
|
||||
create mode 100644 bin/tests/system/many/clean.sh
|
||||
create mode 100644 bin/tests/system/many/ns1/named.conf
|
||||
create mode 100644 bin/tests/system/many/ns2/named.conf
|
||||
create mode 100644 bin/tests/system/many/ns3/named.conf
|
||||
create mode 100644 bin/tests/system/many/ns4/named.conf
|
||||
create mode 100644 bin/tests/system/many/ns5/hints.db
|
||||
create mode 100644 bin/tests/system/many/ns5/named.conf
|
||||
create mode 100644 bin/tests/system/many/setup.sh
|
||||
create mode 100644 bin/tests/system/many/tests.sh
|
||||
|
||||
diff --git a/bin/named/config.c b/bin/named/config.c
|
||||
index 2782720..5ee8c4e 100644
|
||||
--- a/bin/named/config.c
|
||||
+++ b/bin/named/config.c
|
||||
@@ -15,8 +15,6 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
-/* $Id: config.c,v 1.123 2012/01/06 23:46:41 tbox Exp $ */
|
||||
-
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
@@ -160,6 +158,7 @@ options {\n\
|
||||
dnssec-accept-expired no;\n\
|
||||
clients-per-query 10;\n\
|
||||
max-clients-per-query 100;\n\
|
||||
+ max-recursion-depth 7;\n\
|
||||
zero-no-soa-ttl-cache no;\n\
|
||||
nsec3-test-zone no;\n\
|
||||
allow-new-zones no;\n\
|
||||
diff --git a/bin/named/include/named/query.h b/bin/named/include/named/query.h
|
||||
index 3beabb8..b5e3900 100644
|
||||
--- a/bin/named/include/named/query.h
|
||||
+++ b/bin/named/include/named/query.h
|
||||
@@ -15,8 +15,6 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
-/* $Id: query.h,v 1.45 2011/01/13 04:59:24 tbox Exp $ */
|
||||
-
|
||||
#ifndef NAMED_QUERY_H
|
||||
#define NAMED_QUERY_H 1
|
||||
|
||||
diff --git a/bin/named/query.c b/bin/named/query.c
|
||||
index 982f76d..47bfc6a 100644
|
||||
--- a/bin/named/query.c
|
||||
+++ b/bin/named/query.c
|
||||
@@ -3877,12 +3877,11 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
|
||||
peeraddr = &client->peeraddr;
|
||||
else
|
||||
peeraddr = NULL;
|
||||
- result = dns_resolver_createfetch2(client->view->resolver,
|
||||
+ result = dns_resolver_createfetch3(client->view->resolver,
|
||||
qname, qtype, qdomain, nameservers,
|
||||
NULL, peeraddr, client->message->id,
|
||||
- client->query.fetchoptions,
|
||||
- client->task,
|
||||
- query_resume, client,
|
||||
+ client->query.fetchoptions, 0,
|
||||
+ client->task, query_resume, client,
|
||||
rdataset, sigrdataset,
|
||||
&client->query.fetch);
|
||||
|
||||
diff --git a/bin/named/server.c b/bin/named/server.c
|
||||
index ac015a4..0559977 100644
|
||||
--- a/bin/named/server.c
|
||||
+++ b/bin/named/server.c
|
||||
@@ -3161,6 +3161,11 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
|
||||
cfg_obj_asuint32(obj),
|
||||
max_clients_per_query);
|
||||
|
||||
+ obj = NULL;
|
||||
+ result = ns_config_get(maps, "max-recursion-depth", &obj);
|
||||
+ INSIST(result == ISC_R_SUCCESS);
|
||||
+ dns_resolver_setmaxdepth(view->resolver, cfg_obj_asuint32(obj));
|
||||
+
|
||||
#ifdef ALLOW_FILTER_AAAA_ON_V4
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "filter-aaaa-on-v4", &obj);
|
||||
diff --git a/bin/tests/system/many/clean.sh b/bin/tests/system/many/clean.sh
|
||||
new file mode 100644
|
||||
index 0000000..119b1f5
|
||||
--- /dev/null
|
||||
+++ b/bin/tests/system/many/clean.sh
|
||||
@@ -0,0 +1,7 @@
|
||||
+rm -f ns1/[1-9]*example.tld?.db
|
||||
+rm -f ns2/[1-9]*example.tld?.db
|
||||
+rm -f ns1/zones.conf
|
||||
+rm -f ns2/zones.conf
|
||||
+rm -f */root.db
|
||||
+rm -f ns3/tld1.db
|
||||
+rm -f ns4/tld2.db
|
||||
diff --git a/bin/tests/system/many/ns1/named.conf b/bin/tests/system/many/ns1/named.conf
|
||||
new file mode 100644
|
||||
index 0000000..abc9dca
|
||||
--- /dev/null
|
||||
+++ b/bin/tests/system/many/ns1/named.conf
|
||||
@@ -0,0 +1,33 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
+ * PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+controls { /* empty */ };
|
||||
+
|
||||
+options {
|
||||
+ query-source address 10.53.0.1;
|
||||
+ notify-source 10.53.0.1;
|
||||
+ transfer-source 10.53.0.1;
|
||||
+ port 5300;
|
||||
+ pid-file "named.pid";
|
||||
+ listen-on { 10.53.0.1; };
|
||||
+ listen-on-v6 { none; };
|
||||
+ recursion no;
|
||||
+};
|
||||
+
|
||||
+include "zones.conf";
|
||||
+
|
||||
+// zone "tld1" { type master; file "tld1.db"; };
|
||||
+// zone "tld2" { type master; file "tld2.db"; };
|
||||
diff --git a/bin/tests/system/many/ns2/named.conf b/bin/tests/system/many/ns2/named.conf
|
||||
new file mode 100644
|
||||
index 0000000..16266e2
|
||||
--- /dev/null
|
||||
+++ b/bin/tests/system/many/ns2/named.conf
|
||||
@@ -0,0 +1,30 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
+ * PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+controls { /* empty */ };
|
||||
+
|
||||
+options {
|
||||
+ query-source address 10.53.0.2;
|
||||
+ notify-source 10.53.0.2;
|
||||
+ transfer-source 10.53.0.2;
|
||||
+ port 5300;
|
||||
+ pid-file "named.pid";
|
||||
+ listen-on { 10.53.0.2; };
|
||||
+ listen-on-v6 { none; };
|
||||
+ recursion no;
|
||||
+};
|
||||
+
|
||||
+include "zones.conf";
|
||||
diff --git a/bin/tests/system/many/ns3/named.conf b/bin/tests/system/many/ns3/named.conf
|
||||
new file mode 100644
|
||||
index 0000000..b950afe
|
||||
--- /dev/null
|
||||
+++ b/bin/tests/system/many/ns3/named.conf
|
||||
@@ -0,0 +1,32 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
+ * PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+controls { /* empty */ };
|
||||
+
|
||||
+options {
|
||||
+ query-source address 10.53.0.3;
|
||||
+ notify-source 10.53.0.3;
|
||||
+ transfer-source 10.53.0.3;
|
||||
+ port 5300;
|
||||
+ pid-file "named.pid";
|
||||
+ listen-on { 10.53.0.3; };
|
||||
+ listen-on-v6 { none; };
|
||||
+ recursion no;
|
||||
+};
|
||||
+
|
||||
+zone "." { type master; file "root.db"; };
|
||||
+
|
||||
+zone "tld1" { type master; file "tld1.db"; };
|
||||
diff --git a/bin/tests/system/many/ns4/named.conf b/bin/tests/system/many/ns4/named.conf
|
||||
new file mode 100644
|
||||
index 0000000..ca9aa6a
|
||||
--- /dev/null
|
||||
+++ b/bin/tests/system/many/ns4/named.conf
|
||||
@@ -0,0 +1,30 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
+ * PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+controls { /* empty */ };
|
||||
+
|
||||
+options {
|
||||
+ query-source address 10.53.0.4;
|
||||
+ notify-source 10.53.0.4;
|
||||
+ transfer-source 10.53.0.4;
|
||||
+ port 5300;
|
||||
+ pid-file "named.pid";
|
||||
+ listen-on { 10.53.0.4; };
|
||||
+ listen-on-v6 { none; };
|
||||
+ recursion no;
|
||||
+};
|
||||
+
|
||||
+zone "tld2" { type master; file "tld2.db"; };
|
||||
diff --git a/bin/tests/system/many/ns5/hints.db b/bin/tests/system/many/ns5/hints.db
|
||||
new file mode 100644
|
||||
index 0000000..c05809b
|
||||
--- /dev/null
|
||||
+++ b/bin/tests/system/many/ns5/hints.db
|
||||
@@ -0,0 +1,2 @@
|
||||
+. 60 in ns ns.nil.
|
||||
+ns.nil. 60 in A 10.53.0.3
|
||||
diff --git a/bin/tests/system/many/ns5/named.conf b/bin/tests/system/many/ns5/named.conf
|
||||
new file mode 100644
|
||||
index 0000000..fce7d59
|
||||
--- /dev/null
|
||||
+++ b/bin/tests/system/many/ns5/named.conf
|
||||
@@ -0,0 +1,29 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
+ * PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+controls { /* empty */ };
|
||||
+
|
||||
+options {
|
||||
+ query-source address 10.53.0.5;
|
||||
+ notify-source 10.53.0.5;
|
||||
+ transfer-source 10.53.0.5;
|
||||
+ port 5300;
|
||||
+ pid-file "named.pid";
|
||||
+ listen-on { 10.53.0.5; };
|
||||
+ listen-on-v6 { none; };
|
||||
+};
|
||||
+
|
||||
+zone "." { type hint; file "hints.db"; };
|
||||
diff --git a/bin/tests/system/many/setup.sh b/bin/tests/system/many/setup.sh
|
||||
new file mode 100644
|
||||
index 0000000..80695b5
|
||||
--- /dev/null
|
||||
+++ b/bin/tests/system/many/setup.sh
|
||||
@@ -0,0 +1,75 @@
|
||||
+i=1
|
||||
+
|
||||
+cat > ns3/root.db << EOF
|
||||
+. 60 in soa ns.nil. hostmaster.ns.nil. 1 0 0 0 0
|
||||
+. 60 in ns ns.nil.
|
||||
+ns.nil. 60 in a 10.53.0.3
|
||||
+tld1. 60 in ns ns.tld1.
|
||||
+ns.tld1. 60 in a 10.53.0.3
|
||||
+tld2. 60 in ns ns.tld2.
|
||||
+ns.tld2. 60 in a 10.53.0.4
|
||||
+EOF
|
||||
+
|
||||
+cat > ns3/tld1.db << EOF
|
||||
+tld1. 60 in soa ns.tld1. hostmaster.ns.tld1. 1 0 0 0 0
|
||||
+tld1. 60 in ns ns.tld1.
|
||||
+ns.tld1. 60 in a 10.53.0.1
|
||||
+EOF
|
||||
+
|
||||
+cat > ns4/tld2.db << EOF
|
||||
+tld2. 60 in soa ns.tld2. hostmaster.ns.tld4. 1 0 0 0 0
|
||||
+tld2. 60 in ns ns.tld2.
|
||||
+ns.tld2. 60 in a 10.53.0.1
|
||||
+EOF
|
||||
+
|
||||
+: > ns1/zones.conf
|
||||
+: > ns2/zones.conf
|
||||
+
|
||||
+while [ $i -lt 1000 ]
|
||||
+do
|
||||
+j=`expr $i + 1`
|
||||
+s=`expr $j % 2 + 1`
|
||||
+n=`expr $i % 2 + 1`
|
||||
+t=`expr $s + 2`
|
||||
+
|
||||
+# i=1 j=2 s=1 n=2
|
||||
+# i=2 j=3 s=1 n=2
|
||||
+# i=3 j=4 s=1 n=2
|
||||
+
|
||||
+cat > ns1/${i}example.tld${s}.db << EOF
|
||||
+${i}example.tld${s}. 60 in soa ns.${j}example.tld${n}. hostmaster 1 0 0 0 0
|
||||
+${i}example.tld${s}. 60 in ns ns.${j}example.tld${n}.
|
||||
+ns.${i}example.tld${s}. 60 in a 10.53.0.1
|
||||
+EOF
|
||||
+
|
||||
+cat >> ns1/zones.conf << EOF
|
||||
+zone "${i}example.tld${s}" { type master; file "${i}example.tld${s}.db"; };
|
||||
+EOF
|
||||
+
|
||||
+cat >> ns${t}/tld${s}.db << EOF
|
||||
+${i}example.tld${s}. 60 in ns ns.${j}example.tld${n}.
|
||||
+EOF
|
||||
+
|
||||
+i=$j
|
||||
+
|
||||
+done
|
||||
+
|
||||
+j=`expr $i + 1`
|
||||
+s=`expr $j % 2 + 1`
|
||||
+n=`expr $s % 2 + 1`
|
||||
+t=`expr $s + 2`
|
||||
+
|
||||
+cat > ns1/${i}example.tld${s}.db << EOF
|
||||
+${i}example.tld${s}. 60 in soa ns.${i}example.tld${s}. hostmaster 1 0 0 0 0
|
||||
+${i}example.tld${s}. 60 in ns ns.${i}example.tld${s}.
|
||||
+ns.${i}example.tld${s}. 60 in a 10.53.0.1
|
||||
+EOF
|
||||
+
|
||||
+cat >> ns1/zones.conf << EOF
|
||||
+zone "${i}example.tld${s}" { type master; file "${i}example.tld${s}.db"; };
|
||||
+EOF
|
||||
+
|
||||
+cat >> ns${t}/tld${s}.db << EOF
|
||||
+${i}example.tld${s}. 60 in ns ns.${i}example.tld${s}.
|
||||
+ns.${i}example.tld${s}. 60 in a 10.53.0.1
|
||||
+EOF
|
||||
diff --git a/bin/tests/system/many/tests.sh b/bin/tests/system/many/tests.sh
|
||||
new file mode 100644
|
||||
index 0000000..37964e2
|
||||
--- /dev/null
|
||||
+++ b/bin/tests/system/many/tests.sh
|
||||
@@ -0,0 +1,48 @@
|
||||
+#!/bin/sh
|
||||
+#
|
||||
+# Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
+#
|
||||
+# Permission to use, copy, modify, and/or distribute this software for any
|
||||
+# purpose with or without fee is hereby granted, provided that the above
|
||||
+# copyright notice and this permission notice appear in all copies.
|
||||
+#
|
||||
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
+# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
+# PERFORMANCE OF THIS SOFTWARE.
|
||||
+
|
||||
+SYSTEMTESTTOP=..
|
||||
+. $SYSTEMTESTTOP/conf.sh
|
||||
+
|
||||
+status=0
|
||||
+n=0
|
||||
+
|
||||
+n=`expr $n + 1`
|
||||
+echo "I: attempt lookup 1example.tld2 soa ($n)"
|
||||
+ret=0
|
||||
+$DIG +tcp 1example.tld1 soa @10.53.0.5 -p 5300 > dig.out.test$n
|
||||
+grep "status: SERVFAIL" dig.out.test$n > /dev/null || ret=1
|
||||
+if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
+status=`expr $status + $ret`
|
||||
+
|
||||
+n=`expr $n + 1`
|
||||
+echo "I: attempt lookup 992example.tld2 soa ($n)"
|
||||
+ret=0
|
||||
+$DIG +tcp 992example.tld2 soa @10.53.0.5 -p 5300 > dig.out.test$n
|
||||
+grep "status: SERVFAIL" dig.out.test$n > /dev/null || ret=1
|
||||
+if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
+status=`expr $status + $ret`
|
||||
+
|
||||
+n=`expr $n + 1`
|
||||
+echo "I: attempt lookup 993example.tld1 soa ($n)"
|
||||
+ret=0
|
||||
+$DIG +tcp 993example.tld1 soa @10.53.0.5 -p 5300 > dig.out.test$n
|
||||
+grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
|
||||
+if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
+status=`expr $status + $ret`
|
||||
+
|
||||
+echo "I:exit status: $status"
|
||||
+exit $status
|
||||
diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml
|
||||
index 9f7bd38..fff4249 100644
|
||||
--- a/doc/arm/Bv9ARM-book.xml
|
||||
+++ b/doc/arm/Bv9ARM-book.xml
|
||||
@@ -4861,6 +4861,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]
|
||||
<optional> max-acache-size <replaceable>size_spec</replaceable> ; </optional>
|
||||
<optional> clients-per-query <replaceable>number</replaceable> ; </optional>
|
||||
<optional> max-clients-per-query <replaceable>number</replaceable> ; </optional>
|
||||
+ <optional> max-recursion-depth <replaceable>number</replaceable> ; </optional>
|
||||
<optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
|
||||
<optional> empty-server <replaceable>name</replaceable> ; </optional>
|
||||
<optional> empty-contact <replaceable>name</replaceable> ; </optional>
|
||||
@@ -8680,6 +8681,17 @@ avoid-v6-udp-ports { 40000; range 50000 60000; };
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
+ <varlistentry id="max-recursion-depth">
|
||||
+ <term><command>max-recursion-depth</command></term>
|
||||
+ <listitem>
|
||||
+ <para>
|
||||
+ Sets the maximum number of levels of recursion
|
||||
+ permitted at any one time while resolving a name.
|
||||
+ The default is 7.
|
||||
+ </para>
|
||||
+ </listitem>
|
||||
+ </varlistentry>
|
||||
+
|
||||
<varlistentry>
|
||||
<term><command>notify-delay</command></term>
|
||||
<listitem>
|
||||
diff --git a/lib/dns/adb.c b/lib/dns/adb.c
|
||||
index 2ccb51e..fe9b3f7 100644
|
||||
--- a/lib/dns/adb.c
|
||||
+++ b/lib/dns/adb.c
|
||||
@@ -199,6 +199,7 @@ struct dns_adbfetch {
|
||||
unsigned int magic;
|
||||
dns_fetch_t *fetch;
|
||||
dns_rdataset_t rdataset;
|
||||
+ unsigned int depth;
|
||||
};
|
||||
|
||||
/*%
|
||||
@@ -300,7 +301,7 @@ static inline void violate_locking_hierarchy(isc_mutex_t *, isc_mutex_t *);
|
||||
static isc_boolean_t clean_namehooks(dns_adb_t *, dns_adbnamehooklist_t *);
|
||||
static void clean_target(dns_adb_t *, dns_name_t *);
|
||||
static void clean_finds_at_name(dns_adbname_t *, isc_eventtype_t,
|
||||
- unsigned int);
|
||||
+ isc_uint32_t, unsigned int);
|
||||
static isc_boolean_t check_expire_namehooks(dns_adbname_t *, isc_stdtime_t);
|
||||
static isc_boolean_t check_expire_entry(dns_adb_t *, dns_adbentry_t **,
|
||||
isc_stdtime_t);
|
||||
@@ -308,7 +309,7 @@ static void cancel_fetches_at_name(dns_adbname_t *);
|
||||
static isc_result_t dbfind_name(dns_adbname_t *, isc_stdtime_t,
|
||||
dns_rdatatype_t);
|
||||
static isc_result_t fetch_name(dns_adbname_t *, isc_boolean_t,
|
||||
- dns_rdatatype_t);
|
||||
+ unsigned int, dns_rdatatype_t);
|
||||
static inline void check_exit(dns_adb_t *);
|
||||
static void destroy(dns_adb_t *);
|
||||
static isc_boolean_t shutdown_names(dns_adb_t *);
|
||||
@@ -984,7 +985,7 @@ kill_name(dns_adbname_t **n, isc_eventtype_t ev) {
|
||||
* Clean up the name's various lists. These two are destructive
|
||||
* in that they will always empty the list.
|
||||
*/
|
||||
- clean_finds_at_name(name, ev, DNS_ADBFIND_ADDRESSMASK);
|
||||
+ clean_finds_at_name(name, ev, 0, DNS_ADBFIND_ADDRESSMASK);
|
||||
result4 = clean_namehooks(adb, &name->v4);
|
||||
result6 = clean_namehooks(adb, &name->v6);
|
||||
clean_target(adb, &name->target);
|
||||
@@ -1409,7 +1410,7 @@ event_free(isc_event_t *event) {
|
||||
*/
|
||||
static void
|
||||
clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype,
|
||||
- unsigned int addrs)
|
||||
+ isc_uint32_t qtotal, unsigned int addrs)
|
||||
{
|
||||
isc_event_t *ev;
|
||||
isc_task_t *task;
|
||||
@@ -1469,6 +1470,7 @@ clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype,
|
||||
ev->ev_sender = find;
|
||||
find->result_v4 = find_err_map[name->fetch_err];
|
||||
find->result_v6 = find_err_map[name->fetch6_err];
|
||||
+ find->qtotal += qtotal;
|
||||
ev->ev_type = evtype;
|
||||
ev->ev_destroy = event_free;
|
||||
ev->ev_destroy_arg = find;
|
||||
@@ -1827,6 +1829,7 @@ new_adbfind(dns_adb_t *adb) {
|
||||
h->flags = 0;
|
||||
h->result_v4 = ISC_R_UNEXPECTED;
|
||||
h->result_v6 = ISC_R_UNEXPECTED;
|
||||
+ h->qtotal = 0;
|
||||
ISC_LINK_INIT(h, publink);
|
||||
ISC_LINK_INIT(h, plink);
|
||||
ISC_LIST_INIT(h->list);
|
||||
@@ -2799,6 +2802,19 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
isc_stdtime_t now, dns_name_t *target,
|
||||
in_port_t port, dns_adbfind_t **findp)
|
||||
{
|
||||
+ return (dns_adb_createfind2(adb, task, action, arg, name,
|
||||
+ qname, qtype, options, now,
|
||||
+ target, port, 0, findp));
|
||||
+}
|
||||
+
|
||||
+isc_result_t
|
||||
+dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
+ void *arg, dns_name_t *name, dns_name_t *qname,
|
||||
+ dns_rdatatype_t qtype, unsigned int options,
|
||||
+ isc_stdtime_t now, dns_name_t *target,
|
||||
+ in_port_t port, unsigned int depth,
|
||||
+ dns_adbfind_t **findp)
|
||||
+{
|
||||
dns_adbfind_t *find;
|
||||
dns_adbname_t *adbname;
|
||||
int bucket;
|
||||
@@ -3029,7 +3045,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
* Start V4.
|
||||
*/
|
||||
if (WANT_INET(wanted_fetches) &&
|
||||
- fetch_name(adbname, start_at_zone,
|
||||
+ fetch_name(adbname, start_at_zone, depth,
|
||||
dns_rdatatype_a) == ISC_R_SUCCESS) {
|
||||
DP(DEF_LEVEL,
|
||||
"dns_adb_createfind: started A fetch for name %p",
|
||||
@@ -3040,7 +3056,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
* Start V6.
|
||||
*/
|
||||
if (WANT_INET6(wanted_fetches) &&
|
||||
- fetch_name(adbname, start_at_zone,
|
||||
+ fetch_name(adbname, start_at_zone, depth,
|
||||
dns_rdatatype_aaaa) == ISC_R_SUCCESS) {
|
||||
DP(DEF_LEVEL,
|
||||
"dns_adb_createfind: "
|
||||
@@ -3656,6 +3672,7 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
|
||||
isc_result_t result;
|
||||
unsigned int address_type;
|
||||
isc_boolean_t want_check_exit = ISC_FALSE;
|
||||
+ isc_uint32_t qtotal = 0;
|
||||
|
||||
UNUSED(task);
|
||||
|
||||
@@ -3666,6 +3683,8 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
|
||||
adb = name->adb;
|
||||
INSIST(DNS_ADB_VALID(adb));
|
||||
|
||||
+ qtotal = dev->qtotal;
|
||||
+
|
||||
bucket = name->lock_bucket;
|
||||
LOCK(&adb->namelocks[bucket]);
|
||||
|
||||
@@ -3783,6 +3802,12 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
|
||||
DP(DEF_LEVEL, "adb: fetch of '%s' %s failed: %s",
|
||||
buf, address_type == DNS_ADBFIND_INET ? "A" : "AAAA",
|
||||
dns_result_totext(dev->result));
|
||||
+ /*
|
||||
+ * Don't record a failure unless this is the initial
|
||||
+ * fetch of a chain.
|
||||
+ */
|
||||
+ if (fetch->depth > 1)
|
||||
+ goto out;
|
||||
/* XXXMLG Don't pound on bad servers. */
|
||||
if (address_type == DNS_ADBFIND_INET) {
|
||||
name->expire_v4 = ISC_MIN(name->expire_v4, now + 300);
|
||||
@@ -3814,15 +3839,14 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
|
||||
free_adbfetch(adb, &fetch);
|
||||
isc_event_free(&ev);
|
||||
|
||||
- clean_finds_at_name(name, ev_status, address_type);
|
||||
+ clean_finds_at_name(name, ev_status, qtotal, address_type);
|
||||
|
||||
UNLOCK(&adb->namelocks[bucket]);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
-fetch_name(dns_adbname_t *adbname,
|
||||
- isc_boolean_t start_at_zone,
|
||||
- dns_rdatatype_t type)
|
||||
+fetch_name(dns_adbname_t *adbname, isc_boolean_t start_at_zone,
|
||||
+ unsigned int depth, dns_rdatatype_t type)
|
||||
{
|
||||
isc_result_t result;
|
||||
dns_adbfetch_t *fetch = NULL;
|
||||
@@ -3867,12 +3891,14 @@ fetch_name(dns_adbname_t *adbname,
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
-
|
||||
- result = dns_resolver_createfetch(adb->view->resolver, &adbname->name,
|
||||
- type, name, nameservers, NULL,
|
||||
- options, adb->task, fetch_callback,
|
||||
- adbname, &fetch->rdataset, NULL,
|
||||
- &fetch->fetch);
|
||||
+ fetch->depth = depth;
|
||||
+
|
||||
+ result = dns_resolver_createfetch3(adb->view->resolver, &adbname->name,
|
||||
+ type, name, nameservers, NULL,
|
||||
+ NULL, 0, options, depth, adb->task,
|
||||
+ fetch_callback, adbname,
|
||||
+ &fetch->rdataset, NULL,
|
||||
+ &fetch->fetch);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
||||
diff --git a/lib/dns/include/dns/adb.h b/lib/dns/include/dns/adb.h
|
||||
index 35350ff..7501f01 100644
|
||||
--- a/lib/dns/include/dns/adb.h
|
||||
+++ b/lib/dns/include/dns/adb.h
|
||||
@@ -118,6 +118,8 @@ struct dns_adbfind {
|
||||
isc_result_t result_v6; /*%< RO: v6 result */
|
||||
ISC_LINK(dns_adbfind_t) publink; /*%< RW: client use */
|
||||
|
||||
+ isc_uint32_t qtotal;
|
||||
+
|
||||
/* Private */
|
||||
isc_mutex_t lock; /* locks all below */
|
||||
in_port_t port;
|
||||
@@ -334,6 +336,12 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
dns_rdatatype_t qtype, unsigned int options,
|
||||
isc_stdtime_t now, dns_name_t *target,
|
||||
in_port_t port, dns_adbfind_t **find);
|
||||
+isc_result_t
|
||||
+dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
+ void *arg, dns_name_t *name, dns_name_t *qname,
|
||||
+ dns_rdatatype_t qtype, unsigned int options,
|
||||
+ isc_stdtime_t now, dns_name_t *target, in_port_t port,
|
||||
+ unsigned int depth, dns_adbfind_t **find);
|
||||
/*%<
|
||||
* Main interface for clients. The adb will look up the name given in
|
||||
* "name" and will build up a list of found addresses, and perhaps start
|
||||
diff --git a/lib/dns/include/dns/resolver.h b/lib/dns/include/dns/resolver.h
|
||||
index 4e20eb6..c256049 100644
|
||||
--- a/lib/dns/include/dns/resolver.h
|
||||
+++ b/lib/dns/include/dns/resolver.h
|
||||
@@ -82,6 +82,7 @@ typedef struct dns_fetchevent {
|
||||
isc_sockaddr_t * client;
|
||||
dns_messageid_t id;
|
||||
isc_result_t vresult;
|
||||
+ isc_uint32_t qtotal;
|
||||
} dns_fetchevent_t;
|
||||
|
||||
/*
|
||||
@@ -275,6 +276,18 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
|
||||
dns_rdataset_t *rdataset,
|
||||
dns_rdataset_t *sigrdataset,
|
||||
dns_fetch_t **fetchp);
|
||||
+isc_result_t
|
||||
+dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
|
||||
+ dns_rdatatype_t type,
|
||||
+ dns_name_t *domain, dns_rdataset_t *nameservers,
|
||||
+ dns_forwarders_t *forwarders,
|
||||
+ isc_sockaddr_t *client, isc_uint16_t id,
|
||||
+ unsigned int options, unsigned int depth,
|
||||
+ isc_task_t *task,
|
||||
+ isc_taskaction_t action, void *arg,
|
||||
+ dns_rdataset_t *rdataset,
|
||||
+ dns_rdataset_t *sigrdataset,
|
||||
+ dns_fetch_t **fetchp);
|
||||
/*%<
|
||||
* Recurse to answer a question.
|
||||
*
|
||||
@@ -576,6 +589,18 @@ dns_resolver_printbadcache(dns_resolver_t *resolver, FILE *fp);
|
||||
* \li resolver to be valid.
|
||||
*/
|
||||
|
||||
+void
|
||||
+dns_resolver_setmaxdepth(dns_resolver_t *resolver, unsigned int maxdepth);
|
||||
+unsigned int
|
||||
+dns_resolver_getmaxdepth(dns_resolver_t *resolver);
|
||||
+/*%
|
||||
+ * Get and set how many NS indirections will be followed when looking for
|
||||
+ * nameserver addresses.
|
||||
+ *
|
||||
+ * Requires:
|
||||
+ * \li resolver to be valid.
|
||||
+ */
|
||||
+
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_RESOLVER_H */
|
||||
diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
|
||||
index e517dad..6a635b2 100644
|
||||
--- a/lib/dns/resolver.c
|
||||
+++ b/lib/dns/resolver.c
|
||||
@@ -131,6 +131,16 @@
|
||||
#define MAXIMUM_QUERY_TIMEOUT 30 /* The maximum time in seconds for the whole query to live. */
|
||||
#endif
|
||||
|
||||
+/* The default maximum number of recursions to follow before giving up. */
|
||||
+#ifndef DEFAULT_RECURSION_DEPTH
|
||||
+#define DEFAULT_RECURSION_DEPTH 7
|
||||
+#endif
|
||||
+
|
||||
+/* The default maximum number of iterative queries to allow before giving up. */
|
||||
+#ifndef DEFAULT_MAX_QUERIES
|
||||
+#define DEFAULT_MAX_QUERIES 50
|
||||
+#endif
|
||||
+
|
||||
/*%
|
||||
* Maximum EDNS0 input packet size.
|
||||
*/
|
||||
@@ -297,6 +307,7 @@ struct fetchctx {
|
||||
isc_uint64_t duration;
|
||||
isc_boolean_t logged;
|
||||
unsigned int querysent;
|
||||
+ unsigned int totalqueries;
|
||||
unsigned int referrals;
|
||||
unsigned int lamecount;
|
||||
unsigned int neterr;
|
||||
@@ -307,6 +318,7 @@ struct fetchctx {
|
||||
isc_boolean_t timeout;
|
||||
dns_adbaddrinfo_t *addrinfo;
|
||||
isc_sockaddr_t *client;
|
||||
+ unsigned int depth;
|
||||
};
|
||||
|
||||
#define FCTX_MAGIC ISC_MAGIC('F', '!', '!', '!')
|
||||
@@ -419,6 +431,7 @@ struct dns_resolver {
|
||||
isc_timer_t * spillattimer;
|
||||
isc_boolean_t zero_no_soa_ttl;
|
||||
unsigned int query_timeout;
|
||||
+ unsigned int maxdepth;
|
||||
|
||||
/* Locked by lock. */
|
||||
unsigned int references;
|
||||
@@ -1097,6 +1110,7 @@ fctx_sendevents(fetchctx_t *fctx, isc_result_t result, int line) {
|
||||
event->result == DNS_R_NCACHENXRRSET);
|
||||
}
|
||||
|
||||
+ event->qtotal = fctx->totalqueries;
|
||||
isc_task_sendanddetach(&task, ISC_EVENT_PTR(&event));
|
||||
count++;
|
||||
}
|
||||
@@ -1537,7 +1551,9 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_dispatch;
|
||||
}
|
||||
+
|
||||
fctx->querysent++;
|
||||
+ fctx->totalqueries++;
|
||||
|
||||
ISC_LIST_APPEND(fctx->queries, query, link);
|
||||
query->fctx->nqueries++;
|
||||
@@ -2194,9 +2210,10 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) {
|
||||
*/
|
||||
INSIST(!SHUTTINGDOWN(fctx));
|
||||
fctx->attributes &= ~FCTX_ATTR_ADDRWAIT;
|
||||
- if (event->ev_type == DNS_EVENT_ADBMOREADDRESSES)
|
||||
+ if (event->ev_type == DNS_EVENT_ADBMOREADDRESSES) {
|
||||
want_try = ISC_TRUE;
|
||||
- else {
|
||||
+ fctx->totalqueries += find->qtotal;
|
||||
+ } else {
|
||||
fctx->findfail++;
|
||||
if (fctx->pending == 0) {
|
||||
/*
|
||||
@@ -2479,12 +2496,13 @@ findname(fetchctx_t *fctx, dns_name_t *name, in_port_t port,
|
||||
* See what we know about this address.
|
||||
*/
|
||||
find = NULL;
|
||||
- result = dns_adb_createfind(fctx->adb,
|
||||
- res->buckets[fctx->bucketnum].task,
|
||||
- fctx_finddone, fctx, name,
|
||||
- &fctx->name, fctx->type,
|
||||
- options, now, NULL,
|
||||
- res->view->dstport, &find);
|
||||
+ result = dns_adb_createfind2(fctx->adb,
|
||||
+ res->buckets[fctx->bucketnum].task,
|
||||
+ fctx_finddone, fctx, name,
|
||||
+ &fctx->name, fctx->type,
|
||||
+ options, now, NULL,
|
||||
+ res->view->dstport,
|
||||
+ fctx->depth + 1, &find);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result == DNS_R_ALIAS) {
|
||||
/*
|
||||
@@ -2592,6 +2610,11 @@ fctx_getaddresses(fetchctx_t *fctx, isc_boolean_t badcache) {
|
||||
|
||||
res = fctx->res;
|
||||
|
||||
+ if (fctx->depth > res->maxdepth) {
|
||||
+ FCTXTRACE("too much NS indirection");
|
||||
+ return (DNS_R_SERVFAIL);
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Forwarders.
|
||||
*/
|
||||
@@ -3030,6 +3053,9 @@ fctx_try(fetchctx_t *fctx, isc_boolean_t retrying, isc_boolean_t badcache) {
|
||||
|
||||
REQUIRE(!ADDRWAIT(fctx));
|
||||
|
||||
+ if (fctx->totalqueries > DEFAULT_MAX_QUERIES)
|
||||
+ fctx_done(fctx, DNS_R_SERVFAIL, __LINE__);
|
||||
+
|
||||
addrinfo = fctx_nextaddress(fctx);
|
||||
if (addrinfo == NULL) {
|
||||
/*
|
||||
@@ -3388,6 +3414,7 @@ fctx_start(isc_task_t *task, isc_event_t *event) {
|
||||
* Normal fctx startup.
|
||||
*/
|
||||
fctx->state = fetchstate_active;
|
||||
+ fctx->totalqueries = 0;
|
||||
/*
|
||||
* Reset the control event for later use in shutting down
|
||||
* the fctx.
|
||||
@@ -3457,6 +3484,7 @@ fctx_join(fetchctx_t *fctx, isc_task_t *task, isc_sockaddr_t *client,
|
||||
event->fetch = fetch;
|
||||
event->client = client;
|
||||
event->id = id;
|
||||
+ event->qtotal = 0;
|
||||
dns_fixedname_init(&event->foundname);
|
||||
|
||||
/*
|
||||
@@ -3493,7 +3521,8 @@ log_ns_ttl(fetchctx_t *fctx, const char *where) {
|
||||
static isc_result_t
|
||||
fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
||||
dns_name_t *domain, dns_rdataset_t *nameservers,
|
||||
- unsigned int options, unsigned int bucketnum, fetchctx_t **fctxp)
|
||||
+ unsigned int options, unsigned int bucketnum, unsigned int depth,
|
||||
+ fetchctx_t **fctxp)
|
||||
{
|
||||
fetchctx_t *fctx;
|
||||
isc_result_t result;
|
||||
@@ -3545,6 +3574,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
||||
fctx->state = fetchstate_init;
|
||||
fctx->want_shutdown = ISC_FALSE;
|
||||
fctx->cloned = ISC_FALSE;
|
||||
+ fctx->depth = depth;
|
||||
ISC_LIST_INIT(fctx->queries);
|
||||
ISC_LIST_INIT(fctx->finds);
|
||||
ISC_LIST_INIT(fctx->altfinds);
|
||||
@@ -3563,6 +3593,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
||||
fctx->pending = 0;
|
||||
fctx->restarts = 0;
|
||||
fctx->querysent = 0;
|
||||
+ fctx->totalqueries = 0;
|
||||
fctx->referrals = 0;
|
||||
TIME_NOW(&fctx->start);
|
||||
fctx->timeouts = 0;
|
||||
@@ -7781,6 +7812,7 @@ dns_resolver_create(dns_view_t *view,
|
||||
res->spillattimer = NULL;
|
||||
res->zero_no_soa_ttl = ISC_FALSE;
|
||||
res->query_timeout = DEFAULT_QUERY_TIMEOUT;
|
||||
+ res->maxdepth = DEFAULT_RECURSION_DEPTH;
|
||||
res->nbuckets = ntasks;
|
||||
res->activebuckets = ntasks;
|
||||
res->buckets = isc_mem_get(view->mctx,
|
||||
@@ -8219,9 +8251,9 @@ dns_resolver_createfetch(dns_resolver_t *res, dns_name_t *name,
|
||||
dns_rdataset_t *sigrdataset,
|
||||
dns_fetch_t **fetchp)
|
||||
{
|
||||
- return (dns_resolver_createfetch2(res, name, type, domain,
|
||||
+ return (dns_resolver_createfetch3(res, name, type, domain,
|
||||
nameservers, forwarders, NULL, 0,
|
||||
- options, task, action, arg,
|
||||
+ options, 0, task, action, arg,
|
||||
rdataset, sigrdataset, fetchp));
|
||||
}
|
||||
|
||||
@@ -8237,6 +8269,25 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
|
||||
dns_rdataset_t *sigrdataset,
|
||||
dns_fetch_t **fetchp)
|
||||
{
|
||||
+ return (dns_resolver_createfetch3(res, name, type, domain,
|
||||
+ nameservers, forwarders, client, id,
|
||||
+ options, 0, task, action, arg,
|
||||
+ rdataset, sigrdataset, fetchp));
|
||||
+}
|
||||
+
|
||||
+isc_result_t
|
||||
+dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
|
||||
+ dns_rdatatype_t type,
|
||||
+ dns_name_t *domain, dns_rdataset_t *nameservers,
|
||||
+ dns_forwarders_t *forwarders,
|
||||
+ isc_sockaddr_t *client, dns_messageid_t id,
|
||||
+ unsigned int options, unsigned int depth,
|
||||
+ isc_task_t *task,
|
||||
+ isc_taskaction_t action, void *arg,
|
||||
+ dns_rdataset_t *rdataset,
|
||||
+ dns_rdataset_t *sigrdataset,
|
||||
+ dns_fetch_t **fetchp)
|
||||
+{
|
||||
dns_fetch_t *fetch;
|
||||
fetchctx_t *fctx = NULL;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
@@ -8325,11 +8376,12 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
|
||||
|
||||
if (fctx == NULL) {
|
||||
result = fctx_create(res, name, type, domain, nameservers,
|
||||
- options, bucketnum, &fctx);
|
||||
+ options, bucketnum, depth, &fctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto unlock;
|
||||
new_fctx = ISC_TRUE;
|
||||
- }
|
||||
+ } else if (fctx->depth > depth)
|
||||
+ fctx->depth = depth;
|
||||
|
||||
result = fctx_join(fctx, task, client, id, action, arg,
|
||||
rdataset, sigrdataset, fetch);
|
||||
@@ -9101,3 +9153,15 @@ dns_resolver_settimeout(dns_resolver_t *resolver, unsigned int seconds) {
|
||||
|
||||
resolver->query_timeout = seconds;
|
||||
}
|
||||
+
|
||||
+void
|
||||
+dns_resolver_setmaxdepth(dns_resolver_t *resolver, unsigned int maxdepth) {
|
||||
+ REQUIRE(VALID_RESOLVER(resolver));
|
||||
+ resolver->maxdepth = maxdepth;
|
||||
+}
|
||||
+
|
||||
+unsigned int
|
||||
+dns_resolver_getmaxdepth(dns_resolver_t *resolver) {
|
||||
+ REQUIRE(VALID_RESOLVER(resolver));
|
||||
+ return (resolver->maxdepth);
|
||||
+}
|
||||
diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c
|
||||
index bfd4bab..5f8b037 100644
|
||||
--- a/lib/isccfg/namedconf.c
|
||||
+++ b/lib/isccfg/namedconf.c
|
||||
@@ -1393,6 +1393,7 @@ view_clauses[] = {
|
||||
{ "max-cache-ttl", &cfg_type_uint32, 0 },
|
||||
{ "max-clients-per-query", &cfg_type_uint32, 0 },
|
||||
{ "max-ncache-ttl", &cfg_type_uint32, 0 },
|
||||
+ { "max-recursion-depth", &cfg_type_uint32, 0 },
|
||||
{ "max-udp-size", &cfg_type_uint32, 0 },
|
||||
{ "min-roots", &cfg_type_uint32, CFG_CLAUSEFLAG_NOTIMP },
|
||||
{ "minimal-responses", &cfg_type_boolean, 0 },
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -6,7 +6,7 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
EnvironmentFile=-/etc/sysconfig/named
|
||||
EnvironmentFile=-/etc/default/bind9
|
||||
PIDFile=/run/named/named.pid
|
||||
|
||||
ExecStartPre=@SBINDIR@/generate-rndc-key.sh
|
||||
|
||||
@@ -17,6 +17,7 @@ SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
|
||||
file://named.service \
|
||||
file://bind9 \
|
||||
file://init.d-add-support-for-read-only-rootfs.patch \
|
||||
file://bind9_9_5-CVE-2014-8500.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "e676c65cad5234617ee22f48e328c24e"
|
||||
@@ -46,11 +47,18 @@ PARALLEL_MAKE = ""
|
||||
|
||||
RDEPENDS_${PN} = "python-core"
|
||||
|
||||
PACKAGES_prepend = " ${PN}-utils "
|
||||
PACKAGE_BEFORE_PN += "${PN}-utils"
|
||||
FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
|
||||
FILES_${PN}-dev += "${bindir}/isc-config.h"
|
||||
FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
|
||||
|
||||
do_install_prepend() {
|
||||
# clean host path in isc-config.sh before the hardlink created
|
||||
# by "make install":
|
||||
# bind9-config -> isc-config.sh
|
||||
sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${S}/isc-config.sh
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
rm "${D}${bindir}/nslookup"
|
||||
rm "${D}${mandir}/man1/nslookup.1"
|
||||
|
||||
@@ -3,7 +3,9 @@ DESCRIPTION = "The hcidump tool reads raw HCI data coming from and going to a Bl
|
||||
and displays the commands, events and data in a human-readable form."
|
||||
|
||||
SECTION = "console"
|
||||
# hcidump was integrated into bluez5
|
||||
DEPENDS = "bluez4"
|
||||
RCONFLICTS_${PN} = "bluez5"
|
||||
LICENSE = "GPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
|
||||
file://src/hcidump.c;beginline=1;endline=23;md5=3bee3a162dff43a5be7470710b99fbcf"
|
||||
|
||||
@@ -7,6 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
|
||||
file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
|
||||
file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e"
|
||||
DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck readline"
|
||||
PROVIDES += "bluez-hcidump"
|
||||
RPROVIDES_${PN} += "bluez-hcidump"
|
||||
|
||||
RCONFLICTS_${PN} = "bluez4"
|
||||
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
connman-gnome: fix dbus interface name
|
||||
|
||||
This patch resolves following error:
|
||||
|
||||
"connman-dbus.xml": "connman" is not a valid D-Bus interface name
|
||||
|
||||
https://502552.bugs.gentoo.org/attachment.cgi?id=380652
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
|
||||
---
|
||||
common/connman-client.c | 24 ++++++++++++------------
|
||||
common/connman-client.h | 4 ++--
|
||||
common/connman-dbus.c | 6 +++---
|
||||
common/connman-dbus.xml | 2 +-
|
||||
4 files changed, 18 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/common/connman-client.c b/common/connman-client.c
|
||||
index c55e25c..9d818b2 100644
|
||||
--- a/common/connman-client.c
|
||||
+++ b/common/connman-client.c
|
||||
@@ -289,7 +289,7 @@ gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
|
||||
g_value_init(&value, DBUS_TYPE_G_DICTIONARY);
|
||||
g_value_set_boxed(&value, ipv4);
|
||||
- ret = connman_set_property(proxy, "IPv4.Configuration", &value, NULL);
|
||||
+ ret = net_connman_set_property(proxy, "IPv4.Configuration", &value, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
|
||||
@@ -317,7 +317,7 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
g_value_set_boolean(&value, powered);
|
||||
|
||||
error = NULL;
|
||||
- connman_set_property(proxy, "Powered", &value, &error);
|
||||
+ net_connman_set_property(proxy, "Powered", &value, &error);
|
||||
if( error )
|
||||
fprintf (stderr, "error: %s\n", error->message);
|
||||
|
||||
@@ -325,7 +325,7 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
}
|
||||
|
||||
void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
- connman_scan_reply callback, gpointer user_data)
|
||||
+ net_connman_scan_reply callback, gpointer user_data)
|
||||
{
|
||||
ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
DBusGProxy *proxy;
|
||||
@@ -339,7 +339,7 @@ void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_scan_async(proxy, callback, user_data);
|
||||
+ net_connman_scan_async(proxy, callback, user_data);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
@@ -353,7 +353,7 @@ gboolean connman_client_get_offline_status(ConnmanClient *client)
|
||||
|
||||
DBG("client %p", client);
|
||||
|
||||
- ret = connman_get_properties(priv->manager, &hash, NULL);
|
||||
+ ret = net_connman_get_properties(priv->manager, &hash, NULL);
|
||||
|
||||
if (ret == FALSE)
|
||||
goto done;
|
||||
@@ -375,7 +375,7 @@ void connman_client_set_offlinemode(ConnmanClient *client, gboolean status)
|
||||
g_value_init(&value, G_TYPE_BOOLEAN);
|
||||
g_value_set_boolean(&value, status);
|
||||
|
||||
- connman_set_property(priv->manager, "OfflineMode", &value, NULL);
|
||||
+ net_connman_set_property(priv->manager, "OfflineMode", &value, NULL);
|
||||
}
|
||||
|
||||
static gboolean network_disconnect(GtkTreeModel *model, GtkTreePath *path,
|
||||
@@ -398,7 +398,7 @@ static gboolean network_disconnect(GtkTreeModel *model, GtkTreePath *path,
|
||||
return TRUE;
|
||||
|
||||
if (type == CONNMAN_TYPE_WIFI)
|
||||
- connman_disconnect(proxy, NULL);
|
||||
+ net_connman_disconnect(proxy, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
|
||||
@@ -422,13 +422,13 @@ void connman_client_connect(ConnmanClient *client, const gchar *network)
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_connect(proxy, NULL);
|
||||
+ net_connman_connect(proxy, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
|
||||
void connman_client_connect_async(ConnmanClient *client, const gchar *network,
|
||||
- connman_connect_reply callback, gpointer userdata)
|
||||
+ net_connman_connect_reply callback, gpointer userdata)
|
||||
{
|
||||
ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
DBusGProxy *proxy;
|
||||
@@ -446,7 +446,7 @@ void connman_client_connect_async(ConnmanClient *client, const gchar *network,
|
||||
if (proxy == NULL)
|
||||
goto done;
|
||||
|
||||
- connman_connect_async(proxy, callback, userdata);
|
||||
+ net_connman_connect_async(proxy, callback, userdata);
|
||||
|
||||
done:
|
||||
return;
|
||||
@@ -476,7 +476,7 @@ void connman_client_disconnect(ConnmanClient *client, const gchar *network)
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_disconnect(proxy, NULL);
|
||||
+ net_connman_disconnect(proxy, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
@@ -532,7 +532,7 @@ void connman_client_remove(ConnmanClient *client, const gchar *network)
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_remove(proxy, NULL);
|
||||
+ net_connman_remove(proxy, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
diff --git a/common/connman-client.h b/common/connman-client.h
|
||||
index 9e2e6d5..98241de 100644
|
||||
--- a/common/connman-client.h
|
||||
+++ b/common/connman-client.h
|
||||
@@ -70,13 +70,13 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
struct ipv4_config *ipv4_config);
|
||||
void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
- connman_scan_reply callback, gpointer user_data);
|
||||
+ net_connman_scan_reply callback, gpointer user_data);
|
||||
|
||||
void connman_client_connect(ConnmanClient *client, const gchar *network);
|
||||
void connman_client_disconnect(ConnmanClient *client, const gchar *network);
|
||||
gchar *connman_client_get_security(ConnmanClient *client, const gchar *network);
|
||||
void connman_client_connect_async(ConnmanClient *client, const gchar *network,
|
||||
- connman_connect_reply callback, gpointer userdata);
|
||||
+ net_connman_connect_reply callback, gpointer userdata);
|
||||
void connman_client_set_remember(ConnmanClient *client, const gchar *network,
|
||||
gboolean remember);
|
||||
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index b82b3e1..543eb43 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -655,15 +655,15 @@ DBusGProxy *connman_dbus_create_manager(DBusGConnection *conn,
|
||||
|
||||
DBG("getting manager properties");
|
||||
|
||||
- connman_get_properties_async(proxy, manager_properties, store);
|
||||
+ net_connman_get_properties_async(proxy, manager_properties, store);
|
||||
|
||||
DBG("getting technologies");
|
||||
|
||||
- connman_get_technologies_async(proxy, manager_technologies, store);
|
||||
+ net_connman_get_technologies_async(proxy, manager_technologies, store);
|
||||
|
||||
DBG("getting services");
|
||||
|
||||
- connman_get_services_async(proxy, manager_services, store);
|
||||
+ net_connman_get_services_async(proxy, manager_services, store);
|
||||
|
||||
return proxy;
|
||||
}
|
||||
diff --git a/common/connman-dbus.xml b/common/connman-dbus.xml
|
||||
index 56b9582..0199d52 100644
|
||||
--- a/common/connman-dbus.xml
|
||||
+++ b/common/connman-dbus.xml
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<node name="/">
|
||||
- <interface name="connman">
|
||||
+ <interface name="net.connman">
|
||||
<method name="GetProperties">
|
||||
<arg type="a{sv}" direction="out"/>
|
||||
</method>
|
||||
--
|
||||
1.9.1
|
||||
@@ -11,9 +11,10 @@ DEPENDS = "gtk+ dbus-glib intltool-native"
|
||||
# 0.7 tag
|
||||
SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143"
|
||||
SRC_URI = "git://github.com/connectivity/connman-gnome.git \
|
||||
file://0001-Removed-icon-from-connman-gnome-about-applet.patch \
|
||||
file://null_check_for_ipv4_config.patch \
|
||||
file://images/* \
|
||||
file://0001-Removed-icon-from-connman-gnome-about-applet.patch \
|
||||
file://null_check_for_ipv4_config.patch \
|
||||
file://images/* \
|
||||
file://connman-gnome-fix-dbus-interface-name.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 38790ccf7bd0e6eab78024ec381fd98d7c6a2782 Mon Sep 17 00:00:00 2001
|
||||
From: vadimk <vadim4j@gmail.com>
|
||||
Date: Sat, 30 Aug 2014 15:06:00 +0300
|
||||
Subject: [PATCH] ip link: Remove unnecessary device checking
|
||||
|
||||
The real checking is performed later in iplink_modify(..) func which
|
||||
checks device existence if NLM_F_CREATE flag is set.
|
||||
|
||||
Also it fixes the case when impossible to add veth link which was
|
||||
caused by 9a02651a87 (ip: check for missing dev arg when doing VF rate)
|
||||
because these devices are not exist yet.
|
||||
|
||||
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
|
||||
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
|
||||
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
||||
---
|
||||
ip/iplink.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/ip/iplink.c b/ip/iplink.c
|
||||
index 1a907d9..ea06871 100644
|
||||
--- a/ip/iplink.c
|
||||
+++ b/ip/iplink.c
|
||||
@@ -593,8 +593,6 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
|
||||
duparg2("dev", *argv);
|
||||
*dev = *argv;
|
||||
dev_index = ll_name_to_index(*dev);
|
||||
- if (dev_index == 0)
|
||||
- invarg("Unknown device", *argv);
|
||||
}
|
||||
argc--; argv++;
|
||||
}
|
||||
--
|
||||
1.7.10.4
|
||||
@@ -3,6 +3,7 @@ require iproute2.inc
|
||||
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
|
||||
file://configure-cross.patch \
|
||||
file://0001-iproute2-de-bash-scripts.patch \
|
||||
file://0001-ip-link-Remove-unnecessary-device-checking.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "6c823b40fdcfa7b8120743349a52ac18"
|
||||
SRC_URI[sha256sum] = "1f0a8a6c0e872166f75433f5cbf9766f3002b5c2f13501b3bb8c51846a127b79"
|
||||
|
||||
@@ -28,33 +28,7 @@ test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs
|
||||
#----------------------------------------------------------------------
|
||||
# Startup and shutdown functions.
|
||||
# Actual startup/shutdown is at the end of this file.
|
||||
#directories
|
||||
create_directories(){
|
||||
echo -n 'creating NFS state directory: '
|
||||
mkdir -p "$NFS_STATEDIR"
|
||||
( cd "$NFS_STATEDIR"
|
||||
umask 077
|
||||
mkdir -p rpc_pipefs
|
||||
mkdir -p sm sm.bak statd
|
||||
chown rpcuser:rpcuser sm sm.bak statd
|
||||
test -w statd/state || {
|
||||
rm -f statd/state
|
||||
:>statd/state
|
||||
}
|
||||
umask 022
|
||||
for file in xtab etab smtab rmtab
|
||||
do
|
||||
test -w "$file" || {
|
||||
rm -f "$file"
|
||||
:>"$file"
|
||||
}
|
||||
done
|
||||
)
|
||||
chown rpcuser:rpcuser "$NFS_STATEDIR"
|
||||
echo done
|
||||
}
|
||||
|
||||
#statd
|
||||
start_statd(){
|
||||
echo -n "starting statd: "
|
||||
start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID"
|
||||
@@ -74,7 +48,6 @@ stop_statd(){
|
||||
#FIXME: need to create the /var/lib/nfs/... directories
|
||||
case "$1" in
|
||||
start)
|
||||
create_directories
|
||||
start_statd;;
|
||||
stop)
|
||||
stop_statd;;
|
||||
|
||||
@@ -54,7 +54,7 @@ SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service"
|
||||
SYSTEMD_AUTO_ENABLE = "disable"
|
||||
|
||||
# --enable-uuid is need for cross-compiling
|
||||
EXTRA_OECONF = "--with-statduser=nobody \
|
||||
EXTRA_OECONF = "--with-statduser=rpcuser \
|
||||
--enable-mountconfig \
|
||||
--enable-libmount-mount \
|
||||
--disable-nfsv41 \
|
||||
@@ -90,7 +90,6 @@ do_compile_prepend() {
|
||||
|
||||
do_install_append () {
|
||||
install -d ${D}${sysconfdir}/init.d
|
||||
install -d ${D}${localstatedir}/lib/nfs/statd
|
||||
install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
|
||||
install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon
|
||||
|
||||
@@ -106,6 +105,10 @@ do_install_append () {
|
||||
# kernel code as of 3.8 hard-codes this path as a default
|
||||
install -d ${D}/var/lib/nfs/v4recovery
|
||||
|
||||
# chown the directories and files
|
||||
chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd
|
||||
chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state
|
||||
|
||||
# the following are built by CC_FOR_BUILD
|
||||
rm -f ${D}${sbindir}/rpcdebug
|
||||
rm -f ${D}${sbindir}/rpcgen
|
||||
|
||||
@@ -50,7 +50,6 @@ inherit autotools-brokensep ptest
|
||||
|
||||
# LFS support:
|
||||
CFLAGS += "-D__FILE_OFFSET_BITS=64"
|
||||
export LD = "${CC}"
|
||||
|
||||
# login path is hardcoded in sshd
|
||||
EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
|
||||
@@ -75,16 +74,14 @@ CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
|
||||
EXTRA_OECONF_append_libc-uclibc=" --without-pam"
|
||||
|
||||
do_configure_prepend () {
|
||||
export LD="${CC}"
|
||||
install -m 0644 ${WORKDIR}/sshd_config ${B}/
|
||||
install -m 0644 ${WORKDIR}/ssh_config ${B}/
|
||||
if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
|
||||
cp aclocal.m4 acinclude.m4
|
||||
fi
|
||||
}
|
||||
|
||||
do_compile_append () {
|
||||
install -m 0644 ${WORKDIR}/sshd_config ${S}/
|
||||
install -m 0644 ${WORKDIR}/ssh_config ${S}/
|
||||
}
|
||||
|
||||
do_install_append () {
|
||||
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
|
||||
install -D -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
d root root 0755 /var/run/resolvconf/interface none
|
||||
f root root 0644 /etc/resolvconf/run/resolv.conf none
|
||||
f root root 0644 /etc/resolvconf/run/enable-updates none
|
||||
l root root 0644 /etc/resolv.conf /etc/resolvconf/run/resolv.conf
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
busybox installs readlink into /usr/bin, so ensure /usr/bin
|
||||
is in the path.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
||||
|
||||
Index: resolvconf-1.76/etc/resolvconf/update.d/libc
|
||||
===================================================================
|
||||
--- resolvconf-1.76.orig/etc/resolvconf/update.d/libc
|
||||
+++ resolvconf-1.76/etc/resolvconf/update.d/libc
|
||||
@@ -16,7 +16,7 @@
|
||||
#
|
||||
|
||||
set -e
|
||||
-PATH=/sbin:/bin
|
||||
+PATH=/sbin:/bin:/usr/bin
|
||||
|
||||
[ -x /lib/resolvconf/list-records ] || exit 1
|
||||
@@ -11,7 +11,11 @@ AUTHOR = "Thomas Hood"
|
||||
HOMEPAGE = "http://packages.debian.org/resolvconf"
|
||||
RDEPENDS_${PN} = "bash"
|
||||
|
||||
SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.xz"
|
||||
SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.xz \
|
||||
file://fix-path-for-busybox.patch \
|
||||
file://99_resolvconf \
|
||||
"
|
||||
|
||||
|
||||
SRC_URI[md5sum] = "4b8bc86a3cf070e3fd0e9aff7eaaba56"
|
||||
SRC_URI[sha256sum] = "16167f37a77ef4bc4596dcbefece269b6a10d10fa448594ec55ed3303193086e"
|
||||
@@ -24,13 +28,13 @@ do_compile () {
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${sysconfdir}/default/volatiles
|
||||
echo "d root root 0755 ${localstatedir}/run/${BPN}/interface none" \
|
||||
> ${D}${sysconfdir}/default/volatiles/99_resolvconf
|
||||
install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
install -d ${D}${sysconfdir}/tmpfiles.d
|
||||
echo "d /run/${BPN}/interface - - - -" \
|
||||
> ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
|
||||
fi
|
||||
install -d ${D}${base_libdir}/${BPN}
|
||||
install -d ${D}${sysconfdir}/${BPN}
|
||||
ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
|
||||
install -d ${D}${sysconfdir} ${D}${base_sbindir}
|
||||
@@ -38,6 +42,11 @@ do_install () {
|
||||
cp -pPR etc/* ${D}${sysconfdir}/
|
||||
chown -R root:root ${D}${sysconfdir}/
|
||||
install -m 0755 bin/resolvconf ${D}${base_sbindir}/
|
||||
install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
|
||||
install -d ${D}/${sysconfdir}/network/if-up.d
|
||||
install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
|
||||
install -d ${D}/${sysconfdir}/network/if-down.d
|
||||
install -m 0755 debian/resolvconf.resolvconf.if-down ${D}/${sysconfdir}/network/if-down.d/resolvconf
|
||||
install -m 0644 README ${D}${docdir}/${P}/
|
||||
install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
|
||||
}
|
||||
@@ -51,3 +60,5 @@ pkg_postinst_${PN} () {
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
FILES_${PN} += "${base_libdir}/${BPN}"
|
||||
|
||||
@@ -23,7 +23,7 @@ PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}
|
||||
|
||||
FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
|
||||
FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog"
|
||||
FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf"
|
||||
FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*"
|
||||
FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
|
||||
FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
|
||||
FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh"
|
||||
@@ -268,6 +268,8 @@ do_install () {
|
||||
install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev
|
||||
if grep "CONFIG_FEATURE_MDEV_CONF=y" ${B}/.config; then
|
||||
install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf
|
||||
install -d ${D}${sysconfdir}/mdev
|
||||
install -m 0755 ${WORKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
From: Jason Wessel <jason.wessel@windriver.com>
|
||||
Date: Sun, 3 Mar 2013 12:31:40 -0600
|
||||
Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses location
|
||||
|
||||
Upstream-status: Submitted
|
||||
|
||||
[ based on: https://lkml.org/lkml/2013/3/3/103 ]
|
||||
|
||||
This patch syncs up with the way the menuconfig ncurses / curses
|
||||
is detected and the HOST_EXTRACFLAGS works in the Linux kernel
|
||||
and it allows the menuconfig to work with a sysroot version
|
||||
of the curses libraries.
|
||||
|
||||
---
|
||||
|
||||
In some cross build environments such as the Yocto Project build
|
||||
environment it provides an ncurses library that is compiled
|
||||
differently than the host's version. This causes display corruption
|
||||
problems when the host's curses includes are used instead of the
|
||||
includes from the provided compiler are overridden. There is a second
|
||||
case where there is no curses libraries at all on the host system and
|
||||
menuconfig will just fail entirely.
|
||||
|
||||
The solution is simply to allow an override variable in
|
||||
check-lxdialog.sh for environments such as the Yocto Project. Adding
|
||||
a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
|
||||
compiling and linking against the right headers and libraries.
|
||||
|
||||
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
|
||||
cc: Michal Marek <mmarek@suse.cz>
|
||||
cc: linux-kbuild@vger.kernel.org
|
||||
---
|
||||
scripts/kconfig/lxdialog/Makefile | 2 +-
|
||||
scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++
|
||||
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
|
||||
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
|
||||
@@ -4,6 +4,10 @@
|
||||
# What library to link
|
||||
ldflags()
|
||||
{
|
||||
+ if [ x"$CROSS_CURSES_LIB" != x ]; then
|
||||
+ echo "$CROSS_CURSES_LIB"
|
||||
+ exit
|
||||
+ fi
|
||||
for ext in so a dylib ; do
|
||||
for lib in ncursesw ncurses curses ; do
|
||||
$cc -print-file-name=lib${lib}.${ext} | grep -q /
|
||||
@@ -19,6 +23,10 @@ ldflags()
|
||||
# Where is ncurses.h?
|
||||
ccflags()
|
||||
{
|
||||
+ if [ x"$CROSS_CURSES_INC" != x ]; then
|
||||
+ echo "$CROSS_CURSES_INC"
|
||||
+ exit
|
||||
+ fi
|
||||
if [ -f /usr/include/ncursesw/ncurses.h ]; then
|
||||
echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"'
|
||||
elif [ -f /usr/include/ncursesw/curses.h ]; then
|
||||
--- a/scripts/kconfig/lxdialog/Makefile
|
||||
+++ b/scripts/kconfig/lxdialog/Makefile
|
||||
@@ -5,7 +5,7 @@ check-lxdialog := $(srctree)/$(src)/che
|
||||
|
||||
# Use reursively expanded variables so we do not call gcc unless
|
||||
# we really need to do so. (Do not call gcc as part of make mrproper)
|
||||
-HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
|
||||
+HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
|
||||
HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
|
||||
|
||||
HOST_EXTRACFLAGS += -DLOCALE
|
||||
@@ -1,65 +0,0 @@
|
||||
shell/ash.c: fix ice on mips while compiling with -g -O
|
||||
|
||||
Build busybox on mips with -g -O, there is a ice failure:
|
||||
...
|
||||
shell/ash.c:8758:1: internal compiler error: in dwarf2out_var_location, at dwarf2out.c:21264
|
||||
...
|
||||
Please submit a full bug report,
|
||||
with preprocessed source if appropriate.
|
||||
See <http://gcc.gnu.org/bugs.html> for instructions.
|
||||
{standard input}: Assembler messages:
|
||||
{standard input}: Warning: missing .end at end of assembly
|
||||
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
|
||||
...
|
||||
|
||||
The following line caused the ice failure on mips:
|
||||
...
|
||||
void evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__));
|
||||
...
|
||||
So remove evaltreenr which was a alias of evaltree, and use evaltree
|
||||
to instead.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
shell/ash.c | 9 ++-------
|
||||
1 file changed, 2 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/shell/ash.c b/shell/ash.c
|
||||
index 71ef9a6..4462e40 100644
|
||||
--- a/shell/ash.c
|
||||
+++ b/shell/ash.c
|
||||
@@ -8490,11 +8490,6 @@ evaltree(union node *n, int flags)
|
||||
TRACE(("leaving evaltree (no interrupts)\n"));
|
||||
}
|
||||
|
||||
-#if !defined(__alpha__) || (defined(__GNUC__) && __GNUC__ >= 3)
|
||||
-static
|
||||
-#endif
|
||||
-void evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__));
|
||||
-
|
||||
static void
|
||||
evalloop(union node *n, int flags)
|
||||
{
|
||||
@@ -8621,7 +8616,7 @@ evalsubshell(union node *n, int flags)
|
||||
flags &= ~EV_TESTED;
|
||||
nofork:
|
||||
redirect(n->nredir.redirect, 0);
|
||||
- evaltreenr(n->nredir.n, flags);
|
||||
+ evaltree(n->nredir.n, flags);
|
||||
/* never returns */
|
||||
}
|
||||
status = 0;
|
||||
@@ -8740,7 +8735,7 @@ evalpipe(union node *n, int flags)
|
||||
dup2(pip[1], 1);
|
||||
close(pip[1]);
|
||||
}
|
||||
- evaltreenr(lp->n, flags);
|
||||
+ evaltree(lp->n, flags);
|
||||
/* never returns */
|
||||
}
|
||||
if (prevfd >= 0)
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -31,10 +31,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
|
||||
file://login-utilities.cfg \
|
||||
file://0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch \
|
||||
file://recognize_connmand.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_mips = " \
|
||||
${@base_conditional( "DEBUG_BUILD", "1", "file://fix-ice-on-mips-while-compiling-with-g-O.patch", "", d )} \
|
||||
file://busybox-cross-menuconfig.patch \
|
||||
"
|
||||
|
||||
SRC_URI[tarball.md5sum] = "337d1a15ab1cb1d4ed423168b1eb7d7e"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
|
||||
|
||||
RESOLV_CONF="/etc/resolv.conf"
|
||||
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
|
||||
[ -n "$subnet" ] && NETMASK="netmask $subnet"
|
||||
|
||||
# return 0 if root is mounted on a network filesystem
|
||||
@@ -17,8 +16,11 @@ root_is_nfs() {
|
||||
have_bin_ip=0
|
||||
if [ -x /sbin/ip ]; then
|
||||
have_bin_ip=1
|
||||
BROADCAST="broadcast +"
|
||||
fi
|
||||
|
||||
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
|
||||
|
||||
case "$1" in
|
||||
deconfig)
|
||||
if [ -x /sbin/resolvconf ]; then
|
||||
|
||||
@@ -74,6 +74,11 @@ do_install_append() {
|
||||
mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
|
||||
}
|
||||
|
||||
do_install_append_class-native(){
|
||||
# remove groups to fix conflict with shadow-native
|
||||
rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
|
||||
}
|
||||
|
||||
inherit update-alternatives
|
||||
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
|
||||
@@ -92,8 +92,9 @@ do_install_append () {
|
||||
fi
|
||||
|
||||
if [ "${USE_LDCONFIG}" != "1" ]; then
|
||||
# We won't ship this file (see FILES above) so let's not install it
|
||||
# We won't ship these files (see FILES above) so let's not install them
|
||||
rm -f ${D}${sysconfdir}/ld.so.conf
|
||||
rm -f ${D}${base_sbindir}/ldconfig
|
||||
# This directory will be empty now so remove it too.
|
||||
# But check whether it exists first, since it won't for glibc-initial.
|
||||
if [ -d ${D}${sysconfdir} ]; then
|
||||
|
||||
@@ -0,0 +1,339 @@
|
||||
From a5357b7ce2a2982c5778435704bcdb55ce3667a0 Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Law <law@redhat.com>
|
||||
Date: Mon, 15 Dec 2014 10:09:32 +0100
|
||||
Subject: [PATCH] CVE-2012-3406: Stack overflow in vfprintf [BZ #16617]
|
||||
|
||||
A larger number of format specifiers coudld cause a stack overflow,
|
||||
potentially allowing to bypass _FORTIFY_SOURCE format string
|
||||
protection.
|
||||
---
|
||||
ChangeLog | 9 +++++++
|
||||
NEWS | 13 +++++----
|
||||
stdio-common/Makefile | 2 +-
|
||||
stdio-common/bug23-2.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
stdio-common/bug23-3.c | 50 +++++++++++++++++++++++++++++++++++
|
||||
stdio-common/bug23-4.c | 31 ++++++++++++++++++++++
|
||||
stdio-common/vfprintf.c | 40 ++++++++++++++++++++++++++--
|
||||
7 files changed, 207 insertions(+), 8 deletions(-)
|
||||
create mode 100644 stdio-common/bug23-2.c
|
||||
create mode 100644 stdio-common/bug23-3.c
|
||||
create mode 100644 stdio-common/bug23-4.c
|
||||
|
||||
Index: git/ChangeLog
|
||||
===================================================================
|
||||
--- git.orig/ChangeLog
|
||||
+++ git/ChangeLog
|
||||
@@ -1,3 +1,12 @@
|
||||
+2014-12-15 Jeff Law <law@redhat.com>
|
||||
+
|
||||
+ [BZ #16617]
|
||||
+ * stdio-common/vfprintf.c (vfprintf): Allocate large specs array
|
||||
+ on the heap. (CVE-2012-3406)
|
||||
+ * stdio-common/bug23-2.c, stdio-common/bug23-3.c: New file.
|
||||
+ * stdio-common/bug23-4.c: New file. Test case by Joseph Myers.
|
||||
+ * stdio-common/Makefile (tests): Add bug23-2, bug23-3, bug23-4.
|
||||
+
|
||||
2014-11-19 Carlos O'Donell <carlos@redhat.com>
|
||||
Florian Weimer <fweimer@redhat.com>
|
||||
Joseph Myers <joseph@codesourcery.com>
|
||||
Index: git/NEWS
|
||||
===================================================================
|
||||
--- git.orig/NEWS
|
||||
+++ git/NEWS
|
||||
@@ -13,24 +13,28 @@ Version 2.20
|
||||
15698, 15804, 15894, 15946, 16002, 16064, 16095, 16194, 16198, 16275,
|
||||
16284, 16287, 16315, 16348, 16349, 16354, 16357, 16362, 16447, 16516,
|
||||
16532, 16539, 16545, 16561, 16562, 16564, 16574, 16599, 16600, 16609,
|
||||
- 16610, 16611, 16613, 16619, 16623, 16629, 16632, 16634, 16639, 16642,
|
||||
- 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683, 16689, 16695,
|
||||
- 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731, 16739, 16740,
|
||||
- 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789, 16791, 16796,
|
||||
- 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16839, 16849, 16854,
|
||||
- 16876, 16877, 16878, 16882, 16885, 16888, 16890, 16892, 16912, 16915,
|
||||
- 16916, 16917, 16918, 16922, 16927, 16928, 16932, 16943, 16958, 16965,
|
||||
- 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, 17031,
|
||||
- 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, 17079,
|
||||
- 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, 17153,
|
||||
- 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, 17625.
|
||||
-
|
||||
+ 16610, 16611, 16613, 16617, 16619, 16623, 16629, 16632, 16634, 16639,
|
||||
+ 16642, 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683, 16689,
|
||||
+ 16695, 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731, 16739,
|
||||
+ 16740, 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789, 16791,
|
||||
+ 16796, 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16839, 16849,
|
||||
+ 16854, 16876, 16877, 16878, 16882, 16885, 16888, 16890, 16892, 16912,
|
||||
+ 16915, 16916, 16917, 16918, 16922, 16927, 16928, 16932, 16943, 16958,
|
||||
+ 16965, 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022,
|
||||
+ 17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078,
|
||||
+ 17079, 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150,
|
||||
+ 17153, 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354,
|
||||
+ 17625.
|
||||
+
|
||||
* CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag
|
||||
under certain input conditions resulting in the execution of a shell for
|
||||
command substitution when the applicaiton did not request it. The
|
||||
implementation now checks WRDE_NOCMD immediately before executing the
|
||||
shell and returns the error WRDE_CMDSUB as expected.
|
||||
|
||||
+* CVE-2012-3406 printf-style functions could run into a stack overflow when
|
||||
+ processing format strings with a large number of format specifiers.
|
||||
+
|
||||
* Reverted change of ABI data structures for s390 and s390x:
|
||||
On s390 and s390x the size of struct ucontext and jmp_buf was increased in
|
||||
2.19. This change is reverted in 2.20. The introduced 2.19 symbol versions
|
||||
Index: git/stdio-common/bug23-2.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ git/stdio-common/bug23-2.c
|
||||
@@ -0,0 +1,70 @@
|
||||
+#include <stdio.h>
|
||||
+#include <string.h>
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+static const char expected[] = "\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55\
|
||||
+\n\
|
||||
+a\n\
|
||||
+abbcd55%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
|
||||
+
|
||||
+static int
|
||||
+do_test (void)
|
||||
+{
|
||||
+ char *buf = malloc (strlen (expected) + 1);
|
||||
+ snprintf (buf, strlen (expected) + 1,
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
|
||||
+ "a", "b", "c", "d", 5);
|
||||
+ return strcmp (buf, expected) != 0;
|
||||
+}
|
||||
+
|
||||
+#define TEST_FUNCTION do_test ()
|
||||
+#include "../test-skeleton.c"
|
||||
Index: git/stdio-common/bug23-3.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ git/stdio-common/bug23-3.c
|
||||
@@ -0,0 +1,50 @@
|
||||
+#include <stdio.h>
|
||||
+#include <string.h>
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+int
|
||||
+do_test (void)
|
||||
+{
|
||||
+ size_t instances = 16384;
|
||||
+#define X0 "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
+ const char *item = "\na\nabbcd55";
|
||||
+#define X3 X0 X0 X0 X0 X0 X0 X0 X0
|
||||
+#define X6 X3 X3 X3 X3 X3 X3 X3 X3
|
||||
+#define X9 X6 X6 X6 X6 X6 X6 X6 X6
|
||||
+#define X12 X9 X9 X9 X9 X9 X9 X9 X9
|
||||
+#define X14 X12 X12 X12 X12
|
||||
+#define TRAILER "%%%%%%%%%%%%%%%%%%%%%%%%%%"
|
||||
+#define TRAILER2 TRAILER TRAILER
|
||||
+ size_t length = instances * strlen (item) + strlen (TRAILER) + 1;
|
||||
+
|
||||
+ char *buf = malloc (length + 1);
|
||||
+ snprintf (buf, length + 1,
|
||||
+ X14 TRAILER2 "\n",
|
||||
+ "a", "b", "c", "d", 5);
|
||||
+
|
||||
+ const char *p = buf;
|
||||
+ size_t i;
|
||||
+ for (i = 0; i < instances; ++i)
|
||||
+ {
|
||||
+ const char *expected;
|
||||
+ for (expected = item; *expected; ++expected)
|
||||
+ {
|
||||
+ if (*p != *expected)
|
||||
+ {
|
||||
+ printf ("mismatch at offset %zu (%zu): expected %d, got %d\n",
|
||||
+ (size_t) (p - buf), i, *expected & 0xFF, *p & 0xFF);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ ++p;
|
||||
+ }
|
||||
+ }
|
||||
+ if (strcmp (p, TRAILER "\n") != 0)
|
||||
+ {
|
||||
+ printf ("mismatch at trailer: [%s]\n", p);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ free (buf);
|
||||
+ return 0;
|
||||
+}
|
||||
+#define TEST_FUNCTION do_test ()
|
||||
+#include "../test-skeleton.c"
|
||||
Index: git/stdio-common/bug23-4.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ git/stdio-common/bug23-4.c
|
||||
@@ -0,0 +1,31 @@
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include <sys/resource.h>
|
||||
+
|
||||
+#define LIMIT 1000000
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ struct rlimit lim;
|
||||
+ getrlimit (RLIMIT_STACK, &lim);
|
||||
+ lim.rlim_cur = 1048576;
|
||||
+ setrlimit (RLIMIT_STACK, &lim);
|
||||
+ char *fmtstr = malloc (4 * LIMIT + 1);
|
||||
+ if (fmtstr == NULL)
|
||||
+ abort ();
|
||||
+ char *output = malloc (LIMIT + 1);
|
||||
+ if (output == NULL)
|
||||
+ abort ();
|
||||
+ for (size_t i = 0; i < LIMIT; i++)
|
||||
+ memcpy (fmtstr + 4 * i, "%1$d", 4);
|
||||
+ fmtstr[4 * LIMIT] = '\0';
|
||||
+ int ret = snprintf (output, LIMIT + 1, fmtstr, 0);
|
||||
+ if (ret != LIMIT)
|
||||
+ abort ();
|
||||
+ for (size_t i = 0; i < LIMIT; i++)
|
||||
+ if (output[i] != '0')
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
||||
Index: git/stdio-common/vfprintf.c
|
||||
===================================================================
|
||||
--- git.orig/stdio-common/vfprintf.c
|
||||
+++ git/stdio-common/vfprintf.c
|
||||
@@ -276,6 +276,12 @@ vfprintf (FILE *s, const CHAR_T *format,
|
||||
/* For the argument descriptions, which may be allocated on the heap. */
|
||||
void *args_malloced = NULL;
|
||||
|
||||
+ /* For positional argument handling. */
|
||||
+ struct printf_spec *specs;
|
||||
+
|
||||
+ /* Track if we malloced the SPECS array and thus must free it. */
|
||||
+ bool specs_malloced = false;
|
||||
+
|
||||
/* This table maps a character into a number representing a
|
||||
class. In each step there is a destination label for each
|
||||
class. */
|
||||
@@ -1699,8 +1705,8 @@ do_positional:
|
||||
size_t nspecs = 0;
|
||||
/* A more or less arbitrary start value. */
|
||||
size_t nspecs_size = 32 * sizeof (struct printf_spec);
|
||||
- struct printf_spec *specs = alloca (nspecs_size);
|
||||
|
||||
+ specs = alloca (nspecs_size);
|
||||
/* The number of arguments the format string requests. This will
|
||||
determine the size of the array needed to store the argument
|
||||
attributes. */
|
||||
@@ -1743,11 +1749,39 @@ do_positional:
|
||||
if (nspecs * sizeof (*specs) >= nspecs_size)
|
||||
{
|
||||
/* Extend the array of format specifiers. */
|
||||
+ if (nspecs_size * 2 < nspecs_size)
|
||||
+ {
|
||||
+ __set_errno (ENOMEM);
|
||||
+ done = -1;
|
||||
+ goto all_done;
|
||||
+ }
|
||||
struct printf_spec *old = specs;
|
||||
- specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size);
|
||||
+ if (__libc_use_alloca (2 * nspecs_size))
|
||||
+ specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size);
|
||||
+ else
|
||||
+ {
|
||||
+ nspecs_size *= 2;
|
||||
+ specs = malloc (nspecs_size);
|
||||
+ if (specs == NULL)
|
||||
+ {
|
||||
+ __set_errno (ENOMEM);
|
||||
+ specs = old;
|
||||
+ done = -1;
|
||||
+ goto all_done;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
/* Copy the old array's elements to the new space. */
|
||||
memmove (specs, old, nspecs * sizeof (*specs));
|
||||
+
|
||||
+ /* If we had previously malloc'd space for SPECS, then
|
||||
+ release it after the copy is complete. */
|
||||
+ if (specs_malloced)
|
||||
+ free (old);
|
||||
+
|
||||
+ /* Now set SPECS_MALLOCED if needed. */
|
||||
+ if (!__libc_use_alloca (nspecs_size))
|
||||
+ specs_malloced = true;
|
||||
}
|
||||
|
||||
/* Parse the format specifier. */
|
||||
@@ -2068,6 +2102,8 @@ do_positional:
|
||||
}
|
||||
|
||||
all_done:
|
||||
+ if (specs_malloced)
|
||||
+ free (specs);
|
||||
if (__glibc_unlikely (args_malloced != NULL))
|
||||
free (args_malloced);
|
||||
if (__glibc_unlikely (workstart != NULL))
|
||||
Index: git/stdio-common/Makefile
|
||||
===================================================================
|
||||
--- git.orig/stdio-common/Makefile
|
||||
+++ git/stdio-common/Makefile
|
||||
@@ -66,7 +66,7 @@ tests := tstscanf test_rdwr test-popen t
|
||||
tst-fwrite bug16 bug17 tst-sprintf2 bug18 \
|
||||
bug19 tst-popen2 scanf14 scanf15 bug21 bug22 scanf16 scanf17 \
|
||||
tst-setvbuf1 bug23 bug24 bug-vfprintf-nargs tst-sprintf3 bug25 \
|
||||
- tst-printf-round bug26
|
||||
+ tst-printf-round bug23-2 bug23-3 bug23-4
|
||||
|
||||
tests-$(OPTION_EGLIBC_LOCALE_CODE) \
|
||||
+= tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping
|
||||
@@ -0,0 +1,215 @@
|
||||
From a39208bd7fb76c1b01c127b4c61f9bfd915bfe7c Mon Sep 17 00:00:00 2001
|
||||
From: Carlos O'Donell <carlos@redhat.com>
|
||||
Date: Wed, 19 Nov 2014 11:44:12 -0500
|
||||
Subject: [PATCH] CVE-2014-7817: wordexp fails to honour WRDE_NOCMD.
|
||||
|
||||
The function wordexp() fails to properly handle the WRDE_NOCMD
|
||||
flag when processing arithmetic inputs in the form of "$((... ``))"
|
||||
where "..." can be anything valid. The backticks in the arithmetic
|
||||
epxression are evaluated by in a shell even if WRDE_NOCMD forbade
|
||||
command substitution. This allows an attacker to attempt to pass
|
||||
dangerous commands via constructs of the above form, and bypass
|
||||
the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD
|
||||
in exec_comm(), the only place that can execute a shell. All other
|
||||
checks for WRDE_NOCMD are superfluous and removed.
|
||||
|
||||
We expand the testsuite and add 3 new regression tests of roughly
|
||||
the same form but with a couple of nested levels.
|
||||
|
||||
On top of the 3 new tests we add fork validation to the WRDE_NOCMD
|
||||
testing. If any forks are detected during the execution of a wordexp()
|
||||
call with WRDE_NOCMD, the test is marked as failed. This is slightly
|
||||
heuristic since vfork might be used in the future, but it provides a
|
||||
higher level of assurance that no shells were executed as part of
|
||||
command substitution with WRDE_NOCMD in effect. In addition it doesn't
|
||||
require libpthread or libdl, instead we use the public implementation
|
||||
namespace function __register_atfork (already part of the public ABI
|
||||
for libpthread).
|
||||
|
||||
Tested on x86_64 with no regressions.
|
||||
---
|
||||
ChangeLog | 22 ++++++++++++++++++++++
|
||||
NEWS | 8 +++++++-
|
||||
posix/wordexp-test.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
posix/wordexp.c | 16 ++++------------
|
||||
4 files changed, 77 insertions(+), 13 deletions(-)
|
||||
|
||||
Index: git/ChangeLog
|
||||
===================================================================
|
||||
--- git.orig/ChangeLog
|
||||
+++ git/ChangeLog
|
||||
@@ -1,3 +1,24 @@
|
||||
+2014-11-19 Carlos O'Donell <carlos@redhat.com>
|
||||
+ Florian Weimer <fweimer@redhat.com>
|
||||
+ Joseph Myers <joseph@codesourcery.com>
|
||||
+ Adam Conrad <adconrad@0c3.net>
|
||||
+ Andreas Schwab <schwab@suse.de>
|
||||
+ Brooks <bmoses@google.com>
|
||||
+
|
||||
+ [BZ #17625]
|
||||
+ * wordexp-test.c (__dso_handle): Add prototype.
|
||||
+ (__register_atfork): Likewise.
|
||||
+ (__app_register_atfork): New function.
|
||||
+ (registered_forks): New global.
|
||||
+ (register_fork): New function.
|
||||
+ (test_case): Add 3 new tests for WRDE_CMDSUB.
|
||||
+ (main): Call __app_register_atfork.
|
||||
+ (testit): If WRDE_NOCMD set registered_forks to zero, run test, and if
|
||||
+ fork count is non-zero fail the test.
|
||||
+ * posix/wordexp.c (exec_comm): Return WRDE_CMDSUB if WRDE_NOCMD flag
|
||||
+ is set.
|
||||
+ (parse_dollars): Remove check for WRDE_NOCMD.
|
||||
+
|
||||
2014-09-07 Allan McRae <allan@archlinux.org
|
||||
|
||||
* version.h (RELEASE): Set to "stable".
|
||||
Index: git/NEWS
|
||||
===================================================================
|
||||
--- git.orig/NEWS
|
||||
+++ git/NEWS
|
||||
@@ -23,7 +23,13 @@ Version 2.20
|
||||
16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, 17031,
|
||||
17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, 17079,
|
||||
17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, 17153,
|
||||
- 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354.
|
||||
+ 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, 17625.
|
||||
+
|
||||
+* CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag
|
||||
+ under certain input conditions resulting in the execution of a shell for
|
||||
+ command substitution when the applicaiton did not request it. The
|
||||
+ implementation now checks WRDE_NOCMD immediately before executing the
|
||||
+ shell and returns the error WRDE_CMDSUB as expected.
|
||||
|
||||
* Reverted change of ABI data structures for s390 and s390x:
|
||||
On s390 and s390x the size of struct ucontext and jmp_buf was increased in
|
||||
Index: git/posix/wordexp-test.c
|
||||
===================================================================
|
||||
--- git.orig/posix/wordexp-test.c
|
||||
+++ git/posix/wordexp-test.c
|
||||
@@ -27,6 +27,25 @@
|
||||
|
||||
#define IFS " \n\t"
|
||||
|
||||
+extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden")));
|
||||
+extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *);
|
||||
+
|
||||
+static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void))
|
||||
+{
|
||||
+ return __register_atfork (prepare, parent, child,
|
||||
+ &__dso_handle == NULL ? NULL : __dso_handle);
|
||||
+}
|
||||
+
|
||||
+/* Number of forks seen. */
|
||||
+static int registered_forks;
|
||||
+
|
||||
+/* For each fork increment the fork count. */
|
||||
+static void
|
||||
+register_fork (void)
|
||||
+{
|
||||
+ registered_forks++;
|
||||
+}
|
||||
+
|
||||
struct test_case_struct
|
||||
{
|
||||
int retval;
|
||||
@@ -206,6 +225,12 @@ struct test_case_struct
|
||||
{ WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS },
|
||||
{ WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS },
|
||||
{ WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS },
|
||||
+ /* Test for CVE-2014-7817. We test 3 combinations of command
|
||||
+ substitution inside an arithmetic expression to make sure that
|
||||
+ no commands are executed and error is returned. */
|
||||
+ { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
|
||||
+ { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
|
||||
+ { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS },
|
||||
|
||||
{ -1, NULL, NULL, 0, 0, { NULL, }, IFS },
|
||||
};
|
||||
@@ -258,6 +283,15 @@ main (int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ /* If we are not allowed to do command substitution, we install
|
||||
+ fork handlers to verify that no forks happened. No forks should
|
||||
+ happen at all if command substitution is disabled. */
|
||||
+ if (__app_register_atfork (register_fork, NULL, NULL) != 0)
|
||||
+ {
|
||||
+ printf ("Failed to register fork handler.\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
for (test = 0; test_case[test].retval != -1; test++)
|
||||
if (testit (&test_case[test]))
|
||||
++fail;
|
||||
@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc)
|
||||
|
||||
printf ("Test %d (%s): ", ++tests, tc->words);
|
||||
|
||||
+ if (tc->flags & WRDE_NOCMD)
|
||||
+ registered_forks = 0;
|
||||
+
|
||||
if (tc->flags & WRDE_APPEND)
|
||||
{
|
||||
/* initial wordexp() call, to be appended to */
|
||||
@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc)
|
||||
}
|
||||
retval = wordexp (tc->words, &we, tc->flags);
|
||||
|
||||
+ if ((tc->flags & WRDE_NOCMD)
|
||||
+ && (registered_forks > 0))
|
||||
+ {
|
||||
+ printf ("FAILED fork called for WRDE_NOCMD\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
if (tc->flags & WRDE_DOOFFS)
|
||||
start_offs = sav_we.we_offs;
|
||||
|
||||
Index: git/posix/wordexp.c
|
||||
===================================================================
|
||||
--- git.orig/posix/wordexp.c
|
||||
+++ git/posix/wordexp.c
|
||||
@@ -893,6 +893,10 @@ exec_comm (char *comm, char **word, size
|
||||
pid_t pid;
|
||||
int noexec = 0;
|
||||
|
||||
+ /* Do nothing if command substitution should not succeed. */
|
||||
+ if (flags & WRDE_NOCMD)
|
||||
+ return WRDE_CMDSUB;
|
||||
+
|
||||
/* Don't fork() unless necessary */
|
||||
if (!comm || !*comm)
|
||||
return 0;
|
||||
@@ -2082,9 +2086,6 @@ parse_dollars (char **word, size_t *word
|
||||
}
|
||||
}
|
||||
|
||||
- if (flags & WRDE_NOCMD)
|
||||
- return WRDE_CMDSUB;
|
||||
-
|
||||
(*offset) += 2;
|
||||
return parse_comm (word, word_length, max_length, words, offset, flags,
|
||||
quoted? NULL : pwordexp, ifs, ifs_white);
|
||||
@@ -2196,9 +2197,6 @@ parse_dquote (char **word, size_t *word_
|
||||
break;
|
||||
|
||||
case '`':
|
||||
- if (flags & WRDE_NOCMD)
|
||||
- return WRDE_CMDSUB;
|
||||
-
|
||||
++(*offset);
|
||||
error = parse_backtick (word, word_length, max_length, words,
|
||||
offset, flags, NULL, NULL, NULL);
|
||||
@@ -2357,12 +2355,6 @@ wordexp (const char *words, wordexp_t *p
|
||||
break;
|
||||
|
||||
case '`':
|
||||
- if (flags & WRDE_NOCMD)
|
||||
- {
|
||||
- error = WRDE_CMDSUB;
|
||||
- goto do_error;
|
||||
- }
|
||||
-
|
||||
++words_offset;
|
||||
error = parse_backtick (&word, &word_length, &max_length, words,
|
||||
&words_offset, flags, pwordexp, ifs,
|
||||
@@ -5724,7 +5724,7 @@ Index: git/posix/regex.h
|
||||
# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
|
||||
|
||||
+/* EGLIBC: Old regex implementation does not support these. */
|
||||
+# ifdef __OPTION_POSIX_REGEXP_GLIBC
|
||||
+# if __OPTION_POSIX_REGEXP_GLIBC
|
||||
/* If this bit is set, then ignore case when matching.
|
||||
If not set, then case is significant. */
|
||||
# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
|
||||
@@ -5740,7 +5740,7 @@ Index: git/posix/regex.h
|
||||
(RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
|
||||
| RE_INTERVALS | RE_NO_EMPTY_RANGES)
|
||||
|
||||
+#ifdef __OPTION_POSIX_REGEXP_GLIBC
|
||||
+#if __OPTION_POSIX_REGEXP_GLIBC
|
||||
#define RE_SYNTAX_POSIX_BASIC \
|
||||
(_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
|
||||
+#else
|
||||
@@ -5754,7 +5754,7 @@ Index: git/posix/regex.h
|
||||
/* Like REG_NOTBOL, except for the end-of-line. */
|
||||
#define REG_NOTEOL (1 << 1)
|
||||
|
||||
+#ifdef __OPTION_POSIX_REGEXP_GLIBC
|
||||
+#if __OPTION_POSIX_REGEXP_GLIBC
|
||||
/* Use PMATCH[0] to delimit the start and end of the search in the
|
||||
buffer. */
|
||||
#define REG_STARTEND (1 << 2)
|
||||
@@ -15542,7 +15542,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||
libc_hidden_proto (__nldbl___isoc99_vsscanf)
|
||||
libc_hidden_proto (__nldbl___isoc99_vfscanf)
|
||||
+
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+libc_hidden_proto (__nldbl_vfwscanf)
|
||||
+libc_hidden_proto (__nldbl_vswscanf)
|
||||
+libc_hidden_proto (__nldbl_vfwprintf)
|
||||
@@ -15559,7 +15559,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||
}
|
||||
weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf)
|
||||
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
int
|
||||
attribute_compat_text_section weak_function
|
||||
__nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...)
|
||||
@@ -15575,7 +15575,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||
return done;
|
||||
}
|
||||
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
int
|
||||
attribute_compat_text_section
|
||||
__nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...)
|
||||
@@ -15591,7 +15591,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||
}
|
||||
libc_hidden_def (__nldbl_vdprintf)
|
||||
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
int
|
||||
attribute_compat_text_section weak_function
|
||||
__nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap)
|
||||
@@ -15607,7 +15607,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||
libc_hidden_def (__nldbl_vsnprintf)
|
||||
weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf)
|
||||
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
int
|
||||
attribute_compat_text_section weak_function
|
||||
__nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt,
|
||||
@@ -15623,7 +15623,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||
return done;
|
||||
}
|
||||
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
int
|
||||
attribute_compat_text_section
|
||||
__nldbl_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
|
||||
@@ -15639,7 +15639,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||
return done;
|
||||
}
|
||||
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
int
|
||||
attribute_compat_text_section
|
||||
__nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...)
|
||||
@@ -15655,7 +15655,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||
return done;
|
||||
}
|
||||
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
int
|
||||
attribute_compat_text_section
|
||||
__nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen,
|
||||
@@ -15671,7 +15671,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||
}
|
||||
libc_hidden_def (__nldbl___vfprintf_chk)
|
||||
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
int
|
||||
attribute_compat_text_section
|
||||
__nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap)
|
||||
@@ -15687,7 +15687,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||
}
|
||||
libc_hidden_def (__nldbl___vsprintf_chk)
|
||||
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
int
|
||||
attribute_compat_text_section
|
||||
__nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen,
|
||||
@@ -15719,7 +15719,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||
return done;
|
||||
}
|
||||
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
int
|
||||
attribute_compat_text_section
|
||||
__nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
|
||||
@@ -15735,7 +15735,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||
compat_symbol (libc, __nldbl___strfmon_l, __strfmon_l, GLIBC_2_1);
|
||||
#endif
|
||||
#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2)
|
||||
+# ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+# if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
compat_symbol (libc, __nldbl_swprintf, swprintf, GLIBC_2_2);
|
||||
compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2);
|
||||
compat_symbol (libc, __nldbl_wprintf, wprintf, GLIBC_2_2);
|
||||
@@ -15783,7 +15783,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
|
||||
NLDBL_DECL (__isoc99_vscanf);
|
||||
NLDBL_DECL (__isoc99_vfscanf);
|
||||
NLDBL_DECL (__isoc99_vsscanf);
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+NLDBL_DECL (vfwscanf);
|
||||
+NLDBL_DECL (vfwprintf);
|
||||
+NLDBL_DECL (vswprintf);
|
||||
@@ -15819,7 +15819,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
|
||||
_G_va_list) __THROW;
|
||||
extern void __nldbl___vsyslog_chk (int, int, const char *, va_list);
|
||||
-
|
||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||
+extern int __nldbl___vfwprintf_chk (FILE *__restrict, int,
|
||||
+ const wchar_t *__restrict, __gnuc_va_list);
|
||||
+extern int __nldbl___vswprintf_chk (wchar_t *__restrict, size_t, int, size_t,
|
||||
|
||||
@@ -1358,8 +1358,8 @@ Index: git/scripts/option-groups.awk
|
||||
+ print " It defines macros that indicate which EGLIBC option groups were"
|
||||
+ print " configured in 'option-groups.config' when this C library was"
|
||||
+ print " built. For each option group named OPTION_foo, it #defines"
|
||||
+ print " __OPTION_foo to be 1 if the group is enabled, or leaves that"
|
||||
+ print " symbol undefined if the group is disabled. */"
|
||||
+ print " __OPTION_foo to be 1 if the group is enabled, or #defines that"
|
||||
+ print " symbol to be 0 if the group is disabled. */"
|
||||
+ print ""
|
||||
+ print "#ifndef __GNU_OPTION_GROUPS_H"
|
||||
+ print "#define __GNU_OPTION_GROUPS_H"
|
||||
@@ -1379,7 +1379,7 @@ Index: git/scripts/option-groups.awk
|
||||
+ if (vars[var] == "y")
|
||||
+ print "#define __" var " 1"
|
||||
+ else if (vars[var] == "n")
|
||||
+ print "/* #undef __" var " */"
|
||||
+ print "#define __" var " 0"
|
||||
+ else if (vars[var] ~ /^[0-9]+/ ||
|
||||
+ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
|
||||
+ vars[var] ~ /^\"/)
|
||||
|
||||
@@ -24,6 +24,7 @@ SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master \
|
||||
file://grok_gold.patch \
|
||||
file://fix_am_rootsbindir.patch \
|
||||
${EGLIBCPATCHES} \
|
||||
${CVEPATCHES} \
|
||||
"
|
||||
EGLIBCPATCHES = "\
|
||||
file://timezone-re-written-tzselect-as-posix-sh.patch \
|
||||
@@ -40,6 +41,10 @@ EGLIBCPATCHES = "\
|
||||
# file://initgroups_keys.patch \
|
||||
#
|
||||
|
||||
CVEPATCHES = "\
|
||||
file://CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch \
|
||||
file://CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch \
|
||||
"
|
||||
LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
|
||||
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||
file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Fix problem during parsing of ELF headers for 64bit on big-endian.
|
||||
Some header fields were read with wrong size.
|
||||
|
||||
2014/10/24
|
||||
Par Olsson <Par.Olsson@windriver.com>
|
||||
Shan Hai <shan.hai@windriver.com>
|
||||
|
||||
diff --git a/readelflib.c b/readelflib.c
|
||||
index 3f5b25b..0bf0de3 100644
|
||||
--- a/readelflib.c
|
||||
+++ b/readelflib.c
|
||||
@@ -261,8 +261,8 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
|
||||
int i;
|
||||
unsigned int j;
|
||||
Elf64_Addr loadaddr;
|
||||
- unsigned int dynamic_addr;
|
||||
- size_t dynamic_size;
|
||||
+ Elf64_Addr dynamic_addr;
|
||||
+ Elf64_Xword dynamic_size;
|
||||
char *program_interpreter;
|
||||
|
||||
Elf64_Ehdr *elf_header;
|
||||
@@ -311,7 +311,7 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
|
||||
error (0, 0, _("more than one dynamic segment\n"));
|
||||
|
||||
dynamic_addr = read64(segment->p_offset, be);
|
||||
- dynamic_size = read32(segment->p_filesz, be);
|
||||
+ dynamic_size = read64(segment->p_filesz, be);
|
||||
break;
|
||||
|
||||
case PT_INTERP:
|
||||
@@ -329,11 +329,11 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
|
||||
break;
|
||||
|
||||
case PT_NOTE:
|
||||
- if (!*osversion && read32(segment->p_filesz, be) >= 32 && read32(segment->p_align, be) >= 4)
|
||||
+ if (!*osversion && read64(segment->p_filesz, be) >= 32 && read64(segment->p_align, be) >= 4)
|
||||
{
|
||||
Elf64_Word *abi_note = (Elf64_Word *) (file_contents
|
||||
+ read64(segment->p_offset, be));
|
||||
- Elf64_Addr size = read32(segment->p_filesz, be);
|
||||
+ Elf64_Xword size = read64(segment->p_filesz, be);
|
||||
|
||||
while (read32(abi_note [0], be) != 4 || read32(abi_note [1], be) != 16
|
||||
|| read32(abi_note [2], be) != 1
|
||||
@@ -12,6 +12,7 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
|
||||
file://flag_fix.patch \
|
||||
file://endianess-header.patch \
|
||||
file://ldconfig-default-to-all-multilib-dirs.patch \
|
||||
file://endian-ness_handling_fix.patch \
|
||||
"
|
||||
|
||||
PR = "r2"
|
||||
|
||||
@@ -21,7 +21,7 @@ IMAGE_FSTYPES = "vmdk"
|
||||
|
||||
inherit core-image
|
||||
|
||||
SRCREV ?= "f0a2a2f44587f02fa7f434e82f91a6de2231f6b6"
|
||||
SRCREV ?= "b6e41cf7442c827ff3f53f6fccef194b313836e4"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=dizzy \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
@@ -9,42 +9,23 @@ TOOLCHAIN_TARGET_TASK ?= ""
|
||||
|
||||
TOOLCHAIN_HOST_TASK ?= "\
|
||||
nativesdk-python-core \
|
||||
nativesdk-python-textutils \
|
||||
nativesdk-python-sqlite3 \
|
||||
nativesdk-python-pickle \
|
||||
nativesdk-python-logging \
|
||||
nativesdk-python-elementtree \
|
||||
nativesdk-python-curses \
|
||||
nativesdk-python-compile \
|
||||
nativesdk-python-compiler \
|
||||
nativesdk-python-fcntl \
|
||||
nativesdk-python-shell \
|
||||
nativesdk-python-modules \
|
||||
nativesdk-python-misc \
|
||||
nativesdk-python-multiprocessing \
|
||||
nativesdk-python-subprocess \
|
||||
nativesdk-python-xmlrpc \
|
||||
nativesdk-python-netclient \
|
||||
nativesdk-python-netserver \
|
||||
nativesdk-python-distutils \
|
||||
nativesdk-python-unixadmin \
|
||||
nativesdk-python-compression \
|
||||
nativesdk-python-json \
|
||||
nativesdk-python-unittest \
|
||||
nativesdk-python-mmap \
|
||||
nativesdk-python-difflib \
|
||||
nativesdk-python-pprint \
|
||||
nativesdk-python-git \
|
||||
nativesdk-python-pkgutil \
|
||||
nativesdk-ncurses-terminfo-base \
|
||||
nativesdk-chrpath \
|
||||
nativesdk-tar \
|
||||
nativesdk-buildtools-perl-dummy \
|
||||
nativesdk-git \
|
||||
nativesdk-git-perltools \
|
||||
nativesdk-pigz \
|
||||
nativesdk-make \
|
||||
nativesdk-wget \
|
||||
nativesdk-ca-certificates \
|
||||
"
|
||||
|
||||
SDK_PACKAGE_ARCHS =+ "buildtools-dummy-${SDKPKGSUFFIX}"
|
||||
|
||||
TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-buildtools-nativesdk-standalone-${DISTRO_VERSION}"
|
||||
|
||||
RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
|
||||
|
||||
@@ -42,6 +42,7 @@ python do_generate_content() {
|
||||
# Load overrides from 'd' to avoid having to reset the value...
|
||||
overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
|
||||
localdata.setVar("OVERRIDES", overrides)
|
||||
localdata.setVar("MLPREFIX", item + "-")
|
||||
bb.data.update_data(localdata)
|
||||
bb.build.exec_func("create_sdk_files", localdata)
|
||||
}
|
||||
|
||||
18
meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
Normal file
18
meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
Normal file
@@ -0,0 +1,18 @@
|
||||
SUMMARY = "Dummy package which ensures perl is excluded from buildtools"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
inherit nativesdk
|
||||
|
||||
# Put it somewhere separate to ensure it's never used except when we want it
|
||||
PACKAGE_ARCH = "buildtools-dummy-${SDKPKGSUFFIX}"
|
||||
|
||||
PERLPACKAGES = "nativesdk-perl \
|
||||
nativesdk-perl-module-file-path"
|
||||
|
||||
ALLOW_EMPTY_${PN} = "1"
|
||||
|
||||
python populate_packages_prepend() {
|
||||
d.appendVar('RPROVIDES_${PN}', '${PERLPACKAGES}')
|
||||
d.appendVar('RCONFLICTS_${PN}', '${PERLPACKAGES}')
|
||||
}
|
||||
@@ -120,6 +120,7 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
|
||||
gettext \
|
||||
gettext-runtime \
|
||||
git \
|
||||
git-perltools \
|
||||
grep \
|
||||
groff \
|
||||
gzip \
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 8ef852a5be72c75e17f2510bea52455f809b56ce Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Fri, 28 Mar 2014 14:07:42 -0400
|
||||
Subject: [PATCH 04/10] Readline-6.3 patch 2
|
||||
|
||||
Fixes multi-key issue identified in this thread:
|
||||
http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00010.html
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
||||
---
|
||||
readline.c | 3 ++-
|
||||
1 files changed, 2 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/readline.c b/readline.c
|
||||
index eb4eae3..abb29a0 100644
|
||||
--- a/readline.c
|
||||
+++ b/readline.c
|
||||
@@ -744,7 +744,8 @@ _rl_dispatch_callback (cxt)
|
||||
r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
|
||||
|
||||
RL_CHECK_SIGNALS ();
|
||||
- if (r == 0) /* success! */
|
||||
+ /* We only treat values < 0 specially to simulate recursion. */
|
||||
+ if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */
|
||||
{
|
||||
_rl_keyseq_chain_dispose ();
|
||||
RL_UNSETSTATE (RL_STATE_MULTIKEY);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
require readline.inc
|
||||
|
||||
SRC_URI += "file://readline63-003"
|
||||
SRC_URI += "file://readline63-003 \
|
||||
file://readline-dispatch-multikey.patch"
|
||||
|
||||
SRC_URI[archive.md5sum] = "33c8fb279e981274f485fd91da77e94a"
|
||||
SRC_URI[archive.sha256sum] = "56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43"
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
From 4dc8dee0435bb63cbe474004b0a8df0363fe94dd Mon Sep 17 00:00:00 2001
|
||||
From: Dan McGregor <dan.mcgregor@usask.ca>
|
||||
Date: Fri, 5 Sep 2014 06:28:58 -0600
|
||||
Subject: [PATCH] Make root's home directory configurable.
|
||||
|
||||
OpenEmbedded has a configurable home directory for root. Allow
|
||||
systemd to be built using its idea of what root's home directory
|
||||
should be.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
|
||||
---
|
||||
Makefile.am | 2 ++
|
||||
configure.ac | 7 +++++++
|
||||
src/core/unit-printf.c | 2 +-
|
||||
src/nspawn/nspawn.c | 4 ++--
|
||||
src/shared/util.c | 4 ++--
|
||||
units/console-shell.service.m4.in | 4 ++--
|
||||
units/emergency.service.in | 4 ++--
|
||||
units/rescue.service.m4.in | 4 ++--
|
||||
8 files changed, 20 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 4028112..5d18f5c 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -191,6 +191,7 @@ AM_CPPFLAGS = \
|
||||
-DKEXEC=\"$(KEXEC)\" \
|
||||
-DLIBDIR=\"$(libdir)\" \
|
||||
-DROOTLIBDIR=\"$(rootlibdir)\" \
|
||||
+ -DROOTHOMEDIR=\"$(roothomedir)\" \
|
||||
-DTEST_DIR=\"$(abs_top_srcdir)/test\" \
|
||||
-I $(top_srcdir)/src \
|
||||
-I $(top_builddir)/src/shared \
|
||||
@@ -5584,6 +5585,7 @@ EXTRA_DIST += \
|
||||
substitutions = \
|
||||
'|rootlibexecdir=$(rootlibexecdir)|' \
|
||||
'|rootbindir=$(rootbindir)|' \
|
||||
+ '|roothomedir=$(roothomedir)|' \
|
||||
'|bindir=$(bindir)|' \
|
||||
'|SYSTEMCTL=$(rootbindir)/systemctl|' \
|
||||
'|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 18b7198..365bc73 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1272,6 +1272,11 @@ AC_ARG_WITH([rootlibdir],
|
||||
[],
|
||||
[with_rootlibdir=${libdir}])
|
||||
|
||||
+AC_ARG_WITH([roothomedir],
|
||||
+ AS_HELP_STRING([--with-roothomedir=DIR], [Home directory for the root user]),
|
||||
+ [],
|
||||
+ [with_roothomedir=/root])
|
||||
+
|
||||
AC_ARG_WITH([pamlibdir],
|
||||
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
|
||||
[],
|
||||
@@ -1317,6 +1322,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
|
||||
AC_SUBST([pamconfdir], [$with_pamconfdir])
|
||||
AC_SUBST([rootprefix], [$with_rootprefix])
|
||||
AC_SUBST([rootlibdir], [$with_rootlibdir])
|
||||
+AC_SUBST([roothomedir], [$with_roothomedir])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile po/Makefile.in
|
||||
@@ -1400,6 +1406,7 @@ AC_MSG_RESULT([
|
||||
include_prefix: ${INCLUDE_PREFIX}
|
||||
lib dir: ${libdir}
|
||||
rootlib dir: ${with_rootlibdir}
|
||||
+ root home dir: ${with_roothomedir}
|
||||
SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
|
||||
SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
|
||||
Build Python: ${PYTHON}
|
||||
diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c
|
||||
index 62599d0..852d34c 100644
|
||||
--- a/src/core/unit-printf.c
|
||||
+++ b/src/core/unit-printf.c
|
||||
@@ -259,7 +259,7 @@ static int specifier_user_home(char specifier, void *data, void *userdata, char
|
||||
* best of it if we can, but fail if we can't */
|
||||
|
||||
if (!c->user || streq(c->user, "root") || streq(c->user, "0"))
|
||||
- n = strdup("/root");
|
||||
+ n = strdup(ROOTHOMEDIR);
|
||||
else
|
||||
return -ENOTSUP;
|
||||
|
||||
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
|
||||
index d01da45..3e876d5 100644
|
||||
--- a/src/nspawn/nspawn.c
|
||||
+++ b/src/nspawn/nspawn.c
|
||||
@@ -3312,7 +3312,7 @@ int main(int argc, char *argv[]) {
|
||||
if (r < 0)
|
||||
_exit(EXIT_FAILURE);
|
||||
|
||||
- if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
|
||||
+ if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
|
||||
(asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
|
||||
(asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) {
|
||||
log_oom();
|
||||
@@ -3402,7 +3402,7 @@ int main(int argc, char *argv[]) {
|
||||
} else if (argc > optind)
|
||||
execvpe(argv[optind], argv + optind, env_use);
|
||||
else {
|
||||
- chdir(home ? home : "/root");
|
||||
+ chdir(home ? home : ROOTHOMEDIR);
|
||||
execle("/bin/bash", "-bash", NULL, env_use);
|
||||
execle("/bin/sh", "-sh", NULL, env_use);
|
||||
}
|
||||
diff --git a/src/shared/util.c b/src/shared/util.c
|
||||
index 85a570a..aef6033 100644
|
||||
--- a/src/shared/util.c
|
||||
+++ b/src/shared/util.c
|
||||
@@ -4377,7 +4377,7 @@ int get_user_creds(
|
||||
*gid = 0;
|
||||
|
||||
if (home)
|
||||
- *home = "/root";
|
||||
+ *home = ROOTHOMEDIR;
|
||||
|
||||
if (shell)
|
||||
*shell = "/bin/sh";
|
||||
@@ -5363,7 +5363,7 @@ int get_home_dir(char **_h) {
|
||||
/* Hardcode home directory for root to avoid NSS */
|
||||
u = getuid();
|
||||
if (u == 0) {
|
||||
- h = strdup("/root");
|
||||
+ h = strdup(ROOTHOMEDIR);
|
||||
if (!h)
|
||||
return -ENOMEM;
|
||||
|
||||
diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in
|
||||
index 3f4904a..e2af652 100644
|
||||
--- a/units/console-shell.service.m4.in
|
||||
+++ b/units/console-shell.service.m4.in
|
||||
@@ -15,8 +15,8 @@ After=rc-local.service
|
||||
Before=getty.target
|
||||
|
||||
[Service]
|
||||
-Environment=HOME=/root
|
||||
-WorkingDirectory=/root
|
||||
+Environment=HOME=@roothomedir@
|
||||
+WorkingDirectory=@roothomedir@
|
||||
ExecStart=-/sbin/sulogin
|
||||
ExecStopPost=-@SYSTEMCTL@ poweroff
|
||||
Type=idle
|
||||
diff --git a/units/emergency.service.in b/units/emergency.service.in
|
||||
index 91fc1bb..659547e 100644
|
||||
--- a/units/emergency.service.in
|
||||
+++ b/units/emergency.service.in
|
||||
@@ -13,8 +13,8 @@ Conflicts=shutdown.target
|
||||
Before=shutdown.target
|
||||
|
||||
[Service]
|
||||
-Environment=HOME=/root
|
||||
-WorkingDirectory=/root
|
||||
+Environment=HOME=@roothomedir@
|
||||
+WorkingDirectory=@roothomedir@
|
||||
ExecStartPre=-/bin/plymouth quit
|
||||
ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
|
||||
ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
|
||||
diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
|
||||
index ef54369..7aad86f 100644
|
||||
--- a/units/rescue.service.m4.in
|
||||
+++ b/units/rescue.service.m4.in
|
||||
@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service
|
||||
Before=shutdown.target
|
||||
|
||||
[Service]
|
||||
-Environment=HOME=/root
|
||||
-WorkingDirectory=/root
|
||||
+Environment=HOME=@roothomedir@
|
||||
+WorkingDirectory=@roothomedir@
|
||||
ExecStartPre=-/bin/plymouth quit
|
||||
ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
|
||||
ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
|
||||
--
|
||||
1.9.3
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 2173cbf847fc53ca24950e77958c902edecfc207 Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Brunel <jjk@jjacky.com>
|
||||
Date: Fri, 5 Dec 2014 16:06:45 +0100
|
||||
Subject: [PATCH] journal: Fix navigating backwards missing entries
|
||||
|
||||
With DIRECTION_UP (i.e. navigating backwards) in generic_array_bisect() when the
|
||||
needle was found as the last item in the array, it wasn't actually processed as
|
||||
match, resulting in entries being missed.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=86855
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Jonathan Liu <net147@gmail.com>
|
||||
---
|
||||
src/journal/journal-file.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
|
||||
index 7858435..c5d2d19 100644
|
||||
--- a/src/journal/journal-file.c
|
||||
+++ b/src/journal/journal-file.c
|
||||
@@ -1657,7 +1657,7 @@ static int generic_array_bisect(
|
||||
}
|
||||
}
|
||||
|
||||
- if (k > n) {
|
||||
+ if (k >= n) {
|
||||
if (direction == DIRECTION_UP) {
|
||||
i = n;
|
||||
subtract_one = true;
|
||||
--
|
||||
2.1.3
|
||||
@@ -0,0 +1,26 @@
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Subject: systemd-user: avoid using system-auth
|
||||
|
||||
In OE, we don't provide system-auth, instead, we use common-* files.
|
||||
So modify systemd-user file to use common-* files.
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
src/login/systemd-user | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/login/systemd-user b/src/login/systemd-user
|
||||
index 8112d74..99635af 100644
|
||||
--- a/src/login/systemd-user
|
||||
+++ b/src/login/systemd-user
|
||||
@@ -2,5 +2,5 @@
|
||||
#
|
||||
# Used by systemd --user instances.
|
||||
|
||||
-account include system-auth
|
||||
-session include system-auth
|
||||
+account include common-account
|
||||
+session include common-session
|
||||
--
|
||||
1.9.1
|
||||
@@ -32,6 +32,9 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
|
||||
file://uclibc-get-physmem.patch \
|
||||
file://0001-add-support-for-executing-scripts-under-etc-rcS.d.patch \
|
||||
file://0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch \
|
||||
file://0001-Make-root-s-home-directory-configurable.patch \
|
||||
file://0001-systemd-user-avoid-using-system-auth.patch \
|
||||
file://0001-journal-Fix-navigating-backwards-missing-entries.patch \
|
||||
file://touchscreen.rules \
|
||||
file://00-create-volatile.conf \
|
||||
file://init \
|
||||
@@ -62,6 +65,8 @@ PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicroht
|
||||
PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
|
||||
PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
|
||||
PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
|
||||
PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
|
||||
PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
|
||||
|
||||
CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill"
|
||||
|
||||
@@ -74,6 +79,7 @@ rootlibexecdir = "${rootprefix}/lib"
|
||||
# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
|
||||
EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
|
||||
--with-rootlibdir=${rootlibdir} \
|
||||
--with-roothomedir=${ROOT_HOME} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
|
||||
--disable-manpages \
|
||||
--disable-coredump \
|
||||
@@ -99,7 +105,6 @@ do_configure_prepend() {
|
||||
else
|
||||
cp -r ${S}/units ${S}/units.pre_sed
|
||||
fi
|
||||
sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service*
|
||||
sed -i '/ln --relative --help/d' ${S}/configure.ac
|
||||
sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am
|
||||
sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am
|
||||
@@ -129,9 +134,6 @@ do_install() {
|
||||
sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
|
||||
fi
|
||||
|
||||
# Move libgudev back to ${rootlibdir} to keep backward compatibility
|
||||
[ ${rootlibdir} != ${libdir} ] && mv -t ${D}${rootlibdir} ${D}${libdir}/libgudev*
|
||||
|
||||
# Delete journal README, as log can be symlinked inside volatile.
|
||||
rm -f ${D}/${localstatedir}/log/README
|
||||
|
||||
@@ -171,10 +173,10 @@ python populate_packages_prepend (){
|
||||
systemdlibdir = d.getVar("rootlibdir", True)
|
||||
do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
|
||||
}
|
||||
PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
|
||||
PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
|
||||
|
||||
PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
|
||||
${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh"
|
||||
${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh libgudev"
|
||||
|
||||
SYSTEMD_PACKAGES = "${PN}-binfmt"
|
||||
SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
|
||||
@@ -188,6 +190,8 @@ FILES_${PN}-analyze = "${bindir}/systemd-analyze"
|
||||
FILES_${PN}-initramfs = "/init"
|
||||
RDEPENDS_${PN}-initramfs = "${PN}"
|
||||
|
||||
FILES_libgudev = "${libdir}/libgudev*${SOLIBS}"
|
||||
|
||||
# The test cases need perl and bash to run correctly.
|
||||
RDEPENDS_${PN}-ptest += "perl bash"
|
||||
FILES_${PN}-ptest += "${libdir}/udev/rules.d"
|
||||
|
||||
@@ -23,7 +23,7 @@ do_install() {
|
||||
do
|
||||
j=`echo ${i} | sed s/\;/\ /g`
|
||||
label=`echo ${i} | sed -e 's/^.*;tty//' -e 's/;.*//'`
|
||||
echo "$label:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
|
||||
echo "$label:12345:respawn:${base_sbindir}/getty -L ${j}" >> ${D}${sysconfdir}/inittab
|
||||
done
|
||||
|
||||
if [ "${USE_VT}" = "1" ]; then
|
||||
|
||||
@@ -99,7 +99,7 @@ case "$1" in
|
||||
kill_udevd > "/dev/null" 2>&1
|
||||
|
||||
# trigger the sorted events
|
||||
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
|
||||
[ -e /proc/sys/kernel/hotplug ] && echo -e '\000' >/proc/sys/kernel/hotplug
|
||||
@UDEVD@ -d
|
||||
|
||||
udevadm control --env=STARTUP=1
|
||||
|
||||
@@ -135,7 +135,7 @@ do_install () {
|
||||
mkdir -p ${D}${base_bindir}
|
||||
|
||||
sbinprogs="agetty ctrlaltdel cfdisk vipw vigr"
|
||||
sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk readprofile fsck blkid blockdev fstrim sulogin"
|
||||
sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk readprofile fsck blkid blockdev fstrim sulogin switch_root"
|
||||
usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice utmpdump wall setsid chrt flock getopt"
|
||||
binprogs_a="dmesg kill more umount mount login reset su"
|
||||
|
||||
@@ -167,7 +167,7 @@ inherit update-alternatives
|
||||
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
|
||||
ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root"
|
||||
ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root switch_root"
|
||||
ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg renice wall"
|
||||
ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject getopt sulogin"
|
||||
|
||||
@@ -177,6 +177,7 @@ ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more"
|
||||
ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap"
|
||||
ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev"
|
||||
ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
|
||||
ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root"
|
||||
ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix"
|
||||
ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
|
||||
ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user