Commit Graph

112 Commits

Author SHA1 Message Date
Bruce Ashfield
ac03ddb8b4 lxc: add upstream-status to patch
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-04-18 22:29:57 -04:00
RameshkrishnanX Geddy Sekar
d65587d727 lxc-recipe: Fix compilation without seccomp when libseccomp is installed
Original URL:  https://github.com/lxc/lxc/pull/3623

Signed-off-by: RameshkrishnanX Geddy Sekar <rameshkrishnanx.geddy.sekar@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-04-18 20:10:00 -04:00
Robi Buranyi
55b5e02d06 lxc: change download folder
The URI has been changed to 'https://linuxcontainers.org/downloads/lxc'
by the site maintainers recently. Updating the recipe to reflect the new
path.

Signed-off-by: Robi Buranyi <rburanyi@google.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-03-11 22:34:30 -05:00
Bruce Ashfield
d10f21a722 lxc: update to 4.0.6
Updating to the next minor revision in the LTS.

We also drop two patches that are included in the main repository
as partof this bump.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-02-07 07:58:51 -05:00
Daniel Dragomir
33ebe1ac39 lxc: Fix postinstall script for read-only rootfs
Ensure postinstall script for lxc-networking package can run at
build time for a read-only rootfs (with sysvinit).

Signed-off-by: Daniel Dragomir <Daniel.Dragomir@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-01-10 23:23:55 -05:00
Mingli Yu
d898bd1ca5 lxc: remove deprecated options in lxc*.service
Remove deprecated options in lxc*.service to silence below warning:
 # systemctl status lxc
 [snip]
 /usr/lib/systemd/system/lxc.service:17: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
 /usr/lib/systemd/system/lxc.service:18: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-10-01 23:08:10 -04:00
Khem Raj
3fafab50cf lxc: Disable warnings as errors
Instead of disabling particular warnings, its better to use configure
switch, since some of these warnings could be compiler specific

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-08-27 16:28:20 -04:00
Bruce Ashfield
65abc719f3 lxc: update to v4.0.4
While we are updating, we refresh one patch to remove fuzz, otherwise
there are no significant changes.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-08-18 13:53:25 +00:00
Wang Mingyu
98f86a681d lxc: upgrade 4.0.2 > 4.0.3
Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-07-06 16:28:00 -04:00
hongxu
05dd164818 lxc: fix compile failure on gcc10
Since oe-core is upgrading gcc to 10.1, there is
a compile failure
...
|../../../lxc-4.0.2/src/lxc/cgroups/cgfsng.c:2100:10: error: writing
1 byte into a region of size 0 [-Werror=stringop-overflow=]
| 2100 |   *slash = '\0';
...

