summaryrefslogtreecommitdiff
path: root/app-emulation
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2017-01-24 22:33:23 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2017-01-24 22:33:23 +0300
commit0d640bfbfabe7eb40b0bd5a5ee9aef7a2dc2f125 (patch)
tree9c8802507e2d351889d022caf0dcd91a8f41f658 /app-emulation
parentd07d23880582ec68c76dd41f5b2f0542db24c3e8 (diff)
added lxc-scm
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/lxc/Manifest29
-rw-r--r--app-emulation/lxc/files/lxc-2.0.5-omit-sysconfig.patch5
-rw-r--r--app-emulation/lxc/files/lxc-2.0.6-major.patch74
-rw-r--r--app-emulation/lxc/files/lxc-scm-bash-completion.patch27
-rw-r--r--app-emulation/lxc/files/lxc.initd.3118
-rw-r--r--app-emulation/lxc/files/lxc.initd.5119
-rw-r--r--app-emulation/lxc/files/lxc_at.service12
-rw-r--r--app-emulation/lxc/files/lxc_at.service.414
-rw-r--r--app-emulation/lxc/lxc-scm.ebuild203
-rw-r--r--app-emulation/lxc/metadata.xml23
10 files changed, 624 insertions, 0 deletions
diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest
new file mode 100644
index 0000000..7cfcc27
--- /dev/null
+++ b/app-emulation/lxc/Manifest
@@ -0,0 +1,29 @@
+AUX lxc-1.0.6-bash-completion.patch 1341 SHA256 ddac7cc033a4029f8264d06978321bb33ef7c4fd34c9a44bb1acaaaf1c85d302 SHA512 56b00f77812c0600a8ff7557ef0acf7f50d37bb9f6e5b3641c9a218a53ac64a59785430d0775c1c7980ac39120a2544fd7c28cf39fefc07e7f1558f88b9b5917 WHIRLPOOL b3ff9a377d7d29fa76b6d547f2d1b1621c5ab52e972a9b52389c269f26ba9f43eae6a414db46135be84f1ed91ebea9d6d24cc25da11f493dc86fee088e90bfb4
+AUX lxc-1.0.8-bash-completion.patch 1324 SHA256 efadb125a43665ad60bb80a773fec517d2440cfc848fb9072be9db705378b45e SHA512 0d6293efa1080b568f8f2d64f41406ae6f07109eeb80e3d2a509246fa145c70c4128c4b8c38347b5b7e9bb0a69e2cc11f0c4e8e3ac2b6f74b57836216e5290db WHIRLPOOL 9f7fd01e8befa4e41079030ab55daefd95f7d3023d9aff1630da7d13aed1fca1bb1b6969332e3dcc052d02ece146bd3fdd249f9541d70cbee0668eb6eaaf3261
+AUX lxc-2.0.3-bash-completion.patch 1221 SHA256 ada52a06cb9ef871d6c92fbcfbd28b5484b597812c4429e03d61db0cc66206d8 SHA512 8380c1fecef8e158cc076bf9dc7556e855c202a246ae062168055b45b1ecd893ef7f188e7a784605dfe7963817a8e33fe7fc7d836b72757c913215aa06c750d0 WHIRLPOOL b9b1249bab9c51400cd3ff74d77423fe25f0b61d0f3c59c425e36e3079c5337ddacb7e062cb85536f8c46d584c029be6cdaf68c44edf34b60fa80baa0bf08511
+AUX lxc-2.0.3-omit-sysconfig.patch 285 SHA256 3046a6e31406e614c76feb7b72d19f66d0bb8874f05b39f6a48fdf1878e9f972 SHA512 3fac46c73a8c3c542d5f94b4d2e39d4c240f598090927a042d1dfbeac887444a905c7bba8fd03d58dd5436a4ef4d109c45c33e1a8917e9ec1d24f1ca7240549f WHIRLPOOL 45fd9e7be9f976ed3774f4d90ddf4496d59425de5ff55d5bfc2322dae01bf6df90e3b139c1ef437e202bb3b6cabc8b4edb90a93f22efd981fac82e06e8081b4e
+AUX lxc-2.0.4-bash-completion.patch 1169 SHA256 b5f219e0fd7eaff5e574222f87309c2826d23049c73b392bf4369d33773db52c SHA512 02f875c1f04e973f79b0b963999526e4a689e6e0e2eae5d652445b130a943b6f181ee5f4389f7fc91f0109da236419b661437e9f2e8e5144a1ae23216f09b820 WHIRLPOOL c0984cb8dac366399d97664509efb685349639f635eeae00602277974110ac1dafd1cc6b4c46f8abf4e16abe8bd20ec337324716521fa159b597ed945c8947b5
+AUX lxc-2.0.4-omit-sysconfig.patch 259 SHA256 2dc717dfa8afd2823a38aeb4de72d1594b59d51ce182e71dd41b00109901fdff SHA512 0aed9aca687accc6df79e97f48ab333043256e8ae68c8643f2b2452cc8013191238867d64ec71f7d399c59a43d3ba698b35d965090c5cb149b4f41302432e6e7 WHIRLPOOL 5dbad4a04955c818e010f5229c3d061c841d1d12ad2cd7f585343fb1f5d42362aa37842149399570a0abe45cae0f4be60f3fe8e4281a473e1657edf9da039fe5
+AUX lxc-2.0.5-bash-completion.patch 1169 SHA256 b5f219e0fd7eaff5e574222f87309c2826d23049c73b392bf4369d33773db52c SHA512 02f875c1f04e973f79b0b963999526e4a689e6e0e2eae5d652445b130a943b6f181ee5f4389f7fc91f0109da236419b661437e9f2e8e5144a1ae23216f09b820 WHIRLPOOL c0984cb8dac366399d97664509efb685349639f635eeae00602277974110ac1dafd1cc6b4c46f8abf4e16abe8bd20ec337324716521fa159b597ed945c8947b5
+AUX lxc-2.0.5-omit-sysconfig.patch 259 SHA256 2dc717dfa8afd2823a38aeb4de72d1594b59d51ce182e71dd41b00109901fdff SHA512 0aed9aca687accc6df79e97f48ab333043256e8ae68c8643f2b2452cc8013191238867d64ec71f7d399c59a43d3ba698b35d965090c5cb149b4f41302432e6e7 WHIRLPOOL 5dbad4a04955c818e010f5229c3d061c841d1d12ad2cd7f585343fb1f5d42362aa37842149399570a0abe45cae0f4be60f3fe8e4281a473e1657edf9da039fe5
+AUX lxc-2.0.6-bash-completion.patch 919 SHA256 44c354c90d85371654d77337c8daeca34c0b22a76a424d67b76e38daa960a1fd SHA512 caa90c8bad2a79b4e42b781f00d6f2a7be37fc5c5301592b026c88db2652c90871be940c86a9156f03bc186f76cf2068a2d3084e9abc7a5896ea081885085d41 WHIRLPOOL caf8b079f994db0a3139b6bc77b50f3510ec7fee91ba902d9f4f562a06e40110eea01c02c4427a85daae480dcce1e4cc352e6e00cf4b200cad3dd758fd573133
+AUX lxc-2.0.6-major.patch 1834 SHA256 c0095581ab6f92e6cdbfc8298af08f1fbcbff98cf6d107b925489fd7253e418d SHA512 274e2d138e32645aca2ab954e24db02c4d7c5750a781ebf3d81c69c7eeade06b33a3c8ac36a16548a58f6d7f518977fb2df09e22de96d966de542f470720b398 WHIRLPOOL 386ac9236f5b6ff7ed721f1d0aeace99598a62f42c06423b268f1b75bc96aa446a7dcedf41c3fe131ec21dbdf670b3308d957ae508ca125623656eb06fdd2638
+AUX lxc.initd.3 3280 SHA256 90cd9feec284303010507c9b2e32f1ff8d37bb787f667153ef9a284d09dbba1e SHA512 ab675935ac7d928ad0e4155d8a9085d3b91e804994a1ebd787434f8054beb86c2328fd0a1536f292e6d76e9eff46b20a79357b8fcda58668bd63b90eaf24a547 WHIRLPOOL 822ffcf3fb8552eb8599e4fe1147b2b6007fcda44a3968916048ba8565311895cf4f08b1a0a9a269068d9927b3ab4303efb34b627ef352aceeacc3ad1f15926b
+AUX lxc.initd.5 3289 SHA256 a123a414f2465e95c66f5ecb5e40a37085d7356cc9e3ffdefddf75432a3bac93 SHA512 c1dc92c3265147e6e0bb9b7f4bfbcf1519c7493fb12f4227026c283629088da52b1a3b96a3eb04e1e0f745b2270d38b701e1a1ae7deb7d641777192308c8bff3 WHIRLPOOL 0ed6e1bbd3a1040e763a55e2f5f5bfac57222582a26762f180af731ae179df834881f0645ecf8bc2d0de96e2d12592daba90f1fbe378bded20f51e8104a732bf
+AUX lxc_at.service 232 SHA256 0aaf2f362b3ac6aa2b427d47ac4436d46387624b0d8bc4850c5d5b6a7d228711 SHA512 4c3bab4f2cc9aea8b0753dcaf2fd7ed5f1cd7d97d286d6204b2fc17505b6edaac2f536bbda5c1466856311d0e93d75de91dec51e9b0f665d67afedbf40c19170 WHIRLPOOL f6928b4b85e63c38295cabc651b7bd61d2b0bc69ff1850de7cfa8a4f40e4894d94264c262fec7d345488cace49c4283f932739313b975f6862c1aa0ef51e0652
+AUX lxc_at.service.4 265 SHA256 194ce2917e99a5050dd793bc31c7d4393f61a9244aaa2f59109eaf8bebfe44fd SHA512 d61e7103e90e6ffb3202533e7d7555d8c02b943f06ec6c0d673713c1c0ede58641312c65d6dd6a15907c1171522e6148c2313d7b11acbd85d59fe65758cd52b3 WHIRLPOOL 55892d9cc5ff8cd8ca95ccae65abbb9735904cf1aba6ea33008349bbe4ea2ac01f83307998e90265b7dd2127761c05199be4f7133f21af1490bda40bf18a2873
+DIST lxc-1.0.7.tar.gz 564985 SHA256 a0b1b09592e076e270dcb3ba004616d9ac3147f9de0b78ca39a30f8956b0a8f2 SHA512 e6ff42a7b41177e1be0d2cd47d4c554565c7fc35355f3aa8aeba00d4adc7a0f364ecd060ddb6c97b2fe5968329c4e4c4b3cb022bffd2da145f30880f077264a8 WHIRLPOOL f07e5e9efb8ff394aa9cdd6c3e725b453c8137ec221399cbf910d57dbc9268fc84e7227273567792821415dc14e774942b76a58a1a478de57d5c82e545702000
+DIST lxc-1.0.8.tar.gz 575127 SHA256 399ac3eb4e0a89d657fb2e2a57f686ed061d3f1ea4733e7521b1539e9906c7ee SHA512 f552a4f48bb47d26c6b9ddaf8221a439c0848e3f54ec41b77d54717c21bddd56193941046cc96c699790e8265e762a926469c25ee687adcf7795f2906b1c260a WHIRLPOOL 72cd0b8b0345692dd9a3ed8785ee27f5e575794a96c515db1f1d073c29be4c06ae8c1ee24fa375a5ede2bba2494704916710b2e8814ed991d43330a40dff3d56
+DIST lxc-2.0.3.tar.gz 772448 SHA256 635afa330088fea57883018da326fc72f85460b5a6c7802ad68044381aff14f3 SHA512 df714f189ec7aa681710fbd58405b8958740102032c0130d8a0eaaae0341a9bc91a215136203c404ad79773800f620bf6f71f811b3effe559aed66efa4f34fef WHIRLPOOL 89ce2f6762c7279e24658c1154b5c2960d3db32e0ec3724b338f5d30da77cc0b33a2376e5eebe6d9c356bdd34c2aa9da1e2434aecd7e428fa4b729389e35b862
+DIST lxc-2.0.4.tar.gz 775634 SHA256 57d40234aeecf5b60fb29d563e5a09d6a04c89e1267eb22a6704388ac8573e7b SHA512 3f985bba5aaa8a70f0329316ea4f42ab135d58c47611154c62e103718212a4b2c5e4f25fd45c372424db1fbf40afdc8269ae98655fb3bc8e31085a5d948f702b WHIRLPOOL b001c75d67d676e75b203d789cf2c0643ba9a47aa31965441340b66f28e18371415b9d44ce752e35102bc8677688eec6e586d800a33a2a965c8a046c091ebc06
+DIST lxc-2.0.5.tar.gz 778842 SHA256 1f1c491b2ad5e74a85b8eb791ccac8128e6eaf5ddcc1323e9360997c030f7072 SHA512 8e14036597fa3407c87fb92d13b40bbca9a646d27d817e0a9d20fe626625d6cf04a1df65b1a723391d41a311b9f4f3432b3213004892d64355fe0edc7858cb9f WHIRLPOOL fa6ac86d67fe563f92411cbd09a0d66d729a0a15fe48076b42f4b3996e6b786826990bd51382c14606fd1b5240d413bc8d217fac37becd9baccd89de15d30b22
+DIST lxc-2.0.6.tar.gz 788483 SHA256 8723ef5973a47e7b2c439002c28590d74689e871d36f03089965503c0c0d50b2 SHA512 f44c0498876462d78e57d19816eab666e90470badc2bbd38fed9f504e8b21c3e68e4d0f63a8676fa8716be60481befb3db44098228fd71b480972af2b5dcf1e3 WHIRLPOOL 5bb2648637a46e3547edeba2ad46eb131b2ae194f5efe52a688157cfa3f361f51a832554a94bcd47074e65cbf8d1e1119d23548bdf83ca62c131400c40aff34a
+EBUILD lxc-1.0.7.ebuild 5939 SHA256 6dc84af5d9149a39e0a08b028cb7058edb21c02070cc4acebda43d1fb7fc220b SHA512 07cd73ba16163b9e37f6a4d9dc71d109d31adebb0ede0fd9677e363a82b894f162a371f9c23698449b18492d6b8342a6a4f170ec9535122521de589ae8e1babc WHIRLPOOL 1d0c66a7abf81a517038b9548889cfe90d553d899284acb87956a404589ab6d0cd0d142dcf93dc14ecdb4c3b915164a132b9c054d731ff698e2610e8d9763d51
+EBUILD lxc-1.0.8.ebuild 5939 SHA256 932ae6caef5cff6abd2a87783f6313661da3915c029e3bf6ed20848cd702f398 SHA512 94f1c0ab4aa7ae12d588b7a889e22e19316357f1d573f02cfbb99c66ac63e137d3fea66f30a4177815027ad6d8fbb9389218cedce4dc0cbba1e80a4e604f7bce WHIRLPOOL 44c393e22ee2b4be2d444d94371d0103ee08653c1b842d7cc40c10178fbd630953edc3de6d6f81c6165c799374451aa60e8eb3fe736a57ce5f609c61708f6726
+EBUILD lxc-2.0.3-r1.ebuild 6253 SHA256 bc0069a4e9ffd5a5599b67e79b0fdcff72596e35f54756d0722353214813dd68 SHA512 640ab432abf880bf9661ef7b33024bc6d83168c79fb95aaa35124f219d0f5cfc5ecc8ec8ac2de28adbebc5cd2d2e7250f5f209b743f1306e8af807f970e6bc0d WHIRLPOOL 6b51f24f96442223f0c2eeeb9738ea412fcde848f352b17e88959efa8aa865dafc26a525bb5e4d69fcf30ad3625653b9e3dd2bcf067304a6d37ec396e2c2a056
+EBUILD lxc-2.0.4.ebuild 6316 SHA256 dd0fa51902b482c5b175351c2b1cbc65b503fe4f50e1b2ea5e42816ee4318124 SHA512 4d2f886867553672930945d15c1febe6327f15d68dc4db9f36227fbf44f3aaf9cd492f9eb0eeab5c99d08b8dbb192e7510559f1006217dbd37e3cea0f73ddfe2 WHIRLPOOL 50205fc872bc5bc15f6baf90b21a84419ab5b4316ff29e5cb74d92874ebec3a670ddf47cdf8629a7d9ba8aca52a45277a9a6484875e10c88a8631708fa888008
+EBUILD lxc-2.0.5.ebuild 6316 SHA256 dd0fa51902b482c5b175351c2b1cbc65b503fe4f50e1b2ea5e42816ee4318124 SHA512 4d2f886867553672930945d15c1febe6327f15d68dc4db9f36227fbf44f3aaf9cd492f9eb0eeab5c99d08b8dbb192e7510559f1006217dbd37e3cea0f73ddfe2 WHIRLPOOL 50205fc872bc5bc15f6baf90b21a84419ab5b4316ff29e5cb74d92874ebec3a670ddf47cdf8629a7d9ba8aca52a45277a9a6484875e10c88a8631708fa888008
+EBUILD lxc-2.0.6-r1.ebuild 6369 SHA256 3faa42234c1a15079f83b2d1db593f59c60a301608be037915f946b91a126e79 SHA512 68d865c3c85bf2214c3a156069dbecf73ed5f7bbf5e70eaa2654f78a616033bc0b33c2b5883990442467ba828ef2e3e1c3220c14c613c765417e5f03ec445f11 WHIRLPOOL 08949feae656c7856465308521577548a416be6958932e651e125b8845a17d796558459e9cd53560ccae20108cf93cb0049479f0760ed155ed8c8239d59fed1e
+MISC ChangeLog 8797 SHA256 5711cccd5a871d9fa0df3728422d0bf02db636520f586ad9a332227a429e7b21 SHA512 08ea3917b8b910af4ccbd4986a4147302138bb23a3eee8a0d130ddfbe9ecd3c4044daba508ab4b53542e46ce33dca88328fc7a4652517a258286a2d286dee8ad WHIRLPOOL 5b85b0e1447cea8d93d8c38196624798b7f760803634c546a6e343bcc4804ff6da4cb2152cd584a37487806b2ddb0d9d790229ae2ff1b8754acd48d3ce645290
+MISC ChangeLog-2015 16297 SHA256 14a9b5072facfe49b0c62131adff2be1185bacb7a44a0511fe447e22ac7aeb32 SHA512 d71746fdc367f4e5833ccde0cf1bcc047db4cb0582a00fac51f5b97c3fc1a160e3add6409185f9197faaa58b94f82f8532e7291344e8cc66a6ff49d48aa719c5 WHIRLPOOL fb28525b3c00a96e7f34beb01b28a486e5071041275f332ab0971ec6ae78159ad3361e3280c9d76b66d0ab6ea2aada06eb1d3530f5fb5ade8f80b073a4ce2416
+MISC metadata.xml 731 SHA256 2c6e2462426e79dc3f998ad18998f92c025189249539c5da8640fc52c1357a5f SHA512 846d23bb109f447ee5d81f005441dc714d229c99798de636a5eb3cdb871eebda00386a7e72cabaa46d43f1f5a9b3225e8a3b4c652261ba46903feb129a377af2 WHIRLPOOL 23147231e24de2fa862f0c0d2c1a782e4af02919dd554dfc08bc379408a720c79305dd6903d02840c370c2fa9f545523d93dabaf874fdaf5d9eb0e6e66f27034
diff --git a/app-emulation/lxc/files/lxc-2.0.5-omit-sysconfig.patch b/app-emulation/lxc/files/lxc-2.0.5-omit-sysconfig.patch
new file mode 100644
index 0000000..3ec8135
--- /dev/null
+++ b/app-emulation/lxc/files/lxc-2.0.5-omit-sysconfig.patch
@@ -0,0 +1,5 @@
+--- /config/Makefile.am.orig 2016-05-19 02:56:11.891113982 +0000
++++ /config/Makefile.am 2016-05-19 02:56:32.596115476 +0000
+@@ -1 +1 @@
+-SUBDIRS = apparmor bash etc init selinux templates yum sysconfig
++SUBDIRS = apparmor bash etc init selinux templates yum
diff --git a/app-emulation/lxc/files/lxc-2.0.6-major.patch b/app-emulation/lxc/files/lxc-2.0.6-major.patch
new file mode 100644
index 0000000..beb379a
--- /dev/null
+++ b/app-emulation/lxc/files/lxc-2.0.6-major.patch
@@ -0,0 +1,74 @@
+Adapt to future removal of major()/minor()/makedev() from <sys/types.h>
+
+Gentoo removed it in glibc-2.24.
+
+https://bugs.gentoo.org/575232
+https://bugs.gentoo.org/604360
+diff --git a/configure.ac b/configure.ac
+index 4640c0d..71e6450 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -620,4 +620,7 @@ AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
+ AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.h sys/personality.h utmpx.h sys/timerfd.h])
+
++# lookup major()/minor()/makedev()
++AC_HEADER_MAJOR
++
+ # Check for some syscalls functions
+ AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat])
+diff --git a/src/lxc/bdev/lxclvm.c b/src/lxc/bdev/lxclvm.c
+index 3d41b10..419d1c2 100644
+--- a/src/lxc/bdev/lxclvm.c
++++ b/src/lxc/bdev/lxclvm.c
+@@ -33,8 +33,17 @@
+
+ #include "bdev.h"
++#include "config.h"
+ #include "log.h"
+ #include "lxclvm.h"
+ #include "utils.h"
+
++/* major()/minor() */
++#ifdef MAJOR_IN_MKDEV
++# include <sys/mkdev.h>
++#endif
++#ifdef MAJOR_IN_SYSMACROS
++# include <sys/sysmacros.h>
++#endif
++
+ lxc_log_define(lxclvm, lxc);
+
+diff --git a/src/lxc/conf.c b/src/lxc/conf.c
+index c54ee41..9a00e7f 100644
+--- a/src/lxc/conf.c
++++ b/src/lxc/conf.c
+@@ -40,4 +40,12 @@
+ #include <time.h>
+
++/* makedev() */
++#ifdef MAJOR_IN_MKDEV
++# include <sys/mkdev.h>
++#endif
++#ifdef MAJOR_IN_SYSMACROS
++# include <sys/sysmacros.h>
++#endif
++
+ #ifdef HAVE_STATVFS
+ #include <sys/statvfs.h>
+diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
+index 3a9e1e3..fe75fcc 100644
+--- a/src/lxc/lxccontainer.c
++++ b/src/lxc/lxccontainer.c
+@@ -62,4 +62,12 @@
+ #include "version.h"
+
++/* major()/minor() */
++#ifdef MAJOR_IN_MKDEV
++# include <sys/mkdev.h>
++#endif
++#ifdef MAJOR_IN_SYSMACROS
++# include <sys/sysmacros.h>
++#endif
++
+ #if HAVE_IFADDRS_H
+ #include <ifaddrs.h>
diff --git a/app-emulation/lxc/files/lxc-scm-bash-completion.patch b/app-emulation/lxc/files/lxc-scm-bash-completion.patch
new file mode 100644
index 0000000..6033e36
--- /dev/null
+++ b/app-emulation/lxc/files/lxc-scm-bash-completion.patch
@@ -0,0 +1,27 @@
+diff --git a/config/bash/lxc.in b/config/bash/lxc.in
+index 7dcf302..5927fe2 100644
+--- a/config/bash/lxc.in
++++ b/config/bash/lxc.in
+@@ -1,4 +1,3 @@
+-_have lxc-start && {
+ _lxc_names() {
+ COMPREPLY=( $( compgen -W "$( lxc-ls )" "$cur" ) )
+ }
+@@ -100,4 +99,3 @@ _have lxc-start && {
+
+ complete -o default -F _lxc_generic_o lxc-copy
+ complete -o default -F _lxc_generic_o lxc-start-ephemeral
+-}
+diff --git a/configure.ac b/configure.ac
+index 4640c0d..14ccdd3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -478,7 +478,7 @@ AM_CONDITIONAL([ENABLE_BASH], [test "x$enable_bash" = "xyes"])
+ AM_COND_IF([ENABLE_BASH],
+ [AC_MSG_CHECKING([bash completion directory])
+ PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], ,
+- bashcompdir="${sysconfdir}/bash_completion.d")
++ bashcompdir="$datadir/bash-completion/completions")
+ AC_MSG_RESULT([$bashcompdir])
+ AC_SUBST(bashcompdir)
+ ])
diff --git a/app-emulation/lxc/files/lxc.initd.3 b/app-emulation/lxc/files/lxc.initd.3
new file mode 100644
index 0000000..7f12438
--- /dev/null
+++ b/app-emulation/lxc/files/lxc.initd.3
@@ -0,0 +1,118 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CONTAINER=${SVCNAME#*.}
+
+LXC_PATH=`lxc-config lxc.lxcpath`
+
+lxc_get_configfile() {
+ if [ -f "${LXC_PATH}/${CONTAINER}.conf" ]; then
+ echo "${LXC_PATH}/${CONTAINER}.conf"
+ elif [ -f "${LXC_PATH}/${CONTAINER}/config" ]; then
+ echo "${LXC_PATH}/${CONTAINER}/config"
+ else
+ eerror "Unable to find a suitable configuration file."
+ eerror "If you set up the container in a non-standard"
+ eerror "location, please set the CONFIGFILE variable."
+ return 1
+ fi
+}
+
+[ $CONTAINER != $SVCNAME ] && CONFIGFILE=${CONFIGFILE:-$(lxc_get_configfile)}
+
+lxc_get_var() {
+ awk 'BEGIN { FS="[ \t]*=[ \t]*" } $1 == "'$1'" { print $2; exit }' ${CONFIGFILE}
+}
+
+lxc_get_net_link_type() {
+ awk 'BEGIN { FS="[ \t]*=[ \t]*"; _link=""; _type="" }
+ $1 == "lxc.network.type" {_type=$2;}
+ $1 == "lxc.network.link" {_link=$2;}
+ {if(_link != "" && _type != ""){
+ printf("%s:%s\n", _link, _type );
+ _link=""; _type="";
+ }; }' <${CONFIGFILE}
+}
+
+checkconfig() {
+ if [ ${CONTAINER} = ${SVCNAME} ]; then
+ eerror "You have to create an init script for each container:"
+ eerror " ln -s lxc /etc/init.d/lxc.container"
+ return 1
+ fi
+
+ # no need to output anything, the function takes care of that.
+ [ -z "${CONFIGFILE}" ] && return 1
+
+ utsname=$(lxc_get_var lxc.utsname)
+ if [ ${CONTAINER} != ${utsname} ]; then
+ eerror "You should use the same name for the service and the"
+ eerror "container. Right now the container is called ${utsname}"
+ return 1
+ fi
+}
+
+depend() {
+ # be quiet, since we have to run depend() also for the
+ # non-muxed init script, unfortunately.
+ checkconfig 2>/dev/null || return 0
+
+ config ${CONFIGFILE}
+ need localmount
+
+ local _x _if
+ for _x in $(lxc_get_net_link_type); do
+ _if=${_x%:*}
+ case "${_x##*:}" in
+ # when the network type is set to phys, we can make use of a
+ # network service (for instance to set it up before we disable
+ # the net_admin capability), but we might also not set it up
+ # at all on the host and leave the net_admin capable service
+ # to take care of it.
+ phys) use net.${_if} ;;
+ *) need net.${_if} ;;
+ esac
+ done
+}
+
+start() {
+ checkconfig || return 1
+ rm -f /var/log/lxc/${CONTAINER}.log
+
+ rootpath=$(lxc_get_var lxc.rootfs)
+
+ # Check the format of our init and the chroot's init, to see
+ # if we have to use linux32 or linux64; always use setarch
+ # when required, as that makes it easier to deal with
+ # x32-based containers.
+ case $(scanelf -BF '%a#f' ${rootpath}/sbin/init) in
+ EM_X86_64) setarch=linux64;;
+ EM_386) setarch=linux32;;
+ esac
+
+ ebegin "Starting ${CONTAINER}"
+ env -i ${setarch} $(type -p lxc-start) -l WARN -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log
+ sleep 0.5
+
+ # lxc-start -d will _always_ report a correct startup, even if it
+ # failed, so rather than trust that, check that the cgroup exists.
+ [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+
+
+ if ! [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]; then
+ ewarn "${CONTAINER} doesn't seem to be started."
+ return 0
+ fi
+
+ # 10s should be enough to shut everything down
+ ebegin "Stopping ${CONTAINER}"
+ lxc-stop -t 10 -n ${CONTAINER}
+ eend $?
+}
diff --git a/app-emulation/lxc/files/lxc.initd.5 b/app-emulation/lxc/files/lxc.initd.5
new file mode 100644
index 0000000..e5a5236
--- /dev/null
+++ b/app-emulation/lxc/files/lxc.initd.5
@@ -0,0 +1,119 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CONTAINER=${SVCNAME#*.}
+
+LXC_PATH=`lxc-config lxc.lxcpath`
+
+lxc_get_configfile() {
+ if [ -f "${LXC_PATH}/${CONTAINER}.conf" ]; then
+ echo "${LXC_PATH}/${CONTAINER}.conf"
+ elif [ -f "${LXC_PATH}/${CONTAINER}/config" ]; then
+ echo "${LXC_PATH}/${CONTAINER}/config"
+ else
+ eerror "Unable to find a suitable configuration file."
+ eerror "If you set up the container in a non-standard"
+ eerror "location, please set the CONFIGFILE variable."
+ return 1
+ fi
+}
+
+[ $CONTAINER != $SVCNAME ] && CONFIGFILE=${CONFIGFILE:-$(lxc_get_configfile)}
+
+lxc_get_var() {
+ awk 'BEGIN { FS="[ \t]*=[ \t]*" } $1 == "'$1'" { print $2; exit }' ${CONFIGFILE}
+}
+
+lxc_get_net_link_type() {
+ awk 'BEGIN { FS="[ \t]*=[ \t]*"; _link=""; _type="" }
+ $1 == "lxc.network.type" {_type=$2;}
+ $1 == "lxc.network.link" {_link=$2;}
+ {if(_link != "" && _type != ""){
+ printf("%s:%s\n", _link, _type );
+ _link=""; _type="";
+ }; }' <${CONFIGFILE}
+}
+
+checkconfig() {
+ if [ ${CONTAINER} = ${SVCNAME} ]; then
+ eerror "You have to create an init script for each container:"
+ eerror " ln -s lxc /etc/init.d/lxc.container"
+ return 1
+ fi
+
+ # no need to output anything, the function takes care of that.
+ [ -z "${CONFIGFILE}" ] && return 1
+
+ utsname=$(lxc_get_var lxc.utsname)
+ if [ ${CONTAINER} != ${utsname} ]; then
+ eerror "You should use the same name for the service and the"
+ eerror "container. Right now the container is called ${utsname}"
+ return 1
+ fi
+}
+
+depend() {
+ # be quiet, since we have to run depend() also for the
+ # non-muxed init script, unfortunately.
+ checkconfig 2>/dev/null || return 0
+
+ config ${CONFIGFILE}
+ need localmount
+ use lxcfs
+
+ local _x _if
+ for _x in $(lxc_get_net_link_type); do
+ _if=${_x%:*}
+ case "${_x##*:}" in
+ # when the network type is set to phys, we can make use of a
+ # network service (for instance to set it up before we disable
+ # the net_admin capability), but we might also not set it up
+ # at all on the host and leave the net_admin capable service
+ # to take care of it.
+ phys) use net.${_if} ;;
+ *) need net.${_if} ;;
+ esac
+ done
+}
+
+start() {
+ checkconfig || return 1
+ rm -f /var/log/lxc/${CONTAINER}.log
+
+ rootpath=$(lxc_get_var lxc.rootfs)
+
+ # Check the format of our init and the chroot's init, to see
+ # if we have to use linux32 or linux64; always use setarch
+ # when required, as that makes it easier to deal with
+ # x32-based containers.
+ case $(scanelf -BF '%a#f' ${rootpath}/sbin/init) in
+ EM_X86_64) setarch=linux64;;
+ EM_386) setarch=linux32;;
+ esac
+
+ ebegin "Starting ${CONTAINER}"
+ env -i ${setarch} $(which lxc-start) -l WARN -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log
+ sleep 0.5
+
+ # lxc-start -d will _always_ report a correct startup, even if it
+ # failed, so rather than trust that, check that the cgroup exists.
+ [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+
+
+ if ! [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]; then
+ ewarn "${CONTAINER} doesn't seem to be started."
+ return 0
+ fi
+
+ # 10s should be enough to shut everything down
+ ebegin "Stopping ${CONTAINER}"
+ lxc-stop -t 10 -n ${CONTAINER}
+ eend $?
+}
diff --git a/app-emulation/lxc/files/lxc_at.service b/app-emulation/lxc/files/lxc_at.service
new file mode 100644
index 0000000..1ef4497
--- /dev/null
+++ b/app-emulation/lxc/files/lxc_at.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Linux Container %I
+After=network.target
+
+[Service]
+Restart=always
+ExecStart=/usr/sbin/lxc-start -n %i
+ExecReload=/usr/sbin/lxc-restart -n %i
+ExecStop=/usr/sbin/lxc-stop -n %i
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-emulation/lxc/files/lxc_at.service.4 b/app-emulation/lxc/files/lxc_at.service.4
new file mode 100644
index 0000000..64ae745
--- /dev/null
+++ b/app-emulation/lxc/files/lxc_at.service.4
@@ -0,0 +1,14 @@
+[Unit]
+Description=Linux Container %I
+After=network.target
+Wants=lxcfs.service
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/lxc-start -n %i -F
+ExecReload=/usr/bin/lxc-restart -n %i
+ExecStop=/usr/bin/lxc-stop -n %i
+Delegate=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-emulation/lxc/lxc-scm.ebuild b/app-emulation/lxc/lxc-scm.ebuild
new file mode 100644
index 0000000..f0a9cf8
--- /dev/null
+++ b/app-emulation/lxc/lxc-scm.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+#MY_P="${P/_/-}"
+PYTHON_COMPAT=( python{3_4,3_5} )
+DISTUTILS_OPTIONAL=1
+
+inherit autotools bash-completion-r1 distutils-r1 linux-info versionator flag-o-matic systemd git-r3
+
+DESCRIPTION="LinuX Containers userspace utilities"
+HOMEPAGE="https://linuxcontainers.org/"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/lxc/lxc.git"
+
+KEYWORDS="~amd64 ~arm ~arm64"
+
+LICENSE="LGPL-3"
+SLOT="0"
+IUSE="cgmanager doc examples lua python seccomp"
+
+RDEPEND="net-libs/gnutls
+ sys-libs/libcap
+ cgmanager? ( app-admin/cgmanager )
+ lua? ( >=dev-lang/lua-5.1:= )
+ python? ( ${PYTHON_DEPS} )
+ seccomp? ( sys-libs/libseccomp )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook-sgml-utils )
+ >=sys-kernel/linux-headers-3.2"
+
+RDEPEND="${RDEPEND}
+ sys-process/criu
+ sys-apps/util-linux
+ app-misc/pax-utils
+ virtual/awk"
+
+CONFIG_CHECK="~CGROUPS ~CGROUP_DEVICE
+ ~CPUSETS ~CGROUP_CPUACCT
+ ~CGROUP_SCHED
+
+ ~NAMESPACES
+ ~IPC_NS ~USER_NS ~PID_NS
+
+ ~NETLINK_DIAG ~PACKET_DIAG
+ ~INET_UDP_DIAG ~INET_TCP_DIAG
+ ~UNIX_DIAG ~CHECKPOINT_RESTORE
+
+ ~CGROUP_FREEZER
+ ~UTS_NS ~NET_NS
+ ~VETH ~MACVLAN
+
+ ~POSIX_MQUEUE
+ ~!NETPRIO_CGROUP
+
+ ~!GRKERNSEC_CHROOT_MOUNT
+ ~!GRKERNSEC_CHROOT_DOUBLE
+ ~!GRKERNSEC_CHROOT_PIVOT
+ ~!GRKERNSEC_CHROOT_CHMOD
+ ~!GRKERNSEC_CHROOT_CAPS
+ ~!GRKERNSEC_PROC
+ ~!GRKERNSEC_SYSFS_RESTRICT
+"
+
+ERROR_DEVPTS_MULTIPLE_INSTANCES="CONFIG_DEVPTS_MULTIPLE_INSTANCES: needed for pts inside container"
+
+ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
+
+ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
+ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
+
+ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
+ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
+
+ERROR_NETLINK_DIAG="CONFIG_NETLINK_DIAG: needed for lxc-checkpoint"
+ERROR_PACKET_DIAG="CONFIG_PACKET_DIAG: needed for lxc-checkpoint"
+ERROR_INET_UDP_DIAG="CONFIG_INET_UDP_DIAG: needed for lxc-checkpoint"
+ERROR_INET_TCP_DIAG="CONFIG_INET_TCP_DIAG: needed for lxc-checkpoint"
+ERROR_UNIX_DIAG="CONFIG_UNIX_DIAG: needed for lxc-checkpoint"
+ERROR_CHECKPOINT_RESTORE="CONFIG_CHECKPOINT_RESTORE: needed for lxc-checkpoint"
+
+ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command"
+
+ERROR_NETPRIO_CGROUP="CONFIG_NETPRIO_CGROUP: as of kernel 3.3 and lxc 0.8.0_rc1 this causes LXCs to fail booting."
+
+ERROR_GRKERNSEC_CHROOT_MOUNT="CONFIG_GRKERNSEC_CHROOT_MOUNT: some GRSEC features make LXC unusable see postinst notes"
+ERROR_GRKERNSEC_CHROOT_DOUBLE="CONFIG_GRKERNSEC_CHROOT_DOUBLE: some GRSEC features make LXC unusable see postinst notes"
+ERROR_GRKERNSEC_CHROOT_PIVOT="CONFIG_GRKERNSEC_CHROOT_PIVOT: some GRSEC features make LXC unusable see postinst notes"
+ERROR_GRKERNSEC_CHROOT_CHMOD="CONFIG_GRKERNSEC_CHROOT_CHMOD: some GRSEC features make LXC unusable see postinst notes"
+ERROR_GRKERNSEC_CHROOT_CAPS="CONFIG_GRKERNSEC_CHROOT_CAPS: some GRSEC features make LXC unusable see postinst notes"
+ERROR_GRKERNSEC_PROC="CONFIG_GRKERNSEC_PROC: this GRSEC feature is incompatible with unprivileged containers"
+ERROR_GRKERNSEC_SYSFS_RESTRICT="CONFIG_GRKERNSEC_SYSFS_RESTRICT: this GRSEC feature is incompatible with unprivileged containers"
+
+DOCS=(AUTHORS CONTRIBUTING MAINTAINERS NEWS README doc/FAQ.txt)
+
+#S="${WORKDIR}/${PN}-${MY_P}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ kernel_is -lt 4 7 && CONFIG_CHECK="${CONFIG_CHECK} ~DEVPTS_MULTIPLE_INSTANCES"
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}"/${P}-bash-completion.patch
+ #558854
+ eapply "${FILESDIR}"/${PN}-2.0.5-omit-sysconfig.patch
+ eapply "${FILESDIR}"/${PN}-2.0.6-major.patch
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ if use python; then
+ #541932
+ python_setup "python3*"
+ export PKG_CONFIG_PATH="${T}/${EPYTHON}/pkgconfig:${PKG_CONFIG_PATH}"
+ fi
+
+ # I am not sure about the --with-rootfs-path
+ # /var/lib/lxc is probably more appropriate than
+ # /usr/lib/lxc.
+ econf \
+ --localstatedir=/var \
+ --bindir=/usr/bin \
+ --sbindir=/usr/bin \
+ --with-config-path=/var/lib/lxc \
+ --with-rootfs-path=/var/lib/lxc/rootfs \
+ --with-distro=gentoo \
+ --with-runtime-path=/run \
+ --disable-apparmor \
+ $(use_enable cgmanager) \
+ $(use_enable doc) \
+ $(use_enable examples) \
+ $(use_enable lua) \
+ $(use_enable python) \
+ $(use_enable seccomp)
+}
+
+python_compile() {
+ distutils-r1_python_compile build_ext -I ../ -L ../${PN}
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ pushd "${S}/src/python-${PN}" > /dev/null
+ distutils-r1_src_compile
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ default
+
+ mv "${ED}"/usr/share/bash-completion/completions/${PN} "${ED}"/$(get_bashcompdir)/${PN}-start || die
+ # start-ephemeral is no longer a command but removing it here
+ # generates QA warnings (still in upstream completion script)
+ bashcomp_alias ${PN}-start \
+ ${PN}-{attach,cgroup,copy,console,create,destroy,device,execute,freeze,info,monitor,snapshot,start-ephemeral,stop,unfreeze,wait}
+
+ if use python; then
+ pushd "${S}/src/python-lxc" > /dev/null
+ # Unset DOCS. This has been handled by the default target
+ unset DOCS
+ distutils-r1_src_install
+ popd > /dev/null
+ fi
+
+ keepdir /etc/lxc /var/lib/lxc/rootfs /var/log/lxc
+
+ find "${D}" -name '*.la' -delete
+
+ # Gentoo-specific additions!
+ newinitd "${FILESDIR}/${PN}.initd.5" ${PN}
+
+ # Remember to compare our systemd unit file with the upstream one
+ # config/init/systemd/lxc.service.in
+ systemd_newunit "${FILESDIR}"/${PN}_at.service.4 "lxc@.service"
+}
+
+pkg_postinst() {
+ elog ""
+ elog "Starting from version ${PN}-1.1.0-r3, the default lxc path has been"
+ elog "moved from /etc/lxc to /var/lib/lxc. If you still want to use /etc/lxc"
+ elog "please add the following to your /etc/lxc/default.conf"
+ elog "lxc.lxcpath = /etc/lxc"
+ elog ""
+ elog "There is an init script provided with the package now; no documentation"
+ elog "is currently available though, so please check out /etc/init.d/lxc ."
+ elog "You _should_ only need to symlink it to /etc/init.d/lxc.configname"
+ elog "to start the container defined into /etc/lxc/configname.conf ."
+ elog "For further information about LXC development see"
+ elog "http://blog.flameeyes.eu/tag/lxc" # remove once proper doc is available
+ elog ""
+}
diff --git a/app-emulation/lxc/metadata.xml b/app-emulation/lxc/metadata.xml
new file mode 100644
index 0000000..fd6451f
--- /dev/null
+++ b/app-emulation/lxc/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dev-zero@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>hwoarang@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>stasibear@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>virtualization@gentoo.org</email>
+ <name>Gentoo Virtualization Project</name>
+ </maintainer>
+ <use>
+ <flag name="cgmanager">Enable support for cgroup management using <pkg>app-admin/cgmanager</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="github">lxc/lxc</remote-id>
+ </upstream>
+</pkgmetadata>