diff options
author | Repository mirror & CI <repomirrorci@gentoo.org> | 2022-06-18 17:17:51 +0000 |
---|---|---|
committer | Repository mirror & CI <repomirrorci@gentoo.org> | 2022-06-18 17:17:51 +0000 |
commit | ae6c6d8fa0e2793d216a36562e97f5cea0dd1420 (patch) | |
tree | ab1e4d5c3d1932116b54cd4cecfbfb36a2a508ea | |
parent | 2022-06-18 17:03:03 UTC (diff) | |
parent | app-containers/snapd: add 2.56.2 (diff) | |
download | gentoo-ae6c6d8fa0e2793d216a36562e97f5cea0dd1420.tar.gz gentoo-ae6c6d8fa0e2793d216a36562e97f5cea0dd1420.tar.bz2 gentoo-ae6c6d8fa0e2793d216a36562e97f5cea0dd1420.zip |
Merge updates from master
-rw-r--r-- | app-containers/nerdctl/Manifest | 1 | ||||
-rw-r--r-- | app-containers/nerdctl/nerdctl-0.21.0.ebuild | 33 | ||||
-rw-r--r-- | app-containers/snapd/Manifest | 1 | ||||
-rw-r--r-- | app-containers/snapd/snapd-2.56.2.ebuild | 178 |
4 files changed, 213 insertions, 0 deletions
diff --git a/app-containers/nerdctl/Manifest b/app-containers/nerdctl/Manifest index b7e422ba126d..009a6ddbb36b 100644 --- a/app-containers/nerdctl/Manifest +++ b/app-containers/nerdctl/Manifest @@ -1,3 +1,4 @@ DIST nerdctl-0.17.1-vendor.tar.gz 7762770 BLAKE2B 399a99047cb3a3ab31806529e2502f3446e3df717950f1db05d8a449e5c931719717a35e420791232b19338c9d81c8443f0cd2520c38509aedbbaddc8b6d2893 SHA512 ec2967abee1ff44dcd44dd21d079a9d1e9bb254d0a5b150f57a2668cdd26e7f6dd5de99bc1fff3a94b4fb1c4546785e78245ed4e4e5f026b81b909f8dbf318c6 DIST nerdctl-0.18.0-vendor.tar.gz 7757873 BLAKE2B dfc77baee4649cf5a4ffa2ae196460d34eea531f930f04b894cc715b68a4295d1bcf98c89702032aaf6c5fc0b1a7f8b885f6c4b0bd61afd044b67fe4510c6967 SHA512 b542abafbd1dfe4213646b66b69d7bb286b8fda152870846cd350ad0362cbd16ca5f2d8fe23ae056f0c18f5674eb984f2993cf2937d7aff7b67668d65d9e1488 DIST nerdctl-0.19.0-vendor.tar.gz 7798588 BLAKE2B 1bf17d09de13e5d2160cca500e8d9dc2eb666f5639e12353e1153bbf201f48d376c7b369a97bd851082c32276c6ba280d8f8e1add7b56206d3f07a0dfc725393 SHA512 9f84d829c2c40589f930345bb7073e6ca868e9e840f74c9176b049b63b2983dca55168eb54113b7b74e7651f1c902f84c9fca8d0f5d948ba7510db91f3a52e74 +DIST nerdctl-0.21.0-vendor.tar.gz 7984755 BLAKE2B e28b260667109604edb8b0f0c090fcb9769dd4a7411843f2d6180a3bb6f3165ca8feb3c4798c78f2eb2134bc9a205e263e8098e80a6fe0f0de5641b13158d7f8 SHA512 174f8dc8be631eef84d7c461bf4a797fc6d47b20385286cedbbb769c764a97a64937fb2a104c45f42459c4b2217b6fe2bb534f07153a6761f59798d2a08490e0 diff --git a/app-containers/nerdctl/nerdctl-0.21.0.ebuild b/app-containers/nerdctl/nerdctl-0.21.0.ebuild new file mode 100644 index 000000000000..1c01c33ad6f2 --- /dev/null +++ b/app-containers/nerdctl/nerdctl-0.21.0.ebuild @@ -0,0 +1,33 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit go-module + +DESCRIPTION="Docker-compatible CLI for containerd, with support for Compose" +HOMEPAGE="https://github.com/containerd/nerdctl" + +EGIT_COMMIT="9ddf5226eabcbb7b4b43987f3b0f8d53d86d3bca" +# There are too many vendor dependencies to distribute via EGO_SUM (see https://bugs.gentoo.org/721088), +# so they are instead distributed via a combined tarball. +SRC_URI="https://github.com/zmedico/nerdctl/archive/refs/tags/v${PV}-vendor.tar.gz -> ${P}-vendor.tar.gz" +BDEPEND=">=dev-lang/go-1.16" +LICENSE="Apache-2.0 BSD BSD-2 ISC MIT" +SLOT="0" + +KEYWORDS="~amd64" +IUSE="" +S=${WORKDIR}/${P}-vendor + +src_prepare() { + sed -e 's:/usr/local/bin:/usr/bin:' \ + -e "s|^VERSION[[:space:]]*=.*|VERSION := v${PV}|" \ + -e "s|^REVISION[[:space:]]*=.*|REVISION := ${EGIT_COMMIT}|" \ + -i Makefile || die + default +} + +src_install() { + DOCS=(README.md docs examples) + default_src_install +} diff --git a/app-containers/snapd/Manifest b/app-containers/snapd/Manifest index 10c8df4528be..0afafe29d14c 100644 --- a/app-containers/snapd/Manifest +++ b/app-containers/snapd/Manifest @@ -1 +1,2 @@ +DIST snapd-2.56.2.tar.xz 6740504 BLAKE2B e8bf0ab85038b5127fd81f434ef369ac53ec7915a454f8fd24046b6e3a5303bf3924fce04fb2400b0ccdc1a8939809ca20e091ac99a04fe6899dfacdfd3cf299 SHA512 16a57ea828ea875ebe5073cca0975ef74562f095823e980be7096ea6b9e83f6a3f434373065781d6342e805c18ee5adadaab29074440759ed3891691441472b0 DIST snapd-2.56.tar.xz 6737568 BLAKE2B 662fa682895501df71396095e22fb4587a97cfe4e156b998118ff524ef3a22bf4e60420111167c263c2815ff34a05b026180e41e926324756450e22a1571fc92 SHA512 d2e9949b449ff65122f1202b2048ed63e3ff404aebd71d9877030c7b23130b6be2f1ef62f47b8b0044344fb4826b2b0c81dbcf5cd464ca16f5b3b170735b6039 diff --git a/app-containers/snapd/snapd-2.56.2.ebuild b/app-containers/snapd/snapd-2.56.2.ebuild new file mode 100644 index 000000000000..7e134a2b558e --- /dev/null +++ b/app-containers/snapd/snapd-2.56.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 +} |