public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-shells/ksh/files/, app-shells/ksh/
@ 2019-05-04 16:03 Mike Gilbert
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Gilbert @ 2019-05-04 16:03 UTC (permalink / raw
  To: gentoo-commits

commit:     a3d3021af084e1b75ba80eaf575ce11870fa35ae
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat May  4 16:03:13 2019 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat May  4 16:03:24 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3d3021a

app-shells/ksh: remove old

Package-Manager: Portage-2.3.62_p4, Repoman-2.3.12_p87
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 app-shells/ksh/Manifest                  |  2 --
 app-shells/ksh/files/cpp.patch           | 24 ---------------
 app-shells/ksh/files/ksh-prefix-r1.patch | 51 --------------------------------
 app-shells/ksh/files/ksh-prefix.patch    | 42 --------------------------
 app-shells/ksh/ksh-93.20180215.ebuild    | 36 ----------------------
 app-shells/ksh/ksh-93.20180331.ebuild    | 36 ----------------------
 6 files changed, 191 deletions(-)

diff --git a/app-shells/ksh/Manifest b/app-shells/ksh/Manifest
index ce546d54207..175a6d279d8 100644
--- a/app-shells/ksh/Manifest
+++ b/app-shells/ksh/Manifest
@@ -1,3 +1 @@
 DIST ksh-2020.0.0-alpha1.tar.gz 2041308 BLAKE2B 542f7936b7042485c0279c9b79f2d61f9580f0ae654abf60a8044254ed5fe228fa14d48dc7dd835201c32a9448182ca4cb702aac894a74bf5f92a4b866d1de70 SHA512 56c805bebe963dee7c27ba0357e26957fd8439f42c26f290ab32488ddde99f4b824e403c5dc097194eaf600e7379a010b1be4bf1e70bee76402e84909b38d981
-DIST ksh-93.20180215.tar.gz 16056027 BLAKE2B 22ce7346ed2d034d4738b9fdb03559d93b08b92d32e7fd1ea18c1c4fb711e282e98561a0a6d24b1ce11ebaa813b49e5ffa4653f5efb41905aaf29418702e0e5b SHA512 175f6fdc9ab425ac08a5907b552faa25d2e3e7248d0077af300a9f0ca28a4cf46e48081c76f1126bedcc4fbf7db4a432d58f620b29a9543f887a60649f389d5b
-DIST ksh-93.20180331.tar.gz 16052423 BLAKE2B 63e1d08faec3f96ef6cf106404821497ff2b35fdd8bf5db0fbe6958b16fc760a46b8d840252402e12a32a37761ca419fb621335b46f5f43a2f441bb9256358b3 SHA512 6bc6c35804ef7a60f0592dd956c6f51588639dc69196b79548c3ea60d5168f46bdb8c446aeadfdb3b23994778f882d1d4b4869955fd654dba59a02ae2d9c7196

diff --git a/app-shells/ksh/files/cpp.patch b/app-shells/ksh/files/cpp.patch
deleted file mode 100644
index 7075bcfc1f7..00000000000
--- a/app-shells/ksh/files/cpp.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-iffe depends on cc -E not inserting newlines between tokens
-
-https://build.opensuse.org/package/view_file/home:Andreas_Schwab:Factory/ksh/cpp.patch?expand=1
-
---- a/src/cmd/INIT/iffe.sh
-+++ b/src/cmd/INIT/iffe.sh
-@@ -3427,7 +3427,7 @@
- 						(eval "$src") <&$nullin || e=1
- 						;;
- 					mac*|nomac*)
--						if	compile $cc -E $tmp.c <&$nullin >$tmp.i
-+						if	compile $cc -E -P $tmp.c <&$nullin >$tmp.i
- 						then	sed -e '/<<[ 	]*".*"[ 	]*>>/!d' -e 's/<<[ 	]*"//g' -e 's/"[ 	]*>>//g' $tmp.i
- 						else	e=1
- 						fi
-@@ -3718,7 +3718,7 @@
- <<\"#define $v\">>	$v	<<\"/* native $v */\">>
- <<\"#endif\">>
- #endif" > $tmp.c
--					if	compile $cc -E $tmp.c <&$nullin >$tmp.i
-+					if	compile $cc -E -P $tmp.c <&$nullin >$tmp.i
- 					then	sed -e '/<<[ 	]*".*"[ 	]*>>/!d' -e 's/<<[ 	]*"//g' -e 's/"[ 	]*>>//g' $tmp.i > $tmp.t
- 						if	test -s $tmp.t
- 						then	success

diff --git a/app-shells/ksh/files/ksh-prefix-r1.patch b/app-shells/ksh/files/ksh-prefix-r1.patch
deleted file mode 100644
index d2cfd6c0c15..00000000000
--- a/app-shells/ksh/files/ksh-prefix-r1.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From b7769b1f336ba533c4510f1b112fecf84a638a08 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Sun, 28 Jan 2018 16:14:42 -0500
-Subject: [PATCH] EPREFIX support
-
----
- src/cmd/ksh93/data/msg.c | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/src/cmd/ksh93/data/msg.c b/src/cmd/ksh93/data/msg.c
-index eabe59e2..61512280 100644
---- a/src/cmd/ksh93/data/msg.c
-+++ b/src/cmd/ksh93/data/msg.c
-@@ -182,7 +182,7 @@ const char e_heading[] = "Current option settings";
- const char e_sptbnl[] = " \t\n";
- const char e_tolower[] = "tolower";
- const char e_toupper[] = "toupper";
--const char e_defpath[] = "/bin:/usr/bin:";
-+const char e_defpath[] = "@GENTOO_PORTAGE_EPREFIX@/bin:@GENTOO_PORTAGE_EPREFIX@/usr/bin:";
- const char e_defedit[] = _pth_ed;
- const char e_unknown[] = "<command unknown>";
- const char e_devnull[] = "/dev/null";
-@@ -190,19 +190,19 @@ const char e_traceprompt[] = "+ ";
- const char e_supprompt[] = "# ";
- const char e_stdprompt[] = "$ ";
- const char e_profile[] = "$HOME/.profile";
--const char e_sysprofile[] = "/etc/profile";
--const char e_suidprofile[] = "/etc/suid_profile";
--const char e_sysrc[] = "/etc/ksh.kshrc";
-+const char e_sysprofile[] = "@GENTOO_PORTAGE_EPREFIX@/etc/profile";
-+const char e_suidprofile[] = "@GENTOO_PORTAGE_EPREFIX@/etc/suid_profile";
-+const char e_sysrc[] = "@GENTOO_PORTAGE_EPREFIX@/etc/ksh.kshrc";
- #if SHOPT_BASH
--const char e_bash_sysrc[] = "/etc/bash.bashrc";
-+const char e_bash_sysrc[] = "@GENTOO_PORTAGE_EPREFIX@/etc/bash/bashrc";
- const char e_bash_rc[] = "$HOME/.bashrc";
- const char e_bash_login[] = "$HOME/.bash_login";
- const char e_bash_logout[] = "$HOME/.bash_logout";
- const char e_bash_profile[] = "$HOME/.bash_profile";
- #endif  // SHOPT_BASH
--const char e_crondir[] = "/usr/spool/cron/atjobs";
-+const char e_crondir[] = "@GENTOO_PORTAGE_EPREFIX@/usr/spool/cron/atjobs";
- const char e_prohibited[] = "login setuid/setgid shells prohibited";
--const char e_suidexec[] = "/etc/suid_exec";
-+const char e_suidexec[] = "@GENTOO_PORTAGE_EPREFIX@/etc/suid_exec";
- const char hist_fname[] = "/.sh_history";
- const char e_dot[] = ".";
- const char e_envmarker[] = "A__z";
--- 
-2.16.1
-

