mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-04 23:13:30 +00:00
![]() Hey all! Patch for the Fedora template. Several things... 1) A month or so ago, I floated an idea of adding an option for utsname which Serge seemed to like but we let it float for more feedback (none came). 2) In private mail to Serge and Stéphane I mentioned the idea of using the CPE (Common Platform Enumeration) for host distro and version identification. I heard back from Serge but not Stéphane. CPE is a standard promoted by NIST and Mitre (along with CVE and CVSS) as part of the security community as a common identification mechanism. It's supported by RedHat based distros and many others (notable exception Ubuntu). I've patched the Fedora template to parse first the /etc/os-release file or, alternatively, the /etc/system-release-cpe file for the distro ID and version instead of the human readable /etc/redhat-release. There's more that can be done with that in the realm of cross distro container builds, I suspect. 3) At the time of working on 1&2 I noticed that the retry logic in the Fedora template just didn't seem right. I believe I posted a message asking for clarification on that behavior. A recently post in the -users list indicating that someone could not create a Fedora 19 container (because the release ver string was 19-2 and the template was only looking for -1) prompted me to rework the retry logic for handling the mirror list and servers as well as revamp the download logic to properly identify the correct release package. The patch for all of the above is attached below the jump. It's been tested on Fedora 17 through Fedora 19 hosts and has created containers for F11, F12, F13, F14, F16, F17, F18, and F19. F15 failed for rpm dependency issues that are not worth fixing (IMHO). Regards, Mike -- Michael H. Warfield (AI4NB) | (770) 985-6132 | mhw@WittsEnd.com /\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it! -- Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com> Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> |
||
---|---|---|
config | ||
doc | ||
hooks | ||
src | ||
templates | ||
.gitignore | ||
AUTHORS | ||
autogen.sh | ||
configure.ac | ||
CONTRIBUTING | ||
COPYING | ||
INSTALL | ||
lxc.pc.in | ||
lxc.spec.in | ||
MAINTAINERS | ||
Makefile.am | ||
NEWS | ||
README | ||
runapitests.sh | ||
TODO |
Please see the COPYING file for details on copying and usage. Please refer to the INSTALL file for instructions on how to build. What is lxc: The container technology is actively being pushed into the mainstream linux kernel. It provides the resource management through the control groups aka process containers and resource isolation through the namespaces. The linux containers, lxc, aims to use these new functionalities to pro- vide an userspace container object which provides full resource isolation and resource control for an applications or a system. The first objective of this project is to make the life easier for the ker- nel developers involved in the containers project and especially to con- tinue working on the Checkpoint/Restart new features. The lxc is small enough to easily manage a container with simple command lines and complete enough to be used for other purposes. Using lxc: Refer the lxc* man pages (generated from doc/* files) Downloading the current source code: Source for the latest released version can always be downloaded from http://lxc.sourceforge.net/download/lxc You can browse the up to the minute source code and change history online. http://lxc.git.sourceforge.net For an even more bleeding edge experience, you may want to look at the staging branch where all changes aimed at the next release land before getting pulled into the master branch. http://github.com/lxc/lxc For detailed build instruction refer to INSTALL and man lxc man page but a short command line should work: ./autogen.sh && ./configure && make && sudo make install preceded by ./autogen.sh if configure do not exist yet. Troubleshooting: If the ./autogen.sh script shows the following message: "aclocal: not found", you are likely missing the "automake" package. Make sure it's installed and try again. If the ./configure script gives you the following message: "configure: error: Please install the libcap development files." you are likely missing the "libcap-dev" package. The configure script will usually give you hints as to what you are missing, looking for those in your package manager will usually give you the package that you need to install. Getting help: when you find you need help, you can check out one of the two lxc mailing list archives and register if interested: https://lists.sourceforge.net/lists/listinfo/lxc-devel https://lists.sourceforge.net/lists/listinfo/lxc-users Portability: lxc is still in development, so the command syntax and the API can change. The version 1.0.0 will be the frozen version. lxc is developed and tested on Linux since kernel mainline version 2.6.27 (without network) and 2.6.29 with network isolation. It's compiled with gcc, and should work on most architectures as long as the required kernel features are available. This includes (but isn't limited to): i686, x86_64, ppc, ppc64, S390, armel and armhf. AUTHOR Daniel Lezcano <daniel.lezcano@free.fr> Seccomp with LXC ---------------- To restrict a container with seccomp, you must specify a profile which is basically a whitelist of system calls it may execute. In the container config file, add a line like lxc.seccomp = /var/lib/lxc/q1/seccomp.full I created a usable (but basically worthless) seccomp.full file using cat > seccomp.full << EOF 1 whitelist EOF for i in `seq 0 300`; do echo $i >> seccomp.full done for i in `seq 1024 1079`; do echo $i >> seccomp.full done -- Serge Hallyn <serge.hallyn@ubuntu.com> Fri, 27 Jul 2012 15:47:02 +0600