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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4DDE7158094 for ; Sun, 11 Sep 2022 15:28:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 726EFE091F; Sun, 11 Sep 2022 15:28:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4F6B3E091F for ; Sun, 11 Sep 2022 15:28:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 51384340D9B for ; Sun, 11 Sep 2022 15:28:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A9EC7599 for ; Sun, 11 Sep 2022 15:28:17 +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: <1662910078.068281eba1da39f38cd1e7efef585bb77fecbb4a.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.56.2.ebuild app-containers/snapd/snapd-2.56.ebuild app-containers/snapd/snapd-2.57.1.ebuild X-VCS-Directories: app-containers/snapd/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 068281eba1da39f38cd1e7efef585bb77fecbb4a X-VCS-Branch: master Date: Sun, 11 Sep 2022 15:28:17 +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: ffb97270-7ae3-4729-b498-96c7ce38651f X-Archives-Hash: 5a7210de5ed93b5ceb1258106f0a4003 commit: 068281eba1da39f38cd1e7efef585bb77fecbb4a Author: Zac Medico gentoo org> AuthorDate: Sun Sep 11 15:27:53 2022 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Sep 11 15:27:58 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=068281eb app-containers/snapd: drop 2.56, 2.56.2, 2.57.1 Signed-off-by: Zac Medico gentoo.org> app-containers/snapd/Manifest | 3 - app-containers/snapd/snapd-2.56.2.ebuild | 178 ------------------------------- app-containers/snapd/snapd-2.56.ebuild | 178 ------------------------------- app-containers/snapd/snapd-2.57.1.ebuild | 178 ------------------------------- 4 files changed, 537 deletions(-) diff --git a/app-containers/snapd/Manifest b/app-containers/snapd/Manifest index 46989eeaf422..33048713f26a 100644 --- a/app-containers/snapd/Manifest +++ b/app-containers/snapd/Manifest @@ -1,4 +1 @@ -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 diff --git a/app-containers/snapd/snapd-2.56.2.ebuild b/app-containers/snapd/snapd-2.56.2.ebuild deleted file mode 100644 index 7e134a2b558e..000000000000 --- a/app-containers/snapd/snapd-2.56.2.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 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 -} diff --git a/app-containers/snapd/snapd-2.56.ebuild b/app-containers/snapd/snapd-2.56.ebuild deleted file mode 100644 index 7e134a2b558e..000000000000 --- a/app-containers/snapd/snapd-2.56.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 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 -} diff --git a/app-containers/snapd/snapd-2.57.1.ebuild b/app-containers/snapd/snapd-2.57.1.ebuild deleted file mode 100644 index 7e134a2b558e..000000000000 --- a/app-containers/snapd/snapd-2.57.1.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 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 -}