From 70a8e0f526762c28622fae5f944f8f59f9abf728 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 25 Sep 2023 11:25:16 +0100 Subject: gentoo auto-resync : 25:09:2023 - 11:25:16 --- app-containers/Manifest.gz | Bin 8408 -> 8394 bytes app-containers/containers-common/Manifest | 4 +- .../containers-common-0.56.0-r1.ebuild | 68 +++++++++ .../containers-common-9999.ebuild | 16 +- .../files/examplify-mounts-conf.patch | 7 + app-containers/containers-image/Manifest | 2 +- .../containers-image-5.28.0.ebuild | 2 +- app-containers/containers-shortnames/Manifest | 2 +- .../containers-shortnames-2023.02.20.ebuild | 2 +- app-containers/containers-storage/Manifest | 2 +- .../containers-storage-1.50.2.ebuild | 2 +- app-containers/podman/Manifest | 7 +- app-containers/podman/metadata.xml | 10 ++ app-containers/podman/podman-4.3.1.ebuild | 165 -------------------- app-containers/podman/podman-4.4.1-r1.ebuild | 166 --------------------- app-containers/podman/podman-4.5.0-r1.ebuild | 149 ++++++++++++++++++ 16 files changed, 249 insertions(+), 355 deletions(-) create mode 100644 app-containers/containers-common/containers-common-0.56.0-r1.ebuild create mode 100644 app-containers/containers-common/files/examplify-mounts-conf.patch delete mode 100644 app-containers/podman/podman-4.3.1.ebuild delete mode 100644 app-containers/podman/podman-4.4.1-r1.ebuild create mode 100644 app-containers/podman/podman-4.5.0-r1.ebuild (limited to 'app-containers') diff --git a/app-containers/Manifest.gz b/app-containers/Manifest.gz index 61fc28c7ce73..e74639049ee0 100644 Binary files a/app-containers/Manifest.gz and b/app-containers/Manifest.gz differ diff --git a/app-containers/containers-common/Manifest b/app-containers/containers-common/Manifest index 8edc1e87001d..1d1bcddd99c1 100644 --- a/app-containers/containers-common/Manifest +++ b/app-containers/containers-common/Manifest @@ -1,9 +1,11 @@ AUX default.yaml 978 BLAKE2B ab316e77c296f0ea9e51788bd62cf3abbbc0fb5b3f630acfd8d138f61802477f3d1bc75bd538200bebadd11637baf88e5ecc602db459bfa335d77704bae437e2 SHA512 84c9e1dab4d071d74a6dc8e1f02dae948e81a7e7af1810860a320c8857cf69e354e3d8c87ead2e4c15f80a1ca144116c08b0715bdd97ffc5ae2bfea3883d73e5 +AUX examplify-mounts-conf.patch 214 BLAKE2B 3e72e91ce65190acb437a1ec5e0cbbb27b46b8581a062729bd90792bea8ea3a9549c4cc4d445198eda05ef4673391aa8bff6616918fab427fb2c9973e81484e1 SHA512 2f1aaadca8644c6e7062ac7d79864297b3bcd34c4c84a6d2651ac24e159fae8773cc240d0916f27354e394ab701a4339c15d5dde6957d61f5b153677a5bebca1 AUX fix-warnings.patch 419 BLAKE2B 55f23a30af6225b6e56dc7ba97d1af8052a6fa06ee7e29816ff00d7a7847136ec916eca07ddaa86f0529beef41e30f433f341497f8dd914a736ccfc0e29a2841 SHA512 b247af0b4540f80662f8ba53f531bf1ee5ee0f944862c0baf2806df5dad0ef0d44af5cb1d3ce28de956194a9d4a2b92c897e8a432dbeb4b5f52486e7e291a9de AUX mounts.conf 87 BLAKE2B 5760f93194f6966388837d02d2505d9c7a9bf27e35bc5b5adb242288876e3afc1a9ad7da512da8a48835784a22d82c0b9e1fb112a7f29a4db8d6332a716658bf SHA512 4c52c52251558e59aefa0ccd8d733a6a67326f205219ae0dba5893be0f93090133fff954e05f31fcfaff2eb2aa48e032bb94d8ec4ac395ea3c071883dde3edcb AUX policy.json 256 BLAKE2B 78693988b98b88c35807db755bea923203ab289435d2c4ffd914ec52904dadded467ff131d90b337bf7534d533e478420a0c81599858a9012668bc4d1815144f SHA512 120f43f579f48758af6b8292fc2cfbcb5ecc46564d2d16afb74dbd1c043de44daec6633ff585b0046c55fd48aed6dbc2901623c753ec13670d3fdcecb19a42c5 AUX seccomp.json 16401 BLAKE2B 4123dd5d166de192c8cbc89caac8a2cc82cd58054109b4650e7203003474b3e389ef08ca5798d606004adc80f9e1a3035b13978b0beec9f1193627b2867b206a SHA512 742ca8f5b4720b05246113fb6aa29311c32f58502dd8ad99fa66d9c9ce83f46e338ed08c2a90bd15f05903953edffeab92a6d509aa88b57b15dec5e052ea8c07 DIST containers-common-0.56.0.tar.gz 12616120 BLAKE2B 6495ca7d0c9134bc8bd5f7b7541bb4f1160c74abb7a64bd4d2124104ea563f5381f0092da20ab45d81929a8632b1fcc1107ac05fdae011be446cff14ebf88c45 SHA512 4af720be95e6b5ca7d0664f99a389bf092b9f45d4e0602d9b49ef1d21b359d2307a94e0c88378fe0c751f5b40db54d7aab67eb497185a289cea9288cbfaa042c +EBUILD containers-common-0.56.0-r1.ebuild 1736 BLAKE2B bd66ba6b3c4ab0a72458611cd18597e218211caa412f5c853384225d444fba2429bf545cc7f021bc2973af9ebee826b593bec42c76516cbeb4332297d5707d8b SHA512 a53441e66dadb11f2c519071fadf857e66456da3cd8a184f5bbb050787338d2267fab1ba82e15d7c3afb7ecde84f49e27cb5f56397a6d3440884650f5cae1157 EBUILD containers-common-0.56.0.ebuild 1834 BLAKE2B 4cfdd7393af5371b4c3b4fc5a8e7646b6ff2b9d87105099403dd09307cb337fef29683b1d8465a08c2ff3021724c4bc46a0747772efab1738ef18f11d0fecb1d SHA512 1870d60fc62d0f32dc556124eef3054f61b195289316348108d4c7a527d0a39ac777dc9d3c7ba799da7adc0fa6104a8fa674bd72d23fe319fcc8db7cbfff7d48 -EBUILD containers-common-9999.ebuild 1834 BLAKE2B 4cfdd7393af5371b4c3b4fc5a8e7646b6ff2b9d87105099403dd09307cb337fef29683b1d8465a08c2ff3021724c4bc46a0747772efab1738ef18f11d0fecb1d SHA512 1870d60fc62d0f32dc556124eef3054f61b195289316348108d4c7a527d0a39ac777dc9d3c7ba799da7adc0fa6104a8fa674bd72d23fe319fcc8db7cbfff7d48 +EBUILD containers-common-9999.ebuild 1729 BLAKE2B eecfc378b46951b65ca37715883349b62d05d147faa56ee89b0b361efde563e07a1faf75bba94b89ece380b0a1546b6ad2cef3e30a5ac04db327a84ed639fe53 SHA512 c3eb26870458bdeadeded468b206f60725f09b770c86662938dc536cff2c01d180f9a614721198a230966a6ce42084e795e2caf05fdfb07d48336bdfc3ffb97b MISC metadata.xml 635 BLAKE2B ccb2fc61af04b1fc78a5fa4b75a17ac26f1fe0b76eedc022a752b9672dbd4ec72bf26a811b65b391811b973e387a8fdc2b79fdb54ab468a8bd59b8db7a6c5f9e SHA512 f99685c268495ab84c1b72c5c9ca21c562a4adaecab52c3c1b2eff45ed31c2a150a2db8428b70393814d663c5042bea2454d3c447b0f52d6db4fcf81d6423c0f diff --git a/app-containers/containers-common/containers-common-0.56.0-r1.ebuild b/app-containers/containers-common/containers-common-0.56.0-r1.ebuild new file mode 100644 index 000000000000..a0b2b2c3a20d --- /dev/null +++ b/app-containers/containers-common/containers-common-0.56.0-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Common config files and docs for Containers eco-system" +HOMEPAGE="https://github.com/containers/common" + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/containers/common.git" +else + SRC_URI="https://github.com/containers/common/archive/v${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${P#containers-}" + KEYWORDS="~amd64 ~arm64" +fi + +LICENSE="Apache-2.0" +SLOT="0" +RESTRICT="test" +RDEPEND=" + app-containers/containers-image + app-containers/containers-storage + app-containers/containers-shortnames + !=app-containers/netavark-1.6.0 >=app-containers/aardvark-dns-1.6.0 ) + >=app-containers/cni-plugins-0.9.1 + ) +" + +BDEPEND=" + >=dev-go/go-md2man-2.0.2 +" + +src_prepare() { + default + + [[ -f docs/Makefile ]] || die + sed -i -e 's|/usr/local|/usr|g;' docs/Makefile || die + + eapply "${FILESDIR}/fix-warnings.patch" + eapply "${FILESDIR}/examplify-mounts-conf.patch" +} + +src_compile() { + emake docs +} + +src_install() { + emake DESTDIR="${D}" install + + insinto /etc/containers + # https://github.com/containers/skopeo/raw/main/default-policy.json + doins pkg/config/containers.conf "${FILESDIR}/policy.json" + + insinto /etc/containers/registries.d + # https://github.com/containers/skopeo/raw/main/default.yaml + doins "${FILESDIR}/default.yaml" + + insinto /usr/share/containers + doins pkg/seccomp/seccomp.json pkg/subscriptions/mounts.conf + + keepdir /etc/containers/certs.d /etc/containers/oci/hooks.d /etc/containers/systemd /var/lib/containers/sigstore +} diff --git a/app-containers/containers-common/containers-common-9999.ebuild b/app-containers/containers-common/containers-common-9999.ebuild index f2bba24b1975..73407d6e4994 100644 --- a/app-containers/containers-common/containers-common-9999.ebuild +++ b/app-containers/containers-common/containers-common-9999.ebuild @@ -17,11 +17,12 @@ fi LICENSE="Apache-2.0" SLOT="0" - +RESTRICT="test" RDEPEND=" app-containers/containers-image app-containers/containers-storage app-containers/containers-shortnames + !zmedico@gentoo.org Zac Medico + + proxy-maint@gentoo.org + Proxy Maintainers + + + rahil3108@gmail.com + Rahil Bhimjiani + Podman (the POD MANager) is a tool for managing containers and images, volumes mounted into those containers, and pods @@ -35,5 +43,7 @@ containers/podman + https://github.com/containers/podman/issues + https://podman.io/docs diff --git a/app-containers/podman/podman-4.3.1.ebuild b/app-containers/podman/podman-4.3.1.ebuild deleted file mode 100644 index feeee30c1bc9..000000000000 --- a/app-containers/podman/podman-4.3.1.ebuild +++ /dev/null @@ -1,165 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -EGIT_COMMIT="814b7b003cc630bf6ab188274706c383f9fb9915" - -inherit bash-completion-r1 flag-o-matic go-module tmpfiles - -DESCRIPTION="Library and podman tool for running OCI-based containers in Pods" -HOMEPAGE="https://github.com/containers/podman/" -MY_PN=podman -MY_P=${MY_PN}-${PV} -SRC_URI="https://github.com/containers/podman/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz" -LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0" -SLOT="0" - -KEYWORDS="amd64 arm64 ~ppc64 ~riscv" -IUSE="apparmor btrfs cgroup-hybrid +fuse +init +rootless selinux" -RESTRICT+=" test" - -COMMON_DEPEND=" - app-crypt/gpgme:= - >=app-containers/conmon-2.0.0 - cgroup-hybrid? ( >=app-containers/runc-1.0.0_rc6 ) - !cgroup-hybrid? ( app-containers/crun ) - dev-libs/libassuan:= - dev-libs/libgpg-error:= - >=app-containers/cni-plugins-0.8.6 - sys-apps/shadow:= - sys-fs/lvm2 - sys-libs/libseccomp:= - - apparmor? ( sys-libs/libapparmor ) - btrfs? ( sys-fs/btrfs-progs ) - init? ( app-containers/catatonit ) - rootless? ( app-containers/slirp4netns ) - selinux? ( sys-libs/libselinux:= ) -" -DEPEND=" - ${COMMON_DEPEND} - dev-go/go-md2man" -RDEPEND="${COMMON_DEPEND} - fuse? ( sys-fs/fuse-overlayfs ) - selinux? ( sec-policy/selinux-podman )" - -S=${WORKDIR}/${MY_P} - -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/' - -e 's|^pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink$|pkg/varlink/iopodman.go: pkg/varlink/io.podman.varlink|' - ) - - 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 -} - -src_compile() { - local git_commit=${EGIT_COMMIT} - - # 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 - - # Avoid this error when generating pkg/varlink/iopodman.go: - # cannot find package "github.com/varlink/go/varlink/idl" - mkdir -p _output || die - ln -snf ../vendor _output/src || die - GO111MODULE=off GOPATH=${PWD}/_output go generate ./pkg/varlink/... || die - rm _output/src || die - - export -n GOCACHE GOPATH XDG_CACHE_HOME - GOBIN="${S}/bin" \ - emake all \ - GIT_BRANCH=master \ - GIT_BRANCH_CLEAN=master \ - COMMIT_NO="${git_commit}" \ - GIT_COMMIT="${git_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 vendor/github.com/containers/common/pkg/seccomp/seccomp.json - - newconfd "${FILESDIR}"/podman.confd podman - newinitd "${FILESDIR}"/podman.initd podman - - insinto /etc/logrotate.d - newins "${FILESDIR}/podman.logrotated" podman - - dobashcomp completions/bash/* - - insinto /usr/share/zsh/site-functions - doins completions/zsh/* - - insinto /usr/share/fish/vendor_completions.d - doins completions/fish/* - - keepdir /var/lib/containers -} - -pkg_preinst() { - PODMAN_ROOTLESS_UPGRADE=false - if use rootless; then - has_version 'app-containers/podman[rootless]' || PODMAN_ROOTLESS_UPGRADE=true - fi -} - -pkg_postinst() { - tmpfiles_process podman.conf - - 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 [[ ${PODMAN_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 " - elog "usermod --add-subgids 1065536-1131071 " - want_newline=true - fi -} diff --git a/app-containers/podman/podman-4.4.1-r1.ebuild b/app-containers/podman/podman-4.4.1-r1.ebuild deleted file mode 100644 index bfb6c4323abe..000000000000 --- a/app-containers/podman/podman-4.4.1-r1.ebuild +++ /dev/null @@ -1,166 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -EGIT_COMMIT="34e8f3933242f2e566bbbbf343cf69b7d506c1cf" - -inherit bash-completion-r1 flag-o-matic go-module tmpfiles - -DESCRIPTION="Library and podman tool for running OCI-based containers in Pods" -HOMEPAGE="https://github.com/containers/podman/" -MY_PN=podman -MY_P=${MY_PN}-${PV} -SRC_URI="https://github.com/containers/podman/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz" -LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0" -SLOT="0" - -KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv" -IUSE="apparmor btrfs cgroup-hybrid +fuse +init +rootless selinux" -RESTRICT+=" test" - -COMMON_DEPEND=" - app-crypt/gpgme:= - >=app-containers/conmon-2.0.0 - cgroup-hybrid? ( >=app-containers/runc-1.0.0_rc6 ) - !cgroup-hybrid? ( app-containers/crun ) - dev-libs/libassuan:= - dev-libs/libgpg-error:= - >=app-containers/cni-plugins-0.8.6 - sys-apps/shadow:= - sys-fs/lvm2 - sys-libs/libseccomp:= - - apparmor? ( sys-libs/libapparmor ) - btrfs? ( sys-fs/btrfs-progs ) - init? ( app-containers/catatonit ) - rootless? ( app-containers/slirp4netns ) - selinux? ( sys-libs/libselinux:= ) -" -DEPEND=" - ${COMMON_DEPEND} - dev-go/go-md2man" -RDEPEND="${COMMON_DEPEND} - fuse? ( sys-fs/fuse-overlayfs ) - selinux? ( sec-policy/selinux-podman )" - -S=${WORKDIR}/${MY_P} - -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/' - -e 's|^pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink$|pkg/varlink/iopodman.go: pkg/varlink/io.podman.varlink|' - ) - - 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 -} - -src_compile() { - local git_commit=${EGIT_COMMIT} - - # 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 - - # Avoid this error when generating pkg/varlink/iopodman.go: - # cannot find package "github.com/varlink/go/varlink/idl" - mkdir -p _output || die - ln -snf ../vendor _output/src || die - GO111MODULE=off GOPATH=${PWD}/_output go generate ./pkg/varlink/... || die - rm _output/src || die - - export -n GOCACHE GOPATH XDG_CACHE_HOME - GOBIN="${S}/bin" \ - emake all \ - PREFIX="${EPREFIX}/usr" \ - GIT_BRANCH=master \ - GIT_BRANCH_CLEAN=master \ - COMMIT_NO="${git_commit}" \ - GIT_COMMIT="${git_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 vendor/github.com/containers/common/pkg/seccomp/seccomp.json - - newconfd "${FILESDIR}"/podman.confd podman - newinitd "${FILESDIR}"/podman.initd podman - - insinto /etc/logrotate.d - newins "${FILESDIR}/podman.logrotated" podman - - dobashcomp completions/bash/* - - insinto /usr/share/zsh/site-functions - doins completions/zsh/* - - insinto /usr/share/fish/vendor_completions.d - doins completions/fish/* - - keepdir /var/lib/containers -} - -pkg_preinst() { - PODMAN_ROOTLESS_UPGRADE=false - if use rootless; then - has_version 'app-containers/podman[rootless]' || PODMAN_ROOTLESS_UPGRADE=true - fi -} - -pkg_postinst() { - tmpfiles_process podman.conf - - 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 [[ ${PODMAN_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 " - elog "usermod --add-subgids 1065536-1131071 " - want_newline=true - fi -} diff --git a/app-containers/podman/podman-4.5.0-r1.ebuild b/app-containers/podman/podman-4.5.0-r1.ebuild new file mode 100644 index 000000000000..d976c81b520a --- /dev/null +++ b/app-containers/podman/podman-4.5.0-r1.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +EGIT_COMMIT="75e3c12579d391b81d871fd1cded6cf0d043550a" + +inherit shell-completion flag-o-matic go-module tmpfiles + +DESCRIPTION="Library and podman tool for running OCI-based containers in Pods" +HOMEPAGE="https://github.com/containers/podman/ https://podman.io/" +MY_PN=podman +MY_P=${MY_PN}-${PV} +SRC_URI="https://github.com/containers/podman/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz" +LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0" +SLOT="0" + +KEYWORDS="~amd64 ~arm64" +IUSE="apparmor btrfs cgroup-hybrid +fuse +init +rootless selinux" +RESTRICT="test" + +COMMON_DEPEND=" + app-crypt/gpgme:= + >=app-containers/containers-common-0.56.0 + >=app-containers/conmon-2.0.0 + cgroup-hybrid? ( >=app-containers/runc-1.0.0_rc6 ) + !cgroup-hybrid? ( app-containers/crun ) + dev-libs/libassuan:= + dev-libs/libgpg-error:= + sys-apps/shadow:= + sys-fs/lvm2 + sys-libs/libseccomp:= + + apparmor? ( sys-libs/libapparmor ) + btrfs? ( sys-fs/btrfs-progs ) + init? ( app-containers/catatonit ) + rootless? ( app-containers/slirp4netns ) + selinux? ( sys-libs/libselinux:= ) +" +DEPEND=" + ${COMMON_DEPEND} + dev-go/go-md2man" +RDEPEND="${COMMON_DEPEND} + fuse? ( sys-fs/fuse-overlayfs ) + selinux? ( sec-policy/selinux-podman )" + +S=${WORKDIR}/${MY_P} + +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/' + -e 's|^pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink$|pkg/varlink/iopodman.go: pkg/varlink/io.podman.varlink|' + ) + + 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 +} + +src_compile() { + local git_commit=${EGIT_COMMIT} + + # 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 + + # Avoid this error when generating pkg/varlink/iopodman.go: + # cannot find package "github.com/varlink/go/varlink/idl" + mkdir -p _output || die + ln -snf ../vendor _output/src || die + GO111MODULE=off GOPATH=${PWD}/_output go generate ./pkg/varlink/... || die + rm _output/src || die + + export -n GOCACHE GOPATH XDG_CACHE_HOME + GOBIN="${S}/bin" \ + emake all \ + PREFIX="${EPREFIX}/usr" \ + GIT_BRANCH=master \ + GIT_BRANCH_CLEAN=master \ + COMMIT_NO="${git_commit}" \ + GIT_COMMIT="${git_commit}" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install + + insinto /etc/cni/net.d + doins cni/87-podman-bridge.conflist + + newconfd "${FILESDIR}"/podman.confd podman + newinitd "${FILESDIR}"/podman.initd podman + + insinto /etc/logrotate.d + newins "${FILESDIR}/podman.logrotated" podman + + dobashcomp completions/bash/* + dozshcomp completions/zsh/* + dofishcomp completions/fish/* + + keepdir /var/lib/containers +} + +pkg_preinst() { + PODMAN_ROOTLESS_UPGRADE=false + if use rootless; then + has_version 'app-containers/podman[rootless]' || PODMAN_ROOTLESS_UPGRADE=true + fi +} + +pkg_postinst() { + tmpfiles_process podman.conf + + local want_newline=false + if [[ ${PODMAN_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 " + elog "usermod --add-subgids 1065536-1131071 " + want_newline=true + fi +} -- cgit v1.2.3