diff options
-rw-r--r-- | dev-ruby/redcloth/files/redcloth-4.3.2-cve-2023-31606-1.patch | 22 | ||||
-rw-r--r-- | dev-ruby/redcloth/files/redcloth-4.3.2-cve-2023-31606-2.patch | 22 | ||||
-rw-r--r-- | dev-ruby/redcloth/redcloth-4.3.2-r5.ebuild | 57 | ||||
-rw-r--r-- | eclass/dist-kernel-utils.eclass | 2 | ||||
-rw-r--r-- | eclass/kernel-build.eclass | 8 | ||||
-rw-r--r-- | eclass/kernel-install.eclass | 18 | ||||
-rw-r--r-- | eclass/toolchain-funcs.eclass | 14 | ||||
-rw-r--r-- | profiles/arch/sparc/package.use.mask | 10 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-5.15.120.ebuild | 11 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-6.1.39.ebuild | 12 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-6.4.4.ebuild | 12 | ||||
-rw-r--r-- | virtual/dist-kernel/dist-kernel-5.15.120.ebuild | 2 | ||||
-rw-r--r-- | virtual/dist-kernel/dist-kernel-6.1.39.ebuild | 2 | ||||
-rw-r--r-- | virtual/dist-kernel/dist-kernel-6.4.4.ebuild | 2 |
14 files changed, 162 insertions, 32 deletions
diff --git a/dev-ruby/redcloth/files/redcloth-4.3.2-cve-2023-31606-1.patch b/dev-ruby/redcloth/files/redcloth-4.3.2-cve-2023-31606-1.patch new file mode 100644 index 000000000000..f5de833dafb3 --- /dev/null +++ b/dev-ruby/redcloth/files/redcloth-4.3.2-cve-2023-31606-1.patch @@ -0,0 +1,22 @@ +From 8d3b5c730596d254d0bbcfbab52f4158f03397b3 Mon Sep 17 00:00:00 2001 +From: Kornelius Kalnbach <murphy@rubychan.de> +Date: Wed, 28 Jun 2023 17:24:55 +0200 +Subject: [PATCH] make regex faster with Atomic Grouping + +--- + lib/redcloth/formatters/html.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/redcloth/formatters/html.rb b/lib/redcloth/formatters/html.rb +index b241c99..aaeae34 100644 +--- a/lib/redcloth/formatters/html.rb ++++ b/lib/redcloth/formatters/html.rb +@@ -324,7 +324,7 @@ def before_transform(text) + # Clean unauthorized tags. + def clean_html( text, allowed_tags = BASIC_TAGS ) + text.gsub!( /<!\[CDATA\[/, '' ) +- text.gsub!( /<(\/*)([A-Za-z]\w*)([^>]*?)(\s?\/?)>/ ) do |m| ++ text.gsub!( /<(\/*)(?>[A-Za-z]\w*)([^>]*?)(\s?\/?)>/ ) do |m| + raw = $~ + tag = raw[2].downcase + if allowed_tags.has_key? tag diff --git a/dev-ruby/redcloth/files/redcloth-4.3.2-cve-2023-31606-2.patch b/dev-ruby/redcloth/files/redcloth-4.3.2-cve-2023-31606-2.patch new file mode 100644 index 000000000000..fd8de28f0e71 --- /dev/null +++ b/dev-ruby/redcloth/files/redcloth-4.3.2-cve-2023-31606-2.patch @@ -0,0 +1,22 @@ +From 7429f32bdac4fccf9f5ab702afc9c47092a7b3df Mon Sep 17 00:00:00 2001 +From: Kornelius Kalnbach <murphy@rubychan.de> +Date: Thu, 29 Jun 2023 00:31:50 +0200 +Subject: [PATCH] simplify fix + +--- + lib/redcloth/formatters/html.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/redcloth/formatters/html.rb b/lib/redcloth/formatters/html.rb +index aaeae34..396c2d0 100644 +--- a/lib/redcloth/formatters/html.rb ++++ b/lib/redcloth/formatters/html.rb +@@ -324,7 +324,7 @@ def before_transform(text) + # Clean unauthorized tags. + def clean_html( text, allowed_tags = BASIC_TAGS ) + text.gsub!( /<!\[CDATA\[/, '' ) +- text.gsub!( /<(\/*)(?>[A-Za-z]\w*)([^>]*?)(\s?\/?)>/ ) do |m| ++ text.gsub!( /<(\/*)([A-Za-z]\w*+)([^>]*?)(\s?\/?)>/ ) do |m| + raw = $~ + tag = raw[2].downcase + if allowed_tags.has_key? tag diff --git a/dev-ruby/redcloth/redcloth-4.3.2-r5.ebuild b/dev-ruby/redcloth/redcloth-4.3.2-r5.ebuild new file mode 100644 index 000000000000..b43a51c4804f --- /dev/null +++ b/dev-ruby/redcloth/redcloth-4.3.2-r5.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby30 ruby31 ruby32" + +RUBY_FAKEGEM_NAME="RedCloth" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" +RUBY_FAKEGEM_TASK_DOC="" + +RUBY_FAKEGEM_DOCDIR="doc" + +RUBY_FAKEGEM_EXTRADOC="README.rdoc CHANGELOG" + +RUBY_FAKEGEM_REQUIRE_PATHS="lib/case_sensitive_require" + +RUBY_FAKEGEM_GEMSPEC=redcloth.gemspec + +RUBY_FAKEGEM_EXTENSIONS=(ext/redcloth_scan/extconf.rb) + +inherit ruby-fakegem + +DESCRIPTION="A module for using Textile in Ruby" +HOMEPAGE="https://github.com/jgarber/redcloth" +SRC_URI="https://github.com/jgarber/redcloth/archive/v${PV}.tar.gz -> ${RUBY_FAKEGEM_NAME}-${PV}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="" + +DEPEND+=" =dev-util/ragel-6*" + +PATCHES=( + "${FILESDIR}/${P}-load-documents.patch" + "${FILESDIR}/${P}-cve-2023-31606-1.patch" + "${FILESDIR}/${P}-cve-2023-31606-2.patch" +) + +ruby_add_bdepend " + >=dev-ruby/rake-0.8.7 + >=dev-ruby/rake-compiler-0.7.1 + test? ( >=dev-ruby/diff-lcs-1.1.2 )" + +all_ruby_prepare() { + sed -i -e '/[Bb]undler/d' Rakefile ${PN}.gemspec || die + rm -f tasks/{release,rspec,rvm}.rake || die + + # Fix version + sed -i -e '/TINY/ s/1/2/' lib/redcloth/version.rb || die +} + +each_ruby_prepare() { + ${RUBY} -S rake ext/redcloth_scan/extconf.rb || die +} diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass index cb0021f8b3a7..666896028669 100644 --- a/eclass/dist-kernel-utils.eclass +++ b/eclass/dist-kernel-utils.eclass @@ -77,7 +77,7 @@ dist-kernel_get_image_path() { arm) echo arch/arm/boot/zImage ;; - hppa|ppc|ppc64) + hppa|ppc|ppc64|sparc) # https://www.kernel.org/doc/html/latest/powerpc/bootwrapper.html # ./ is required because of ${image_path%/*} # substitutions in the code diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index ff615a02d0eb..276a08a104e0 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -257,6 +257,14 @@ kernel-build_src_install() { local kern_arch=$(tc-arch-kernel) local dir_ver=${PV}${KV_LOCALVERSION} local kernel_dir=/usr/src/linux-${dir_ver} + + if use sparc ; then + # We don't want tc-arch-kernel's sparc64, even though we do + # need to pass ARCH=sparc64 to the build system. It's a quasi-alias + # in Kbuild. + kern_arch=sparc + fi + dodir "${kernel_dir}/arch/${kern_arch}" mv include scripts "${ED}${kernel_dir}/" || die mv "arch/${kern_arch}/include" \ diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index 49aff35dea0d..62fbb1dab049 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Gentoo Authors +# Copyright 2020-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: kernel-install.eclass @@ -69,6 +69,7 @@ BDEPEND=" arm64? ( app-emulation/qemu[qemu_softmmu_targets_aarch64] ) ppc? ( app-emulation/qemu[qemu_softmmu_targets_ppc] ) ppc64? ( app-emulation/qemu[qemu_softmmu_targets_ppc64] ) + sparc? ( app-emulation/qemu[qemu_softmmu_targets_sparc,qemu_softmmu_targets_sparc64] ) x86? ( app-emulation/qemu[qemu_softmmu_targets_i386] ) )" @@ -150,21 +151,12 @@ kernel-install_get_qemu_arch() { x86) echo i386 ;; - arm) - echo arm - ;; + arm|ppc|ppc64|riscv|sparc|sparc64) + echo ${ARCH} + ;; arm64) echo aarch64 ;; - ppc) - echo ppc - ;; - ppc64) - echo ppc64 - ;; - riscv) - echo riscv - ;; *) die "${FUNCNAME}: unsupported ARCH=${ARCH}" ;; diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index bffbf36f1696..78ebfe54e41a 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -666,7 +666,7 @@ tc-has-tls() { # Parse information from CBUILD/CHOST/CTARGET rather than # use external variables from the profile. tc-ninja_magic_to_arch() { - ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; } + _tc_echo_kernel_alias() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; } local type=$1 local host=$2 @@ -676,16 +676,16 @@ tc-ninja_magic_to_arch() { aarch64*) echo arm64;; alpha*) echo alpha;; arm*) echo arm;; - avr*) ninj avr32 avr;; - bfin*) ninj blackfin bfin;; + avr*) _tc_echo_kernel_alias avr32 avr;; + bfin*) _tc_echo_kernel_alias blackfin bfin;; c6x*) echo c6x;; cris*) echo cris;; frv*) echo frv;; hexagon*) echo hexagon;; - hppa*) ninj parisc hppa;; + hppa*) _tc_echo_kernel_alias parisc hppa;; i?86*) echo x86;; ia64*) echo ia64;; - loongarch*) ninj loongarch loong;; + loongarch*) _tc_echo_kernel_alias loongarch loong;; m68*) echo m68k;; metag*) echo metag;; microblaze*) echo microblaze;; @@ -708,11 +708,11 @@ tc-ninja_magic_to_arch() { riscv*) echo riscv;; s390*) echo s390;; score*) echo score;; - sh64*) ninj sh64 sh;; + sh64*) _tc_echo_kernel_alias sh64 sh;; sh*) echo sh;; sparc64*) ninj sparc64 sparc;; sparc*) [[ ${PROFILE_ARCH} == "sparc64" ]] \ - && ninj sparc64 sparc \ + && _tc_echo_kernel_alias sparc64 sparc \ || echo sparc ;; tile*) echo tile;; diff --git a/profiles/arch/sparc/package.use.mask b/profiles/arch/sparc/package.use.mask index 666be07eea63..39cb0bf513a5 100644 --- a/profiles/arch/sparc/package.use.mask +++ b/profiles/arch/sparc/package.use.mask @@ -1,6 +1,16 @@ # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Sam James <sam@gentoo.org> (2023-07-21) +# Requires app-emulation/qemu. +sys-kernel/gentoo-kernel test +sys-kernel/vanilla-kernel test + +# Sam James <sam@gentoo.org> (2023-07-21) +# Requires dev-util/pahole. +sys-kernel/gentoo-kernel debug +sys-kernel/vanilla-kernel debug + # Sam James <sam@gentoo.org> (2023-06-18) # Qt 5 not keyworded here app-text/ansifilter gui diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.120.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.120.ebuild index 5e46267db599..b6589cdcbf67 100644 --- a/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.120.ebuild +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.120.ebuild @@ -42,9 +42,13 @@ SRC_URI+=" S=${WORKDIR}/${MY_P} LICENSE="GPL-2" -KEYWORDS="amd64 ~arm arm64 ~hppa ~ppc ppc64 x86" +KEYWORDS="amd64 ~arm arm64 ~hppa ~ppc ppc64 ~sparc x86" IUSE="debug hardened" -REQUIRED_USE="arm? ( savedconfig )" +REQUIRED_USE=" + arm? ( savedconfig ) + hppa? ( savedconfig ) + sparc? ( savedconfig ) +" RDEPEND=" !sys-kernel/gentoo-kernel-bin:${SLOT} @@ -95,6 +99,9 @@ src_prepare() { cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die biendian=true ;; + sparc) + return + ;; x86) cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die ;; diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.39.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.39.ebuild index c338d2cfc68f..7e128b87c8f2 100644 --- a/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.39.ebuild +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.39.ebuild @@ -43,11 +43,14 @@ SRC_URI+=" S=${WORKDIR}/${MY_P} LICENSE="GPL-2" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" IUSE="debug hardened" -REQUIRED_USE="arm? ( savedconfig ) +REQUIRED_USE=" + arm? ( savedconfig ) hppa? ( savedconfig ) - riscv? ( savedconfig )" + riscv? ( savedconfig ) + sparc? ( savedconfig ) +" RDEPEND=" !sys-kernel/gentoo-kernel-bin:${SLOT} @@ -101,6 +104,9 @@ src_prepare() { riscv) return ;; + sparc) + return + ;; x86) cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die ;; diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.4.4.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-6.4.4.ebuild index 5cb60e23b853..38b5f48b2b81 100644 --- a/sys-kernel/gentoo-kernel/gentoo-kernel-6.4.4.ebuild +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.4.4.ebuild @@ -44,11 +44,14 @@ SRC_URI+=" S=${WORKDIR}/${MY_P} LICENSE="GPL-2" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" IUSE="debug hardened" -REQUIRED_USE="arm? ( savedconfig ) +REQUIRED_USE=" + arm? ( savedconfig ) hppa? ( savedconfig ) - riscv? ( savedconfig )" + riscv? ( savedconfig ) + sparc? ( savedconfig ) +" RDEPEND=" !sys-kernel/gentoo-kernel-bin:${SLOT} @@ -102,6 +105,9 @@ src_prepare() { riscv) return ;; + sparc) + return + ;; x86) cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die ;; diff --git a/virtual/dist-kernel/dist-kernel-5.15.120.ebuild b/virtual/dist-kernel/dist-kernel-5.15.120.ebuild index 5fe06a349848..eab6f8597102 100644 --- a/virtual/dist-kernel/dist-kernel-5.15.120.ebuild +++ b/virtual/dist-kernel/dist-kernel-5.15.120.ebuild @@ -9,7 +9,7 @@ SRC_URI="" LICENSE="" SLOT="0/${PV}" -KEYWORDS="amd64 ~arm arm64 ~hppa ~ppc ppc64 x86" +KEYWORDS="amd64 ~arm arm64 ~hppa ~ppc ppc64 ~sparc x86" RDEPEND=" || ( diff --git a/virtual/dist-kernel/dist-kernel-6.1.39.ebuild b/virtual/dist-kernel/dist-kernel-6.1.39.ebuild index d3f0fa8764cf..8012e544096f 100644 --- a/virtual/dist-kernel/dist-kernel-6.1.39.ebuild +++ b/virtual/dist-kernel/dist-kernel-6.1.39.ebuild @@ -9,7 +9,7 @@ SRC_URI="" LICENSE="" SLOT="0/${PV}" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" RDEPEND=" || ( diff --git a/virtual/dist-kernel/dist-kernel-6.4.4.ebuild b/virtual/dist-kernel/dist-kernel-6.4.4.ebuild index d3f0fa8764cf..8012e544096f 100644 --- a/virtual/dist-kernel/dist-kernel-6.4.4.ebuild +++ b/virtual/dist-kernel/dist-kernel-6.4.4.ebuild @@ -9,7 +9,7 @@ SRC_URI="" LICENSE="" SLOT="0/${PV}" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" RDEPEND=" || ( |