diff --git a/app-shells/ksh/files/ksh-prefix.patch b/app-shells/ksh/files/ksh-prefix.patch
deleted file mode 100644
index c97cbe333ca..00000000000
--- a/app-shells/ksh/files/ksh-prefix.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/src/cmd/ksh93/data/msg.c
-+++ b/src/cmd/ksh93/data/msg.c
-@@ -180,7 +180,7 @@
- const char e_sptbnl[]		= " \t\n";
- const char e_tolower[]		= "tolower";
- const char e_toupper[]		= "toupper";
--const char e_defpath[]		= "/bin:/usr/bin:";
-+const char e_defpath[]		= "@GENTOO_PORTAGE_EPREFIX@/bin:@GENTOO_PORTAGE_EPREFIX@/usr/bin:";
- const char e_defedit[]		= _pth_ed;
- const char e_unknown []		= "<command unknown>";
- const char e_devnull[]		= "/dev/null";
-@@ -188,24 +188,24 @@
- const char e_supprompt[]	= "# ";
- const char e_stdprompt[]	= "$ ";
- const char e_profile[]		= "$HOME/.profile";
--const char e_sysprofile[]	= "/etc/profile";
--const char e_suidprofile[]	= "/etc/suid_profile";
-+const char e_sysprofile[]	= "@GENTOO_PORTAGE_EPREFIX@/etc/profile";
-+const char e_suidprofile[]	= "@GENTOO_PORTAGE_EPREFIX@/etc/suid_profile";
- #if SHOPT_SYSRC
--const char e_sysrc[]		= "/etc/ksh.kshrc";
-+const char e_sysrc[]		= "@GENTOO_PORTAGE_EPREFIX@/etc/ksh.kshrc";
- #endif
- #if SHOPT_BASH
- #if SHOPT_SYSRC
--const char e_bash_sysrc[]	= "/etc/bash.bashrc";
-+const char e_bash_sysrc[]	= "@GENTOO_PORTAGE_EPREFIX@/etc/bash/bashrc";
- #endif
- const char e_bash_rc[]		= "$HOME/.bashrc";
- const char e_bash_login[]	= "$HOME/.bash_login";
- const char e_bash_logout[]	= "$HOME/.bash_logout";
- const char e_bash_profile[]	= "$HOME/.bash_profile";
- #endif
--const char e_crondir[]		= "/usr/spool/cron/atjobs";
-+const char e_crondir[]		= "@GENTOO_PORTAGE_EPREFIX@/usr/spool/cron/atjobs";
- const char e_prohibited[]	= "login setuid/setgid shells prohibited";
- #if SHOPT_SUID_EXEC
--   const char e_suidexec[]	= "/etc/suid_exec";
-+   const char e_suidexec[]	= "@GENTOO_PORTAGE_EPREFIX@/etc/suid_exec";
- #endif /* SHOPT_SUID_EXEC */
- const char hist_fname[]		= "/.sh_history";
- const char e_dot[]		= ".";

diff --git a/app-shells/ksh/ksh-93.20180215.ebuild b/app-shells/ksh/ksh-93.20180215.ebuild
deleted file mode 100644
index 576ab31e881..00000000000
--- a/app-shells/ksh/ksh-93.20180215.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit meson prefix
-
-DESCRIPTION="The Original Korn Shell, 1993 revision (ksh93)"
-HOMEPAGE="http://www.kornshell.com/"
-
-COMMIT="e3dd5b1a4b1bf58a018bbd9c8626b15113b72717"
-SRC_URI="https://github.com/att/ast/archive/${COMMIT}/${P}.tar.gz"
-
-LICENSE="CPL-1.0 EPL-1.0"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE=""
-
-RDEPEND="!app-shells/pdksh"
-
-S="${WORKDIR}/ast-${COMMIT}"
-
-PATCHES=(
-	"${FILESDIR}"/ksh-prefix-r1.patch
-)
-
-src_prepare() {
-	default
-	eprefixify src/cmd/ksh93/data/msg.c
-}
-
-src_install() {
-	meson_src_install
-	dodir /bin
-	mv "${ED%/}"{/usr,}/bin/ksh || die
-}

diff --git a/app-shells/ksh/ksh-93.20180331.ebuild b/app-shells/ksh/ksh-93.20180331.ebuild
deleted file mode 100644
index 5d2cbc31a7d..00000000000
--- a/app-shells/ksh/ksh-93.20180331.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit meson prefix
-
-DESCRIPTION="The Original Korn Shell, 1993 revision (ksh93)"
-HOMEPAGE="http://www.kornshell.com/"
-
-COMMIT="b9d0b8ebfead0edba9004fc32b1782d1e1410aeb"
-SRC_URI="https://github.com/att/ast/archive/${COMMIT}/${P}.tar.gz"
-
-LICENSE="CPL-1.0 EPL-1.0"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE=""
-
-RDEPEND="!app-shells/pdksh"
-
-S="${WORKDIR}/ast-${COMMIT}"
-
-PATCHES=(
-	"${FILESDIR}"/ksh-prefix-r1.patch
-)
-
-src_prepare() {
-	default
-	eprefixify src/cmd/ksh93/data/msg.c
-}
-
-src_install() {
-	meson_src_install
-	dodir /bin
-	mv "${ED%/}"{/usr,}/bin/ksh || die
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/ksh/files/, app-shells/ksh/
@ 2019-10-10 18:52 Mike Gilbert
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Gilbert @ 2019-10-10 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     d9c8bde42bba32c9b5c09096a039902de6ce9fbe
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 10 18:51:35 2019 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Oct 10 18:51:35 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9c8bde4

app-shells/ksh: bump to 2020.0.0

Package-Manager: Portage-2.3.76_p10, Repoman-2.3.17_p62
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 app-shells/ksh/Manifest                            |  5 +--
 .../ksh/files/ksh-2020.0.0-ensure-user-set.patch   | 30 ++++++++++++++++++
 .../ksh/files/ksh-2020.0.0-skip-api-test.patch     | 36 ++++++++++++++++++++++
 ...h-2020.0.0_beta1.ebuild => ksh-2020.0.0.ebuild} | 17 ++++++++++
 app-shells/ksh/ksh-2020.0.0_alpha1.ebuild          | 33 --------------------
 5 files changed, 84 insertions(+), 37 deletions(-)

