From 5c4786a868bad6e3f46aecf32ad6c6dc5de98408 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 29 May 2024 00:07:15 +0100 Subject: gentoo auto-resync : 29:05:2024 - 00:07:15 --- app-containers/snapd/Manifest | 8 +- app-containers/snapd/snapd-2.57.6.ebuild | 178 ------------------------------ app-containers/snapd/snapd-2.60.3.ebuild | 179 ------------------------------- app-containers/snapd/snapd-2.60.4.ebuild | 179 ------------------------------- app-containers/snapd/snapd-2.63.ebuild | 179 +++++++++++++++++++++++++++++++ 5 files changed, 181 insertions(+), 542 deletions(-) delete mode 100644 app-containers/snapd/snapd-2.57.6.ebuild delete mode 100644 app-containers/snapd/snapd-2.60.3.ebuild delete mode 100644 app-containers/snapd/snapd-2.60.4.ebuild create mode 100644 app-containers/snapd/snapd-2.63.ebuild (limited to 'app-containers/snapd') diff --git a/app-containers/snapd/Manifest b/app-containers/snapd/Manifest index 6abc9c1f0998..bdeb5c000400 100644 --- a/app-containers/snapd/Manifest +++ b/app-containers/snapd/Manifest @@ -1,12 +1,8 @@ AUX README.gentoo 1941 BLAKE2B dd25269f2aaaea693701d74511d632bc45f2c99954ae683cb81d4df41c4c1f8007bb6c337234e46bfc5973aa7e8356cd12ac510e9109eca09890cbc42bd184bb SHA512 5b522e6c29bdad84a71245fa1f0289e9cfed0501d936b433829f66ef9d655f3cc13d6bca29beeae2c00e1b68f9fa30058608b9c4cde86ba66eab67bd011c9d00 -DIST snapd-2.57.6.tar.xz 6889052 BLAKE2B 5d1190f3d1ccc6446f950cc95c09180707c3a96285bcdd197aef06b2d69cfef6daf85a93844f105dd434b29b73d3b9c832dfcbebcdc2451443eb5421046de849 SHA512 cd74fa92cddff3452448a50536ded504c68ca6f786b465b8561ccc43c02856742a895efb71bf92b8d125173e0d083faf61ca563f69da03ebf3c4df1b0b0b8d5e DIST snapd-2.58.tar.xz 6980916 BLAKE2B d3de507513db808fa4f85498b5c238de143f06660f1d677186c8c763b38643a2486e25b747977b3eb584619d79ea0a12e88dc5a909045a853c1d8f849f2c1638 SHA512 555915b8b4d9d2d91a3ba19e9e78cf6b19d9683a9f390ad225aa5876320cb8595b464d6133706c4923fc15fbe04ba2b65a47e403c9a2d8859adae827f8ec000a -DIST snapd-2.60.3.tar.xz 7184964 BLAKE2B c40c4e041a91de1732c23b5845a322873498da76d50e0c91e97941d1fc4f6f1991fe2b009414952bf0ebb614e8e19a0015c698ff09c61a12940349ea714f77f0 SHA512 630738c956773354006c195bfe954902b0d082e94345b54c6a6795139d36e1f95a236c6e9a8947338e03caca03520c6e8c1a1c44d3788ec93107f7f97b2d952d -DIST snapd-2.60.4.tar.xz 7187708 BLAKE2B 488ca5b70e9174f07ac54cbc221a323607e337dbde45e7c4d11669ed2f61409fa7bb21b4a5432cd84fb312d92cacf19e5bccc80ef77b71233e19e158d937ac04 SHA512 3035e4e5d52fef00606bc532f855817200d9f6035f660b0377d5dccf5bb64bbf0a94a4e3b8f3941e54b62259378dae4084baa2a29fb5120c714559c899c33c0e DIST snapd-2.61.tar.xz 7626784 BLAKE2B d716e91df4702fbd415bb6204a4557f37afd3dce187e3bca33b12a2ac5a1b54d1c31473d1537a784f6cbbfaf213f676d1f1b29d716e8c5f45a785229c9f3e018 SHA512 2fd432d7ef2204535576e980de7060ad15a0b3610b25e0f41b630ae34e172f97460f0a38d9d456af08dd36c619e90119219788a49e56a69afc7fbf014fc1db22 -EBUILD snapd-2.57.6.ebuild 5169 BLAKE2B f96430c3131d507c6b7566f7b085851a6db569a93dae668d0a34d13319c06f563566858367bf028ed600f1d0ba8f29e5970c56ca72241b7b72eccf5318939633 SHA512 b7551510c5b5adf6f12c2df137ef54c8c62f96984141f49e2706a7c88c65490b03f43674b8314c82cb83bbad5de560285d1c10b1b11bf79359034cf758096caf +DIST snapd-2.63.tar.xz 7502152 BLAKE2B 8ae38699227b7f0e6b512526fc8857b3e50ed220ac95860c372ca0a4b26f5a034bd9309688217696444254e41cc70fe3a45c0bf026c84e5f950e7df8aebd47a0 SHA512 956ee142ab6cb5de522307f7844819c861b2831e22dab56f7bfca16ff7f947093f8a8727d49370cc000ed71f3af9c57cff9c4be93ebf199e8c631a152a68ec5b EBUILD snapd-2.58.ebuild 5206 BLAKE2B 9df542b74025c4151e20ee6eff9e640742587831b29d3195c97b0ee60ecbe8ce50558e0ecd437b26d87c378575e9d7b1c384ace7f6d647e4b34c519df25ddb68 SHA512 4d2541d85b110db48c3949a3e1a82a0b1ab454ed58a166381011ff452b171e279bebbb5f40e3e7e266849cdf0e2d5d608c12c19c97214d688cd9e739f7be0497 -EBUILD snapd-2.60.3.ebuild 5211 BLAKE2B 42cb4ab1a965b0b424643aa299e9d0da1956b657373a6c4c594911969b221c65f19569fa26359424fe14e4ba20273c902ef39b8d10c8ebe2f35a4833ffb5f0f1 SHA512 5e2ba615523aaf978404acebdf9137952ff31144ade0fda68f8c29b127b97c4e7786839a1b338103435963b4ea884a43fdd66de121b1c79982be39a211f50004 -EBUILD snapd-2.60.4.ebuild 5211 BLAKE2B 42cb4ab1a965b0b424643aa299e9d0da1956b657373a6c4c594911969b221c65f19569fa26359424fe14e4ba20273c902ef39b8d10c8ebe2f35a4833ffb5f0f1 SHA512 5e2ba615523aaf978404acebdf9137952ff31144ade0fda68f8c29b127b97c4e7786839a1b338103435963b4ea884a43fdd66de121b1c79982be39a211f50004 EBUILD snapd-2.61.ebuild 5210 BLAKE2B 68d8b4bfc3a34c17a28de28ef53549cf058dfee074dccf7fbcf33d6ae5f3d32b27279cba0b2ee1cdc7fbd2b8737abe83ec9816ce25fa354cb0fe37d7e1adfe33 SHA512 ddd4fbf0a5c4959230aa59dc1d5ed65389af526e589cb879750fc3d6e07d477b9f38e2c6b47745a47dd0afaeac4f6fa02333d9e1c0532abc569662e76914d6f2 +EBUILD snapd-2.63.ebuild 5211 BLAKE2B bf0925ea4702b0431471e021fb7ab31fd279bd5eae98eda2d08ec0087224dc5de4dbe1e8e37efb509237264bb1e0ff341adfb2ebc9b37a3f07d0137ae91d2cd5 SHA512 79951c222e3859ecec7b1d863f787fc1e2eb062163b22ef991fded6be998043339ee12d20b2db1a95b3703dd77ee26749f8e6504bcf5e0139e452a345d32ed8b MISC metadata.xml 457 BLAKE2B 204b67bf36a85bd18f4111b4d8590195908bf15ae0bafedb76b6124b7d19c6570627925e5dfc46dd4dd47732c6d8f1066451831a0cc475518aab8a29403ececc SHA512 07671272b60f1a6793e3f36b096e99153263830314359eb86000aec65266c61ebe9c448af4ec166d6163e3ca2325f36cc74fe5aace95e7ffa7b0293516b18120 diff --git a/app-containers/snapd/snapd-2.57.6.ebuild b/app-containers/snapd/snapd-2.57.6.ebuild deleted file mode 100644 index 35255adff108..000000000000 --- a/app-containers/snapd/snapd-2.57.6.ebuild +++ /dev/null @@ -1,178 +0,0 @@ -# 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 snapd-apparmor 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,snapd-apparmor,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 -} diff --git a/app-containers/snapd/snapd-2.60.3.ebuild b/app-containers/snapd/snapd-2.60.3.ebuild deleted file mode 100644 index 7bd5d8f6f6e3..000000000000 --- a/app-containers/snapd/snapd-2.60.3.ebuild +++ /dev/null @@ -1,179 +0,0 @@ -# Copyright 2020-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools bash-completion-r1 flag-o-matic go-module linux-info readme.gentoo-r1 systemd tmpfiles xdg-utils - -DESCRIPTION="Service and tools for management of snap packages" -HOMEPAGE="http://snapcraft.io/" - -SRC_URI="https://github.com/snapcore/snapd/releases/download/${PV}/snapd_${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,lzo]" - -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 snapd-apparmor 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,snapd-apparmor,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 - tmpfiles_process snapd.conf - - 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 -} diff --git a/app-containers/snapd/snapd-2.60.4.ebuild b/app-containers/snapd/snapd-2.60.4.ebuild deleted file mode 100644 index 7bd5d8f6f6e3..000000000000 --- a/app-containers/snapd/snapd-2.60.4.ebuild +++ /dev/null @@ -1,179 +0,0 @@ -# Copyright 2020-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools bash-completion-r1 flag-o-matic go-module linux-info readme.gentoo-r1 systemd tmpfiles xdg-utils - -DESCRIPTION="Service and tools for management of snap packages" -HOMEPAGE="http://snapcraft.io/" - -SRC_URI="https://github.com/snapcore/snapd/releases/download/${PV}/snapd_${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,lzo]" - -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 snapd-apparmor 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,snapd-apparmor,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 - tmpfiles_process snapd.conf - - 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 -} diff --git a/app-containers/snapd/snapd-2.63.ebuild b/app-containers/snapd/snapd-2.63.ebuild new file mode 100644 index 000000000000..56a00504636a --- /dev/null +++ b/app-containers/snapd/snapd-2.63.ebuild @@ -0,0 +1,179 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools bash-completion-r1 flag-o-matic go-module linux-info readme.gentoo-r1 systemd tmpfiles xdg-utils + +DESCRIPTION="Service and tools for management of snap packages" +HOMEPAGE="http://snapcraft.io/" + +SRC_URI="https://github.com/snapcore/snapd/releases/download/${PV}/snapd_${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,lzo]" + +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 snapd-apparmor 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,snapd-apparmor,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 + tmpfiles_process snapd.conf + + 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 +} -- cgit v1.2.3