recipe

Bitbake: modify a bbappend depending on the image compiled

淺唱寂寞╮ 提交于 2019-12-24 07:37:43
问题 I have two different images which use a lot of common packages. One of them is the wpa-supplicant, which provides a file wpa_supplicant.conf installed by the default recipe. However, I want my own wpa_supplicant.conf to be installed. I have this solved by having a .bbappend in my layer. But now I only want this append to be applied when I compile one of the images, but not the other. In short: is there a way to enable/disable a .bbappend depending on the image compiled? NOTES: I have seen

Adding Boost recipe to Yocto SDK

懵懂的女人 提交于 2019-12-24 00:52:26
问题 My goal is having a Yocto SDK with included boost libraries. Some of the libraries provided by Boost are header only but many others need to be compiled for my target architecture. I'm quite new to Yocto so I'm facing some difficulties. I had no problems defining a new layer for my webserver in bblayers.conf and appending packages in the local.conf for apache and php. I was quite lucky to have these packages already included in the yocto krogoth. The problem rises with installing a new packet

Importing Mysql database using Ruby/Chef Recipe for Vagrant

别等时光非礼了梦想. 提交于 2019-12-20 10:11:08
问题 I am writing a chef script to automate setting dev environments. I can get a database created and grant privileges but I am trying to find out a way to import a mysql dump file into the database that has just been created. My code for granting the access is ruby_block "Execute grants" do block do require 'rubygems' Gem.clear_paths require 'mysql' m = Mysql.new('localhost', "root", node[:mysql][:server_root_password]) m.query("GRANT ALL ON *.* TO 'root'@'10.0.0.1' IDENTIFIED BY '#{node[:mysql]

What are your best practices for backbone.js projects?

落爺英雄遲暮 提交于 2019-12-20 08:43:52
问题 Although I'm following backbone.js for some months and worked through a plethora of tutorials, I'm still not confident enough in backbone (or my skills regarding it) to use it in a larger project. My experience is that the backbone.js tutorials vary greatly in quality, some are terribly outdated (especially the sample todo app from the backbone docs). So I'd like to know about your backbone.js best practices/recipes? How do you handle nested collections/views? JSON serialisation? More complex

bitbake recipe - doing a simple copy of the image

╄→гoц情女王★ 提交于 2019-12-20 03:33:27
问题 I am attempting to write a recipe that would simple copy two files (MyfileA , MyfileB) to a specific directory when the overall image is built. This is what my directory structure looks like: MyDir/MyRecipe.bb MyDir/files/MyfileA MyDir/files/MyfileB I would like the two files to be copied to a folder in home (which would not exist initially hence the directories should be created)The folder lets say is called "Testfolder" This is what my bitbake file looks like DESCRIPTION = "Testing Bitbake

Using a variable inside a Chef recipe

一曲冷凌霜 提交于 2019-12-19 10:27:08
问题 I'm using chef-cookbook-hostname cookbook to setup node's hostname. I don't want my hostname to be hard coded in the attribute file (default['set_fqdn']). Instead the hostname will be read from a VM definition XML file. I come up with the following default recipe but apparently the variable fqdn is not given value. Is there any idea why this happens or any better to achieve my task? ruby_block "Find-VM-Hostname" do block do require 'rexml/document' require 'net/http' url = 'http://chef

Automatic dependency generation and compilation in non-flat directory src

江枫思渺然 提交于 2019-12-13 07:29:06
问题 I'd like to adapt the combined automatic dependency approach to a non-flat directory situation where headers are located under ./include/ and implementation files under ./src/ (while Makefile is in the current directory .). I'd like to hold all intermediate and .d (dependency) files inside a separate directory (potentially separate ./build/ and ./.deps/) . To avoid potential clash for dependency files when more than one file with the same name in different subdirectories of ./include/ and .

Multiple segues not passing Object data between themselves

走远了吗. 提交于 2019-12-13 06:48:24
问题 I have started a project that was initially completed following Appcoda's tutorial about using view controllers to pass data between scenes (Find it here: http://www.appcoda.com/storyboards-ios-tutorial-pass-data-between-view-controller-with-segue/) Basically it takes table data from the first scene and the segue connects to another controller that displays the recipe image, prep time, and ingredients. However I wanted to take it one step further and add another view controller that will show

chef how to overwrite attribtues in json file

醉酒当歌 提交于 2019-12-13 04:07:36
问题 I'm trying to run the same recipe twice with different attributes. Is there a way to specify it in the run list? Example: "myRecipe":{ "run-list": "recipe[test], recipe[test]" } and the first one should have flag=false while second one should execute with flag=true. 回答1: No, that's not possible. You have to implement such logic in your recipe and e.g iterate over an array. 回答2: I answered a similar question previously: The short version is, you need to modify your thinking. If you need to

How to automate user interactive command in chef recipe

左心房为你撑大大i 提交于 2019-12-12 13:45:22
问题 I am trying to write code for automating /etc/init.d/oracleasm configure command where as it needs 4 inputs to proceed. Default user to own the driver interface [grid]: grid Default group to own the driver interface [y]: oinstall Start Oracle ASM library driver on boot (y/n) [y]: y Scan for Oracle ASM disks on boot (y/n) [y]: y Generally what is the best way to write code for achieving this. Please suggest me. 回答1: It would be better if you had a command you could run non-interactively, but