diff --git a/app-shells/ksh/Manifest b/app-shells/ksh/Manifest
index b16fc0418a8..13f85b68ced 100644
--- a/app-shells/ksh/Manifest
+++ b/app-shells/ksh/Manifest
@@ -1,4 +1 @@
-DIST ksh-2020.0.0-alpha1-conftab.patch 118773 BLAKE2B 63466e18a77cb86af80d6f6b4af74e3ac1edbfa735decfcd772633808a4593f6d4b057a99547482d17b22445e68c6d3e2becdf68516f913c73550da718f2abc3 SHA512 b29a70e8e31a259ac5bf556ddcdb5d4742a8dac4d11c06e4b5fc3043012e08b26d136cce8c18e9e8a1fe751044699d2258388d618408b09379732bea89a51765
-DIST ksh-2020.0.0-alpha1-solaris.patch 12317 BLAKE2B 90681bde2f3bad0e097a9367ea5a3f1d4c95f70c6e0c872dad769609f97a6332328e21399a3b9ba20f3840b3387a02370831ae4663457728bd8e41b7471c675b SHA512 5a0b818f44a860210e2a7795335d0edec01c61dd5ad04670bb2ca505690ff1b111dbda12d0d15e8b264113d4e7a5a42a49f64c9aba0cff809c2ce3185921acad
-DIST ksh-2020.0.0-alpha1.tar.gz 2041308 BLAKE2B 542f7936b7042485c0279c9b79f2d61f9580f0ae654abf60a8044254ed5fe228fa14d48dc7dd835201c32a9448182ca4cb702aac894a74bf5f92a4b866d1de70 SHA512 56c805bebe963dee7c27ba0357e26957fd8439f42c26f290ab32488ddde99f4b824e403c5dc097194eaf600e7379a010b1be4bf1e70bee76402e84909b38d981
-DIST ksh-2020.0.0-beta1.tar.gz 2022254 BLAKE2B 650ad8ea1140bdbe1fb9fc3e2ecbceedb4605525523584d9ac8a067511ed385f1c83d284c781b31140760500f3de13d1ad8fc695c9c553a3285d5c286a99c7ea SHA512 6f54cdc3c59b44055cc6b670b38ce1685463c841a093a28c5f974dd153eaec3b8924308b353ed7c29a0ec3917ee87cfe57b6cabaca9841633d3599d9c6731330
+DIST ksh-2020.0.0.tar.gz 2022880 BLAKE2B cb952c4febe88a3ccf8fd48f511a30a73bfc812ebf0b7a5fe799470b29ee13ca61004fd34e367d836940a88214da2aa05b7cb96f173a1b8d57c8e644c8c3a2a6 SHA512 7d6da3af341a62718d691ddc52e10bdf3b7290d74f1cd01610093c587af47b6d6d04b74b210eb31f93a3559855a5bc5155f9b188d2f8bb4444042c26bfaf1792

diff --git a/app-shells/ksh/files/ksh-2020.0.0-ensure-user-set.patch b/app-shells/ksh/files/ksh-2020.0.0-ensure-user-set.patch
new file mode 100644
index 00000000000..9f5d70f4d33
--- /dev/null
+++ b/app-shells/ksh/files/ksh-2020.0.0-ensure-user-set.patch
@@ -0,0 +1,30 @@
+From cb9f6d3498622b46de021a7f4798512d203747e9 Mon Sep 17 00:00:00 2001
+From: Kurtis Rader <krader@skepticism.us>
+Date: Sun, 1 Sep 2019 15:44:40 -0700
+Subject: [PATCH] Ensure USER is set when unit tests run
+
+Related #1391
+---
+ src/cmd/ksh93/tests/util/run_test.sh | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/cmd/ksh93/tests/util/run_test.sh b/src/cmd/ksh93/tests/util/run_test.sh
+index 20d24ed1fda..ebc74770cae 100644
+--- a/src/cmd/ksh93/tests/util/run_test.sh
++++ b/src/cmd/ksh93/tests/util/run_test.sh
+@@ -62,6 +62,15 @@ fi
+ #
+ export OS_NAME=$(uname -s | tr '[A-Z]' '[a-z]')
+ 
++#
++# Make sure $USER is set. A CI/CB environment might not set it.
++# See https://github.com/att/ast/issues/1391
++#
++if [[ -z $USER ]]
++then
++    export USER=$(id -un)
++fi
++
+ # TODO: Enable the `io` test on Travis macOS once we understand why it dies from an abort().
+ # I'm not seeing that failure happen on either of my macOS 10.12 or 10.13 systems.
+ if [[ $test_name == io && $OS_NAME == darwin && $CI == true ]]

diff --git a/app-shells/ksh/files/ksh-2020.0.0-skip-api-test.patch b/app-shells/ksh/files/ksh-2020.0.0-skip-api-test.patch
new file mode 100644
index 00000000000..f832d175454
--- /dev/null
+++ b/app-shells/ksh/files/ksh-2020.0.0-skip-api-test.patch
@@ -0,0 +1,36 @@
+From d89753b5d38482f4a3f17ba3b7d09ab07cfe7419 Mon Sep 17 00:00:00 2001
+From: Kurtis Rader <krader@skepticism.us>
+Date: Sun, 1 Sep 2019 13:47:40 -0700
+Subject: [PATCH] Skip API test if build type != debug
+
+Fixes #1390
+---
+ src/lib/libast/tests/misc/meson.build | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/libast/tests/misc/meson.build b/src/lib/libast/tests/misc/meson.build
+index 67a178762fa..a4c864428d8 100644
+--- a/src/lib/libast/tests/misc/meson.build
++++ b/src/lib/libast/tests/misc/meson.build
+@@ -10,6 +10,12 @@ tests_to_skip = [
+     ['freebsd', 'debug'],
+ ]
+ 
++# Non-debug build types affect the behavior of `backtrace()`. Which means it will almost certainly
++# break the "debug" test. See https://github.com/att/ast/issues/1390.
++if get_option('buildtype') != 'debug'
++    tests_to_skip += [['*', 'debug']]
++endif
++
+ foreach test_name: tests
+     # If the platform doesn't have an execinfo.h header there is no point in trying to run the
+     # debug.c unit test.
+@@ -18,7 +24,7 @@ foreach test_name: tests
+     endif
+     skip_test = false
+     foreach skip : tests_to_skip
+-        if system == skip[0] and test_name == skip[1]
++        if ('*' == skip[0] or system == skip[0]) and test_name == skip[1]
+             warning('skipping ' + test_name + ' on ' + system)
+             skip_test = true
+             # break  # Not until meson 0.49

diff --git a/app-shells/ksh/ksh-2020.0.0_beta1.ebuild b/app-shells/ksh/ksh-2020.0.0.ebuild
similarity index 67%
rename from app-shells/ksh/ksh-2020.0.0_beta1.ebuild
rename to app-shells/ksh/ksh-2020.0.0.ebuild
index 2ccad3528bf..c2f9bb7797e 100644
--- a/app-shells/ksh/ksh-2020.0.0_beta1.ebuild
+++ b/app-shells/ksh/ksh-2020.0.0.ebuild
@@ -24,6 +24,23 @@ SLOT="0"
 
 RDEPEND="!app-shells/pdksh"
 
+PATCHES=(
+	"${FILESDIR}"/ksh-2020.0.0-ensure-user-set.patch
+	"${FILESDIR}"/ksh-2020.0.0-skip-api-test.patch
+)
+
+src_test() {
+	local cmd=(
+		meson test
+		-C "${BUILD_DIR}"
+		--num-processes "$(makeopts_jobs ${NINJAOPTS:-${MAKEOPTS}})"
+	)
+
+	echo "${cmd[@]}" >&2
+	# https://github.com/att/ast/issues/1392
+	env -u T "${cmd[@]}" || die
+}
+
 src_install() {
 	meson_src_install
 	dodir /bin

diff --git a/app-shells/ksh/ksh-2020.0.0_alpha1.ebuild b/app-shells/ksh/ksh-2020.0.0_alpha1.ebuild
deleted file mode 100644
index 3c91825f17c..00000000000
--- a/app-shells/ksh/ksh-2020.0.0_alpha1.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit meson
-
-DESCRIPTION="The Original Korn Shell, 1993 revision (ksh93)"
-HOMEPAGE="https://github.com/att/ast"
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-SRC_URI="https://github.com/att/ast/releases/download/${MY_PV}/${MY_P}.tar.gz
-	https://github.com/att/ast/commit/db7fe39b744d071bb0428c91e2eb84877f068dac.patch -> ${MY_P}-solaris.patch
-	https://github.com/att/ast/commit/63e9edcb6084d4b164439065e2d71f3e900ec3c7.patch -> ${MY_P}-conftab.patch"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="CPL-1.0 EPL-1.0"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
-
-RDEPEND="!app-shells/pdksh"
-
-PATCHES=(
-	"${DISTDIR}"/${MY_P}-solaris.patch
-	"${DISTDIR}"/${MY_P}-conftab.patch
-)
-
-src_install() {
-	meson_src_install
-	dodir /bin
-	mv "${ED}/usr/bin/ksh" "${ED}/bin/ksh" || die
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/ksh/files/, app-shells/ksh/
@ 2021-12-15  5:32 Georgy Yakovlev
  0 siblings, 0 replies; 4+ messages in thread
From: Georgy Yakovlev @ 2021-12-15  5:32 UTC (permalink / raw
  To: gentoo-commits

commit:     934d7042efb591a3d37f6207bf35fd8680ee7599
Author:     Stephan Hartmann <sultan <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 20 20:10:40 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Dec 15 05:30:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=934d7042

app-shells/ksh: bump to 1.0.0_beta1

PR: https://github.com/gentoo/gentoo/pull/23012
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 app-shells/ksh/Manifest                            |   1 +
 .../ksh/files/ksh-1.0.0-beta.1-regre-tests.patch   | 365 +++++++++++++++++++++
 app-shells/ksh/ksh-1.0.0_beta1.ebuild              |  74 +++++
 app-shells/ksh/metadata.xml                        |  11 +-
 4 files changed, 449 insertions(+), 2 deletions(-)

diff --git a/app-shells/ksh/Manifest b/app-shells/ksh/Manifest
index 13f85b68cedb..cfd1ee45c7c6 100644
--- a/app-shells/ksh/Manifest
+++ b/app-shells/ksh/Manifest
@@ -1 +1,2 @@
 DIST ksh-2020.0.0.tar.gz 2022880 BLAKE2B cb952c4febe88a3ccf8fd48f511a30a73bfc812ebf0b7a5fe799470b29ee13ca61004fd34e367d836940a88214da2aa05b7cb96f173a1b8d57c8e644c8c3a2a6 SHA512 7d6da3af341a62718d691ddc52e10bdf3b7290d74f1cd01610093c587af47b6d6d04b74b210eb31f93a3559855a5bc5155f9b188d2f8bb4444042c26bfaf1792
+DIST ksh-v1.0.0-beta.1.tar.gz 2376823 BLAKE2B 0c985bd17bd0a6301205cffa703536c99322b99953e86b8e8266616f70c7d8cab01801f55c5ba2964628cef8c05878f4e721be39987c418b35859952d3a07719 SHA512 968d7c1aef38f0a29f3a32d0aba7bd5138b70d96486443d5b13c4830907aa7344fb7599ca153a55116758413640ba84ec9e6be19a6f0941814f2515a3961b312

diff --git a/app-shells/ksh/files/ksh-1.0.0-beta.1-regre-tests.patch b/app-shells/ksh/files/ksh-1.0.0-beta.1-regre-tests.patch
new file mode 100644
index 000000000000..d9f8b4697d6c
--- /dev/null
+++ b/app-shells/ksh/files/ksh-1.0.0-beta.1-regre-tests.patch
@@ -0,0 +1,365 @@
+From 541dd6f286a71c0d1d874807e61551026d03f409 Mon Sep 17 00:00:00 2001
+From: Vincent Mihalkovic <vmihalko@redhat.com>
+Date: Tue, 3 Aug 2021 10:20:04 +0200
+Subject: [PATCH] src/cmd/ksh93/tests: (temporary) disable failing tests
+
+---
+ src/cmd/ksh93/tests/functions.sh |  2 ++
+ src/cmd/ksh93/tests/io.sh        |  2 ++
+ src/cmd/ksh93/tests/leaks.sh     | 49 ++++++++++++++++++++++++++++++--
+ src/cmd/ksh93/tests/tilde.sh     |  4 +--
+ src/cmd/ksh93/tests/variables.sh |  2 ++
+ 5 files changed, 54 insertions(+), 5 deletions(-)
+
+diff --git a/src/cmd/ksh93/tests/functions.sh b/src/cmd/ksh93/tests/functions.sh
+index 731c1a6..43bb32a 100755
+--- a/src/cmd/ksh93/tests/functions.sh
++++ b/src/cmd/ksh93/tests/functions.sh
+@@ -146,10 +146,12 @@ fi
+ if	[[ $PWD != "$dir" ]]
+ then	err_exit 'cd inside nested subshell changes $PWD'
+ fi
++: <<'disabled'	# TODO: failing only on i686 arch
+ fun() "$bin_echo" hello
+ if	[[ $(fun) != hello ]]
+ then	err_exit one line functions not working
+ fi
++disabled
+ cat > $tmp/script <<-\!
+ 	print -r -- "$1"
+ !
+diff --git a/src/cmd/ksh93/tests/io.sh b/src/cmd/ksh93/tests/io.sh
+index 2752145..f94c801 100755
+--- a/src/cmd/ksh93/tests/io.sh
++++ b/src/cmd/ksh93/tests/io.sh
+@@ -241,7 +241,9 @@ then	[[ $(3<#) -eq 0 ]] || err_exit "not at position 0"
+ 	read -u3 && err_exit "not found pattern not positioning at eof"
+ 	cat $tmp/seek | read -r <# *WWW*
+ 	[[ $REPLY == *WWWWW* ]] || err_exit '<# not working for pipes'
++: <<'disabled'	# TODO: failing only on armv7, i686 arch. Reason: https://github.com/att/ast/commit/a5c692e1bd0d800e3f19be249d3170e69cbe001d
+ 	{ < $tmp/seek <# ((2358336120)) ;} 2> /dev/null || err_exit 'long seek not working'
++disabled
+ else	err_exit "$tmp/seek: cannot open for reading"
+ fi
+ redirect 3<&- || 'cannot close 3'
+diff --git a/src/cmd/ksh93/tests/leaks.sh b/src/cmd/ksh93/tests/leaks.sh
+index 0f50da2..6c8acfd 100755
+--- a/src/cmd/ksh93/tests/leaks.sh
++++ b/src/cmd/ksh93/tests/leaks.sh
+@@ -109,6 +109,7 @@ do	got=$($SHELL -c 'x=$(printf "%.*c" '$exp' x); print ${#x}' 2>&1)
+ 	[[ $got == $exp ]] || err_exit "large command substitution failed -- expected $exp, got $got"
+ done
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ data="(v=;sid=;di=;hi=;ti='1328244300';lv='o';id='172.3.161.178';var=(k='conn_num._total';u=;fr=;l='Number of Connections';n='22';t='number';))"
+ read -C stat <<< "$data"
+ for ((i=0; i < 8; i++))	# steady state first
+@@ -122,8 +123,10 @@ done |	while read -u$n -C stat
+ 	done	{n}<&0-
+ after=$(getmem)
+ err_exit_if_leak "memory leak with read -C when deleting compound variable"
++disabled
+ 
+ # extra 'read's to get to steady state
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ for ((i=0; i < 10; i++))
+ do	read -C stat <<< "$data"
+ done
+@@ -133,10 +136,12 @@ do      read -C stat <<< "$data"
+ done
+ after=$(getmem)
+ err_exit_if_leak "memory leak with read -C when using <<<"
++disabled
+ 
+ # ======
+ # Unsetting an associative array shouldn't cause a memory leak
+ # See https://www.mail-archive.com/ast-users@lists.research.att.com/msg01016.html
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ typeset -A stuff
+ before=$(getmem)
+ for (( i=0; i < N; i++ ))
+@@ -152,6 +157,7 @@ done
+ unset stuff
+ after=$(getmem)
+ err_exit_if_leak 'unset of associative array causes memory leak'
++disabled
+ 
+ # ======
+ # Memory leak when resetting PATH and clearing hash table
+@@ -167,17 +173,20 @@ done >/dev/null
+ after=$(getmem)
+ err_exit_if_leak 'memory leak on PATH reset before PATH search'
+ # ...test for another leak that only shows up when building with nmake:
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ before=$(getmem)
+ for	((i=0; i < N; i++))
+ do	PATH=/dev/null true	# set/restore PATH & clear hash table
+ done >/dev/null
+ after=$(getmem)
+ err_exit_if_leak 'memory leak on PATH reset'
++disabled
+ 
+ # ======
+ # Defining a function in a virtual subshell
+ # https://github.com/ksh93/ksh/issues/114
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ unset -f foo
+ before=$(getmem)
+ for ((i=0; i < N; i++))
+@@ -186,7 +195,9 @@ done
+ after=$(getmem)
+ err_exit_if_leak 'ksh function defined in virtual subshell'
+ typeset -f foo >/dev/null && err_exit 'ksh function leaks out of subshell'
++disabled
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ unset -f foo
+ before=$(getmem)
+ for ((i=0; i < N; i++))
+@@ -195,9 +206,10 @@ done
+ after=$(getmem)
+ err_exit_if_leak 'POSIX function defined in virtual subshell'
+ typeset -f foo >/dev/null && err_exit 'POSIX function leaks out of subshell'
++disabled
+ 
+ # Unsetting a function in a virtual subshell
+-
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ function foo { echo bar; }
+ before=$(getmem)
+ for ((i=0; i < N; i++))
+@@ -206,8 +218,11 @@ done
+ after=$(getmem)
+ err_exit_if_leak 'ksh function unset in virtual subshell'
+ typeset -f foo >/dev/null || err_exit 'ksh function unset in subshell was unset in main shell'
++disabled
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ foo() { echo bar; }
++
+ before=$(getmem)
+ for ((i=0; i < N; i++))
+ do	(unset -f foo)
+@@ -215,24 +230,29 @@ done
+ after=$(getmem)
+ err_exit_if_leak 'POSIX function unset in virtual subshell'
+ typeset -f foo >/dev/null || err_exit 'POSIX function unset in subshell was unset in main shell'
++disabled
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ before=$(getmem)
+ for ((i=0; i < N; i++))
+ do	(function foo { echo baz; }; unset -f foo)
+ done
+ after=$(getmem)
+ err_exit_if_leak 'ksh function defined and unset in virtual subshell'
++disabled
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ before=$(getmem)
+ for ((i=0; i < N; i++))
+ do	(foo() { echo baz; }; unset -f foo)
+ done
+ after=$(getmem)
+ err_exit_if_leak 'POSIX function defined and unset in virtual subshell'
++disabled
+ 
+ # ======
+ # Sourcing a dot script in a virtual subshell
+-
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ echo 'echo "$@"' > $tmp/dot.sh
+ before=$(getmem)
+ for ((i=0; i < N; i++))
+@@ -240,6 +260,7 @@ do	(. "$tmp/dot.sh" dot one two three >/dev/null)
+ done
+ after=$(getmem)
+ err_exit_if_leak 'script dotted in virtual subshell'
++disabled
+ 
+ echo 'echo "$@"' > $tmp/dot.sh
+ before=$(getmem)
+@@ -253,6 +274,8 @@ err_exit_if_leak 'script sourced in virtual subshell'
+ # Multiple leaks when using arrays in functions (Red Hat #921455)
+ # Fix based on: https://src.fedoraproject.org/rpms/ksh/blob/642af4d6/f/ksh-20120801-memlik.patch
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
++
+ # TODO: both of these tests still leak (although much less after the patch) when run in a non-C locale.
+ saveLANG=$LANG; LANG=C	# comment out to test remaining leak (1/2)
+ 
+@@ -268,7 +291,9 @@ do	_hash
+ done
+ after=$(getmem)
+ err_exit_if_leak 'associative array in function'
++disabled
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ function _array
+ {
+ 	typeset w=(1 31534 42)
+@@ -283,12 +308,13 @@ after=$(getmem)
+ err_exit_if_leak 'indexed array in function'
+ 
+ LANG=$saveLANG		# comment out to test remaining leak (2/2)
++disabled
+ 
+ # ======
+ # Memory leak in typeset (Red Hat #1036470)
+ # Fix based on: https://src.fedoraproject.org/rpms/ksh/blob/642af4d6/f/ksh-20120801-memlik3.patch
+ # The fix was backported from ksh 93v- beta.
+-
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ function myFunction
+ {
+ 	typeset toPrint="something"
+@@ -301,10 +327,12 @@ do	state=$(myFunction)
+ done
+ after=$(getmem)
+ err_exit_if_leak 'typeset in function called by command substitution'
++disabled
+ 
+ # ======
+ # Check that unsetting an alias frees both the node and its value
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ before=$(getmem)
+ for ((i=0; i < N; i++))
+ do	alias "test$i=command$i"
+@@ -312,10 +340,12 @@ do	alias "test$i=command$i"
+ done
+ after=$(getmem)
+ err_exit_if_leak 'unalias'
++disabled
+ 
+ # ======
+ # Red Hat bug rhbz#982142: command substitution leaks
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ # case1: Nested command substitutions
+ # (reportedly already fixed in 93u+, but let's keep the test)
+ before=$(getmem)
+@@ -324,8 +354,10 @@ do	a=`true 1 + \`true 1 + 1\``	# was: a=`expr 1 + \`expr 1 + 1\``
+ done
+ after=$(getmem)
+ err_exit_if_leak 'nested command substitutions'
++disabled
+ 
+ # case2: Command alias
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ alias ls='true -ltr'			# was: alias ls='ls -ltr'
+ before=$(getmem)
+ for ((i=0; i < N; i++))
+@@ -334,8 +366,10 @@ done
+ after=$(getmem)
+ unalias ls
+ err_exit_if_leak 'alias in command substitution'
++disabled
+ 
+ # case3: Function call via autoload
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ cat >$tmp/func1 <<\EOF
+ function func1
+ {
+@@ -353,12 +387,14 @@ after=$(getmem)
+ unset -f func1
+ unset -v FPATH
+ err_exit_if_leak 'function call via autoload in command substitution'
++disabled
+ 
+ # ======
+ 
+ # add some random utilities to the hash table to detect memory leak on hash table reset when changing PATH
+ random_utils=(chmod cp mv awk sed diff comm cut sort uniq date env find mkdir rmdir pr sleep)
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ save_PATH=$PATH
+ hash "${random_utils[@]}"
+ before=$(getmem)
+@@ -368,7 +404,9 @@ do	hash -r
+ done
+ after=$(getmem)
+ err_exit_if_leak 'clear hash table (hash -r) in main shell'
++disabled
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ before=$(getmem)
+ for ((i=0; i < N; i++))
+ do	PATH=/dev/null
+@@ -377,13 +415,16 @@ do	PATH=/dev/null
+ done
+ after=$(getmem)
+ err_exit_if_leak 'set PATH value in main shell'
++disabled
+ 
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ before=$(getmem)
+ for ((i=0; i < N; i++))
+ do	PATH=/dev/null command true
+ done
+ after=$(getmem)
+ err_exit_if_leak 'run command with preceding PATH assignment in main shell'
++disabled
+ 
+ : <<'disabled'	# TODO: known leak (approx 73552 bytes after 512 iterations)
+ before=$(getmem)
+@@ -454,6 +495,7 @@ disabled
+ 
+ # ======
+ # Test for a memory leak after 'cd' (in relation to $PWD and $OLDPWD)
++: <<'disabled'	# TODO: upstream, leak sometimes on some archs
+ original_pwd=$PWD
+ before=$(getmem)
+ for ((i=0; i < N; i++))
+@@ -473,6 +515,7 @@ done
+ after=$(getmem)
+ err_exit_if_leak 'PWD and/or OLDPWD changed by cd'
+ cd $original_pwd
++disabled
+ 
+ # ======
+ # https://github.com/ksh93/ksh/issues/253#issuecomment-815308466
+diff --git a/src/cmd/ksh93/tests/tilde.sh b/src/cmd/ksh93/tests/tilde.sh
+index 1be00b9..1de0b16 100755
+--- a/src/cmd/ksh93/tests/tilde.sh
++++ b/src/cmd/ksh93/tests/tilde.sh
+@@ -151,13 +151,13 @@ do	(
+ 		[[ $got == "$exp" ]] || err_exit "$disc discipline: counter:" \
+ 			"expected $(printf %q "$exp"), got $(printf %q "$got")"
+ 		((i==5)) || err_exit "$disc discipline: counter: $i != 5"
+-
++: << 'disabled' # TODO sometimes fails on armv7 arch
+ 		set -- ~spc ~spc ~spc
+ 		got=$#,$1,$2,$3
+ 		exp=$'3,one\ttwo  three\n\tfour,one\ttwo  three\n\tfour,one\ttwo  three\n\tfour'
+ 		[[ $got == "$exp" ]] || err_exit "$disc discipline: quoting of whitespace:" \
+ 			"expected $(printf %q "$exp"), got $(printf %q "$got")"
+-
++disabled
+ 		print "$Errors" >$tmp/Errors
+ 	) &
+ 	wait "$!" 2>crashmsg
+diff --git a/src/cmd/ksh93/tests/variables.sh b/src/cmd/ksh93/tests/variables.sh
+index 253f84a..8b306a1 100755
+--- a/src/cmd/ksh93/tests/variables.sh
++++ b/src/cmd/ksh93/tests/variables.sh
+@@ -58,6 +58,7 @@ rand2=$($SHELL -c 'RANDOM=1; (echo $RANDOM)')
+ (( rand1 == rand2 )) && err_exit "Test 3: \$RANDOM seed in subshell doesn't change" \
+ 	"(both results are $rand1)"
+ # $RANDOM should be reseeded for the ( simple_command & ) optimization
++: <<'disabled' # Reason: On slower systems it could fail with an arithmetic syntax error because the output was verified before it had been written. From: https://github.com/ksh93/ksh/commit/33269cae615c913592e776276b480bf1d722ff07
+ ( echo $RANDOM & ) >r1
+ ( echo $RANDOM & ) >r2
+ integer giveup=0
+@@ -74,6 +75,7 @@ fi
+ kill $! 2>/dev/null
+ trap - USR1
+ unset giveup
++disabled
+ # Virtual subshells should not influence the parent shell's RANDOM sequence
+ RANDOM=456
+ exp="$RANDOM $RANDOM $RANDOM $RANDOM $RANDOM"
+-- 
+2.31.1
+

diff --git a/app-shells/ksh/ksh-1.0.0_beta1.ebuild b/app-shells/ksh/ksh-1.0.0_beta1.ebuild
new file mode 100644
index 000000000000..2ef94ea8022c
--- /dev/null
+++ b/app-shells/ksh/ksh-1.0.0_beta1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="The Original ATT Korn Shell"
+HOMEPAGE="http://www.kornshell.com/"
+
+MY_PV=$(ver_rs 3 - 4 .)
+SRC_URI="https://github.com/ksh93/${PN}/archive/v${MY_PV}/ksh-v${MY_PV}.tar.gz"
+
+LICENSE="EPL-1.0"
+SLOT="0"
+
+KEYWORDS="~amd64"
+
+PATCHES=(
+	"${FILESDIR}/ksh-1.0.0-beta.1-regre-tests.patch"
+)
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_prepare() {
+	default
+
+	# disable register for debugging
+	sed -i 1i"#define register" src/lib/libast/include/ast.h || die
+}
+
+src_compile() {
+	local extraflags=(
+		"-Wno-unknown-pragmas"
+		"-Wno-missing-braces"
+		"-Wno-unused-result"
+		"-Wno-return-type"
+		"-Wno-int-to-pointer-cast"
+		"-Wno-parentheses"
+		"-Wno-unused"
+		"-Wno-unused-but-set-variable"
+		"-Wno-cpp"
+		"-Wno-maybe-uninitialized"
+		"-Wno-lto-type-mismatch"
+		"-P"
+	)
+	append-cflags $(test-flags-CC ${extraflags[@]})
+	export CCFLAGS="${CFLAGS} -fno-strict-aliasing"
+
+	tc-export AR CC LD NM
+
+	sh bin/package only make ast-ksh SHELL="${BROOT}"/bin/sh || die
+}
+
+src_test() {
+	# test tries to catch IO error
+	addwrite /proc/self/mem
+
+	# arith.sh uses A for tests
+	unset A
+
+	sh bin/shtests --compile || die
+}
+
+src_install() {
+	local myhost="$(sh bin/package host)"
+	cd "arch/${myhost}" || die
+
+	dodir /bin
+	mv bin/ksh "${ED}"/bin/ || die
+	dosym ksh /bin/rksh
+
+	newman man/man1/sh.1 ksh.1
+}

diff --git a/app-shells/ksh/metadata.xml b/app-shells/ksh/metadata.xml
index 46ee6cb48b1d..2526e8d0cb13 100644
--- a/app-shells/ksh/metadata.xml
+++ b/app-shells/ksh/metadata.xml
@@ -1,7 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<!-- maintainer-needed -->
+	<maintainer type="person">
+		<email>sultan@gentoo.org</email>
+		<name>Stephan Hartmann</name>
+	</maintainer>
+	<maintainer type="person">
+		<email>gyakovlev@gentoo.org</email>
+		<name>Georgy Yakovlev</name>
+	</maintainer>
 	<longdescription lang="en">
 		The KornShell language was designed and developed by David G. Korn at
 		AT&amp;T Bell Laboratories. It is an interactive command language that
@@ -22,6 +29,6 @@
 		companies and universities. 
 	</longdescription>
 	<upstream>
-		<remote-id type="github">att/ast</remote-id>
+		<remote-id type="github">ksh93/ksh</remote-id>
 	</upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/ksh/files/, app-shells/ksh/
@ 2022-09-16 20:57 Georgy Yakovlev
  0 siblings, 0 replies; 4+ messages in thread
From: Georgy Yakovlev @ 2022-09-16 20:57 UTC (permalink / raw
  To: gentoo-commits

commit:     74d540b0cf28755b117e35c6e5e7f10ba463e5b0
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 16 20:50:48 2022 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Sep 16 20:56:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74d540b0

app-shells/ksh: drop 2020.0.0-r1

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 app-shells/ksh/Manifest                            |  1 -
 app-shells/ksh/files/CVE-2019-14868.patch          | 89 ----------------------
 .../ksh/files/ksh-2020.0.0-ensure-user-set.patch   | 30 --------
 .../ksh/files/ksh-2020.0.0-skip-api-test.patch     | 36 ---------
 app-shells/ksh/ksh-2020.0.0-r1.ebuild              | 50 ------------
 5 files changed, 206 deletions(-)

diff --git a/app-shells/ksh/Manifest b/app-shells/ksh/Manifest
index 2e62c5d467c2..6b1143d68816 100644
--- a/app-shells/ksh/Manifest
+++ b/app-shells/ksh/Manifest
@@ -1,3 +1,2 @@
-DIST ksh-2020.0.0.tar.gz 2022880 BLAKE2B cb952c4febe88a3ccf8fd48f511a30a73bfc812ebf0b7a5fe799470b29ee13ca61004fd34e367d836940a88214da2aa05b7cb96f173a1b8d57c8e644c8c3a2a6 SHA512 7d6da3af341a62718d691ddc52e10bdf3b7290d74f1cd01610093c587af47b6d6d04b74b210eb31f93a3559855a5bc5155f9b188d2f8bb4444042c26bfaf1792
 DIST ksh-v1.0.0-beta.2.tar.gz 2238224 BLAKE2B b4eb8e116d0dd8fda498fb8d2805613a73291be628ce87ebc1c47c9bc8c49b236b285accaf35b4c9e411df23b99c6a949b672edeea1f1f317fc85a2b4db48779 SHA512 c2cd5a4b442bcff1dd2c1c054ee79c4cb131dce28d811dcd3476164d6cb7e88e6b317a094b16f227564a1266708ef0cfeca2af0929c00a19497cf1b67c647cf2
 DIST ksh-v1.0.3.tar.gz 2110771 BLAKE2B 4316c78f7889fb2e4630a83dd0f1c5c4c4b418a822e8f7d3d9415a83bbef6e993cbd21b4842c7f56cd8647305c4bdddc04562b8788f2ee6e14698a9cb090f386 SHA512 9d6e664bc6c8d102ba09e692d057b9546b07ba3ecb060449df6648e7c99f8dfd670401e6fcf34f6f3de13338a3c31c09596344931ccfdf4cd4e49eabdf005c23

diff --git a/app-shells/ksh/files/CVE-2019-14868.patch b/app-shells/ksh/files/CVE-2019-14868.patch
deleted file mode 100644
index d5c80566bafc..000000000000
--- a/app-shells/ksh/files/CVE-2019-14868.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From c7de8b641266bac7c77942239ac659edfee9ecd2 Mon Sep 17 00:00:00 2001
-From: Kurtis Rader <krader@skepticism.us>
-Date: Thu, 12 Dec 2019 18:46:50 -0800
-Subject: [PATCH] Harden env var imports
-
----
- src/cmd/ksh93/sh/arith.c        | 37 ++++++++++++++++++++++-----------
- src/cmd/ksh93/tests/subshell.sh | 23 ++++++++++++++++++++
-
-diff --git a/src/cmd/ksh93/sh/arith.c b/src/cmd/ksh93/sh/arith.c
-index 30b3067590a2..8e68cbdc868a 100644
---- a/src/cmd/ksh93/sh/arith.c
-+++ b/src/cmd/ksh93/sh/arith.c
-@@ -567,19 +567,32 @@ Sfdouble_t sh_strnum(Shell_t *shp, const char *str, char **ptr, int mode) {
-     char *last;
- 
-     if (*str == 0) {
--        if (ptr) *ptr = (char *)str;
--        return 0;
--    }
--    errno = 0;
--    d = number(str, &last, shp->inarith ? 0 : 10, NULL);
--    if (*last) {
--        if (*last != '.' || last[1] != '.') {
--            d = strval(shp, str, &last, arith, mode);
--            Varsubscript = true;
-+        d = 0.0;
-+        last = (char *)str;
-+    } else {
-+        d = number(str, &last, shp->inarith ? 0 : 10, NULL);
-+        if (*last && !shp->inarith && sh_isstate(shp, SH_INIT)) {
-+            // This call is to handle "base#value" literals if we're importing untrusted env vars.
-+            d = number(str, &last, 0, NULL);
-+        }
-+        if (*last) {
-+            if (sh_isstate(shp, SH_INIT)) {
-+                // Initializing means importing untrusted env vars. Since the string does not appear
-+                // to be a recognized numeric literal give up. We can't safely call strval() since
-+                // that allows arbitrary expressions which would create a security vulnerability.
-+                d = 0.0;
-+            } else {
-+                if (*last != '.' || last[1] != '.') {
-+                    d = strval(shp, str, &last, arith, mode);
-+                    Varsubscript = true;
-+                }
-+                if (!ptr && *last && mode > 0) {
-+                    errormsg(SH_DICT, ERROR_exit(1), e_lexbadchar, *last, str);
-+                }
-+            }
-+        } else if (d == 0.0 && *str == '-') {
-+            d = -0.0;
-         }
--        if (!ptr && *last && mode > 0) errormsg(SH_DICT, ERROR_exit(1), e_lexbadchar, *last, str);
--    } else if (!d && *str == '-') {
--        d = -0.0;
-     }
-     if (ptr) *ptr = last;
-     return d;
-diff --git a/src/cmd/ksh93/tests/subshell.sh b/src/cmd/ksh93/tests/subshell.sh
-index b63a8051ed5c..3faba475d6de 100644
---- a/src/cmd/ksh93/tests/subshell.sh
-+++ b/src/cmd/ksh93/tests/subshell.sh
-@@ -856,3 +856,26 @@ for exp in 65535 65536
- do    got=$($SHELL -c 'x=$(printf "%.*c" '$exp' x); print ${#x}' 2>&1)
-     [[ $got == $exp ]] || log_error "large command substitution failed" "$exp" "$got"
- done
-+
-+# ==========
-+# Verify that importing untrusted env vars does not allow evaluating arbitrary expressions but does
-+# recognize all integer literals recognized by ksh.
-+expect=8
-+actual=$(env SHLVL='7' $SHELL -c 'echo $SHLVL')
-+[[ $actual == $expect ]] || log_error "decimal int literal not recognized" "$expect" "$actual"
-+
-+expect=14
-+actual=$(env SHLVL='013' $SHELL -c 'echo $SHLVL')
-+[[ $actual == $expect ]] || log_error "leading zeros int literal not recognized" "$expect" "$actual"
-+
-+expect=4
-+actual=$(env SHLVL='2#11' $SHELL -c 'echo $SHLVL')
-+[[ $actual == $expect ]] || log_error "base#value int literal not recognized" "$expect" "$actual"
-+
-+expect=12
-+actual=$(env SHLVL='16#B' $SHELL -c 'echo $SHLVL')
-+[[ $actual == $expect ]] || log_error "base#value int literal not recognized" "$expect" "$actual"
-+
-+expect=1
-+actual=$(env SHLVL="2#11+x[\$($bin_echo DANGER WILL ROBINSON >&2)0]" $SHELL -c 'echo $SHLVL')
-+[[ $actual == $expect ]] || log_error "expression allowed on env var import" "$expect" "$actual"

diff --git a/app-shells/ksh/files/ksh-2020.0.0-ensure-user-set.patch b/app-shells/ksh/files/ksh-2020.0.0-ensure-user-set.patch
deleted file mode 100644
index 9f5d70f4d33c..000000000000
--- a/app-shells/ksh/files/ksh-2020.0.0-ensure-user-set.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From cb9f6d3498622b46de021a7f4798512d203747e9 Mon Sep 17 00:00:00 2001
-From: Kurtis Rader <krader@skepticism.us>
-Date: Sun, 1 Sep 2019 15:44:40 -0700
-Subject: [PATCH] Ensure USER is set when unit tests run
-
-Related #1391
----
- src/cmd/ksh93/tests/util/run_test.sh | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/src/cmd/ksh93/tests/util/run_test.sh b/src/cmd/ksh93/tests/util/run_test.sh
-index 20d24ed1fda..ebc74770cae 100644
---- a/src/cmd/ksh93/tests/util/run_test.sh
-+++ b/src/cmd/ksh93/tests/util/run_test.sh
-@@ -62,6 +62,15 @@ fi
- #
- export OS_NAME=$(uname -s | tr '[A-Z]' '[a-z]')
- 
-+#
-+# Make sure $USER is set. A CI/CB environment might not set it.
-+# See https://github.com/att/ast/issues/1391
-+#
-+if [[ -z $USER ]]
-+then
-+    export USER=$(id -un)
-+fi
-+
- # TODO: Enable the `io` test on Travis macOS once we understand why it dies from an abort().
- # I'm not seeing that failure happen on either of my macOS 10.12 or 10.13 systems.
- if [[ $test_name == io && $OS_NAME == darwin && $CI == true ]]

diff --git a/app-shells/ksh/files/ksh-2020.0.0-skip-api-test.patch b/app-shells/ksh/files/ksh-2020.0.0-skip-api-test.patch
deleted file mode 100644
index f832d175454e..000000000000
--- a/app-shells/ksh/files/ksh-2020.0.0-skip-api-test.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From d89753b5d38482f4a3f17ba3b7d09ab07cfe7419 Mon Sep 17 00:00:00 2001
-From: Kurtis Rader <krader@skepticism.us>
-Date: Sun, 1 Sep 2019 13:47:40 -0700
-Subject: [PATCH] Skip API test if build type != debug
-
-Fixes #1390
----
- src/lib/libast/tests/misc/meson.build | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/src/lib/libast/tests/misc/meson.build b/src/lib/libast/tests/misc/meson.build
-index 67a178762fa..a4c864428d8 100644
---- a/src/lib/libast/tests/misc/meson.build
-+++ b/src/lib/libast/tests/misc/meson.build
-@@ -10,6 +10,12 @@ tests_to_skip = [
-     ['freebsd', 'debug'],
- ]
- 
-+# Non-debug build types affect the behavior of `backtrace()`. Which means it will almost certainly
-+# break the "debug" test. See https://github.com/att/ast/issues/1390.
-+if get_option('buildtype') != 'debug'
-+    tests_to_skip += [['*', 'debug']]
-+endif
-+
- foreach test_name: tests
-     # If the platform doesn't have an execinfo.h header there is no point in trying to run the
-     # debug.c unit test.
-@@ -18,7 +24,7 @@ foreach test_name: tests
-     endif
-     skip_test = false
-     foreach skip : tests_to_skip
--        if system == skip[0] and test_name == skip[1]
-+        if ('*' == skip[0] or system == skip[0]) and test_name == skip[1]
-             warning('skipping ' + test_name + ' on ' + system)
-             skip_test = true
-             # break  # Not until meson 0.49

diff --git a/app-shells/ksh/ksh-2020.0.0-r1.ebuild b/app-shells/ksh/ksh-2020.0.0-r1.ebuild
deleted file mode 100644
index 5eb45fad5785..000000000000
--- a/app-shells/ksh/ksh-2020.0.0-r1.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit meson ninja-utils
-
-if [[ ${PV} == 9999 ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://github.com/att/ast"
-else
-	KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
-	MY_PV="${PV/_/-}"
-	MY_P="${PN}-${MY_PV}"
-	SRC_URI="https://github.com/att/ast/releases/download/${MY_PV}/${MY_P}.tar.gz"
-	S="${WORKDIR}/${MY_P}"
-fi
-
-DESCRIPTION="The Original Korn Shell, 1993 revision (ksh93)"
-HOMEPAGE="https://github.com/att/ast"
-
-LICENSE="CPL-1.0 EPL-1.0"
-SLOT="0"
-
-RDEPEND="!app-shells/pdksh"
-
-PATCHES=(
-	"${FILESDIR}"/ksh-2020.0.0-ensure-user-set.patch
-	"${FILESDIR}"/ksh-2020.0.0-skip-api-test.patch
-	"${FILESDIR}"/CVE-2019-14868.patch
-)
-
-src_test() {
-	# https://bugs.gentoo.org/702570
-	addwrite /proc/self
-	local cmd=(
-		meson test
-		-C "${BUILD_DIR}"
-		--num-processes "$(makeopts_jobs ${NINJAOPTS:-${MAKEOPTS}})"
-	)
-	echo "${cmd[@]}" >&2
-	# https://github.com/att/ast/issues/1392
-	env -u T "${cmd[@]}" || die
-}
-
-src_install() {
-	meson_src_install
-	dodir /bin
-	mv "${ED}/usr/bin/ksh" "${ED}/bin/ksh" || die
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-16 20:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-16 20:57 [gentoo-commits] repo/gentoo:master commit in: app-shells/ksh/files/, app-shells/ksh/ Georgy Yakovlev
  -- strict thread matches above, loose matches on Subject: below --
2021-12-15  5:32 Georgy Yakovlev
2019-10-10 18:52 Mike Gilbert
2019-05-04 16:03 Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox