mirror of
https://git.yoctoproject.org/poky
synced 2026-02-15 21:23:04 +01:00
Compare commits
131 Commits
1.2_M4.rc3
...
1.2_M4.rc4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08290c6003 | ||
|
|
729e7f774c | ||
|
|
d233c90823 | ||
|
|
b76513948b | ||
|
|
d220e071ab | ||
|
|
f4eed2b8b8 | ||
|
|
d73e41f437 | ||
|
|
5b78c7d559 | ||
|
|
abddce33ac | ||
|
|
a8c668c43a | ||
|
|
9656762e80 | ||
|
|
8e53c8c937 | ||
|
|
375e9502d1 | ||
|
|
a23041090e | ||
|
|
0f8c8c844b | ||
|
|
bb2929692a | ||
|
|
fcd707ed4b | ||
|
|
20ff9db921 | ||
|
|
720fe9e371 | ||
|
|
8e0751a97a | ||
|
|
b9553be4d1 | ||
|
|
80e7bb85a0 | ||
|
|
ad229f81f4 | ||
|
|
1e190eef71 | ||
|
|
8cc3b24242 | ||
|
|
6004dc8906 | ||
|
|
04d6aa1069 | ||
|
|
993c467510 | ||
|
|
139a91d742 | ||
|
|
c50d8b753d | ||
|
|
c27655793b | ||
|
|
a6820f43f5 | ||
|
|
cf05f09f9f | ||
|
|
c936fca6e1 | ||
|
|
a2280512b8 | ||
|
|
51f9cb0840 | ||
|
|
5612bf3339 | ||
|
|
a5afc58319 | ||
|
|
b6cbf1e48c | ||
|
|
59348455a7 | ||
|
|
ca14115a12 | ||
|
|
b99e2f2f33 | ||
|
|
8046fd416f | ||
|
|
d2fca3db85 | ||
|
|
15b16060c7 | ||
|
|
5326847ef8 | ||
|
|
e966ae128a | ||
|
|
6d7aae9e97 | ||
|
|
d5a9ff4b27 | ||
|
|
e8ab6ab64b | ||
|
|
e737d01095 | ||
|
|
d1eba59ffd | ||
|
|
f139832667 | ||
|
|
d431ef2a30 | ||
|
|
388bae1ac8 | ||
|
|
23f4288082 | ||
|
|
469d73a733 | ||
|
|
ccc2b23191 | ||
|
|
2ddf7d3e83 | ||
|
|
f580ac6b30 | ||
|
|
239e8b9853 | ||
|
|
dcaea1447c | ||
|
|
f562e2a393 | ||
|
|
5c006a460f | ||
|
|
2e01a44f3b | ||
|
|
e3e6d2a744 | ||
|
|
74211e0372 | ||
|
|
a5210e47b0 | ||
|
|
d979ee01b5 | ||
|
|
9ff001cba1 | ||
|
|
62c908c88b | ||
|
|
58544debd5 | ||
|
|
4831503957 | ||
|
|
c393309707 | ||
|
|
d91b3f7639 | ||
|
|
0258ba5e14 | ||
|
|
774afe86e8 | ||
|
|
6f527e23e0 | ||
|
|
0a4a7578b8 | ||
|
|
6ea6facd66 | ||
|
|
dc2192cabc | ||
|
|
e024d40cd5 | ||
|
|
276b86509b | ||
|
|
fdb2027e6d | ||
|
|
83cc0a118f | ||
|
|
ac998632f7 | ||
|
|
45da109439 | ||
|
|
71b8383a6b | ||
|
|
fae4509e07 | ||
|
|
3d23afdc7a | ||
|
|
53d629496f | ||
|
|
7503db6713 | ||
|
|
ffc9073db1 | ||
|
|
3e3f774b8d | ||
|
|
ee71422b98 | ||
|
|
25b48c68df | ||
|
|
bc5d68e30b | ||
|
|
60a7403f6c | ||
|
|
04b16f1038 | ||
|
|
5d41ccd2ca | ||
|
|
132b12b26e | ||
|
|
0d7b909817 | ||
|
|
cc69136bf3 | ||
|
|
396da97103 | ||
|
|
60cf19a36d | ||
|
|
996308a4ea | ||
|
|
54c6e07ffe | ||
|
|
f09a5e176f | ||
|
|
22aac28f28 | ||
|
|
7b22df2e4b | ||
|
|
7cf26b2d3d | ||
|
|
b4acabea99 | ||
|
|
898bee7a4e | ||
|
|
100e3c9b75 | ||
|
|
554cac7d13 | ||
|
|
fb918fb4db | ||
|
|
811f7d8ebf | ||
|
|
4997801bad | ||
|
|
9c1dcdceb2 | ||
|
|
302f2cc8ce | ||
|
|
6703173449 | ||
|
|
d74c5aa2c9 | ||
|
|
c37faea947 | ||
|
|
b2ae65f7d1 | ||
|
|
d6031bad2a | ||
|
|
853c5613ac | ||
|
|
17c4134ebd | ||
|
|
a9be1accab | ||
|
|
58d2ff3955 | ||
|
|
7e5d41ab22 | ||
|
|
376bf4a390 |
@@ -9,6 +9,7 @@
|
||||
|
||||
import cmd
|
||||
import logging
|
||||
import warnings
|
||||
import os
|
||||
import sys
|
||||
import fnmatch
|
||||
@@ -28,6 +29,7 @@ import bb.fetch2
|
||||
|
||||
logger = logging.getLogger('BitBake')
|
||||
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
|
||||
def main(args):
|
||||
# Set up logging
|
||||
|
||||
@@ -179,6 +179,13 @@ class CommandsSync:
|
||||
"""
|
||||
return bb.utils.cpu_count()
|
||||
|
||||
def setConfFilter(self, command, params):
|
||||
"""
|
||||
Set the configuration file parsing filter
|
||||
"""
|
||||
filterfunc = params[0]
|
||||
bb.parse.parse_py.ConfHandler.confFilters.append(filterfunc)
|
||||
|
||||
class CommandsAsync:
|
||||
"""
|
||||
A class of asynchronous commands
|
||||
|
||||
@@ -462,13 +462,14 @@ class DataSmart(MutableMapping):
|
||||
self.delVar(var)
|
||||
|
||||
def get_hash(self):
|
||||
data = ""
|
||||
data = {}
|
||||
config_whitelist = set((self.getVar("BB_HASHCONFIG_WHITELIST", True) or "").split())
|
||||
keys = set(key for key in iter(self) if not key.startswith("__"))
|
||||
for key in keys:
|
||||
if key in config_whitelist:
|
||||
continue
|
||||
value = self.getVar(key, False) or ""
|
||||
data = data + key + ': ' + str(value) + '\n'
|
||||
data.update({key:value})
|
||||
|
||||
return hashlib.md5(data).hexdigest()
|
||||
data_str = str([(k, data[k]) for k in sorted(data.keys())])
|
||||
return hashlib.md5(data_str).hexdigest()
|
||||
|
||||
@@ -71,6 +71,14 @@ def include(oldfn, fn, lineno, data, error_out):
|
||||
raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), oldfn, lineno)
|
||||
logger.debug(2, "CONF file '%s' not found", fn)
|
||||
|
||||
# We have an issue where a UI might want to enforce particular settings such as
|
||||
# an empty DISTRO variable. If configuration files do something like assigning
|
||||
# a weak default, it turns out to be very difficult to filter out these changes,
|
||||
# particularly when the weak default might appear half way though parsing a chain
|
||||
# of configuration files. We therefore let the UIs hook into configuration file
|
||||
# parsing. This turns out to be a hard problem to solve any other way.
|
||||
confFilters = []
|
||||
|
||||
def handle(fn, data, include):
|
||||
init(data)
|
||||
|
||||
@@ -107,6 +115,9 @@ def handle(fn, data, include):
|
||||
if oldfile:
|
||||
data.setVar('FILE', oldfile)
|
||||
|
||||
for f in confFilters:
|
||||
f(fn, data)
|
||||
|
||||
return data
|
||||
|
||||
def feeder(lineno, s, fn, statements):
|
||||
|
||||
@@ -81,16 +81,16 @@ class BuildConfigurationTreeView(gtk.TreeView):
|
||||
# renew the tree model after get the configuration messages
|
||||
self.set_model(listmodel)
|
||||
|
||||
def show(self, src_config_info):
|
||||
def show(self, src_config_info, src_params):
|
||||
vars = []
|
||||
vars.append(self.set_vars("BB version:", src_config_info.bb_version))
|
||||
vars.append(self.set_vars("Target arch:", src_config_info.target_arch))
|
||||
vars.append(self.set_vars("Target OS:", src_config_info.target_os))
|
||||
vars.append(self.set_vars("BB version:", src_params.bb_version))
|
||||
vars.append(self.set_vars("Target arch:", src_params.target_arch))
|
||||
vars.append(self.set_vars("Target OS:", src_params.target_os))
|
||||
vars.append(self.set_vars("Machine:", src_config_info.curr_mach))
|
||||
vars.append(self.set_vars("Distro:", src_config_info.curr_distro))
|
||||
vars.append(self.set_vars("Distro version:", src_config_info.distro_version))
|
||||
vars.append(self.set_vars("Distro version:", src_params.distro_version))
|
||||
vars.append(self.set_vars("SDK machine:", src_config_info.curr_sdk_machine))
|
||||
vars.append(self.set_vars("Tune feature:", src_config_info.tune_pkgarch))
|
||||
vars.append(self.set_vars("Tune features:", src_params.tune_pkgarch))
|
||||
vars.append(self.set_vars("Layers:", src_config_info.layers))
|
||||
|
||||
for path in src_config_info.layers:
|
||||
@@ -238,6 +238,7 @@ class BuildDetailsPage (HobPage):
|
||||
self.builder.stop_build()
|
||||
|
||||
def hide_stop_button(self):
|
||||
self.stop_button.set_sensitive(False)
|
||||
self.stop_button.hide()
|
||||
|
||||
def scroll_to_present_row(self, model, path, iter, v_adj, treeview):
|
||||
@@ -248,5 +249,5 @@ class BuildDetailsPage (HobPage):
|
||||
if (v_adj.upper <= v_adj.page_size) or (v_adj.value == v_adj.upper - v_adj.page_size):
|
||||
treeview.scroll_to_cell(path)
|
||||
|
||||
def show_configurations(self, configurations):
|
||||
self.config_tv.show(configurations)
|
||||
def show_configurations(self, configurations, params):
|
||||
self.config_tv.show(configurations, params)
|
||||
|
||||
@@ -32,7 +32,7 @@ from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage
|
||||
from bb.ui.crumbs.packageselectionpage import PackageSelectionPage
|
||||
from bb.ui.crumbs.builddetailspage import BuildDetailsPage
|
||||
from bb.ui.crumbs.imagedetailspage import ImageDetailsPage
|
||||
from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton
|
||||
from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton, hcc
|
||||
from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \
|
||||
AdvancedSettingDialog, LayerSelectionDialog, \
|
||||
DeployImageDialog
|
||||
@@ -42,9 +42,42 @@ import bb.ui.crumbs.utils
|
||||
class Configuration:
|
||||
'''Represents the data structure of configuration.'''
|
||||
|
||||
def __init__(self, params):
|
||||
# Settings
|
||||
def __init__(self):
|
||||
self.curr_mach = ""
|
||||
# settings
|
||||
self.curr_distro = ""
|
||||
self.dldir = self.sstatedir = self.sstatemirror = ""
|
||||
self.pmake = self.bbthread = 0
|
||||
self.curr_package_format = ""
|
||||
self.image_rootfs_size = self.image_extra_size = 0
|
||||
self.image_overhead_factor = 1
|
||||
self.incompat_license = ""
|
||||
self.curr_sdk_machine = ""
|
||||
self.conf_version = self.lconf_version = ""
|
||||
self.extra_setting = {}
|
||||
self.toolchain_build = False
|
||||
self.image_fstypes = ""
|
||||
# bblayers.conf
|
||||
self.layers = []
|
||||
# image/recipes/packages
|
||||
self.clear_selection()
|
||||
|
||||
self.user_selected_packages = []
|
||||
|
||||
self.default_task = "build"
|
||||
|
||||
# proxy settings
|
||||
self.all_proxy = self.http_proxy = self.ftp_proxy = self.https_proxy = ""
|
||||
self.git_proxy_host = self.git_proxy_port = ""
|
||||
self.cvs_proxy_host = self.cvs_proxy_port = ""
|
||||
|
||||
def clear_selection(self):
|
||||
self.selected_image = None
|
||||
self.selected_recipes = []
|
||||
self.selected_packages = []
|
||||
|
||||
def update(self, params):
|
||||
# settings
|
||||
self.curr_distro = params["distro"]
|
||||
self.dldir = params["dldir"]
|
||||
self.sstatedir = params["sstatedir"]
|
||||
@@ -59,17 +92,11 @@ class Configuration:
|
||||
self.curr_sdk_machine = params["sdk_machine"]
|
||||
self.conf_version = params["conf_version"]
|
||||
self.lconf_version = params["lconf_version"]
|
||||
self.extra_setting = {}
|
||||
self.toolchain_build = False
|
||||
self.image_fstypes = params["image_fstypes"]
|
||||
# self.extra_setting/self.toolchain_build
|
||||
# bblayers.conf
|
||||
self.layers = params["layer"].split()
|
||||
# image/recipes/packages
|
||||
self.selected_image = None
|
||||
self.selected_recipes = []
|
||||
self.selected_packages = []
|
||||
|
||||
self.user_selected_packages = []
|
||||
self.default_task = params["default_task"]
|
||||
|
||||
# proxy settings
|
||||
self.all_proxy = params["all_proxy"]
|
||||
@@ -81,31 +108,6 @@ class Configuration:
|
||||
self.cvs_proxy_host = params["cvs_proxy_host"]
|
||||
self.cvs_proxy_port = params["cvs_proxy_port"]
|
||||
|
||||
def update(self, params):
|
||||
self.curr_distro = params["distro"]
|
||||
self.dldir = params["dldir"]
|
||||
self.sstatedir = params["sstatedir"]
|
||||
self.sstatemirror = params["sstatemirror"]
|
||||
self.pmake = int(params["pmake"].split()[1])
|
||||
self.bbthread = params["bbthread"]
|
||||
self.curr_package_format = " ".join(params["pclass"].split("package_")).strip()
|
||||
self.image_rootfs_size = params["image_rootfs_size"]
|
||||
self.image_extra_size = params["image_extra_size"]
|
||||
self.image_overhead_factor = params['image_overhead_factor']
|
||||
self.incompat_license = params["incompat_license"]
|
||||
self.curr_sdk_machine = params["sdk_machine"]
|
||||
self.conf_version = params["conf_version"]
|
||||
self.lconf_version = params["lconf_version"]
|
||||
self.image_fstypes = params["image_fstypes"]
|
||||
self.tune_arch = params["tune_arch"]
|
||||
self.bb_version = params["bb_version"]
|
||||
self.target_arch = params["target_arch"]
|
||||
self.target_os = params["target_os"]
|
||||
self.distro_version = params["distro_version"]
|
||||
self.tune_pkgarch = params["tune_pkgarch"]
|
||||
# bblayers.conf
|
||||
self.layers = params["layer"].split()
|
||||
|
||||
def load(self, template):
|
||||
self.curr_mach = template.getVar("MACHINE")
|
||||
self.curr_package_format = " ".join(template.getVar("PACKAGE_CLASSES").split("package_")).strip()
|
||||
@@ -153,11 +155,12 @@ class Configuration:
|
||||
self.cvs_proxy_host = template.getVar("CVS_PROXY_HOST")
|
||||
self.cvs_proxy_port = template.getVar("CVS_PROXY_PORT")
|
||||
|
||||
def save(self, template, filename):
|
||||
def save(self, template, defaults=False):
|
||||
# bblayers.conf
|
||||
template.setVar("BBLAYERS", " ".join(self.layers))
|
||||
# local.conf
|
||||
template.setVar("MACHINE", self.curr_mach)
|
||||
if not defaults:
|
||||
template.setVar("MACHINE", self.curr_mach)
|
||||
template.setVar("DISTRO", self.curr_distro)
|
||||
template.setVar("DL_DIR", self.dldir)
|
||||
template.setVar("SSTATE_DIR", self.sstatedir)
|
||||
@@ -174,11 +177,11 @@ class Configuration:
|
||||
template.setVar("EXTRA_SETTING", self.extra_setting)
|
||||
template.setVar("TOOLCHAIN_BUILD", self.toolchain_build)
|
||||
template.setVar("IMAGE_FSTYPES", self.image_fstypes)
|
||||
# image/recipes/packages
|
||||
self.selected_image = filename
|
||||
template.setVar("__SELECTED_IMAGE__", self.selected_image)
|
||||
template.setVar("DEPENDS", self.selected_recipes)
|
||||
template.setVar("IMAGE_INSTALL", self.user_selected_packages)
|
||||
if not defaults:
|
||||
# image/recipes/packages
|
||||
template.setVar("__SELECTED_IMAGE__", self.selected_image)
|
||||
template.setVar("DEPENDS", self.selected_recipes)
|
||||
template.setVar("IMAGE_INSTALL", self.user_selected_packages)
|
||||
# proxy
|
||||
template.setVar("all_proxy", self.all_proxy)
|
||||
template.setVar("http_proxy", self.http_proxy)
|
||||
@@ -192,23 +195,71 @@ class Configuration:
|
||||
class Parameters:
|
||||
'''Represents other variables like available machines, etc.'''
|
||||
|
||||
def __init__(self, params):
|
||||
def __init__(self):
|
||||
# Variables
|
||||
self.max_threads = 65535
|
||||
self.core_base = ""
|
||||
self.image_addr = ""
|
||||
self.image_types = []
|
||||
self.runnable_image_types = []
|
||||
self.runnable_machine_patterns = []
|
||||
self.deployable_image_types = []
|
||||
self.tmpdir = ""
|
||||
|
||||
self.all_machines = []
|
||||
self.all_package_formats = []
|
||||
self.all_distros = []
|
||||
self.all_sdk_machines = []
|
||||
self.max_threads = params["max_threads"]
|
||||
self.all_layers = []
|
||||
self.core_base = params["core_base"]
|
||||
self.image_names = []
|
||||
self.enable_proxy = False
|
||||
|
||||
# for build log to show
|
||||
self.bb_version = ""
|
||||
self.target_arch = ""
|
||||
self.target_os = ""
|
||||
self.distro_version = ""
|
||||
self.tune_pkgarch = ""
|
||||
|
||||
def update(self, params):
|
||||
self.max_threads = params["max_threads"]
|
||||
self.core_base = params["core_base"]
|
||||
self.image_addr = params["image_addr"]
|
||||
self.image_types = params["image_types"].split()
|
||||
self.runnable_image_types = params["runnable_image_types"].split()
|
||||
self.runnable_machine_patterns = params["runnable_machine_patterns"].split()
|
||||
self.deployable_image_types = params["deployable_image_types"].split()
|
||||
self.tmpdir = params["tmpdir"]
|
||||
self.enable_proxy = False
|
||||
# for build log to show
|
||||
self.bb_version = params["bb_version"]
|
||||
self.target_arch = params["target_arch"]
|
||||
self.target_os = params["target_os"]
|
||||
self.distro_version = params["distro_version"]
|
||||
self.tune_pkgarch = params["tune_pkgarch"]
|
||||
|
||||
def hob_conf_filter(fn, data):
|
||||
if fn.endswith("/local.conf"):
|
||||
distro = data.getVar("DISTRO_HOB")
|
||||
if distro:
|
||||
if distro != "defaultsetup":
|
||||
data.setVar("DISTRO", distro)
|
||||
else:
|
||||
data.delVar("DISTRO")
|
||||
|
||||
keys = ["MACHINE_HOB", "SDKMACHINE_HOB", "PACKAGE_CLASSES_HOB", \
|
||||
"BB_NUMBER_THREADS_HOB", "PARALLEL_MAKE_HOB", "DL_DIR_HOB", \
|
||||
"SSTATE_DIR_HOB", "SSTATE_MIRROR_HOB", "INCOMPATIBLE_LICENSE_HOB"]
|
||||
for key in keys:
|
||||
var_hob = data.getVar(key)
|
||||
if var_hob:
|
||||
data.setVar(key.split("_HOB")[0], var_hob)
|
||||
return
|
||||
|
||||
if fn.endswith("/bblayers.conf"):
|
||||
layers = data.getVar("BBLAYERS_HOB")
|
||||
if layers:
|
||||
data.setVar("BBLAYERS", layers)
|
||||
return
|
||||
|
||||
class Builder(gtk.Window):
|
||||
|
||||
@@ -261,6 +312,10 @@ class Builder(gtk.Window):
|
||||
|
||||
self.template = None
|
||||
|
||||
# configuration and parameters
|
||||
self.configuration = Configuration()
|
||||
self.parameters = Parameters()
|
||||
|
||||
# build step
|
||||
self.current_step = None
|
||||
self.previous_step = None
|
||||
@@ -274,6 +329,9 @@ class Builder(gtk.Window):
|
||||
# Indicate whether user has customized the image
|
||||
self.customized = False
|
||||
|
||||
# Indicate whether the UI is working
|
||||
self.sensitive = True
|
||||
|
||||
# create visual elements
|
||||
self.create_visual_elements()
|
||||
|
||||
@@ -291,11 +349,14 @@ class Builder(gtk.Window):
|
||||
self.handler.build.connect("build-failed", self.handler_build_failed_cb)
|
||||
self.handler.build.connect("task-started", self.handler_task_started_cb)
|
||||
self.handler.build.connect("log-error", self.handler_build_failure_cb)
|
||||
self.handler.build.connect("no-provider", self.handler_no_provider_cb)
|
||||
self.handler.connect("generating-data", self.handler_generating_data_cb)
|
||||
self.handler.connect("data-generated", self.handler_data_generated_cb)
|
||||
self.handler.connect("command-succeeded", self.handler_command_succeeded_cb)
|
||||
self.handler.connect("command-failed", self.handler_command_failed_cb)
|
||||
|
||||
self.handler.set_config_filter(hob_conf_filter)
|
||||
|
||||
self.initiate_new_build_async()
|
||||
|
||||
def create_visual_elements(self):
|
||||
@@ -334,14 +395,15 @@ class Builder(gtk.Window):
|
||||
|
||||
def initiate_new_build_async(self):
|
||||
self.switch_page(self.MACHINE_SELECTION)
|
||||
self.handler.init_cooker()
|
||||
self.handler.set_extra_inherit("image_types")
|
||||
self.handler.parse_config()
|
||||
if self.load_template(TemplateMgr.convert_to_template_pathfilename("default", ".hob/")) == None:
|
||||
self.handler.init_cooker()
|
||||
self.handler.set_extra_inherit("image_types")
|
||||
self.handler.generate_configuration()
|
||||
|
||||
def update_config_async(self):
|
||||
self.switch_page(self.MACHINE_SELECTION)
|
||||
self.set_user_config()
|
||||
self.handler.parse_generate_configuration()
|
||||
self.handler.generate_configuration()
|
||||
|
||||
def populate_recipe_package_info_async(self):
|
||||
self.switch_page(self.RCPPKGINFO_POPULATING)
|
||||
@@ -355,7 +417,7 @@ class Builder(gtk.Window):
|
||||
_, all_recipes = self.recipe_model.get_selected_recipes()
|
||||
self.set_user_config()
|
||||
self.handler.reset_build()
|
||||
self.handler.generate_packages(all_recipes)
|
||||
self.handler.generate_packages(all_recipes, self.configuration.default_task)
|
||||
|
||||
def fast_generate_image_async(self):
|
||||
self.switch_page(self.FAST_IMAGE_GENERATING)
|
||||
@@ -363,21 +425,27 @@ class Builder(gtk.Window):
|
||||
_, all_recipes = self.recipe_model.get_selected_recipes()
|
||||
self.set_user_config()
|
||||
self.handler.reset_build()
|
||||
self.handler.generate_packages(all_recipes)
|
||||
self.handler.generate_packages(all_recipes, self.configuration.default_task)
|
||||
|
||||
def generate_image_async(self):
|
||||
self.switch_page(self.IMAGE_GENERATING)
|
||||
self.handler.reset_build()
|
||||
# Build image
|
||||
self.set_user_config()
|
||||
packages = self.package_model.get_selected_packages()
|
||||
toolchain_packages = []
|
||||
if self.configuration.toolchain_build:
|
||||
toolchain_packages = self.package_model.get_selected_packages_toolchain()
|
||||
self.handler.reset_build()
|
||||
self.handler.generate_image(packages,
|
||||
self.hob_image,
|
||||
if self.configuration.selected_image == self.recipe_model.__dummy_image__:
|
||||
packages = self.package_model.get_selected_packages()
|
||||
image = self.hob_image
|
||||
else:
|
||||
packages = []
|
||||
image = self.configuration.selected_image
|
||||
self.handler.generate_image(image,
|
||||
self.hob_toolchain,
|
||||
toolchain_packages)
|
||||
packages,
|
||||
toolchain_packages,
|
||||
self.configuration.default_task)
|
||||
|
||||
def get_parameters_sync(self):
|
||||
return self.handler.get_parameters()
|
||||
@@ -388,27 +456,33 @@ class Builder(gtk.Window):
|
||||
def cancel_build_sync(self, force=False):
|
||||
self.handler.cancel_build(force)
|
||||
|
||||
def generate_configuration_async(self):
|
||||
self.handler.generate_configuration()
|
||||
|
||||
def cancel_parse_sync(self):
|
||||
self.handler.cancel_parse()
|
||||
|
||||
def load_template(self, path):
|
||||
if not os.path.isfile(path):
|
||||
return None
|
||||
|
||||
self.template = TemplateMgr()
|
||||
self.template.load(path)
|
||||
self.configuration.load(self.template)
|
||||
try:
|
||||
self.template.load(path)
|
||||
self.configuration.load(self.template)
|
||||
except Exception as e:
|
||||
self.show_error_dialog("Hob Exception - %s" % (str(e)))
|
||||
self.reset()
|
||||
finally:
|
||||
self.template.destroy()
|
||||
self.template = None
|
||||
|
||||
for layer in self.configuration.layers:
|
||||
if not os.path.exists(layer+'/conf/layer.conf'):
|
||||
return False
|
||||
|
||||
self.save_defaults() # remember layers and settings
|
||||
self.update_config_async()
|
||||
return True
|
||||
|
||||
self.template.destroy()
|
||||
self.template = None
|
||||
|
||||
def save_template(self, path):
|
||||
def save_template(self, path, defaults=False):
|
||||
if path.rfind("/") == -1:
|
||||
filename = "default"
|
||||
path = "."
|
||||
@@ -417,12 +491,22 @@ class Builder(gtk.Window):
|
||||
path = path[0:path.rfind("/")]
|
||||
|
||||
self.template = TemplateMgr()
|
||||
self.template.open(filename, path)
|
||||
self.configuration.save(self.template, filename)
|
||||
try:
|
||||
self.template.open(filename, path)
|
||||
self.configuration.save(self.template, defaults)
|
||||
|
||||
self.template.save()
|
||||
self.template.destroy()
|
||||
self.template = None
|
||||
self.template.save()
|
||||
except Exception as e:
|
||||
self.show_error_dialog("Hob Exception - %s" % (str(e)))
|
||||
self.reset()
|
||||
finally:
|
||||
self.template.destroy()
|
||||
self.template = None
|
||||
|
||||
def save_defaults(self):
|
||||
if not os.path.exists(".hob/"):
|
||||
os.mkdir(".hob/")
|
||||
self.save_template(".hob/default", True)
|
||||
|
||||
def switch_page(self, next_step):
|
||||
# Main Workflow (Business Logic)
|
||||
@@ -507,6 +591,17 @@ class Builder(gtk.Window):
|
||||
left = self.package_model.set_selected_packages(selected_packages)
|
||||
self.configuration.selected_packages += left
|
||||
|
||||
def update_configuration_parameters(self, params):
|
||||
if params:
|
||||
self.configuration.update(params)
|
||||
self.parameters.update(params)
|
||||
|
||||
def reset(self):
|
||||
self.configuration.curr_mach = ""
|
||||
self.configuration.clear_selection()
|
||||
self.image_configuration_page.switch_machine_combo()
|
||||
self.switch_page(self.MACHINE_SELECTION)
|
||||
|
||||
# Callback Functions
|
||||
def handler_config_updated_cb(self, handler, which, values):
|
||||
if which == "distro":
|
||||
@@ -521,21 +616,13 @@ class Builder(gtk.Window):
|
||||
self.parameters.all_package_formats = formats
|
||||
|
||||
def handler_command_succeeded_cb(self, handler, initcmd):
|
||||
if initcmd == self.handler.PARSE_CONFIG:
|
||||
# settings
|
||||
params = self.get_parameters_sync()
|
||||
self.configuration = Configuration(params)
|
||||
self.parameters = Parameters(params)
|
||||
self.generate_configuration_async()
|
||||
elif initcmd == self.handler.GENERATE_CONFIGURATION:
|
||||
params = self.get_parameters_sync()
|
||||
self.configuration.update(params)
|
||||
if initcmd == self.handler.GENERATE_CONFIGURATION:
|
||||
self.update_configuration_parameters(self.get_parameters_sync())
|
||||
self.image_configuration_page.switch_machine_combo()
|
||||
elif initcmd in [self.handler.GENERATE_RECIPES,
|
||||
self.handler.GENERATE_PACKAGES,
|
||||
self.handler.GENERATE_IMAGE]:
|
||||
params = self.get_parameters_sync()
|
||||
self.configuration.update(params)
|
||||
self.update_configuration_parameters(self.get_parameters_sync())
|
||||
self.request_package_info_async()
|
||||
elif initcmd == self.handler.POPULATE_PACKAGEINFO:
|
||||
if self.current_step == self.RCPPKGINFO_POPULATING:
|
||||
@@ -546,24 +633,21 @@ class Builder(gtk.Window):
|
||||
self.rcppkglist_populated()
|
||||
if self.current_step == self.FAST_IMAGE_GENERATING:
|
||||
self.generate_image_async()
|
||||
elif self.current_step == self.PACKAGE_GENERATING:
|
||||
self.switch_page(self.PACKAGE_GENERATED)
|
||||
elif self.current_step == self.IMAGE_GENERATING:
|
||||
self.switch_page(self.IMAGE_GENERATED)
|
||||
|
||||
def show_error_dialog(self, msg):
|
||||
lbl = "<b>Error</b>\n"
|
||||
lbl = lbl + "%s\n\n" % msg
|
||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR)
|
||||
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
||||
HobButton.style_button(button)
|
||||
response = dialog.run()
|
||||
dialog.destroy()
|
||||
|
||||
def handler_command_failed_cb(self, handler, msg):
|
||||
if msg:
|
||||
msg = msg.replace("your local.conf", "Settings")
|
||||
lbl = "<b>Error</b>\n"
|
||||
lbl = lbl + "%s\n\n" % msg
|
||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR)
|
||||
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
||||
HobButton.style_button(button)
|
||||
response = dialog.run()
|
||||
dialog.destroy()
|
||||
self.configuration.curr_mach = ""
|
||||
self.image_configuration_page.switch_machine_combo()
|
||||
self.switch_page(self.MACHINE_SELECTION)
|
||||
self.show_error_dialog(msg)
|
||||
self.reset()
|
||||
|
||||
def window_sensitive(self, sensitive):
|
||||
self.image_configuration_page.machine_combo.set_sensitive(sensitive)
|
||||
@@ -584,6 +668,7 @@ class Builder(gtk.Window):
|
||||
self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
|
||||
else:
|
||||
self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
|
||||
self.sensitive = sensitive
|
||||
|
||||
|
||||
def handler_generating_data_cb(self, handler):
|
||||
@@ -597,10 +682,6 @@ class Builder(gtk.Window):
|
||||
selected_recipes = self.configuration.selected_recipes[:]
|
||||
selected_packages = self.configuration.selected_packages[:]
|
||||
|
||||
self.recipe_model.image_list_append(selected_image,
|
||||
" ".join(selected_recipes),
|
||||
" ".join(selected_packages))
|
||||
|
||||
self.image_configuration_page.update_image_combo(self.recipe_model, selected_image)
|
||||
self.image_configuration_page.update_image_desc(selected_image)
|
||||
self.update_recipe_model(selected_image, selected_recipes)
|
||||
@@ -657,7 +738,7 @@ class Builder(gtk.Window):
|
||||
elif self.current_step == self.PACKAGE_GENERATING:
|
||||
fraction = 0
|
||||
self.build_details_page.update_progress_bar("Build Started: ", fraction)
|
||||
self.build_details_page.show_configurations(self.configuration)
|
||||
self.build_details_page.show_configurations(self.configuration, self.parameters)
|
||||
|
||||
def build_succeeded(self):
|
||||
if self.current_step == self.FAST_IMAGE_GENERATING:
|
||||
@@ -665,17 +746,27 @@ class Builder(gtk.Window):
|
||||
elif self.current_step == self.IMAGE_GENERATING:
|
||||
fraction = 1.0
|
||||
self.parameters.image_names = []
|
||||
linkname = 'hob-image-' + self.configuration.curr_mach
|
||||
selected_image = self.recipe_model.get_selected_image()
|
||||
if selected_image == self.recipe_model.__dummy_image__:
|
||||
linkname = 'hob-image-' + self.configuration.curr_mach
|
||||
else:
|
||||
linkname = selected_image + '-' + self.configuration.curr_mach
|
||||
for image_type in self.parameters.image_types:
|
||||
linkpath = self.parameters.image_addr + '/' + linkname + '.' + image_type
|
||||
if os.path.exists(linkpath):
|
||||
self.parameters.image_names.append(os.readlink(linkpath))
|
||||
for real_image_type in hcc.SUPPORTED_IMAGE_TYPES[image_type]:
|
||||
linkpath = self.parameters.image_addr + '/' + linkname + '.' + real_image_type
|
||||
if os.path.exists(linkpath):
|
||||
self.parameters.image_names.append(os.readlink(linkpath))
|
||||
elif self.current_step == self.PACKAGE_GENERATING:
|
||||
fraction = 1.0
|
||||
self.build_details_page.update_progress_bar("Build Completed: ", fraction)
|
||||
self.handler.build_succeeded_async()
|
||||
self.stopping = False
|
||||
|
||||
if self.current_step == self.PACKAGE_GENERATING:
|
||||
self.switch_page(self.PACKAGE_GENERATED)
|
||||
elif self.current_step == self.IMAGE_GENERATING:
|
||||
self.switch_page(self.IMAGE_GENERATED)
|
||||
|
||||
def build_failed(self):
|
||||
if self.stopping:
|
||||
status = "stop"
|
||||
@@ -706,6 +797,14 @@ class Builder(gtk.Window):
|
||||
def handler_build_failed_cb(self, running_build):
|
||||
self.build_failed()
|
||||
|
||||
def handler_no_provider_cb(self, running_build, msg):
|
||||
dialog = CrumbsMessageDialog(self, msg, gtk.STOCK_DIALOG_INFO)
|
||||
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
||||
HobButton.style_button(button)
|
||||
dialog.run()
|
||||
dialog.destroy()
|
||||
self.build_failed()
|
||||
|
||||
def handler_task_started_cb(self, running_build, message):
|
||||
fraction = message["current"] * 1.0/message["total"]
|
||||
title = "Build packages"
|
||||
@@ -738,6 +837,8 @@ class Builder(gtk.Window):
|
||||
self.build_details_page.show_issues()
|
||||
|
||||
def destroy_window_cb(self, widget, event):
|
||||
if not self.sensitive:
|
||||
return True
|
||||
lbl = "<b>Do you really want to exit the Hob image creator?</b>"
|
||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
|
||||
button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
|
||||
@@ -798,7 +899,7 @@ class Builder(gtk.Window):
|
||||
|
||||
def show_binb_dialog(self, binb):
|
||||
markup = "<b>Brought in by:</b>\n%s" % binb
|
||||
ptip = PersistentTooltip(markup)
|
||||
ptip = PersistentTooltip(markup, self)
|
||||
|
||||
ptip.show()
|
||||
|
||||
@@ -817,6 +918,7 @@ class Builder(gtk.Window):
|
||||
response = dialog.run()
|
||||
if response == gtk.RESPONSE_YES:
|
||||
self.configuration.layers = dialog.layers
|
||||
self.save_defaults() # remember layers
|
||||
# DO refresh layers
|
||||
if dialog.layers_changed:
|
||||
self.update_config_async()
|
||||
@@ -903,15 +1005,17 @@ class Builder(gtk.Window):
|
||||
if response == gtk.RESPONSE_YES:
|
||||
self.parameters.enable_proxy = dialog.enable_proxy
|
||||
self.configuration = dialog.configuration
|
||||
self.save_defaults() # remember settings
|
||||
settings_changed = dialog.settings_changed
|
||||
dialog.destroy()
|
||||
return response == gtk.RESPONSE_YES, settings_changed
|
||||
|
||||
def reparse_post_adv_settings(self):
|
||||
# DO reparse recipes
|
||||
if not self.configuration.curr_mach:
|
||||
self.update_config_async()
|
||||
else:
|
||||
self.configuration.clear_selection()
|
||||
# DO reparse recipes
|
||||
self.populate_recipe_package_info_async()
|
||||
|
||||
def deploy_image(self, image_name):
|
||||
@@ -972,7 +1076,7 @@ class Builder(gtk.Window):
|
||||
tmp_path = self.parameters.tmpdir
|
||||
cmdline = bb.ui.crumbs.utils.which_terminal()
|
||||
if os.path.exists(image_path) and os.path.exists(kernel_path) \
|
||||
and os.path.exists(source_env_path) and os.path.exists(tmp_path)
|
||||
and os.path.exists(source_env_path) and os.path.exists(tmp_path) \
|
||||
and cmdline:
|
||||
cmdline += "\' bash -c \"export OE_TMPDIR=" + tmp_path + "; "
|
||||
cmdline += "source " + source_env_path + " " + os.getcwd() + "; "
|
||||
|
||||
@@ -392,7 +392,10 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
j = 1
|
||||
for image_type in self.image_types:
|
||||
self.image_types_checkbuttons[image_type] = gtk.CheckButton(image_type)
|
||||
self.image_types_checkbuttons[image_type].set_tooltip_text("Build an %s image" % image_type)
|
||||
article = ""
|
||||
if image_type.startswith(("a", "e", "i", "o", "u")):
|
||||
article = "n"
|
||||
self.image_types_checkbuttons[image_type].set_tooltip_text("Build a%s %s image" % (article, image_type))
|
||||
table.attach(self.image_types_checkbuttons[image_type], j, j + 4, i, i + 1)
|
||||
if image_type in self.configuration.image_fstypes.split():
|
||||
self.image_types_checkbuttons[image_type].set_active(True)
|
||||
@@ -420,15 +423,15 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Image rootfs size: (MB)</span>")
|
||||
tooltip = "Sets the basic size of your target image.\nThis is the basic size of your target image unless your selected package size exceeds this value or you select \'Image Extra Size\'."
|
||||
rootfs_size_widget, self.rootfs_size_spinner = self.gen_spinner_widget(int(self.configuration.image_rootfs_size*1.0/1024), 0, 1024, tooltip)
|
||||
rootfs_size_widget, self.rootfs_size_spinner = self.gen_spinner_widget(int(self.configuration.image_rootfs_size*1.0/1024), 0, 65536, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(rootfs_size_widget, expand=False, fill=False)
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Image extra size: (MB)</span>")
|
||||
tooltip = "Sets the extra free space of your target image.\nBy default, the system reserves 30% of your image size as free space. If your image contains zypper, it brings in 50MB more space. The maximum free space is 1024MB."
|
||||
extra_size_widget, self.extra_size_spinner = self.gen_spinner_widget(int(self.configuration.image_extra_size*1.0/1024), 0, 1024, tooltip)
|
||||
tooltip = "Sets the extra free space of your target image.\nBy default, the system reserves 30% of your image size as free space. If your image contains zypper, it brings in 50MB more space. The maximum free space is 64GB."
|
||||
extra_size_widget, self.extra_size_spinner = self.gen_spinner_widget(int(self.configuration.image_extra_size*1.0/1024), 0, 65536, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(extra_size_widget, expand=False, fill=False)
|
||||
|
||||
@@ -447,7 +450,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
self.toolchain_checkbox.set_active(self.configuration.toolchain_build)
|
||||
sub_hbox.pack_start(self.toolchain_checkbox, expand=False, fill=False)
|
||||
|
||||
tooltip = "Selects the Host platform for which you want to run the toolchain"
|
||||
tooltip = "Selects the host platform for which you want to run the toolchain"
|
||||
sdk_machine_widget, self.sdk_machine_combo = self.gen_combo_widget(self.configuration.curr_sdk_machine, self.all_sdk_machines, tooltip)
|
||||
sub_hbox.pack_start(sdk_machine_widget, expand=False, fill=False)
|
||||
|
||||
@@ -1104,7 +1107,7 @@ class ImageSelectionDialog (CrumbsDialog):
|
||||
for image_type in self.image_types:
|
||||
for real_image_type in hcc.SUPPORTED_IMAGE_TYPES[image_type]:
|
||||
if f.endswith('.' + real_image_type):
|
||||
imageset.add(f.rsplit('.' + real_image_type)[0])
|
||||
imageset.add(f.rsplit('.' + real_image_type)[0].rsplit('.rootfs')[0])
|
||||
self.image_list.append(f)
|
||||
|
||||
for image in imageset:
|
||||
|
||||
@@ -59,7 +59,7 @@ class HobHandler(gobject.GObject):
|
||||
(gobject.TYPE_PYOBJECT,)),
|
||||
}
|
||||
|
||||
(PARSE_CONFIG, GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(6)
|
||||
(GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(5)
|
||||
(SUB_PATH_LAYERS, SUB_FILES_DISTRO, SUB_FILES_MACH, SUB_FILES_SDKMACH, SUB_MATCH_CLASS, SUB_PARSE_CONFIG, SUB_GNERATE_TGTS, SUB_GENERATE_PKGINFO, SUB_BUILD_RECIPES, SUB_BUILD_IMAGE) = range(10)
|
||||
|
||||
def __init__(self, server, recipe_model, package_model):
|
||||
@@ -91,6 +91,15 @@ class HobHandler(gobject.GObject):
|
||||
self.emit("data-generated")
|
||||
self.generating = False
|
||||
|
||||
def runCommand(self, commandline):
|
||||
try:
|
||||
return self.server.runCommand(commandline)
|
||||
except Exception as e:
|
||||
self.commands_async = []
|
||||
self.clear_busy()
|
||||
self.emit("command-failed", "Hob Exception - %s" % (str(e)))
|
||||
return None
|
||||
|
||||
def run_next_command(self, initcmd=None):
|
||||
if initcmd != None:
|
||||
self.initcmd = initcmd
|
||||
@@ -105,36 +114,37 @@ class HobHandler(gobject.GObject):
|
||||
return
|
||||
|
||||
if next_command == self.SUB_PATH_LAYERS:
|
||||
self.server.runCommand(["findConfigFilePath", "bblayers.conf"])
|
||||
self.runCommand(["findConfigFilePath", "bblayers.conf"])
|
||||
elif next_command == self.SUB_FILES_DISTRO:
|
||||
self.server.runCommand(["findConfigFiles", "DISTRO"])
|
||||
self.runCommand(["findConfigFiles", "DISTRO"])
|
||||
elif next_command == self.SUB_FILES_MACH:
|
||||
self.server.runCommand(["findConfigFiles", "MACHINE"])
|
||||
self.runCommand(["findConfigFiles", "MACHINE"])
|
||||
elif next_command == self.SUB_FILES_SDKMACH:
|
||||
self.server.runCommand(["findConfigFiles", "MACHINE-SDK"])
|
||||
self.runCommand(["findConfigFiles", "MACHINE-SDK"])
|
||||
elif next_command == self.SUB_MATCH_CLASS:
|
||||
self.server.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"])
|
||||
self.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"])
|
||||
elif next_command == self.SUB_PARSE_CONFIG:
|
||||
self.server.runCommand(["parseConfigurationFiles", "", ""])
|
||||
self.runCommand(["parseConfigurationFiles", "", ""])
|
||||
elif next_command == self.SUB_GNERATE_TGTS:
|
||||
self.server.runCommand(["generateTargetsTree", "classes/image.bbclass", []])
|
||||
self.runCommand(["generateTargetsTree", "classes/image.bbclass", []])
|
||||
elif next_command == self.SUB_GENERATE_PKGINFO:
|
||||
self.server.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"])
|
||||
self.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"])
|
||||
elif next_command == self.SUB_BUILD_RECIPES:
|
||||
self.clear_busy()
|
||||
self.building = True
|
||||
self.server.runCommand(["buildTargets", self.recipe_queue, "build"])
|
||||
self.runCommand(["buildTargets", self.recipe_queue, self.default_task])
|
||||
self.recipe_queue = []
|
||||
elif next_command == self.SUB_BUILD_IMAGE:
|
||||
self.clear_busy()
|
||||
self.building = True
|
||||
targets = [self.hob_image]
|
||||
self.server.runCommand(["setVariable", "LINGUAS_INSTALL", ""])
|
||||
self.server.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)])
|
||||
targets = [self.image]
|
||||
if self.package_queue:
|
||||
self.runCommand(["setVariable", "LINGUAS_INSTALL", ""])
|
||||
self.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)])
|
||||
if self.toolchain_packages:
|
||||
self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages)])
|
||||
targets.append(self.hob_toolchain)
|
||||
self.server.runCommand(["buildTargets", targets, "build"])
|
||||
self.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages)])
|
||||
targets.append(self.toolchain)
|
||||
self.runCommand(["buildTargets", targets, self.default_task])
|
||||
|
||||
def handle_event(self, event):
|
||||
if not event:
|
||||
@@ -179,27 +189,6 @@ class HobHandler(gobject.GObject):
|
||||
elif isinstance(event, bb.command.CommandCompleted):
|
||||
self.current_phase = None
|
||||
self.run_next_command()
|
||||
# TODO: Currently there are NoProvider issues when generate
|
||||
# universe tree dependency for non-x86 architecture.
|
||||
# Comment the follow code to enable the build of non-x86
|
||||
# architectures in Hob.
|
||||
#elif isinstance(event, bb.event.NoProvider):
|
||||
# if event._runtime:
|
||||
# r = "R"
|
||||
# else:
|
||||
# r = ""
|
||||
# if event._dependees:
|
||||
# self.error_msg += " Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r)
|
||||
# else:
|
||||
# self.error_msg += " Nothing %sPROVIDES '%s'" % (r, event._item)
|
||||
# if event._reasons:
|
||||
# for reason in event._reasons:
|
||||
# self.error_msg += " %s" % reason
|
||||
|
||||
# self.commands_async = []
|
||||
# self.emit("command-failed", self.error_msg)
|
||||
# self.error_msg = ""
|
||||
|
||||
elif isinstance(event, bb.command.CommandFailed):
|
||||
self.commands_async = []
|
||||
self.clear_busy()
|
||||
@@ -237,99 +226,94 @@ class HobHandler(gobject.GObject):
|
||||
return
|
||||
|
||||
def init_cooker(self):
|
||||
self.server.runCommand(["initCooker"])
|
||||
|
||||
def parse_config(self):
|
||||
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
||||
self.run_next_command(self.PARSE_CONFIG)
|
||||
|
||||
def parse_generate_configuration(self):
|
||||
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
||||
self.generate_configuration()
|
||||
self.runCommand(["initCooker"])
|
||||
|
||||
def set_extra_inherit(self, bbclass):
|
||||
inherits = self.server.runCommand(["getVariable", "INHERIT"]) or ""
|
||||
inherits = self.runCommand(["getVariable", "INHERIT"]) or ""
|
||||
inherits = inherits + " " + bbclass
|
||||
self.server.runCommand(["setVariable", "INHERIT", inherits])
|
||||
self.runCommand(["setVariable", "INHERIT", inherits])
|
||||
|
||||
def set_bblayers(self, bblayers):
|
||||
self.server.runCommand(["setVariable", "BBLAYERS", " ".join(bblayers)])
|
||||
self.runCommand(["setVariable", "BBLAYERS_HOB", " ".join(bblayers)])
|
||||
|
||||
def set_machine(self, machine):
|
||||
if machine:
|
||||
self.server.runCommand(["setVariable", "MACHINE", machine])
|
||||
self.runCommand(["setVariable", "MACHINE_HOB", machine])
|
||||
|
||||
def set_sdk_machine(self, sdk_machine):
|
||||
self.server.runCommand(["setVariable", "SDKMACHINE", sdk_machine])
|
||||
self.runCommand(["setVariable", "SDKMACHINE_HOB", sdk_machine])
|
||||
|
||||
def set_image_fstypes(self, image_fstypes):
|
||||
self.server.runCommand(["setVariable", "IMAGE_FSTYPES", image_fstypes])
|
||||
self.runCommand(["setVariable", "IMAGE_FSTYPES", image_fstypes])
|
||||
|
||||
def set_distro(self, distro):
|
||||
if distro != "defaultsetup":
|
||||
self.server.runCommand(["setVariable", "DISTRO", distro])
|
||||
self.runCommand(["setVariable", "DISTRO_HOB", distro])
|
||||
|
||||
def set_package_format(self, format):
|
||||
package_classes = ""
|
||||
for pkgfmt in format.split():
|
||||
package_classes += ("package_%s" % pkgfmt + " ")
|
||||
self.server.runCommand(["setVariable", "PACKAGE_CLASSES", package_classes])
|
||||
self.runCommand(["setVariable", "PACKAGE_CLASSES_HOB", package_classes])
|
||||
|
||||
def set_bbthreads(self, threads):
|
||||
self.server.runCommand(["setVariable", "BB_NUMBER_THREADS", threads])
|
||||
self.runCommand(["setVariable", "BB_NUMBER_THREADS_HOB", threads])
|
||||
|
||||
def set_pmake(self, threads):
|
||||
pmake = "-j %s" % threads
|
||||
self.server.runCommand(["setVariable", "PARALLEL_MAKE", pmake])
|
||||
self.runCommand(["setVariable", "PARALLEL_MAKE_HOB", pmake])
|
||||
|
||||
def set_dl_dir(self, directory):
|
||||
self.server.runCommand(["setVariable", "DL_DIR", directory])
|
||||
self.runCommand(["setVariable", "DL_DIR_HOB", directory])
|
||||
|
||||
def set_sstate_dir(self, directory):
|
||||
self.server.runCommand(["setVariable", "SSTATE_DIR", directory])
|
||||
self.runCommand(["setVariable", "SSTATE_DIR_HOB", directory])
|
||||
|
||||
def set_sstate_mirror(self, url):
|
||||
self.server.runCommand(["setVariable", "SSTATE_MIRROR", url])
|
||||
self.runCommand(["setVariable", "SSTATE_MIRROR_HOB", url])
|
||||
|
||||
def set_extra_size(self, image_extra_size):
|
||||
self.server.runCommand(["setVariable", "IMAGE_ROOTFS_EXTRA_SPACE", str(image_extra_size)])
|
||||
self.runCommand(["setVariable", "IMAGE_ROOTFS_EXTRA_SPACE", str(image_extra_size)])
|
||||
|
||||
def set_rootfs_size(self, image_rootfs_size):
|
||||
self.server.runCommand(["setVariable", "IMAGE_ROOTFS_SIZE", str(image_rootfs_size)])
|
||||
self.runCommand(["setVariable", "IMAGE_ROOTFS_SIZE", str(image_rootfs_size)])
|
||||
|
||||
def set_incompatible_license(self, incompat_license):
|
||||
self.server.runCommand(["setVariable", "INCOMPATIBLE_LICENSE", incompat_license])
|
||||
self.runCommand(["setVariable", "INCOMPATIBLE_LICENSE_HOB", incompat_license])
|
||||
|
||||
def set_extra_config(self, extra_setting):
|
||||
for key in extra_setting.keys():
|
||||
value = extra_setting[key]
|
||||
self.server.runCommand(["setVariable", key, value])
|
||||
self.runCommand(["setVariable", key, value])
|
||||
|
||||
def set_config_filter(self, config_filter):
|
||||
self.runCommand(["setConfFilter", config_filter])
|
||||
|
||||
def set_http_proxy(self, http_proxy):
|
||||
self.server.runCommand(["setVariable", "http_proxy", http_proxy])
|
||||
self.runCommand(["setVariable", "http_proxy", http_proxy])
|
||||
|
||||
def set_https_proxy(self, https_proxy):
|
||||
self.server.runCommand(["setVariable", "https_proxy", https_proxy])
|
||||
self.runCommand(["setVariable", "https_proxy", https_proxy])
|
||||
|
||||
def set_ftp_proxy(self, ftp_proxy):
|
||||
self.server.runCommand(["setVariable", "ftp_proxy", ftp_proxy])
|
||||
self.runCommand(["setVariable", "ftp_proxy", ftp_proxy])
|
||||
|
||||
def set_all_proxy(self, all_proxy):
|
||||
self.server.runCommand(["setVariable", "all_proxy", all_proxy])
|
||||
self.runCommand(["setVariable", "all_proxy", all_proxy])
|
||||
|
||||
def set_git_proxy(self, host, port):
|
||||
self.server.runCommand(["setVariable", "GIT_PROXY_HOST", host])
|
||||
self.server.runCommand(["setVariable", "GIT_PROXY_PORT", port])
|
||||
self.runCommand(["setVariable", "GIT_PROXY_HOST", host])
|
||||
self.runCommand(["setVariable", "GIT_PROXY_PORT", port])
|
||||
|
||||
def set_cvs_proxy(self, host, port):
|
||||
self.server.runCommand(["setVariable", "CVS_PROXY_HOST", host])
|
||||
self.server.runCommand(["setVariable", "CVS_PROXY_PORT", port])
|
||||
self.runCommand(["setVariable", "CVS_PROXY_HOST", host])
|
||||
self.runCommand(["setVariable", "CVS_PROXY_PORT", port])
|
||||
|
||||
def request_package_info(self):
|
||||
self.commands_async.append(self.SUB_GENERATE_PKGINFO)
|
||||
self.run_next_command(self.POPULATE_PACKAGEINFO)
|
||||
|
||||
def generate_configuration(self):
|
||||
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
||||
self.commands_async.append(self.SUB_PATH_LAYERS)
|
||||
self.commands_async.append(self.SUB_FILES_DISTRO)
|
||||
self.commands_async.append(self.SUB_FILES_MACH)
|
||||
@@ -342,19 +326,21 @@ class HobHandler(gobject.GObject):
|
||||
self.commands_async.append(self.SUB_GNERATE_TGTS)
|
||||
self.run_next_command(self.GENERATE_RECIPES)
|
||||
|
||||
def generate_packages(self, tgts):
|
||||
def generate_packages(self, tgts, default_task="build"):
|
||||
targets = []
|
||||
targets.extend(tgts)
|
||||
self.recipe_queue = targets
|
||||
self.default_task = default_task
|
||||
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
||||
self.commands_async.append(self.SUB_BUILD_RECIPES)
|
||||
self.run_next_command(self.GENERATE_PACKAGES)
|
||||
|
||||
def generate_image(self, tgts, hob_image, hob_toolchain, toolchain_packages=[]):
|
||||
self.package_queue = tgts
|
||||
self.hob_image = hob_image
|
||||
self.hob_toolchain = hob_toolchain
|
||||
def generate_image(self, image, toolchain, image_packages=[], toolchain_packages=[], default_task="build"):
|
||||
self.image = image
|
||||
self.toolchain = toolchain
|
||||
self.package_queue = image_packages
|
||||
self.toolchain_packages = toolchain_packages
|
||||
self.default_task = default_task
|
||||
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
||||
self.commands_async.append(self.SUB_BUILD_IMAGE)
|
||||
self.run_next_command(self.GENERATE_IMAGE)
|
||||
@@ -368,16 +354,16 @@ class HobHandler(gobject.GObject):
|
||||
self.building = False
|
||||
|
||||
def cancel_parse(self):
|
||||
self.server.runCommand(["stateStop"])
|
||||
self.runCommand(["stateStop"])
|
||||
|
||||
def cancel_build(self, force=False):
|
||||
if force:
|
||||
# Force the cooker to stop as quickly as possible
|
||||
self.server.runCommand(["stateStop"])
|
||||
self.runCommand(["stateStop"])
|
||||
else:
|
||||
# Wait for tasks to complete before shutting down, this helps
|
||||
# leave the workdir in a usable state
|
||||
self.server.runCommand(["stateShutdown"])
|
||||
self.runCommand(["stateShutdown"])
|
||||
|
||||
def reset_build(self):
|
||||
self.build.reset()
|
||||
@@ -392,19 +378,19 @@ class HobHandler(gobject.GObject):
|
||||
def get_parameters(self):
|
||||
# retrieve the parameters from bitbake
|
||||
params = {}
|
||||
params["core_base"] = self.server.runCommand(["getVariable", "COREBASE"]) or ""
|
||||
params["core_base"] = self.runCommand(["getVariable", "COREBASE"]) or ""
|
||||
hob_layer = params["core_base"] + "/meta-hob"
|
||||
params["layer"] = self.server.runCommand(["getVariable", "BBLAYERS"]) or ""
|
||||
params["layer"] = self.runCommand(["getVariable", "BBLAYERS"]) or ""
|
||||
if hob_layer not in params["layer"].split():
|
||||
params["layer"] += (" " + hob_layer)
|
||||
params["dldir"] = self.server.runCommand(["getVariable", "DL_DIR"]) or ""
|
||||
params["machine"] = self.server.runCommand(["getVariable", "MACHINE"]) or ""
|
||||
params["distro"] = self.server.runCommand(["getVariable", "DISTRO"]) or "defaultsetup"
|
||||
params["pclass"] = self.server.runCommand(["getVariable", "PACKAGE_CLASSES"]) or ""
|
||||
params["sstatedir"] = self.server.runCommand(["getVariable", "SSTATE_DIR"]) or ""
|
||||
params["sstatemirror"] = self.server.runCommand(["getVariable", "SSTATE_MIRROR"]) or ""
|
||||
params["dldir"] = self.runCommand(["getVariable", "DL_DIR"]) or ""
|
||||
params["machine"] = self.runCommand(["getVariable", "MACHINE"]) or ""
|
||||
params["distro"] = self.runCommand(["getVariable", "DISTRO"]) or "defaultsetup"
|
||||
params["pclass"] = self.runCommand(["getVariable", "PACKAGE_CLASSES"]) or ""
|
||||
params["sstatedir"] = self.runCommand(["getVariable", "SSTATE_DIR"]) or ""
|
||||
params["sstatemirror"] = self.runCommand(["getVariable", "SSTATE_MIRROR"]) or ""
|
||||
|
||||
num_threads = self.server.runCommand(["getCpuCount"])
|
||||
num_threads = self.runCommand(["getCpuCount"])
|
||||
if not num_threads:
|
||||
num_threads = 1
|
||||
max_threads = 65536
|
||||
@@ -417,7 +403,7 @@ class HobHandler(gobject.GObject):
|
||||
max_threads = 65536
|
||||
params["max_threads"] = max_threads
|
||||
|
||||
bbthread = self.server.runCommand(["getVariable", "BB_NUMBER_THREADS"])
|
||||
bbthread = self.runCommand(["getVariable", "BB_NUMBER_THREADS"])
|
||||
if not bbthread:
|
||||
bbthread = num_threads
|
||||
else:
|
||||
@@ -427,7 +413,7 @@ class HobHandler(gobject.GObject):
|
||||
bbthread = num_threads
|
||||
params["bbthread"] = bbthread
|
||||
|
||||
pmake = self.server.runCommand(["getVariable", "PARALLEL_MAKE"])
|
||||
pmake = self.runCommand(["getVariable", "PARALLEL_MAKE"])
|
||||
if not pmake:
|
||||
pmake = num_threads
|
||||
elif isinstance(pmake, int):
|
||||
@@ -439,9 +425,9 @@ class HobHandler(gobject.GObject):
|
||||
pmake = num_threads
|
||||
params["pmake"] = "-j %s" % pmake
|
||||
|
||||
params["image_addr"] = self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) or ""
|
||||
params["image_addr"] = self.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) or ""
|
||||
|
||||
image_extra_size = self.server.runCommand(["getVariable", "IMAGE_ROOTFS_EXTRA_SPACE"])
|
||||
image_extra_size = self.runCommand(["getVariable", "IMAGE_ROOTFS_EXTRA_SPACE"])
|
||||
if not image_extra_size:
|
||||
image_extra_size = 0
|
||||
else:
|
||||
@@ -451,7 +437,7 @@ class HobHandler(gobject.GObject):
|
||||
image_extra_size = 0
|
||||
params["image_extra_size"] = image_extra_size
|
||||
|
||||
image_rootfs_size = self.server.runCommand(["getVariable", "IMAGE_ROOTFS_SIZE"])
|
||||
image_rootfs_size = self.runCommand(["getVariable", "IMAGE_ROOTFS_SIZE"])
|
||||
if not image_rootfs_size:
|
||||
image_rootfs_size = 0
|
||||
else:
|
||||
@@ -461,7 +447,7 @@ class HobHandler(gobject.GObject):
|
||||
image_rootfs_size = 0
|
||||
params["image_rootfs_size"] = image_rootfs_size
|
||||
|
||||
image_overhead_factor = self.server.runCommand(["getVariable", "IMAGE_OVERHEAD_FACTOR"])
|
||||
image_overhead_factor = self.runCommand(["getVariable", "IMAGE_OVERHEAD_FACTOR"])
|
||||
if not image_overhead_factor:
|
||||
image_overhead_factor = 1
|
||||
else:
|
||||
@@ -471,36 +457,37 @@ class HobHandler(gobject.GObject):
|
||||
image_overhead_factor = 1
|
||||
params['image_overhead_factor'] = image_overhead_factor
|
||||
|
||||
params["incompat_license"] = self._remove_redundant(self.server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) or "")
|
||||
params["sdk_machine"] = self.server.runCommand(["getVariable", "SDKMACHINE"]) or self.server.runCommand(["getVariable", "SDK_ARCH"]) or ""
|
||||
params["incompat_license"] = self._remove_redundant(self.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) or "")
|
||||
params["sdk_machine"] = self.runCommand(["getVariable", "SDKMACHINE"]) or self.runCommand(["getVariable", "SDK_ARCH"]) or ""
|
||||
|
||||
params["image_fstypes"] = self._remove_redundant(self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]) or "")
|
||||
params["image_fstypes"] = self._remove_redundant(self.runCommand(["getVariable", "IMAGE_FSTYPES"]) or "")
|
||||
|
||||
params["image_types"] = self._remove_redundant(self.server.runCommand(["getVariable", "IMAGE_TYPES"]) or "")
|
||||
params["image_types"] = self._remove_redundant(self.runCommand(["getVariable", "IMAGE_TYPES"]) or "")
|
||||
|
||||
params["conf_version"] = self.server.runCommand(["getVariable", "CONF_VERSION"]) or ""
|
||||
params["lconf_version"] = self.server.runCommand(["getVariable", "LCONF_VERSION"]) or ""
|
||||
params["conf_version"] = self.runCommand(["getVariable", "CONF_VERSION"]) or ""
|
||||
params["lconf_version"] = self.runCommand(["getVariable", "LCONF_VERSION"]) or ""
|
||||
|
||||
params["runnable_image_types"] = self._remove_redundant(self.server.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or "")
|
||||
params["runnable_machine_patterns"] = self._remove_redundant(self.server.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or "")
|
||||
params["deployable_image_types"] = self._remove_redundant(self.server.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or "")
|
||||
params["tmpdir"] = self.server.runCommand(["getVariable", "TMPDIR"]) or ""
|
||||
params["distro_version"] = self.server.runCommand(["getVariable", "DISTRO_VERSION"]) or ""
|
||||
params["target_os"] = self.server.runCommand(["getVariable", "TARGET_OS"]) or ""
|
||||
params["target_arch"] = self.server.runCommand(["getVariable", "TARGET_ARCH"]) or ""
|
||||
params["tune_pkgarch"] = self.server.runCommand(["getVariable", "TUNE_PKGARCH"]) or ""
|
||||
params["bb_version"] = self.server.runCommand(["getVariable", "BB_MIN_VERSION"]) or ""
|
||||
params["tune_arch"] = self.server.runCommand(["getVariable", "TUNE_ARCH"]) or ""
|
||||
params["runnable_image_types"] = self._remove_redundant(self.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or "")
|
||||
params["runnable_machine_patterns"] = self._remove_redundant(self.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or "")
|
||||
params["deployable_image_types"] = self._remove_redundant(self.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or "")
|
||||
params["tmpdir"] = self.runCommand(["getVariable", "TMPDIR"]) or ""
|
||||
params["distro_version"] = self.runCommand(["getVariable", "DISTRO_VERSION"]) or ""
|
||||
params["target_os"] = self.runCommand(["getVariable", "TARGET_OS"]) or ""
|
||||
params["target_arch"] = self.runCommand(["getVariable", "TARGET_ARCH"]) or ""
|
||||
params["tune_pkgarch"] = self.runCommand(["getVariable", "TUNE_PKGARCH"]) or ""
|
||||
params["bb_version"] = self.runCommand(["getVariable", "BB_MIN_VERSION"]) or ""
|
||||
|
||||
params["git_proxy_host"] = self.server.runCommand(["getVariable", "GIT_PROXY_HOST"]) or ""
|
||||
params["git_proxy_port"] = self.server.runCommand(["getVariable", "GIT_PROXY_PORT"]) or ""
|
||||
params["default_task"] = self.runCommand(["getVariable", "BB_DEFAULT_TASK"]) or "build"
|
||||
|
||||
params["http_proxy"] = self.server.runCommand(["getVariable", "http_proxy"]) or ""
|
||||
params["ftp_proxy"] = self.server.runCommand(["getVariable", "ftp_proxy"]) or ""
|
||||
params["https_proxy"] = self.server.runCommand(["getVariable", "https_proxy"]) or ""
|
||||
params["all_proxy"] = self.server.runCommand(["getVariable", "all_proxy"]) or ""
|
||||
params["git_proxy_host"] = self.runCommand(["getVariable", "GIT_PROXY_HOST"]) or ""
|
||||
params["git_proxy_port"] = self.runCommand(["getVariable", "GIT_PROXY_PORT"]) or ""
|
||||
|
||||
params["cvs_proxy_host"] = self.server.runCommand(["getVariable", "CVS_PROXY_HOST"]) or ""
|
||||
params["cvs_proxy_port"] = self.server.runCommand(["getVariable", "CVS_PROXY_PORT"]) or ""
|
||||
params["http_proxy"] = self.runCommand(["getVariable", "http_proxy"]) or ""
|
||||
params["ftp_proxy"] = self.runCommand(["getVariable", "ftp_proxy"]) or ""
|
||||
params["https_proxy"] = self.runCommand(["getVariable", "https_proxy"]) or ""
|
||||
params["all_proxy"] = self.runCommand(["getVariable", "all_proxy"]) or ""
|
||||
|
||||
params["cvs_proxy_host"] = self.runCommand(["getVariable", "CVS_PROXY_HOST"]) or ""
|
||||
params["cvs_proxy_port"] = self.runCommand(["getVariable", "CVS_PROXY_PORT"]) or ""
|
||||
|
||||
return params
|
||||
|
||||
@@ -42,6 +42,8 @@ class PackageListModel(gtk.TreeStore):
|
||||
()),
|
||||
}
|
||||
|
||||
__toolchain_required_packages__ = ["task-core-standalone-sdk-target", "task-core-standalone-sdk-target-dbg"]
|
||||
|
||||
def __init__(self):
|
||||
|
||||
self.contents = None
|
||||
@@ -389,7 +391,7 @@ class PackageListModel(gtk.TreeStore):
|
||||
child_it = self.iter_next(child_it)
|
||||
it = self.iter_next(it)
|
||||
|
||||
return packagelist
|
||||
return list(set(packagelist + self.__toolchain_required_packages__));
|
||||
"""
|
||||
Return the selected package size, unit is B.
|
||||
"""
|
||||
@@ -563,7 +565,9 @@ class RecipeListModel(gtk.ListStore):
|
||||
|
||||
# dummy image for prompt
|
||||
self.set(self.append(), self.COL_NAME, self.__dummy_image__,
|
||||
self.COL_DESC, "",
|
||||
self.COL_DESC, "Use the 'View recipes' and 'View packages' " \
|
||||
"options to select what you want to include " \
|
||||
"in your image.",
|
||||
self.COL_LIC, "", self.COL_GROUP, "",
|
||||
self.COL_DEPS, "", self.COL_BINB, "",
|
||||
self.COL_TYPE, "image", self.COL_INC, False,
|
||||
@@ -615,22 +619,6 @@ class RecipeListModel(gtk.ListStore):
|
||||
def path_included(self, item_path):
|
||||
return self[item_path][self.COL_INC]
|
||||
|
||||
"""
|
||||
Append a certain image into the combobox
|
||||
"""
|
||||
def image_list_append(self, name, deps, install):
|
||||
# check whether a certain image is there
|
||||
if not name or self.find_path_for_item(name):
|
||||
return
|
||||
it = self.append()
|
||||
self.set(it, self.COL_NAME, name, self.COL_DESC, "",
|
||||
self.COL_LIC, "", self.COL_GROUP, "",
|
||||
self.COL_DEPS, deps, self.COL_BINB, "",
|
||||
self.COL_TYPE, "image", self.COL_INC, False,
|
||||
self.COL_IMG, False, self.COL_INSTALL, install,
|
||||
self.COL_PN, name)
|
||||
self.pn_path[name] = self.get_path(it)
|
||||
|
||||
"""
|
||||
Add this item, and any of its dependencies, to the image contents
|
||||
"""
|
||||
|
||||
@@ -165,7 +165,6 @@ class HobViewTable (gtk.VBox):
|
||||
|
||||
scroll = gtk.ScrolledWindow()
|
||||
scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
|
||||
scroll.set_shadow_type(gtk.SHADOW_IN)
|
||||
scroll.add(self.table_tree)
|
||||
self.pack_start(scroll, True, True, 0)
|
||||
|
||||
@@ -175,7 +174,8 @@ class HobViewTable (gtk.VBox):
|
||||
if binb:
|
||||
bin = binb.split(', ')
|
||||
cell.set_property('text', bin[0])
|
||||
|
||||
else:
|
||||
cell.set_property('text', "")
|
||||
return True
|
||||
|
||||
def set_model(self, tree_model):
|
||||
|
||||
@@ -264,9 +264,7 @@ class ImageConfigurationPage (HobPage):
|
||||
|
||||
self.builder.configuration.curr_mach = combo_item
|
||||
if self.machine_combo_changed_by_manual:
|
||||
self.builder.configuration.selected_image = None
|
||||
self.builder.configuration.selected_recipes = []
|
||||
self.builder.configuration.selected_packages = []
|
||||
self.builder.configuration.clear_selection()
|
||||
# reset machine_combo_changed_by_manual
|
||||
self.machine_combo_changed_by_manual = True
|
||||
|
||||
|
||||
@@ -239,3 +239,11 @@ class PackageSelectionPage (HobPage):
|
||||
if (not cell) or (not tree):
|
||||
return
|
||||
to_render_cells = []
|
||||
view_model = tree.get_model()
|
||||
self.get_excluded_rows(to_render_cells, view_model, view_model.get_iter_first())
|
||||
|
||||
cell.fadeout(tree, 1000, to_render_cells)
|
||||
|
||||
def after_fadeout_checkin_include(self, table, ctrl, cell, tree):
|
||||
tree.set_model(self.package_model.tree_model(self.pages[0]['filter']))
|
||||
tree.expand_all()
|
||||
|
||||
@@ -35,7 +35,7 @@ class PersistentTooltip(gtk.Window):
|
||||
|
||||
markup: some Pango text markup to display in the tooltip
|
||||
"""
|
||||
def __init__(self, markup):
|
||||
def __init__(self, markup, parent_win=None):
|
||||
gtk.Window.__init__(self, gtk.WINDOW_POPUP)
|
||||
|
||||
# Inherit the system theme for a tooltip
|
||||
@@ -76,6 +76,10 @@ class PersistentTooltip(gtk.Window):
|
||||
# Ensure a reasonable minimum size
|
||||
self.set_geometry_hints(self, 100, 50)
|
||||
|
||||
# Set this window as a transient window for parent(main window)
|
||||
if parent_win:
|
||||
self.set_transient_for(parent_win)
|
||||
self.set_destroy_with_parent(True)
|
||||
# Draw our label and close buttons
|
||||
hbox = gtk.HBox(False, 0)
|
||||
hbox.show()
|
||||
|
||||
@@ -99,7 +99,7 @@ class RecipeSelectionPage (HobPage):
|
||||
}]
|
||||
}, {
|
||||
'name' : 'Tasks',
|
||||
'tooltip' : 'All tasks availabel in the Yocto Project',
|
||||
'tooltip' : 'All tasks available in the Yocto Project',
|
||||
'filter' : { RecipeListModel.COL_TYPE : ['task'] },
|
||||
'columns' : [{
|
||||
'col_name' : 'Task name',
|
||||
|
||||
@@ -82,6 +82,9 @@ class RunningBuild (gobject.GObject):
|
||||
'log-error' : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
()),
|
||||
'no-provider' : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_PYOBJECT,)),
|
||||
}
|
||||
pids_to_task = {}
|
||||
tasks_to_iter = {}
|
||||
@@ -320,6 +323,20 @@ class RunningBuild (gobject.GObject):
|
||||
message["title"] = ""
|
||||
message["task"] = event.taskstring
|
||||
self.emit("task-started", message)
|
||||
elif isinstance(event, bb.event.NoProvider):
|
||||
msg = ""
|
||||
if event._runtime:
|
||||
r = "R"
|
||||
else:
|
||||
r = ""
|
||||
if event._dependees:
|
||||
msg = "Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)\n" % (r, event._item, ", ".join(event._dependees), r)
|
||||
else:
|
||||
msg = "Nothing %sPROVIDES '%s'\n" % (r, event._item)
|
||||
if event._reasons:
|
||||
for reason in event._reasons:
|
||||
msg += ("%s\n" % reason)
|
||||
self.emit("no-provider", msg)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -136,11 +136,27 @@ class TemplateMgr(gobject.GObject):
|
||||
self.local_conf = None
|
||||
self.image_bb = None
|
||||
|
||||
@classmethod
|
||||
def convert_to_template_pathfilename(cls, filename, path):
|
||||
return "%s/%s%s%s" % (path, "template-", filename, ".hob")
|
||||
|
||||
@classmethod
|
||||
def convert_to_bblayers_pathfilename(cls, filename, path):
|
||||
return "%s/%s%s%s" % (path, "bblayers-", filename, ".conf")
|
||||
|
||||
@classmethod
|
||||
def convert_to_local_pathfilename(cls, filename, path):
|
||||
return "%s/%s%s%s" % (path, "local-", filename, ".conf")
|
||||
|
||||
@classmethod
|
||||
def convert_to_image_pathfilename(cls, filename, path):
|
||||
return "%s/%s%s%s" % (path, "hob-image-", filename, ".bb")
|
||||
|
||||
def open(self, filename, path):
|
||||
self.template_hob = HobTemplateFile("%s/%s%s%s" % (path, "template-", filename, ".hob"))
|
||||
self.bblayers_conf = ConfigFile("%s/%s%s%s" % (path, "bblayers-", filename, ".conf"))
|
||||
self.local_conf = ConfigFile("%s/%s%s%s" % (path, "local-", filename, ".conf"))
|
||||
self.image_bb = RecipeFile("%s/%s%s%s" % (path, "hob-image-", filename, ".bb"))
|
||||
self.template_hob = HobTemplateFile(TemplateMgr.convert_to_template_pathfilename(filename, path))
|
||||
self.bblayers_conf = ConfigFile(TemplateMgr.convert_to_bblayers_pathfilename(filename, path))
|
||||
self.local_conf = ConfigFile(TemplateMgr.convert_to_local_pathfilename(filename, path))
|
||||
self.image_bb = RecipeFile(TemplateMgr.convert_to_image_pathfilename(filename, path))
|
||||
|
||||
def setVar(self, var, val):
|
||||
if var in TemplateMgr.__gLocalVars__:
|
||||
|
||||
@@ -31,9 +31,6 @@ from contextlib import contextmanager
|
||||
|
||||
logger = logging.getLogger("BitBake.Util")
|
||||
|
||||
# Version comparison
|
||||
separators = ".-"
|
||||
|
||||
# Context used in better_exec, eval
|
||||
_context = {
|
||||
"os": os,
|
||||
@@ -48,15 +45,18 @@ def explode_version(s):
|
||||
while (s != ''):
|
||||
if s[0] in string.digits:
|
||||
m = numeric_regexp.match(s)
|
||||
r.append(int(m.group(1)))
|
||||
r.append((0, int(m.group(1))))
|
||||
s = m.group(2)
|
||||
continue
|
||||
if s[0] in string.letters:
|
||||
m = alpha_regexp.match(s)
|
||||
r.append(m.group(1))
|
||||
r.append((1, m.group(1)))
|
||||
s = m.group(2)
|
||||
continue
|
||||
r.append(s[0])
|
||||
if s[0] == '~':
|
||||
r.append((-1, s[0]))
|
||||
else:
|
||||
r.append((2, s[0]))
|
||||
s = s[1:]
|
||||
return r
|
||||
|
||||
@@ -77,33 +77,25 @@ def split_version(s):
|
||||
def vercmp_part(a, b):
|
||||
va = explode_version(a)
|
||||
vb = explode_version(b)
|
||||
sa = False
|
||||
sb = False
|
||||
while True:
|
||||
if va == []:
|
||||
ca = None
|
||||
(oa, ca) = (0, None)
|
||||
else:
|
||||
ca = va.pop(0)
|
||||
(oa, ca) = va.pop(0)
|
||||
if vb == []:
|
||||
cb = None
|
||||
(ob, cb) = (0, None)
|
||||
else:
|
||||
cb = vb.pop(0)
|
||||
if ca == None and cb == None:
|
||||
(ob, cb) = vb.pop(0)
|
||||
if (oa, ca) == (0, None) and (ob, cb) == (0, None):
|
||||
return 0
|
||||
|
||||
if isinstance(ca, basestring):
|
||||
sa = ca in separators
|
||||
if isinstance(cb, basestring):
|
||||
sb = cb in separators
|
||||
if sa and not sb:
|
||||
if oa < ob:
|
||||
return -1
|
||||
if not sa and sb:
|
||||
elif oa > ob:
|
||||
return 1
|
||||
|
||||
if ca > cb:
|
||||
return 1
|
||||
if ca < cb:
|
||||
elif ca < cb:
|
||||
return -1
|
||||
elif ca > cb:
|
||||
return 1
|
||||
|
||||
def vercmp(ta, tb):
|
||||
(ea, va, ra) = ta
|
||||
|
||||
@@ -495,7 +495,7 @@
|
||||
For complex custom images, the best approach is to create a custom task package
|
||||
that is used to build the image or images.
|
||||
A good example of a tasks package is
|
||||
<filename>meta/recipes-sato/tasks/task-poky.bb</filename>.
|
||||
<filename>meta/recipes-core/tasks/task-core-boot.bb</filename>
|
||||
The
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'>PACKAGES</ulink></filename>
|
||||
variable lists the task packages to build along with the complementary
|
||||
|
||||
@@ -493,7 +493,7 @@
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>
|
||||
How does the Yocto Project obtain source code and will it work behind my
|
||||
How does the Yocto Project build system obtain source code and will it work behind my
|
||||
firewall or proxy server?
|
||||
</para>
|
||||
</question>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!ENTITY DISTRO "1.1">
|
||||
<!ENTITY DISTRO_NAME "edison">
|
||||
<!ENTITY DISTRO "1.2">
|
||||
<!ENTITY DISTRO_NAME "denzil">
|
||||
<!ENTITY YOCTO_DOC_VERSION "latest">
|
||||
<!ENTITY POKYVERSION "6.0">
|
||||
<!ENTITY POKYVERSION "7.0">
|
||||
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
|
||||
<!ENTITY COPYRIGHT_YEAR "2010-2012">
|
||||
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
Packages and package installation vary depending on your development system.
|
||||
In general, you need to have root access and then install the required packages.
|
||||
The next few sections show you how to get set up with the right packages for
|
||||
Ubuntu, Fedora, and openSUSE.
|
||||
Ubuntu, Fedora, openSUSE, and CentOS.
|
||||
</para>
|
||||
|
||||
<section id='ubuntu'>
|
||||
@@ -254,6 +254,9 @@
|
||||
the commands as root user.
|
||||
See the <ulink url='https://fedoraproject.org/wiki/Configuring_Sudo'>Configuring Sudo</ulink>
|
||||
wiki page for details.
|
||||
For information on other dependencies you will need to install, see the Fedora section on the
|
||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
|
||||
wiki page.
|
||||
</para></note>
|
||||
</section>
|
||||
|
||||
@@ -271,6 +274,36 @@
|
||||
diffstat texinfo mercurial freeglut-devel libSDL-devel
|
||||
</literallayout>
|
||||
</section>
|
||||
|
||||
<section id='centos'>
|
||||
<title>CentOS</title>
|
||||
|
||||
<para>
|
||||
The packages you need for a supported CentOS distribution are shown in the following
|
||||
commands:
|
||||
</para>
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum -y groupinstall "development tools"
|
||||
$ sudo yum -y install tetex gawk sqlite-devel vim-common redhat-lsb xz \
|
||||
m4 make wget curl ftp tar bzip2 gzip python-devel \
|
||||
unzip perl texinfo texi2html diffstat openjade zlib-devel \
|
||||
docbook-style-dsssl sed docbook-style-xsl docbook-dtds \
|
||||
docbook-utils bc glibc-devel pcre pcre-devel \
|
||||
groff linuxdoc-tools patch linuxdoc-tools cmake \
|
||||
tcl-devel gettext ncurses apr \
|
||||
SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils \
|
||||
autoconf automake libtool xterm
|
||||
</literallayout>
|
||||
<note><para>
|
||||
Depending on the CentOS version you are using, other requirements and dependencies
|
||||
might exist.
|
||||
For details, you should look at the CentOS sections on the
|
||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
|
||||
wiki page.
|
||||
</para></note>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='releases'>
|
||||
@@ -294,9 +327,7 @@
|
||||
Doing so allows you to contribute back to the project.
|
||||
For information on how to get set up using this method, see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#local-yp-release'>Yocto
|
||||
Project Release</ulink>" item in
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;'>The Yocto Project
|
||||
Development Manual</ulink>.
|
||||
Project Release</ulink>" item in The Yocto Project Development Manual.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
@@ -351,9 +382,9 @@
|
||||
By default, the Yocto Project searches for source code using a pre-determined order
|
||||
through a set of locations.
|
||||
If you encounter problems with the Yocto Project finding and downloading source code, see
|
||||
the FAQ entry "How does Poky obtain source code and will it work behind my
|
||||
the FAQ entry "How does the Yocto Project build system obtain source code and will it work behind my
|
||||
firewall or proxy server?" in
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;'>
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#faq'>
|
||||
The Yocto Project Reference Manual</ulink>.
|
||||
</para></note>
|
||||
|
||||
@@ -361,14 +392,14 @@
|
||||
<literallayout class='monospaced'>
|
||||
$ wget &YOCTO_POKY_DL_URL;
|
||||
$ tar xjf &YOCTO_POKY;.tar.bz2
|
||||
$ source &OE_INIT_PATH; edison-6.0-build
|
||||
$ source &OE_INIT_PATH; &YOCTO_POKY;-build
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<tip><para>
|
||||
To help conserve disk space during builds, you can add the following statement
|
||||
to your project's configuration file, which for this example
|
||||
is <filename>edison-6.0-build/conf/local.conf</filename>.
|
||||
is <filename>&YOCTO_POKY;-build/conf/local.conf</filename>.
|
||||
Adding this statement deletes the work directory used for building a package
|
||||
once the package is built.
|
||||
<literallayout class='monospaced'>
|
||||
@@ -384,13 +415,13 @@
|
||||
<ulink url='&YOCTO_HOME_URL;/download'>Yocto Project website</ulink>
|
||||
Downloads page to retrieve the tarball.</para></listitem>
|
||||
<listitem><para>The second command extracts the files from the tarball and places
|
||||
them into a directory named <filename>poky-edison-6.0</filename> in the current
|
||||
them into a directory named <filename>&YOCTO_POKY;</filename> in the current
|
||||
directory.</para></listitem>
|
||||
<listitem><para>The third command runs the Yocto Project environment setup script.
|
||||
Running this script defines Yocto Project build environment settings needed to
|
||||
complete the build.
|
||||
The script also creates the Yocto Project
|
||||
build directory, which is <filename>edison-6.0-build</filename> in this case.
|
||||
build directory, which is <filename>&YOCTO_POKY;-build</filename> in this case.
|
||||
After the script runs, your current working directory is set
|
||||
to the build directory.
|
||||
Later, when the build completes, the build directory contains all the files
|
||||
@@ -430,9 +461,8 @@
|
||||
You can control this configuration by using the
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink></filename> variable.
|
||||
For additional package manager selection information, see
|
||||
"<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink>" in
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;'>
|
||||
The Yocto Project Reference Manual</ulink>.
|
||||
"<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink>"
|
||||
in The Yocto Project Reference Manual.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -441,15 +471,15 @@
|
||||
For information on the <filename>-k</filename> option use the
|
||||
<filename>bitbake --help</filename> command or see the
|
||||
"<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-components-bitbake'>BitBake</ulink>" section in
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;'>The Yocto Project Reference Manual</ulink>.
|
||||
The Yocto Project Reference Manual.
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake -k core-image-sato
|
||||
</literallayout>
|
||||
<note><para>
|
||||
BitBake requires Python 2.6 or 2.7. For more information on this requirement,
|
||||
see the FAQ appendix in
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;'>
|
||||
The Yocto Project Reference Manual</ulink>.
|
||||
see the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#faq'>FAQ</ulink> in The Yocto Project Reference
|
||||
Manual.
|
||||
</para></note>
|
||||
The final command runs the image:
|
||||
<literallayout class='monospaced'>
|
||||
@@ -550,9 +580,8 @@
|
||||
<para>
|
||||
For more information on how to install tarballs, see the
|
||||
"<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>" and
|
||||
"<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-toolchain-from-within-the-build-tree'>Using BitBake and the Yocto Project Build Tree</ulink>" sections in
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;'>The Yocto Project
|
||||
Application Development Toolkit (ADT) User's Guide</ulink>.
|
||||
"<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-toolchain-from-within-the-build-tree'>Using BitBake and the Yocto Project Build Tree</ulink>" sections in The Yocto Project Application Development Toolkit (ADT)
|
||||
User's Guide.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -583,8 +612,7 @@
|
||||
<para>
|
||||
You can learn more about downloading a Yocto Project kernel in the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Linux Yocto Kernel</ulink>" section of
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;'>The
|
||||
Yocto Project Development Manual</ulink>.
|
||||
The Yocto Project Development Manual.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -711,7 +739,7 @@
|
||||
<listitem><para><emphasis>Tarball:</emphasis>
|
||||
Use if you want the latest stable release:
|
||||
<literallayout class='monospaced'>
|
||||
$ wget &YOCTO_RELEASE_DL_URL;.&YOCTO_POKY_TARBALL;
|
||||
$ wget &YOCTO_RELEASE_DL_URL;/&YOCTO_POKY_TARBALL;
|
||||
$ tar xvjf &YOCTO_POKY_TARBALL;
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Git Repository:</emphasis>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB |
@@ -1,7 +0,0 @@
|
||||
#
|
||||
# OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in
|
||||
# an incompatible way. Such changes should usually be detailed in the commit
|
||||
# that breaks the format and have been previously discussed on the mailing list
|
||||
# with general agreement from the core team.
|
||||
#
|
||||
OELAYOUT_ABI = "8"
|
||||
@@ -63,12 +63,17 @@ ASSUME_PROVIDED += "pkgconfig$"
|
||||
# Reconfigure eglibc for a smaller installation
|
||||
# Comment out any of the lines below to disable them in the build
|
||||
DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
|
||||
# for gettext
|
||||
DISTRO_FEATURES_LIBC_TINY += "libc-posix-clang-wchar"
|
||||
# for m4
|
||||
DISTRO_FEATURES_LIBC_TINY += "libc-spawn libc-locale-code"
|
||||
# for elfutils
|
||||
DISTRO_FEATURES_LIBC_TINY += "libc-ftraverse"
|
||||
|
||||
# Building meta-toolchain currently imposes some additional requirements:
|
||||
# If you do not plan to build meta-toolchain, you can save ~461KB by
|
||||
# commenting out the DISTRO_FEATURES_LIBC_TOOLCHAIN assignment
|
||||
# gettext needs wchar, m4 needs spawn and locale, elfutils needs ftraverse
|
||||
DISTRO_FEATURES_LIBC_TOOLCHAIN = "libc-posix-clang-wchar \
|
||||
libc-spawn libc-locale-code \
|
||||
libc-ftraverse libc-libm-big \
|
||||
libc-posix-regexp-glibc \
|
||||
"
|
||||
|
||||
# Required for "who"
|
||||
DISTRO_FEATURES_LIBC_MINIMAL = "libc-utmp libc-getlogin"
|
||||
DISTRO_FEATURES_LIBC_REGEX = "libc-posix-regexp"
|
||||
@@ -78,6 +83,7 @@ DISTRO_FEATURES_LIBC = "${DISTRO_FEATURES_LIBC_TINY} \
|
||||
${DISTRO_FEATURES_LIBC_MINIMAL} \
|
||||
${DISTRO_FEATURES_LIBC_REGEX} \
|
||||
${DISTRO_FEATURES_LIBC_NET} \
|
||||
${DISTRO_FEATURES_LIBC_TOOLCHAIN} \
|
||||
"
|
||||
|
||||
# Comment out any of the lines below to disable them in the build
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Yocto (Built by Poky 6.0)"
|
||||
DISTRO_VERSION = "1.1+snapshot-${DATE}"
|
||||
DISTRO_NAME = "Yocto (Built by Poky 7.0)"
|
||||
DISTRO_VERSION = "1.2"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
|
||||
SDK_VERSION := "${DISTRO_VERSION}"
|
||||
|
||||
MAINTAINER = "Poky <poky@yoctoproject.org>"
|
||||
|
||||
@@ -65,5 +65,28 @@ CONNECTIVITY_CHECK_URIS ?= "git://git.yoctoproject.org/yocto-firewall-test;proto
|
||||
https://eula-downloads.yoctoproject.org/index.php \
|
||||
http://bugzilla.yoctoproject.org/report.cgi"
|
||||
|
||||
SANITY_TESTED_DISTROS ?= " \
|
||||
Yocto (Built by Poky 7.0) 1.2 \n \
|
||||
Ubuntu 10.04.4 LTS \n \
|
||||
Ubuntu 11.10 \n \
|
||||
Ubuntu 12.04 \n \
|
||||
Fedora release 15 (Lovelock) \n \
|
||||
Fedora release 16 (Verne) \n \
|
||||
Fedora release 17 (Beefy Miracle) \n \
|
||||
CentOS release 5.6 (Final) \n \
|
||||
CentOS release 5.7 (Final) \n \
|
||||
CentOS release 6.2 (Final) \n \
|
||||
Debian GNU/Linux 6.0.4 (squeeze) \n \
|
||||
openSUSE 11.4 \n \
|
||||
openSUSE 12.1 \n \
|
||||
"
|
||||
|
||||
# Default hash policy for distro
|
||||
BB_SIGNATURE_HANDLER ?= 'OEBasicHash'
|
||||
#
|
||||
# OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in
|
||||
# an incompatible way. Such changes should usually be detailed in the commit
|
||||
# that breaks the format and have been previously discussed on the mailing list
|
||||
# with general agreement from the core team.
|
||||
#
|
||||
OELAYOUT_ABI = "8"
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
include conf/machine/include/tune-atom.inc
|
||||
|
||||
MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost ext2 ext3 x86 wifi \
|
||||
acpi alsa"
|
||||
MACHINE_FEATURES = "screen keyboard pci usbhost ext2 ext3 x86 wifi acpi alsa"
|
||||
|
||||
KERNEL_IMAGETYPE = "bzImage"
|
||||
|
||||
|
||||
@@ -37,4 +37,4 @@ UBOOT_MACHINE = "omap3_beagle_config"
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
UBOOT_LOADADDRESS = "0x80008000"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat alsa"
|
||||
MACHINE_FEATURES = "apm usbgadget usbhost vfat alsa"
|
||||
|
||||
@@ -9,7 +9,7 @@ KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial"
|
||||
MACHINE_FEATURES = "keyboard pci ext2 ext3 serial"
|
||||
|
||||
PREFERRED_VERSION_linux-yocto ?= "3.0%"
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
|
||||
require conf/machine/include/tune-mips32.inc
|
||||
|
||||
MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost ext2 ext3 \
|
||||
serial"
|
||||
MACHINE_FEATURES = "screen keyboard pci usbhost ext2 ext3 serial"
|
||||
|
||||
KERNEL_IMAGETYPE = "vmlinux"
|
||||
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
|
||||
|
||||
@@ -4,10 +4,10 @@ KMACHINE_mpc8315e-rdb = "yocto/standard/fsl-mpc8315e-rdb"
|
||||
KMACHINE_beagleboard = "yocto/standard/beagleboard"
|
||||
|
||||
|
||||
SRCREV_machine_atom-pc ?= "12b4af6966843baf7bb3aedbae93e69ae19405b0"
|
||||
SRCREV_machine_routerstationpro ?= "12b4af6966843baf7bb3aedbae93e69ae19405b0"
|
||||
SRCREV_machine_mpc8315e-rdb ?= "12b4af6966843baf7bb3aedbae93e69ae19405b0"
|
||||
SRCREV_machine_beagleboard ?= "12b4af6966843baf7bb3aedbae93e69ae19405b0"
|
||||
SRCREV_machine_atom-pc ?= "afdda882f902dd28693cd8701a7d497958290f09"
|
||||
SRCREV_machine_routerstationpro ?= "982522e3901fad56bb908565b22c498025ab536c"
|
||||
SRCREV_machine_mpc8315e-rdb ?= "83f422f718cf15633cb4c2d309aa041c3c354f65"
|
||||
SRCREV_machine_beagleboard ?= "8fd5a8eb4067c7032389e82d54f0e54e1e27f78c"
|
||||
|
||||
COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
|
||||
COMPATIBLE_MACHINE_routerstationpro = "routerstationpro"
|
||||
|
||||
@@ -305,9 +305,32 @@ python () {
|
||||
pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
|
||||
if pkgconfigflags:
|
||||
pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
|
||||
pn = d.getVar("PN", True)
|
||||
mlprefix = d.getVar("MLPREFIX", True)
|
||||
|
||||
def expandFilter(appends, extension, prefix):
|
||||
appends = bb.utils.explode_deps(d.expand(" ".join(appends)))
|
||||
newappends = []
|
||||
for a in appends:
|
||||
if a.endswith("-native") or a.endswith("-cross"):
|
||||
newappends.append(a)
|
||||
elif a.startswith("virtual/"):
|
||||
subs = a.split("/", 1)[1]
|
||||
newappends.append("virtual/" + prefix + subs + extension)
|
||||
else:
|
||||
newappends.append(prefix + a + extension)
|
||||
return newappends
|
||||
|
||||
def appendVar(varname, appends):
|
||||
if not appends:
|
||||
return
|
||||
if varname.find("DEPENDS") != -1:
|
||||
if pn.endswith("-nativesdk"):
|
||||
appends = expandFilter(appends, "-nativesdk", "")
|
||||
if pn.endswith("-native"):
|
||||
appends = expandFilter(appends, "-native", "")
|
||||
if mlprefix:
|
||||
appends = expandFilter(appends, "", mlprefix)
|
||||
varname = d.expand(varname)
|
||||
d.appendVar(varname, " " + " ".join(appends))
|
||||
|
||||
@@ -324,11 +347,14 @@ python () {
|
||||
elif len(items) == 4:
|
||||
enable, disable, depend, rdepend = items
|
||||
if flag in pkgconfig:
|
||||
extradeps.append(depend)
|
||||
extrardeps.append(rdepend)
|
||||
extraconf.append(enable)
|
||||
else:
|
||||
extraconf.append(disable)
|
||||
if depend:
|
||||
extradeps.append(depend)
|
||||
if rdepend:
|
||||
extrardeps.append(rdepend)
|
||||
if enable:
|
||||
extraconf.append(enable)
|
||||
elif disable:
|
||||
extraconf.append(disable)
|
||||
appendVar('DEPENDS', extradeps)
|
||||
appendVar('RDEPENDS_${PN}', extrardeps)
|
||||
appendVar('EXTRA_OECONF', extraconf)
|
||||
|
||||
@@ -237,7 +237,7 @@ python do_checkpkg() {
|
||||
such as:
|
||||
gnome-common-2.20.0.tar.gz (most common format)
|
||||
gtk+-2.90.1.tar.gz
|
||||
xf86-intput-synaptics-12.6.9.tar.gz
|
||||
xf86-input-synaptics-12.6.9.tar.gz
|
||||
dri2proto-2.3.tar.gz
|
||||
blktool_4.orig.tar.gz
|
||||
libid3tag-0.15.1b.tar.gz
|
||||
|
||||
@@ -57,7 +57,7 @@ python populate_packages_append () {
|
||||
prerm += d.getVar('gconf_prerm', True)
|
||||
d.setVar('pkg_prerm_%s' % pkg, prerm)
|
||||
rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
|
||||
rdepends += " gconf"
|
||||
rdepends += ' ' + d.getVar('MLPREFIX') + 'gconf'
|
||||
d.setVar("RDEPENDS_%s" % pkg, rdepends)
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,9 @@ def find_sccs(d):
|
||||
sources_list=[]
|
||||
for s in sources:
|
||||
base, ext = os.path.splitext(os.path.basename(s))
|
||||
if ext and ext in ('.scc'):
|
||||
if ext and ext in ('.scc' '.cfg'):
|
||||
sources_list.append(s)
|
||||
elif base and base in 'defconfig':
|
||||
sources_list.append(s)
|
||||
|
||||
return sources_list
|
||||
@@ -73,72 +75,9 @@ do_patch() {
|
||||
fi
|
||||
|
||||
sccs="${@" ".join(find_sccs(d))}"
|
||||
patches_and_dirs="${@" ".join(find_urls(d))}"
|
||||
patches="${@" ".join(find_patches(d))}"
|
||||
|
||||
# This loops through all patches, and looks for directories that do
|
||||
# not already have feature descriptions. If a directory doesn't have
|
||||
# a feature description, we switch to the ${WORKDIR} variant of the
|
||||
# feature (so we can write to it) and generate a feature for those
|
||||
# patches. The generated feature will respect the patch order.
|
||||
#
|
||||
# By leaving source patch directories that already have .scc files
|
||||
# as-is it means that a SRC_URI can only contain a .scc file, and all
|
||||
# patches that the .scc references will be picked up, without having
|
||||
# to be repeated on the SRC_URI line .. which is more intutive
|
||||
set +e
|
||||
patch_dirs=
|
||||
for pp in ${patches_and_dirs}; do
|
||||
p=`echo $pp | cut -f1 -d:`
|
||||
wp=`echo $pp | cut -f2 -d:`
|
||||
pdir=`dirname ${p}`
|
||||
pname=`basename ${p}`
|
||||
scc=`find ${pdir} -maxdepth 1 -name '*.scc'`
|
||||
if [ -z "${scc}" ]; then
|
||||
# there is no scc file. We need to switch to someplace that we know
|
||||
# we can create content (the workdir)
|
||||
workdir_subdir=`dirname ${wp}`
|
||||
suggested_dir="${WORKDIR}/${workdir_subdir}"
|
||||
echo ${gen_feature_dirs} | grep -q ${suggested_dir}
|
||||
if [ $? -ne 0 ]; then
|
||||
gen_feature_dirs="${gen_feature_dirs} ${suggested_dir}"
|
||||
fi
|
||||
# we call the file *.scc_tmp, so the test above will continue to find
|
||||
# that patches from a common subdirectory don't have a scc file and
|
||||
# they'll be placed in order, into this file. We'll rename it later.
|
||||
gen_feature_name="gen_`echo ${workdir_subdir} | sed 's%/%%g'`_desc.scc_tmp"
|
||||
echo "patch ${pname}" >> ${WORKDIR}/${workdir_subdir}/${gen_feature_name}
|
||||
else
|
||||
suggested_dir="${pdir}"
|
||||
fi
|
||||
echo ${patch_dirs} | grep -q ${suggested_dir}
|
||||
if [ $? -ne 0 ]; then
|
||||
patch_dirs="${patch_dirs} ${suggested_dir}"
|
||||
fi
|
||||
done
|
||||
|
||||
# look for any found scc files, and ensure they are added to the list
|
||||
# of directories passsed to updateme
|
||||
for s in ${sccs}; do
|
||||
sdir=`dirname ${s}`
|
||||
echo ${patch_dirs} | grep -q ${sdir}
|
||||
if [ $? -ne 0 ]; then
|
||||
patch_dirs="${patch_dirs} ${sdir}"
|
||||
fi
|
||||
done
|
||||
|
||||
# go through the patch directories and look for any scc feature files
|
||||
# that were constructed above. If one is found, rename it to ".scc" so
|
||||
# the kernel patching can see it.
|
||||
for pdir in ${patch_dirs}; do
|
||||
scc=`find ${pdir} -maxdepth 1 -name '*.scc_tmp'`
|
||||
if [ -n "${scc}" ]; then
|
||||
new_scc=`echo ${scc} | sed 's/_tmp//'`
|
||||
mv -f ${scc} ${new_scc}
|
||||
fi
|
||||
done
|
||||
|
||||
patch_dirs="${patch_dirs} ${WORKDIR}"
|
||||
|
||||
# add any explicitly referenced features onto the end of the feature
|
||||
# list that is passed to the kernel build scripts.
|
||||
if [ -n "${KERNEL_FEATURES}" ]; then
|
||||
@@ -146,9 +85,10 @@ do_patch() {
|
||||
addon_features="$addon_features --feature $feat"
|
||||
done
|
||||
fi
|
||||
|
||||
# updates or generates the target description
|
||||
updateme --branch ${kbranch} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \
|
||||
${addon_features} ${ARCH} ${KMACHINE} ${patch_dirs}
|
||||
${addon_features} ${ARCH} ${KMACHINE} ${sccs} ${patches}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR. Could not update ${kbranch}"
|
||||
exit 1
|
||||
|
||||
@@ -257,7 +257,7 @@ python package_do_split_gconvs () {
|
||||
else:
|
||||
libc_name = name
|
||||
d.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('%s-binary-localedata-%s' \
|
||||
% (bpn, libc_name)))
|
||||
% (d.getVar('MLPREFIX') + bpn, libc_name)))
|
||||
|
||||
commands = {}
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ python multilib_virtclass_handler () {
|
||||
val=e.data.getVar(name, True)
|
||||
if val:
|
||||
e.data.setVar(name + "_MULTILIB_ORIGINAL", val)
|
||||
|
||||
# Expand this since this won't work correctly once we set a multilib into place
|
||||
e.data.setVar("ALL_MULTILIB_PACKAGE_ARCHS", e.data.getVar("ALL_MULTILIB_PACKAGE_ARCHS", True))
|
||||
|
||||
override = ":virtclass-multilib-" + variant
|
||||
|
||||
|
||||
@@ -158,6 +158,7 @@ rpm_common_comand () {
|
||||
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
|
||||
-D "_var ${localstatedir}" \
|
||||
-D "_dbpath ${rpmlibdir}" \
|
||||
-D "_tmppath /install/tmp" \
|
||||
--noparentdirs --nolinktos \
|
||||
-D "__dbi_txn create nofsync private" \
|
||||
-D "_cross_scriptlet_wrapper ${WORKDIR}/scriptlet_wrapper" $@
|
||||
@@ -486,8 +487,7 @@ EOF
|
||||
|
||||
${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
|
||||
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
|
||||
-D "_dbpath ${target_rootfs}/initial" -D "`cat ${confbase}-base_archs.macro`" \
|
||||
-D "`cat ${confbase}-ml_archs.macro`" \
|
||||
-D "_dbpath ${target_rootfs}/initial" -D "`cat ${confbase}.macro`" \
|
||||
-D "__dbi_txn create nofsync" \
|
||||
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
|
||||
${target_rootfs}/install/initial_install.manifest
|
||||
|
||||
@@ -20,14 +20,25 @@ python packageinfo_handler () {
|
||||
pkgrename = sdata['PKG_%s' % pkgname]
|
||||
pkgv = sdata['PKGV'].replace('-', '+')
|
||||
pkgr = sdata['PKGR']
|
||||
# We found there are some renaming issue with certain architecture.
|
||||
# For example, armv7a-vfp-neon, it will use armv7a in the rpm file. This is the workaround for it.
|
||||
arch_tmp = arch.split('-')[0]
|
||||
if os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgname + '-' + pkgv + '-' + pkgr + '.' + arch + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgname + '-' + pkgv + '-' + pkgr + '.' + arch_tmp + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgrename + '-' + pkgv + '-' + pkgr + '.' + arch + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgrename + '-' + pkgv + '-' + pkgr + '.' + arch_tmp + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgname + '_' + pkgv + '-' + pkgr + '_' + arch + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgrename + '_' + pkgv + '-' + pkgr + '_' + arch + '.' + packaging):
|
||||
pkgname + '_' + pkgv + '-' + pkgr + '_' + arch_tmp + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgrename + '_' + pkgv + '-' + pkgr + '_' + arch + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgrename + '_' + pkgv + '-' + pkgr + '_' + arch_tmp + '.' + packaging):
|
||||
pkginfolist.append(sdata)
|
||||
bb.event.fire(bb.event.PackageInfo(pkginfolist), e.data)
|
||||
}
|
||||
|
||||
@@ -120,10 +120,11 @@ def check_supported_distro(e):
|
||||
if os.path.exists("/etc/redhat-release"):
|
||||
f = open("/etc/redhat-release", "r")
|
||||
try:
|
||||
distro = f.readline()
|
||||
distro = f.readline().strip()
|
||||
finally:
|
||||
f.close()
|
||||
elif os.path.exists("/etc/SuSE-release"):
|
||||
import re
|
||||
f = open("/etc/SuSE-release", "r")
|
||||
try:
|
||||
distro = f.readline()
|
||||
@@ -378,7 +379,7 @@ def check_sanity(e):
|
||||
if last_sstate_dir != sstate_dir:
|
||||
messages = messages + check_sanity_sstate_dir_change(sstate_dir, e.data)
|
||||
|
||||
if os.path.exists("conf"):
|
||||
if os.path.exists("conf") and not messages:
|
||||
f = file(sanityverfile, 'w')
|
||||
f.write("SANITY_VERSION %s\n" % sanity_version)
|
||||
f.write("TMPDIR %s\n" % tmpdir)
|
||||
|
||||
@@ -69,15 +69,16 @@ done
|
||||
}
|
||||
|
||||
update_alternatives_batch_doinstall() {
|
||||
if [ "${PN}" = "${BPN}" ] ; then
|
||||
for link in ${ALTERNATIVE_LINKS}
|
||||
do
|
||||
mv ${D}${link} ${D}${link}.${PN}
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
def update_alternatives_after_parse(d):
|
||||
if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d):
|
||||
return
|
||||
|
||||
if d.getVar('ALTERNATIVE_LINKS') != None:
|
||||
doinstall = d.getVar('do_install', 0)
|
||||
doinstall += d.getVar('update_alternatives_batch_doinstall', 0)
|
||||
|
||||
@@ -201,7 +201,8 @@ fakeroot python populate_packages_prepend () {
|
||||
|
||||
# RDEPENDS setup
|
||||
rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
|
||||
rdepends += " base-passwd shadow"
|
||||
rdepends += ' ' + d.getVar('MLPREFIX') + 'base-passwd'
|
||||
rdepends += ' ' + d.getVar('MLPREFIX') + 'shadow'
|
||||
d.setVar("RDEPENDS_%s" % pkg, rdepends)
|
||||
|
||||
# Add the user/group preinstall scripts and RDEPENDS requirements
|
||||
|
||||
@@ -648,6 +648,7 @@ CPU_FEATURES_arm ?= "vfp"
|
||||
# Include the rest of the config files.
|
||||
##################################################################
|
||||
|
||||
require conf/abi_version.conf
|
||||
include conf/site.conf
|
||||
include conf/auto.conf
|
||||
include conf/local.conf
|
||||
@@ -659,7 +660,6 @@ include conf/distro/${DISTRO}.conf
|
||||
include conf/distro/defaultsetup.conf
|
||||
include conf/documentation.conf
|
||||
require conf/sanity.conf
|
||||
require conf/abi_version.conf
|
||||
|
||||
##################################################################
|
||||
# Weak variables (usually to retain backwards compatibility)
|
||||
@@ -737,7 +737,7 @@ BB_CONSOLELOG ?= "${TMPDIR}/cooker.log.${DATETIME}"
|
||||
|
||||
# Setup our default hash policy
|
||||
BB_SIGNATURE_HANDLER ?= "OEBasic"
|
||||
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN"
|
||||
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE"
|
||||
BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK XAUTHORITY"
|
||||
|
||||
MLPREFIX ??= ""
|
||||
|
||||
@@ -10,12 +10,14 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
|
||||
ENABLE_BINARY_LOCALE_GENERATION ?= "1"
|
||||
LOCALE_UTF8_ONLY ?= "0"
|
||||
|
||||
DISTRO_FEATURES_LIBC ?= "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
|
||||
DISTRO_FEATURES_LIBC_DEFAULT ?= "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
|
||||
libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
|
||||
libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
|
||||
libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
|
||||
libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
|
||||
libc-posix-wchar-io"
|
||||
DISTRO_FEATURES_LIBC ?= "${DISTRO_FEATURES_LIBC_DEFAULT}"
|
||||
DISTRO_FEATURES_LIBC_virtclass-nativesdk = "${DISTRO_FEATURES_LIBC_DEFAULT}"
|
||||
DISTRO_FEATURES ?= "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g x11 ${DISTRO_FEATURES_LIBC}"
|
||||
|
||||
IMAGE_FEATURES ?= ""
|
||||
|
||||
@@ -248,6 +248,14 @@ RECIPE_MANUAL_CHECK_DATE_pn-gpgme = "Jul 28, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-gpgme = "Jul 28, 2011"
|
||||
RECIPE_MAINTAINER_pn-gpgme = "Zhai Edwin <edwin.zhai@intel.com>"
|
||||
|
||||
RECIPE_STATUS_pn-ocf-linux = "green"
|
||||
RECIPE_LATEST_VERSION_pn-ocf-linux = "20120127"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-ocf-linux = "6 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-ocf-linux = "Jan 27, 2012"
|
||||
RECIPE_LAST_UPDATE_pn-ocf-linux = "Nov 30, 2011"
|
||||
RECIPE_MAINTAINER_pn-ocf-linux = "Saul Wold <sgw@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-ocf-linux = ""
|
||||
|
||||
RECIPE_STATUS_pn-expat = "green"
|
||||
RECIPE_DEPENDENCY_CHECK_pn-expat = "not done"
|
||||
RECIPE_LATEST_VERSION_pn-expat = "2.0.1"
|
||||
@@ -1124,6 +1132,9 @@ RECIPE_LAST_UPDATE_pn-shadow = "Jun 4, 2011"
|
||||
RECIPE_MAINTAINER_pn-shadow = "Scott Garman <scott.a.garman@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-shadow-sysroot = "Ubuntu=shadow Fedora=shadow"
|
||||
|
||||
RECIPE_MAINTAINER_pn-shadow-securetty = "Scott Garman <scott.a.garman@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-shadow-securetty = "Ubuntu=shadow Fedora=shadow"
|
||||
|
||||
RECIPE_STATUS_pn-coreutils = "green"
|
||||
RECIPE_LAST_UPDATE_pn-coreutils = "Jul 2, 2011"
|
||||
RECIPE_MAINTAINER_pn-coreutils = "Shane Wang <shane.wang@intel.com>"
|
||||
@@ -1460,6 +1471,7 @@ RECIPE_PATCH_pn-portmap+no-tcpd-support = "override default build method"
|
||||
RECIPE_INTEL_SECTION_pn-portmap = "base utils"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-portmap = "n/a"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-portmap = "May 01, 2007"
|
||||
DISTRO_PN_ALIAS_pn-portmap = "OpenSuSE=portmap"
|
||||
RECIPE_COMMENTS_pn-portmap = "most part is under 4-clause BSD, Sun RPC code is under another license, however debian portmap package licenses RPC code under 3-clause BSD. This needs further investigation"
|
||||
|
||||
RECIPE_STATUS_pn-grub = "green"
|
||||
@@ -1726,6 +1738,7 @@ RECIPE_DEPENDENCY_CHECK_pn-avahi-ui = "not done"
|
||||
RECIPE_INTEL_SECTION_pn-avahi-ui = "base utils"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-avahi-ui = "3 month"
|
||||
RECIPE_COMMENTS_pn-avahi-ui = ""
|
||||
DISTRO_PN_ALIAS_pn-avahi-ui = "Ubuntu=avahi-discover Debian=avahi-discover"
|
||||
|
||||
RECIPE_STATUS_pn-js = "yellow"
|
||||
# may not work for platforms other than 32bit x86
|
||||
@@ -2006,6 +2019,14 @@ RECIPE_LATEST_VERSION_pn-u-boot-mkimage = "2010.03"
|
||||
RECIPE_LAST_UPDATE_pn-u-boot-mkimage = "Dec 15, 2009"
|
||||
RECIPE_MAINTAINER_pn-u-boot-mkimage = "Saul Wold <sgw@linux.intel.com>"
|
||||
|
||||
RECIPE_STATUS_pn-u-boot-fw-utils = "green"
|
||||
RECIPE_LATEST_VERSION_pn-u-boot-fw-utils = "2011.12"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-u-boot-fw-utils = "3 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-u-boot-fw-utils = "Dec 23, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-u-boot-fw-utils = "Feb 10, 2012"
|
||||
RECIPE_MAINTAINER_pn-u-boot-fw-utils = "Saul Wold <sgw@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-u-boot-fw-utils = "Ubuntu=u-boot-tools Debian=u-boot-tools"
|
||||
|
||||
RECIPE_STATUS_pn-zaurusd = "green"
|
||||
RECIPE_LATEST_VERSION_pn-zaurusd = "0.0+svnr426"
|
||||
DISTRO_PN_ALIAS_pn-zaurusd = "OpenedHand"
|
||||
@@ -2057,6 +2078,7 @@ RECIPE_LATEST_VERSION_pn-stat = "3.3"
|
||||
RECIPE_LAST_UPDATE_pn-stat = "Dec 30, 2011"
|
||||
RECIPE_MANUAL_CHECK_DATE_pn-stat = "Dec 30, 2011"
|
||||
RECIPE_MAINTAINER_pn-stat = "Shane Wang <shane.wang@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-stat = "Debian=coreutils Fedora=coreutils"
|
||||
|
||||
RECIPE_STATUS_pn-hdparm = "red"
|
||||
RECIPE_LATEST_VERSION_pn-hdparm = "9.39"
|
||||
@@ -2791,6 +2813,9 @@ RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-alsa-lib="12 months"
|
||||
RECIPE_LAST_UPDATE_pn-alsa-lib = "Mar 14, 2012"
|
||||
RECIPE_MAINTAINER_pn-alsa-lib = "Dongxiao Xu <dongxiao.xu@intel.com>"
|
||||
|
||||
RECIPE_MAINTAINER_pn-alsa-state = "Dongxiao Xu <dongxiao.xu@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-alsa-state = "OE-Core"
|
||||
|
||||
RECIPE_STATUS_pn-tremor="green"
|
||||
RECIPE_LATEST_VERSION_pn-tremor="20120122"
|
||||
RECIPE_NO_OF_PATCHES_pn-tremor="0"
|
||||
@@ -3043,6 +3068,17 @@ RECIPE_COMMENTS_pn-lttng-viewer = ""
|
||||
RECIPE_LAST_UPDATE_pn-lttng-viewer = "Apr 20, 2011"
|
||||
RECIPE_MAINTAINER_pn-lttng-viewer = "Dexuan Cui <dexuan.cui@intel.com>"
|
||||
|
||||
RECIPE_STATUS_pn-lttng-tools = "green"
|
||||
RECIPE_LATEST_VERSION_pn-lttng-tools = "unknown"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-lttng-tools = "unknown"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-lttng-tools = "unknown"
|
||||
RECIPE_LAST_UPDATE_pn-lttng-tools = "Jan 17, 2012"
|
||||
RECIPE_MAINTAINER_pn-lttng-tools = "Dexuan Cui <dexuan.cui@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-lttng-tools = ""
|
||||
|
||||
RECIPE_MAINTAINER_pn-systemtap-uprobes = "Tom Zanussi <tom.zanussi@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-systemtap-uprobes = "Ubuntu=systemtap Debian=systemtap"
|
||||
|
||||
RECIPE_STATUS_pn-blktrace = "red"
|
||||
RECIPE_LATEST_VERSION_pn-blktrace = "1.0.1"
|
||||
RECIPE_NO_OF_PATCHES_pn-blktrace = "1"
|
||||
@@ -3687,6 +3723,25 @@ RECIPE_LAST_UPDATE_pn-qt4-x11-free = "Dec 15, 2011"
|
||||
RECIPE_MAINTAINER_pn-qt4-x11-free = "Paul Eggleton <paul.eggleton@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-qt4-x11-free = "Ubuntu=qt-x11-free Debian=qt-x11-free"
|
||||
|
||||
RECIPE_MAINTAINER_pn-qt4-graphics-system = "Paul Eggleton <paul.eggleton@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-qt4-graphics-system = "OE-Core"
|
||||
|
||||
RECIPE_STATUS_pn-qt-mobility-embedded = "green"
|
||||
RECIPE_LATEST_VERSION_pn-qt-mobility-embedded = "1.2.0"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-qt-mobility-embedded = "1 week"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-qt-mobility-embedded = "May 10, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-qt-mobility-embedded = "Apr 04, 2012"
|
||||
RECIPE_MAINTAINER_pn-qt-mobility-embedded = "Paul Eggleton <paul.eggleton@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-qt-mobility-embedded = "Ubuntu=qtmobility-dev Debian=qtmobility-dev"
|
||||
|
||||
RECIPE_STATUS_pn-qt-mobility-x11 = "green"
|
||||
RECIPE_LATEST_VERSION_pn-qt-mobility-x11 = "1.2.0"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-qt-mobility-x11 = "1 week"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-qt-mobility-x11 = "May 10, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-qt-mobility-x11 = "Apr 04, 2012"
|
||||
RECIPE_MAINTAINER_pn-qt-mobility-x11 = "Paul Eggleton <paul.eggleton@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-qt-mobility-x11 = "Ubuntu=qtmobility-dev Debian=qtmobility-dev"
|
||||
|
||||
RECIPE_STATUS_pn-quicky = "green"
|
||||
# no update needed
|
||||
RECIPE_LATEST_VERSION_pn-quicky = "0.4"
|
||||
@@ -3816,7 +3871,7 @@ RECIPE_STATUS_pn-xf86-input-evdev="green"
|
||||
DISTRO_PN_ALIAS_pn-xf86-input-evdev = "Ubuntu=xserver-xorg-input-evdev Mandriva=x11-driver-input-evdev Debian=xserver-xorg-input-evdev Fedora=xorg-x11-drv-evdev Meego=xorg-x11-drv-evdev"
|
||||
RECIPE_LATEST_VERSION_pn-xf86-input-evdev="2.6.0"
|
||||
RECIPE_NO_OF_PATCHES_pn-xf86-input-evdev="0"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-input-evdev="1 monthes"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-input-evdev="1 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-xf86-input-evdev="Aug 23, 2010"
|
||||
RECIPE_INTEL_SECTION_pn-xf86-input-evdev="graphic core"
|
||||
RECIPE_LAST_UPDATE_pn-xf86-input-evdev = "Jan 18, 2011"
|
||||
@@ -3827,7 +3882,7 @@ RECIPE_STATUS_pn-xf86-video-vmware="green"
|
||||
DISTRO_PN_ALIAS_pn-xf86-video-vmware = "Debian=xserver-xorg-video-vmware Fedora=xorg-x11-drv-vmware Mandriva=x11-driver-video-vmware Ubuntu=xserver-xorg-video-vmware"
|
||||
RECIPE_LATEST_VERSION_pn-xf86-video-vmware="11.0.3"
|
||||
RECIPE_NO_OF_PATCHES_pn-xf86-video-vmware="0"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-video-vmware="2 monthes"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-video-vmware="2 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-xf86-video-vmware="Nov 09, 2010"
|
||||
RECIPE_INTEL_SECTION_pn-xf86-video-vmware="graphic core"
|
||||
RECIPE_LAST_UPDATE_pn-xf86-video-vmware = "Nov 12, 2010"
|
||||
@@ -3837,13 +3892,21 @@ RECIPE_STATUS_pn-xf86-video-vesa = "green"
|
||||
# no update needed
|
||||
RECIPE_LATEST_VERSION_pn-xf86-video-vesa = "2.3.0"
|
||||
RECIPE_NO_OF_PATCHES_pn-xf86-video-vesa = "0"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-video-vesa = "6 monthes"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-video-vesa = "6 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-xf86-video-vesa = "Jan 04, 2010"
|
||||
RECIPE_INTEL_SECTION_pn-xf86-video-vesa = "graphic core"
|
||||
RECIPE_LAST_UPDATE_pn-xf86-video-vesa = "May 17, 2010"
|
||||
RECIPE_MAINTAINER_pn-xf86-video-vesa = "Saul Wold <sgw@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-xf86-video-vesa = "Debian=xserver-xorg-video-vesa Fedora=xorg-x11-drv-vesa Mandriva=x11-driver-video-vesa Ubuntu=xserver-xorg-video-vesa"
|
||||
|
||||
RECIPE_STATUS_pn-xf86-video-fbdev = "green"
|
||||
RECIPE_LATEST_VERSION_pn-xf86-video-fbdev = "0.4.2"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-video-fbdev = "unknown"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-xf86-video-fbdev = "unknown"
|
||||
RECIPE_LAST_UPDATE_pn-xf86-video-fbdev = "Jan 06, 2012"
|
||||
RECIPE_MAINTAINER_pn-xf86-video-fbdev = "Saul Wold <sgw@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-xf86-video-fbdev = "Ubuntu=xserver-xorg-video-fbdev Debian=xserver-xorg-video-fbdev"
|
||||
|
||||
RECIPE_STATUS_pn-cairo="green"
|
||||
# no update needed
|
||||
RECIPE_LATEST_VERSION_pn-cairo="1.9.10"
|
||||
@@ -4632,6 +4695,7 @@ RECIPE_LATEST_RELEASE_DATE_pn-libxxf86misc = "Nov 21, 2010"
|
||||
RECIPE_COMMENTS_pn-libxxf86misc = ""
|
||||
RECIPE_LAST_UPDATE_pn-libxxf86misc = "Jan 5, 2011"
|
||||
RECIPE_MAINTAINER_pn-libxxf86misc = "Dexuan Cui <dexuan.cui@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-libxxf86misc = "Mandriva=libxxf86misc Fedora=libXxf86misc"
|
||||
|
||||
RECIPE_STATUS_pn-libxxf86vm = "green"
|
||||
RECIPE_DEPENDENCY_CHECK_pn-libxxf86vm = "not done"
|
||||
@@ -4855,6 +4919,7 @@ RECIPE_LATEST_VERSION_pn-directfb = "1.5.3"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-direcfb = "Aug 9, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-directfb = "Nov 7, 2011"
|
||||
RECIPE_MAINTAINER_pn-directfb = "Xiaofeng Yan <xiaofeng.yan@windriver.com>"
|
||||
DISTRO_PN_ALIAS_pn-directfb-examples = "Debian=directfb Fedora=directfb"
|
||||
|
||||
RECIPE_STATUS_pn-libarchive = "green"
|
||||
RECIPE_LATEST_VERSION_pn-libarchive = "2.8.5"
|
||||
@@ -5421,6 +5486,14 @@ RECIPE_LAST_UPDATE_pn-webkit-gtk = "Jul 11, 2011"
|
||||
RECIPE_MAINTAINER_pn-webkit-gtk = "Zhai Edwin <edwin.zhai@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-webkit-gtk = "Fedora=webkitgtk Ubuntu=libwebkit"
|
||||
|
||||
RECIPE_STATUS_pn-libjson = "green"
|
||||
RECIPE_LATEST_VERSION_pn-libjson = "0.9"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-libjson = "7 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-libjson = "Jul 31, 2009"
|
||||
RECIPE_LAST_UPDATE_pn-libjson = "Nov 29, 2011"
|
||||
RECIPE_MAINTAINER_pn-libjson = "Nitin A Kamble <nitin.a.kamble@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-libjson = "Ubuntu=libjson0-dev Debian=libjson0-dev"
|
||||
|
||||
RECIPE_STATUS_pn-eds-dbus = "green"
|
||||
DISTRO_PN_ALIAS_pn-eds-dbus = "Debian=evolution-data-server Fedora=evolution-data-server Mandriva=evolution-data-server OpenSuSE=evolution-data-server Ubuntu=evolution-data-server"
|
||||
RECIPE_DEPENDENCY_CHECK_pn-eds-dbus = "not done"
|
||||
@@ -5492,6 +5565,7 @@ RECIPE_LATEST_RELEASE_DATE_pn-libfakekey = "Jul 01, 2006"
|
||||
RECIPE_COMMENTS_pn-libfakekey = ""
|
||||
RECIPE_LAST_UPDATE_pn-libfakekey = "Apr 15, 2008"
|
||||
RECIPE_MAINTAINER_pn-libfakekey = "Zhai Edwin <edwin.zhai@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-libfakekey="Meego1.0=libfakekey Debian=libfakekey"
|
||||
|
||||
RECIPE_STATUS_pn-libglade = "green"
|
||||
DISTRO_PN_ALIAS_pn-libglade = "Meego=libglade2 Fedora=libglade2 OpenSuSE=libglade2 Ubuntu=libglade2 Mandriva=libglade2.0 Debian=libglade2"
|
||||
@@ -5793,6 +5867,7 @@ RECIPE_LAST_UPDATE_pn-mutter = "Jan 13, 2010"
|
||||
RECIPE_MAINTAINER_pn-mutter = "Zhai Edwin <edwin.zhai@intel.com>"
|
||||
|
||||
DISTRO_PN_ALIAS_pn-poky-feed-config-opkg = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-builder = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-core-image-base = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-core-image-basic = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-core-image-core = "OE-Core"
|
||||
@@ -5817,6 +5892,7 @@ DISTRO_PN_ALIAS_pn-task-core = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-apps-x11-pimlico = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-basic = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-boot = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-gtk-directfb = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-lsb = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-nfs = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-qt = "OE-Core"
|
||||
@@ -5827,9 +5903,14 @@ DISTRO_PN_ALIAS_pn-task-core-ssh-openssh = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-standalone-gmae-sdk-target = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-standalone-sdk-target = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-tools = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-tools-debug = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-tools-profile = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-tools-testapps = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-x11-sato = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-x11-mini = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-qt4e = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-qte-toolchain-host-natives = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-self-hosted = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-initramfs-boot = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-initramfs-live-boot = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-initramfs-live-install = "OE-Core"
|
||||
@@ -5865,6 +5946,7 @@ DISTRO_PN_ALIAS_pn-matchbox-wm = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-oh-puzzles = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-owl-video = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-sato-icon-theme = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-sato-screenshot = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-screenshot = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-web-webkit = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-xcursor-transparent-theme = "OpenedHand"
|
||||
@@ -6049,17 +6131,19 @@ RECIPE_COMMENTS_pn-man-pages = "Kernel.org is down"
|
||||
RECIPE_LATEST_VERSION_pn-sysprof = "6b5b8432711ef5c747f8375073cd9af88922d3c6"
|
||||
RECIPE_LATEST_VERSION_pn-table = "d42a44938699ee30a998fc42bc149aebf69389db"
|
||||
|
||||
RECIPE_LATEST_VERSION_pn-gst-plugin-bluetooh = "4.96"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-gst-plugin-bluetooh = "Jul 31, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-gst-plugin-bluetooh = "Aug 12, 2010"
|
||||
RECIPE_MANUAL_CHECK_DATE_pn-gst-plugin-bluetooh = "Dec 15, 2011"
|
||||
RECIPE_LATEST_VERSION_pn-gst-plugin-bluetooth = "4.96"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-gst-plugin-bluetooth = "Jul 31, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-gst-plugin-bluetooth = "Aug 12, 2010"
|
||||
RECIPE_MANUAL_CHECK_DATE_pn-gst-plugin-bluetooth = "Dec 15, 2011"
|
||||
RECIPE_COMMENTS_pn-gst-plugin-bluetooth = "Kernel.org is down"
|
||||
DISTRO_PN_ALIAS_pn-gst-plugin-bluetooth = "Ubuntu=libgstreamer-plugins-base Fedora=gstreamer-plugins-base"
|
||||
|
||||
RECIPE_STATUS_pn-qmmp = "green"
|
||||
RECIPE_LATEST_VERSION_pn-qmmp = "0.5.2"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-qmmp = "Sep 02, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-qmmp = "Nov 7, 2011"
|
||||
RECIPE_MAINTAINER_pn-qmmp = "Xiaofeng Yan <xiaofeng.yan@windriver.com>"
|
||||
DISTRO_PN_ALIAS_pn-qmmp = "Fedora=qmmp"
|
||||
|
||||
RECIPE_LATEST_VERSION_pn-texinfo = "4.13a"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-texinfo = "Sep 22, 2008"
|
||||
@@ -6359,6 +6443,10 @@ RECIPE_NO_OF_PATCHES_pn-ltp = "0"
|
||||
RECIPE_LAST_UPDATE_pn-ltp = "Dec 22, 2011"
|
||||
RECIPE_MANUAL_CHECK_DATE_pn-ltp = "Mar 13, 2012"
|
||||
RECIPE_MAINTAINER_pn-ltp = "Jiajun Xu <jiajun.xu@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-ltp = "Ubuntu=ltp"
|
||||
|
||||
DISTRO_PN_ALIAS_pn-rgb = "Fedora=xorg-X11-server-utils Debian=x11-xserver-utils"
|
||||
DISTRO_PN_ALIAS_pn-libksba = "Fedora=libksba Debian=libksba8"
|
||||
|
||||
DISTRO_PN_ALIAS_pn-qt4-native = "Fedora=qt4 Debian=qt4-dev-tools"
|
||||
DISTRO_PN_ALIAS_pn-update-alternatives-dpkg = "Opensuse=update-alternatives Mandriva=update-alternatives"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
Upstream-Status: Pending
|
||||
|
||||
|
||||
This patch avoids this configure failure
|
||||
|
||||
configure:20306: checking whether `ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow' generates calls to `__enable_execute_stack()'
|
||||
configure:20320: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387 -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -Wno-trampolines -falign-loops=1 -S conftest.c
|
||||
conftest.c:308:6: error: no previous prototype for 'g' [-Werror=missing-prototypes]
|
||||
cc1: all warnings being treated as errors
|
||||
configure:20323: $? = 1
|
||||
configure:20327: error: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow failed to produce assembly code
|
||||
|
||||
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
|
||||
2012/04/13
|
||||
|
||||
Index: grub-1.99/acinclude.m4
|
||||
===================================================================
|
||||
--- grub-1.99.orig/acinclude.m4
|
||||
+++ grub-1.99/acinclude.m4
|
||||
@@ -317,6 +317,7 @@ dnl Check if the C compiler generates ca
|
||||
AC_DEFUN([grub_CHECK_ENABLE_EXECUTE_STACK],[
|
||||
AC_MSG_CHECKING([whether `$CC' generates calls to `__enable_execute_stack()'])
|
||||
AC_LANG_CONFTEST([[
|
||||
+void g (int);
|
||||
void f (int (*p) (void));
|
||||
void g (int i)
|
||||
{
|
||||
@@ -0,0 +1,37 @@
|
||||
Upstream-Status: pending
|
||||
|
||||
This patch fixes this configure issue for grub when -mfpmath=sse is in the gcc parameters.
|
||||
|
||||
configure:20574: i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/usr/local/dev/yocto/grubtest2/build/tmp/sysroots/emenlow -o conftest -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -nostdlib -Wl,--defsym,___main=0x8100 -Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c >&5
|
||||
conftest.c:1:0: error: SSE instruction set disabled, using 387 arithmetics [-Werror]
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
|
||||
2012/04/13
|
||||
|
||||
Index: grub-1.99/configure.ac
|
||||
===================================================================
|
||||
--- grub-1.99.orig/configure.ac
|
||||
+++ grub-1.99/configure.ac
|
||||
@@ -378,7 +378,7 @@ if test "x$target_cpu" = xi386; then
|
||||
|
||||
# Some toolchains enable these features by default, but they need
|
||||
# registers that aren't set up properly in GRUB.
|
||||
- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
|
||||
+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387"
|
||||
fi
|
||||
|
||||
# By default, GCC 4.4 generates .eh_frame sections containing unwind
|
||||
Index: grub-1.99/configure
|
||||
===================================================================
|
||||
--- grub-1.99.orig/configure
|
||||
+++ grub-1.99/configure
|
||||
@@ -19991,7 +19991,7 @@ $as_echo "$grub_cv_cc_falign_loop" >&6;
|
||||
|
||||
# Some toolchains enable these features by default, but they need
|
||||
# registers that aren't set up properly in GRUB.
|
||||
- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
|
||||
+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387"
|
||||
fi
|
||||
|
||||
# By default, GCC 4.4 generates .eh_frame sections containing unwind
|
||||
@@ -0,0 +1,147 @@
|
||||
Upstream-Status: Pending
|
||||
|
||||
This patch fixes these strick-aliasing errors with gcc 4.7
|
||||
|
||||
|
||||
| gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=I386_EFI -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include -DGRUB_FILE=\"fs/zfs/zfs.c\" -I. -I. -I.. -I.. -I../include -I../include -isystem/home/nitin/builds/build0/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -Wno-trampolines -ffreestanding -isystem/home/nitin/builds/build0/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -c -o fs/zfs/zfs_module-zfs.o `test -f 'fs/zfs/zfs.c' || echo './'`fs/zfs/zfs.c
|
||||
| fs/zfs/zfs.c: In function 'get_filesystem_dnode':
|
||||
| fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c: In function 'make_mdn':
|
||||
| fs/zfs/zfs.c:1478:3: error: dereferencing type-punned pointer will break strict-alERROR: Function failed: do_compile (see /home/nitin/builds/build0/tmp/work/x86_64-linux/grub-efi-i586-native-1.99-r7/temp/log.do_compile.9293 for further information)
|
||||
| iasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c: In function 'dnode_get_fullpath':
|
||||
| fs/zfs/zfs.c:1554:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:1554:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:1571:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:1571:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c: In function 'grub_zfs_open':
|
||||
| fs/zfs/zfs.c:2234:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2234:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c: In function 'fill_fs_info':
|
||||
| fs/zfs/zfs.c:2362:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2362:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2395:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2395:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c: In function 'iterate_zap':
|
||||
| fs/zfs/zfs.c:2420:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2420:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c: In function 'grub_zfs_dir':
|
||||
| fs/zfs/zfs.c:2483:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2483:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2484:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2484:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2502:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2502:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| cc1: all warnings being treated as errors
|
||||
| make[3]: *** [fs/zfs/zfs_module-zfs.o] Error 1
|
||||
|
||||
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
|
||||
2012/04/13
|
||||
|
||||
Index: grub-1.99/grub-core/fs/zfs/zfs.c
|
||||
===================================================================
|
||||
--- grub-1.99.orig/grub-core/fs/zfs/zfs.c
|
||||
+++ grub-1.99/grub-core/fs/zfs/zfs.c
|
||||
@@ -1446,7 +1446,8 @@ get_filesystem_dnode (dnode_end_t * mosm
|
||||
ch = *fsname;
|
||||
*fsname = 0;
|
||||
|
||||
- childobj = grub_zfs_to_cpu64 ((((dsl_dir_phys_t *) DN_BONUS (&mdn->dn)))->dd_child_dir_zapobj, mdn->endian);
|
||||
+ dsl_dir_phys_t * tmp = DN_BONUS (&mdn->dn);
|
||||
+ childobj = grub_zfs_to_cpu64 (tmp->dd_child_dir_zapobj, mdn->endian);
|
||||
err = dnode_get (mosmdn, childobj,
|
||||
DMU_OT_DSL_DIR_CHILD_MAP, mdn, data);
|
||||
if (err)
|
||||
@@ -1475,7 +1476,8 @@ make_mdn (dnode_end_t * mdn, struct grub
|
||||
|
||||
grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
|
||||
|
||||
- bp = &(((dsl_dataset_phys_t *) DN_BONUS (&mdn->dn))->ds_bp);
|
||||
+ dsl_dataset_phys_t * tmp = DN_BONUS(&mdn->dn);
|
||||
+ bp = &(tmp->ds_bp);
|
||||
err = zio_read (bp, mdn->endian, &osp, &ospsize, data);
|
||||
if (err)
|
||||
return err;
|
||||
@@ -1551,7 +1553,8 @@ dnode_get_fullpath (const char *fullpath
|
||||
|
||||
grub_dprintf ("zfs", "alive\n");
|
||||
|
||||
- headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&dn->dn))->dd_head_dataset_obj, dn->endian);
|
||||
+ dsl_dir_phys_t * tmp1 = DN_BONUS (&dn->dn);
|
||||
+ headobj = grub_zfs_to_cpu64 (tmp1->dd_head_dataset_obj, dn->endian);
|
||||
|
||||
grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
|
||||
|
||||
@@ -1568,7 +1571,8 @@ dnode_get_fullpath (const char *fullpath
|
||||
{
|
||||
grub_uint64_t snapobj;
|
||||
|
||||
- snapobj = grub_zfs_to_cpu64 (((dsl_dataset_phys_t *) DN_BONUS (&mdn->dn))->ds_snapnames_zapobj, mdn->endian);
|
||||
+ dsl_dataset_phys_t * tmp2 = DN_BONUS (&mdn->dn);
|
||||
+ snapobj = grub_zfs_to_cpu64 (tmp2->ds_snapnames_zapobj, mdn->endian);
|
||||
|
||||
err = dnode_get (&(data->mos), snapobj,
|
||||
DMU_OT_DSL_DS_SNAP_MAP, mdn, data);
|
||||
@@ -2231,7 +2235,8 @@ grub_zfs_open (struct grub_file *file, c
|
||||
}
|
||||
else
|
||||
{
|
||||
- file->size = grub_zfs_to_cpu64 (((znode_phys_t *) DN_BONUS (&data->dnode.dn))->zp_size, data->dnode.endian);
|
||||
+ znode_phys_t * tmp = DN_BONUS (&data->dnode.dn);
|
||||
+ file->size = grub_zfs_to_cpu64 (tmp->zp_size, data->dnode.endian);
|
||||
}
|
||||
|
||||
file->data = data;
|
||||
@@ -2359,7 +2364,8 @@ fill_fs_info (struct grub_dirhook_info *
|
||||
|
||||
if (mdn.dn.dn_type == DMU_OT_DSL_DIR)
|
||||
{
|
||||
- headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&mdn.dn))->dd_head_dataset_obj, mdn.endian);
|
||||
+ dsl_dir_phys_t * tmp1 = DN_BONUS (&mdn.dn);
|
||||
+ headobj = grub_zfs_to_cpu64 (tmp1->dd_head_dataset_obj, mdn.endian);
|
||||
|
||||
err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, &mdn, data);
|
||||
if (err)
|
||||
@@ -2392,7 +2398,8 @@ fill_fs_info (struct grub_dirhook_info *
|
||||
}
|
||||
|
||||
info->mtimeset = 1;
|
||||
- info->mtime = grub_zfs_to_cpu64 (((znode_phys_t *) DN_BONUS (&dn.dn))->zp_mtime[0], dn.endian);
|
||||
+ znode_phys_t * tmp2 = DN_BONUS (&dn.dn);
|
||||
+ info->mtime = grub_zfs_to_cpu64 (tmp2->zp_mtime[0], dn.endian);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2417,7 +2424,8 @@ grub_zfs_dir (grub_device_t device, cons
|
||||
|
||||
dnode_get (&(data->mdn), val, 0, &dn, data);
|
||||
info.mtimeset = 1;
|
||||
- info.mtime = grub_zfs_to_cpu64 (((znode_phys_t *) DN_BONUS (&dn.dn))->zp_mtime[0], dn.endian);
|
||||
+ znode_phys_t * tmp1 = DN_BONUS (&dn.dn);
|
||||
+ info.mtime = grub_zfs_to_cpu64 (tmp1->zp_mtime[0], dn.endian);
|
||||
info.dir = (dn.dn.dn_type == DMU_OT_DIRECTORY_CONTENTS);
|
||||
grub_dprintf ("zfs", "type=%d, name=%s\n",
|
||||
(int)dn.dn.dn_type, (char *)name);
|
||||
@@ -2480,8 +2488,9 @@ grub_zfs_dir (grub_device_t device, cons
|
||||
fill_fs_info (&info, data->dnode, data);
|
||||
hook ("@", &info);
|
||||
|
||||
- childobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&data->dnode.dn))->dd_child_dir_zapobj, data->dnode.endian);
|
||||
- headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&data->dnode.dn))->dd_head_dataset_obj, data->dnode.endian);
|
||||
+ dsl_dir_phys_t * tmp2 = DN_BONUS (&data->dnode.dn);
|
||||
+ childobj = grub_zfs_to_cpu64 (tmp2->dd_child_dir_zapobj, data->dnode.endian);
|
||||
+ headobj = grub_zfs_to_cpu64 (tmp2->dd_head_dataset_obj, data->dnode.endian);
|
||||
err = dnode_get (&(data->mos), childobj,
|
||||
DMU_OT_DSL_DIR_CHILD_MAP, &dn, data);
|
||||
if (err)
|
||||
@@ -2499,7 +2508,8 @@ grub_zfs_dir (grub_device_t device, cons
|
||||
return err;
|
||||
}
|
||||
|
||||
- snapobj = grub_zfs_to_cpu64 (((dsl_dataset_phys_t *) DN_BONUS (&dn.dn))->ds_snapnames_zapobj, dn.endian);
|
||||
+ dsl_dataset_phys_t * tmp3 = DN_BONUS (&dn.dn);
|
||||
+ snapobj = grub_zfs_to_cpu64 (tmp3->ds_snapnames_zapobj, dn.endian);
|
||||
|
||||
err = dnode_get (&(data->mos), snapobj,
|
||||
DMU_OT_DSL_DS_SNAP_MAP, &dn, data);
|
||||
@@ -0,0 +1,41 @@
|
||||
UpstreamStatus: Pending
|
||||
|
||||
This patch quitens this error:
|
||||
|
||||
| make[3]: Entering directory
|
||||
`/home/nitin/builds/build0/tmp/work/x86_64-linux/grub-efi-i586-native-1.99-r7/grub-1.99/grub-core'
|
||||
| gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include
|
||||
-DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=I386_EFI -nostdinc -isystem
|
||||
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/include -DGRUB_FILE=\"fs/btrfs.c\" -I.
|
||||
-I. -I.. -I.. -I../include -I../include
|
||||
-isystem/home/nitin/builds/build0/tmp/sysroots/x86_64-linux/usr/include -O2
|
||||
-pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith
|
||||
-Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1
|
||||
-falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow
|
||||
-fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror
|
||||
-Wno-trampolines -ffreestanding
|
||||
-isystem/home/nitin/builds/build0/tmp/sysroots/x86_64-linux/usr/include -O2
|
||||
-pipe -c -o fs/btrfs_module-btrfs.o `test -f 'fs/btrfs.c' || echo
|
||||
'./'`fs/btrfs.c
|
||||
| fs/btrfs.c: In function 'grub_btrfs_read_logical':
|
||||
| fs/btrfs.c:791:5: error: 'err' may be used uninitialized in this function
|
||||
[-Werror=maybe-uninitialized]
|
||||
| fs/btrfs.c:592:18: note: 'err' was declared here
|
||||
| cc1: all warnings being treated as errors
|
||||
| make[3]: *** [fs/btrfs_module-btrfs.o] Error 1
|
||||
|
||||
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
|
||||
2012/04/13
|
||||
Index: grub-1.99/grub-core/fs/btrfs.c
|
||||
===================================================================
|
||||
--- grub-1.99.orig/grub-core/fs/btrfs.c
|
||||
+++ grub-1.99/grub-core/fs/btrfs.c
|
||||
@@ -589,7 +589,7 @@ grub_btrfs_read_logical (struct grub_btr
|
||||
struct grub_btrfs_key *key;
|
||||
struct grub_btrfs_chunk_item *chunk;
|
||||
grub_uint64_t csize;
|
||||
- grub_err_t err;
|
||||
+ grub_err_t err = 0;
|
||||
struct grub_btrfs_key key_out;
|
||||
int challoc = 0;
|
||||
grub_device_t dev;
|
||||
34
meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0.patch
Normal file
34
meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
Upstream-Status: backport from fedora
|
||||
|
||||
2012/04/13
|
||||
Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
|
||||
|
||||
From b0f4ef523b69a497d69820c09bbb07484a6b09cc Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 7 Mar 2012 09:53:50 -0500
|
||||
Subject: [PATCH] Fix gcc error that kills build.
|
||||
|
||||
---
|
||||
conf/Makefile.common | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/conf/Makefile.common b/conf/Makefile.common
|
||||
index 2040a2e..b3ba765 100644
|
||||
--- a/conf/Makefile.common
|
||||
+++ b/conf/Makefile.common
|
||||
@@ -11,10 +11,10 @@ if COND_i386_pc
|
||||
CFLAGS_PLATFORM += -mrtd -mregparm=3
|
||||
endif
|
||||
if COND_i386_efi
|
||||
- LDFLAGS_PLATFORM = -melf_i386
|
||||
+ LDFLAGS_PLATFORM = -m32
|
||||
endif
|
||||
if COND_x86_64_efi
|
||||
- LDFLAGS_PLATFORM = -melf_x86_64
|
||||
+ LDFLAGS_PLATFORM = -m64
|
||||
endif
|
||||
if COND_i386_qemu
|
||||
CFLAGS_PLATFORM += -mrtd -mregparm=3
|
||||
--
|
||||
1.7.7.6
|
||||
|
||||
@@ -16,14 +16,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||
# FIXME: We should be able to optionally drop freetype as a dependency
|
||||
DEPENDS = "help2man-native autogen-native"
|
||||
RDEPENDS_${PN} = "diffutils freetype"
|
||||
PR = "r6"
|
||||
PR = "r9"
|
||||
|
||||
# Native packages do not normally rebuild when the target changes.
|
||||
# Ensure this is built once per HOST-TARGET pair.
|
||||
PN := "grub-efi-${TRANSLATED_TARGET_ARCH}-native"
|
||||
|
||||
SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
|
||||
file://grub-1.99_fix_for_automake_1.11.2.patch"
|
||||
file://grub-1.99_fix_for_automake_1.11.2.patch \
|
||||
file://grub-1.99-fpmath-sse-387-fix.patch \
|
||||
file://grub-1.99-gcc-4.7.0.patch \
|
||||
file://grub-1.99-gcc-4.7.0-uninitialized-var-errors.patch \
|
||||
file://grub-1.99-gcc-4.7.0-strict-aliasing-errors.patch \
|
||||
file://grub-1.99-fix-enable_execute_stack-check.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "ca9f2a2d571b57fc5c53212d1d22e2b5"
|
||||
SRC_URI[sha256sum] = "b91f420f2c51f6155e088e34ff99bea09cc1fb89585cf7c0179644e57abd28ff"
|
||||
|
||||
@@ -11,11 +11,18 @@ SECTION = "bootloaders"
|
||||
LICENSE = "GPLv3"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||
|
||||
DEPENDS = "autogen-native"
|
||||
RDEPENDS_${PN} = "diffutils freetype"
|
||||
PR = "r3"
|
||||
PR = "r7"
|
||||
|
||||
SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
|
||||
file://grub-install.in.patch \
|
||||
file://grub-1.99_fix_for_automake_1.11.2.patch \
|
||||
file://grub-1.99-fpmath-sse-387-fix.patch \
|
||||
file://grub-1.99-gcc-4.7.0.patch \
|
||||
file://grub-1.99-gcc-4.7.0-uninitialized-var-errors.patch \
|
||||
file://grub-1.99-gcc-4.7.0-strict-aliasing-errors.patch \
|
||||
file://grub-1.99-fix-enable_execute_stack-check.patch \
|
||||
file://40_custom"
|
||||
|
||||
SRC_URI[md5sum] = "ca9f2a2d571b57fc5c53212d1d22e2b5"
|
||||
@@ -26,7 +33,7 @@ COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
|
||||
inherit autotools
|
||||
inherit gettext
|
||||
|
||||
EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --target=${TARGET_ARCH} --program-prefix="""
|
||||
EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="""
|
||||
|
||||
do_configure() {
|
||||
oe_runconf
|
||||
|
||||
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
|
||||
file://src/lrz.c;beginline=1;endline=10;md5=5276956373ff7d8758837f6399a1045f"
|
||||
SECTION = "console/network"
|
||||
DEPENDS = ""
|
||||
PR = "r3"
|
||||
PR = "r4"
|
||||
|
||||
SRC_URI = "http://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \
|
||||
file://autotools.patch \
|
||||
@@ -28,13 +28,19 @@ do_install() {
|
||||
}
|
||||
|
||||
pkg_postinst_${PN}() {
|
||||
for util in rz rx rb sz sx sb; do
|
||||
for util in rz rx rb; do
|
||||
update-alternatives --install ${bindir}/$util $util lrz 100
|
||||
done
|
||||
for util in sz sx sb; do
|
||||
update-alternatives --install ${bindir}/$util $util lsz 100
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postrm_${PN}() {
|
||||
for util in rz rx rb sz sx sb; do
|
||||
for util in rz rx rb; do
|
||||
update-alternatives --remove $util ${bindir}/lrz
|
||||
done
|
||||
for util sz sx sb; do
|
||||
update-alternatives --remove $util ${bindir}/lsz
|
||||
done
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ SECTION = "network"
|
||||
# python scripts are under GPLv2+
|
||||
LICENSE = "GPLv2+ & LGPLv2.1+"
|
||||
|
||||
INC_PR = "r1"
|
||||
INC_PR = "r2"
|
||||
|
||||
DEPENDS = "expat libcap libdaemon dbus glib-2.0"
|
||||
|
||||
@@ -123,17 +123,16 @@ do_install_avahi-autoipd() {
|
||||
}
|
||||
|
||||
# At the time the postinst runs, dbus might not be setup so only restart if running
|
||||
# Don't exit early, because update-rc.d needs to run subsequently.
|
||||
|
||||
pkg_postinst_avahi-daemon () {
|
||||
if [ "x$D" != "x" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "$D" ]; then
|
||||
DBUSPID=`pidof dbus-daemon`
|
||||
|
||||
if [ "x$DBUSPID" != "x" ]; then
|
||||
/etc/init.d/dbus-1 force-reload
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst_avahi-autoipd () {
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From 56d307993c0a661c73fcdd72b1392c3719a0c297 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <56d307993c0a661c73fcdd72b1392c3719a0c297.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
From: Joshua Lock <josh@linux.intel.com>
|
||||
Date: Tue, 10 Apr 2012 17:54:56 -0700
|
||||
Subject: [PATCH 1/6] Monitor the Manager's State property
|
||||
|
||||
Monitor the Manager's State property and update global_ready
|
||||
appropriately when it changes.
|
||||
|
||||
Without this change using the applet with connman 0.79 and
|
||||
starting the applet after the daemon no status icon is shown.
|
||||
|
||||
With this change this icon displays an appropriate state when
|
||||
the applet launches.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Joshua Lock <josh@linux.intel.com>
|
||||
---
|
||||
applet/main.c | 10 ++++++++++
|
||||
1 files changed, 10 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/applet/main.c b/applet/main.c
|
||||
index 224e2fd..68a77b1 100644
|
||||
--- a/applet/main.c
|
||||
+++ b/applet/main.c
|
||||
@@ -111,6 +111,16 @@ static void manager_property_changed(DBusGProxy *proxy, const char *property,
|
||||
iterate_list, &path);
|
||||
update_service(proxy, path);
|
||||
g_free(path);
|
||||
+ } else if (g_str_equal(property, "State") == TRUE) {
|
||||
+ const gchar *state = g_value_get_string(value);
|
||||
+
|
||||
+ if (g_strcmp0(state, "ready") == 0 || g_strcmp0(state, "online") == 0) {
|
||||
+ global_ready = TRUE;
|
||||
+ status_ready(global_strength);
|
||||
+ } else {
|
||||
+ global_ready = FALSE;
|
||||
+ status_offline();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,865 @@
|
||||
From 8b8fd038474def8452354105b40738a402f28d19 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8b8fd038474def8452354105b40738a402f28d19.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Thu, 12 Apr 2012 00:35:00 +0100
|
||||
Subject: [PATCH 2/6] Update for ConnMan 0.79 API changes
|
||||
|
||||
* Use Manager.GetServices method instead of Manager.Services property
|
||||
* Use Manager.GetTechnologies / Technology.Powered instead of
|
||||
Manager.EnabledTechnologies method
|
||||
* Use Technology.Powered property instead of Manager.EnableTechnology
|
||||
and Manager.DisableTechnology methods
|
||||
* Use Technology.Scan method instead of Manager.RequestScan method
|
||||
* Listen for ServicesAdded, ServicesRemoved, TechnologyAdded and
|
||||
TechnologyRemoved signals instead of monitoring the old Services
|
||||
and EnabledTechnologies properties
|
||||
|
||||
Also remove unused code relating to the old API.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
common/connman-client.c | 90 ++-----------
|
||||
common/connman-client.h | 12 +-
|
||||
common/connman-dbus.c | 359 +++++++++++++++++++++++++++--------------------
|
||||
common/connman-dbus.h | 1 +
|
||||
common/connman-dbus.xml | 17 +--
|
||||
common/marshal.list | 2 +
|
||||
properties/cellular.c | 6 +-
|
||||
properties/ethernet.c | 8 +-
|
||||
properties/main.c | 14 +--
|
||||
properties/wifi.c | 8 +-
|
||||
10 files changed, 245 insertions(+), 272 deletions(-)
|
||||
|
||||
diff --git a/common/connman-client.c b/common/connman-client.c
|
||||
index 407aea0..9d755c4 100644
|
||||
--- a/common/connman-client.c
|
||||
+++ b/common/connman-client.c
|
||||
@@ -112,9 +112,7 @@ static void connman_client_init(ConnmanClient *client)
|
||||
G_TYPE_STRING, /* address */
|
||||
G_TYPE_STRING, /* netmask */
|
||||
G_TYPE_STRING, /* gateway */
|
||||
- G_TYPE_BOOLEAN, /* ethernet enabled */
|
||||
- G_TYPE_BOOLEAN, /* wifi enabled */
|
||||
- G_TYPE_BOOLEAN, /* cellular enabled */
|
||||
+ G_TYPE_BOOLEAN, /* powered */
|
||||
G_TYPE_BOOLEAN);/* offline */
|
||||
|
||||
g_object_set_data(G_OBJECT(priv->store),
|
||||
@@ -288,7 +286,7 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
DBusGProxy *proxy;
|
||||
GValue value = { 0 };
|
||||
|
||||
- DBG("client %p", client);
|
||||
+ DBG("client %p device %s", client, device);
|
||||
|
||||
if (device == NULL)
|
||||
return;
|
||||
@@ -300,64 +298,34 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
g_value_init(&value, G_TYPE_BOOLEAN);
|
||||
g_value_set_boolean(&value, powered);
|
||||
|
||||
- connman_set_property(proxy, "Powered", &value, NULL);
|
||||
-
|
||||
- g_object_unref(proxy);
|
||||
-}
|
||||
-
|
||||
-static gboolean device_scan(GtkTreeModel *model, GtkTreePath *path,
|
||||
- GtkTreeIter *iter, gpointer user_data)
|
||||
-{
|
||||
- DBusGProxy *proxy;
|
||||
-
|
||||
- gtk_tree_model_get(model, iter, CONNMAN_COLUMN_PROXY, &proxy, -1);
|
||||
-
|
||||
- if (proxy == NULL)
|
||||
- return FALSE;
|
||||
-
|
||||
- if (g_str_equal(dbus_g_proxy_get_interface(proxy),
|
||||
- CONNMAN_SERVICE_INTERFACE) == FALSE)
|
||||
- return FALSE;
|
||||
-
|
||||
- connman_propose_scan(proxy, NULL);
|
||||
+ GError *error = NULL;
|
||||
+ gboolean ret = connman_set_property(proxy, "Powered", &value, &error);
|
||||
+ if( error )
|
||||
+ fprintf (stderr, "error: %s\n", error->message);
|
||||
|
||||
g_object_unref(proxy);
|
||||
-
|
||||
- return FALSE;
|
||||
}
|
||||
|
||||
-void connman_client_propose_scan(ConnmanClient *client, const gchar *device)
|
||||
+void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
+ connman_scan_reply callback, gpointer user_data)
|
||||
{
|
||||
ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
DBusGProxy *proxy;
|
||||
|
||||
- DBG("client %p", client);
|
||||
+ DBG("client %p device %s", client, device);
|
||||
|
||||
- if (device == NULL) {
|
||||
- gtk_tree_model_foreach(GTK_TREE_MODEL(priv->store),
|
||||
- device_scan, NULL);
|
||||
+ if (device == NULL)
|
||||
return;
|
||||
- }
|
||||
|
||||
proxy = connman_dbus_get_proxy(priv->store, device);
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_propose_scan(proxy, NULL);
|
||||
+ connman_scan_async(proxy, callback, user_data);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
|
||||
-void connman_client_request_scan(ConnmanClient *client, char *scantype,
|
||||
- connman_request_scan_reply callback, gpointer userdata)
|
||||
-{
|
||||
- ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
-
|
||||
- DBG("client %p", client);
|
||||
-
|
||||
- connman_request_scan_async(priv->manager, scantype, callback, userdata);
|
||||
-}
|
||||
-
|
||||
gboolean connman_client_get_offline_status(ConnmanClient *client)
|
||||
{
|
||||
GHashTable *hash;
|
||||
@@ -600,39 +568,3 @@ void connman_client_remove(ConnmanClient *client, const gchar *network)
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
-
|
||||
-void connman_client_enable_technology(ConnmanClient *client, const char *network,
|
||||
- const gchar *technology)
|
||||
-{
|
||||
- ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
- DBusGProxy *proxy;
|
||||
-
|
||||
- if (network== NULL)
|
||||
- return;
|
||||
-
|
||||
- proxy = connman_dbus_get_proxy(priv->store, network);
|
||||
- if (proxy == NULL)
|
||||
- return;
|
||||
-
|
||||
- connman_enable_technology(proxy, technology, NULL);
|
||||
-
|
||||
- g_object_unref(proxy);
|
||||
-}
|
||||
-
|
||||
-void connman_client_disable_technology(ConnmanClient *client, const char *network,
|
||||
- const gchar *technology)
|
||||
-{
|
||||
- ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
- DBusGProxy *proxy;
|
||||
-
|
||||
- if (network == NULL)
|
||||
- return;
|
||||
-
|
||||
- proxy = connman_dbus_get_proxy(priv->store, network);
|
||||
- if (proxy == NULL)
|
||||
- return;
|
||||
-
|
||||
- connman_disable_technology(proxy, technology, NULL);
|
||||
-
|
||||
- g_object_unref(proxy);
|
||||
-}
|
||||
diff --git a/common/connman-client.h b/common/connman-client.h
|
||||
index 15fa098..6fe772c 100644
|
||||
--- a/common/connman-client.h
|
||||
+++ b/common/connman-client.h
|
||||
@@ -69,7 +69,8 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
gboolean powered);
|
||||
gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
struct ipv4_config *ipv4_config);
|
||||
-void connman_client_propose_scan(ConnmanClient *client, const gchar *device);
|
||||
+void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
+ 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);
|
||||
@@ -89,8 +90,6 @@ void connman_client_set_callback(ConnmanClient *client,
|
||||
|
||||
void connman_client_remove(ConnmanClient *client, const gchar *network);
|
||||
|
||||
-void connman_client_request_scan(ConnmanClient *client, char *scantype,
|
||||
- connman_request_scan_reply callback, gpointer userdata);
|
||||
gboolean connman_client_get_offline_status(ConnmanClient *client);
|
||||
void connman_client_set_offlinemode(ConnmanClient *client, gboolean status);
|
||||
|
||||
@@ -114,11 +113,8 @@ enum {
|
||||
CONNMAN_COLUMN_ADDRESS, /* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_NETMASK, /* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_GATEWAY, /* G_TYPE_STRING */
|
||||
-
|
||||
- CONNMAN_COLUMN_ETHERNET_ENABLED,/* G_TYPE_STRING */
|
||||
- CONNMAN_COLUMN_WIFI_ENABLED, /* G_TYPE_STRING */
|
||||
- CONNMAN_COLUMN_CELLULAR_ENABLED,/* G_TYPE_STRING */
|
||||
- CONNMAN_COLUMN_OFFLINEMODE, /* G_TYPE_STRING */
|
||||
+ CONNMAN_COLUMN_POWERED, /* G_TYPE_BOOLEAN */
|
||||
+ CONNMAN_COLUMN_OFFLINEMODE, /* G_TYPE_BOOLEAN */
|
||||
|
||||
_CONNMAN_NUM_COLUMNS
|
||||
};
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index 6669749..4eb77b6 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "connman-dbus.h"
|
||||
#include "connman-dbus-glue.h"
|
||||
|
||||
+#include "marshal.h"
|
||||
+
|
||||
#ifdef DEBUG
|
||||
#define DBG(fmt, arg...) printf("%s:%s() " fmt "\n", __FILE__, __FUNCTION__ , ## arg)
|
||||
#else
|
||||
@@ -164,22 +166,6 @@ gboolean connman_dbus_get_iter(GtkTreeStore *store, const gchar *path,
|
||||
return get_iter_from_path(store, iter, path);
|
||||
}
|
||||
|
||||
-static void iterate_list(const GValue *value, gpointer user_data)
|
||||
-{
|
||||
- GSList **list = user_data;
|
||||
- gchar *path = g_value_dup_boxed(value);
|
||||
-
|
||||
- if (path == NULL)
|
||||
- return;
|
||||
-
|
||||
- *list = g_slist_append(*list, path);
|
||||
-}
|
||||
-
|
||||
-static gint compare_path(gconstpointer a, gconstpointer b)
|
||||
-{
|
||||
- return g_strcmp0(a, b);
|
||||
-}
|
||||
-
|
||||
static guint get_type(const GValue *value)
|
||||
{
|
||||
const char *type = value ? g_value_get_string(value) : NULL;
|
||||
@@ -217,95 +203,76 @@ static const gchar *type2icon(guint type)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-static void enabled_technologies_changed(GtkTreeStore *store, GValue *value)
|
||||
+static void tech_changed(DBusGProxy *proxy, const char *property,
|
||||
+ GValue *value, gpointer user_data)
|
||||
{
|
||||
+ GtkTreeStore *store = user_data;
|
||||
+ const char *path = dbus_g_proxy_get_path(proxy);
|
||||
GtkTreeIter iter;
|
||||
- gboolean ethernet_enabled_prev, ethernet_enabled = FALSE;
|
||||
- gboolean wifi_enabled_prev, wifi_enabled = FALSE;
|
||||
- gboolean cellular_enabled_prev, cellular_enabled = FALSE;
|
||||
- gchar **tech = g_value_get_boxed (value);
|
||||
- guint i;
|
||||
|
||||
- if (value == NULL)
|
||||
- return;
|
||||
-
|
||||
- for (i = 0; i < g_strv_length(tech); i++) {
|
||||
- DBG("technology: %s", *(tech+i));
|
||||
- if (g_str_equal("ethernet", *(tech + i)))
|
||||
- ethernet_enabled = TRUE;
|
||||
- else if (g_str_equal ("wifi", *(tech + i)))
|
||||
- wifi_enabled = TRUE;
|
||||
- else if (g_str_equal ("cellular", *(tech + i)))
|
||||
- cellular_enabled = TRUE;
|
||||
- }
|
||||
+ DBG("store %p proxy %p property %s", store, proxy, property);
|
||||
|
||||
- get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_ETHERNET);
|
||||
- gtk_tree_model_get(GTK_TREE_MODEL(store), &iter,
|
||||
- CONNMAN_COLUMN_ETHERNET_ENABLED, ðernet_enabled_prev, -1);
|
||||
- if (ethernet_enabled_prev != ethernet_enabled)
|
||||
- gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_ETHERNET_ENABLED, ethernet_enabled, -1);
|
||||
+ if (property == NULL || value == NULL)
|
||||
+ return;
|
||||
|
||||
- get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_WIFI);
|
||||
- gtk_tree_model_get(GTK_TREE_MODEL(store), &iter,
|
||||
- CONNMAN_COLUMN_WIFI_ENABLED, &wifi_enabled_prev, -1);
|
||||
- if (wifi_enabled_prev != wifi_enabled)
|
||||
- gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_WIFI_ENABLED, wifi_enabled, -1);
|
||||
+ if (get_iter_from_path(store, &iter, path) == FALSE)
|
||||
+ return;
|
||||
|
||||
- get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_CELLULAR);
|
||||
- gtk_tree_model_get(GTK_TREE_MODEL(store), &iter,
|
||||
- CONNMAN_COLUMN_CELLULAR_ENABLED, &cellular_enabled_prev, -1);
|
||||
- if (cellular_enabled_prev != cellular_enabled)
|
||||
+ if (g_str_equal(property, "Powered") == TRUE) {
|
||||
+ gboolean powered = g_value_get_boolean(value);
|
||||
gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_CELLULAR_ENABLED, cellular_enabled, -1);
|
||||
+ CONNMAN_COLUMN_POWERED, powered, -1);
|
||||
+ }
|
||||
}
|
||||
|
||||
-static void enabled_technologies_properties(GtkTreeStore *store, DBusGProxy *proxy, GValue *value)
|
||||
+static void tech_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
+ GError *error, gpointer user_data)
|
||||
{
|
||||
+ GtkTreeStore *store = user_data;
|
||||
GtkTreeIter iter;
|
||||
- gboolean ethernet_enabled = FALSE;
|
||||
- gboolean wifi_enabled = FALSE;
|
||||
- gboolean cellular_enabled = FALSE;
|
||||
- gchar **tech = g_value_get_boxed (value);
|
||||
- guint i;
|
||||
-
|
||||
- for (i = 0; i < g_strv_length (tech); i++) {
|
||||
- DBG("technology: %s", *(tech+i));
|
||||
- if (g_str_equal("ethernet", *(tech + i)))
|
||||
- ethernet_enabled = TRUE;
|
||||
- else if (g_str_equal ("wifi", *(tech + i)))
|
||||
- wifi_enabled = TRUE;
|
||||
- else if (g_str_equal ("cellular", *(tech + i)))
|
||||
- cellular_enabled = TRUE;
|
||||
- }
|
||||
+ gboolean powered = FALSE;
|
||||
+ GValue *propval = 0;
|
||||
+ const char *techtype = 0;
|
||||
|
||||
- if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_ETHERNET) == FALSE)
|
||||
- gtk_tree_store_append(store, &iter, NULL);
|
||||
+ propval = g_hash_table_lookup(hash, "Type");
|
||||
+ techtype = propval ? g_value_get_string(propval) : NULL;
|
||||
|
||||
- gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_PROXY, proxy,
|
||||
- CONNMAN_COLUMN_ETHERNET_ENABLED, ethernet_enabled,
|
||||
- CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_ETHERNET,
|
||||
- -1);
|
||||
+ propval = g_hash_table_lookup(hash, "Powered");
|
||||
+ powered = propval ? g_value_get_boolean(propval) : FALSE;
|
||||
|
||||
- if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_WIFI) == FALSE)
|
||||
- gtk_tree_store_append(store, &iter, NULL);
|
||||
+ if (g_str_equal("ethernet", techtype))
|
||||
+ {
|
||||
+ if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_ETHERNET) == FALSE)
|
||||
+ gtk_tree_store_append(store, &iter, NULL);
|
||||
|
||||
- gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_PROXY, proxy,
|
||||
- CONNMAN_COLUMN_WIFI_ENABLED, wifi_enabled,
|
||||
- CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_WIFI,
|
||||
- -1);
|
||||
+ gtk_tree_store_set(store, &iter,
|
||||
+ CONNMAN_COLUMN_PROXY, proxy,
|
||||
+ CONNMAN_COLUMN_POWERED, powered,
|
||||
+ CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_ETHERNET,
|
||||
+ -1);
|
||||
+ }
|
||||
+ else if (g_str_equal ("wifi", techtype))
|
||||
+ {
|
||||
+ if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_WIFI) == FALSE)
|
||||
+ gtk_tree_store_append(store, &iter, NULL);
|
||||
|
||||
- if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_CELLULAR) == FALSE)
|
||||
- gtk_tree_store_append(store, &iter, NULL);
|
||||
+ gtk_tree_store_set(store, &iter,
|
||||
+ CONNMAN_COLUMN_PROXY, proxy,
|
||||
+ CONNMAN_COLUMN_POWERED, powered,
|
||||
+ CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_WIFI,
|
||||
+ -1);
|
||||
+ }
|
||||
+ else if (g_str_equal ("3g", techtype))
|
||||
+ {
|
||||
+ if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_CELLULAR) == FALSE)
|
||||
+ gtk_tree_store_append(store, &iter, NULL);
|
||||
|
||||
- gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_PROXY, proxy,
|
||||
- CONNMAN_COLUMN_CELLULAR_ENABLED, cellular_enabled,
|
||||
- CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_CELLULAR,
|
||||
- -1);
|
||||
+ gtk_tree_store_set(store, &iter,
|
||||
+ CONNMAN_COLUMN_PROXY, proxy,
|
||||
+ CONNMAN_COLUMN_POWERED, powered,
|
||||
+ CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_CELLULAR,
|
||||
+ -1);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void offline_mode_changed(GtkTreeStore *store, GValue *value)
|
||||
@@ -319,6 +286,39 @@ static void offline_mode_changed(GtkTreeStore *store, GValue *value)
|
||||
-1);
|
||||
}
|
||||
|
||||
+static void tech_added(DBusGProxy *proxy, DBusGObjectPath *path,
|
||||
+ GHashTable *hash, gpointer user_data)
|
||||
+{
|
||||
+ GtkTreeStore *store = user_data;
|
||||
+ GtkTreeIter iter;
|
||||
+ DBG("store %p proxy %p hash %p", store, proxy, hash);
|
||||
+
|
||||
+ if (!get_iter_from_path(store, &iter, path)) {
|
||||
+ DBusGProxy *tech_proxy = dbus_g_proxy_new_for_name(connection,
|
||||
+ CONNMAN_SERVICE, path,
|
||||
+ CONNMAN_TECHNOLOGY_INTERFACE);
|
||||
+ if (tech_proxy == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ tech_properties(tech_proxy, hash, NULL, user_data);
|
||||
+
|
||||
+ dbus_g_proxy_add_signal(tech_proxy, "PropertyChanged",
|
||||
+ G_TYPE_STRING, G_TYPE_VALUE, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_connect_signal(tech_proxy, "PropertyChanged",
|
||||
+ G_CALLBACK(tech_changed), store, NULL);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void tech_removed(DBusGProxy *proxy, DBusGObjectPath *path,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ GtkTreeStore *store = user_data;
|
||||
+ GtkTreeIter iter;
|
||||
+
|
||||
+ if (get_iter_from_path(store, &iter, path))
|
||||
+ gtk_tree_store_remove(store, &iter);
|
||||
+}
|
||||
+
|
||||
static void offline_mode_properties(GtkTreeStore *store, DBusGProxy *proxy, GValue *value)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
@@ -401,59 +401,8 @@ static void service_changed(DBusGProxy *proxy, const char *property,
|
||||
}
|
||||
}
|
||||
|
||||
-static void property_update(GtkTreeStore *store, const GValue *value,
|
||||
- connman_get_properties_reply callback)
|
||||
-{
|
||||
- GSList *list, *link, *old_list, *new_list = NULL;
|
||||
-
|
||||
- DBG("store %p", store);
|
||||
-
|
||||
- old_list = g_object_get_data(G_OBJECT(store), "Services");
|
||||
-
|
||||
- dbus_g_type_collection_value_iterate(value, iterate_list, &new_list);
|
||||
-
|
||||
- g_object_set_data(G_OBJECT(store), "Services", new_list);
|
||||
-
|
||||
- for (list = new_list; list; list = list->next) {
|
||||
- gchar *path = list->data;
|
||||
- DBusGProxy *proxy;
|
||||
-
|
||||
- DBG("new path %s", path);
|
||||
-
|
||||
- link = g_slist_find_custom(old_list, path, compare_path);
|
||||
- if (link != NULL) {
|
||||
- g_free(link->data);
|
||||
- old_list = g_slist_delete_link(old_list, link);
|
||||
- }
|
||||
-
|
||||
- proxy = dbus_g_proxy_new_for_name(connection,
|
||||
- CONNMAN_SERVICE, path,
|
||||
- CONNMAN_SERVICE_INTERFACE);
|
||||
- if (proxy == NULL)
|
||||
- continue;
|
||||
-
|
||||
- DBG("getting %s properties", "Services");
|
||||
-
|
||||
- connman_get_properties_async(proxy, callback, store);
|
||||
- }
|
||||
-
|
||||
- for (list = old_list; list; list = list->next) {
|
||||
- gchar *path = list->data;
|
||||
- GtkTreeIter iter;
|
||||
-
|
||||
- DBG("old path %s", path);
|
||||
-
|
||||
- if (get_iter_from_path(store, &iter, path) == TRUE)
|
||||
- gtk_tree_store_remove(store, &iter);
|
||||
-
|
||||
- g_free(path);
|
||||
- }
|
||||
-
|
||||
- g_slist_free(old_list);
|
||||
-}
|
||||
-
|
||||
static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
- GError *error, gpointer user_data)
|
||||
+ gpointer user_data)
|
||||
{
|
||||
GtkTreeStore *store = user_data;
|
||||
GValue *value;
|
||||
@@ -468,7 +417,7 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
|
||||
DBG("store %p proxy %p hash %p", store, proxy, hash);
|
||||
|
||||
- if (error != NULL || hash == NULL)
|
||||
+ if (hash == NULL)
|
||||
goto done;
|
||||
|
||||
value = g_hash_table_lookup(hash, "Name");
|
||||
@@ -572,11 +521,7 @@ static void manager_changed(DBusGProxy *proxy, const char *property,
|
||||
if (property == NULL || value == NULL)
|
||||
return;
|
||||
|
||||
- if (g_str_equal(property, "Services") == TRUE)
|
||||
- property_update(store, value, service_properties);
|
||||
- else if (g_str_equal(property, "EnabledTechnologies") == TRUE)
|
||||
- enabled_technologies_changed(store, value);
|
||||
- else if (g_str_equal(property, "OfflineMode") == TRUE)
|
||||
+ if (g_str_equal(property, "OfflineMode") == TRUE)
|
||||
offline_mode_changed(store, value);
|
||||
}
|
||||
|
||||
@@ -591,23 +536,89 @@ static void manager_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
if (error != NULL || hash == NULL)
|
||||
return;
|
||||
|
||||
- value = g_hash_table_lookup(hash, "Services");
|
||||
- if (value != NULL)
|
||||
- property_update(store, value, service_properties);
|
||||
-
|
||||
- value = g_hash_table_lookup(hash, "EnabledTechnologies");
|
||||
- if (value != NULL)
|
||||
- enabled_technologies_properties(store, proxy, value);
|
||||
-
|
||||
value = g_hash_table_lookup(hash, "OfflineMode");
|
||||
if (value != NULL)
|
||||
offline_mode_properties(store, proxy, value);
|
||||
}
|
||||
|
||||
+static void manager_services(DBusGProxy *proxy, GPtrArray *array,
|
||||
+ GError *error, gpointer user_data)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ DBG("proxy %p array %p", proxy, array);
|
||||
+
|
||||
+ if (error != NULL || array == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ for (i = 0; i < array->len; i++)
|
||||
+ {
|
||||
+ GValueArray *item = g_ptr_array_index(array, i);
|
||||
+
|
||||
+ DBusGObjectPath *path = (DBusGObjectPath *)g_value_get_boxed(g_value_array_get_nth(item, 0));
|
||||
+ DBusGProxy *service_proxy = dbus_g_proxy_new_for_name(connection,
|
||||
+ CONNMAN_SERVICE, path,
|
||||
+ CONNMAN_SERVICE_INTERFACE);
|
||||
+ if (service_proxy == NULL)
|
||||
+ continue;
|
||||
+
|
||||
+ GHashTable *props = (GHashTable *)g_value_get_boxed(g_value_array_get_nth(item, 1));
|
||||
+ service_properties(service_proxy, props, user_data);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void manager_technologies(DBusGProxy *proxy, GPtrArray *array,
|
||||
+ GError *error, gpointer user_data)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ DBG("proxy %p array %p", proxy, array);
|
||||
+
|
||||
+ if (error != NULL || array == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ for (i = 0; i < array->len; i++)
|
||||
+ {
|
||||
+ GValueArray *item = g_ptr_array_index(array, i);
|
||||
+
|
||||
+ DBusGObjectPath *path = (DBusGObjectPath *)g_value_get_boxed(g_value_array_get_nth(item, 0));
|
||||
+ GHashTable *props = (GHashTable *)g_value_get_boxed(g_value_array_get_nth(item, 1));
|
||||
+
|
||||
+ tech_added(proxy, path, props, user_data);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void services_added(DBusGProxy *proxy, GPtrArray *array,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ DBG("proxy %p array %p", proxy, array);
|
||||
+
|
||||
+ manager_services(proxy, array, NULL, user_data);
|
||||
+}
|
||||
+
|
||||
+static void services_removed(DBusGProxy *proxy, GPtrArray *array,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ GtkTreeStore *store = user_data;
|
||||
+ GtkTreeIter iter;
|
||||
+ int i;
|
||||
+
|
||||
+ DBG("store %p proxy %p array %p", store, proxy, array);
|
||||
+
|
||||
+ for (i = 0; i < array->len; i++)
|
||||
+ {
|
||||
+ DBusGObjectPath *path = (DBusGObjectPath *)g_ptr_array_index(array, i);
|
||||
+
|
||||
+ if (get_iter_from_path(store, &iter, path))
|
||||
+ gtk_tree_store_remove(store, &iter);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
DBusGProxy *connman_dbus_create_manager(DBusGConnection *conn,
|
||||
GtkTreeStore *store)
|
||||
{
|
||||
DBusGProxy *proxy;
|
||||
+ GType otype;
|
||||
|
||||
connection = dbus_g_connection_ref(conn);
|
||||
|
||||
@@ -620,11 +631,49 @@ DBusGProxy *connman_dbus_create_manager(DBusGConnection *conn,
|
||||
G_TYPE_STRING, G_TYPE_VALUE, G_TYPE_INVALID);
|
||||
dbus_g_proxy_connect_signal(proxy, "PropertyChanged",
|
||||
G_CALLBACK(manager_changed), store, NULL);
|
||||
-
|
||||
+
|
||||
+ otype = dbus_g_type_get_struct("GValueArray", DBUS_TYPE_G_OBJECT_PATH, DBUS_TYPE_G_DICTIONARY, G_TYPE_INVALID);
|
||||
+ otype = dbus_g_type_get_collection("GPtrArray", otype);
|
||||
+ dbus_g_object_register_marshaller(marshal_VOID__BOXED, G_TYPE_NONE, otype, G_TYPE_INVALID);
|
||||
+
|
||||
+ dbus_g_proxy_add_signal(proxy, "ServicesAdded",
|
||||
+ otype, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_connect_signal(proxy, "ServicesAdded",
|
||||
+ G_CALLBACK(services_added), store, NULL);
|
||||
+
|
||||
+ otype = DBUS_TYPE_G_OBJECT_PATH_ARRAY;
|
||||
+ dbus_g_object_register_marshaller(marshal_VOID__BOXED, G_TYPE_NONE, otype, G_TYPE_INVALID);
|
||||
+
|
||||
+ dbus_g_proxy_add_signal(proxy, "ServicesRemoved",
|
||||
+ otype, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_connect_signal(proxy, "ServicesRemoved",
|
||||
+ G_CALLBACK(services_removed), store, NULL);
|
||||
+
|
||||
+ dbus_g_object_register_marshaller(marshal_VOID__STRING_BOXED, G_TYPE_NONE, DBUS_TYPE_G_OBJECT_PATH, DBUS_TYPE_G_DICTIONARY, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_add_signal(proxy, "TechnologyAdded",
|
||||
+ DBUS_TYPE_G_OBJECT_PATH, DBUS_TYPE_G_DICTIONARY, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_connect_signal(proxy, "TechnologyAdded",
|
||||
+ G_CALLBACK(tech_added), store, NULL);
|
||||
+
|
||||
+ dbus_g_object_register_marshaller(marshal_VOID__STRING, G_TYPE_NONE, DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_add_signal(proxy, "TechnologyRemoved",
|
||||
+ DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_connect_signal(proxy, "TechnologyRemoved",
|
||||
+ G_CALLBACK(tech_removed), store, NULL);
|
||||
+
|
||||
+
|
||||
DBG("getting manager properties");
|
||||
|
||||
connman_get_properties_async(proxy, manager_properties, store);
|
||||
|
||||
+ DBG("getting technologies");
|
||||
+
|
||||
+ connman_get_technologies_async(proxy, manager_technologies, store);
|
||||
+
|
||||
+ DBG("getting services");
|
||||
+
|
||||
+ connman_get_services_async(proxy, manager_services, store);
|
||||
+
|
||||
return proxy;
|
||||
}
|
||||
|
||||
diff --git a/common/connman-dbus.h b/common/connman-dbus.h
|
||||
index cfca50e..c1b5091 100644
|
||||
--- a/common/connman-dbus.h
|
||||
+++ b/common/connman-dbus.h
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#define CONNMAN_PROFILE_INTERFACE CONNMAN_SERVICE ".Profile"
|
||||
#define CONNMAN_SERVICE_INTERFACE CONNMAN_SERVICE ".Service"
|
||||
+#define CONNMAN_TECHNOLOGY_INTERFACE CONNMAN_SERVICE ".Technology"
|
||||
|
||||
DBusGProxy *connman_dbus_create_manager(DBusGConnection *connection,
|
||||
GtkTreeStore *store);
|
||||
diff --git a/common/connman-dbus.xml b/common/connman-dbus.xml
|
||||
index e20cb3b..56b9582 100644
|
||||
--- a/common/connman-dbus.xml
|
||||
+++ b/common/connman-dbus.xml
|
||||
@@ -5,26 +5,23 @@
|
||||
<method name="GetProperties">
|
||||
<arg type="a{sv}" direction="out"/>
|
||||
</method>
|
||||
+ <method name="GetServices">
|
||||
+ <arg type="a(oa{sv})" direction="out"/>
|
||||
+ </method>
|
||||
+ <method name="GetTechnologies">
|
||||
+ <arg type="a(oa{sv})" direction="out"/>
|
||||
+ </method>
|
||||
<method name="SetProperty">
|
||||
<arg type="s"/>
|
||||
<arg type="v"/>
|
||||
</method>
|
||||
- <method name="ProposeScan">
|
||||
- </method>
|
||||
<method name="Connect">
|
||||
</method>
|
||||
<method name="Disconnect">
|
||||
</method>
|
||||
<method name="Remove">
|
||||
</method>
|
||||
- <method name="RequestScan">
|
||||
- <arg type="s"/>
|
||||
- </method>
|
||||
- <method name="EnableTechnology">
|
||||
- <arg type="s"/>
|
||||
- </method>
|
||||
- <method name="DisableTechnology">
|
||||
- <arg type="s"/>
|
||||
+ <method name="Scan">
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
||||
diff --git a/common/marshal.list b/common/marshal.list
|
||||
index e72aa4b..8b174d0 100644
|
||||
--- a/common/marshal.list
|
||||
+++ b/common/marshal.list
|
||||
@@ -1 +1,3 @@
|
||||
VOID:STRING,BOXED
|
||||
+VOID:BOXED
|
||||
+VOID:STRING
|
||||
diff --git a/properties/cellular.c b/properties/cellular.c
|
||||
index 7bbfb89..4d27e0e 100644
|
||||
--- a/properties/cellular.c
|
||||
+++ b/properties/cellular.c
|
||||
@@ -59,9 +59,9 @@ static void switch_callback(GtkWidget *editable, gpointer user_data)
|
||||
const gchar *label = gtk_button_get_label(GTK_BUTTON(data->cellular_button));
|
||||
|
||||
if (g_str_equal(label, "Disable"))
|
||||
- connman_client_disable_technology(data->client, data->device, "cellular");
|
||||
+ connman_client_set_powered(data->client, data->device, FALSE);
|
||||
else
|
||||
- connman_client_enable_technology(data->client, data->device, "cellular");
|
||||
+ connman_client_set_powered(data->client, data->device, TRUE);
|
||||
}
|
||||
|
||||
void add_cellular_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
@@ -75,7 +75,7 @@ void add_cellular_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
gboolean cellular_enabled;
|
||||
|
||||
gtk_tree_model_get(data->model, iter,
|
||||
- CONNMAN_COLUMN_CELLULAR_ENABLED, &cellular_enabled,
|
||||
+ CONNMAN_COLUMN_POWERED, &cellular_enabled,
|
||||
-1);
|
||||
|
||||
vbox = gtk_vbox_new(TRUE, 0);
|
||||
diff --git a/properties/ethernet.c b/properties/ethernet.c
|
||||
index d7f91d9..31db7a0 100644
|
||||
--- a/properties/ethernet.c
|
||||
+++ b/properties/ethernet.c
|
||||
@@ -59,9 +59,9 @@ static void switch_callback(GtkWidget *editable, gpointer user_data)
|
||||
struct config_data *data = user_data;
|
||||
const gchar *label = gtk_button_get_label(GTK_BUTTON(data->ethernet_button));
|
||||
if (g_str_equal(label, "Disable"))
|
||||
- connman_client_disable_technology(data->client, data->device, "ethernet");
|
||||
- else if (g_str_equal(label, "Enable"))
|
||||
- connman_client_enable_technology(data->client, data->device, "ethernet");
|
||||
+ connman_client_set_powered(data->client, data->device, FALSE);
|
||||
+ else
|
||||
+ connman_client_set_powered(data->client, data->device, TRUE);
|
||||
}
|
||||
|
||||
void add_ethernet_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
@@ -75,7 +75,7 @@ void add_ethernet_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
gboolean ethernet_enabled;
|
||||
|
||||
gtk_tree_model_get(data->model, iter,
|
||||
- CONNMAN_COLUMN_ETHERNET_ENABLED, ðernet_enabled,
|
||||
+ CONNMAN_COLUMN_POWERED, ðernet_enabled,
|
||||
-1);
|
||||
|
||||
vbox = gtk_vbox_new(TRUE, 0);
|
||||
diff --git a/properties/main.c b/properties/main.c
|
||||
index 088684a..e266f03 100644
|
||||
--- a/properties/main.c
|
||||
+++ b/properties/main.c
|
||||
@@ -40,18 +40,14 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
struct config_data *data = user_data;
|
||||
guint type;
|
||||
const char *name = NULL, *_name = NULL, *state = NULL;
|
||||
- gboolean ethernet_enabled;
|
||||
- gboolean wifi_enabled;
|
||||
- gboolean cellular_enabled;
|
||||
+ gboolean powered;
|
||||
gboolean offline_mode;
|
||||
|
||||
gtk_tree_model_get(model, iter,
|
||||
CONNMAN_COLUMN_STATE, &state,
|
||||
CONNMAN_COLUMN_NAME, &name,
|
||||
CONNMAN_COLUMN_TYPE, &type,
|
||||
- CONNMAN_COLUMN_ETHERNET_ENABLED, ðernet_enabled,
|
||||
- CONNMAN_COLUMN_WIFI_ENABLED, &wifi_enabled,
|
||||
- CONNMAN_COLUMN_CELLULAR_ENABLED, &cellular_enabled,
|
||||
+ CONNMAN_COLUMN_POWERED, &powered,
|
||||
CONNMAN_COLUMN_OFFLINEMODE, &offline_mode,
|
||||
-1);
|
||||
|
||||
@@ -103,14 +99,14 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
} else if (type == CONNMAN_TYPE_LABEL_ETHERNET) {
|
||||
if (!data->ethernet_button)
|
||||
return;
|
||||
- if (ethernet_enabled)
|
||||
+ if (powered)
|
||||
gtk_button_set_label(GTK_BUTTON(data->ethernet_button), _("Disable"));
|
||||
else
|
||||
gtk_button_set_label(GTK_BUTTON(data->ethernet_button), _("Enable"));
|
||||
} else if (type == CONNMAN_TYPE_LABEL_WIFI) {
|
||||
if (!data->wifi_button)
|
||||
return;
|
||||
- if (wifi_enabled) {
|
||||
+ if (powered) {
|
||||
gtk_button_set_label(GTK_BUTTON(data->wifi_button), _("Disable"));
|
||||
gtk_widget_set_sensitive(data->scan_button, 1);
|
||||
} else {
|
||||
@@ -120,7 +116,7 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
} else if (type == CONNMAN_TYPE_LABEL_CELLULAR) {
|
||||
if (!data->cellular_button)
|
||||
return;
|
||||
- if (cellular_enabled)
|
||||
+ if (powered)
|
||||
gtk_button_set_label(GTK_BUTTON(data->cellular_button), _("Disable"));
|
||||
else
|
||||
gtk_button_set_label(GTK_BUTTON(data->cellular_button), _("Enable"));
|
||||
diff --git a/properties/wifi.c b/properties/wifi.c
|
||||
index 85922a3..038d35a 100644
|
||||
--- a/properties/wifi.c
|
||||
+++ b/properties/wifi.c
|
||||
@@ -96,9 +96,9 @@ static void switch_callback(GtkWidget *editable, gpointer user_data)
|
||||
const gchar *label = gtk_button_get_label(GTK_BUTTON(data->wifi_button));
|
||||
|
||||
if (g_str_equal(label, "Disable"))
|
||||
- connman_client_disable_technology(data->client, data->device, "wifi");
|
||||
+ connman_client_set_powered(data->client, data->device, FALSE);
|
||||
else
|
||||
- connman_client_enable_technology(data->client, data->device, "wifi");
|
||||
+ connman_client_set_powered(data->client, data->device, TRUE);
|
||||
}
|
||||
|
||||
static void scan_reply_cb(DBusGProxy *proxy, GError *error,
|
||||
@@ -115,7 +115,7 @@ static void scan_callback(GtkWidget *button, gpointer user_data)
|
||||
{
|
||||
struct config_data *data = user_data;
|
||||
gtk_widget_set_sensitive(button, 0);
|
||||
- connman_client_request_scan(data->client, "", scan_reply_cb, button);
|
||||
+ connman_client_scan(data->client, data->device, scan_reply_cb, button);
|
||||
}
|
||||
|
||||
void add_wifi_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
@@ -129,7 +129,7 @@ void add_wifi_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
gboolean wifi_enabled;
|
||||
|
||||
gtk_tree_model_get(data->model, iter,
|
||||
- CONNMAN_COLUMN_WIFI_ENABLED, &wifi_enabled,
|
||||
+ CONNMAN_COLUMN_POWERED, &wifi_enabled,
|
||||
-1);
|
||||
|
||||
vbox = gtk_vbox_new(TRUE, 0);
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
From 8594fb5e2fc347984457e2e46b175eb3cf57951f Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8594fb5e2fc347984457e2e46b175eb3cf57951f.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Sat, 14 Apr 2012 01:11:53 +0100
|
||||
Subject: [PATCH 3/6] Fix setting IPv4 configuration
|
||||
|
||||
Values in the hashtable for IPv4.Configuration need to be variants, not
|
||||
strings, and don't pass address entries if the method is dhcp.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
common/connman-client.c | 32 +++++++++++++++++++++++++-------
|
||||
1 files changed, 25 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/common/connman-client.c b/common/connman-client.c
|
||||
index 9d755c4..e4441ad 100644
|
||||
--- a/common/connman-client.c
|
||||
+++ b/common/connman-client.c
|
||||
@@ -39,6 +39,11 @@
|
||||
#define CONNMAN_CLIENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), \
|
||||
CONNMAN_TYPE_CLIENT, ConnmanClientPrivate))
|
||||
|
||||
+#ifndef DBUS_TYPE_G_DICTIONARY
|
||||
+#define DBUS_TYPE_G_DICTIONARY \
|
||||
+ (dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
|
||||
+#endif
|
||||
+
|
||||
typedef struct _ConnmanClientPrivate ConnmanClientPrivate;
|
||||
|
||||
struct _ConnmanClientPrivate {
|
||||
@@ -248,6 +253,16 @@ GtkTreeModel *connman_client_get_device_model(ConnmanClient *client)
|
||||
return model;
|
||||
}
|
||||
|
||||
+void hash_table_value_string_insert( GHashTable *hash, gpointer key, const char *str )
|
||||
+{
|
||||
+ GValue *itemvalue;
|
||||
+
|
||||
+ itemvalue = g_slice_new0(GValue);
|
||||
+ g_value_init(itemvalue, G_TYPE_STRING);
|
||||
+ g_value_set_string(itemvalue, str);
|
||||
+ g_hash_table_insert(hash, key, itemvalue);
|
||||
+}
|
||||
+
|
||||
gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
struct ipv4_config *ipv4_config)
|
||||
{
|
||||
@@ -255,12 +270,7 @@ gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
DBusGProxy *proxy;
|
||||
GValue value = { 0 };
|
||||
gboolean ret;
|
||||
- GHashTable *ipv4 = g_hash_table_new(g_str_hash, g_str_equal);
|
||||
-
|
||||
- g_hash_table_insert(ipv4, "Method", (gpointer)ipv4_config->method);
|
||||
- g_hash_table_insert(ipv4, "Address", (gpointer)ipv4_config->address);
|
||||
- g_hash_table_insert(ipv4, "Netmask", (gpointer)ipv4_config->netmask);
|
||||
- g_hash_table_insert(ipv4, "Gateway", (gpointer)ipv4_config->gateway);
|
||||
+ GHashTable *ipv4 = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free);
|
||||
|
||||
DBG("client %p", client);
|
||||
|
||||
@@ -270,7 +280,15 @@ gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
proxy = connman_dbus_get_proxy(priv->store, device);
|
||||
if (proxy == NULL)
|
||||
return FALSE;
|
||||
- g_value_init(&value, DBUS_TYPE_G_STRING_STRING_HASHTABLE);
|
||||
+
|
||||
+ hash_table_value_string_insert(ipv4, "Method", ipv4_config->method);
|
||||
+ if( g_strcmp0(ipv4_config->method, "dhcp" ) != 0 ) {
|
||||
+ hash_table_value_string_insert(ipv4, "Address", ipv4_config->address);
|
||||
+ hash_table_value_string_insert(ipv4, "Netmask", ipv4_config->netmask);
|
||||
+ hash_table_value_string_insert(ipv4, "Gateway", ipv4_config->gateway);
|
||||
+ }
|
||||
+
|
||||
+ g_value_init(&value, DBUS_TYPE_G_DICTIONARY);
|
||||
g_value_set_boxed(&value, ipv4);
|
||||
ret = connman_set_property(proxy, "IPv4.Configuration", &value, NULL);
|
||||
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,923 @@
|
||||
From c742b40860851f1659e801d0a652f854f6783bd1 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c742b40860851f1659e801d0a652f854f6783bd1.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Sat, 14 Apr 2012 02:32:43 +0100
|
||||
Subject: [PATCH 4/6] Handle WiFi authentication using an agent
|
||||
|
||||
Register an agent within the applet which shows an appropriate dialog
|
||||
when credentials are requested upon connecting to a secured wireless
|
||||
network.
|
||||
|
||||
Thanks to Julien Massot for providing the underlying agent library code.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
applet/Makefile.am | 3 +-
|
||||
applet/agent.c | 209 +++++++++++++++++++++++
|
||||
applet/agent.h | 29 +++
|
||||
applet/main.c | 3 +
|
||||
common/Makefile.am | 13 +-
|
||||
common/connman-agent.c | 426 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
common/connman-agent.h | 77 +++++++++
|
||||
common/connman-agent.xml | 26 +++
|
||||
common/marshal.list | 2 +
|
||||
9 files changed, 783 insertions(+), 5 deletions(-)
|
||||
create mode 100644 applet/agent.c
|
||||
create mode 100644 applet/agent.h
|
||||
create mode 100644 common/connman-agent.c
|
||||
create mode 100644 common/connman-agent.h
|
||||
create mode 100644 common/connman-agent.xml
|
||||
|
||||
diff --git a/applet/Makefile.am b/applet/Makefile.am
|
||||
index fe582ef..2e7c157 100644
|
||||
--- a/applet/Makefile.am
|
||||
+++ b/applet/Makefile.am
|
||||
@@ -2,7 +2,8 @@
|
||||
bin_PROGRAMS = connman-applet
|
||||
|
||||
connman_applet_SOURCES = main.c \
|
||||
- properties.h properties.c status.h status.c
|
||||
+ properties.h properties.c status.h \
|
||||
+ status.c agent.h agent.c
|
||||
|
||||
connman_applet_LDADD = $(top_builddir)/common/libcommon.a \
|
||||
@GTK_LIBS@ @DBUS_LIBS@
|
||||
diff --git a/applet/agent.c b/applet/agent.c
|
||||
new file mode 100644
|
||||
index 0000000..b12d337
|
||||
--- /dev/null
|
||||
+++ b/applet/agent.c
|
||||
@@ -0,0 +1,209 @@
|
||||
+/*
|
||||
+ *
|
||||
+ * Connection Manager
|
||||
+ *
|
||||
+ * Agent implementation based on code from bluez-gnome
|
||||
+ *
|
||||
+ * Copyright (C) 2005-2008 Marcel Holtmann <marcel@holtmann.org>
|
||||
+ * Copyright (C) 2006-2007 Bastien Nocera <hadess@hadess.net>
|
||||
+ * Copyright (C) 2012 Intel Corporation
|
||||
+ *
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#ifdef HAVE_CONFIG_H
|
||||
+#include <config.h>
|
||||
+#endif
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+#include <glib/gi18n.h>
|
||||
+#include <gtk/gtk.h>
|
||||
+
|
||||
+#include <dbus/dbus-glib.h>
|
||||
+
|
||||
+#include <connman-agent.h>
|
||||
+
|
||||
+#include "agent.h"
|
||||
+
|
||||
+struct input_data {
|
||||
+ gboolean numeric;
|
||||
+ gpointer request_data;
|
||||
+ GtkWidget *dialog;
|
||||
+ GHashTable *entries;
|
||||
+};
|
||||
+
|
||||
+static struct input_data *input_data_inst = NULL;
|
||||
+
|
||||
+static void input_free(struct input_data *input)
|
||||
+{
|
||||
+ gtk_widget_destroy(input->dialog);
|
||||
+
|
||||
+ g_hash_table_destroy(input->entries);
|
||||
+
|
||||
+ if( input_data_inst == input )
|
||||
+ input_data_inst = NULL;
|
||||
+
|
||||
+ g_free(input);
|
||||
+}
|
||||
+
|
||||
+static void request_input_callback(GtkWidget *dialog,
|
||||
+ gint response, gpointer user_data)
|
||||
+{
|
||||
+ GHashTableIter iter;
|
||||
+ gpointer key, value;
|
||||
+ GValue *retvalue = NULL;
|
||||
+ const gchar *text;
|
||||
+ struct input_data *input = user_data;
|
||||
+
|
||||
+ if (response == GTK_RESPONSE_OK) {
|
||||
+ GHashTable *reply = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
|
||||
+ g_hash_table_iter_init (&iter, input->entries);
|
||||
+ while (g_hash_table_iter_next (&iter, &key, &value)) {
|
||||
+ text = gtk_entry_get_text((GtkEntry *)value);
|
||||
+ if(strlen(text)) {
|
||||
+ retvalue = g_slice_new0(GValue);
|
||||
+ g_value_init(retvalue, G_TYPE_STRING);
|
||||
+ g_value_set_string(retvalue, text);
|
||||
+ g_hash_table_insert(reply, g_strdup(key), retvalue);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ connman_agent_request_input_set_reply(input->request_data, reply);
|
||||
+ } else {
|
||||
+ connman_agent_request_input_abort(input->request_data);
|
||||
+ }
|
||||
+
|
||||
+ input_free(input);
|
||||
+}
|
||||
+
|
||||
+static void show_dialog(gpointer data, gpointer user_data)
|
||||
+{
|
||||
+ struct input_data *input = data;
|
||||
+
|
||||
+ gtk_widget_show_all(input->dialog);
|
||||
+
|
||||
+ gtk_window_present(GTK_WINDOW(input->dialog));
|
||||
+}
|
||||
+
|
||||
+static void request_input_dialog(GHashTable *request,
|
||||
+ gpointer request_data)
|
||||
+{
|
||||
+ GtkWidget *dialog;
|
||||
+ GtkWidget *label;
|
||||
+ GtkWidget *table;
|
||||
+ GtkWidget *entry;
|
||||
+ struct input_data *input;
|
||||
+ GHashTableIter iter;
|
||||
+ gpointer key, value;
|
||||
+ int elems, i;
|
||||
+
|
||||
+ input = g_try_malloc0(sizeof(*input));
|
||||
+ if (!input)
|
||||
+ return;
|
||||
+
|
||||
+ input->request_data = request_data;
|
||||
+
|
||||
+ input->entries = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
|
||||
+
|
||||
+ dialog = gtk_dialog_new();
|
||||
+ gtk_window_set_title(GTK_WINDOW(dialog), _("Connection Manager"));
|
||||
+ gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
|
||||
+ gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
|
||||
+ gtk_window_set_keep_above(GTK_WINDOW(dialog), TRUE);
|
||||
+ gtk_window_set_urgency_hint(GTK_WINDOW(dialog), TRUE);
|
||||
+ gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
|
||||
+ input->dialog = dialog;
|
||||
+
|
||||
+ gtk_dialog_add_button(GTK_DIALOG(dialog),
|
||||
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
|
||||
+ gtk_dialog_add_button(GTK_DIALOG(dialog),
|
||||
+ GTK_STOCK_OK, GTK_RESPONSE_OK);
|
||||
+
|
||||
+ elems = g_hash_table_size(request);
|
||||
+ table = gtk_table_new(elems+1, 2, FALSE);
|
||||
+ gtk_table_set_row_spacings(GTK_TABLE(table), 4);
|
||||
+ gtk_table_set_col_spacings(GTK_TABLE(table), 20);
|
||||
+ gtk_container_set_border_width(GTK_CONTAINER(table), 12);
|
||||
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table);
|
||||
+
|
||||
+ label = gtk_label_new(_("Please provide some network information:"));
|
||||
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
|
||||
+ gtk_table_attach(GTK_TABLE(table), label, 0, 2, 0, 1,
|
||||
+ GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
|
||||
+
|
||||
+ g_hash_table_iter_init (&iter, request);
|
||||
+ i=1;
|
||||
+ while (g_hash_table_iter_next (&iter, &key, &value)) {
|
||||
+ label = gtk_label_new((const char *)key);
|
||||
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
|
||||
+ gtk_table_attach(GTK_TABLE(table), label, 0, 1, i, i+1,
|
||||
+ GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
|
||||
+
|
||||
+ entry = gtk_entry_new();
|
||||
+ gtk_entry_set_max_length(GTK_ENTRY(entry), 64);
|
||||
+ gtk_entry_set_width_chars(GTK_ENTRY(entry), 16);
|
||||
+ gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
|
||||
+ gtk_table_attach(GTK_TABLE(table), entry, 1, 2, i, i+1,
|
||||
+ GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
|
||||
+ g_hash_table_insert(input->entries, g_strdup(key), entry);
|
||||
+
|
||||
+ i++;
|
||||
+ }
|
||||
+
|
||||
+ input_data_inst = input;
|
||||
+
|
||||
+ g_signal_connect(G_OBJECT(dialog), "response",
|
||||
+ G_CALLBACK(request_input_callback), input);
|
||||
+
|
||||
+ show_dialog(input, NULL);
|
||||
+}
|
||||
+
|
||||
+static void request_input(const char *service_id,
|
||||
+ GHashTable *request, gpointer request_data, gpointer user_data)
|
||||
+{
|
||||
+ request_input_dialog(request, request_data);
|
||||
+}
|
||||
+
|
||||
+static gboolean cancel_request(DBusGMethodInvocation *context,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ if( input_data_inst ) {
|
||||
+ connman_agent_request_input_abort(input_data_inst->request_data);
|
||||
+
|
||||
+ input_free(input_data_inst);
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+int setup_agents(void)
|
||||
+{
|
||||
+ ConnmanAgent *agent = connman_agent_new();
|
||||
+ connman_agent_setup(agent, "/org/gnome/connman/applet");
|
||||
+
|
||||
+ connman_agent_set_request_input_func(agent, request_input, agent);
|
||||
+ connman_agent_set_cancel_func(agent, cancel_request, agent);
|
||||
+
|
||||
+ connman_agent_register(agent);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void cleanup_agents(void)
|
||||
+{
|
||||
+}
|
||||
diff --git a/applet/agent.h b/applet/agent.h
|
||||
new file mode 100644
|
||||
index 0000000..d85676b
|
||||
--- /dev/null
|
||||
+++ b/applet/agent.h
|
||||
@@ -0,0 +1,29 @@
|
||||
+/*
|
||||
+ *
|
||||
+ * Connection Manager
|
||||
+ *
|
||||
+ * Agent implementation based on code from bluez-gnome
|
||||
+ *
|
||||
+ * Copyright (C) 2005-2008 Marcel Holtmann <marcel@holtmann.org>
|
||||
+ * Copyright (C) 2006-2007 Bastien Nocera <hadess@hadess.net>
|
||||
+ * Copyright (C) 2012 Intel Corporation
|
||||
+ *
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+int setup_agents(void);
|
||||
+void cleanup_agents(void);
|
||||
diff --git a/applet/main.c b/applet/main.c
|
||||
index 68a77b1..d06ce60 100644
|
||||
--- a/applet/main.c
|
||||
+++ b/applet/main.c
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "properties.h"
|
||||
#include "status.h"
|
||||
+#include "agent.h"
|
||||
|
||||
static gboolean global_ready = FALSE;
|
||||
static gint global_strength = -1;
|
||||
@@ -132,6 +133,7 @@ static void manager_init(DBusGConnection *connection)
|
||||
"/", "net.connman.Manager");
|
||||
|
||||
properties_create(manager, manager_property_changed, NULL);
|
||||
+ setup_agents();
|
||||
}
|
||||
|
||||
static void manager_cleanup(void)
|
||||
@@ -148,6 +150,7 @@ static void name_owner_changed(DBusGProxy *proxy, const char *name,
|
||||
if (*new != '\0') {
|
||||
status_offline();
|
||||
properties_enable(manager);
|
||||
+ setup_agents();
|
||||
} else {
|
||||
properties_disable(manager);
|
||||
status_unavailable();
|
||||
diff --git a/common/Makefile.am b/common/Makefile.am
|
||||
index ef1267a..5bfff19 100644
|
||||
--- a/common/Makefile.am
|
||||
+++ b/common/Makefile.am
|
||||
@@ -3,19 +3,21 @@ noinst_LIBRARIES = libcommon.a
|
||||
|
||||
libcommon_a_SOURCES = connman-dbus.c connman-dbus.h connman-dbus-glue.h \
|
||||
connman-client.h connman-client.c \
|
||||
- instance.h instance.c
|
||||
+ instance.h instance.c \
|
||||
+ connman-agent.h connman-agent.c
|
||||
|
||||
BUILT_SOURCES = marshal.h marshal.c \
|
||||
connman-dbus-glue.h \
|
||||
- instance-glue.h
|
||||
+ instance-glue.h \
|
||||
+ connman-agent-glue.h
|
||||
|
||||
-nodist_libcommon_a_SOURCES = connman-dbus-glue.h instance-glue.h
|
||||
+nodist_libcommon_a_SOURCES = connman-dbus-glue.h instance-glue.h connman-agent-glue.h
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
|
||||
AM_CFLAGS = @DBUS_CFLAGS@ @GTK_CFLAGS@
|
||||
|
||||
-EXTRA_DIST = marshal.list instance.xml connman-dbus.xml
|
||||
+EXTRA_DIST = marshal.list instance.xml connman-dbus.xml connman-agent.xml
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
@@ -30,3 +32,6 @@ instance-glue.h: instance.xml
|
||||
|
||||
connman-dbus-glue.h: connman-dbus.xml
|
||||
$(DBUS_BINDING_TOOL) --prefix=connman --mode=glib-client --output=$@ $<
|
||||
+
|
||||
+connman-agent-glue.h: connman-agent.xml
|
||||
+ $(DBUS_BINDING_TOOL) --prefix=connman_agent --mode=glib-server --output=$@ $<
|
||||
diff --git a/common/connman-agent.c b/common/connman-agent.c
|
||||
new file mode 100644
|
||||
index 0000000..769bf27
|
||||
--- /dev/null
|
||||
+++ b/common/connman-agent.c
|
||||
@@ -0,0 +1,426 @@
|
||||
+/*
|
||||
+ * Connection Manager Agent implementation
|
||||
+ *
|
||||
+ * Author(s):
|
||||
+ * - Julien MASSOT <jmassot@aldebaran-robotics.com>
|
||||
+ * - Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
+ *
|
||||
+ * Copyright (C) 2012 Aldebaran Robotics
|
||||
+ * Copyright (C) 2012 Intel Corporation
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License version 2.1 as published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ */
|
||||
+
|
||||
+#include <dbus/dbus-glib.h>
|
||||
+#include <dbus/dbus-glib-lowlevel.h>
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+#include "connman-agent.h"
|
||||
+#include "connman-dbus.h"
|
||||
+
|
||||
+#define CONNMAN_AGENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), \
|
||||
+ CONNMAN_TYPE_AGENT, ConnmanAgentPrivate))
|
||||
+
|
||||
+typedef enum {
|
||||
+ AGENT_ERROR_REJECT,
|
||||
+ AGENT_ERROR_RETRY
|
||||
+} AgentError;
|
||||
+
|
||||
+#define AGENT_ERROR (agent_error_quark())
|
||||
+
|
||||
+#define AGENT_ERROR_TYPE (agent_error_get_type())
|
||||
+
|
||||
+static GQuark agent_error_quark(void)
|
||||
+{
|
||||
+ static GQuark quark = 0;
|
||||
+ if (!quark)
|
||||
+ quark = g_quark_from_static_string("Agent");
|
||||
+
|
||||
+ return quark;
|
||||
+}
|
||||
+
|
||||
+#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
|
||||
+
|
||||
+static GType agent_error_get_type(void)
|
||||
+{
|
||||
+ static GType etype = 0;
|
||||
+ if (etype == 0) {
|
||||
+ static const GEnumValue values[] = {
|
||||
+ ENUM_ENTRY(AGENT_ERROR_REJECT, "Rejected"),
|
||||
+ ENUM_ENTRY(AGENT_ERROR_RETRY, "Retry"),
|
||||
+ { 0, 0, 0 }
|
||||
+ };
|
||||
+
|
||||
+ etype = g_enum_register_static("Agent", values);
|
||||
+ }
|
||||
+
|
||||
+ return etype;
|
||||
+}
|
||||
+
|
||||
+typedef struct _ConnmanAgentPrivate ConnmanAgentPrivate;
|
||||
+
|
||||
+typedef struct _PendingRequest PendingRequest;
|
||||
+
|
||||
+struct _PendingRequest {
|
||||
+ DBusGMethodInvocation *context;
|
||||
+ ConnmanAgent *agent;
|
||||
+};
|
||||
+
|
||||
+struct _ConnmanAgentPrivate {
|
||||
+ gchar *busname;
|
||||
+ gchar *path;
|
||||
+ DBusGConnection *connection;
|
||||
+ DBusGProxy *connman_proxy;
|
||||
+
|
||||
+ ConnmanAgentRequestInputFunc input_func;
|
||||
+ gpointer input_data;
|
||||
+
|
||||
+ ConnmanAgentCancelFunc cancel_func;
|
||||
+ gpointer cancel_data;
|
||||
+
|
||||
+ ConnmanAgentReleaseFunc release_func;
|
||||
+ gpointer release_data;
|
||||
+
|
||||
+ ConnmanAgentDebugFunc debug_func;
|
||||
+ gpointer debug_data;
|
||||
+
|
||||
+};
|
||||
+
|
||||
+G_DEFINE_TYPE(ConnmanAgent, connman_agent, G_TYPE_OBJECT)
|
||||
+
|
||||
+static inline void debug(ConnmanAgent *agent, const char *format, ...)
|
||||
+{
|
||||
+ char str[256];
|
||||
+ va_list ap;
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ if (priv->debug_func == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ va_start(ap, format);
|
||||
+
|
||||
+ if (vsnprintf(str, sizeof(str), format, ap) > 0)
|
||||
+ priv->debug_func(str, priv->debug_data);
|
||||
+
|
||||
+ va_end(ap);
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_request_input_set_reply(gpointer request_data, GHashTable *reply)
|
||||
+{
|
||||
+ PendingRequest *pendingrequest = request_data;
|
||||
+
|
||||
+ if (request_data == NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ dbus_g_method_return(pendingrequest->context, reply);
|
||||
+
|
||||
+ g_free(pendingrequest);
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_request_input_abort(gpointer request_data)
|
||||
+{
|
||||
+ PendingRequest *pendingrequest = request_data;
|
||||
+ GError *result;
|
||||
+ if (request_data == NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ result = g_error_new(AGENT_ERROR, AGENT_ERROR_REJECT,
|
||||
+ "Input request rejected");
|
||||
+ dbus_g_method_return_error(pendingrequest->context, result);
|
||||
+ g_clear_error(&result);
|
||||
+ g_free(pendingrequest);
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+static gboolean connman_agent_request_input_cb(const GHashTable *reply, gpointer user_data)
|
||||
+{
|
||||
+
|
||||
+ PendingRequest *pendingrequest = user_data;
|
||||
+
|
||||
+ dbus_g_method_return(pendingrequest->context, reply);
|
||||
+
|
||||
+ g_free(pendingrequest);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_report_error(ConnmanAgent *agent,
|
||||
+ const char *path, const char *error,
|
||||
+ DBusGMethodInvocation *context)
|
||||
+{
|
||||
+ GError *result;
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ debug(agent, "connection %s, reports an error: %s", path, error);
|
||||
+ result = g_error_new(AGENT_ERROR, AGENT_ERROR_RETRY,
|
||||
+ "Retry");
|
||||
+ dbus_g_method_return_error(context, result);
|
||||
+ g_clear_error(&result);
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_request_input(ConnmanAgent *agent,
|
||||
+ const char *path, GHashTable *fields,
|
||||
+ DBusGMethodInvocation *context)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+ const char *sender = dbus_g_method_get_sender(context);
|
||||
+ char *name = NULL, *type = NULL;
|
||||
+ char **id = NULL;
|
||||
+ PendingRequest *pendingrequest = NULL;
|
||||
+
|
||||
+ debug(agent, "request %s, sender %s", path, sender);
|
||||
+
|
||||
+ if (fields == NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ if (priv->input_func != NULL) {
|
||||
+ id = g_strsplit(path, "/net/connman/service/", 2);
|
||||
+ if (g_strv_length(id) == 2) {
|
||||
+ pendingrequest = g_try_new0(PendingRequest, 1);
|
||||
+ pendingrequest->context = context;
|
||||
+ pendingrequest->agent = agent;
|
||||
+ priv->input_func(id[1], fields, pendingrequest, priv->input_data);
|
||||
+ }
|
||||
+ g_strfreev(id);
|
||||
+ }
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_cancel(ConnmanAgent *agent,
|
||||
+ DBusGMethodInvocation *context)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+ const char *sender = dbus_g_method_get_sender(context);
|
||||
+ gboolean result = FALSE;
|
||||
+
|
||||
+ debug(agent, "Request Canceled %s", sender);
|
||||
+
|
||||
+ if (g_str_equal(sender, priv->busname) == FALSE)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ if (priv->cancel_func)
|
||||
+ result = priv->cancel_func(context, priv->cancel_data);
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_release(ConnmanAgent *agent,
|
||||
+ DBusGMethodInvocation *context)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+ const char *sender = dbus_g_method_get_sender(context);
|
||||
+
|
||||
+ debug(agent, "agent %p sender %s", agent, sender);
|
||||
+
|
||||
+ if (g_str_equal(sender, priv->busname) == FALSE)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ dbus_g_method_return(context);
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+#include "connman-agent-glue.h"
|
||||
+
|
||||
+static void connman_agent_init(ConnmanAgent *agent)
|
||||
+{
|
||||
+ debug(agent, "agent %p", agent);
|
||||
+}
|
||||
+
|
||||
+static void connman_agent_finalize(GObject *agent)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ if (priv->connman_proxy != NULL) {
|
||||
+ g_object_unref(priv->connman_proxy);
|
||||
+ }
|
||||
+
|
||||
+ g_free(priv->path);
|
||||
+ g_free(priv->busname);
|
||||
+ dbus_g_connection_unref(priv->connection);
|
||||
+
|
||||
+ G_OBJECT_CLASS(connman_agent_parent_class)->finalize(agent);
|
||||
+}
|
||||
+
|
||||
+static void connman_agent_class_init(ConnmanAgentClass *klass)
|
||||
+{
|
||||
+ GObjectClass *object_class = (GObjectClass *) klass;
|
||||
+
|
||||
+ g_type_class_add_private(klass, sizeof(ConnmanAgentPrivate));
|
||||
+
|
||||
+ object_class->finalize = connman_agent_finalize;
|
||||
+
|
||||
+ dbus_g_object_type_install_info(CONNMAN_TYPE_AGENT,
|
||||
+ &dbus_glib_connman_agent_object_info);
|
||||
+}
|
||||
+
|
||||
+ConnmanAgent *connman_agent_new(void)
|
||||
+{
|
||||
+ ConnmanAgent *agent;
|
||||
+ g_type_init();
|
||||
+
|
||||
+ agent = CONNMAN_AGENT(g_object_new(CONNMAN_TYPE_AGENT, NULL));
|
||||
+
|
||||
+ return agent;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_setup(ConnmanAgent *agent, const char *path)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+ DBusGProxy *proxy;
|
||||
+ GObject *object;
|
||||
+ GError *error = NULL;
|
||||
+
|
||||
+ debug(agent, "agent_setup %p", agent);
|
||||
+
|
||||
+ if (priv->path != NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ priv->path = g_strdup(path);
|
||||
+ priv->connection = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
|
||||
+ if (error != NULL) {
|
||||
+ g_printerr("Connecting to system bus failed: %s\n",
|
||||
+ error->message);
|
||||
+ g_error_free(error);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ proxy = dbus_g_proxy_new_for_name_owner(priv->connection, CONNMAN_SERVICE,
|
||||
+ CONNMAN_MANAGER_PATH, CONNMAN_MANAGER_INTERFACE, NULL);
|
||||
+
|
||||
+ g_free(priv->busname);
|
||||
+
|
||||
+ if (proxy != NULL) {
|
||||
+ priv->busname = g_strdup(dbus_g_proxy_get_bus_name(proxy));
|
||||
+ g_object_unref(proxy);
|
||||
+ } else
|
||||
+ priv->busname = NULL;
|
||||
+
|
||||
+ object = dbus_g_connection_lookup_g_object(priv->connection, priv->path);
|
||||
+ if (object != NULL)
|
||||
+ g_object_unref(object);
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+gboolean connman_agent_register(ConnmanAgent *agent)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+ DBusGProxy *proxy;
|
||||
+ GObject *object;
|
||||
+ GError *error = NULL;
|
||||
+ gchar *path;
|
||||
+
|
||||
+ debug(agent, "register agent %p", agent);
|
||||
+
|
||||
+ if (priv->connman_proxy != NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ priv->connman_proxy = dbus_g_proxy_new_for_name_owner(priv->connection, CONNMAN_SERVICE,
|
||||
+ CONNMAN_MANAGER_PATH, CONNMAN_MANAGER_INTERFACE, NULL);
|
||||
+
|
||||
+ g_free(priv->busname);
|
||||
+
|
||||
+ priv->busname = g_strdup(dbus_g_proxy_get_bus_name(priv->connman_proxy));
|
||||
+
|
||||
+ object = dbus_g_connection_lookup_g_object(priv->connection, priv->path);
|
||||
+ if (object != NULL)
|
||||
+ g_object_unref(object);
|
||||
+
|
||||
+ dbus_g_connection_register_g_object(priv->connection,
|
||||
+ priv->path, G_OBJECT(agent));
|
||||
+
|
||||
+ dbus_g_proxy_call(priv->connman_proxy, "RegisterAgent", &error,
|
||||
+ DBUS_TYPE_G_OBJECT_PATH, priv->path,
|
||||
+ G_TYPE_INVALID, G_TYPE_INVALID);
|
||||
+
|
||||
+ if (error != NULL) {
|
||||
+ g_printerr("Agent registration failed: %s\n",
|
||||
+ error->message);
|
||||
+ g_error_free(error);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_unregister(ConnmanAgent *agent)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+ GError *error = NULL;
|
||||
+
|
||||
+ debug(agent, "unregister agent %p", agent);
|
||||
+
|
||||
+ if (priv->connman_proxy == NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ dbus_g_proxy_call(priv->connman_proxy, "UnregisterAgent", &error,
|
||||
+ DBUS_TYPE_G_OBJECT_PATH, priv->path,
|
||||
+ G_TYPE_INVALID, G_TYPE_INVALID);
|
||||
+
|
||||
+ if (error != NULL) {
|
||||
+ g_printerr("Agent unregistration failed: %s\n",
|
||||
+ error->message);
|
||||
+ g_error_free(error);
|
||||
+ }
|
||||
+
|
||||
+ g_object_unref(priv->connman_proxy);
|
||||
+ priv->connman_proxy = NULL;
|
||||
+
|
||||
+ g_free(priv->path);
|
||||
+ priv->path = NULL;
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+void connman_agent_set_request_input_func(ConnmanAgent *agent,
|
||||
+ ConnmanAgentRequestInputFunc func, gpointer data)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ priv->input_func = func;
|
||||
+ priv->input_data = data;
|
||||
+}
|
||||
+
|
||||
+void connman_agent_set_cancel_func(ConnmanAgent *agent,
|
||||
+ ConnmanAgentCancelFunc func, gpointer data)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ priv->cancel_func = func;
|
||||
+ priv->cancel_data = data;
|
||||
+}
|
||||
+
|
||||
+void connman_agent_set_release_func(ConnmanAgent *agent,
|
||||
+ ConnmanAgentReleaseFunc func, gpointer data)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ priv->release_func = func;
|
||||
+ priv->release_data = data;
|
||||
+}
|
||||
+
|
||||
+void connman_agent_set_debug_func(ConnmanAgent *agent, ConnmanAgentDebugFunc func, gpointer data)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ priv->debug_func = func;
|
||||
+ priv->debug_data = data;
|
||||
+}
|
||||
diff --git a/common/connman-agent.h b/common/connman-agent.h
|
||||
new file mode 100644
|
||||
index 0000000..0a1aa92
|
||||
--- /dev/null
|
||||
+++ b/common/connman-agent.h
|
||||
@@ -0,0 +1,77 @@
|
||||
+/*
|
||||
+ * Connection Manager Agent implementation
|
||||
+ *
|
||||
+ * Author(s):
|
||||
+ * - Julien MASSOT <jmassot@aldebaran-robotics.com>
|
||||
+ * - Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
+ *
|
||||
+ * Copyright (C) 2012 Aldebaran Robotics
|
||||
+ * Copyright (C) 2012 Intel Corporation
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License version 2.1 as published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ */
|
||||
+
|
||||
+#ifndef CONNMAN_AGENT_H_
|
||||
+# define CONNMAN_AGENT_H_
|
||||
+
|
||||
+#include <glib-object.h>
|
||||
+#include <dbus/dbus-glib.h>
|
||||
+
|
||||
+G_BEGIN_DECLS
|
||||
+
|
||||
+#define CONNMAN_TYPE_AGENT (connman_agent_get_type())
|
||||
+#define CONNMAN_AGENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
+ CONNMAN_TYPE_AGENT, ConnmanAgent))
|
||||
+#define CONNMAN_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
+ CONNMAN_TYPE_AGENT, ConnmanAgentClass))
|
||||
+#define CONNMAN_IS_AGENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
|
||||
+ CONNMAN_TYPE_AGENT))
|
||||
+#define CONNMAN_IS_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \
|
||||
+ CONNMAN_TYPE_AGENT))
|
||||
+#define CONNMAN_GET_AGENT_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \
|
||||
+ CONNMAN_TYPE_AGENT, ConnmanAgentClass))
|
||||
+
|
||||
+typedef struct _ConnmanAgent ConnmanAgent;
|
||||
+typedef struct _ConnmanAgentClass ConnmanAgentClass;
|
||||
+
|
||||
+struct _ConnmanAgent {
|
||||
+ GObject parent;
|
||||
+};
|
||||
+
|
||||
+struct _ConnmanAgentClass {
|
||||
+ GObjectClass parent_class;
|
||||
+};
|
||||
+
|
||||
+GType connman_agent_get_type(void);
|
||||
+
|
||||
+ConnmanAgent *connman_agent_new(void);
|
||||
+
|
||||
+gboolean connman_agent_setup(ConnmanAgent *agent, const char *path);
|
||||
+
|
||||
+gboolean connman_agent_register(ConnmanAgent *agent);
|
||||
+gboolean connman_agent_unregister(ConnmanAgent *agent);
|
||||
+gboolean connman_agent_request_input_set_reply(gpointer request_data, GHashTable *reply);
|
||||
+gboolean connman_agent_request_input_abort(gpointer request_data);
|
||||
+
|
||||
+typedef void (*ConnmanAgentRequestInputFunc) (const char *service_id, GHashTable *request, gpointer request_data, gpointer user_data);
|
||||
+typedef gboolean (*ConnmanAgentCancelFunc) (DBusGMethodInvocation *context, gpointer data);
|
||||
+typedef gboolean (*ConnmanAgentReleaseFunc) (DBusGMethodInvocation *context, gpointer data);
|
||||
+typedef void (*ConnmanAgentDebugFunc) (const char *str, gpointer user_data);
|
||||
+
|
||||
+void connman_agent_set_request_input_func(ConnmanAgent *agent, ConnmanAgentRequestInputFunc func, gpointer data);
|
||||
+void connman_agent_set_cancel_func(ConnmanAgent *agent, ConnmanAgentCancelFunc func, gpointer data);
|
||||
+void connman_agent_set_debug_func(ConnmanAgent *agent, ConnmanAgentDebugFunc func, gpointer data);
|
||||
+
|
||||
+G_END_DECLS
|
||||
+#endif /* !CONNMAN_AGENT_H_ */
|
||||
diff --git a/common/connman-agent.xml b/common/connman-agent.xml
|
||||
new file mode 100644
|
||||
index 0000000..ed9ee8b
|
||||
--- /dev/null
|
||||
+++ b/common/connman-agent.xml
|
||||
@@ -0,0 +1,26 @@
|
||||
+<?xml version="1.0" encoding="UTF-8" ?>
|
||||
+
|
||||
+<node name="/net/connman/Agent">
|
||||
+ <interface name="net.connman.Agent">
|
||||
+ <method name="ReportError">
|
||||
+ <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
|
||||
+ <arg type="o" direction="in"/>
|
||||
+ <arg type="s" direction="in"/>
|
||||
+ </method>
|
||||
+
|
||||
+ <method name="RequestInput">
|
||||
+ <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
|
||||
+ <arg type="o" direction="in"/>
|
||||
+ <arg type="a{sv}" direction="in"/>
|
||||
+ <arg type="a{sv}" direction="out"/>
|
||||
+ </method>
|
||||
+
|
||||
+ <method name="Cancel">
|
||||
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
|
||||
+ </method>
|
||||
+
|
||||
+ <method name="Release">
|
||||
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
|
||||
+ </method>
|
||||
+ </interface>
|
||||
+</node>
|
||||
diff --git a/common/marshal.list b/common/marshal.list
|
||||
index 8b174d0..3c6317b 100644
|
||||
--- a/common/marshal.list
|
||||
+++ b/common/marshal.list
|
||||
@@ -1,3 +1,5 @@
|
||||
VOID:STRING,BOXED
|
||||
+VOID:OBJECT,BOXED
|
||||
+VOID:OBJECT
|
||||
VOID:BOXED
|
||||
VOID:STRING
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
From f24d6e26f81e205769cecf0dae7e6cf90b23f9e9 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f24d6e26f81e205769cecf0dae7e6cf90b23f9e9.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Sat, 14 Apr 2012 02:37:55 +0100
|
||||
Subject: [PATCH 5/6] Remove all handling of Passphrase property
|
||||
|
||||
Services no longer have a Passphrase property in ConnMan 0.79 -
|
||||
credentials are handled entirely through the agent.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
common/connman-client.c | 51 -----------------------------------------------
|
||||
common/connman-client.h | 4 ---
|
||||
common/connman-dbus.c | 11 +---------
|
||||
properties/advanced.h | 1 -
|
||||
properties/wifi.c | 48 --------------------------------------------
|
||||
5 files changed, 1 insertions(+), 114 deletions(-)
|
||||
|
||||
diff --git a/common/connman-client.c b/common/connman-client.c
|
||||
index e4441ad..dec9867 100644
|
||||
--- a/common/connman-client.c
|
||||
+++ b/common/connman-client.c
|
||||
@@ -112,7 +112,6 @@ static void connman_client_init(ConnmanClient *client)
|
||||
G_TYPE_BOOLEAN, /* favorite */
|
||||
G_TYPE_UINT, /* strength */
|
||||
G_TYPE_STRING, /* security */
|
||||
- G_TYPE_STRING, /* passphrase */
|
||||
G_TYPE_STRING, /* method */
|
||||
G_TYPE_STRING, /* address */
|
||||
G_TYPE_STRING, /* netmask */
|
||||
@@ -501,56 +500,6 @@ gchar *connman_client_get_security(ConnmanClient *client, const gchar *network)
|
||||
return security;
|
||||
}
|
||||
|
||||
-gchar *connman_client_get_passphrase(ConnmanClient *client, const gchar *network)
|
||||
-{
|
||||
- ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
- GtkTreeIter iter;
|
||||
- gchar *passphrase;
|
||||
-
|
||||
- DBG("client %p", client);
|
||||
-
|
||||
- if (network == NULL)
|
||||
- return NULL;
|
||||
-
|
||||
- if (connman_dbus_get_iter(priv->store, network, &iter) == FALSE)
|
||||
- return NULL;
|
||||
-
|
||||
- gtk_tree_model_get(GTK_TREE_MODEL(priv->store), &iter,
|
||||
- CONNMAN_COLUMN_PASSPHRASE, &passphrase, -1);
|
||||
-
|
||||
- return passphrase;
|
||||
-}
|
||||
-
|
||||
-gboolean connman_client_set_passphrase(ConnmanClient *client, const gchar *network,
|
||||
- const gchar *passphrase)
|
||||
-{
|
||||
- ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
- DBusGProxy *proxy;
|
||||
- GValue value = { 0 };
|
||||
- gboolean ret = FALSE;
|
||||
-
|
||||
- DBG("client %p", client);
|
||||
-
|
||||
- if (network == NULL)
|
||||
- goto done;
|
||||
-
|
||||
- proxy = connman_dbus_get_proxy(priv->store, network);
|
||||
- if (proxy == NULL)
|
||||
- goto done;
|
||||
-
|
||||
- g_value_init(&value, G_TYPE_STRING);
|
||||
- g_value_set_string(&value, passphrase);
|
||||
-
|
||||
- ret = connman_set_property(proxy, "Passphrase", &value, NULL);
|
||||
-
|
||||
- g_value_unset(&value);
|
||||
-
|
||||
- g_object_unref(proxy);
|
||||
-
|
||||
-done:
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
void connman_client_set_callback(ConnmanClient *client,
|
||||
ConnmanClientCallback callback, gpointer user_data)
|
||||
{
|
||||
diff --git a/common/connman-client.h b/common/connman-client.h
|
||||
index 6fe772c..bb36a2f 100644
|
||||
--- a/common/connman-client.h
|
||||
+++ b/common/connman-client.h
|
||||
@@ -77,9 +77,6 @@ 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);
|
||||
-gchar *connman_client_get_passphrase(ConnmanClient *client, const gchar *network);
|
||||
-gboolean connman_client_set_passphrase(ConnmanClient *client, const gchar *network,
|
||||
- const gchar *passphrase);
|
||||
void connman_client_set_remember(ConnmanClient *client, const gchar *network,
|
||||
gboolean remember);
|
||||
|
||||
@@ -108,7 +105,6 @@ enum {
|
||||
CONNMAN_COLUMN_FAVORITE, /* G_TYPE_BOOLEAN */
|
||||
CONNMAN_COLUMN_STRENGTH, /* G_TYPE_UINT */
|
||||
CONNMAN_COLUMN_SECURITY, /* G_TYPE_STRING */
|
||||
- CONNMAN_COLUMN_PASSPHRASE, /* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_METHOD, /* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_ADDRESS, /* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_NETMASK, /* G_TYPE_STRING */
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index 4eb77b6..f46a750 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -389,11 +389,6 @@ static void service_changed(DBusGProxy *proxy, const char *property,
|
||||
gtk_tree_store_set(store, &iter,
|
||||
CONNMAN_COLUMN_SECURITY, security,
|
||||
-1);
|
||||
- } else if (g_str_equal(property, "PassPhrase") == TRUE) {
|
||||
- const char *passphrase = value ? g_value_get_string(value) : NULL;
|
||||
- gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_PASSPHRASE, passphrase,
|
||||
- -1);
|
||||
} else if (g_str_equal(property, "Strength") == TRUE) {
|
||||
guint strength = g_value_get_uchar(value);
|
||||
gtk_tree_store_set(store, &iter,
|
||||
@@ -406,7 +401,7 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
{
|
||||
GtkTreeStore *store = user_data;
|
||||
GValue *value;
|
||||
- const gchar *name, *icon, *passphrase, *security, *state;
|
||||
+ const gchar *name, *icon, *security, *state;
|
||||
guint type, strength;
|
||||
gboolean favorite;
|
||||
GtkTreeIter iter;
|
||||
@@ -439,9 +434,6 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
value = g_hash_table_lookup(hash, "Security");
|
||||
security = value ? g_strjoinv(" ", g_value_get_boxed(value)) : NULL;
|
||||
|
||||
- value = g_hash_table_lookup(hash, "PassPhrase");
|
||||
- passphrase = value ? g_value_get_string(value) : NULL;
|
||||
-
|
||||
DBG("name %s type %d icon %s", name, type, icon);
|
||||
|
||||
value = g_hash_table_lookup(hash, "IPv4.Configuration");
|
||||
@@ -499,7 +491,6 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
CONNMAN_COLUMN_STATE, state,
|
||||
CONNMAN_COLUMN_FAVORITE, favorite,
|
||||
CONNMAN_COLUMN_SECURITY, security,
|
||||
- CONNMAN_COLUMN_PASSPHRASE, passphrase,
|
||||
CONNMAN_COLUMN_STRENGTH, strength,
|
||||
CONNMAN_COLUMN_METHOD, method,
|
||||
CONNMAN_COLUMN_ADDRESS, addr,
|
||||
diff --git a/properties/advanced.h b/properties/advanced.h
|
||||
index d8f4117..553a15e 100644
|
||||
--- a/properties/advanced.h
|
||||
+++ b/properties/advanced.h
|
||||
@@ -53,7 +53,6 @@ struct config_data {
|
||||
GtkWidget *name;
|
||||
GtkWidget *security;
|
||||
GtkWidget *strength;
|
||||
- GtkWidget *passphrase;
|
||||
GtkWidget *connect_info;
|
||||
GtkWidget *connect;
|
||||
GtkWidget *disconnect;
|
||||
diff --git a/properties/wifi.c b/properties/wifi.c
|
||||
index 038d35a..bd325ef 100644
|
||||
--- a/properties/wifi.c
|
||||
+++ b/properties/wifi.c
|
||||
@@ -57,17 +57,6 @@ static void connect_callback(GtkWidget *editable, gpointer user_data)
|
||||
gboolean ret;
|
||||
gint active;
|
||||
|
||||
- if (data->wifi.passphrase) {
|
||||
- char *passphrase;
|
||||
- passphrase = (gchar *)gtk_entry_get_text(GTK_ENTRY(data->wifi.passphrase));
|
||||
- ret = connman_client_set_passphrase(data->client, data->device,
|
||||
- passphrase);
|
||||
-
|
||||
- if (ret == FALSE) {
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
active = gtk_combo_box_get_active(GTK_COMBO_BOX(data->policy.config));
|
||||
data->ipv4_config.method = active ? "manual" : "dhcp";
|
||||
data->ipv4_config.address = active ? gtk_entry_get_text(GTK_ENTRY(data->ipv4.entry[0])) : NULL;
|
||||
@@ -250,22 +239,11 @@ static void wifi_ipconfig(GtkWidget *table, struct config_data *data, GtkTreeIte
|
||||
G_CALLBACK(changed_callback), data);
|
||||
}
|
||||
|
||||
-static void toggled_callback(GtkWidget *button, gpointer user_data)
|
||||
-{
|
||||
- GtkWidget *entry = user_data;
|
||||
- gboolean mode;
|
||||
-
|
||||
- mode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button));
|
||||
-
|
||||
- gtk_entry_set_visibility(GTK_ENTRY(entry), mode);
|
||||
-}
|
||||
-
|
||||
void add_wifi_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_data *data)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
- GtkWidget *entry;
|
||||
GtkWidget *button;
|
||||
|
||||
const char *name, *security, *icon, *state;
|
||||
@@ -308,32 +286,6 @@ void add_wifi_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_data
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
|
||||
data->wifi.security = label;
|
||||
|
||||
- label = gtk_label_new(_("Passphrase:"));
|
||||
- gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 2, 3);
|
||||
-
|
||||
- if (g_str_equal(security, "none") != TRUE &&
|
||||
- g_str_equal(security, "unknown") != TRUE) {
|
||||
- entry = gtk_entry_new();
|
||||
- gtk_entry_set_max_length (GTK_ENTRY (entry), 64);
|
||||
- gtk_table_attach_defaults(GTK_TABLE(table), entry, 2, 4, 2, 3);
|
||||
- gtk_entry_set_visibility(GTK_ENTRY(entry), 0);
|
||||
- data->wifi.passphrase = entry;
|
||||
-
|
||||
- button = gtk_check_button_new_with_label(_("Show input"));
|
||||
- gtk_table_attach_defaults(GTK_TABLE(table), button, 4, 5, 2, 3);
|
||||
-
|
||||
- g_signal_connect(G_OBJECT(button), "toggled",
|
||||
- G_CALLBACK(toggled_callback), entry);
|
||||
-
|
||||
-
|
||||
- } else {
|
||||
- label = gtk_label_new(_("none"));
|
||||
- gtk_table_attach_defaults(GTK_TABLE(table), label, 2, 4, 2, 3);
|
||||
- gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
|
||||
- gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
|
||||
- data->wifi.passphrase = NULL;
|
||||
- }
|
||||
-
|
||||
label = gtk_label_new(_(""));
|
||||
gtk_table_attach_defaults(GTK_TABLE(table), label, 2, 3, 8, 9);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From ce510179cba98c906974bdbd6bda2b586b6058c1 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ce510179cba98c906974bdbd6bda2b586b6058c1.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Sat, 14 Apr 2012 02:39:15 +0100
|
||||
Subject: [PATCH 6/6] Fix status descriptions in properties tree
|
||||
|
||||
* configurating -> configuring
|
||||
* connnected -> connected
|
||||
* Use i18n wrappers
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
properties/main.c | 6 +++---
|
||||
1 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/properties/main.c b/properties/main.c
|
||||
index e266f03..c05f443 100644
|
||||
--- a/properties/main.c
|
||||
+++ b/properties/main.c
|
||||
@@ -332,12 +332,12 @@ static void device_to_text(GtkTreeViewColumn *column, GtkCellRenderer *cell,
|
||||
/* Show the AP name */
|
||||
title = N_(name);
|
||||
if (g_str_equal(state, "association") == TRUE)
|
||||
- state = "associating...";
|
||||
+ state = _("associating...");
|
||||
else if (g_str_equal(state, "configuration") == TRUE)
|
||||
- state = "configurating...";
|
||||
+ state = _("configuring...");
|
||||
else if (g_str_equal(state, "ready") == TRUE ||
|
||||
g_str_equal(state, "online") == TRUE)
|
||||
- state = "connnected";
|
||||
+ state = _("connected");
|
||||
else
|
||||
state = "";
|
||||
markup = g_strdup_printf(" %s\n %s", title, state);
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 7225bf8e8e9bee42d7d7d02ba754b9fb30a877b6 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Mon, 16 Apr 2012 19:15:35 +0100
|
||||
Subject: [PATCH] connman-gnome: fix segfault due to unchecked null value
|
||||
|
||||
If value is NULL here we should not pass it to g_value_get_boxed().
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
common/connman-dbus.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index 33ac623..822fc98 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -437,7 +437,7 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
DBG("name %s type %d icon %s", name, type, icon);
|
||||
|
||||
value = g_hash_table_lookup(hash, "IPv4.Configuration");
|
||||
- ipv4 = g_value_get_boxed (value);
|
||||
+ ipv4 = value ? g_value_get_boxed (value) : NULL;
|
||||
|
||||
if (!ipv4)
|
||||
goto done;
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -1,507 +0,0 @@
|
||||
Upstream-Status: Pending
|
||||
|
||||
commit 15852e826b0b47f577718ada4b68b63515387f4d
|
||||
Author: dongxiao <dongxiao@dongxiao-osel.(none)>
|
||||
Date: Wed Jun 1 14:56:16 2011 +0800
|
||||
|
||||
connman-gnome: Add cellular network config option.
|
||||
|
||||
Add cellular network config option in connman-gnome.
|
||||
|
||||
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
|
||||
|
||||
diff --git a/common/connman-client.c b/common/connman-client.c
|
||||
index e907cc2..d6be363 100644
|
||||
--- a/common/connman-client.c
|
||||
+++ b/common/connman-client.c
|
||||
@@ -112,9 +112,10 @@ static void connman_client_init(ConnmanClient *client)
|
||||
G_TYPE_STRING, /* address */
|
||||
G_TYPE_STRING, /* netmask */
|
||||
G_TYPE_STRING, /* gateway */
|
||||
- G_TYPE_BOOLEAN, /* gateway */
|
||||
- G_TYPE_BOOLEAN, /* gateway */
|
||||
- G_TYPE_BOOLEAN);/* gateway */
|
||||
+ G_TYPE_BOOLEAN, /* ethernet enabled */
|
||||
+ G_TYPE_BOOLEAN, /* wifi enabled */
|
||||
+ G_TYPE_BOOLEAN, /* cellular enabled */
|
||||
+ G_TYPE_BOOLEAN);/* offline */
|
||||
|
||||
g_object_set_data(G_OBJECT(priv->store),
|
||||
"State", g_strdup("unavailable"));
|
||||
@@ -218,6 +219,7 @@ static gboolean device_filter(GtkTreeModel *model,
|
||||
switch (type) {
|
||||
case CONNMAN_TYPE_LABEL_ETHERNET:
|
||||
case CONNMAN_TYPE_LABEL_WIFI:
|
||||
+ case CONNMAN_TYPE_LABEL_CELLULAR:
|
||||
case CONNMAN_TYPE_SYSCONFIG:
|
||||
return TRUE;
|
||||
}
|
||||
diff --git a/common/connman-client.h b/common/connman-client.h
|
||||
index 37e86d0..15fa098 100644
|
||||
--- a/common/connman-client.h
|
||||
+++ b/common/connman-client.h
|
||||
@@ -117,6 +117,7 @@ enum {
|
||||
|
||||
CONNMAN_COLUMN_ETHERNET_ENABLED,/* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_WIFI_ENABLED, /* G_TYPE_STRING */
|
||||
+ CONNMAN_COLUMN_CELLULAR_ENABLED,/* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_OFFLINEMODE, /* G_TYPE_STRING */
|
||||
|
||||
_CONNMAN_NUM_COLUMNS
|
||||
@@ -132,6 +133,7 @@ enum {
|
||||
|
||||
CONNMAN_TYPE_LABEL_ETHERNET,
|
||||
CONNMAN_TYPE_LABEL_WIFI,
|
||||
+ CONNMAN_TYPE_LABEL_CELLULAR,
|
||||
CONNMAN_TYPE_SYSCONFIG,
|
||||
|
||||
_CONNMAN_NUM_TYPE,
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index b5a635c..0f4e1db 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -208,6 +208,8 @@ static const gchar *type2icon(guint type)
|
||||
case CONNMAN_TYPE_WIFI:
|
||||
case CONNMAN_TYPE_WIMAX:
|
||||
return "network-wireless";
|
||||
+ case CONNMAN_TYPE_CELLULAR:
|
||||
+ return "network-cellular";
|
||||
case CONNMAN_TYPE_BLUETOOTH:
|
||||
return "bluetooth";
|
||||
}
|
||||
@@ -220,6 +222,7 @@ static void enabled_technologies_changed(GtkTreeStore *store, GValue *value)
|
||||
GtkTreeIter iter;
|
||||
gboolean ethernet_enabled_prev, ethernet_enabled = FALSE;
|
||||
gboolean wifi_enabled_prev, wifi_enabled = FALSE;
|
||||
+ gboolean cellular_enabled_prev, cellular_enabled = FALSE;
|
||||
gchar **tech = g_value_get_boxed (value);
|
||||
guint i;
|
||||
|
||||
@@ -227,10 +230,13 @@ static void enabled_technologies_changed(GtkTreeStore *store, GValue *value)
|
||||
return;
|
||||
|
||||
for (i = 0; i < g_strv_length(tech); i++) {
|
||||
+ DBG("technology: %s", *(tech+i));
|
||||
if (g_str_equal("ethernet", *(tech + i)))
|
||||
ethernet_enabled = TRUE;
|
||||
else if (g_str_equal ("wifi", *(tech + i)))
|
||||
wifi_enabled = TRUE;
|
||||
+ else if (g_str_equal ("cellular", *(tech + i)))
|
||||
+ cellular_enabled = TRUE;
|
||||
}
|
||||
|
||||
get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_ETHERNET);
|
||||
@@ -246,6 +252,13 @@ static void enabled_technologies_changed(GtkTreeStore *store, GValue *value)
|
||||
if (wifi_enabled_prev != wifi_enabled)
|
||||
gtk_tree_store_set(store, &iter,
|
||||
CONNMAN_COLUMN_WIFI_ENABLED, wifi_enabled, -1);
|
||||
+
|
||||
+ get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_CELLULAR);
|
||||
+ gtk_tree_model_get(GTK_TREE_MODEL(store), &iter,
|
||||
+ CONNMAN_COLUMN_CELLULAR_ENABLED, &cellular_enabled_prev, -1);
|
||||
+ if (cellular_enabled_prev != cellular_enabled)
|
||||
+ gtk_tree_store_set(store, &iter,
|
||||
+ CONNMAN_COLUMN_CELLULAR_ENABLED, cellular_enabled, -1);
|
||||
}
|
||||
|
||||
static void enabled_technologies_properties(GtkTreeStore *store, DBusGProxy *proxy, GValue *value)
|
||||
@@ -253,14 +266,18 @@ static void enabled_technologies_properties(GtkTreeStore *store, DBusGProxy *pro
|
||||
GtkTreeIter iter;
|
||||
gboolean ethernet_enabled = FALSE;
|
||||
gboolean wifi_enabled = FALSE;
|
||||
+ gboolean cellular_enabled = FALSE;
|
||||
gchar **tech = g_value_get_boxed (value);
|
||||
guint i;
|
||||
|
||||
for (i = 0; i < g_strv_length (tech); i++) {
|
||||
+ DBG("technology: %s", *(tech+i));
|
||||
if (g_str_equal("ethernet", *(tech + i)))
|
||||
ethernet_enabled = TRUE;
|
||||
else if (g_str_equal ("wifi", *(tech + i)))
|
||||
wifi_enabled = TRUE;
|
||||
+ else if (g_str_equal ("cellular", *(tech + i)))
|
||||
+ cellular_enabled = TRUE;
|
||||
}
|
||||
|
||||
if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_ETHERNET) == FALSE)
|
||||
@@ -280,6 +297,15 @@ static void enabled_technologies_properties(GtkTreeStore *store, DBusGProxy *pro
|
||||
CONNMAN_COLUMN_WIFI_ENABLED, wifi_enabled,
|
||||
CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_WIFI,
|
||||
-1);
|
||||
+
|
||||
+ if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_CELLULAR) == FALSE)
|
||||
+ gtk_tree_store_append(store, &iter, NULL);
|
||||
+
|
||||
+ gtk_tree_store_set(store, &iter,
|
||||
+ CONNMAN_COLUMN_PROXY, proxy,
|
||||
+ CONNMAN_COLUMN_CELLULAR_ENABLED, cellular_enabled,
|
||||
+ CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_CELLULAR,
|
||||
+ -1);
|
||||
}
|
||||
|
||||
static void offline_mode_changed(GtkTreeStore *store, GValue *value)
|
||||
@@ -497,6 +523,9 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
case CONNMAN_TYPE_WIFI:
|
||||
label_type = CONNMAN_TYPE_LABEL_WIFI;
|
||||
break;
|
||||
+ case CONNMAN_TYPE_CELLULAR:
|
||||
+ label_type = CONNMAN_TYPE_LABEL_CELLULAR;
|
||||
+ break;
|
||||
default:
|
||||
label_type = CONNMAN_TYPE_UNKNOWN;
|
||||
break;
|
||||
diff --git a/icons/connman-type-cellular.png b/icons/connman-type-cellular.png
|
||||
new file mode 100644
|
||||
index 0000000..386abd5
|
||||
Binary files /dev/null and b/icons/connman-type-cellular.png differ
|
||||
diff --git a/properties/Makefile.am b/properties/Makefile.am
|
||||
index fc1b8c6..30ae442 100644
|
||||
--- a/properties/Makefile.am
|
||||
+++ b/properties/Makefile.am
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
bin_PROGRAMS = connman-properties
|
||||
|
||||
-connman_properties_SOURCES = main.c advanced.h ethernet.c wifi.c
|
||||
+connman_properties_SOURCES = main.c advanced.h ethernet.c wifi.c cellular.c
|
||||
|
||||
connman_properties_LDADD = $(top_builddir)/common/libcommon.a \
|
||||
@GTK_LIBS@ @DBUS_LIBS@
|
||||
diff --git a/properties/advanced.h b/properties/advanced.h
|
||||
index 79a1c3c..d8f4117 100644
|
||||
--- a/properties/advanced.h
|
||||
+++ b/properties/advanced.h
|
||||
@@ -59,10 +59,18 @@ struct config_data {
|
||||
GtkWidget *disconnect;
|
||||
} wifi;
|
||||
|
||||
+ struct {
|
||||
+ GtkWidget *name;
|
||||
+ GtkWidget *strength;
|
||||
+ GtkWidget *connect_info;
|
||||
+ GtkWidget *connect;
|
||||
+ GtkWidget *disconnect;
|
||||
+ } cellular;
|
||||
+
|
||||
GtkWidget *ethernet_button;
|
||||
GtkWidget *wifi_button;
|
||||
-
|
||||
GtkWidget *scan_button;
|
||||
+ GtkWidget *cellular_button;
|
||||
GtkWidget *offline_button;
|
||||
};
|
||||
|
||||
@@ -88,8 +96,11 @@ void update_ethernet_ipv4(struct config_data *data, guint policy);
|
||||
void add_wifi_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_data *data);
|
||||
void update_wifi_policy(struct config_data *data, guint policy);
|
||||
|
||||
+void add_cellular_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_data *data);
|
||||
void add_ethernet_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
struct config_data *data);
|
||||
|
||||
void add_wifi_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
struct config_data *data);
|
||||
+void add_cellular_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
+ struct config_data *data);
|
||||
diff --git a/properties/cellular.c b/properties/cellular.c
|
||||
new file mode 100644
|
||||
index 0000000..7bbfb89
|
||||
--- /dev/null
|
||||
+++ b/properties/cellular.c
|
||||
@@ -0,0 +1,175 @@
|
||||
+/*
|
||||
+ *
|
||||
+ * Connection Manager
|
||||
+ *
|
||||
+ * Copyright (C) 2011 Intel Corporation. All rights reserved.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#ifdef HAVE_CONFIG_H
|
||||
+#include <config.h>
|
||||
+#endif
|
||||
+
|
||||
+#include <dbus/dbus-glib.h>
|
||||
+#include <glib/gi18n.h>
|
||||
+#include <gtk/gtk.h>
|
||||
+
|
||||
+#include "connman-client.h"
|
||||
+
|
||||
+#include "advanced.h"
|
||||
+
|
||||
+static void connect_reply_cb(DBusGProxy *proxy, GError *error,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ if (error)
|
||||
+ g_error_free(error);
|
||||
+}
|
||||
+
|
||||
+static void connect_callback(GtkWidget *editable, gpointer user_data)
|
||||
+{
|
||||
+ struct config_data *data = user_data;
|
||||
+
|
||||
+ connman_client_connect_async(data->client, data->device, connect_reply_cb, data);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void disconnect_callback(GtkWidget *editable, gpointer user_data)
|
||||
+{
|
||||
+ struct config_data *data = user_data;
|
||||
+
|
||||
+ connman_client_disconnect(data->client, data->device);
|
||||
+}
|
||||
+
|
||||
+static void switch_callback(GtkWidget *editable, gpointer user_data)
|
||||
+{
|
||||
+ struct config_data *data = user_data;
|
||||
+ const gchar *label = gtk_button_get_label(GTK_BUTTON(data->cellular_button));
|
||||
+
|
||||
+ if (g_str_equal(label, "Disable"))
|
||||
+ connman_client_disable_technology(data->client, data->device, "cellular");
|
||||
+ else
|
||||
+ connman_client_enable_technology(data->client, data->device, "cellular");
|
||||
+}
|
||||
+
|
||||
+void add_cellular_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
+ struct config_data *data)
|
||||
+{
|
||||
+ GtkWidget *vbox;
|
||||
+ GtkWidget *table;
|
||||
+ GtkWidget *label;
|
||||
+ GtkWidget *buttonbox;
|
||||
+ GtkWidget *button;
|
||||
+ gboolean cellular_enabled;
|
||||
+
|
||||
+ gtk_tree_model_get(data->model, iter,
|
||||
+ CONNMAN_COLUMN_CELLULAR_ENABLED, &cellular_enabled,
|
||||
+ -1);
|
||||
+
|
||||
+ vbox = gtk_vbox_new(TRUE, 0);
|
||||
+ gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
|
||||
+ gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
|
||||
+
|
||||
+ table = gtk_table_new(1, 1, TRUE);
|
||||
+ gtk_table_set_row_spacings(GTK_TABLE(table), 10);
|
||||
+ gtk_table_set_col_spacings(GTK_TABLE(table), 10);
|
||||
+ gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
|
||||
+
|
||||
+ label = gtk_label_new(_("Configure Cellular Networks."));
|
||||
+ gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1);
|
||||
+
|
||||
+ buttonbox = gtk_hbutton_box_new();
|
||||
+ gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonbox), GTK_BUTTONBOX_CENTER);
|
||||
+ gtk_box_pack_start(GTK_BOX(mainbox), buttonbox, FALSE, FALSE, 0);
|
||||
+
|
||||
+ button = gtk_button_new();
|
||||
+ data->cellular_button = button;
|
||||
+
|
||||
+ if (cellular_enabled)
|
||||
+ gtk_button_set_label(GTK_BUTTON(button), _("Disable"));
|
||||
+ else
|
||||
+ gtk_button_set_label(GTK_BUTTON(button), _("Enable"));
|
||||
+
|
||||
+ gtk_container_add(GTK_CONTAINER(buttonbox), button);
|
||||
+ g_signal_connect(G_OBJECT(button), "clicked",
|
||||
+ G_CALLBACK(switch_callback), data);
|
||||
+}
|
||||
+
|
||||
+void add_cellular_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_data *data)
|
||||
+{
|
||||
+ GtkWidget *vbox;
|
||||
+ GtkWidget *table;
|
||||
+ GtkWidget *label;
|
||||
+ GtkWidget *button;
|
||||
+
|
||||
+ const char *name, *icon, *state;
|
||||
+ guint strength;
|
||||
+
|
||||
+ gtk_tree_model_get(data->model, iter,
|
||||
+ CONNMAN_COLUMN_NAME, &name,
|
||||
+ CONNMAN_COLUMN_ICON, &icon,
|
||||
+ CONNMAN_COLUMN_STATE, &state,
|
||||
+ CONNMAN_COLUMN_STRENGTH, &strength,
|
||||
+ -1);
|
||||
+
|
||||
+ if (g_str_equal(state, "failure") == TRUE)
|
||||
+ connman_client_remove(data->client, data->device);
|
||||
+
|
||||
+ vbox = gtk_vbox_new(TRUE, 0);
|
||||
+ gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
|
||||
+ gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
|
||||
+
|
||||
+ table = gtk_table_new(4, 8, TRUE);
|
||||
+ gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
|
||||
+ data->table = table;
|
||||
+
|
||||
+ label = gtk_label_new(_("Access Point:"));
|
||||
+ gtk_table_attach_defaults(GTK_TABLE(table), label, 3, 4, 0, 1);
|
||||
+
|
||||
+ label = gtk_label_new(_(name));
|
||||
+ gtk_table_attach_defaults(GTK_TABLE(table), label, 4, 5, 0, 1);
|
||||
+ gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
|
||||
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
|
||||
+ data->cellular.name = label;
|
||||
+
|
||||
+ label = gtk_label_new(_(""));
|
||||
+ gtk_table_attach_defaults(GTK_TABLE(table), label, 3, 5, 2, 3);
|
||||
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
|
||||
+ gtk_widget_hide(label);
|
||||
+ data->cellular.connect_info = label;
|
||||
+
|
||||
+ button = gtk_button_new_with_label(_("Connect"));
|
||||
+ gtk_table_attach_defaults(GTK_TABLE(table), button, 3, 5, 3, 4);
|
||||
+ g_signal_connect(G_OBJECT(button), "clicked",
|
||||
+ G_CALLBACK(connect_callback), data);
|
||||
+ gtk_widget_set_no_show_all(button, TRUE);
|
||||
+ data->cellular.connect = button;
|
||||
+
|
||||
+ button = gtk_button_new_with_label(_("Disconnect"));
|
||||
+ gtk_table_attach_defaults(GTK_TABLE(table), button, 3, 5, 3, 4);
|
||||
+ g_signal_connect(G_OBJECT(button), "clicked",
|
||||
+ G_CALLBACK(disconnect_callback), data);
|
||||
+ data->cellular.disconnect = button;
|
||||
+ gtk_widget_set_no_show_all(button, TRUE);
|
||||
+
|
||||
+ if (g_str_equal(state, "failure") == TRUE
|
||||
+ || g_str_equal(state, "idle") == TRUE) {
|
||||
+ gtk_widget_show(data->cellular.connect);
|
||||
+ gtk_widget_hide(data->cellular.disconnect);
|
||||
+ } else {
|
||||
+ gtk_widget_hide(data->cellular.connect);
|
||||
+ gtk_widget_show(data->cellular.disconnect);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/properties/main.c b/properties/main.c
|
||||
index a09c721..ec36aef 100644
|
||||
--- a/properties/main.c
|
||||
+++ b/properties/main.c
|
||||
@@ -42,6 +42,7 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
const char *name = NULL, *_name = NULL, *state = NULL;
|
||||
gboolean ethernet_enabled;
|
||||
gboolean wifi_enabled;
|
||||
+ gboolean cellular_enabled;
|
||||
gboolean offline_mode;
|
||||
|
||||
gtk_tree_model_get(model, iter,
|
||||
@@ -50,6 +51,7 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
CONNMAN_COLUMN_TYPE, &type,
|
||||
CONNMAN_COLUMN_ETHERNET_ENABLED, ðernet_enabled,
|
||||
CONNMAN_COLUMN_WIFI_ENABLED, &wifi_enabled,
|
||||
+ CONNMAN_COLUMN_CELLULAR_ENABLED, &cellular_enabled,
|
||||
CONNMAN_COLUMN_OFFLINEMODE, &offline_mode,
|
||||
-1);
|
||||
|
||||
@@ -75,6 +77,29 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
gtk_widget_hide(data->wifi.connect);
|
||||
gtk_widget_show(data->wifi.disconnect);
|
||||
}
|
||||
+ } else if (type == CONNMAN_TYPE_CELLULAR) {
|
||||
+ if (data->cellular.name)
|
||||
+ _name = gtk_label_get_text(GTK_LABEL(data->cellular.name));
|
||||
+
|
||||
+ if (!(name && _name && g_str_equal(name, _name)))
|
||||
+ return;
|
||||
+
|
||||
+ if (g_str_equal(state, "failure") == TRUE) {
|
||||
+ gtk_label_set_text(GTK_LABEL(data->cellular.connect_info),
|
||||
+ _("connection failed"));
|
||||
+ gtk_widget_show(data->cellular.connect_info);
|
||||
+ gtk_widget_show(data->cellular.connect);
|
||||
+ gtk_widget_hide(data->cellular.disconnect);
|
||||
+ } else if (g_str_equal(state, "idle") == TRUE) {
|
||||
+ gtk_widget_hide(data->cellular.connect_info);
|
||||
+ gtk_widget_show(data->cellular.connect);
|
||||
+ gtk_widget_hide(data->cellular.disconnect);
|
||||
+ } else {
|
||||
+ gtk_widget_hide(data->cellular.connect_info);
|
||||
+ gtk_widget_hide(data->cellular.connect);
|
||||
+ gtk_widget_show(data->cellular.disconnect);
|
||||
+ }
|
||||
+
|
||||
} else if (type == CONNMAN_TYPE_LABEL_ETHERNET) {
|
||||
if (!data->ethernet_button)
|
||||
return;
|
||||
@@ -92,6 +117,13 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
gtk_button_set_label(GTK_BUTTON(data->wifi_button), _("Enable"));
|
||||
gtk_widget_set_sensitive(data->scan_button, 0);
|
||||
}
|
||||
+ } else if (type == CONNMAN_TYPE_LABEL_CELLULAR) {
|
||||
+ if (!data->cellular_button)
|
||||
+ return;
|
||||
+ if (cellular_enabled)
|
||||
+ gtk_button_set_label(GTK_BUTTON(data->cellular_button), _("Disable"));
|
||||
+ else
|
||||
+ gtk_button_set_label(GTK_BUTTON(data->cellular_button), _("Enable"));
|
||||
} else if (type == CONNMAN_TYPE_SYSCONFIG) {
|
||||
if (!data->offline_button)
|
||||
return;
|
||||
@@ -100,7 +132,6 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
else
|
||||
gtk_button_set_label(GTK_BUTTON(data->offline_button), _("OfflineMode"));
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
static void set_offline_callback(GtkWidget *button, gpointer user_data)
|
||||
@@ -207,12 +238,18 @@ static struct config_data *create_config(GtkTreeModel *model,
|
||||
case CONNMAN_TYPE_WIFI:
|
||||
add_wifi_service(mainbox, iter, data);
|
||||
break;
|
||||
+ case CONNMAN_TYPE_CELLULAR:
|
||||
+ add_cellular_service(mainbox, iter, data);
|
||||
+ break;
|
||||
case CONNMAN_TYPE_LABEL_ETHERNET:
|
||||
add_ethernet_switch_button(mainbox, iter, data);
|
||||
break;
|
||||
case CONNMAN_TYPE_LABEL_WIFI:
|
||||
add_wifi_switch_button(mainbox, iter, data);
|
||||
break;
|
||||
+ case CONNMAN_TYPE_LABEL_CELLULAR:
|
||||
+ add_cellular_switch_button(mainbox, iter, data);
|
||||
+ break;
|
||||
case CONNMAN_TYPE_SYSCONFIG:
|
||||
add_system_config(mainbox, iter, data);
|
||||
break;
|
||||
@@ -295,6 +332,7 @@ static void device_to_text(GtkTreeViewColumn *column, GtkCellRenderer *cell,
|
||||
markup = g_strdup_printf(" %s\n", title);
|
||||
break;
|
||||
case CONNMAN_TYPE_WIFI:
|
||||
+ case CONNMAN_TYPE_CELLULAR:
|
||||
/* Show the AP name */
|
||||
title = N_(name);
|
||||
if (g_str_equal(state, "association") == TRUE)
|
||||
@@ -324,6 +362,10 @@ static void device_to_text(GtkTreeViewColumn *column, GtkCellRenderer *cell,
|
||||
title = N_("Wireless Networks");
|
||||
markup = g_strdup_printf("<b>\n%s\n</b>", title);
|
||||
break;
|
||||
+ case CONNMAN_TYPE_LABEL_CELLULAR:
|
||||
+ title = N_("Cellular Networks");
|
||||
+ markup = g_strdup_printf("<b>\n%s\n</b>", title);
|
||||
+ break;
|
||||
case CONNMAN_TYPE_SYSCONFIG:
|
||||
title = N_("System Configuration");
|
||||
markup = g_strdup_printf("<b>\n%s\n</b>", title);
|
||||
@@ -362,6 +404,10 @@ static void type_to_icon(GtkTreeViewColumn *column, GtkCellRenderer *cell,
|
||||
g_object_set(cell, "icon-name", "network-wireless",
|
||||
"stock-size", 4, NULL);
|
||||
break;
|
||||
+ case CONNMAN_TYPE_LABEL_CELLULAR:
|
||||
+ g_object_set(cell, "icon-name", "network-cellular",
|
||||
+ "stock-size", 4, NULL);
|
||||
+ break;
|
||||
default:
|
||||
g_object_set(cell, "icon-name", NULL, NULL);
|
||||
break;
|
||||
@@ -1,41 +0,0 @@
|
||||
From ec36df9d1fbb6dcbf0d1e79245ffe213049ecd5a Mon Sep 17 00:00:00 2001
|
||||
From: Dongxiao Xu <dongxiao.xu@intel.com>
|
||||
Date: Wed, 3 Aug 2011 14:33:07 +0800
|
||||
Subject: [PATCH] connman-dbus: fix security type mismatch
|
||||
|
||||
Latest connman change the Security type to be array{String}, fix
|
||||
connman-gnome accordingly.
|
||||
|
||||
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
|
||||
---
|
||||
common/connman-dbus.c | 5 +++--
|
||||
1 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index 0f4e1db..0ac8ed5 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -384,7 +384,8 @@ static void service_changed(DBusGProxy *proxy, const char *property,
|
||||
gtk_tree_store_set(store, &iter,
|
||||
CONNMAN_COLUMN_FAVORITE, favorite, -1);
|
||||
} else if (g_str_equal(property, "Security") == TRUE) {
|
||||
- const char *security = value ? g_value_get_string(value) : NULL;
|
||||
+ const char **array = value ? g_value_get_boxed(value) : NULL;
|
||||
+ const char *security = g_strjoinv(" ", array);
|
||||
gtk_tree_store_set(store, &iter,
|
||||
CONNMAN_COLUMN_SECURITY, security,
|
||||
-1);
|
||||
@@ -487,7 +488,7 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
strength = value ? g_value_get_uchar(value) : 0;
|
||||
|
||||
value = g_hash_table_lookup(hash, "Security");
|
||||
- security = value ? g_value_get_string(value) : NULL;
|
||||
+ security = value ? g_strjoinv(" ", g_value_get_boxed(value)) : NULL;
|
||||
|
||||
value = g_hash_table_lookup(hash, "PassPhrase");
|
||||
passphrase = value ? g_value_get_string(value) : NULL;
|
||||
--
|
||||
1.7.1
|
||||
|
||||
@@ -8,12 +8,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
|
||||
|
||||
DEPENDS = "gtk+ dbus"
|
||||
|
||||
PR = "r8"
|
||||
PR = "r10"
|
||||
|
||||
SRCREV = "78d3c39db6f3f7977b466305110faa8ca5f74ec8"
|
||||
SRC_URI = "git://github.com/connectivity/connman-gnome.git;protocol=git \
|
||||
file://3g.patch \
|
||||
file://security-type.patch"
|
||||
SRCREV = "42c652d123ea133d0a0930b96e8e39dbd0c597b5"
|
||||
SRC_URI = "git://git.kernel.org/pub/scm/network/connman/connman-gnome.git \
|
||||
file://0001-Monitor-the-Manager-s-State-property.patch \
|
||||
file://0002-Update-for-ConnMan-0.79-API-changes.patch \
|
||||
file://0003-Fix-setting-IPv4-configuration.patch \
|
||||
file://0004-Handle-WiFi-authentication-using-an-agent.patch \
|
||||
file://0005-Remove-all-handling-of-Passphrase-property.patch \
|
||||
file://0006-Fix-status-descriptions-in-properties-tree.patch \
|
||||
file://0007-connman-gnome-fix-segfault-due-to-unchecked-null-val.patch"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.gz \
|
||||
file://dropbear-0.53.1-static_build_fix.patch \
|
||||
file://configure.patch \
|
||||
file://fix-2kb-keys.patch \
|
||||
file://allow-nopw.patch;apply=no \
|
||||
${@base_contains("DISTRO_TYPE", "debug", "file://allow-nopw.patch", "",d)} \
|
||||
file://init \
|
||||
${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} "
|
||||
|
||||
@@ -40,15 +40,6 @@ EXTRA_OECONF += "\
|
||||
|
||||
DISTRO_TYPE ?= "${@base_contains("IMAGE_FEATURES", "debug-tweaks", "debug", "",d)}"
|
||||
|
||||
do_debug_patch() {
|
||||
if [ "${DISTRO_TYPE}" = "debug" ]; then
|
||||
bbnote "WARNING: applying allow-nopw.patch which allows password-less logins!"
|
||||
patch -p1 < ${WORKDIR}/allow-nopw.patch
|
||||
fi
|
||||
}
|
||||
|
||||
addtask do_debug_patch after do_patch before do_configure
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${sysconfdir} \
|
||||
${D}${sysconfdir}/init.d \
|
||||
|
||||
@@ -72,10 +72,17 @@ DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through
|
||||
|
||||
inherit libc-common multilib_header
|
||||
|
||||
PERLPATH = "${bindir}/env perl"
|
||||
PERLPATH_virtclass-nativesdk = "/usr/bin/env perl"
|
||||
|
||||
do_install_append () {
|
||||
rm -f ${D}${sysconfdir}/localtime
|
||||
|
||||
oe_multilib_header bits/syscall.h
|
||||
|
||||
if [ -f ${D}${bindir}/mtrace ]; then
|
||||
sed -i -e '1s,#!.*perl,#! ${PERLPATH},' -e '2s,exec.*perl,exec ${PERLPATH},' ${D}${bindir}/mtrace
|
||||
fi
|
||||
}
|
||||
|
||||
do_install_locale () {
|
||||
|
||||
@@ -3,7 +3,7 @@ require eglibc.inc
|
||||
SRCREV = "15508"
|
||||
|
||||
DEPENDS += "gperf-native"
|
||||
PR = "r23"
|
||||
PR = "r26"
|
||||
PR_append = "+svnr${SRCPV}"
|
||||
|
||||
EGLIBC_BRANCH="eglibc-2_13"
|
||||
@@ -141,7 +141,7 @@ do_fix_ia_headers() {
|
||||
cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/environments.h ${S}/sysdeps/unix/sysv/linux/i386/bits/environments.h
|
||||
cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h ${S}/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
|
||||
cp ${S}/sysdeps/x86_64/fpu/bits/fenv.h ${S}/sysdeps/i386/fpu/bits/fenv.h
|
||||
rm ${S}/sysdeps/i386/bits/huge_vall.h
|
||||
rm -f ${S}/sysdeps/i386/bits/huge_vall.h
|
||||
cp ${S}/sysdeps/x86_64/bits/link.h ${S}/sysdeps/i386/bits/link.h
|
||||
cp ${S}/sysdeps/x86_64/bits/mathdef.h ${S}/sysdeps/i386/bits/mathdef.h
|
||||
cp ${S}/sysdeps/x86_64/fpu/bits/mathinline.h ${S}/sysdeps/i386/fpu/bits/mathinline.h
|
||||
@@ -150,14 +150,14 @@ do_fix_ia_headers() {
|
||||
cp ${S}/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h ${S}/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
|
||||
cp ${S}/sysdeps/x86_64/bits/select.h ${S}/sysdeps/i386/bits/select.h
|
||||
cp ${S}/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h ${S}/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h
|
||||
rm ${S}/sysdeps/unix/sysv/linux/x86_64/bits/sem.h
|
||||
rm -f ${S}/sysdeps/unix/sysv/linux/x86_64/bits/sem.h
|
||||
cp ${S}/sysdeps/x86_64/bits/setjmp.h ${S}/sysdeps/i386/bits/setjmp.h
|
||||
cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/shm.h ${S}/sysdeps/unix/sysv/linux/i386/bits/shm.h
|
||||
cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h ${S}/sysdeps/unix/sysv/linux/i386/bits/sigcontext.h
|
||||
cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/stat.h ${S}/sysdeps/unix/sysv/linux/i386/bits/stat.h
|
||||
rm ${S}/sysdeps/i386/i486/bits/string.h ; cp ${S}/sysdeps/x86_64/bits/string.h ${S}/sysdeps/i386/bits/string.h
|
||||
rm -f ${S}/sysdeps/i386/i486/bits/string.h ; cp ${S}/sysdeps/x86_64/bits/string.h ${S}/sysdeps/i386/bits/string.h
|
||||
# Skip syscall.h, see do_install
|
||||
rm ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h
|
||||
rm -f ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h
|
||||
cp ${S}/sysdeps/x86_64/bits/wordsize.h ${S}/sysdeps/i386/bits/wordsize.h
|
||||
cp ${S}/sysdeps/x86_64/bits/xtitypes.h ${S}/sysdeps/i386/bits/xtitypes.h
|
||||
# i386 version is correct, x86_64 is incorrect for fpu_control.h
|
||||
|
||||
@@ -3,7 +3,7 @@ require eglibc.inc
|
||||
SRCREV = "17386"
|
||||
|
||||
DEPENDS += "gperf-native"
|
||||
PR = "r3"
|
||||
PR = "r6"
|
||||
PR_append = "+svnr${SRCPV}"
|
||||
|
||||
EGLIBC_BRANCH="eglibc-2_15"
|
||||
@@ -154,7 +154,7 @@ do_fix_ia_headers() {
|
||||
cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/environments.h ${S}/sysdeps/unix/sysv/linux/i386/bits/environments.h
|
||||
cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h ${S}/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
|
||||
cp ${S}/sysdeps/x86_64/fpu/bits/fenv.h ${S}/sysdeps/i386/fpu/bits/fenv.h
|
||||
rm ${S}/sysdeps/i386/bits/huge_vall.h
|
||||
rm -f ${S}/sysdeps/i386/bits/huge_vall.h
|
||||
cp ${S}/sysdeps/x86_64/bits/link.h ${S}/sysdeps/i386/bits/link.h
|
||||
cp ${S}/sysdeps/x86_64/bits/mathdef.h ${S}/sysdeps/i386/bits/mathdef.h
|
||||
cp ${S}/sysdeps/x86_64/fpu/bits/mathinline.h ${S}/sysdeps/i386/fpu/bits/mathinline.h
|
||||
@@ -163,14 +163,14 @@ do_fix_ia_headers() {
|
||||
cp ${S}/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h ${S}/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
|
||||
cp ${S}/sysdeps/x86_64/bits/select.h ${S}/sysdeps/i386/bits/select.h
|
||||
cp ${S}/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h ${S}/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h
|
||||
rm ${S}/sysdeps/unix/sysv/linux/x86_64/bits/sem.h
|
||||
rm -f ${S}/sysdeps/unix/sysv/linux/x86_64/bits/sem.h
|
||||
cp ${S}/sysdeps/x86_64/bits/setjmp.h ${S}/sysdeps/i386/bits/setjmp.h
|
||||
cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/shm.h ${S}/sysdeps/unix/sysv/linux/i386/bits/shm.h
|
||||
cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h ${S}/sysdeps/unix/sysv/linux/i386/bits/sigcontext.h
|
||||
cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/stat.h ${S}/sysdeps/unix/sysv/linux/i386/bits/stat.h
|
||||
rm ${S}/sysdeps/i386/i486/bits/string.h ; cp ${S}/sysdeps/x86_64/bits/string.h ${S}/sysdeps/i386/bits/string.h
|
||||
rm -f ${S}/sysdeps/i386/i486/bits/string.h ; cp ${S}/sysdeps/x86_64/bits/string.h ${S}/sysdeps/i386/bits/string.h
|
||||
# Skip syscall.h, see do_install
|
||||
rm ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h
|
||||
rm -f ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h
|
||||
cp ${S}/sysdeps/x86_64/bits/wordsize.h ${S}/sysdeps/i386/bits/wordsize.h
|
||||
cp ${S}/sysdeps/x86_64/bits/xtitypes.h ${S}/sysdeps/i386/bits/xtitypes.h
|
||||
# i386 version is correct, x86_64 is incorrect for fpu_control.h
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
DESCRIPTION = "Poky example feed configuration"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
PR = "r1"
|
||||
PR = "r2"
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
@@ -14,7 +14,7 @@ do_compile() {
|
||||
archconf=${S}/${sysconfdir}/opkg/arch.conf
|
||||
|
||||
rm -f $archconf
|
||||
ipkgarchs="${PACKAGE_ARCHS}"
|
||||
ipkgarchs="${ALL_MULTILIB_PACKAGE_ARCHS}"
|
||||
priority=1
|
||||
for arch in $ipkgarchs; do
|
||||
echo "arch $arch $priority" >> $archconf
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require glib.inc
|
||||
|
||||
PR = "r0"
|
||||
PR = "r1"
|
||||
PE = "1"
|
||||
|
||||
DEPENDS += "libffi python-argparse-native zlib"
|
||||
@@ -25,6 +25,10 @@ SRC_URI_append_libc-uclibc = " ${@['', 'file://no-iconv.patch']['${PN}' == '${BP
|
||||
SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch"
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
PERLPATH = "${bindir}/env perl"
|
||||
PERLPATH_virtclass-native = "/usr/bin/env perl"
|
||||
PERLPATH_virtclass-nativesdk = "/usr/bin/env perl"
|
||||
|
||||
do_configure_prepend() {
|
||||
# missing ${topdir}/gtk-doc.make and --disable-gtk-doc* is not enough, because it calls gtkdocize (not provided by gtk-doc-native)
|
||||
sed -i '/^docs/d' ${S}/configure.ac
|
||||
@@ -39,6 +43,12 @@ do_install_append() {
|
||||
# and empty dirs
|
||||
rmdir ${D}${libdir}/gio/modules/
|
||||
rmdir ${D}${libdir}/gio/
|
||||
|
||||
# Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
|
||||
# for target as /usr/bin/perl, so fix it to /usr/bin/perl.
|
||||
if [ -f ${D}${bindir}/glib-mkenums ]; then
|
||||
sed -i -e '1s,#!.*perl,#! ${PERLPATH},' ${D}${bindir}/glib-mkenums
|
||||
fi
|
||||
}
|
||||
|
||||
PACKAGES += "${PN}-codegen"
|
||||
|
||||
@@ -5,7 +5,7 @@ LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
|
||||
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
|
||||
PR = "r11"
|
||||
PR = "r12"
|
||||
|
||||
IMAGE_FEATURES += "x11-mini package-management"
|
||||
|
||||
@@ -19,7 +19,7 @@ IMAGE_FSTYPES = "vmdk"
|
||||
|
||||
inherit core-image
|
||||
|
||||
SRCREV = "8691a588267472eb5a32b978a0eb9ddfd0c91733"
|
||||
SRCREV = "729e7f774c0328688ebf6092ca0780633a357ce9"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;protocol=git"
|
||||
|
||||
IMAGE_CMD_ext3_append () {
|
||||
@@ -43,7 +43,6 @@ fakeroot do_populate_poky_src () {
|
||||
rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
|
||||
|
||||
echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
|
||||
echo "BB_NO_NETWORK = \"1\"" > ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
|
||||
echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
|
||||
mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
|
||||
echo "export PSEUDO_PREFIX=/usr" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
PROVIDES = "\
|
||||
linux-libc-headers \
|
||||
virtual/${TARGET_PREFIX}gcc \
|
||||
virtual/${TARGET_PREFIX}gcc-intermediate \
|
||||
virtual/${TARGET_PREFIX}gcc-initial \
|
||||
virtual/${TARGET_PREFIX}binutils \
|
||||
virtual/${TARGET_PREFIX}libc-for-gcc \
|
||||
virtual/libc \
|
||||
virtual/libintl \
|
||||
virtual/libiconv \
|
||||
virtual/linux-libc-headers "
|
||||
RPROVIDES = "glibc-utils libsegfault glibc-thread-db libgcc-dev libstdc++-dev libstdc++"
|
||||
PACKAGES_DYNAMIC = "glibc-gconv-*"
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
PR = "r1"
|
||||
|
||||
# License applies to this recipe code, not the toolchain itself
|
||||
LICENSE = "MIT"
|
||||
|
||||
do_install() {
|
||||
if [ ! -e ${prefix}/environment-setup ]; then
|
||||
echo "The Poky toolchain could not be found in ${prefix}!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
install -d ${DEPLOY_DIR}/ipk/
|
||||
install -d ${STAGING_DIR}/pkgdata/
|
||||
install -d ${STAGING_DIR_TARGET}/shlibs/
|
||||
install -d ${STAGING_DIR_TARGET}/${base_libdir}/
|
||||
install -d ${STAGING_DIR_TARGET}/${libdir}/
|
||||
install -d ${STAGING_DIR_TARGET}/${includedir}/
|
||||
|
||||
cp -ar ${prefix}/ipk/* ${DEPLOY_DIR}/ipk/
|
||||
cp -ar ${prefix}/pkgdata/* ${STAGING_DIR}/pkgdata/
|
||||
cp -ar ${prefix}/${TARGET_SYS}/shlibs/* ${STAGING_DIR_TARGET}/shlibs/
|
||||
cp -ar ${prefix}/${TARGET_SYS}/lib/* ${STAGING_DIR_TARGET}/${base_libdir}/
|
||||
cp -ar ${prefix}/${TARGET_SYS}/usr/include/* ${STAGING_DIR_TARGET}/${includedir}/
|
||||
cp -ar ${prefix}/${TARGET_SYS}/usr/lib/* ${STAGING_DIR_TARGET}/${libdir}/
|
||||
}
|
||||
|
||||
@@ -21,6 +21,9 @@ do_populate_sysroot[noexec] = "1"
|
||||
do_package_index[nostamp] = "1"
|
||||
do_package_index[depends] += "${PACKAGEINDEXDEPS}"
|
||||
|
||||
# Force NATIVE python to use modules from STAGING_DIR_NATIVE
|
||||
export PYTHONHOME = "${STAGING_DIR_NATIVE}/usr"
|
||||
|
||||
do_package_index() {
|
||||
set -ex
|
||||
${PACKAGEINDEXES}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
DESCRIPTION = "Create Basic Image Tasks"
|
||||
PR = "r9"
|
||||
PR = "r10"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
|
||||
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
@@ -44,6 +44,7 @@ RDEPENDS_task-self-hosted-host-tools = "\
|
||||
kernel-module-iptable-nat \
|
||||
kernel-module-iptable-mangle \
|
||||
kernel-module-iptable-filter \
|
||||
lsb \
|
||||
mc \
|
||||
parted \
|
||||
pseudo \
|
||||
|
||||
@@ -17,6 +17,20 @@ SRC_URI = "${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.bz2 \
|
||||
|
||||
inherit autotools
|
||||
|
||||
PERLPATH = "${bindir}/perl"
|
||||
PERLPATH_virtclass-native = "/usr/bin/perl"
|
||||
PERLPATH_virtclass-nativesdk = "/usr/bin/perl"
|
||||
|
||||
do_install_append() {
|
||||
rm -rf ${D}${datadir}/emacs
|
||||
rm -rf ${D}${datadir}/emacs
|
||||
|
||||
# Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
|
||||
# for target as /usr/bin/perl, so fix it to /usr/bin/perl.
|
||||
for i in autoheader autom4te autoreconf autoscan autoupdate ifnames; do
|
||||
if [ -f ${D}${bindir}/$i ]; then
|
||||
sed -i -e '1s,#!.*perl,#! ${PERLPATH},' \
|
||||
-e 's,exec .*/bin/perl \(.*\) exec .*/bin/perl \(.*\),exec ${PERLPATH} \1 exec ${PERLPATH} \2,' \
|
||||
${D}${bindir}/$i
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require autoconf.inc
|
||||
|
||||
PR = "r6"
|
||||
PR = "r7"
|
||||
|
||||
PARALLEL_MAKE = ""
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz"
|
||||
SRC_URI[md5sum] = "6c6671b76021fb30dd43b0d5fdb7180b"
|
||||
SRC_URI[sha256sum] = "37e885d6c8a58f33ab198d38bb972fa4c14236f951d628161dde6e20527d0df2"
|
||||
|
||||
PR = "r1"
|
||||
PR = "r2"
|
||||
|
||||
DEPENDS = "guile-native libtool-native libxml2-native"
|
||||
RDEPENDS = "automake pkgconfig"
|
||||
@@ -22,3 +22,14 @@ inherit autotools native
|
||||
|
||||
# Following line will be needed for the non-native target recipe.
|
||||
#CFLAGS += "-L${STAGING_LIBDIR} -lguile-2.0 -lgc -pthread -I${STAGING_INCDIR}/guile/2.0 -I${STAGING_INCDIR}"
|
||||
|
||||
# autogen-native links against libguile which may have been relocated with sstate
|
||||
# these environment variables ensure there isn't a relocation issue
|
||||
export GUILE_LOAD_PATH = "${STAGING_DATADIR_NATIVE}/guile/2.0"
|
||||
export GUILE_LOAD_COMPILED_PATH = "${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache"
|
||||
|
||||
do_install_append () {
|
||||
create_wrapper ${D}/${bindir}/autogen \
|
||||
GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
|
||||
GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
|
||||
}
|
||||
|
||||
@@ -34,19 +34,33 @@ PATHFIXPATCH = "file://path_prog_fixes.patch"
|
||||
PATHFIXPATCH_virtclass-native = ""
|
||||
PATHFIXPATCH_virtclass-nativesdk = ""
|
||||
|
||||
PERLPATH = "${bindir}/perl"
|
||||
PERLPATH_virtclass-native = "/usr/bin/perl"
|
||||
PERLPATH_virtclass-nativesdk = "/usr/bin/perl"
|
||||
|
||||
SRC_URI += "${PATHFIXPATCH} \
|
||||
file://prefer-cpio-over-pax-for-ustar-archives.patch \
|
||||
file://python-libdir.patch \
|
||||
file://automake_1.11.2_fix_for_pkglibexec_SCRIPTS.patch \
|
||||
file://py-compile-compile-only-optimized-byte-code.patch"
|
||||
|
||||
PR = "r2"
|
||||
PR = "r3"
|
||||
SRC_URI[md5sum] = "18194e804d415767bae8f703c963d456"
|
||||
SRC_URI[sha256sum] = "4f46d1f9380c8a3506280750f630e9fc915cb1a435b724be56b499d016368718"
|
||||
|
||||
do_install () {
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
install -d ${D}${datadir}
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
install -d ${D}${datadir}
|
||||
|
||||
# Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
|
||||
# for target as /usr/bin/perl, so fix it to /usr/bin/perl.
|
||||
for i in aclocal aclocal-1.11 automake automake-1.11; do
|
||||
if [ -f ${D}${bindir}/$i ]; then
|
||||
sed -i -e '1s,#!.*perl,#! ${PERLPATH},' \
|
||||
-e 's,exec .*/bin/perl \(.*\) exec .*/bin/perl \(.*\),exec ${PERLPATH} \1 exec ${PERLPATH} \2,' \
|
||||
${D}${bindir}/$i
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
@@ -21,16 +21,17 @@ inherit autotools native
|
||||
|
||||
do_configure_prepend() {
|
||||
# Fix hard-coded references to /etc/sgml
|
||||
if [ ! -e ${WORKDIR}/.sed_done ]; then
|
||||
if [ ! -e ${S}/.sed_done ]; then
|
||||
sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" bin/jw.in
|
||||
sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" doc/man/Makefile.am
|
||||
sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" doc/HTML/Makefile.am
|
||||
|
||||
# Point jw to the native sysroot catalog
|
||||
sed -i -e 's|^SGML_EXTRA_CATALOGS=""|SGML_EXTRA_CATALOGS=":${sysconfdir}/sgml/catalog"|g' bin/jw.in
|
||||
touch ${WORKDIR}/.sed_done
|
||||
touch ${S}/.sed_done
|
||||
fi
|
||||
}
|
||||
do_unpack[cleandirs] += "${S}"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
|
||||
59
meta/recipes-devtools/flex/flex/avoid-FORTIFY-warnings.patch
Normal file
59
meta/recipes-devtools/flex/flex/avoid-FORTIFY-warnings.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
Wrap ECHO macro to avoid FORTIFY warnings
|
||||
|
||||
This change will enable flex scanners to be compiled with
|
||||
-D_FORTIFY_SOURCE=2.
|
||||
|
||||
Signed-off-by: Manoj Srivastava <srivasta@debian.org>
|
||||
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
||||
|
||||
Origin: Cherry picked from Debian
|
||||
Upstream-Status: Pending
|
||||
|
||||
---
|
||||
flex.skl | 2 +-
|
||||
scan.c | 2 +-
|
||||
skel.c | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/flex.skl b/flex.skl
|
||||
index 6ebf2fd..eaa355e 100644
|
||||
--- a/flex.skl
|
||||
+++ b/flex.skl
|
||||
@@ -1074,7 +1074,7 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
|
||||
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||
* we now use fwrite().
|
||||
*/
|
||||
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
|
||||
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
|
||||
%endif
|
||||
%if-c++-only C++ definition
|
||||
#define ECHO LexerOutput( yytext, yyleng )
|
||||
diff --git a/scan.c b/scan.c
|
||||
index d7f5db3..1a079bf 100644
|
||||
--- a/scan.c
|
||||
+++ b/scan.c
|
||||
@@ -2093,7 +2093,7 @@ static int input (void );
|
||||
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||
* we now use fwrite().
|
||||
*/
|
||||
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
|
||||
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
|
||||
#endif
|
||||
|
||||
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
||||
diff --git a/skel.c b/skel.c
|
||||
index ee9f6ef..b8a2b4b 100644
|
||||
--- a/skel.c
|
||||
+++ b/skel.c
|
||||
@@ -1141,7 +1141,7 @@ const char *skel[] = {
|
||||
"/* This used to be an fputs(), but since the string might contain NUL's,",
|
||||
" * we now use fwrite().",
|
||||
" */",
|
||||
- "#define ECHO fwrite( yytext, yyleng, 1, yyout )",
|
||||
+ "#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)",
|
||||
"%endif",
|
||||
"%if-c++-only C++ definition",
|
||||
"#define ECHO LexerOutput( yytext, yyleng )",
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
int is not the same size as size_t.
|
||||
|
||||
Signed-off-by: Manoj Srivastava <srivasta@debian.org>
|
||||
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
||||
|
||||
Origin: Cherry picked from Debian
|
||||
Upstream-Status: Pending
|
||||
|
||||
---
|
||||
gen.c | 2 +-
|
||||
scan.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gen.c b/gen.c
|
||||
index 848e2c5..5a5daef 100644
|
||||
--- a/gen.c
|
||||
+++ b/gen.c
|
||||
@@ -1890,7 +1890,7 @@ void make_tables ()
|
||||
outn ("\tif ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \\");
|
||||
outn ("\t\t{ \\");
|
||||
outn ("\t\tint c = '*'; \\");
|
||||
- outn ("\t\tint n; \\");
|
||||
+ outn ("\t\tsize_t n; \\");
|
||||
outn ("\t\tfor ( n = 0; n < max_size && \\");
|
||||
outn ("\t\t\t (c = getc( yyin )) != EOF && c != '\\n'; ++n ) \\");
|
||||
outn ("\t\t\tbuf[n] = (char) c; \\");
|
||||
diff --git a/scan.c b/scan.c
|
||||
index 44559b6..15e2058 100644
|
||||
--- a/scan.c
|
||||
+++ b/scan.c
|
||||
@@ -2105,7 +2105,7 @@ static int input (void );
|
||||
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
||||
{ \
|
||||
int c = '*'; \
|
||||
- int n; \
|
||||
+ size_t n; \
|
||||
for ( n = 0; n < max_size && \
|
||||
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
||||
buf[n] = (char) c; \
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
require flex.inc
|
||||
PR = "r2"
|
||||
PR = "r3"
|
||||
LICENSE="BSD"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067"
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
SRC_URI += "file://avoid-FORTIFY-warnings.patch \
|
||||
file://int-is-not-the-same-size-as-size_t.patch"
|
||||
|
||||
SRC_URI[md5sum] = "10714e50cea54dc7a227e3eddcd44d57"
|
||||
SRC_URI[sha256sum] = "0becbd4b2b36b99c67f8c22ab98f7f80c9860aec70f0350a0018f29a88704e7b"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require gcc-common.inc
|
||||
|
||||
PR = "r24"
|
||||
PR = "r25"
|
||||
|
||||
# Third digit in PV should be incremented after a minor release
|
||||
# happens from this branch on gcc e.g. currently its 4.6.0
|
||||
@@ -73,6 +73,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
|
||||
file://gcc-arm-set-cost.patch \
|
||||
file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \
|
||||
file://fortran-cross-compile-hack.patch \
|
||||
file://cpp-honour-sysroot.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch "
|
||||
|
||||
40
meta/recipes-devtools/gcc/gcc-4.6/cpp-honour-sysroot.patch
Normal file
40
meta/recipes-devtools/gcc/gcc-4.6/cpp-honour-sysroot.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
|
||||
preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
|
||||
rather than the --sysroot option specified on the commandline. If access to that directory is
|
||||
permission denied (unreadable), gcc will error.
|
||||
|
||||
This happens when ccache is in use due to the fact it uses preprocessed source files.
|
||||
|
||||
The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
|
||||
-isystem, -isysroot happen and the correct sysroot is used.
|
||||
|
||||
[YOCTO #2074]
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
RP 2012/04/13
|
||||
|
||||
Index: gcc-4_6-branch/gcc/gcc.c
|
||||
===================================================================
|
||||
--- gcc-4_6-branch.orig/gcc/gcc.c 2012-04-13 12:24:37.939671140 +0000
|
||||
+++ gcc-4_6-branch/gcc/gcc.c 2012-04-13 12:24:54.439670688 +0000
|
||||
@@ -953,7 +953,7 @@
|
||||
%W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0},
|
||||
{".i", "@cpp-output", 0, 0, 0},
|
||||
{"@cpp-output",
|
||||
- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
|
||||
+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
|
||||
{".s", "@assembler", 0, 0, 0},
|
||||
{"@assembler",
|
||||
"%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
|
||||
Index: gcc-4_6-branch/gcc/cp/lang-specs.h
|
||||
===================================================================
|
||||
--- gcc-4_6-branch.orig/gcc/cp/lang-specs.h 2012-04-13 12:25:01.019670594 +0000
|
||||
+++ gcc-4_6-branch/gcc/cp/lang-specs.h 2012-04-13 12:25:07.567670180 +0000
|
||||
@@ -64,5 +64,5 @@
|
||||
{".ii", "@c++-cpp-output", 0, 0, 0},
|
||||
{"@c++-cpp-output",
|
||||
"%{!M:%{!MM:%{!E:\
|
||||
- cc1plus -fpreprocessed %i %(cc1_options) %2\
|
||||
+ cc1plus -fpreprocessed %i %I %(cc1_options) %2\
|
||||
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
|
||||
@@ -107,6 +107,10 @@ do_configure () {
|
||||
export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
|
||||
export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
|
||||
export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}"
|
||||
# We need to set this else there is cross-compilation badness
|
||||
# in the config.log files (which might not get generated until do_compile
|
||||
# hence being missed by the insane do_configure check).
|
||||
export gcc_cv_collect2_libs="none required"
|
||||
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
|
||||
|
||||
oe_runconf
|
||||
|
||||
@@ -24,7 +24,7 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.gz \
|
||||
SRC_URI[md5sum] = "3b8b4e1083037f29d2c4704a6d55f2a8"
|
||||
SRC_URI[sha256sum] = "a53b21159befe3e89bbaca71e9e62cf00af0f49fcca297c407944b988d59eb08"
|
||||
|
||||
PR = "r4"
|
||||
PR = "r5"
|
||||
|
||||
inherit autotools gettext
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -58,9 +58,11 @@ do_install_append_virtclass-native() {
|
||||
install -m 0755 ${D}${bindir}/guile ${D}${bindir}/${HOST_SYS}-guile
|
||||
|
||||
create_wrapper ${D}/${bindir}/guile \
|
||||
GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0
|
||||
GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
|
||||
GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
|
||||
create_wrapper ${D}${bindir}/${HOST_SYS}-guile
|
||||
GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0
|
||||
GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
|
||||
GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
|
||||
}
|
||||
|
||||
SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
include <unistd.h> to fix build on gcc 4.7
|
||||
|
||||
Many of the standard C++ library include files have been edited to no
|
||||
longer include <unistd.h> to remove namespace pollution in gcc 4.7, so
|
||||
we need include <unistd.h> manually sometimes.
|
||||
|
||||
mklibs (0.1.33+nmu1) UNRELEASED; urgency=low
|
||||
* Non-maintainer upload
|
||||
* Fix FTBFS with gcc 4.7 due to missing <unistd.h> include (Closes: #667282).
|
||||
|
||||
-- Cyril Brulebois <kibi@debian.org> Thu, 05 Apr 2012 00:15:27 +0000
|
||||
|
||||
mklibs (0.1.33) unstable; urgency=low
|
||||
|
||||
* Adjust the libc_pic directory for multiarch as well.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
||||
|
||||
[Added upstream information about patch]
|
||||
|
||||
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
||||
|
||||
---
|
||||
src/mklibs-readelf/elf.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/mklibs-readelf/elf.cpp b/src/mklibs-readelf/elf.cpp
|
||||
index 444f330..654c46f 100644
|
||||
--- a/src/mklibs-readelf/elf.cpp
|
||||
+++ b/src/mklibs-readelf/elf.cpp
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
using namespace Elf;
|
||||
|
||||
--
|
||||
1.7.10
|
||||
|
||||
@@ -5,11 +5,12 @@ LICENSE = "GPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://debian/copyright;md5=98d31037b13d896e33890738ef01af64"
|
||||
DEPENDS = "python-native"
|
||||
|
||||
PR = "r0"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "http://ftp.de.debian.org/debian/pool/main/m/mklibs/${BPN}_${PV}.tar.gz \
|
||||
file://ac_init_fix.patch\
|
||||
file://fix_STT_GNU_IFUNC.patch\
|
||||
file://include-unistd.h-for-gcc47.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "a462d9b802164993d247c1193116d78b"
|
||||
|
||||
@@ -6,9 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
|
||||
file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
|
||||
RDEPENDS_${PN} = "python"
|
||||
RDEPENDS_${PN}_virtclass-native = ""
|
||||
SRCREV = "002d29bc605d7c2d02e4cf20a43c5277c15f5597"
|
||||
SRCREV = "16665959c330b5958c0f0f4624a9ca7f823f98de"
|
||||
PV = "0.1.8+git${SRCPV}"
|
||||
PR = "r0"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "git://git.yoctoproject.org/opkg-utils;protocol=git \
|
||||
file://index-ignore-filenotfound.patch \
|
||||
|
||||
@@ -2,6 +2,7 @@ DESCRIPTION = "Base configuration files for opkg"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
PR = "r1"
|
||||
|
||||
do_compile() {
|
||||
mkdir -p ${S}/${sysconfdir}/opkg/
|
||||
@@ -9,12 +10,7 @@ do_compile() {
|
||||
archconf=${S}/${sysconfdir}/opkg/arch.conf
|
||||
|
||||
rm -f $archconf
|
||||
multilibs="${@d.getVar('MULTILIBS',True)}"
|
||||
if [ "X${multilibs}" == "XNone" ]; then
|
||||
ipkgarchs="${PACKAGE_ARCHS}"
|
||||
else
|
||||
ipkgarchs="${ALL_MULTILIB_PACKAGE_ARCHS}"
|
||||
fi
|
||||
ipkgarchs="${ALL_MULTILIB_PACKAGE_ARCHS}"
|
||||
priority=1
|
||||
for arch in $ipkgarchs; do
|
||||
echo "arch $arch $priority" >> $archconf
|
||||
|
||||
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
|
||||
# We need gnugrep (for -I)
|
||||
DEPENDS = "virtual/db grep-native"
|
||||
DEPENDS += "gdbm zlib"
|
||||
PR = "r4"
|
||||
PR = "r6"
|
||||
|
||||
# 5.10.1 has Module::Build built-in
|
||||
PROVIDES += "libmodule-build-perl"
|
||||
@@ -163,9 +163,9 @@ do_configure() {
|
||||
;;
|
||||
esac
|
||||
# These are strewn all over the source tree
|
||||
for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
|
||||
for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" -m1 "/usr/include/.*\.h" ${WORKDIR}/* -r -l` ${S}/utils/h2xs.PL ; do
|
||||
echo Fixing: $foo
|
||||
sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
|
||||
sed -e 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i $foo
|
||||
done
|
||||
|
||||
rm -f config
|
||||
@@ -174,8 +174,9 @@ do_configure() {
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL
|
||||
sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' cpan/Compress-Raw-Zlib/config.in
|
||||
# Fix to avoid recursive substitution of path
|
||||
sed -i -e "s|\([ \"\']\+\)/usr/include|\1${STAGING_INCDIR}|g" ext/Errno/Errno_pm.PL
|
||||
sed -i -e "s|\([ \"\']\+\)/usr/include|\1${STAGING_INCDIR}|g" cpan/Compress-Raw-Zlib/config.in
|
||||
sed -i -e 's|/usr/lib|""|g' cpan/Compress-Raw-Zlib/config.in
|
||||
sed -i -e 's|SYSROOTLIB|${STAGING_LIBDIR}|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
|
||||
|
||||
|
||||
@@ -13,10 +13,7 @@ FILES_${PN} = "${libdir}/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/p
|
||||
FILES_${PN}-dbg += "${libdir}/pseudo/lib*/.debug"
|
||||
PROVIDES += "virtual/fakeroot"
|
||||
|
||||
# In the nativesdk case, we'll already search the searchpaths
|
||||
# pseudo tries to build in so override RPATH
|
||||
MAKEOPTS = ""
|
||||
MAKEOPTS_virtclass-nativesdk = "'RPATH='"
|
||||
|
||||
inherit siteinfo
|
||||
|
||||
@@ -24,14 +21,14 @@ do_configure () {
|
||||
:
|
||||
}
|
||||
|
||||
NO32LIBS ??= "0"
|
||||
NO32LIBS ??= "1"
|
||||
|
||||
# Compile for the local machine arch...
|
||||
do_compile () {
|
||||
if [ "${SITEINFO_BITS}" == "64" ]; then
|
||||
${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite
|
||||
${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
|
||||
else
|
||||
${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite
|
||||
${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
|
||||
fi
|
||||
oe_runmake ${MAKEOPTS}
|
||||
}
|
||||
@@ -42,7 +39,7 @@ do_compile () {
|
||||
do_compile_prepend_virtclass-native () {
|
||||
if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
|
||||
# We need the 32-bit libpseudo on a 64-bit machine...
|
||||
./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
|
||||
./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
|
||||
oe_runmake ${MAKEOPTS} libpseudo
|
||||
# prevent it from removing the lib, but remove everything else
|
||||
make 'LIB=foo' ${MAKEOPTS} distclean
|
||||
@@ -52,7 +49,7 @@ do_compile_prepend_virtclass-native () {
|
||||
do_compile_prepend_virtclass-nativesdk () {
|
||||
if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
|
||||
# We need the 32-bit libpseudo on a 64-bit machine...
|
||||
./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
|
||||
./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
|
||||
oe_runmake ${MAKEOPTS} libpseudo
|
||||
# prevent it from removing the lib, but remove everything else
|
||||
make 'LIB=foo' ${MAKEOPTS} distclean
|
||||
@@ -78,6 +75,8 @@ do_install_append_virtclass-nativesdk () {
|
||||
mkdir -p ${D}${prefix}/lib/pseudo/lib
|
||||
cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
|
||||
fi
|
||||
|
||||
create_wrapper ${D}${bindir}/pseudo LD_LIBRARY_PATH=${base_libdir}:${libdir}
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require pseudo.inc
|
||||
|
||||
PR = "r7"
|
||||
PR = "r9"
|
||||
|
||||
SRC_URI = "http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ require pseudo.inc
|
||||
|
||||
SRCREV = "f0375c9aaefbccfd41aebbf6d332bb4d9e8f980c"
|
||||
PV = "1.3+git${SRCPV}"
|
||||
PR = "r22"
|
||||
PR = "r24"
|
||||
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
|
||||
@@ -14,17 +14,6 @@ Issue #12326: sys.platform is now always 'linux2' on Linux
|
||||
|
||||
Even if Python is compiled on Linux 3.
|
||||
|
||||
diff --git a/configure b/configure
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -2995,6 +2995,7 @@ then
|
||||
MACHDEP="$ac_md_system$ac_md_release"
|
||||
|
||||
case $MACHDEP in
|
||||
+ linux*) MACHDEP="linux2";;
|
||||
cygwin*) MACHDEP="cygwin";;
|
||||
darwin*) MACHDEP="darwin";;
|
||||
atheos*) MACHDEP="atheos";;
|
||||
diff --git a/configure.in b/configure.in
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require python.inc
|
||||
DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native"
|
||||
PR = "${INC_PR}.3"
|
||||
PR = "${INC_PR}.4"
|
||||
|
||||
SRC_URI += "file://04-default-is-optimized.patch \
|
||||
file://05-enable-ctypes-cross-build.patch \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require python.inc
|
||||
DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
|
||||
PR = "${INC_PR}.10"
|
||||
PR = "${INC_PR}.12"
|
||||
|
||||
DISTRO_SRC_URI ?= "file://sitecustomize.py"
|
||||
DISTRO_SRC_URI_linuxstdbase = ""
|
||||
|
||||
@@ -12,7 +12,7 @@ SDL ?= "--disable-sdl"
|
||||
SDL_virtclass-native ?= ""
|
||||
SDL_virtclass-nativesdk ?= ""
|
||||
|
||||
EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls --audio-drv-list=oss,alsa --audio-card-list=ac97,es1370 ${SDL}"
|
||||
EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls --audio-drv-list=oss,alsa --audio-card-list=ac97,es1370 ${SDL} --disable-curl"
|
||||
|
||||
#EXTRA_OECONF += "--disable-sdl"
|
||||
|
||||
|
||||
36
meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
Normal file
36
meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
lib/rpmts.c: Ensure that we check both providename and filepaths
|
||||
|
||||
When looking up a missing dependencies, such as /bin/sh, we need to lookup
|
||||
in both the providename and filepaths DB, not just the filepaths DB.
|
||||
|
||||
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
|
||||
--- rpm-5.4.0.orig/lib/rpmts.c 2010-12-27 16:08:25.000000000 -0600
|
||||
+++ rpm-5.4.0/lib/rpmts.c 2012-04-12 15:01:12.990184067 -0500
|
||||
@@ -403,8 +403,8 @@
|
||||
if (sdb == NULL)
|
||||
continue;
|
||||
|
||||
- /* Look for a matching Provides: in suggested universe. */
|
||||
- rpmtag = (*keyp == '/' ? RPMTAG_FILEPATHS : RPMTAG_PROVIDENAME);
|
||||
+ rpmtag = RPMTAG_PROVIDENAME;
|
||||
+ do {
|
||||
mi = rpmmiInit(sdb, rpmtag, keyp, keylen);
|
||||
while ((h = rpmmiNext(mi)) != NULL) {
|
||||
size_t hnamelen;
|
||||
@@ -439,6 +439,15 @@
|
||||
bhnamelen = hnamelen;
|
||||
}
|
||||
mi = rpmmiFree(mi);
|
||||
+
|
||||
+ if (bh == NULL && *keyp == '/' && rpmtag == RPMTAG_PROVIDENAME) {
|
||||
+ rpmtag = RPMTAG_FILEPATHS;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ break;
|
||||
+ } while (1);
|
||||
+
|
||||
}
|
||||
|
||||
/* Is there a suggested resolution? */
|
||||
@@ -44,8 +44,8 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
|
||||
|
||||
DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}"
|
||||
extrarpmdeps = "python perl file"
|
||||
extrarpmdeps_virtclass-native = "file-native"
|
||||
PR = "r35"
|
||||
extrarpmdeps_virtclass-native = "python-native file-native"
|
||||
PR = "r36"
|
||||
|
||||
# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
|
||||
# in order to extract the distribution SRPM into a format we can extract...
|
||||
@@ -69,6 +69,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;ex
|
||||
file://fix_for_automake_1.11.2.patch \
|
||||
file://pythondeps.sh \
|
||||
file://rpmdeps-oecore.patch \
|
||||
file://rpm-resolvedep.patch \
|
||||
"
|
||||
|
||||
# file://rpm-autoconf.patch \
|
||||
@@ -99,8 +100,6 @@ WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
|
||||
--without-pythonembed \
|
||||
"
|
||||
|
||||
WITH_PYTHON_virtclass-native = " --without-python"
|
||||
|
||||
# Perl modules are not built, but they could be enabled fairly easily
|
||||
# the perl module creation and installation would need to be patched.
|
||||
# (currently has host perl contamination issues)
|
||||
|
||||
@@ -26,7 +26,7 @@ inherit autotools
|
||||
|
||||
do_compile_append() {
|
||||
# install-catalog script contains hardcoded references to /etc/sgml
|
||||
sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" bin/install-catalog
|
||||
sed -i -e 's|\([ "]\+\)/etc/sgml|\1${sysconfdir}/sgml|g' bin/install-catalog
|
||||
}
|
||||
|
||||
FILES_sgml-common_append = " ${datadir}/sgml"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user