From 791dc067bffdd6b66d066756feb4b52d6d9865d7 Mon Sep 17 00:00:00 2001 From: Arsen Arsenović Date: Mon, 28 Nov 2022 00:47:24 +0100 Subject: dev-util/muon: bump to 0.1.0, for F_S=3 fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/882295 Signed-off-by: Arsen Arsenović Closes: https://github.com/gentoo/gentoo/pull/28459 Signed-off-by: Florian Schmaus --- .../files/muon-0.1.0-fix-potential-overflow.patch | 39 ++++++++++++ dev-util/muon/muon-0.1.0-r1.ebuild | 70 ++++++++++++++++++++++ dev-util/muon/muon-0.1.0.ebuild | 66 -------------------- 3 files changed, 109 insertions(+), 66 deletions(-) create mode 100644 dev-util/muon/files/muon-0.1.0-fix-potential-overflow.patch create mode 100644 dev-util/muon/muon-0.1.0-r1.ebuild delete mode 100644 dev-util/muon/muon-0.1.0.ebuild (limited to 'dev-util/muon') diff --git a/dev-util/muon/files/muon-0.1.0-fix-potential-overflow.patch b/dev-util/muon/files/muon-0.1.0-fix-potential-overflow.patch new file mode 100644 index 000000000000..fc33cb98f611 --- /dev/null +++ b/dev-util/muon/files/muon-0.1.0-fix-potential-overflow.patch @@ -0,0 +1,39 @@ +From 44daee7db0e6cc32f67ad2e944e7e68d73d3acc4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= +Date: Sun, 20 Nov 2022 22:23:33 +0100 +Subject: [PATCH] build_target: Fix possible out-of-bounds edge case + +Detected on Tinderbox with FORTIFY_SOURCE=3. + +Bug: https://bugs.gentoo.org/882295 +--- + src/functions/kernel/build_target.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/src/functions/kernel/build_target.c b/src/functions/kernel/build_target.c +index 07b20e29..2ecc27c4 100644 +--- a/src/functions/kernel/build_target.c ++++ b/src/functions/kernel/build_target.c +@@ -307,7 +307,6 @@ determine_target_build_name(struct workspace *wk, struct obj_build_target *tgt, + obj name_pre, obj name_suff, char plain_name[BUF_SIZE_2k]) + { + const char *pref, *suff, *ver_suff = NULL; +- uint32_t i; + + switch (tgt->type) { + case tgt_executable: +@@ -341,10 +340,7 @@ determine_target_build_name(struct workspace *wk, struct obj_build_target *tgt, + suff = get_cstr(wk, name_suff); + } + +- i = snprintf(plain_name, BUF_SIZE_2k, "%s%s", pref, get_cstr(wk, tgt->name)); +- if (suff) { +- snprintf(&plain_name[i], BUF_SIZE_2k, ".%s", suff); +- } ++ snprintf(plain_name, BUF_SIZE_2k, "%s%s%s%s", pref, get_cstr(wk, tgt->name), suff ? "." : "", suff ? suff : ""); + + tgt->build_name = make_strf(wk, "%s%s%s", plain_name, ver_suff ? "." : "", ver_suff ? ver_suff : ""); + return true; +-- +2.34.5 + diff --git a/dev-util/muon/muon-0.1.0-r1.ebuild b/dev-util/muon/muon-0.1.0-r1.ebuild new file mode 100644 index 000000000000..005a2ec004fd --- /dev/null +++ b/dev-util/muon/muon-0.1.0-r1.ebuild @@ -0,0 +1,70 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +inherit meson python-any-r1 + +COMMIT_HASH="${PV}" +MESON_DOCS_TAR=meson-docs-0.63.0-239-g41a05ff93.tar.gz + +DESCRIPTION="A meson-compatible build system" +HOMEPAGE="https://muon.build/" +SRC_URI=" + https://git.sr.ht/~lattis/muon/archive/${COMMIT_HASH}.tar.gz -> ${P}.tar.gz + man? ( + https://mochiro.moe/wrap/${MESON_DOCS_TAR} + ) +" + +# Apache-2.0 for meson-docs +LICENSE="GPL-3 man? ( Apache-2.0 )" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+archive +curl +libpkgconf +man" + +S="${WORKDIR}/${PN}-${COMMIT_HASH}" + +DEPEND=" + curl? ( net-misc/curl ) + archive? ( app-arch/libarchive:= ) + libpkgconf? ( dev-util/pkgconf:= ) + man? ( app-text/scdoc ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + man? ( + $(python_gen_any_dep ' + dev-python/pyyaml[${PYTHON_USEDEP}] + ') + ) +" + +PATCHES=( + "${FILESDIR}/muon-0.1.0-fix-potential-overflow.patch" +) + +python_check_deps() { + python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" +} + +src_prepare() { + default + + if use man; then + mv "${WORKDIR}/meson-docs" "${S}/subprojects" || die + fi +} + +src_configure() { + local emesonargs=( + $(meson_feature curl libcurl) + $(meson_feature archive libarchive) + $(meson_feature libpkgconf) + $(meson_feature man docs) + -Dsamurai=disabled # patched version of samurai downloaded via wraps + -Dbestline=enabled # vendored bestline, an insignificant addition + ) + meson_src_configure +} diff --git a/dev-util/muon/muon-0.1.0.ebuild b/dev-util/muon/muon-0.1.0.ebuild deleted file mode 100644 index 45c2381becbd..000000000000 --- a/dev-util/muon/muon-0.1.0.ebuild +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{8..11} ) -inherit meson python-any-r1 - -COMMIT_HASH="${PV}" -MESON_DOCS_TAR=meson-docs-0.63.0-239-g41a05ff93.tar.gz - -DESCRIPTION="A meson-compatible build system" -HOMEPAGE="https://muon.build/" -SRC_URI=" - https://git.sr.ht/~lattis/muon/archive/${COMMIT_HASH}.tar.gz -> ${P}.tar.gz - man? ( - https://mochiro.moe/wrap/${MESON_DOCS_TAR} - ) -" - -# Apache-2.0 for meson-docs -LICENSE="GPL-3 man? ( Apache-2.0 )" -SLOT="0" -KEYWORDS="~amd64" -IUSE="+archive +curl +libpkgconf +man" - -S="${WORKDIR}/${PN}-${COMMIT_HASH}" - -DEPEND=" - curl? ( net-misc/curl ) - archive? ( app-arch/libarchive:= ) - libpkgconf? ( dev-util/pkgconf:= ) - man? ( app-text/scdoc ) -" -RDEPEND="${DEPEND}" -BDEPEND=" - man? ( - $(python_gen_any_dep ' - dev-python/pyyaml[${PYTHON_USEDEP}] - ') - ) -" - -python_check_deps() { - python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" -} - -src_prepare() { - default - - if use man; then - mv "${WORKDIR}/meson-docs" "${S}/subprojects" || die - fi -} - -src_configure() { - local emesonargs=( - $(meson_feature curl libcurl) - $(meson_feature archive libarchive) - $(meson_feature libpkgconf) - $(meson_feature man docs) - -Dsamurai=disabled # patched version of samurai downloaded via wraps - -Dbestline=enabled # vendored bestline, an insignificant addition - ) - meson_src_configure -} -- cgit v1.2.3-65-gdbad