Add gcc option `-Werror=stringop-overflow' to workaround the issue

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-05-19 17:18:53 -04:00
Sai Hari Chandana Kalluri
0bf60a7198 lxc: Update python3.5 reference to latest python version
Python3.5 is no longer supported, update references to latest python version
using variables from python3-dir bbclass

Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-05-02 11:08:24 -04:00
Mingli Yu
5cb80bae0b lxc: Upgrade to 4.0.2
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-04-26 21:47:48 -04:00
Yanfei Xu
a9eba58a51 lxc: correct the LIC_FILES_CHKSUM and LICENSE fields
License changes from lxc3.2.1 to lxc4.0.1:
  1.File COPYING is renamed to LICENSE.LGPL2.1
  2.Add a new file LICENSE.GPL2

Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-04-14 17:07:15 -04:00
Bruce Ashfield
a24ce339fd lxc: refresh patches to remove fuzz
The recent uprev of lxc left some fuzz in a patches. devtool refresh
cleans this up, and no runtime issues have been detected.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-04-14 15:57:19 -04:00
Yanfei Xu
660ffa675e lxc: uprev from 3.2.1 to 4.0.1
Update to the just released 4.0.1. And drop some patches contained
in this released.

Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-04-13 13:53:05 -04:00
Oleksii Kurochko
15e9fc23ec lxc: Backport patch that renames memfd_create() function
When Autotools makes configuration of LXC, the check of
the memfd_create() function fails because __stub_memfd_create and
__stub___memfd_create (The GNU C library defines this for functions
which it implements to always fail with ENOSYS) are defined in Glibc,
which leads to the fact that the macro HAVE_MEMFD_CREATE is not
defined and LXC provides defintion of the memfd_create() function as
static inline which in turn conflicts with a definition from
the <bits/mman-shared.h> file and causes an error:
| In file included from ../../../lxc-3.2.1/src/lxc/conf.c:79:
| <src_path>//lxc/syscall_wrappers.h:77:19: error: static declaration
| of 'memfd_create' follows non-static declaration
| | static inline int memfd_create(const char *name, unsigned int flags) {
| |                   ^~~~~~~~~~~~
| In file included from /usr/include/bits/mman-linux.h:111,
|                  from /usr/include/bits/mman.h:34,
|                  from /usr/include/sys/mman.h:41,
|                  from <src_path>/lxc-3.2.1/src/lxc/conf.c:42:
| /usr/include/bits/mman-shared.h:50:5: note: previous declaration
|  of 'memfd_create' was here
| | int memfd_create (const char *__name, unsigned int __flags) __THROW;
| |     ^~~~~~~~~~~~

Upstream PR: https://github.com/lxc/lxc/pull/3168 (merged)

Signed-off-by: Oleksii Kurochko <olkuroch@cisco.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-02-27 16:54:44 -05:00
Maximilian Blenk
b8c810c608 lxc: Backport patches for keyring options
The added patches allow to set the SELinux context for the session
keyring that is created by lxc. In addition it is possible to disable
the creation of a new session keyring completely.

Upstream PR: https://github.com/lxc/lxc/pull/3260 (merged)

If lxc is executed on a SELinux enabled system, these options can be
used to assign the expected label to the session keyring.

Signed-off-by: Maximilian Blenk <maximilian.blenk@bmw.de>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-02-13 17:21:41 -05:00
Joakim Roubert
468a24df91 templates/lxc-download.in: Use curl instead of wget
When curl's MIT license is preferable to wget's GPLv3. Which it is in
several situations.

Change-Id: I72ee1ce66493c564557b73fae80f5219ef83af6d
Signed-off-by: Joakim Roubert <joakimr@axis.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-09-18 13:53:26 -04:00
Yunguo Wei
af40c87298 lxc: restore the ability to move nl80211 device
nl80211 device can't be moved to another namespace due to
e389f2afd8509(start: unify and simplify network creation), and lxc
community has fixed this issue with:

commit 3dd7829433f63b2ec1323a1f237efa7d67ea6e2b lxc upstream

This patch is grabbing the commit above, and should be abandoned with
lxc uprev afterwards.

See more details here: https://github.com/lxc/lxc/issues/3105

Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-09-14 23:51:13 -04:00
Yuan Chao
b19add379e lxc: upgrade 3.1.0 -> 3.2.1
Signed-off-by: Yuan Chao <yuanc.fnst@cn.fujitsu.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-08-12 11:02:31 -04:00
Oleksandr Kravchuk
aea2a3531a lxc: remove perl-module-warnings-register from RDEPENDS
This module is part of the perl package now and is shipped by default.

Signed-off-by: Oleksandr Kravchuk <oleksandr.kravchuk@pelagicore.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-02-21 03:15:23 +00:00
Mark Asselstine
2387a8876e lxc: uprev from 3.0.3 to 3.1.0
Minor updates and fixes. Improved ptest results per below.

    root@cube-essential:/usr/lib64/lxc/ptest# ./run-ptest
    ### Starting LXC ptest ###
    FAIL: lxc-test-api-reboot
    SKIPPED: lxc-test-apparmor
    PASS: lxc-test-attach
    PASS: lxc-test-automount
    PASS: lxc-test-autostart
    PASS: lxc-test-basic
    PASS: lxc-test-cgpath
    PASS: lxc-test-cloneconfig
    PASS: lxc-test-clonetest
    PASS: lxc-test-concurrent
    PASS: lxc-test-config-jump-table
    PASS: lxc-test-console
    PASS: lxc-test-console-log
    PASS: lxc-test-containertests
    PASS: lxc-test-createconfig
    PASS: lxc-test-createtest
    PASS: lxc-test-criu-check-feature
    PASS: lxc-test-destroytest
    PASS: lxc-test-device-add-remove
    PASS: lxc-test-get_item
    PASS: lxc-test-getkeys
    PASS: lxc-test-list
    PASS: lxc-test-locktests
    PASS: lxc-test-lxcpath
    PASS: lxc-test-may-control
    PASS: lxc-test-mount-injection
    PASS: lxc-test-no-new-privs
    PASS: lxc-test-parse-config-file
    PASS: lxc-test-raw-clone
    PASS: lxc-test-reboot
    PASS: lxc-test-rootfs
    PASS: lxc-test-saveconfig
    PASS: lxc-test-share-ns
    PASS: lxc-test-shortlived
    SKIPPED: lxc-test-shutdowntest
    PASS: lxc-test-snapshot
    PASS: lxc-test-startone
    SKIPPED: lxc-test-state-server
    PASS: lxc-test-utils

    Results:
        PASSED = 35
        FAILED = 1
        SKIPPED = 3
        (for details check individual test log in ./logs directory)

    ### LXC ptest complete ###

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2019-01-10 13:08:41 -05:00
Mark Asselstine
885e877058 lxc: uprev from 3.0.2 to 3.0.3
Update to the just released v3.0.3. This release is a collection of
minor changes, bug fixes, logging updates, documentation cleanup, code
cleanup and some new tests.

We have an improved outlook as far as ptests is concerned as well:
    ### Starting LXC ptest ###
    FAIL: lxc-test-api-reboot
    SKIPPED: lxc-test-apparmor
    PASS: lxc-test-attach
    PASS: lxc-test-automount
    FAIL: lxc-test-autostart
    PASS: lxc-test-basic
    PASS: lxc-test-cgpath
    PASS: lxc-test-cloneconfig
    PASS: lxc-test-clonetest
    PASS: lxc-test-concurrent
    PASS: lxc-test-config-jump-table
    PASS: lxc-test-console
    PASS: lxc-test-console-log
    PASS: lxc-test-containertests
    PASS: lxc-test-createconfig
    PASS: lxc-test-createtest
    PASS: lxc-test-criu-check-feature
    PASS: lxc-test-destroytest
    PASS: lxc-test-device-add-remove
    PASS: lxc-test-get_item
    PASS: lxc-test-getkeys
    PASS: lxc-test-list
    PASS: lxc-test-locktests
    PASS: lxc-test-lxcpath
    PASS: lxc-test-may-control
    FAIL: lxc-test-no-new-privs
    PASS: lxc-test-parse-config-file
    PASS: lxc-test-raw-clone
    PASS: lxc-test-reboot
    PASS: lxc-test-rootfs
    PASS: lxc-test-saveconfig
    PASS: lxc-test-share-ns
    PASS: lxc-test-shortlived
    SKIPPED: lxc-test-shutdowntest
    PASS: lxc-test-snapshot
    PASS: lxc-test-startone
    SKIPPED: lxc-test-state-server
    PASS: lxc-test-utils

    Results:
        PASSED = 32
        FAILED = 3
        SKIPPED = 3
    (for details check individual test log in ./logs directory)

    ### LXC ptest complete ###

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
2018-11-29 12:05:18 -05:00
Mingli Yu
87526423d5 lxc: Upgrade to 3.0.2
* Refresh patch to avoid fuzz warnings
* Update to 3.0.2 as lxc-destroy failed when
  system boot in nfs rootfs in lxc 3.0.1 as below:
  # lxc-destroy -n test9
  lxc-destroy: test9: utils.c: _recursive_rmdir: 149 Failed to delete /var/lib/lxc/test9
  lxc-destroy: test9: lxccontainer.c: container_destroy: 2946 Failed to destroy directory "/var/lib/lxc/test9" for "test9"
  Destroying test9 failed

  Update to 3.0.2 to fix the above issue

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-10-22 04:41:50 -04:00
Sinan Kaya
c9c0d5ef20 lxc: make error report compatible with ptest
ptest puts the test status at the beginning of the test. Follow
the style.

BEGIN: /usr/lib/lxc/ptest
 ### Starting LXC ptest ###
SKIPPED: lxc-test-apparmor
FAIL: lxc-test-attach
PASS: lxc-test-automount
FAIL: lxc-test-autostart
PASS: lxc-test-cgpath
PASS: lxc-test-cloneconfig
PASS: lxc-test-clonetest
PASS: lxc-test-concurrent
FAIL: lxc-test-console
PASS: lxc-test-containertests
PASS: lxc-test-createconfig
FAIL: lxc-test-createtest
FAIL: lxc-test-destroytest
PASS: lxc-test-device-add-remove
PASS: lxc-test-get_item
PASS: lxc-test-getkeys
PASS: lxc-test-list
PASS: lxc-test-locktests
PASS: lxc-test-lxcpath
PASS: lxc-test-may-control
PASS: lxc-test-reboot
PASS: lxc-test-saveconfig
SKIPPED: lxc-test-shutdowntest
PASS: lxc-test-snapshot
PASS: lxc-test-startone
PASS: lxc-test-utils

Results:
    PASSED = 19
    FAILED = 5
    SKIPPED = 2
(for details check individual test log in ./logs directory)

 ### LXC ptest complete ###
END: /usr/lib/lxc/ptest

Signed-off-by: Sinan Kaya <okaya@kernel.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-10-16 10:25:40 -04:00
Dengke Du
66ee1a5650 lxc: add runtime depends for util-linux-getopt
When runing:

    lxc-create -t download -n test

The system reports that the getopt command can't find. This is because
the lxc-download template depends on getopt command. So add the runtime
depends on util-linux-getopt for lxc.

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-08-14 12:57:25 -04:00
Jeremy Puhlman
6c354d1621 lxc: uprev 3.0.1
- Bug fix release
- Fixes gcc8 build failures
- Update patch for fuzz issues.
- remove --disable-python and --disable-lua as they have been removed

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-06-11 12:05:40 -04:00
Mark Asselstine
1a5853f87c lxc: use compiled tests instead of copying source building on target
The tests are already built when we do_compile so we only need to copy
them to the ptest path and create a wrapper script to run them. This
has the added benefit of reducing the size of the lxc package.

We have to manipulate the test sources some to remove gpg validation
and a few other minor changes, none of which actually change what is
being tested (notes are provided in the associated commit logs).

The following are the ptest results currently acheived:

    ### Starting LXC ptest ###
    ./tests/lxc-test-api-reboot FAIL
    ./tests/lxc-test-apparmor SKIPPED
    ./tests/lxc-test-attach PASS
    ./tests/lxc-test-automount PASS
    ./tests/lxc-test-autostart PASS
    ./tests/lxc-test-cgpath PASS
    ./tests/lxc-test-cloneconfig PASS
    ./tests/lxc-test-clonetest PASS
    ./tests/lxc-test-concurrent PASS
    ./tests/lxc-test-config-jump-table PASS
    ./tests/lxc-test-console PASS
    ./tests/lxc-test-console-log PASS
    ./tests/lxc-test-containertests PASS
    ./tests/lxc-test-createconfig PASS
    ./tests/lxc-test-createtest PASS
    ./tests/lxc-test-criu-check-feature PASS
    ./tests/lxc-test-destroytest PASS
    ./tests/lxc-test-device-add-remove PASS
    ./tests/lxc-test-get_item PASS
    ./tests/lxc-test-getkeys PASS
    ./tests/lxc-test-list PASS
    ./tests/lxc-test-locktests PASS
    ./tests/lxc-test-lxcpath PASS
    ./tests/lxc-test-may-control PASS
    ./tests/lxc-test-no-new-privs PASS
    ./tests/lxc-test-parse-config-file PASS
    ./tests/lxc-test-raw-clone PASS
    ./tests/lxc-test-reboot PASS
    ./tests/lxc-test-rootfs PASS
    ./tests/lxc-test-saveconfig PASS
    ./tests/lxc-test-share-ns PASS
    ./tests/lxc-test-shortlived PASS
    ./tests/lxc-test-shutdowntest SKIPPED
    ./tests/lxc-test-snapshot PASS
    ./tests/lxc-test-startone PASS
    ./tests/lxc-test-state-server SKIPPED
    ./tests/lxc-test-utils PASS

    Results:
        PASSED = 33
        FAILED = 1
        SKIPPED = 3
        (for details check individual test log in ./logs directory)

    ### LXC ptest complete ###

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-06-03 23:26:52 -04:00
Mark Asselstine
b6bccf42d1 lxc: fixup 'download' template use
We have a new dependency on 'mountpoint' which is now called in the
download template script. We also hit an upstream bug due to improper
use of 'mktemp', so we apply a patch to fix this and sent the fix
upstream as well.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-06-03 23:26:51 -04:00
Mark Asselstine
0d7cfe8660 lxc: uprev to v3.0.0
Update to the latest lxc release. This requires some minor patch
updates (fuzz and offset, not content) along with dropping a no longer
needed fix for gcc7 (gcc 7.3 is everywhere and is patched).

The ptests were already busted before the uprev so I was not able to
run them but I will follow up with a fix for this. I did run against
our usual usecases 'lxc-create', 'lxc-console', 'lxc-ls',
'lxc-destroy', 'lxc-start', 'lxc-execute', 'lxc-attach'... and there
were no issues (outcomes matched v2.0.8).

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-06-03 23:26:51 -04:00
Mark Asselstine
52f807ef78 lxc: cleanup the lxc-networking package
Adding missing RDEPENDS on iptables, the lxc-net service will fail
without this. Use the new 'pkg_postinst_ontarget_' instead of failing
out to signal runtime postinst scripts, this conforms with the latest
expectation for bitbake. The interfaces file is specific to sysvinit
and unneeded for systemd so block the creation of these files only
when building for sysvinit.

Lastly add a default 'lxc-net' file. Since we have a separate
lxc-networking package we can complete it with this configuration
which is sourced by '/etc/default/lxc' (which is part of the core lxc
package). In doing this we are like Debian when the lxc-networking
package is not installed in the image, and like Ubuntu when it is.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-05-29 10:27:53 -04:00
Mark Asselstine
2a30867cff lxc: add wget as an RDEPENDS needed for the download template
Without this we get:
    ERROR: Missing required tool: wget

When attempting to do something like:
    lxc-create -n ubu -t download -- --no-validate -d ubuntu -r xenial

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-05-29 10:27:53 -04:00
Mark Asselstine
1831c7c282 lxc: rename the lxc 'autostart' sysvinit script matching upstream
This was renamed back in v1.1.0 but I suppose most folks have been
buiding for systemd or were not using this functionality and it went
unnoticed.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-05-29 10:27:53 -04:00
Mark Asselstine
11c7379fc5 lxc: drop the -setup package
For some packages we include a -setup package which can be installed
as part of an image to complete a more comprehensive setup of the main
package. This is common for example in meta-cloud-services since many
OpenStack packages have extensive setup.

The -setup package for lxc did at one point do comprehensive setup but
over time this has been moved to the -networking package. Now the
-setup package is only being used as a container for the systemd
service files or sysvinit scripts. This can better be accomplished by
setting appropriate runlevels for the initscripts or disabling or
masking the systemd services (via SYSTEMD_AUTO_ENABLE).

This also fixes some confusion or what might be considered a bug
around -setup and -networking packages as the -setup package was
mopping up the lxc-net.service file, instead of it being included in
the -networking package.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-05-29 10:27:52 -04:00
David Smith
56023b07d7 LXC LICENSE is LGPLv2.1 not GPLv2.
LXC is licensed under LGPLv2.1 not GPLv2. The COPYING file
referenced in the LXC recipe on all branches have the same content,
checksum  and all define LICENSE="GPLv2" rather than "LGPLv2.1".

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-05-21 22:10:16 -04:00
Gianfranco Costamagna
13f586d091 lxc: enable fix apparmor feature name. A typo called it "apparmour", back in commit 7a62620ea0 Changing the default to the right value
Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-05-09 10:49:59 -04:00
Ricardo Salveti
545851a5df lxc: set systemdsystemunitdir with systemd
systemd unit dir can be customized by the distro (e.g. usrmerge), so
make sure the correct unit dir path is set on configure.

Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-02-05 20:27:32 -05:00
Mark Asselstine
09af87f0d8 lxc: add missing RDEPENDS
When attempting to create a container using

lxc-create -t download -n test -- no-validate --dist ubuntu --release \
xenial --arch amd64

the container creation will fail due to missing 'xz' and in the case
of 'tar' due to invalid options if the busybox version of 'tar' is
used.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-12-28 11:12:28 -05:00
Mark Asselstine
00a801aee1 dnsmasq: add dnsmasq.d entries for lxc and libvirt
A while ago changes were merged to meta-openembedded to make
/etc/dnsmasq.d (and specifically the files it contains) referenced
when the main instance of dnsmasq is run (see dnsmasq.service and
commit ba665493a0dd [dnsmasq: allow for dnsmasq instances to reuse
default dnsmasq.conf]).

We, however, continued to modify the global configuration
(/etc/dnsmasq.conf) to keep the main instance of dnsmasq from
attaching to virbr0 and lxcbr0, by using 'bind-dynamic'. This approach
is problematic, since it is common that other instances of dnsmasq
will make use of the global configuration file and may have
incompatible options. We see this for example when attempting to start
lxc-net which will attempt to use 'bind-interface' which is
incompatible with 'bind-dynamic' that we were adding to the global
configuration.

Here we remove our change to the global configuration (leaving it
mostly empty as it should be) and instead have lxc and libvirt
packages instruct the global instance not to bind to virbr0 and lxcbr0
by adding configuration files to /etc/dnsmasq.d (setting
except-interface).

The added benefit to this approach is that if lxc or libvirt are not
part of an image the global configuration will not be modified in such
a way as to expect that they are present.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-12-28 11:12:26 -05:00
Jackie Huang
23dee8a207 lxc: add back the rdepends on glibc-utils
The rdepends on glibc-utils was removed without reason
in the following commit:
"""
e73608d56e
lxc: 2.0.0 -> 2.0.8
"""

And it causes failure:
/usr/libexec/lxc/lxc-net: line 125: getent: command not found

So add the dependency back.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-12-01 21:49:32 -05:00
Mark Asselstine
aecdc17e0d lxc: fix build failure, failing QA check
The build is failing due to a failing QA check:

  ERROR: lxc-2.0.8-r0 do_package_qa: QA Issue:
  /usr/lib/lxc/ptest/src/tests/lxc-test-may-control contained in
  package lxc-ptest requires /bin/bash, but no providers found in
  RDEPENDS_lxc-ptest? [file-rdeps]

Add bash to the the ptest RDEPENDS.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-08-24 09:55:38 -04:00
Jan Kiszka
be934f72d2 lxc: Fix INITSCRIPT_PARAMS value
Analogously to docker: There is no variable
OS_DEFAULT_INITSCRIPT_PARAMS, just use "defaults".

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-07-17 15:48:43 -04:00
He Zhe
95013501dc lxc: add gmp libidn gnutls nettle rdepends
Fix the following QA warnings:
QA Issue: lxc rdepends on gmp, but it isn't a build dependency,
missing gmp in DEPENDS or PACKAGECONFIG? [build-deps]
QA Issue: lxc rdepends on libidn, but it isn't a build dependency,
missing libidn in DEPENDS or PACKAGECONFIG? [build-deps]
QA Issue: lxc rdepends on gnutls, but it isn't a build dependency,
missing gnutls in DEPENDS or PACKAGECONFIG? [build-deps]
QA Issue: lxc rdepends on nettle, but it isn't a build dependency,
missing nettle in DEPENDS or PACKAGECONFIG? [build-deps]

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-06-27 13:24:03 -04:00
Mark Asselstine
6987659825 lxc: temporary workaround for gcc 7 issue
gcc 7 has a bug:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=11672
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78969

In order to avoid the build failure that this causes we reduce the
range by one. Better to have a slight reduction in the range than
having nobody to be able to build and use lxc.

Once gcc is fixed this can be reverted.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-06-19 08:37:25 -04:00
Huang Qiyu
e73608d56e lxc: 2.0.0 -> 2.0.8
1)Upgrade lxc from 2.0.0 to 2.0.8.

2)Delete two patches, since it is integrated upstream.
  Delete Generate-lxc-restore-net-properly.patch,this script has already been rearchitected out of existence by cba98d127bf490b018a016b792ae05fd2d29c5ee

  Delete Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch,this script has already been rearchitected out of existence by af6824fce9c9536fbcabef8d5547f6c486f55fdf from git://github.com/lxc/lxc.git

3)Modify two patches, since the data has been changed.
  automake-ensure-VPATH-builds-correctly.patch
  runtest.patch

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-06-13 18:26:15 -04:00
Jonatan Pålsson
ea05b2693a lxc: Add lua to PACKAGECONFIG
Lua support is automatically enabled when configuring LXC if lua is
available in the sysroot. The packaging step will fail since the lua
related files are not in FILES.

This patch explicitly enables/disables lua support using PACKAGECONFIG,
and also adds lua-related files to FILES.

Signed-off-by: Jonatan Pålsson <jonatan.palsson@pelagicore.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-03-28 09:09:41 -04:00
Khem Raj
e858c02c42 lxc: Remove gcc-5 specific workaround
We are using gcc6 now

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-03-24 09:28:24 -04:00
Khem Raj
ada96ec99c lxc: rdepend on glibc-utils when using glibc only
glibc-utils is only provided by glibc therefore
add it with glibc overrides.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-03-21 16:28:09 -04:00
Amarnath Valluri
0343d3f8bb lxc: Make use of bitbake variables where appropriate.
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-02-09 09:13:57 -05:00
Mark Asselstine
a9616ca504 lxc: fixup builds with newer glibc
The poky/oe-core commit [glibc: Upgrade to 2.25 snapshot] brought with
it a change that has apparently been in the works for a while, to move
major() and minor() definitions from <sys/types.h> to
<sys/sysmacros.h>. This version of glibc took the step of adding a
warning about this change which results in the build failure of lxc
since we build with -Werror:

  | lxclvm.c:139:13: error: In the GNU C Library, "major" is defined
  |  by <sys/sysmacros.h>. For historical compatibility, it is
  |  currently defined by <sys/types.h> as well, but we plan to
  |  remove this soon. To use "major", include <sys/sysmacros.h>
  |  directly. If you did not intend to use a system-defined macro
  |  "major", you should undefine it after including <sys/types.h>. [-Werror]
  |     major(statbuf.st_rdev), minor(statbuf.st_rdev));
  |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Instead of dropping -Werror we are opting instead to apply the
upstream fix for this since it is available and applies relatively
cleanly.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-02-02 15:55:38 -05:00