Commit Graph

369 Commits

Author SHA1 Message Date
Bruce Ashfield
e3e9cc64c5 pod -> cube
'pods' are used in many projects and places. To clear up the namespace, we now
call the building blocks of an OverC system 'cubes'.

This switches the images, variables and READMEs to talk about 'cubes'.

We also move the distro conf to meta-overc, and ensure the distro is "overc".

And finally, the meta-cube layer priority is bumped to ensure its configs take
precence.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-23 15:45:37 -04:00
Guojian Zhou
3d43914ba6 docker: Fix the invalid kernel configure
The CONFIG_IP_NF_NAT kernel configure has been replaced with
CONFIG_NF_NAT  from linux 2.6.20.

Signed-off-by: Guojian Zhou <guojian.zhou@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-23 08:47:40 -04:00
fupan li
5d8b28cf40 python-smartpn: add the https repo basic authentic mechanism
When do upgrading from the https rpm-md repo, ask the
user to input the username&password at the first time
for the basic authentication, and then the username&password
will be cached in the smart data cache.

Signed-off-by: fupan li <fupan.li@windriver.com>
Signed-off-by: Guojian Zhou <guojian.zhou@windriver.com>
2015-10-23 00:13:05 -04:00
fupan li
d616dc61ee let inetutils rprovides telnet and rsh
When using the rpmbuild to build lynx srpm, this srpm requires rsh and telnet.
If the project uses the inetutils recipe to provide these tools and packages,
it would not find the required dependence provides packages.
So we have to use this method to work around this issue.

rpmbuild lynx.src.rpm build error information is as following:
===============================================================
rpmbuild --rebuild lynx-2.8.8-0.3.dev15.el7.src.rpm
Installing lynx-2.8.8-0.3.dev15.el7.src.rpm
error: Failed build dependencies:
        openssl-devel is needed by lynx-2.8.8-0.3.dev15.src
        ncurses-devel is needed by lynx-2.8.8-0.3.dev15.src
        rsh is needed by lynx-2.8.8-0.3.dev15.src
        slang-devel is needed by lynx-2.8.8-0.3.dev15.src
        telnet is needed by lynx-2.8.8-0.3.dev15.src
        zlib-devel is needed by lynx-2.8.8-0.3.dev15.src

Signed-off-by: fupan li <fupan.li@windriver.com>
Signed-off-by: Guojian Zhou <guojian.zhou@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-22 14:20:40 -04:00
Bruce Ashfield
a80af57078 python: relocate smartpm changes to the proper directory
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-22 14:19:48 -04:00
Bruce Ashfield
a5231b0922 pod: bump default linux versions
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-21 11:46:49 -04:00
fupan li
93d03ebaa2 overc: add a package-name bbclass to make srpm compatible
Redhat/CentOS use the ${pn}-devel for their building used rpm packages, and
OE uses the ${pn}-dev. In order to compatible with Redhat/CentOS, add ${pn}-devel
for each ${pn}-dev rpm packages.

In addition, Redhat/CentOS usually use ${pn}-libs to provide library files for
some packages, and OE doesn't afford such a rpm package, so add ${pn}-libs rprovides
for each ${pn}-dev rpm package in order to meet the buildrequirement of the third party
srpm packages' building.

This feature is try to make srpm compatible with Redhat/CentOs, so remvoed the debian
distro's package name compatible feature.

Signed-off-by: fupan li <fupan.li@windriver.com>
Signed-off-by: Guojian Zhou <guojian.zhou@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-21 10:37:06 -04:00
fli
fa614bd315 python-smartpm: add a config option to change data-dir
The /var/ dir sometimes are mount on volatile device, which will cause
problem, so add an option to change it to a more safe place.
To enable it, please add the following line into a conf file.

PACKAGECONFIG_append_pn-python-smartpm = " change-data-dir"

Signed-off-by: fli <fupan.li@windriver.com>
Signed-off-by: Guojian Zhou <guojian.zhou@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-21 10:17:48 -04:00
fupan li
9ca3998858 python-smartpm: add builddep command to install all of the build required packages
This command will figure out of the build required packages
for a given srpm package and try to install all of these
packages in the system. If a new version of an already installed
package is available, it will be selected for installation.
BTW, this patch only implemented the cache.py, not touched the ccache.c.

