diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-10-30 15:46:36 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-10-30 15:46:36 +0000 |
commit | 691395139ec5ea80983f870451c53bb6fff8298a (patch) | |
tree | 6a38689d6e69bebf65189be0d9d4e1c73ff7f4da /app-containers/incus | |
parent | 310615add7b4be144ba0a7d7a156fe2c7949116d (diff) |
gentoo auto-resync : 30:10:2023 - 15:46:36
Diffstat (limited to 'app-containers/incus')
-rw-r--r-- | app-containers/incus/Manifest | 3 | ||||
-rw-r--r-- | app-containers/incus/files/incus-0.2-lxd-to-incus-openrc-support.patch | 71 | ||||
-rw-r--r-- | app-containers/incus/incus-0.2-r1.ebuild (renamed from app-containers/incus/incus-0.2.ebuild) | 6 |
3 files changed, 76 insertions, 4 deletions
diff --git a/app-containers/incus/Manifest b/app-containers/incus/Manifest index d353ef876bd8..1db260b292cf 100644 --- a/app-containers/incus/Manifest +++ b/app-containers/incus/Manifest @@ -2,11 +2,12 @@ AUX incus-0.1.confd 604 BLAKE2B 05239d520a5792971dd79a042d0d8ff06414b5822a774065 AUX incus-0.1.initd 1746 BLAKE2B 57cc012f4319717cc43897660c76abdab6a8d2ed4c949848c83760f04937dc2274f15a61d7d794eafaaf16eb9db7a9c3ab3880277de934ff861ec4e8835cd165 SHA512 97ab528676071160cfccdd2c9e1e6a18f9c35fbb11db70f8fcd675e7b1f978a085c084f65801db9dbf8eaffe05fdb8ea006c9a6203d45be89fcbb56bcb145d38 AUX incus-0.1.service 638 BLAKE2B 1478a9e84c63fc2f118f3c08c1473e5ac56ef4689bc6b4cefaf0cab39ada77876bde41ae1d4cc7610aec718bd7252f8349dc2fbecc0de26754c9fdbc485c7121 SHA512 141f0fca28db8f116f333c3bd9eecc10fc0ed3ebbd807d08a953b19ce957c626eb03f5716a2ca74e7d3a63537551acfb78b3decabbae7e135b0a7ac34f52762d AUX incus-0.1.socket 207 BLAKE2B d1fb41c9a90e0f06eb34c466a460e2d202250769ef3db381b35502ffc19f3246af68069bc63ae62ddf6a34d6730b57c2b509f77b7fea8c4fcad24259658be0bb SHA512 55bf659ff4a1095ab922b87ccf4ef01cbcccd897f67406fa2021151f2c6c16fe59590908c6a6026a8db194598f20708cdf4d6d3d27d9438e746d5f6e39444de5 +AUX incus-0.2-lxd-to-incus-openrc-support.patch 2037 BLAKE2B 63c58a3ea9d5cd35e40908749f3ad9570c5188ac7dd08f835c8fe220b0ff18252090991836cd03e2e93456dd1ab86ededce15578218b03c960254ca17fcce759 SHA512 826e74fc0896c73665eb3e2d863f65b40e07ea6f78f2b252a2ad6a951de7b17b3e7b674016563b463d00e543d139485eeb1ea92776bebed76a05ce4f1d864763 AUX incus-containers-0.1.service 338 BLAKE2B af0849575d2d7578634228576fcf449f8ab54b6fa3a974baec4f91009dec4a6e76253f3724c532f38fc7484ccc6caffae4badf1591c1b04abb3414f4959d550c SHA512 9a9b072442a63683cb9ed71d706606da682e821f609f1f4daea0562ddcea1cc2d6157b29fd466e0aeab149f31b54ab0fff4cf41831e6b2378c47619b8dfd0b55 DIST incus-0.1.tar.gz 21498887 BLAKE2B ea200f83922a2f23c8bbc8ce94ccf7df8b7e096adfe6697d94135a4c660a950411e2176f860a63dada12890cde474beb16fcd17a4c52419f1ab86d3625c426e5 SHA512 1cd5410b07ed44f05b19ca3c734a67bde6f85d0e4673e9b46100bb8f2d60889773bcde1a274e96b55651b95414c47abeb6c3f2b8ec8d500d22ef08e31d09d9e6 DIST incus-0.1.tar.gz.asc 833 BLAKE2B 9e2ceedf246e7af20a6d8c0e597f59016a4040c10d547f724a0fa822387bb46c70d0467df583127bea874ded87115844e02191e93ddfd29fc64f3bc0262b7f10 SHA512 de14e530543d861ea3bdffe8d4b88a140f39646219c1494db81577f755d5d5ddc35f8e36f51cbfe38d8fcd4c3de95bb8d615db61530bbd507a55c6e07d3031b6 DIST incus-0.2.tar.xz 13248036 BLAKE2B 1b83fc3498d5c31984053e000b9d63846aa6a9087158720eb5a25a8c3bd8cd0ab97391334622612b62d9c8aef145f45668f31abfa25e993b959d1609b0af1694 SHA512 0f2656e41faf9e020392f39a012a6ab64a6683894b2e463fac6bf6a2c2bb55280d454e5b4c23ab23526517a0b2b3c66c7b9a6d5f9477ca0848347a8534ea5eec DIST incus-0.2.tar.xz.asc 833 BLAKE2B 834f9adaea11a85e0a03c75edaadfd226b3be57c49015c2ba7b4fe021b9e8b2e403b5f11e6a482dd1f024456ef4e0bf3145ce15c9f5b0a26954410a2fdac6f9f SHA512 ab55dbbc450b24429e77d816eddee541ebc8453a71704d1ec003a7b0d12a192faab438f6cfe82e90889d845dfaf9a5e9ea2b8d596198e19adbffb106a326000c EBUILD incus-0.1-r2.ebuild 5056 BLAKE2B eb8be4c3be7995c08d2096e8daf24f88cd4ea09d643a6d26b1564d87ca7915adf01dd7458ba093bc4f85efefcad21fb3ab3698cda658b03c1af04c299cd4ad09 SHA512 a5521e824541860adbccb22146ca2c7889ba52cafcd084a10f1ef8bca9122c387ba0f6c50ac68d4ff35cb14ee42be2932e0d0273e733e5cf91c5a38232cb7c49 -EBUILD incus-0.2.ebuild 5321 BLAKE2B 4a22605ae7c615d21c9bf0524eb6d2a20058b69a5fc804c4f46616a52cb8e4b01d790f9708d6e39f05a111446bb2652d021f4ee46b2fa3aaf51d676b4e60f4cd SHA512 a1e46552b39aa62d8b311f1dfd6117180dbd3c4c4f27dd0d4833f31fb80d232e49ef484008a53bcd593992b20b0eb4313faaa216826132e95c194d4907ff0eed +EBUILD incus-0.2-r1.ebuild 5269 BLAKE2B 6db6aaf1fd775311a850bebf8692a9299bd1010dff875aae918485ac88d4afa730c00c9835a72e507eb69a50da9d8a5846122116f7684ec3f551a53c05013477 SHA512 ae8624de25e8162514d02b1493e966e88b982d76cccd6516aaa9f7ac674dec569127445b161a1e1196989f11d6c4a4cfca4e4d83c0fe445473a61223e1b47022 MISC metadata.xml 1471 BLAKE2B d3447fd360c4d3de95ffafefd39f9e65dd257cd39cbdb14fc2e2c513239fafe48b0fef44653fe8fdaaf54151afe59cf48f3f0909097d0c0c4a82cbd87aac4d44 SHA512 393edc7c7f202fac4f08abd2544d1fb41cfc83cea66ccf239eb4441c1f13ea85dd519de84094b1ba022b1a17658612591ee4354a77484da4d8095af917a87c25 diff --git a/app-containers/incus/files/incus-0.2-lxd-to-incus-openrc-support.patch b/app-containers/incus/files/incus-0.2-lxd-to-incus-openrc-support.patch new file mode 100644 index 000000000000..9ab26752f9f8 --- /dev/null +++ b/app-containers/incus/files/incus-0.2-lxd-to-incus-openrc-support.patch @@ -0,0 +1,71 @@ +From 73f22c10770ba07ffe55e37480c5d50beb3c0c35 Mon Sep 17 00:00:00 2001 +From: xsoalokinx <soalokin@live.com> +Date: Sun, 29 Oct 2023 07:42:02 +0000 +Subject: [PATCH] cmd/lxd-to-incus: Add OpenRC target support + +Signed-off-by: xsoalokinx <soalokin@live.com> +--- + cmd/lxd-to-incus/targets.go | 46 ++++++++++++++++++++++++++++++++++++- + 1 file changed, 45 insertions(+), 1 deletion(-) + +diff --git a/cmd/lxd-to-incus/targets.go b/cmd/lxd-to-incus/targets.go +index ed84d3ebc..0940e1597 100644 +--- a/cmd/lxd-to-incus/targets.go ++++ b/cmd/lxd-to-incus/targets.go +@@ -16,7 +16,7 @@ type Target interface { + Paths() (*DaemonPaths, error) + } + +-var targets = []Target{&targetSystemd{}} ++var targets = []Target{&targetSystemd{}, &targetOpenRC{}} + + type targetSystemd struct{} + +@@ -61,3 +61,47 @@ func (s *targetSystemd) Paths() (*DaemonPaths, error) { + Cache: "/var/cache/incus/", + }, nil + } ++ ++type targetOpenRC struct{} ++ ++func (s *targetOpenRC) Present() bool { ++ if !util.PathExists("/var/lib/incus/") { ++ return false ++ } ++ ++ _, err := subprocess.RunCommand("rc-service", "--exists", "incus") ++ if err != nil { ++ return false ++ } ++ ++ return true ++} ++ ++func (s *targetOpenRC) Stop() error { ++ _, err := subprocess.RunCommand("rc-service", "incus", "stop") ++ return err ++} ++ ++func (s *targetOpenRC) Start() error { ++ _, err := subprocess.RunCommand("rc-service", "incus", "start") ++ if err != nil { ++ return err ++ } ++ ++ // Wait for the socket to become available. ++ time.Sleep(5 * time.Second) ++ ++ return nil ++} ++ ++func (s *targetOpenRC) Connect() (incus.InstanceServer, error) { ++ return incus.ConnectIncusUnix("/var/lib/incus/unix.socket", nil) ++} ++ ++func (s *targetOpenRC) Paths() (*DaemonPaths, error) { ++ return &DaemonPaths{ ++ Daemon: "/var/lib/incus/", ++ Logs: "/var/log/incus/", ++ Cache: "/var/cache/incus/", ++ }, nil ++} diff --git a/app-containers/incus/incus-0.2.ebuild b/app-containers/incus/incus-0.2-r1.ebuild index 1ca35cc10b96..1adaedd82ad8 100644 --- a/app-containers/incus/incus-0.2.ebuild +++ b/app-containers/incus/incus-0.2-r1.ebuild @@ -81,6 +81,8 @@ RESTRICT="test" GOPATH="${S}/_dist" +PATCHES=( "${FILESDIR}"/incus-0.2-lxd-to-incus-openrc-support.patch ) + src_prepare() { export GOPATH="${S}/_dist" @@ -174,10 +176,8 @@ pkg_postinst() { elog "Please see" elog " https://linuxcontainers.org/incus/introduction/" elog " https://linuxcontainers.org/incus/docs/main/tutorial/first_steps/" - elog " https://github.com/lxc/incus/blob/main/doc/howto/server_migrate_lxd.md" + elog " https://linuxcontainers.org/incus/docs/main/howto/server_migrate_lxd/" elog "before a Gentoo Wiki page is made." - elog "Note that lxd-to-incus doesn't currently fully work on Gentoo, and doesn't" - elog "work at all on OpenRC systems." elog optfeature "virtual machine support" app-emulation/qemu[spice,usbredir,virtfs] optfeature "btrfs storage backend" sys-fs/btrfs-progs |