public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-containers/snapd/
Date: Fri, 13 May 2022 21:45:27 +0000 (UTC)	[thread overview]
Message-ID: <1652478324.df9ea0aeab636e3a85c77aaad179d8a519dbae48.zmedico@gentoo> (raw)

commit:     df9ea0aeab636e3a85c77aaad179d8a519dbae48
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri May 13 21:45:03 2022 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri May 13 21:45:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df9ea0ae

app-containers/snapd: add 2.55.5

Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 app-containers/snapd/Manifest            |   1 +
 app-containers/snapd/snapd-2.55.5.ebuild | 183 +++++++++++++++++++++++++++++++
 2 files changed, 184 insertions(+)

diff --git a/app-containers/snapd/Manifest b/app-containers/snapd/Manifest
index 613fc7fd3d6a..0dc20cf1629f 100644
--- a/app-containers/snapd/Manifest
+++ b/app-containers/snapd/Manifest
@@ -1,3 +1,4 @@
 DIST snapd-2.55.2.tar.xz 6659212 BLAKE2B a76cec2bf0f3c44212a20c8b0744e4327a725b28a0055be49dfbe638020532f4933c20edda3bdab20290d38f602459fd0962413a9c58400cdc8d6ef3b4634a41 SHA512 8fee8bb6ff52d3cbd5f0a9f206e7c93dea1b6c0ade9c2b6fbd7b0d729b6eeeb1fb01a28dab53543671c42ceac25d6d8932a8b4b9349332b0cde9b9226f6ec063
 DIST snapd-2.55.3.tar.xz 6673552 BLAKE2B 8a34a568a1563c786e6975fb44d6a23f8a943906ff16b4c587fcca9e1d6ae033d8389b069235e62449a327dff8f1d11e83528fecf02768c730aede72b6cd6790 SHA512 e9dbdc47a9b83792f32fa66d558b0602100ac2b7cfd02ea96e4346fe1bdda7aa5fbe23cfba090e1ba61430ce9cfb0e9bd015c420c13bdca282a500c6ab222817
 DIST snapd-2.55.4.tar.xz 6669776 BLAKE2B 024c03d163f23da8a26076dfb9fd2edc44807731c40b74b554132753b20ff6a7ae454dfee4f20e05bbf7f596e09bbd7378cbe5d8625c3dfb43e94d84578b8e81 SHA512 990266ac37e0d0da433ea3dacdd97806cc3ea5d1d94e068e5b945da54d87d965860ad290799c0bca29dab35069a449fa483b4f51c1cbab83d7745ec7a6cabd9e
+DIST snapd-2.55.5.tar.xz 6670928 BLAKE2B 3bbc4d0fa8e842a400107934518e0f7d0b4e4a26f70a3538590faea631920229e5ba79d023eeda12da71a1f4fcdaa4476efb858130cac600894c1bf0a54be6e6 SHA512 445d0a21a28c994c2608dcb6ea09f6f53398564b644b1f489ed68f1f48c45281d284cd65699f65f9e0b653ef4efeea771bf3cceeeadb71f1a1267c522587e353

diff --git a/app-containers/snapd/snapd-2.55.5.ebuild b/app-containers/snapd/snapd-2.55.5.ebuild
new file mode 100644
index 000000000000..4e8c75f7a53b
--- /dev/null
+++ b/app-containers/snapd/snapd-2.55.5.ebuild
@@ -0,0 +1,183 @@
+# 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 flag-o-matic 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 +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}/' \
+		"${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
+}


             reply	other threads:[~2022-05-13 21:45 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 21:45 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-02  8:49 [gentoo-commits] repo/gentoo:master commit in: app-containers/snapd/ Michał Górny
2024-06-01 20:30 Zac Medico
2024-05-27 23:28 Zac Medico
2024-05-27 23:12 Zac Medico
2024-05-11 15:16 Arthur Zamarin
2023-11-01  4:01 Zac Medico
2023-10-04  3:24 Zac Medico
2023-09-04 11:14 Arthur Zamarin
2023-09-04 11:14 Arthur Zamarin
2022-12-02  4:14 Zac Medico
2022-12-01  3:45 Zac Medico
2022-12-01  3:45 Zac Medico
2022-10-25  0:01 Zac Medico
2022-10-18  2:21 Zac Medico
2022-09-11 15:28 Zac Medico
2022-09-11 15:28 Zac Medico
2022-09-03 19:34 Zac Medico
2022-08-27  0:22 Zac Medico
2022-06-18 17:09 Zac Medico
2022-05-22 20:53 Zac Medico
2022-05-22 20:53 Zac Medico
2022-05-22 20:07 Zac Medico
2022-04-30 22:12 Zac Medico
2022-04-09 16:19 Zac Medico
2022-03-25  3:13 Zac Medico
2022-03-25  3:13 Zac Medico
2022-03-24  4:44 Zac Medico
2022-03-05  1:22 Zac Medico
2022-02-26 17:27 Zac Medico
2022-02-18 18:20 Zac Medico
2022-02-18 18:20 Zac Medico
2022-01-09 18:53 Zac Medico
2021-12-23 20:15 Zac Medico
2021-12-23 20:15 Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1652478324.df9ea0aeab636e3a85c77aaad179d8a519dbae48.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox