sys-cluster/patroni - 4.1.4 (inode64-overlay)

Search

Install

Install this version:

emerge -a =sys-cluster/patroni-4.1.4

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =sys-cluster/patroni-4.1.4

Or alternatively:

emerge --autounmask-write -a =sys-cluster/patroni-4.1.4

Package Information

Description:
A template for PostgreSQL High Availability with ZooKeeper, etcd, or Consul
Homepage:
https://github.com/zalando/patroni
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
4.1.4 8 ~amd64 ~ppc64 ~x86 0
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{11..14} )
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1 pypi systemd

DESCRIPTION="A template for PostgreSQL High Availability with ZooKeeper, etcd, or Consul"
HOMEPAGE="https://github.com/zalando/patroni"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~ppc64 ~x86"
IUSE="s3 systemd +etcd"

DEPEND="
	acct-group/postgres
	acct-user/postgres
"

RDEPEND="
	dev-python/urllib3[${PYTHON_USEDEP}]
	dev-python/pyyaml[${PYTHON_USEDEP}]
	dev-python/click[${PYTHON_USEDEP}]
	dev-python/prettytable[${PYTHON_USEDEP}]
	dev-python/python-dateutil[${PYTHON_USEDEP}]
	dev-python/cryptography[${PYTHON_USEDEP}]
	dev-python/python-json-logger[${PYTHON_USEDEP}]
	dev-python/psutil[${PYTHON_USEDEP}]
	dev-util/ydiff[${PYTHON_USEDEP}]
	dev-python/pysyncobj[${PYTHON_USEDEP}]
	dev-python/psycopg[${PYTHON_USEDEP}]
	s3? ( dev-python/boto3[${PYTHON_USEDEP}] )
	systemd? ( dev-python/python-systemd[${PYTHON_USEDEP}] )
	etcd? ( dev-python/python-etcd[${PYTHON_USEDEP}] )
"

src_install() {
	distutils-r1_src_install

	keepdir /etc/patroni
	fowners postgres:postgres /etc/patroni
	fperms 0750 /etc/patroni

	if ! use s3; then
		rm "${ED}"/usr/bin/patroni_aws
	fi

	newinitd "${FILESDIR}"/${PN}.initd ${PN}
	systemd_dounit "${FILESDIR}/${PN}.service"
}

pkg_postinst() {
	if [[ ! -e "${EROOT}/etc/patroni/patroni.yml" ]]; then
		elog "Execute the following command to initialize environment:"
		elog
		elog "# emerge --config \"=${CATEGORY}/${PF}\""
		elog
		elog "Installation notes are at official site"
		elog "https://patroni.readthedocs.io/en/latest/patroni_configuration.html"
	fi
}

pkg_config() {
	einfo "Initializing configuration."
	patroni --generate-config /etc/patroni/patroni.yml
	chown postgres:postgres /etc/patroni/patroni.yml
	chmod 0640 /etc/patroni/patroni.yml
}

USE Flags

Manage flags for this package: euse -i <flag> -p sys-cluster/patroni | euse -E <flag> -p sys-cluster/patroni | euse -D <flag> -p sys-cluster/patroni

Global/Standard Flags

s3
etcd
Default: Enabled (+)

Inherited Eclasses

Dependencies

DEPEND

	acct-group/postgres
	acct-user/postgres

RDEPEND

	dev-python/urllib3[]
	dev-python/pyyaml[]
	dev-python/click[]
	dev-python/prettytable[]
	dev-python/python-dateutil[]
	dev-python/cryptography[]
	dev-python/python-json-logger[]
	dev-python/psutil[]
	dev-util/ydiff[]
	dev-python/pysyncobj[]
	dev-python/psycopg[]
	s3? ( dev-python/boto3[] )
	systemd? ( dev-python/python-systemd[] )
	etcd? ( dev-python/python-etcd[] )