From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E9AFE158086 for ; Sun, 9 Jan 2022 18:54:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B633D2BC01A; Sun, 9 Jan 2022 18:53:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C39302BC01A for ; Sun, 9 Jan 2022 18:53:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8CD86342C9E for ; Sun, 9 Jan 2022 18:53:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 10BA2239 for ; Sun, 9 Jan 2022 18:53:48 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1641754423.b406d758c52eb97d5e83c3c56a799093760bba9b.zmedico@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-containers/snapd/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-containers/snapd/Manifest app-containers/snapd/snapd-2.54.2.ebuild X-VCS-Directories: app-containers/snapd/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: b406d758c52eb97d5e83c3c56a799093760bba9b X-VCS-Branch: master Date: Sun, 9 Jan 2022 18:53:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 163f14c4-de3c-4712-ba90-cad86dbb230c X-Archives-Hash: 37deb4cee9bd266d94d4eda2eb20f300 commit: b406d758c52eb97d5e83c3c56a799093760bba9b Author: Zac Medico gentoo org> AuthorDate: Sun Jan 9 18:51:19 2022 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Jan 9 18:53:43 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b406d758 app-containers/snapd: Bump to version 2.54.2 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Zac Medico gentoo.org> app-containers/snapd/Manifest | 1 + app-containers/snapd/snapd-2.54.2.ebuild | 180 +++++++++++++++++++++++++++++++ 2 files changed, 181 insertions(+) diff --git a/app-containers/snapd/Manifest b/app-containers/snapd/Manifest index 1587edd9234c..2b2e479e2c12 100644 --- a/app-containers/snapd/Manifest +++ b/app-containers/snapd/Manifest @@ -1,2 +1,3 @@ DIST snapd-2.53.4.tar.xz 4722696 BLAKE2B c4347db8d5a14b30f1e8811e9425dd7419dd2dcad02fc1cb6a51968cd7fa6a58da2b172c041de02202cbdba1072cb0a7a92d7f92def5c5dc1e253cbcbad86aae SHA512 0b4164d3c3c3ccc99b3fa1e25d9e7e3184a5f94deca5fd83bd6d4c7761b41d6ebd5fefd1e87432a5e18c716b3330b3991134f179e1b03326edd9511ebea4ef9a DIST snapd-2.54.1.tar.xz 4818344 BLAKE2B 654d4d6a8f08dabeb6c10ea3639e1fc31b68720953bd1456695eb6c1275f260e2793e49c39c80571727fb74c954583b1a2188c461b415803210be59c57775292 SHA512 65e14c85ab62d601fa46a271ba4322531a72e7d8880833cd74daac682188808ebd8c730c1fa62dea07d8f20ba76d314f84f89b3e565eaf3ae509a569f3ee7305 +DIST snapd-2.54.2.tar.xz 4824508 BLAKE2B b893a08a61e7db059f0a7ccdf7de01a8b8e4de65fb93fd44c23cec7fd557db692421da09a8ba705e9a8e734606267419291abe5d4e7a12883a68270f66d5b833 SHA512 9aec3c126d82f5e4e17c69af922dfe4e4f17950bf308217fece5fd3816f083b26e42d672052a6e6573d7c7064ea75f168fe7771840c68a3eb85184d6a17df3bd diff --git a/app-containers/snapd/snapd-2.54.2.ebuild b/app-containers/snapd/snapd-2.54.2.ebuild new file mode 100644 index 000000000000..6366a2d391fc --- /dev/null +++ b/app-containers/snapd/snapd-2.54.2.ebuild @@ -0,0 +1,180 @@ +# Copyright 2020-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +EGO_PN="github.com/snapcore/${PN}" +inherit autotools bash-completion-r1 golang-vcs-snapshot linux-info readme.gentoo-r1 systemd xdg-utils + +DESCRIPTION="Service and tools for management of snap packages" +HOMEPAGE="http://snapcraft.io/" + +MY_S="${S}/src/github.com/snapcore/${PN}" + +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 +cgroup-hybrid +forced-devmode gtk kde systemd" +REQUIRED_USE="!forced-devmode? ( apparmor cgroup-hybrid ) 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[cgroup-hybrid(+)?] ) + 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 +} + +src_prepare() { + default + # Update apparmor profile to allow libtinfow.so* + sed -i 's/libtinfo/libtinfo{,w}/' \ + "${MY_S}/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 "${MY_S}/sandbox/forcedevmode.go" || die + grep -q 'panic("USE=forced-devmode is disabled")' "${MY_S}/sandbox/forcedevmode.go" || die "failed to disable forced-devmode" + fi + + sed -i 's:command -v git >/dev/null:false:' -i "${MY_S}/mkversion.sh" || die + + pushd "${MY_S}" >/dev/null || die + ./mkversion.sh "${PV}" + popd >/dev/null || die + pushd "${MY_S}/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 "${MY_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 GO111MODULE=off GOBIN="${S}/bin" GOPATH="${S}" + + local file + for file in "${MY_S}/po/"*.po; do + msgfmt "${file}" -o "${file%.po}.mo" || die + done + + emake -C "${MY_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 -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 -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 "${MY_S}/data" install "${SNAPD_MAKEARGS[@]}" DESTDIR="${D}" + emake -C "${MY_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} \ + "${MY_S}/"{cmd/snap-discard-ns/snap-discard-ns,cmd/snap-gdb-shim/snap-gdb-shim,cmd/snap-mgmt/snap-mgmt} \ + "${MY_S}/data/completion/bash/"{complete.sh,etelpmoc.sh,} + + dobashcomp "${MY_S}/data/completion/bash/snap" + + insinto /usr/share/zsh/site-functions + doins "${MY_S}/data/completion/zsh/_snap" + + insinto "/usr/share/polkit-1/actions" + doins "${MY_S}/data/polkit/io.snapcraft.snapd.policy" + + dodoc "${MY_S}/packaging/ubuntu-16.04/changelog" + domo "${MY_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 +}