For more information about its usage, please run:
$smart builddep -h.

Signed-off-by: fupan li <fupan.li@windriver.com>
Signed-off-by: Guojian Zhou <guojian.zhou@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-21 10:17:45 -04:00
Amy Fong
0331415ef7 overc: add delete container snapshots
Add a command to delete all snapshots of a container.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-10-19 21:15:41 -04:00
Amy Fong
81b2a3e068 overc: combine duplicated code for process Popen commands
Currently Overc/package.py and Overc/container.py are both
using the same code snippets for creating a pipe to run a process
and reporting the stdout/stderr messages, combine these into a
class in Overc/utils.py

Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-10-19 21:03:29 -04:00
Amy Fong
5216823a47 overc host commands broken
Running overc host newer or upgrade results an in error message
about self.message being undefined. These commands are trying to
append to self.message before self.message was defined. We initialize
self.message in the contructor.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-10-19 14:46:05 -04:00
Bruce Ashfield
12eae634cb build: add CLEANBROKEN = "1" to go and python recipes
Many go and python recipes cannot deal with the automatic clean and
rebuild processing of the base package classes.

To avoid builds breaking, and the need for explicit clean -> rebuild
steps, we add the CLEANBROKEN = "1" flag to these recipes.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-19 14:43:32 -04:00
Bruce Ashfield
3303711483 polkit: drop libdir workarounds
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-19 10:04:03 -04:00
Jason Wessel
9999ede026 builder-base.bbclass: Allow the default root password to be changed in a .conf file
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-16 22:29:27 -04:00
Amy Fong
3f1116e67f overc: cleanup upgrade/update/snapshot commands
1. Add snapshot to lxc
2. previously, upgrade was only implemented in the REST interface,
   add upgrade to overc cli
   - upgrade rpm upgrade separately from update in overc
3. add rpm update to lxc
4. update documentation

Signed-off-by: Amy Fong <amy.fong.3142@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-15 15:04:50 -04:00
fupan li
69644f514f overc: support container update using rpm feeds
overc-system-agent: add containers updating use rpm feeds,
and snapshot command for containers.

Signed-off-by: fupan li <fupan.li@windriver.com>
2015-10-15 15:04:16 -04:00
fupan li
aed5017d35 overc: fix overc host command cannot work in dom0
Since overc-system-agent was moved from essential system to
dom0, the overc host commands, sucn as 'host update' and
'host newer' should be run in ROOTMOUNT, instead of '/'.

Signed-off-by: fupan li <fupan.li@windriver.com>
2015-10-15 15:04:06 -04:00
Bruce Ashfield
70a6e3941d services: split service discovery and configuration
etcd and consul are provided as service discovery agents, but both
are not required in a single domain.

To keep dom0 small and light, we split consul and etcd into two
package groups.

dom0 gets etcd and dom1 consul.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-15 14:56:10 -04:00
Bruce Ashfield
b5f5437567 overc: allow linux-yocto-rt to be used
By default OverC used linux-yocto-dev, but for deployments that require
realtime capabilities, the linux-yocto-rt kernel is more appropriate.

This commit creates a bbappend to apply the proper configuration to a -rt
kernel, and makes the virtual/kernel assignment conditional, allowing the
-rt kernel to be selected in a local.conf via:

  PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-rt"

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-15 14:22:52 -04:00
Jason Wessel
8c6af7d9da util-linux.bbappend: Allow the nsenter patch to apply to util-linux 2.24.2 and 2.26.x
This allows for compability with oe-core 1.7 and oe-core 2.0 for meta-overc.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-15 13:23:23 -04:00
Jason Wessel
11c2a11bd2 polkit: Fix patche context in bbappend for compatibility with oe versions
The patch lines deleted allow the polkit patch to apply to oe-core 1.7
and oe-core 2.0 cleanly.  Also the patch lines were not needed
anymore, due to a change earlier in the patch file.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-15 13:23:22 -04:00
fupan li
febc144152 meta-overc: add dosfstools to OVERC_COMMON_DISK
UEFI boot need vfat filesystem, so add dosfstools to
OVERC_COMMON_DISK for pod-installer to use.

