summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-containers/podman')
-rw-r--r--app-containers/podman/Manifest7
-rw-r--r--app-containers/podman/files/podman-5.0.0_rc4.confd (renamed from app-containers/podman/files/podman.confd)2
-rw-r--r--app-containers/podman/files/podman-5.0.0_rc4.initd21
-rw-r--r--app-containers/podman/files/podman-auto-update-5.0.0.cron5
-rw-r--r--app-containers/podman/files/podman-clean-transient-5.0.0_rc6.confd8
-rw-r--r--app-containers/podman/files/podman-clean-transient-5.0.0_rc6.initd17
-rw-r--r--app-containers/podman/files/podman-restart-5.0.0_rc4.confd9
-rw-r--r--app-containers/podman/files/podman-restart-5.0.0_rc4.initd22
-rw-r--r--app-containers/podman/files/podman.initd20
-rw-r--r--app-containers/podman/files/seccomp-toggle-4.7.0.patch15
-rw-r--r--app-containers/podman/metadata.xml18
-rw-r--r--app-containers/podman/podman-4.1.0-r1.ebuild165
-rw-r--r--app-containers/podman/podman-4.2.1.ebuild165
-rw-r--r--app-containers/podman/podman-4.3.0.ebuild165
-rw-r--r--app-containers/podman/podman-4.3.1.ebuild165
-rw-r--r--app-containers/podman/podman-4.9.4.ebuild162
-rw-r--r--app-containers/podman/podman-5.0.2.ebuild134
-rw-r--r--app-containers/podman/podman-5.0.3.ebuild134
-rw-r--r--app-containers/podman/podman-9999.ebuild134
19 files changed, 680 insertions, 688 deletions
diff --git a/app-containers/podman/Manifest b/app-containers/podman/Manifest
index 5c2843448826..8b245d7b6949 100644
--- a/app-containers/podman/Manifest
+++ b/app-containers/podman/Manifest
@@ -1,4 +1,3 @@
-DIST podman-4.1.0.tar.gz 10904727 BLAKE2B 6d01a65b13494dc948c0667147eca6f250a81056f1bcf6eda6285566b8aa7aa526794ea96a571aecad642a8b1d3d1877cd31683ccf46662f8681a2afac083b5a SHA512 4d5f240423f21b1224ce44853a2265359dacee0d921f0ea53a7fca34f9076ebfaa49f4327a59ac51f5bf5b9dafb47dda3a9bb8e609237cc69f833b42b95bcd0a
-DIST podman-4.2.1.tar.gz 13047683 BLAKE2B 968dc88164c846108d920dfbd3796078b6e7cde6c6d884ac5ea3379abe9a3d0ea72a78b10eea644a1040d1d564c13f05fe69112c49084344e95095c50ff537d5 SHA512 a8a6e3228c1cb6860bb27515bd081b5c395a17bd69fab8797758b84631d08d2389e554621080e66ecc04818c1c4d132ea6ed0edfedcfea6d7886a70ebc95297d
-DIST podman-4.3.0.tar.gz 12672944 BLAKE2B 530b5484abe774aacdb107162a68d98f15c0b5af7cf5c8a862fe9cb701cc3a57d2ed2bafe09517d3a3f9e09fa196b28eed6c6e2dabadaf663ad5ff0d1de97475 SHA512 b5b70e83a67ccfea149cb7df87a452d51fbb5e87ab3d1c6b4f623ba0f8f8a25442cee6ae8b8d31ea844f08c3ea4962e865ddb90e61c185dfad29d3b23aa8338f
-DIST podman-4.3.1.tar.gz 12674902 BLAKE2B 6a6412e62004693cd734725556ee8a7082300676398fd2714c02168eaae29e56ec506755ef2a05b32c57620379ada3162607d01b641bc9197f9d9c77ff865fb8 SHA512 907dafc6481cbcb7a9b6771c3682a88d6c3b055050c0a180f9ceb985c1a3826318056b62dd6d2859a2a23eba7aad4bf26404327d5479bde98658745fa7d88efa
+DIST podman-4.9.4.tar.gz 21733620 BLAKE2B 17d099c0a13fbbb77556742313c39995127fc97b4086ef3c2d74a92cc0a4f825a6c729dd099c6d4f4cd3d2ebfd470494babdeaa85a5653b327ea1a16fb5ea993 SHA512 7b52555789a1c214fcf26b0826bdda6cf0ccca588f87c0f15ac5e8358ddac625e17cafbe6a43de07cad964e1418b5ee0d2e38a5cb5dc6f6d4e638399749a7f7b
+DIST podman-5.0.2.tar.gz 23811875 BLAKE2B e943eb36eb0b80332223afc5d971c0886f6eaffeb7133c634d28c0a38e9aae6a54266691067dbca7684882f8b6dad72c3d5de2287ec5a7e8fb4b1cfd96df0b4d SHA512 70dbac9fc81d66eb9b0a5174f5776b805397005cacca917674d2b001591fadd05a776c956e693bad932e9eefe591c35da5c566e8e9e01db8be42bc454cd03104
+DIST podman-5.0.3.tar.gz 23814179 BLAKE2B 46385710e4d24f8eca3a7c98c18a97b96ecd4691b3c965c5a5e7bc690d40d892a6d5fb71c1dd8ec56cc907a2167ab5ee795b4d2c2279c58cef3a5a1cece8b678 SHA512 c605a52cc5aba43d485796c4986f2d1be704e5c931473bf5ba1cf77f703cdb3d16f41d33da0b25287e8d001077f77caf117d3ea5dbd7c56a744274025d9ab07d
diff --git a/app-containers/podman/files/podman.confd b/app-containers/podman/files/podman-5.0.0_rc4.confd
index e997d3b4000e..eafaee7fddef 100644
--- a/app-containers/podman/files/podman.confd
+++ b/app-containers/podman/files/podman-5.0.0_rc4.confd
@@ -5,7 +5,7 @@
#LOG_LEVEL="error"
# Sets the API service daemon socket
-#SOCKET="unix:/run/${RC_SVCNAME}/podman.sock"
+#SOCKET="unix:///run/podman/podman.sock"
# Configure the user[:group] the API service daemon will run as
#RUN_AS_USER="root:root"
diff --git a/app-containers/podman/files/podman-5.0.0_rc4.initd b/app-containers/podman/files/podman-5.0.0_rc4.initd
new file mode 100644
index 000000000000..53026a54176d
--- /dev/null
+++ b/app-containers/podman/files/podman-5.0.0_rc4.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 2015-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Podman API Service"
+
+LOG_PATH="/var/log/${RC_SVCNAME}"
+output_log="${LOG_PATH}/${RC_SVCNAME}.log"
+error_log="${LOG_PATH}/${RC_SVCNAME}.log"
+RUN_PATH="/run/${RC_SVCNAME}"
+pidfile="${RUN_PATH}/${RC_SVCNAME}.pid"
+
+command_user="${RUN_AS_USER:=root:root}"
+command="/usr/bin/podman"
+command_args="--log-level ${LOG_LEVEL:-error} system service --time 0 ${SOCKET:-unix://${RUN_PATH}/${RC_SVCNAME}.sock}"
+command_background="true"
+
+start() {
+ checkpath -o "${RUN_AS_USER}" -d "${RUN_PATH}" "${LOG_PATH}"
+ default_start
+}
diff --git a/app-containers/podman/files/podman-auto-update-5.0.0.cron b/app-containers/podman/files/podman-auto-update-5.0.0.cron
new file mode 100644
index 000000000000..509146e0aa56
--- /dev/null
+++ b/app-containers/podman/files/podman-auto-update-5.0.0.cron
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# podman-auto-update(1)
+# uncomment following to auto update containers according to their auto-update policy
+# /usr/bin/podman auto-update && /usr/bin/podman image prune -f
diff --git a/app-containers/podman/files/podman-clean-transient-5.0.0_rc6.confd b/app-containers/podman/files/podman-clean-transient-5.0.0_rc6.confd
new file mode 100644
index 000000000000..e85d8d51ff8e
--- /dev/null
+++ b/app-containers/podman/files/podman-clean-transient-5.0.0_rc6.confd
@@ -0,0 +1,8 @@
+# Config file for /etc/init.d/podman-clean-transient
+
+# Sets the podman log level
+# valid levels: debug, info, warn, error, fatal or panic
+#LOG_LEVEL="info"
+
+# Configure the user[:group] the podman will run as
+#RUN_AS_USER="root:root"
diff --git a/app-containers/podman/files/podman-clean-transient-5.0.0_rc6.initd b/app-containers/podman/files/podman-clean-transient-5.0.0_rc6.initd
new file mode 100644
index 000000000000..cd759c7eafc0
--- /dev/null
+++ b/app-containers/podman/files/podman-clean-transient-5.0.0_rc6.initd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 2015-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# This service runs once each boot to remove potential leftover
+# container state from previous boots.
+
+# This is needed when using transient storage mode in podman where the
+# database and other configs are stored in tmpfs, but some other files
+# are not. If we don't run this after an unclean boot then there may
+# be some leftover files that grow over time.
+
+description="Clean up podman transient data"
+
+command_user="${RUN_AS_USER:-root:root}"
+command="/usr/bin/podman"
+command_args="--log-level ${LOG_LEVEL:-info} system prune --external"
diff --git a/app-containers/podman/files/podman-restart-5.0.0_rc4.confd b/app-containers/podman/files/podman-restart-5.0.0_rc4.confd
new file mode 100644
index 000000000000..4d63848cb16f
--- /dev/null
+++ b/app-containers/podman/files/podman-restart-5.0.0_rc4.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/podman-restart
+
+# Sets the podman log level
+# valid levels: debug, info, warn, error, fatal or panic
+#LOG_LEVEL="info"
+
+# Configure the user[:group] the podman will run as
+# Can be useful to manage rootful or rootless containers
+#RUN_AS_USER="root:root"
diff --git a/app-containers/podman/files/podman-restart-5.0.0_rc4.initd b/app-containers/podman/files/podman-restart-5.0.0_rc4.initd
new file mode 100644
index 000000000000..d02bd64c6279
--- /dev/null
+++ b/app-containers/podman/files/podman-restart-5.0.0_rc4.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 2015-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Start all containers with restart-policy set to always"
+
+command_user="${RUN_AS_USER:=root:root}"
+command="/usr/bin/podman"
+command_args="--log-level ${LOG_LEVEL:=info} start --all --filter restart-policy=always"
+
+depend() {
+ after net
+}
+
+stop() {
+ ebegin "Stopping all containers with restart-policy set to always"
+ ${command} \
+ --log-level ${LOG_LEVEL} \
+ stop \
+ $(${command} container ls --filter restart-policy=always -q)
+ eend $? "Failed to stop containers with restart-policy set to always"
+}
diff --git a/app-containers/podman/files/podman.initd b/app-containers/podman/files/podman.initd
deleted file mode 100644
index 7adcdab40ea3..000000000000
--- a/app-containers/podman/files/podman.initd
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2015-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-description="Podman Remote API Service"
-LOG_PATH="/var/log/${RC_SVCNAME}"
-RUN_PATH="/run/${RC_SVCNAME}"
-: ${LOG_LEVEL:=error}
-: ${RUN_AS_USER:=root:root}
-: ${SOCKET:=unix:/run/${RC_SVCNAME}/podman.sock}
-pidfile="${RUN_PATH}/${RC_SVCNAME}.pid"
-command="/usr/bin/podman"
-command_args="--log-level ${LOG_LEVEL} system service -t 0 ${SOCKET}"
-command_background="true"
-start_stop_daemon_args="--stdout ${LOG_PATH}/${RC_SVCNAME}.log --stderr ${LOG_PATH}/${RC_SVCNAME}.log --user ${RUN_AS_USER}"
-
-start() {
- checkpath -o "${RUN_AS_USER}" -d "${RUN_PATH}" "${LOG_PATH}"
- default_start
-}
diff --git a/app-containers/podman/files/seccomp-toggle-4.7.0.patch b/app-containers/podman/files/seccomp-toggle-4.7.0.patch
new file mode 100644
index 000000000000..17a09b601369
--- /dev/null
+++ b/app-containers/podman/files/seccomp-toggle-4.7.0.patch
@@ -0,0 +1,15 @@
+--- a/Makefile
++++ b/Makefile
+@@ -57,7 +57,11 @@
+ $(shell hack/systemd_tag.sh) \
+ $(shell hack/libsubid_tag.sh) \
+ exclude_graphdriver_devicemapper \
+- seccomp
++
++BUILD_SECCOMP ?= yes
++ifeq ($(BUILD_SECCOMP),yes)
++BUILDTAGS += seccomp
++endif
+ # N/B: This value is managed by Renovate, manual changes are
+ # possible, as long as they don't disturb the formatting
+ # (i.e. DO NOT ADD A 'v' prefix!)
diff --git a/app-containers/podman/metadata.xml b/app-containers/podman/metadata.xml
index 3a429ae48984..59ab2d3ffda0 100644
--- a/app-containers/podman/metadata.xml
+++ b/app-containers/podman/metadata.xml
@@ -5,6 +5,14 @@
<email>zmedico@gentoo.org</email>
<name>Zac Medico</name>
</maintainer>
+ <maintainer type="person" proxied="yes">
+ <email>me@rahil.rocks</email>
+ <name>Rahil Bhimjiani</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<longdescription lang="en">
Podman (the POD MANager) is a tool for managing containers
and images, volumes mounted into those containers, and pods
@@ -16,11 +24,10 @@
</longdescription>
<use>
<flag name="btrfs">
- Enables dependencies for the "btrfs" graph driver, including
- necessary kernel flags.
+ Enables btrfs support (graph driver) in Podman
</flag>
<flag name="cgroup-hybrid">
- Default to hybrid (legacy) cgroup hierarchy instead of unified (modern).
+ Use legacy (hybrid) cgroups instead of modern (unified) cgroups
</flag>
<flag name="fuse">
Enables fuse dependencies (fuse-overlayfs is especially useful
@@ -32,8 +39,13 @@
<flag name="rootless">
Enables dependencies for running in rootless mode.
</flag>
+ <flag name="wrapper">
+ Install wrapper which lets use podman for command `docker`
+ </flag>
</use>
<upstream>
<remote-id type="github">containers/podman</remote-id>
+ <bugs-to>https://github.com/containers/podman/issues</bugs-to>
+ <doc>https://podman.io/docs</doc>
</upstream>
</pkgmetadata>
diff --git a/app-containers/podman/podman-4.1.0-r1.ebuild b/app-containers/podman/podman-4.1.0-r1.ebuild
deleted file mode 100644
index 2124736a948a..000000000000
--- a/app-containers/podman/podman-4.1.0-r1.ebuild
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-EGIT_COMMIT="e4b03902052294d4f342a185bb54702ed5bed8b1"
-
-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 <user>"
- elog "usermod --add-subgids 1065536-1131071 <user>"
- want_newline=true
- fi
-}
diff --git a/app-containers/podman/podman-4.2.1.ebuild b/app-containers/podman/podman-4.2.1.ebuild
deleted file mode 100644
index 7f04def7145b..000000000000
--- a/app-containers/podman/podman-4.2.1.ebuild
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-EGIT_COMMIT="62b324ddf718411b1d4d0ba8117c632f7f984a38"
-
-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 <user>"
- elog "usermod --add-subgids 1065536-1131071 <user>"
- want_newline=true
- fi
-}
diff --git a/app-containers/podman/podman-4.3.0.ebuild b/app-containers/podman/podman-4.3.0.ebuild
deleted file mode 100644
index 98eb5c251dcf..000000000000
--- a/app-containers/podman/podman-4.3.0.ebuild
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-EGIT_COMMIT="ad42af94903ce4f3c3cd0693e4e17e4286bf094b"
-
-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 <user>"
- elog "usermod --add-subgids 1065536-1131071 <user>"
- want_newline=true
- fi
-}
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 4018303ee357..000000000000
--- a/app-containers/podman/podman-4.3.1.ebuild
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright 1999-2022 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 <user>"
- elog "usermod --add-subgids 1065536-1131071 <user>"
- want_newline=true
- fi
-}
diff --git a/app-containers/podman/podman-4.9.4.ebuild b/app-containers/podman/podman-4.9.4.ebuild
new file mode 100644
index 000000000000..ea2bd34e2507
--- /dev/null
+++ b/app-containers/podman/podman-4.9.4.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11,12} )
+
+inherit go-module python-any-r1 tmpfiles toolchain-funcs linux-info
+
+DESCRIPTION="A tool for managing OCI containers and pods with Docker-compatible CLI"
+HOMEPAGE="https://github.com/containers/podman/ https://podman.io/"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/containers/podman.git"
+else
+ SRC_URI="https://github.com/containers/podman/archive/v${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${P/_rc/-rc}"
+ if [[ ${PV} != *rc* ]] ; then
+ KEYWORDS="amd64 arm64 ~riscv"
+ fi
+fi
+
+# main pkg
+LICENSE="Apache-2.0"
+# deps
+LICENSE+=" BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
+SLOT="0"
+IUSE="apparmor btrfs cgroup-hybrid wrapper +fuse +init +rootless +seccomp selinux systemd"
+RESTRICT="test"
+
+RDEPEND="
+ app-crypt/gpgme:=
+ >=app-containers/conmon-2.0.0
+ >=app-containers/containers-common-0.56.0
+ dev-libs/libassuan:=
+ dev-libs/libgpg-error:=
+ sys-apps/shadow:=
+
+ apparmor? ( sys-libs/libapparmor )
+ btrfs? ( sys-fs/btrfs-progs )
+ cgroup-hybrid? ( >=app-containers/runc-1.0.0_rc6 )
+ !cgroup-hybrid? ( app-containers/crun )
+ wrapper? ( !app-containers/docker-cli )
+ fuse? ( sys-fs/fuse-overlayfs )
+ init? ( app-containers/catatonit )
+ rootless? ( app-containers/slirp4netns )
+ seccomp? ( sys-libs/libseccomp:= )
+ selinux? ( sec-policy/selinux-podman sys-libs/libselinux:= )
+ systemd? ( sys-apps/systemd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-go/go-md2man
+"
+
+PATCHES=(
+ "${FILESDIR}/seccomp-toggle-4.7.0.patch"
+)
+
+CONFIG_CHECK="
+ ~USER_NS
+"
+
+pkg_setup() {
+ use btrfs && CONFIG_CHECK+=" ~BTRFS_FS"
+ linux-info_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # assure necessary files are present
+ local file
+ for file in apparmor_tag btrfs_installed_tag btrfs_tag systemd_tag; do
+ [[ -f hack/"${file}".sh ]] || die
+ done
+
+ local feature
+ for feature in apparmor systemd; do
+ cat <<-EOF > hack/"${feature}"_tag.sh || die
+ #!/usr/bin/env bash
+ $(usex ${feature} "echo ${feature}" echo)
+ EOF
+ done
+
+ echo -e "#!/usr/bin/env bash\n echo" > hack/btrfs_installed_tag.sh || die
+ cat <<-EOF > hack/btrfs_tag.sh || die
+ #!/usr/bin/env bash
+ $(usex btrfs echo 'echo exclude_graphdriver_btrfs btrfs_noversion')
+ EOF
+}
+
+src_compile() {
+ export PREFIX="${EPREFIX}/usr"
+
+ # bug 906073
+ use elibc_musl && export CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
+
+ # For non-live versions, prevent git operations which causes sandbox violations
+ # https://github.com/gentoo/gentoo/pull/33531#issuecomment-1786107493
+ [[ ${PV} != 9999* ]] && export COMMIT_NO="" GIT_COMMIT="" EPOCH_TEST_COMMIT=""
+
+ # Use proper pkg-config to get gpgme cflags and ldflags when
+ # cross-compiling, bug 930982.
+ if tc-is-cross-compiler; then
+ tc-export PKG_CONFIG
+ fi
+
+ # BUILD_SECCOMP is used in the patch to toggle seccomp
+ emake BUILDFLAGS="-v -work -x" GOMD2MAN="go-md2man" BUILD_SECCOMP="$(usex seccomp)" all $(usev wrapper docker-docs)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install.completions $(usev wrapper install.docker-full)
+
+ insinto /etc/cni/net.d
+ doins cni/87-podman-bridge.conflist
+
+ if use !systemd; then
+ newconfd "${FILESDIR}"/podman-5.0.0_rc4.confd podman
+ newinitd "${FILESDIR}"/podman-5.0.0_rc4.initd podman
+
+ newinitd "${FILESDIR}"/podman-restart-5.0.0_rc4.initd podman-restart
+ newconfd "${FILESDIR}"/podman-restart-5.0.0_rc4.confd podman-restart
+
+ newinitd "${FILESDIR}"/podman-clean-transient-5.0.0_rc6.initd podman-clean-transient
+ newconfd "${FILESDIR}"/podman-clean-transient-5.0.0_rc6.confd podman-clean-transient
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/podman-auto-update-5.0.0.cron podman-auto-update
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/podman.logrotated" podman
+ fi
+
+ 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 $(usev wrapper podman-docker.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 <user>"
+ elog "usermod --add-subgids 1065536-1131071 <user>"
+ want_newline=true
+ fi
+}
diff --git a/app-containers/podman/podman-5.0.2.ebuild b/app-containers/podman/podman-5.0.2.ebuild
new file mode 100644
index 000000000000..738613b007dc
--- /dev/null
+++ b/app-containers/podman/podman-5.0.2.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11,12} )
+
+inherit go-module python-any-r1 tmpfiles toolchain-funcs linux-info
+
+DESCRIPTION="A tool for managing OCI containers and pods with Docker-compatible CLI"
+HOMEPAGE="https://github.com/containers/podman/ https://podman.io/"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/containers/podman.git"
+else
+ SRC_URI="https://github.com/containers/podman/archive/v${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${P/_rc/-rc}"
+ [[ ${PV} != *rc* ]] && \
+ KEYWORDS="~amd64 ~arm64 ~riscv"
+fi
+
+# main pkg
+LICENSE="Apache-2.0"
+# deps
+LICENSE+=" BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
+SLOT="0"
+IUSE="apparmor btrfs +seccomp selinux systemd wrapper"
+RESTRICT="test"
+
+RDEPEND="
+ app-containers/catatonit
+ >=app-containers/conmon-2.1.10
+ >=app-containers/containers-common-0.58.0-r1
+ app-crypt/gpgme:=
+ dev-libs/libassuan:=
+ dev-libs/libgpg-error:=
+ sys-apps/shadow:=
+
+ apparmor? ( sys-libs/libapparmor )
+ btrfs? ( sys-fs/btrfs-progs )
+ wrapper? ( !app-containers/docker-cli )
+ seccomp? ( sys-libs/libseccomp:= )
+ selinux? ( sec-policy/selinux-podman sys-libs/libselinux:= )
+ systemd? ( sys-apps/systemd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-go/go-md2man
+"
+
+PATCHES=(
+ "${FILESDIR}/seccomp-toggle-4.7.0.patch"
+)
+
+CONFIG_CHECK="
+ ~USER_NS
+"
+
+pkg_setup() {
+ use btrfs && CONFIG_CHECK+=" ~BTRFS_FS"
+ linux-info_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # assure necessary files are present
+ local file
+ for file in apparmor_tag btrfs_installed_tag btrfs_tag systemd_tag; do
+ [[ -f hack/"${file}".sh ]] || die
+ done
+
+ local feature
+ for feature in apparmor systemd; do
+ cat <<-EOF > hack/"${feature}"_tag.sh || die
+ #!/usr/bin/env bash
+ $(usex ${feature} "echo ${feature}" echo)
+ EOF
+ done
+
+ echo -e "#!/usr/bin/env bash\n echo" > hack/btrfs_installed_tag.sh || die
+ cat <<-EOF > hack/btrfs_tag.sh || die
+ #!/usr/bin/env bash
+ $(usex btrfs echo 'echo exclude_graphdriver_btrfs btrfs_noversion')
+ EOF
+}
+
+src_compile() {
+ export PREFIX="${EPREFIX}/usr"
+
+ # For non-live versions, prevent git operations which causes sandbox violations
+ # https://github.com/gentoo/gentoo/pull/33531#issuecomment-1786107493
+ [[ ${PV} != 9999* ]] && export COMMIT_NO="" GIT_COMMIT="" EPOCH_TEST_COMMIT=""
+
+ # Use proper pkg-config to get gpgme cflags and ldflags when
+ # cross-compiling, bug 930982.
+ if tc-is-cross-compiler; then
+ tc-export PKG_CONFIG
+ fi
+
+ # BUILD_SECCOMP is used in the patch to toggle seccomp
+ emake BUILDFLAGS="-v -work -x" GOMD2MAN="go-md2man" BUILD_SECCOMP="$(usex seccomp)" \
+ all $(usev wrapper docker-docs)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install.completions $(usev wrapper install.docker-full)
+
+ if use !systemd; then
+ newconfd "${FILESDIR}"/podman-5.0.0_rc4.confd podman
+ newinitd "${FILESDIR}"/podman-5.0.0_rc4.initd podman
+
+ newinitd "${FILESDIR}"/podman-restart-5.0.0_rc4.initd podman-restart
+ newconfd "${FILESDIR}"/podman-restart-5.0.0_rc4.confd podman-restart
+
+ newinitd "${FILESDIR}"/podman-clean-transient-5.0.0_rc6.initd podman-clean-transient
+ newconfd "${FILESDIR}"/podman-clean-transient-5.0.0_rc6.confd podman-clean-transient
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/podman-auto-update-5.0.0.cron podman-auto-update
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/podman.logrotated" podman
+ fi
+
+ keepdir /var/lib/containers
+}
+
+pkg_postinst() {
+ tmpfiles_process podman.conf $(usev wrapper podman-docker.conf)
+}
diff --git a/app-containers/podman/podman-5.0.3.ebuild b/app-containers/podman/podman-5.0.3.ebuild
new file mode 100644
index 000000000000..738613b007dc
--- /dev/null
+++ b/app-containers/podman/podman-5.0.3.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11,12} )
+
+inherit go-module python-any-r1 tmpfiles toolchain-funcs linux-info
+
+DESCRIPTION="A tool for managing OCI containers and pods with Docker-compatible CLI"
+HOMEPAGE="https://github.com/containers/podman/ https://podman.io/"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/containers/podman.git"
+else
+ SRC_URI="https://github.com/containers/podman/archive/v${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${P/_rc/-rc}"
+ [[ ${PV} != *rc* ]] && \
+ KEYWORDS="~amd64 ~arm64 ~riscv"
+fi
+
+# main pkg
+LICENSE="Apache-2.0"
+# deps
+LICENSE+=" BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
+SLOT="0"
+IUSE="apparmor btrfs +seccomp selinux systemd wrapper"
+RESTRICT="test"
+
+RDEPEND="
+ app-containers/catatonit
+ >=app-containers/conmon-2.1.10
+ >=app-containers/containers-common-0.58.0-r1
+ app-crypt/gpgme:=
+ dev-libs/libassuan:=
+ dev-libs/libgpg-error:=
+ sys-apps/shadow:=
+
+ apparmor? ( sys-libs/libapparmor )
+ btrfs? ( sys-fs/btrfs-progs )
+ wrapper? ( !app-containers/docker-cli )
+ seccomp? ( sys-libs/libseccomp:= )
+ selinux? ( sec-policy/selinux-podman sys-libs/libselinux:= )
+ systemd? ( sys-apps/systemd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-go/go-md2man
+"
+
+PATCHES=(
+ "${FILESDIR}/seccomp-toggle-4.7.0.patch"
+)
+
+CONFIG_CHECK="
+ ~USER_NS
+"
+
+pkg_setup() {
+ use btrfs && CONFIG_CHECK+=" ~BTRFS_FS"
+ linux-info_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # assure necessary files are present
+ local file
+ for file in apparmor_tag btrfs_installed_tag btrfs_tag systemd_tag; do
+ [[ -f hack/"${file}".sh ]] || die
+ done
+
+ local feature
+ for feature in apparmor systemd; do
+ cat <<-EOF > hack/"${feature}"_tag.sh || die
+ #!/usr/bin/env bash
+ $(usex ${feature} "echo ${feature}" echo)
+ EOF
+ done
+
+ echo -e "#!/usr/bin/env bash\n echo" > hack/btrfs_installed_tag.sh || die
+ cat <<-EOF > hack/btrfs_tag.sh || die
+ #!/usr/bin/env bash
+ $(usex btrfs echo 'echo exclude_graphdriver_btrfs btrfs_noversion')
+ EOF
+}
+
+src_compile() {
+ export PREFIX="${EPREFIX}/usr"
+
+ # For non-live versions, prevent git operations which causes sandbox violations
+ # https://github.com/gentoo/gentoo/pull/33531#issuecomment-1786107493
+ [[ ${PV} != 9999* ]] && export COMMIT_NO="" GIT_COMMIT="" EPOCH_TEST_COMMIT=""
+
+ # Use proper pkg-config to get gpgme cflags and ldflags when
+ # cross-compiling, bug 930982.
+ if tc-is-cross-compiler; then
+ tc-export PKG_CONFIG
+ fi
+
+ # BUILD_SECCOMP is used in the patch to toggle seccomp
+ emake BUILDFLAGS="-v -work -x" GOMD2MAN="go-md2man" BUILD_SECCOMP="$(usex seccomp)" \
+ all $(usev wrapper docker-docs)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install.completions $(usev wrapper install.docker-full)
+
+ if use !systemd; then
+ newconfd "${FILESDIR}"/podman-5.0.0_rc4.confd podman
+ newinitd "${FILESDIR}"/podman-5.0.0_rc4.initd podman
+
+ newinitd "${FILESDIR}"/podman-restart-5.0.0_rc4.initd podman-restart
+ newconfd "${FILESDIR}"/podman-restart-5.0.0_rc4.confd podman-restart
+
+ newinitd "${FILESDIR}"/podman-clean-transient-5.0.0_rc6.initd podman-clean-transient
+ newconfd "${FILESDIR}"/podman-clean-transient-5.0.0_rc6.confd podman-clean-transient
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/podman-auto-update-5.0.0.cron podman-auto-update
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/podman.logrotated" podman
+ fi
+
+ keepdir /var/lib/containers
+}
+
+pkg_postinst() {
+ tmpfiles_process podman.conf $(usev wrapper podman-docker.conf)
+}
diff --git a/app-containers/podman/podman-9999.ebuild b/app-containers/podman/podman-9999.ebuild
new file mode 100644
index 000000000000..738613b007dc
--- /dev/null
+++ b/app-containers/podman/podman-9999.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11,12} )
+
+inherit go-module python-any-r1 tmpfiles toolchain-funcs linux-info
+
+DESCRIPTION="A tool for managing OCI containers and pods with Docker-compatible CLI"
+HOMEPAGE="https://github.com/containers/podman/ https://podman.io/"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/containers/podman.git"
+else
+ SRC_URI="https://github.com/containers/podman/archive/v${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${P/_rc/-rc}"
+ [[ ${PV} != *rc* ]] && \
+ KEYWORDS="~amd64 ~arm64 ~riscv"
+fi
+
+# main pkg
+LICENSE="Apache-2.0"
+# deps
+LICENSE+=" BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
+SLOT="0"
+IUSE="apparmor btrfs +seccomp selinux systemd wrapper"
+RESTRICT="test"
+
+RDEPEND="
+ app-containers/catatonit
+ >=app-containers/conmon-2.1.10
+ >=app-containers/containers-common-0.58.0-r1
+ app-crypt/gpgme:=
+ dev-libs/libassuan:=
+ dev-libs/libgpg-error:=
+ sys-apps/shadow:=
+
+ apparmor? ( sys-libs/libapparmor )
+ btrfs? ( sys-fs/btrfs-progs )
+ wrapper? ( !app-containers/docker-cli )
+ seccomp? ( sys-libs/libseccomp:= )
+ selinux? ( sec-policy/selinux-podman sys-libs/libselinux:= )
+ systemd? ( sys-apps/systemd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-go/go-md2man
+"
+
+PATCHES=(
+ "${FILESDIR}/seccomp-toggle-4.7.0.patch"
+)
+
+CONFIG_CHECK="
+ ~USER_NS
+"
+
+pkg_setup() {
+ use btrfs && CONFIG_CHECK+=" ~BTRFS_FS"
+ linux-info_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # assure necessary files are present
+ local file
+ for file in apparmor_tag btrfs_installed_tag btrfs_tag systemd_tag; do
+ [[ -f hack/"${file}".sh ]] || die
+ done
+
+ local feature
+ for feature in apparmor systemd; do
+ cat <<-EOF > hack/"${feature}"_tag.sh || die
+ #!/usr/bin/env bash
+ $(usex ${feature} "echo ${feature}" echo)
+ EOF
+ done
+
+ echo -e "#!/usr/bin/env bash\n echo" > hack/btrfs_installed_tag.sh || die
+ cat <<-EOF > hack/btrfs_tag.sh || die
+ #!/usr/bin/env bash
+ $(usex btrfs echo 'echo exclude_graphdriver_btrfs btrfs_noversion')
+ EOF
+}
+
+src_compile() {
+ export PREFIX="${EPREFIX}/usr"
+
+ # For non-live versions, prevent git operations which causes sandbox violations
+ # https://github.com/gentoo/gentoo/pull/33531#issuecomment-1786107493
+ [[ ${PV} != 9999* ]] && export COMMIT_NO="" GIT_COMMIT="" EPOCH_TEST_COMMIT=""
+
+ # Use proper pkg-config to get gpgme cflags and ldflags when
+ # cross-compiling, bug 930982.
+ if tc-is-cross-compiler; then
+ tc-export PKG_CONFIG
+ fi
+
+ # BUILD_SECCOMP is used in the patch to toggle seccomp
+ emake BUILDFLAGS="-v -work -x" GOMD2MAN="go-md2man" BUILD_SECCOMP="$(usex seccomp)" \
+ all $(usev wrapper docker-docs)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install.completions $(usev wrapper install.docker-full)
+
+ if use !systemd; then
+ newconfd "${FILESDIR}"/podman-5.0.0_rc4.confd podman
+ newinitd "${FILESDIR}"/podman-5.0.0_rc4.initd podman
+
+ newinitd "${FILESDIR}"/podman-restart-5.0.0_rc4.initd podman-restart
+ newconfd "${FILESDIR}"/podman-restart-5.0.0_rc4.confd podman-restart
+
+ newinitd "${FILESDIR}"/podman-clean-transient-5.0.0_rc6.initd podman-clean-transient
+ newconfd "${FILESDIR}"/podman-clean-transient-5.0.0_rc6.confd podman-clean-transient
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/podman-auto-update-5.0.0.cron podman-auto-update
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/podman.logrotated" podman
+ fi
+
+ keepdir /var/lib/containers
+}
+
+pkg_postinst() {
+ tmpfiles_process podman.conf $(usev wrapper podman-docker.conf)
+}