app-emulation/libpod: Bump to version 1.9.0
authorZac Medico <zmedico@gentoo.org>
Sun, 19 Apr 2020 22:49:34 +0000 (15:49 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 19 Apr 2020 22:53:32 +0000 (15:53 -0700)
 #717394 add fuse? ( sys-fs/fuse-overlayfs ) dependency

Closes: https://bugs.gentoo.org/717394
Reported-by: Lukas Hrazky <lukkash@email.cz>
Closes: https://bugs.gentoo.org/717756
Reported-by: Dennis Schridde <devurandom@gmx.net>
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Zac Medico <zmedico@gentoo.org>
app-emulation/libpod/Manifest
app-emulation/libpod/libpod-1.9.0.ebuild [new file with mode: 0644]
app-emulation/libpod/metadata.xml

index a3ff0453b374073e5672d99f738f1e38741ba530..a91cb8e3dff78c31fcb4b83703c379846778aeff 100644 (file)
@@ -3,3 +3,4 @@ DIST libpod-1.6.4.tar.gz 8340370 BLAKE2B f68f0e846a442aa0717d4918f24260560ee77c8
 DIST libpod-1.7.0.tar.gz 8679022 BLAKE2B 8a8037b75deae9f94461ab697b2a7cf095254c68d8436655c37a40375e3dd1a2b621672643e430acc8a656fcd516fa5a542e7104d6cfdbee3d213aca6228d410 SHA512 986ec7123127d3ffb26cecc39a2ae3d8a6dd3d147327449fc4e9d17f6e6606bde278f13920d0aef59410262801251e7b4cfe099cb5caafe9773533e8476848fe
 DIST libpod-1.8.0.tar.gz 8992983 BLAKE2B a3b12dbfbdb0fe01ef8791de2c938cbf21c01ac0b36314d2a170c593d22eea08d912f8547861b239bb982db6acc9d2426adb97ffda4603739321cff0fb9ff1d8 SHA512 8e46633742e7dda1b9f6b641051009485331a3a95fcc8ff4c59c46a66f86ce1b79c832c5775d825aa54b885edaf533be2f864257137277a5265509026d0a8b87
 DIST libpod-1.8.2.tar.gz 30065262 BLAKE2B 1bf4ca9b9547a710f1882ac40aee0cf295fecdb9d43dc6fa30633331ca9e19d15e6d671075627939167cdf100d30e8299e50bd51425226ff1994778782cf261b SHA512 c6e1426f66299a21be66be033460c44830b422f8a3319f37bbe53030f6a2bf84b140a29f30b83f6b61199f1df373f81a6d73787d16423ad942fc8a9154c68366
+DIST libpod-1.9.0.tar.gz 8865279 BLAKE2B 70b83f7c0482f0cbf94f235752b241aec61790d2ec01abed6ab3eb98c5de4a338e84e70c7d5fbcb239f33a7a209160c8c4868b3b86797ac8be58f08ddde5d35d SHA512 ba7de72e03dc55896025b698465745873f3030547e19133b835e4f47c1cd1c0261f17845d50cbe7b824db2a9ed77def7883405637333e141f7abecada644b5be
diff --git a/app-emulation/libpod/libpod-1.9.0.ebuild b/app-emulation/libpod/libpod-1.9.0.ebuild
new file mode 100644 (file)
index 0000000..de6c7c9
--- /dev/null
@@ -0,0 +1,142 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGIT_COMMIT="d985723506a29766ed21585ba8541033db6bd572"
+
+inherit bash-completion-r1 flag-o-matic go-module
+
+DESCRIPTION="Library and podman tool for running OCI-based containers in Pods"
+HOMEPAGE="https://github.com/containers/libpod/"
+SRC_URI="https://github.com/containers/libpod/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
+SLOT="0"
+
+KEYWORDS="~amd64"
+IUSE="apparmor btrfs +fuse +rootless selinux"
+RESTRICT="test"
+
+COMMON_DEPEND="
+       app-crypt/gpgme:=
+       >=app-emulation/conmon-2.0.0
+       || ( >=app-emulation/runc-1.0.0_rc6 app-emulation/crun )
+       dev-libs/libassuan:=
+       dev-libs/libgpg-error:=
+       net-misc/cni-plugins
+       sys-fs/lvm2
+       sys-libs/libseccomp:=
+
+       apparmor? ( sys-libs/libapparmor )
+       btrfs? ( sys-fs/btrfs-progs )
+       rootless? ( app-emulation/slirp4netns )
+       selinux? ( sys-libs/libselinux:= )
+"
+DEPEND="
+       ${COMMON_DEPEND}
+       dev-go/go-md2man"
+RDEPEND="${COMMON_DEPEND}
+       fuse? ( sys-fs/fuse-overlayfs )"
+
+src_prepare() {
+       default
+
+       # Disable installation of python modules here, since those are
+       # installed by separate ebuilds.
+       local makefile_sed_args=(
+               -e '/^GIT_.*/d'
+               -e 's/$(GO) build/$(GO) build -v -work -x/'
+               -e 's/^\(install:.*\) install\.python$/\1/'
+       )
+
+       has_version -b '>=dev-lang/go-1.13.9' || makefile_sed_args+=(-e 's:GO111MODULE=off:GO111MODULE=on:')
+
+       sed "${makefile_sed_args[@]}" -i Makefile || die
+
+       sed -e 's|OUTPUT="${CIRRUS_TAG:.*|OUTPUT='v${PV}'|' \
+               -i hack/get_release_info.sh || die
+}
+
+src_compile() {
+       # Filter unsupported linker flags
+       filter-flags '-Wl,*'
+
+       [[ -f hack/apparmor_tag.sh ]] || die
+       if use apparmor; then
+               echo -e "#!/bin/sh\necho apparmor" > hack/apparmor_tag.sh || die
+       else
+               echo -e "#!/bin/sh\ntrue" > hack/apparmor_tag.sh || die
+       fi
+
+       [[ -f hack/btrfs_installed_tag.sh ]] || die
+       if use btrfs; then
+               echo -e "#!/bin/sh\ntrue" > hack/btrfs_installed_tag.sh || die
+       else
+               echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \
+                       hack/btrfs_installed_tag.sh || die
+       fi
+
+       [[ -f hack/selinux_tag.sh ]] || die
+       if use selinux; then
+               echo -e "#!/bin/sh\necho selinux" > hack/selinux_tag.sh || die
+       else
+               echo -e "#!/bin/sh\ntrue" > hack/selinux_tag.sh || die
+       fi
+
+       export -n GOCACHE GOPATH XDG_CACHE_HOME
+       GOBIN="${S}/bin" \
+               emake all \
+                       GIT_BRANCH=master \
+                       GIT_BRANCH_CLEAN=master \
+                       COMMIT_NO="${EGIT_COMMIT}" \
+                       GIT_COMMIT="${EGIT_COMMIT}"
+}
+
+src_install() {
+       emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+
+       insinto /etc/containers
+       newins test/registries.conf registries.conf.example
+       newins test/policy.json policy.json.example
+
+       insinto /usr/share/containers
+       doins seccomp.json
+
+       newinitd "${FILESDIR}"/podman.initd podman
+
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}/podman.logrotated" podman
+
+       dobashcomp completions/bash/*
+
+       keepdir /var/lib/containers
+}
+
+pkg_preinst() {
+       LIBPOD_ROOTLESS_UPGRADE=false
+       if use rootless; then
+               has_version 'app-emulation/libpod[rootless]' || LIBPOD_ROOTLESS_UPGRADE=true
+       fi
+}
+
+pkg_postinst() {
+       local want_newline=false
+       if [[ ! ( -e ${EROOT%/*}/etc/containers/policy.json && -e ${EROOT%/*}/etc/containers/registries.conf ) ]]; then
+               elog "You need to create the following config files:"
+               elog "/etc/containers/registries.conf"
+               elog "/etc/containers/policy.json"
+               elog "To copy over default examples, use:"
+               elog "cp /etc/containers/registries.conf{.example,}"
+               elog "cp /etc/containers/policy.json{.example,}"
+               want_newline=true
+       fi
+       if [[ ${LIBPOD_ROOTLESS_UPGRADE} == true ]] ; then
+               ${want_newline} && elog ""
+               elog "For rootless operation, you need to configure subuid/subgid"
+               elog "for user running podman. In case subuid/subgid has only been"
+               elog "configured for root, run:"
+               elog "usermod --add-subuids 1065536-1131071 <user>"
+               elog "usermod --add-subgids 1065536-1131071 <user>"
+               want_newline=true
+       fi
+}
index 0ce2c6b92f8c8854af37e0520e6694221f404689..8b673ef7a51ac046de108f639ba1c5fa9ecab087 100644 (file)
                        Enables dependencies for the "btrfs" graph driver, including
                        necessary kernel flags.
                </flag>
+               <flag name="fuse">
+                       Enables fuse dependencies (fuse-overlayfs is especially useful
+                       for rootless mode).
+               </flag>
                <flag name="rootless">
                        Enables dependencies for running in rootless mode.
                </flag>