Signed-off-by: fupan li <fupan.li@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-15 09:56:30 -04:00
Jackie Huang
538ba45df7 pod-essential: add kernel-modules and depmod data
Issue: TA115230

The creation of kernel depmod data will be skipped for all images
when --enable-container=yes, but we don't want the essential image
to be a container image, so add the kernel-modules and set
USE_DEPMOD to use depmod data.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
2015-10-15 09:23:12 -04:00
Jason Wessel
0fcaa07fe3 initramfs-pod-builder: Add ARM support
Allow the ARM version of the initramfs to build for the -essential
image.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-14 17:54:21 -04:00
Amy Fong
0cb8474159 overc-system-agent: change package message handling
Update package's smartpm to handle stdin/stdout messages in the
same way as the container's communication infrastructure (to enable
live feedback)

Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-10-14 10:56:44 -04:00
Amy Fong
94bf447643 overc-system-agent: change container message handling
Previously, over-system-agent's container communication infrastruction
only displays stdout from the container scripts when the container scripts
exits.

Update overc so that both stdout and stderr from the containers scripts
are available.

Also, modify the message handling so that messages are displayed as
they become available instead of waiting til the process is finished.
Some of the processes can take several minutes to complete, with
this change, it provides the user (at least from overc - not from REST)
a sense that something's going on.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-10-13 16:04:34 -04:00
Guojian Zhou
0e7ce466f6 pod-server: replace IMAGE_INSTALL_append with IMAGE_INSTALL +=
"IMAGE_INSTALL +=" will override the definition of
"IMAGE_INSTALL ?=" defined in the following inherited
core-image, and this is what we expected.

It will cause the unbuildable recipes "shadowpackagegroup_core_boot" error.

