diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-09-03 22:19:54 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-09-03 22:19:54 +0100 |
commit | 71f9cc21aab4168093940b3d2e267444d712bff5 (patch) | |
tree | 15406e14be0cd3cfbafe191468b8825b3ccc1855 /app-containers | |
parent | 312456186919deebd1ea3b34b9e26b1e15ebd5b6 (diff) |
gentoo auto-resync : 03:09:2022 - 22:19:54
Diffstat (limited to 'app-containers')
-rw-r--r-- | app-containers/Manifest.gz | bin | 7215 -> 7215 bytes | |||
-rw-r--r-- | app-containers/cri-o/Manifest | 2 | ||||
-rw-r--r-- | app-containers/cri-o/cri-o-1.25.0.ebuild | 101 | ||||
-rw-r--r-- | app-containers/k3d/Manifest | 6 | ||||
-rw-r--r-- | app-containers/k3d/k3d-5.4.6.ebuild (renamed from app-containers/k3d/k3d-5.4.0.ebuild) | 2 | ||||
-rw-r--r-- | app-containers/snapd/Manifest | 2 | ||||
-rw-r--r-- | app-containers/snapd/snapd-2.57.2.ebuild | 178 |
7 files changed, 287 insertions, 4 deletions
diff --git a/app-containers/Manifest.gz b/app-containers/Manifest.gz Binary files differindex b854aa3835bd..f27b75fb21a8 100644 --- a/app-containers/Manifest.gz +++ b/app-containers/Manifest.gz diff --git a/app-containers/cri-o/Manifest b/app-containers/cri-o/Manifest index e8c961cc2cb2..f096f0561123 100644 --- a/app-containers/cri-o/Manifest +++ b/app-containers/cri-o/Manifest @@ -1,5 +1,7 @@ AUX cri-o.logrotated 81 BLAKE2B f17d96920c3e9bbfe68a38fcae49be999c0edcea085ebbc1f09585284c5b7930c185d5cd0ef6c2f7de5db2a6af80355518628a050c1cb0639ccf3b53c6c338da SHA512 1115228546a696eeebeb6d4b3e5c3152af0c99a2559097fc5829d8b416d979c457b4b1789e0120054babf57f585d3f63cbe49949d40417ae7aab613184bf4516 AUX crio.initd 846 BLAKE2B 844400d3cd706d4f78616edb3c8a50a9819ee21aecc7fc33f7d3d00871fde86b59e4b604ccc7cdb0058b10ccd28277f19dbdce34c83b2529c14e063126318617 SHA512 29561e95398975748236217bbd9df64997f6e3de6c0555d007306bd0535895a648368385a13079eb7d52c06249a91980523a73b6563e86d0575d9cd9c3fa4ee9 DIST cri-o-1.24.1.tar.gz 15943809 BLAKE2B 13840967b7555e680652cdfe71e358fee5afcfbdbc28771960a5e28c88d6242909a595212559b7967c05cfc7cf9921d6d227b810a26bdc66cb75ffed917bcb23 SHA512 899efb61c70be3a0e950dc239245e1a4dca66e2130d8b355a7ad73c1e91088a2d42c6a4cc05f879cc6a1252d40294e9a8845fd2b110148a05a9d63f61077c498 +DIST cri-o-1.25.0.tar.gz 27673668 BLAKE2B 5231f1b00781233ddf82827a580100055fefb97e768d871a845506ee28ebc122f20f6c8dff64b9dd8d991ed6ed761a72e96d607354f7e8d4182daff36ef3c253 SHA512 783c2f019ef65079dbb838e58acde5a24bda282ba8298d7b95491356e46fc208a14bcc4c65e3183001f0fb275d8ec5d7b5c795300e6424096f84fb9130721cba EBUILD cri-o-1.24.1.ebuild 2722 BLAKE2B 9533ffcd06f6ffe7a66e379f6a240f68ba87dd387a785f2e51e513795c0823148f0ba6e20b95dea22bed160df6ed04259c3bd32f632f3d6b5a44b1fde30b8345 SHA512 11ab7eb74a3c32c6b0ae2ba94b5c082d1079a20fecd47574948aa8c2ad9fa6b5976e8b2de06250090ee0e2d578fe7807956066e5796be1703b736dcc81d048ca +EBUILD cri-o-1.25.0.ebuild 2722 BLAKE2B a82323f0abbb66eec87d490128f12ee02e61e818232c5fa3965c5e1d9c20998834d4fd94bca80c435371a34bff2d2c69fde844302bf4ac038cf8bf39a01b5e3e SHA512 e7a3684fd2d1f2396722e8dc89380b575f4f53d70c2194f4d300b24b8601ef6d2b59caa1b3b87b5f5c83e87c6520a938715c07b773ee428eb329e15a91bf18b4 MISC metadata.xml 908 BLAKE2B ff6e1663f563dff74dbdeeb5d5c778a70fe2395ff0c0836e31b538f0009215a74946384a1429f2cf8e65bccc26d4b357233f1aab1a2c70ca3f544653d79cf999 SHA512 0fe5ad9f9f1c3b7386f361febbedddb690fcf83145f80da05d77be72bf04f84d9106d46ff6962ed6cc99d7b12f3792263eb7b1711763a2cd2f8a7dac08ed5c09 diff --git a/app-containers/cri-o/cri-o-1.25.0.ebuild b/app-containers/cri-o/cri-o-1.25.0.ebuild new file mode 100644 index 000000000000..60e59d76e3fe --- /dev/null +++ b/app-containers/cri-o/cri-o-1.25.0.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +EGIT_COMMIT=315a0cb5b0abd15619384d7da7f3941714afcb8e + +inherit go-module + +DESCRIPTION="OCI-based implementation of Kubernetes Container Runtime Interface" +HOMEPAGE="https://cri-o.io/" +SRC_URI="https://github.com/cri-o/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="btrfs +device-mapper selinux systemd" + +COMMON_DEPEND=" + app-crypt/gpgme:= + app-containers/conmon + app-containers/runc + dev-libs/glib:= + dev-libs/libassuan:= + dev-libs/libgpg-error:= + net-firewall/conntrack-tools + net-firewall/iptables + app-containers/cni-plugins + net-misc/socat + sys-apps/iproute2 + sys-libs/libseccomp:= + btrfs? ( sys-fs/btrfs-progs ) + device-mapper? ( sys-fs/lvm2:= ) + selinux? ( sys-libs/libselinux:= ) + systemd? ( sys-apps/systemd:= )" +DEPEND=" + ${COMMON_DEPEND} + dev-go/go-md2man" +RDEPEND="${COMMON_DEPEND} + !<app-containers/podman-1.3.2-r1" + +src_prepare() { + default + + sed -e '/^export GOPROXY=/d' \ + -e '/^GIT_.*/d' \ + -e '/ git diff --exit-code/d' \ + -e 's/$(GO) build -i/$(GO) build -v -work -x/' \ + -e 's/\${GIT_COMMIT}/'${EGIT_COMMIT}'/' \ + -e "s|^GIT_COMMIT := .*|GIT_COMMIT := ${EGIT_COMMIT}|" \ + -e "s|^COMMIT_NO := .*|COMMIT_NO := ${EGIT_COMMIT}|" \ + -i Makefile || die + + echo ".NOTPARALLEL: binaries docs" >> Makefile || die + + sed -e 's:/usr/local/bin:/usr/bin:' \ + -i contrib/systemd/* || die +} + +src_compile() { + [[ -f hack/btrfs_installed_tag.sh ]] || die + use btrfs || { echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \ + hack/btrfs_installed_tag.sh || die; } + + [[ -f hack/libdm_installed.sh ]] || die + use device-mapper || { echo -e "#!/bin/sh\necho exclude_graphdriver_devicemapper" > \ + hack/libdm_installed.sh || die; } + + [[ -f hack/selinux_tag.sh ]] || die + use selinux || { echo -e "#!/bin/sh\ntrue" > \ + hack/selinux_tag.sh || die; } + + mkdir -p bin || die + emake all \ + GOBIN="${S}/bin" \ + GO_BUILD="go build ${GOFLAGS}" \ + GO_MD2MAN="$(which go-md2man)" +} + +src_install() { + emake install install.config install.systemd \ + DESTDIR="${D}" \ + GO_MD2MAN="$(which go-md2man)" \ + PREFIX="${D}${EPREFIX}/usr" + keepdir /etc/crio + mv "${ED}/etc/crio/crio.conf"{,.example} || die + + newinitd "${FILESDIR}/crio.initd" crio + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotated" "${PN}" + + # Suppress crio log error messages triggered if these don't exist. + keepdir /etc/containers/oci/hooks.d + keepdir /usr/share/containers/oci/hooks.d + + # Suppress crio "Missing CNI default network" log message. + keepdir /etc/cni/net.d + insinto /etc/cni/net.d + doins contrib/cni/99-loopback.conf +} diff --git a/app-containers/k3d/Manifest b/app-containers/k3d/Manifest index d542b32ef620..9abcba5c8f10 100644 --- a/app-containers/k3d/Manifest +++ b/app-containers/k3d/Manifest @@ -1,10 +1,10 @@ -DIST k3d-5.4.0-deps.tar.xz 85753240 BLAKE2B c86a3172e0944593b7d66ff3bf20c2c2398d725117e18b93cab0c291bd6ae9551d01ea4da7b7f2a96aec36f3143cb029474066f457b8e6308ea8ae4ee3fd90a0 SHA512 d7b8bc46e1a72f68bece84224ff8255e12f17020137523d8d3fc748e6fd152a8d7f4a3da53a624d8ce482341ac18161b64e885db3b3a5e14c018a16551367da3 -DIST k3d-5.4.0.tar.gz 7395322 BLAKE2B cc7a85b18db36861a8291ee20895a5d626c24f5ae106d48342b3d328070456fe816714dcf84b09606382de93af39acd74ce9fcbed72ac4dd4448ef2c099eddd2 SHA512 1af6a5264f0e1d53428c7f66d440c7d4541988d5fca64e4ea7e1c8177a918e30e7f27ff76a7d20291303fd410c32791634548b1b46dc30ff2810f57ad0253120 DIST k3d-5.4.2-deps.tar.xz 76441740 BLAKE2B 3d5388fa057a0d5feb889b6fcec2234e2c22c751077276fd535d4a555f6b463166f4b422385e5732f752f00b42335a6bf1e27fdfaf7b3d54e244a228f70050f2 SHA512 04daa6470762e30cf0bb2409ba4db5c8bc06b75e1560e1099c28f8dc30c4239618b56763bf8c79177aebfefae6ffe92c99a33feeaa6d4ffce7f9e0e9f2ff62d7 DIST k3d-5.4.2.tar.gz 7397277 BLAKE2B c16d67272ceac008eddcbdd7c8816a179804c4e2a3ae9bf762ee13e0a84e525ea69502575e64a9190deef5d4a69679806a9337709b21c82cbff141dbebd7bfc3 SHA512 b38144e93a5d3e781a839144e2960e7a8455e5b2e8cca96e1b14631be626f7b9e37630d9b5902f7bd896e7422de13dbed5df206dfa2d481bcae997987353c813 DIST k3d-5.4.4-deps.tar.xz 76578188 BLAKE2B c08fc21f520f98e90d030b8024e57ca59300228c89289341f121bb38709cd82c0b572e37329a6f700a0e42db05d8d7bcfc309e10b700d1573b47bff6668b32a6 SHA512 62af2c30ed3f238bb887fd728a7bbf2ffe2235f6f69d28d27da4dc0ac6f6a11bfa45004df3ac5ab138584aa0cdeff4904ab72e326beae223fa6620c9a90df92c DIST k3d-5.4.4.tar.gz 7429200 BLAKE2B 728dfb004463116c698ad4126df60aef70f38b766a4a253cb2036c9ee07fdfe9f7538af2f1b3285e5f3a1ecc803bfd83a1353c14a13690f783f0cbc614094e9f SHA512 ac75c93e825889c65f926b05276e9bdaa8c1ed7dae8c705b0a1a3cc576105701f38745339bd1b5e8aa1974f8060cf1bdc797b526a8016b7fd956b08d058d9b21 -EBUILD k3d-5.4.0.ebuild 830 BLAKE2B c6415533fa59d878cc8e0b08e7253a61e7c53afdcb0b985e5d667595aeaef3bdf2ae0beee0fc8cc693d51c70ff042ad9f891921f5f5f005968601ef13568f502 SHA512 e480589077388b4e172f744096028395557720b028e26a1684adce8522bdd82750206ea087222147616bffdc0b207453a80d91e38d0167385f1742791e5f2f8d +DIST k3d-5.4.6-deps.tar.xz 314892744 BLAKE2B 0bbdf32e9db1f8474b9908ece7c623fefdf621d92bab371d6db6922312ad428a08b5b8432db3a978bbde81a8ee18e4ff286fe49c6a9c27ce2609504fcd71e247 SHA512 959f7d78fbb779fc92a29cd98da71cc2e8263dcf67a83d92fc446357a8e7a4e649758b23d64f994536f17c07d2b987f00e65187cf61161473ebbd9d810cc9675 +DIST k3d-5.4.6.tar.gz 7383354 BLAKE2B a1bdaa3edbd4a97db547d76919d32b9c3b59561c38cc846f9802d631b9ecd28bbaf79ed8bb0fe5a633a1ef2f60ba769a18eb95f8ff0abda7d9cb8792a86ae59d SHA512 1b8ce290002302839e05b287f7f4d96dd7fd9ec2386af4b78f8e8c1d9137fa027349409130523bc22a55a95b5d991c867d606965ca8e5ad79c8da3177aa8fc8e EBUILD k3d-5.4.2.ebuild 830 BLAKE2B 3424e2ad982b29ff6faef97ae952543347d9860204303bdba354eeb70aef08d465da17de5682636b9ee8910a8ffb630b5856cd2ba13a12243d49497d5ff26ac9 SHA512 ed601108ab6ceff7a9c9d10dbfb2730db68df26526a4cf8ee818df717bdafc57e0e1d51b39f2f0725bf6d572881eb5090d5e8552df7aa0561640b05713d8c1e6 EBUILD k3d-5.4.4.ebuild 830 BLAKE2B 1ee3ea913f7c346dd32886f835ba56327338feb2a9ba7cfd037e9949aed4ba19575fae3bfe974b287bfc486c8c0aa5d4bf5b3216f94b71e2a00b51403f16ce8c SHA512 8b9e7145d29936970eea1369a786d746eff16536becf1adacc961520282239000570f01336c0e8cad017f25aaf100593c422e036539d728aab205ace1f80b0f7 +EBUILD k3d-5.4.6.ebuild 830 BLAKE2B 79b001b2640bf555aee054e06d313d06d7a8186efae54081fb862ddce7003f325dbfba224ea255b226b22bead8cc3460664ebac959e34557adaa8d337e482644 SHA512 17eca14ecc50b80933cd158071b9ed4b1e61aeb4893c5dae1cf255c1b757946c42247ecfee7839f5c5f609286f4a8d75cd09dffe802bdabf913db3c880d8d24a MISC metadata.xml 321 BLAKE2B a208d771132d412c9ac0adeb9017eae248d17303824ac7a616301fa0be1ceaed0fa93d43e179730b96dc81e2252afb628c3cfdda601bfbd288eb23e4d8553e3c SHA512 107d2bc402e3c1e1bf26af4427a563902921bcf4f676683f2a33952112fdf1b2d6d5993f18535ab440d985ffeb777f66a85735b91692739764666fb8e6aa898d diff --git a/app-containers/k3d/k3d-5.4.0.ebuild b/app-containers/k3d/k3d-5.4.6.ebuild index 0b9efc800b56..8e76570dc7b0 100644 --- a/app-containers/k3d/k3d-5.4.0.ebuild +++ b/app-containers/k3d/k3d-5.4.6.ebuild @@ -7,7 +7,7 @@ inherit go-module DESCRIPTION="k3d creates k3s clusters in docker" HOMEPAGE="https://github.com/rancher/k3d" -K3D_K3S_TAG=v1.22.7-k3s1 +K3D_K3S_TAG=v1.24.4-k3s1 SRC_URI="https://github.com/rancher/k3d/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz" LICENSE="MIT Apache-2.0 BSD BSD-2 MPL-2.0 ISC" diff --git a/app-containers/snapd/Manifest b/app-containers/snapd/Manifest index d40733245814..f599442a7981 100644 --- a/app-containers/snapd/Manifest +++ b/app-containers/snapd/Manifest @@ -2,7 +2,9 @@ AUX README.gentoo 1941 BLAKE2B dd25269f2aaaea693701d74511d632bc45f2c99954ae683cb DIST snapd-2.56.2.tar.xz 6740504 BLAKE2B e8bf0ab85038b5127fd81f434ef369ac53ec7915a454f8fd24046b6e3a5303bf3924fce04fb2400b0ccdc1a8939809ca20e091ac99a04fe6899dfacdfd3cf299 SHA512 16a57ea828ea875ebe5073cca0975ef74562f095823e980be7096ea6b9e83f6a3f434373065781d6342e805c18ee5adadaab29074440759ed3891691441472b0 DIST snapd-2.56.tar.xz 6737568 BLAKE2B 662fa682895501df71396095e22fb4587a97cfe4e156b998118ff524ef3a22bf4e60420111167c263c2815ff34a05b026180e41e926324756450e22a1571fc92 SHA512 d2e9949b449ff65122f1202b2048ed63e3ff404aebd71d9877030c7b23130b6be2f1ef62f47b8b0044344fb4826b2b0c81dbcf5cd464ca16f5b3b170735b6039 DIST snapd-2.57.1.tar.xz 6817444 BLAKE2B 9d3d5a3ad510997a43256ef4755ccc98f6ef0550247721657877089d9e2ba20d87b43a0ea6b806e2c21a9ad4b1b171f228499b9814df0dab1a8a6ba4cf4ef39c SHA512 ded93e2ede0a940960d090686fe4f9128b83401592ab9cbf3f7cb200264e67602e4ea56da2f64950316119c4014eb105711c1f6323cb950f14cc4832db16b53f +DIST snapd-2.57.2.tar.xz 6827264 BLAKE2B f9b1ae934a9c5b777d2e36854e259ddde301067a91b04ecef064accfccecc74693a2a58700e60867f46f028728a271b87cb3d4cdb316ae35df11363990959c3a SHA512 671e7598074894daf76646f7eea09c4163c57e68d0d46ebb77b20f71b898109fd73c78d363cb1253386ce058c1796eb25fab7f2f0345360426d3b9cc11d38804 EBUILD snapd-2.56.2.ebuild 5139 BLAKE2B 20516cbcae2220067ff8a8c344d92896d3fced3b857938c4742673663ecddf9aac2131da305bcaee57e954073da7d17dc7df286147882409d9f5299134dc6cf7 SHA512 8f188d7671940c9dd2af180e6bdd08430111641255a7a4c44cd2221dcd5878d3a8c7846372be091a9ef65282e486ea94e8a17447bb764aec93b563efcf8020fe EBUILD snapd-2.56.ebuild 5139 BLAKE2B 20516cbcae2220067ff8a8c344d92896d3fced3b857938c4742673663ecddf9aac2131da305bcaee57e954073da7d17dc7df286147882409d9f5299134dc6cf7 SHA512 8f188d7671940c9dd2af180e6bdd08430111641255a7a4c44cd2221dcd5878d3a8c7846372be091a9ef65282e486ea94e8a17447bb764aec93b563efcf8020fe EBUILD snapd-2.57.1.ebuild 5139 BLAKE2B 20516cbcae2220067ff8a8c344d92896d3fced3b857938c4742673663ecddf9aac2131da305bcaee57e954073da7d17dc7df286147882409d9f5299134dc6cf7 SHA512 8f188d7671940c9dd2af180e6bdd08430111641255a7a4c44cd2221dcd5878d3a8c7846372be091a9ef65282e486ea94e8a17447bb764aec93b563efcf8020fe +EBUILD snapd-2.57.2.ebuild 5139 BLAKE2B 20516cbcae2220067ff8a8c344d92896d3fced3b857938c4742673663ecddf9aac2131da305bcaee57e954073da7d17dc7df286147882409d9f5299134dc6cf7 SHA512 8f188d7671940c9dd2af180e6bdd08430111641255a7a4c44cd2221dcd5878d3a8c7846372be091a9ef65282e486ea94e8a17447bb764aec93b563efcf8020fe MISC metadata.xml 520 BLAKE2B cdca3f5b58c81ddf5796b174756e1497382390ea4f7411b2aa7a3c794fcafd7fbd919cae00c7cf5ff2251f4c837f5188026d0f5f61986834aee661724afb050d SHA512 2c26112a8808cd73c5575b525eb33129ab5fab8a5fdefba5de3760e568659264a864bf80c2397cf70bb2f9b0e6709e953185af9048cddde9082b040e4a0ee00f diff --git a/app-containers/snapd/snapd-2.57.2.ebuild b/app-containers/snapd/snapd-2.57.2.ebuild new file mode 100644 index 000000000000..7e134a2b558e --- /dev/null +++ b/app-containers/snapd/snapd-2.57.2.ebuild @@ -0,0 +1,178 @@ +# Copyright 2020-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools bash-completion-r1 flag-o-matic go-module linux-info readme.gentoo-r1 systemd xdg-utils + +DESCRIPTION="Service and tools for management of snap packages" +HOMEPAGE="http://snapcraft.io/" + +SRC_URI="https://github.com/snapcore/${PN}/releases/download/${PV}/${PN}_${PV}.vendor.tar.xz -> ${P}.tar.xz" +MY_PV=${PV} +KEYWORDS="~amd64" + +LICENSE="GPL-3 Apache-2.0 BSD BSD-2 LGPL-3-with-linking-exception MIT" +SLOT="0" +IUSE="apparmor +forced-devmode gtk kde systemd" +REQUIRED_USE="!forced-devmode? ( apparmor ) systemd" + +CONFIG_CHECK="~CGROUPS + ~CGROUP_DEVICE + ~CGROUP_FREEZER + ~NAMESPACES + ~SQUASHFS + ~SQUASHFS_ZLIB + ~SQUASHFS_LZO + ~SQUASHFS_XZ + ~BLK_DEV_LOOP + ~SECCOMP + ~SECCOMP_FILTER" + +RDEPEND=" + sys-libs/libseccomp:= + apparmor? ( + sec-policy/apparmor-profiles + sys-apps/apparmor:= + ) + dev-libs/glib + virtual/libudev + systemd? ( sys-apps/systemd ) + sys-libs/libcap:= + sys-fs/squashfs-tools[lzma]" + +DEPEND="${RDEPEND}" + +BDEPEND=" + >=dev-lang/go-1.9 + dev-python/docutils + sys-devel/gettext + sys-fs/xfsprogs" + +PDEPEND="sys-auth/polkit[gtk?,kde?]" + +README_GENTOO_SUFFIX="" + +pkg_setup() { + if use apparmor; then + CONFIG_CHECK+=" ~SECURITY_APPARMOR" + fi + linux-info_pkg_setup + + # Seems to have issues building with -O3, switch to -O2 + replace-flags -O3 -O2 +} + +src_prepare() { + default + # Update apparmor profile to allow libtinfow.so* + sed -i 's/libtinfo/libtinfo{,w}/' \ + "cmd/snap-confine/snap-confine.apparmor.in" || die + + if ! use forced-devmode; then + sed -e 's#return !apparmorFull#if !apparmorFull {\n\t\tpanic("USE=forced-devmode is disabled")\n\t}\n\treturn false#' \ + -i "sandbox/forcedevmode.go" || die + grep -q 'panic("USE=forced-devmode is disabled")' "sandbox/forcedevmode.go" || die "failed to disable forced-devmode" + fi + + sed -i 's:command -v git >/dev/null:false:' -i "mkversion.sh" || die + + ./mkversion.sh "${PV}" + pushd "cmd" >/dev/null || die + eautoreconf +} + +src_configure() { + SNAPD_MAKEARGS=( + "BINDIR=${EPREFIX}/usr/bin" + "DBUSSERVICESDIR=${EPREFIX}/usr/share/dbus-1/services" + "LIBEXECDIR=${EPREFIX}/usr/lib" + "SNAP_MOUNT_DIR=${EPREFIX}/var/lib/snapd/snap" + "SYSTEMDSYSTEMUNITDIR=$(systemd_get_systemunitdir)" + ) + export CGO_ENABLED="1" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + + pushd "${S}/cmd" >/dev/null || die + econf --libdir="${EPREFIX}/usr/lib" \ + --libexecdir="${EPREFIX}/usr/lib/snapd" \ + $(use_enable apparmor) \ + --enable-nvidia-biarch \ + --with-snap-mount-dir="${EPREFIX}/var/lib/snapd/snap" +} + +src_compile() { + export -n GOCACHE XDG_CACHE_HOME + export GOBIN="${S}/bin" + + local file + for file in "${S}/po/"*.po; do + msgfmt "${file}" -o "${file%.po}.mo" || die + done + + emake -C "${S}/data" "${SNAPD_MAKEARGS[@]}" + + local -a flags=(-buildmode=pie -ldflags "-s -linkmode external -extldflags '${LDFLAGS}'" -trimpath) + local -a staticflags=(-buildmode=pie -ldflags "-s -linkmode external -extldflags '${LDFLAGS} -static'" -trimpath) + + local cmd + for cmd in snap snapd snap-bootstrap snap-failure snap-preseed snap-recovery-chooser snap-repair snap-seccomp; do + go build ${GOFLAGS} -mod=vendor -o "${GOBIN}/${cmd}" "${flags[@]}" \ + -v -x "github.com/snapcore/${PN}/cmd/${cmd}" + [[ -e "${GOBIN}/${cmd}" ]] || die "failed to build ${cmd}" + done + for cmd in snapctl snap-exec snap-update-ns; do + go build ${GOFLAGS} -mod=vendor -o "${GOBIN}/${cmd}" "${staticflags[@]}" \ + -v -x "github.com/snapcore/${PN}/cmd/${cmd}" + [[ -e "${GOBIN}/${cmd}" ]] || die "failed to build ${cmd}" + done +} + +src_install() { + emake -C "${S}/data" install "${SNAPD_MAKEARGS[@]}" DESTDIR="${D}" + emake -C "${S}/cmd" install "${SNAPD_MAKEARGS[@]}" DESTDIR="${D}" + + if use apparmor; then + mv "${ED}/etc/apparmor.d/usr.lib.snapd.snap-confine"{,.real} || die + keepdir /var/lib/snapd/apparmor/profiles + fi + keepdir /var/lib/snapd/{apparmor/snap-confine,cache,cookie,snap,void} + fperms 700 /var/lib/snapd/{cache,cookie} + + dobin "${GOBIN}/"{snap,snapctl} + ln "${ED}/usr/bin/snapctl" "${ED}/usr/lib/snapd/snapctl" || die + + exeinto /usr/lib/snapd + doexe "${GOBIN}/"{snapd,snap-bootstrap,snap-failure,snap-exec,snap-preseed,snap-recovery-chooser,snap-repair,snap-seccomp,snap-update-ns} \ + "${S}/"{cmd/snap-discard-ns/snap-discard-ns,cmd/snap-gdb-shim/snap-gdb-shim,cmd/snap-mgmt/snap-mgmt} \ + "${S}/data/completion/bash/"{complete.sh,etelpmoc.sh,} + + dobashcomp "${S}/data/completion/bash/snap" + + insinto /usr/share/zsh/site-functions + doins "${S}/data/completion/zsh/_snap" + + insinto "/usr/share/polkit-1/actions" + doins "${S}/data/polkit/io.snapcraft.snapd.policy" + + dodoc "${S}/packaging/ubuntu-16.04/changelog" + domo "${S}/po/"*.mo + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + xdg_desktop_database_update + + if use apparmor && [[ -z ${ROOT} && -e /sys/kernel/security/apparmor/profiles && + $(wc -l < /sys/kernel/security/apparmor/profiles) -gt 0 ]]; then + apparmor_parser -r "${EPREFIX}/etc/apparmor.d/usr.lib.snapd.snap-confine.real" + fi +} + +pkg_postrm() { + xdg_desktop_database_update +} |