summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRepository mirror & CI <repomirrorci@gentoo.org>2024-12-13 13:18:28 +0000
committerRepository mirror & CI <repomirrorci@gentoo.org>2024-12-13 13:18:28 +0000
commit284bc60f71696deb570e5a6cbf7f2cda53689749 (patch)
treefbbb89e19ae7a50d2090647c34c737c3b10ab1d1
parent2024-12-13 12:33:34 UTC (diff)
parentgui-apps/foot: Stabilize 1.17.2 ppc64, #937141 (diff)
downloadgentoo-284bc60f71696deb570e5a6cbf7f2cda53689749.tar.gz
gentoo-284bc60f71696deb570e5a6cbf7f2cda53689749.tar.bz2
gentoo-284bc60f71696deb570e5a6cbf7f2cda53689749.zip
Merge updates from master
-rw-r--r--app-emulation/cloud-init/cloud-init-24.2-r1.ebuild105
-rw-r--r--app-emulation/cloud-init/files/cloud-init-24.2-systemd.patch152
-rw-r--r--app-text/texlive-core/texlive-core-2024-r1.ebuild2
-rw-r--r--eclass/ruby-fakegem.eclass12
-rw-r--r--gui-apps/foot-terminfo/foot-terminfo-1.17.2.ebuild2
-rw-r--r--gui-apps/foot/foot-1.17.2.ebuild2
6 files changed, 271 insertions, 4 deletions
diff --git a/app-emulation/cloud-init/cloud-init-24.2-r1.ebuild b/app-emulation/cloud-init/cloud-init-24.2-r1.ebuild
new file mode 100644
index 000000000000..8c137fe19521
--- /dev/null
+++ b/app-emulation/cloud-init/cloud-init-24.2-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Disabled for now: bug #850628
+#DISTUTILS_USE_PEP517=setuptools
+# https://bugs.launchpad.net/cloud-init/+bug/1978328
+PYTHON_COMPAT=( python3_10 python3_11 python3_12 )
+
+inherit distutils-r1 udev
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.launchpad.net/cloud-init"
+else
+ SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~x86"
+fi
+
+DESCRIPTION="Cloud instance initialisation magic"
+HOMEPAGE="https://launchpad.net/cloud-init"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="selinux"
+
+CDEPEND="
+ dev-python/jinja2[${PYTHON_USEDEP}]
+ dev-python/oauthlib[${PYTHON_USEDEP}]
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ >=dev-python/configobj-5.0.2[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/jsonpatch[${PYTHON_USEDEP}]
+ dev-python/jsonschema[${PYTHON_USEDEP}]
+ dev-python/netifaces[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ ${CDEPEND}
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/passlib[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-python/responses[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )
+"
+RDEPEND="
+ ${CDEPEND}
+ net-analyzer/macchanger
+ sys-apps/iproute2
+ sys-fs/growpart
+ virtual/logger
+ selinux? ( sec-policy/selinux-cloudinit )
+"
+
+EPYTEST_IGNORE=(
+ # Can't find file
+ tests/unittests/config/test_apt_configure_sources_list_v1.py
+ tests/unittests/config/test_apt_configure_sources_list_v3.py
+)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-24.2-systemd.patch"
+)
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ # Fix location of documentation installation
+ sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die
+
+ if [[ ${PV} == *9999 ]] ; then
+ sed -i 's/version=get_version(),/version=9999,/g' setup.py || die
+ fi
+
+ distutils-r1_python_prepare_all
+}
+
+python_install() {
+ distutils-r1_python_install --init-system=sysvinit_openrc,systemd --distro gentoo
+}
+
+python_install_all() {
+ keepdir /etc/cloud
+
+ distutils-r1_python_install_all
+
+ # installs as non-executable
+ chmod +x "${D}"/etc/init.d/* || die
+}
+
+pkg_prerm() {
+ udev_reload
+}
+
+pkg_postinst() {
+ udev_reload
+
+ elog "cloud-init-local needs to be run in the boot runlevel because it"
+ elog "modifies services in the default runlevel. When a runlevel is started"
+ elog "it is cached, so modifications that happen to the current runlevel"
+ elog "while you are in it are not acted upon."
+}
diff --git a/app-emulation/cloud-init/files/cloud-init-24.2-systemd.patch b/app-emulation/cloud-init/files/cloud-init-24.2-systemd.patch
new file mode 100644
index 000000000000..62840bafe2d3
--- /dev/null
+++ b/app-emulation/cloud-init/files/cloud-init-24.2-systemd.patch
@@ -0,0 +1,152 @@
+From 3f97be6df5c59339e09ff50e97a94869c29741d0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
+Date: Fri, 6 Dec 2024 22:46:31 +0100
+Subject: [PATCH] feat(gentoo): Add compatibility for Gentoo with systemd
+ (#5918)
+
+---
+ cloudinit/distros/gentoo.py | 37 +++++++++++++++++---------
+ tests/unittests/distros/test_gentoo.py | 34 ++++++++++++++++-------
+ 2 files changed, 48 insertions(+), 23 deletions(-)
+
+diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
+index 5ab41bbd9db..94fa6f7aa01 100644
+--- a/cloudinit/distros/gentoo.py
++++ b/cloudinit/distros/gentoo.py
+@@ -1,8 +1,10 @@
+ # Copyright (C) 2014 Rackspace, US Inc.
+ # Copyright (C) 2016 Matthew Thode.
++# Copyright (C) 2024 Andreas K. Huettel
+ #
+ # Author: Nate House <nathan.house@rackspace.com>
+ # Author: Matthew Thode <prometheanfire@gentoo.org>
++# Author: Andreas K. Huettel <dilfridge@gentoo.org>
+ #
+ # This file is part of cloud-init. See LICENSE file for license information.
+
+@@ -18,7 +20,6 @@
+
+ class Distro(distros.Distro):
+ locale_gen_fn = "/etc/locale.gen"
+- hostname_conf_fn = "/etc/conf.d/hostname"
+ default_locale = "en_US.UTF-8"
+
+ # C.UTF8 makes sense to generate, but is not selected
+@@ -27,20 +28,23 @@ class Distro(distros.Distro):
+
+ def __init__(self, name, cfg, paths):
+ distros.Distro.__init__(self, name, cfg, paths)
++
++ if distros.uses_systemd():
++ self.hostname_conf_fn = "/etc/hostname"
++ else:
++ self.hostname_conf_fn = "/etc/conf.d/hostname"
++
+ # This will be used to restrict certain
+ # calls from repeatedly happening (when they
+ # should only happen say once per instance...)
+ self._runner = helpers.Runners(paths)
+ self.osfamily = "gentoo"
+- # Fix sshd restarts
+- cfg["ssh_svcname"] = "/etc/init.d/sshd"
+- if distros.uses_systemd():
+- LOG.error("Cloud-init does not support systemd with gentoo")
++ if not distros.uses_systemd():
++ # Fix sshd restarts (openrc-specific?)
++ cfg["ssh_svcname"] = "/etc/init.d/sshd"
+
+ def apply_locale(self, _, out_fn=None):
+- """rc-only - not compatible with systemd
+-
+- Locales need to be added to /etc/locale.gen and generated prior
++ """Locales need to be added to /etc/locale.gen and generated prior
+ to selection. Default to en_US.UTF-8 for simplicity.
+ """
+ util.write_file(self.locale_gen_fn, "\n".join(self.locales), mode=644)
+@@ -48,7 +52,7 @@ def apply_locale(self, _, out_fn=None):
+ # generate locales
+ subp.subp(["locale-gen"], capture=False)
+
+- # select locale
++ # select locale, works for both openrc and systemd
+ subp.subp(
+ ["eselect", "locale", "set", self.default_locale], capture=False
+ )
+@@ -77,10 +81,17 @@ def _write_hostname(self, hostname, filename):
+ if not conf:
+ conf = HostnameConf("")
+
+- # Many distro's format is the hostname by itself, and that is the
+- # way HostnameConf works but gentoo expects it to be in
+- # hostname="the-actual-hostname"
+- conf.set_hostname('hostname="%s"' % hostname)
++ if distros.uses_systemd():
++ # Gentoo uses the same format for /etc/hostname as everyone else-
++ # only the hostname by itself. Works for openrc and systemd, but
++ # openrc has its own config file and /etc/hostname is generated.
++ conf.set_hostname(hostname)
++ else:
++ # Openrc generates /etc/hostname from /etc/conf.d/hostname with the
++ # differing format
++ # hostname="the-actual-hostname"
++ conf.set_hostname('hostname="%s"' % hostname)
++
+ util.write_file(filename, str(conf), 0o644)
+
+ def _read_system_hostname(self):
+diff --git a/tests/unittests/distros/test_gentoo.py b/tests/unittests/distros/test_gentoo.py
+index a307b9a29ba..979e6d82638 100644
+--- a/tests/unittests/distros/test_gentoo.py
++++ b/tests/unittests/distros/test_gentoo.py
+@@ -2,27 +2,41 @@
+
+ from cloudinit import atomic_helper, util
+ from tests.unittests.distros import _get_distro
+-from tests.unittests.helpers import CiTestCase
++from tests.unittests.helpers import CiTestCase, mock
+
+
+ class TestGentoo(CiTestCase):
+- def test_write_hostname(self):
++ def test_write_hostname(self, whatever=False):
+ distro = _get_distro("gentoo")
+ hostname = "myhostname"
+ hostfile = self.tmp_path("hostfile")
+ distro._write_hostname(hostname, hostfile)
+- self.assertEqual(
+- 'hostname="myhostname"\n', util.load_text_file(hostfile)
+- )
++ if distro.uses_systemd():
++ self.assertEqual("myhostname\n", util.load_text_file(hostfile))
++ else:
++ self.assertEqual(
++ 'hostname="myhostname"\n', util.load_text_file(hostfile)
++ )
+
+- def test_write_existing_hostname_with_comments(self):
++ def test_write_existing_hostname_with_comments(self, whatever=False):
+ distro = _get_distro("gentoo")
+ hostname = "myhostname"
+ contents = '#This is the hostname\nhostname="localhost"'
+ hostfile = self.tmp_path("hostfile")
+ atomic_helper.write_file(hostfile, contents, omode="w")
+ distro._write_hostname(hostname, hostfile)
+- self.assertEqual(
+- '#This is the hostname\nhostname="myhostname"\n',
+- util.load_text_file(hostfile),
+- )
++ if distro.uses_systemd():
++ self.assertEqual(
++ "#This is the hostname\nmyhostname\n",
++ util.load_text_file(hostfile),
++ )
++ else:
++ self.assertEqual(
++ '#This is the hostname\nhostname="myhostname"\n',
++ util.load_text_file(hostfile),
++ )
++
++
++@mock.patch("cloudinit.distros.uses_systemd", return_value=False)
++class TestGentooOpenRC(TestGentoo):
++ pass
diff --git a/app-text/texlive-core/texlive-core-2024-r1.ebuild b/app-text/texlive-core/texlive-core-2024-r1.ebuild
index 8d3c34eb2d48..53c5981cf91e 100644
--- a/app-text/texlive-core/texlive-core-2024-r1.ebuild
+++ b/app-text/texlive-core/texlive-core-2024-r1.ebuild
@@ -15,8 +15,6 @@ SRC_URI="
https://mirrors.ctan.org/systems/texlive/Source/${MY_P}.tar.xz
https://gitweb.gentoo.org/proj/tex-patches.git/snapshot/tex-patches-${GENTOO_TEX_PATCHES_NUM}.tar.bz2
-> gentoo-tex-patches-${GENTOO_TEX_PATCHES_NUM}.tar.bz2
- https://raw.githubusercontent.com/debian-tex/texlive-bin/58a00e704a15ec3dd8abbf3826f28207eb095251/debian/patches/1054218.patch
- -> ${PN}-2023-pdflatex-big-endian-fix.patch
https://bugs.gentoo.org/attachment.cgi?id=908573
-> ${PN}-2023-mplib-h.patch
https://github.com/TeX-Live/texlive-source/commit/aec02cd7402652f00460b47a73db0e46e9fb48aa.patch
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index eb6257a50cf9..fc78428be714 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -23,6 +23,8 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+# flag-o-matic is only required for ruby31 support.
+inherit flag-o-matic
inherit ruby-ng
# @ECLASS_VARIABLE: RUBY_FAKEGEM_NAME
@@ -424,6 +426,16 @@ EOF
each_fakegem_configure() {
debug-print-function ${FUNCNAME} "$@"
+ # Ruby 3.1 has a varargs implementation that is not compatible with
+ # gnu23. Ruby 3.1 is EOL in March 2025 and will be removed shortly
+ # after that.
+ case ${RUBY} in
+ *ruby31)
+ append-flags -std=gnu17
+ filter-flags -std=gnu23
+ ;;
+ esac
+
tc-export PKG_CONFIG
for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do
CC=$(tc-getCC) ${RUBY} --disable=did_you_mean -C ${extension%/*} ${extension##*/} --with-cflags="${CFLAGS}" --with-ldflags="${LDFLAGS}" ${RUBY_FAKEGEM_EXTENSION_OPTIONS} || die
diff --git a/gui-apps/foot-terminfo/foot-terminfo-1.17.2.ebuild b/gui-apps/foot-terminfo/foot-terminfo-1.17.2.ebuild
index 32740b329871..2a13ddd7f601 100644
--- a/gui-apps/foot-terminfo/foot-terminfo-1.17.2.ebuild
+++ b/gui-apps/foot-terminfo/foot-terminfo-1.17.2.ebuild
@@ -12,7 +12,7 @@ S="${WORKDIR}/${P/-terminfo/}"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64 ~arm64"
+KEYWORDS="amd64 arm64 ppc64"
RDEPEND="!>=sys-libs/ncurses-6.3[-minimal]"
BDEPEND="sys-libs/ncurses"
diff --git a/gui-apps/foot/foot-1.17.2.ebuild b/gui-apps/foot/foot-1.17.2.ebuild
index 51e7d44c3c4c..f46985633875 100644
--- a/gui-apps/foot/foot-1.17.2.ebuild
+++ b/gui-apps/foot/foot-1.17.2.ebuild
@@ -13,7 +13,7 @@ SRC_URI="
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~ppc64"
+KEYWORDS="amd64 arm64 ppc64"
IUSE="+grapheme-clustering test"
RESTRICT="!test? ( test )"