The nucleo-t project configure error information is as following:
============================================================================
ERROR: Nothing RPROVIDES 'shadowpackagegroup-core-boot' (but
layers/wr-nucleo-t/nucleo-t/base/recipes-base/images/wrlinux-image-nucleo-t.bb
RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'shadowpackagegroup-core-boot' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['shadowpackagegroup-core-boot']

Signed-off-by: Guojian Zhou <guojian.zhou@windriver.com>
2015-10-13 10:38:04 -04:00
Amy Fong
06760021ba container: add delete option
Add option to delete containers, snapshots are to be deleted as well.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-10-08 22:42:57 -04:00
Jim Somerville
a32e503001 pod: restrict dom0-contctl to dom0 only
Currently the dom0-contctl package is in the
dom0 packagegroup which gets embedded into
both dom0 and domE.  Move it to dom0 only.

Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
2015-10-08 22:41:10 -04:00
Jim Somerville
7ceb32fa6f pod: fix container shutdown notifier mount reqts
The local-fs.target was not handling the /opt/container
bind mounts as first thought.  Instead tell systemd
exactly what mount is required and thus have systemd
automatically sort out the start/stop ordering of components.

Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
2015-09-29 10:46:26 -04:00
Amy Fong
2eeacb038d overc-system-agent: Add test
Add script for testing container and package updates.

Signed-off-by: Amy Fong <amy.fong.3142@gmail.com>
2015-09-25 11:52:28 -04:00
Amy Fong
ac49208067 overc-system-agent: cleanup container-script
Remove debugging message from both container script.

Signed-off-by: Amy Fong <amy.fong.3142@gmail.com>
2015-09-25 11:52:23 -04:00
Amy Fong
b67771d8e4 overc-system-agent: overc use retval from container scripts
Modify overc to use the return value from the container scripts,
overc currently blindly returns 0.

Signed-off-by: Amy Fong <amy.fong.3142@gmail.com>
2015-09-25 11:52:20 -04:00
Jim Somerville
0db84a9136 pod: Introduce container-shutdown-notifier
On a shutdown or a reboot of a container running
this service, a similar shutdown or reboot command
will be sent to the listening pod-cmd-server.  This
allows for a container such as domE to effect a
shutdown or reboot on dom0, which in turn can
propagate the same action to pod-essential to cause
the shutdown or reboot to happen to the entire system.

Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
2015-09-23 20:28:15 -04:00
Jim Somerville
70eb9edbe3 pod: Introduce pod-cmd-server
The pod-cmd-server is a generic command processor
meant for taking and acting upon commands from
containers.  Currently two commands are
supported, namely reboot and shutdown (poweroff).
For example, this allows for the propagation of reboot
commands from domE to pod-essential via a command
server running on dom0.

The current communication channel used is a named pipe, also
known as a fifo.  This fifo must be visible in the namespace
of both the command server and the container sending the
command.  That is accomplished through the judicious use
of bind mounts already in place between the pods.

Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
2015-09-23 20:28:15 -04:00
Bruce Ashfield
2eafc83101 Merge pull request #2 from paw3142/master
Add dom0 support to overc-system-agent
2015-09-23 02:31:39 -04:00
Amy Fong
208ce90c80 Add btrfs option in installer README
Modify README.install to specify using -b option for pod-install.sh
to enable btrfs option

Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-09-23 02:18:13 -04:00
Amy Fong
be86e3f4f7 overc-system-agent: needs overc-cctl
overc-cctl from overc-installer is needed by overc-system-agent.

Add package overc-installer to copy overc-cctl from overc-installer.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-09-23 02:17:53 -04:00
Amy Fong
5ec6030d5f overc-system-agent: add dom0 support
Modify this package's install to install its files to /opt/${PN} Install
container scripts to /etc/overc/container Add python-flask and some
other packages to RDEPS, this is needed for the REST interface.

API change: since we do not support rollback to a specified
snapshot image, specifying of snapshot is now optional.

To support operations to the container dom0, we modify rollback
and activate to permit updates since this container will still be
active. Overc no longer tests to see if a container is active in itself,
this will be handled within the container script.  We also do not support
start/stop of dom0.

Argument handling in the container script updated to be more flexible.
Update README.container to reflect changes to container script arguments.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-09-23 02:15:06 -04:00
Amy Fong
2ccce2a074 overc: update rootmount
In dom0, root is available from /essential, overc
needs to be updated to be able to look for the btrfs info.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-09-23 02:11:45 -04:00
Amy Fong
4d70b41188 Add overc-system-agent to dom0 image
Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-09-23 02:11:18 -04:00
Mark Asselstine
c732bb0099 etcd: fix error due to '/usr/bin/bash' missing dependency
Building an image which contains etcd can produce the following error:
error: Can't install etcd-git-r0.1@core2_64: no package provides /usr/bin/bash

Looking closely at the etcd sources we find that one of the contained
scripts references '/usr/bin/bash' instead of '/bin/bash' like the
others do. This results in bitbake adding an automatic dependency
which can't be satisfied and the above failure ensues.

There is a more comprehensive upstream fix for this that we will get
when we uprev to the latest etcd but for now we just address the
single script to get around this issue with minimal impact.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-09-22 00:56:06 -04:00
fupan li
c1e5032aac consul: Fix up the consul build issue for the arm arch
Issue: OVP-2573

Inherit the golang class's common settings and remove those
redundancy sectons and class's common settings has enabled cgo, which
will reduce the following issue:

ERROR: Function failed: do_compile (log file is located at bitbake_build/tmp/work/cortexa7t2hf-vfp-neon-wrs-linux-gnueabi/consul-migrate/git-r0/temp/do_compile/log.do_compile.94063)
ERROR: Logfile of failure stored in: bitbake_build/tmp/work/cortexa7t2hf-vfp-neon-wrs-linux-gnueabi/consul-migrate/git-r0/temp/do_compile/log.do_compile.94063
Log data follows:
| DEBUG: Executing shell function do_compile
| ../../../../../sysroots/fsl-ls10xx/usr/local/go/src/github.com/hashicorp/raft-mdb/mdb_store.go:5:2: C source files not allowed when not using cgo: mdb.c midl.c
| WARNING: bitbake_build/tmp/work/cortexa7t2hf-vfp-neon-wrs-linux-gnueabi/consul-migrate/git-r0/temp/do_compile/run.do_compile.94063:1 exit 1 from
| go install github.com/hashicorp/consul-migrate
| ERROR: Function failed: do_compile (log file is located at bitbake_build/tmp/work/cortexa7t2hf-vfp-neon-wrs-linux-gnueabi/consul-migrate/git-r0/temp/do_compile/log.do_compile.94063)
ERROR: Task 113 (layers/meta-overc/meta-pod/recipes-connectivity/consul/consul-migrate_git.bb, do_compile) failed with exit code '1'

Signed-off-by: fupan li <fupan.li@windriver.com>
2015-09-20 22:47:46 -04:00
fupan li
1f6d87325c consul-migrate: Fix up the consul-migrate build issue for the arm arch
Issue: OVP-2572

Inherit the golang class's common settings and remove those
redundancy sectons and class's common settings has enabled cgo, thus
it will fix the following error:

ERROR: Function failed: do_compile (log file is located at
bitbake_build/tmp/work/cortexa7t2hf-
vfp-neon-wrs-linux-gnueabi/consul-migrate/git-r0/temp/do_compile/log.do_compile.68285)
ERROR: Logfile of failure stored in:
bitbake_build/tmp/work/cortexa7t2hf-vfp-neon-wrs-linux-gnu
eabi/consul-migrate/git-r0/temp/do_compile/log.do_compile.68285
Log data follows:
| DEBUG: Executing shell function do_compile
|
../../../../../sysroots/fsl-ls10xx/usr/local/go/src/github.com/hashicorp/raft-mdb/mdb_store.go:5:2:
C source files not allowed when not using cgo: mdb.c midl.c
| WARNING:
temp/do_compile/run.do_compile.68285:1 exit 1 from
|   go install github.com/hashicorp/consul-migrate
| ERROR: Function failed: do_compile (log file is located at
bitbake_build/tmp/work/cortexa7t2h
f-vfp-neon-wrs-linux-gnueabi/consul-migrate/git-r0/temp/do_compile/log.do_compile.68285)
NOTE: recipe consul-migrate-git-r0: task do_compile: Failed

Signed-off-by: fupan li <fupan.li@windriver.com>
2015-09-20 22:47:46 -04:00
fupan li
bdfd724f98 etcd: fix the error caused by miss setting GOARCH for host cross building
Issue: OVP-2574

Inherit the golang class's common settings and remove those
redundancy sectons and class's common settings has set GOARCH, thus
it will fix this issue.

Signed-off-by: fupan li <fupan.li@windriver.com>
2015-09-20 22:47:46 -04:00
fupan li
6216ee001c bolt: Fix the bolt QA issue
Inherit the golang bbclass's common settings and remove those
redundancy sectons and class's common settings will reduce the following
QA issue:

ERROR: QA Issue: non debug package contains .debug directory: bolt path
/work/armv7at2-vfp-neon-wrs-linux-gnueabi/bolt/git-r0/packages-split/bolt/usr/bin/linux_arm/.debug/bolt
[debug-files]

Signed-off-by: fupan li <fupan.li@windriver.com>
2015-09-20 22:47:46 -04:00
fupan li
f96168db3c meta-overc: add a golang bbclass for golang programs building
Most of the golang programs have some common settings for
their recipes, such as GOPATH, GOARCH, GOBIN and so on, so
extracted all of those common sections into a bbclass to
reduce the redundancy.

Signed-off-by: fupan li <fupan.li@windriver.com>
2015-09-20 22:47:46 -04:00
Jim Somerville
247ee88ee0 cgmanager: supply distro at configure time
If you don't supply the distro at configure time,
autoconf will attempt to figure it out by calling
lsb_release on the host or probing for the existence
of certain files on the host.  The actual distro doesn't matter,
but the probing around can cause error messages because
it's a violation of cross compilation principles.

This problem was masked if you happened to have the lsb_release
command on your compile host.

Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-09-16 16:27:11 -04:00
Bruce Ashfield
2a0d8c40fb overc: create dom0 python package group
Ensure that dom0 has enough python to run things like pip. This
common definition can be re-used by other domains as required.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-09-14 15:36:06 -04:00