summaryrefslogtreecommitdiff
path: root/sys-apps/mawk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-17 22:43:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-17 22:43:15 +0000
commit52f895faaaf01579a8d9528cafec20bf2c873f5c (patch)
treed552df2a24a2e21fd08b08caef93840452b9889c /sys-apps/mawk
parent0704956f7256f1f618cc5e03af2c1dbd0e83dbc5 (diff)
gentoo resync : 17.01.2010
Diffstat (limited to 'sys-apps/mawk')
-rw-r--r--sys-apps/mawk/Manifest10
-rw-r--r--sys-apps/mawk/files/mawk-1.3.4-sandbox-default.patch91
-rw-r--r--sys-apps/mawk/files/mawk-1.3.4-sandbox.patch141
-rw-r--r--sys-apps/mawk/mawk-1.3.4_p20190203-r1.ebuild (renamed from sys-apps/mawk/mawk-1.3.4_p20190203.ebuild)10
-rw-r--r--sys-apps/mawk/mawk-1.3.4_p20200106-r1.ebuild (renamed from sys-apps/mawk/mawk-1.3.4_p20171017-r1.ebuild)18
-rw-r--r--sys-apps/mawk/metadata.xml3
6 files changed, 12 insertions, 261 deletions
diff --git a/sys-apps/mawk/Manifest b/sys-apps/mawk/Manifest
index 6e48168c2f2d..17781aafa935 100644
--- a/sys-apps/mawk/Manifest
+++ b/sys-apps/mawk/Manifest
@@ -1,9 +1,7 @@
-AUX mawk-1.3.4-sandbox-default.patch 2720 BLAKE2B 3f0a25b06f1045659b9dc7decbbd54c9355f94a6879cad0f121e825cb705652b14b7a4c4655f2fe89c2f921aea511f8b8755cd398d28ce9a47ffa6bfef158953 SHA512 bdceb22a51464de5786d469ffcc6fc7157a0aca3e3dc89553418a401de3735b95439691ccf5553d0746b3e793824821db85a2dfe14633db1ad5f1256fa3e65ab
-AUX mawk-1.3.4-sandbox.patch 3805 BLAKE2B a7d55816bea03fb949387c8a1acf310b6dbae60014601bc514f44cbf3a8632c275bf6b786b016e93450ecf60d61052b14b029e56d559656dc87fed72a66239af SHA512 03149ba3d3e0cd5fa6d50573cc50260346e91d82bfd510d8a069a3e076df49d2b85edd2b42632a34e21f9d82c384212272e99b1cf305b4c1a78e252b75da4eb3
DIST mawk-1.3.4-20161120.tgz 461464 BLAKE2B 7481345b391198cc9ec47f6ad84f0f07e31c931a40d59bde401d00ea7bc74b728c8149f80187e5d73923496e2eef1ec70bc097aedf0b68630f73264d45d96ebd SHA512 c5edcbff4ab1e40eb9b178a045fcd426a5f3c93a3ab5bc1ca1fa85a0977b8c9060967fcbda4e4a6e9e68628f50a2814e22939676008dced529377d2cf9bda5b2
-DIST mawk-1.3.4-20171017.tgz 460819 BLAKE2B 91cb4cd039ea7773b788db87389f8ec34914afc8b299fecfdd579fe89fc4e6d731bfdc9c06a2c6c3d75ab9e1022bf5dbe1c662962d6ccd8a8f6fe4f8589927ca SHA512 4ed6ca0ecca12e7409d3d364b72dc6a2b411c61bf53fe8aa0b0cac65a3bdb941921c0b81d94f34c8ac9f4922c8c7566d347b5e6b5c74518ae3a88904f9e20f27
DIST mawk-1.3.4-20190203.tgz 466481 BLAKE2B f647c52872ff510f02ab44f13f6c51497abdecf3d6ab40faa2e419f726a15ebdb531607465bcaf2f53d032284251f9fd25e73734a72fc31c014a0a9f200613ed SHA512 64d5b1838d34d30e32966f46cb7457c865caccfe9fe1049d2645ba301b1ddb4efc18588115dbcf96234a2a0b791211a7f82264a3c81899459dc3029e65837646
+DIST mawk-1.3.4-20200106.tgz 468031 BLAKE2B b125eecf780f0658d3a1c06875fdac221ffe5999e38646d71b15159c50271a7bbfb594fb6347442239c3eab6703f9c782739bd2a5a055e1ff8cd44a0e8a6545d SHA512 f6f65f3b73965f520a6f9bb7e2b6ad2a3c532c0768461744e6cfb2e72e2c718dacd1c5eea995dfa267facfc4e0ee71d337809cd45d5c75cfbc65294b45280ff9
EBUILD mawk-1.3.4_p20161120.ebuild 863 BLAKE2B 2c9b4e89575906b66e5abe75e9325700025f98fe399c84d318aa7c4ac1b170a8b95e83e90eb27253ed9c3c824bde01aa1ba5b029066c25743d7a66e04aa36c48 SHA512 b58813aaa987f2469d83ebaeffd4a58156d3971a01cc427715b2c1d96bdd163a7beb5eba80f9454c58a0d5c470db390c030b0b0d0aeed3bb9c952f541e69ed17
-EBUILD mawk-1.3.4_p20171017-r1.ebuild 1027 BLAKE2B f4d0252ad3a10d2555b7a702f245ed7febcc2b175d1f0fff0b4620d8525915fbe705af519964d812b72ed7e24a889983b2bd1e328205d9c8f721e8ffb90ba1ab SHA512 60c19694ad829c574d943d4c465abd4c2e8bb35dd64ca22b96ea1e762dba594520176d3e95a71c65c43864280aff4e1ff2b6c24a5526a74cd390ac8281ba8d72
-EBUILD mawk-1.3.4_p20190203.ebuild 1028 BLAKE2B 4d30609ee1f43658a0e5acd65f1bd9afd1b94db33f1cab301ecb9b9dfbb79f559b13552e9cfbe2887f30ce3554091a41cff1fbfc93cf0fc689b0e5e1e7d7a28a SHA512 4e3eb9222369dc1d34a9a582734443ebd2c16e07797fe25a8ead5a99c1d470c9d76c2d1889603559e85ef158e14096258fd60802e29cb132a9b764d78b6f88b8
-MISC metadata.xml 359 BLAKE2B 988733eff41a4556cdb4f8d66adbe2864f33f4245ab1ba3a1456cb3b189fd12138cec7666d2fc125d275865a028274aaf5a41396430721ac96b913dc2f667f94 SHA512 bb64e60075207240fabd037108c2885b934d0dc0a72bdcce4c8c138555b1ebb4de811745235ee11fde75559ddf55f9488b71f53aab7e92df61099cba5ec28d2f
+EBUILD mawk-1.3.4_p20190203-r1.ebuild 874 BLAKE2B dbe9ab4f5bbadf78e1b86c1f1161dd96d795d7e744b3caff1149ebbc85c2f45842fedb01df0649d9676c9488d998adb1daacbeec81a5ac609ec29f6efbb78ed3 SHA512 c0239d36b1b88c8094cf75167dfc65db56b7329a44297cea02fe579a3f07ed804dcae77517875467fe5ffc571cd347dec26b98560981d505548c68582b64101e
+EBUILD mawk-1.3.4_p20200106-r1.ebuild 882 BLAKE2B f76f8c13ce3ea63d330455091223707a24b12ee87b634c00da4c808de7b602d82b051ae0f28464b2cc6ec8be245c0e38ca39b58292fbdb9141fdbabec8b32924 SHA512 2f024e689e5198c622bfe666669285fcf9a0b68d4bb8355aedb2dc71956a963df5983211fd42cf482fe157252539550ed5765f0c17631e746c9de30621fed6fe
+MISC metadata.xml 253 BLAKE2B 295e9d6d93aaa12af413972e1590c67087801cc09c9aa6b59d4606c0f4106d1dacf2baa9858559083b4c6d91beeef218d0729e8593a33788958da6d2897e8ce2 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555
diff --git a/sys-apps/mawk/files/mawk-1.3.4-sandbox-default.patch b/sys-apps/mawk/files/mawk-1.3.4-sandbox-default.patch
deleted file mode 100644
index c3b0fc1c892d..000000000000
--- a/sys-apps/mawk/files/mawk-1.3.4-sandbox-default.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-https://github.com/ThomasDickey/original-mawk/issues/49
-
-Note: We hand modify the configure file here because the version of autotools
-used by upstream is very old/finicky, and it's a simple enough change.
-
-From 1ac333b97615c451d7a4743b4724edd46d37a8b2 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@chromium.org>
-Date: Tue, 7 Nov 2017 01:07:47 -0500
-Subject: [PATCH 2/2] add a configure flag to lock sandbox by default
-
-This lets us deploy systems with the sandbox always enabled.
----
- configure | 23 +++++++++++++++++++++++
- configure.in | 11 +++++++++++
- init.c | 4 ++++
- 3 files changed, 38 insertions(+)
-
-diff --git a/configure.in b/configure.in
-index 8b795fbd264b..770092005386 100644
---- a/configure.in
-+++ b/configure.in
-@@ -112,6 +112,17 @@ fi
- AC_MSG_RESULT($with_init_srand)
-
- ###############################################################################
-+AC_MSG_CHECKING(if you want mawk to always run in sandbox mode)
-+CF_ARG_ENABLE([forced-sandbox],
-+[ --enable-forced-sandbox always run in sandbox mode],
-+ [with_forced_sandbox=yes],
-+ [with_forced_sandbox=no])
-+if test "x${with_forced_sandbox}" != xno; then
-+ CPPFLAGS="$CPPFLAGS -DFORCED_SANDBOX"
-+fi
-+AC_MSG_RESULT($with_forced_sandbox)
-+
-+###############################################################################
-
- AC_PROG_YACC
- CF_PROG_LINT
-diff --git a/init.c b/init.c
-index f7babb337e04..e035d6ea2fc0 100644
---- a/init.c
-+++ b/init.c
-@@ -492,6 +492,10 @@ process_cmdline(int argc, char **argv)
-
- no_more_opts:
-
-+#ifdef FORCED_SANDBOX
-+ sandbox_flag = 1;
-+#endif
-+
- tail->link = (PFILE *) 0;
- pfile_list = dummy.link;
-
-diff --git a/configure b/configure
-index a3bf42fe9245..442875b8e58a 100755
---- a/configure
-+++ b/configure
-@@ -4132,6 +4132,29 @@ echo "$as_me:4131: result: $with_init_srand" >&5
- echo "${ECHO_T}$with_init_srand" >&6
-
- ###############################################################################
-+echo "$as_me:4109: checking if you want mawk to always run in sandbox mode" >&5
-+echo $ECHO_N "checking if you want mawk to always run in sandbox mode... $ECHO_C" >&6
-+
-+if test "${enable_forced_sandbox+set}" = set; then
-+ enableval="$enable_forced_sandbox"
-+ test "$enableval" != yes && enableval=no
-+ if test "$enableval" != "no" ; then
-+ with_forced_sandbox=yes
-+ else
-+ with_forced_sandbox=no
-+ fi
-+else
-+ enableval=no
-+ with_forced_sandbox=no
-+
-+fi;
-+if test "x${with_forced_sandbox}" != xno; then
-+ CPPFLAGS="$CPPFLAGS -DFORCED_SANDBOX"
-+fi
-+echo "$as_me:4131: result: $with_forced_sandbox" >&5
-+echo "${ECHO_T}$with_forced_sandbox" >&6
-+
-+###############################################################################
-
- for ac_prog in 'bison -y' byacc
- do
---
-2.13.5
-
diff --git a/sys-apps/mawk/files/mawk-1.3.4-sandbox.patch b/sys-apps/mawk/files/mawk-1.3.4-sandbox.patch
deleted file mode 100644
index ae2ccbd50ec1..000000000000
--- a/sys-apps/mawk/files/mawk-1.3.4-sandbox.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-https://github.com/ThomasDickey/original-mawk/issues/49
-
-From ae3a324a5af1350aa1a6f648e10b9d6656d9fde4 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@chromium.org>
-Date: Tue, 7 Nov 2017 00:41:36 -0500
-Subject: [PATCH 1/2] add a -W sandbox mode
-
-This is like gawk's sandbox mode where arbitrary code execution and
-file redirection are locked down. This way awk can be a more secure
-input/output mode.
----
- bi_funct.c | 3 +++
- init.c | 8 ++++++++
- man/mawk.1 | 4 ++++
- mawk.h | 2 +-
- scan.c | 6 ++++++
- 5 files changed, 22 insertions(+), 1 deletion(-)
-
-diff --git a/bi_funct.c b/bi_funct.c
-index 7742308c72a5..b524ac8dac8b 100644
---- a/bi_funct.c
-+++ b/bi_funct.c
-@@ -908,6 +908,9 @@ bi_system(CELL *sp GCC_UNUSED)
- #ifdef HAVE_REAL_PIPES
- int ret_val;
-
-+ if (sandbox_flag)
-+ rt_error("'system' function not allowed in sandbox mode");
-+
- TRACE_FUNC("bi_system", sp);
-
- if (sp->type < C_STRING)
-diff --git a/init.c b/init.c
-index 0ab17b003f20..f7babb337e04 100644
---- a/init.c
-+++ b/init.c
-@@ -40,6 +40,7 @@ typedef enum {
- W_RANDOM,
- W_SPRINTF,
- W_POSIX_SPACE,
-+ W_SANDBOX,
- W_USAGE
- } W_OPTIONS;
-
-@@ -96,6 +97,7 @@ initialize(int argc, char **argv)
-
- int dump_code_flag; /* if on dump internal code */
- short posix_space_flag;
-+short sandbox_flag;
-
- #ifdef DEBUG
- int dump_RE = 1; /* if on dump compiled REs */
-@@ -153,6 +155,7 @@ usage(void)
- " -W random=number set initial random seed.",
- " -W sprintf=number adjust size of sprintf buffer.",
- " -W posix_space do not consider \"\\n\" a space.",
-+ " -W sandbox disable system() and I/O redirection.",
- " -W usage show this message and exit.",
- };
- size_t n;
-@@ -255,6 +258,7 @@ parse_w_opt(char *source, char **next)
- DATA(RANDOM),
- DATA(SPRINTF),
- DATA(POSIX_SPACE),
-+ DATA(SANDBOX),
- DATA(USAGE)
- };
- #undef DATA
-@@ -389,6 +393,10 @@ process_cmdline(int argc, char **argv)
- posix_space_flag = 1;
- break;
-
-+ case W_SANDBOX:
-+ sandbox_flag = 1;
-+ break;
-+
- case W_RANDOM:
- if (haveValue(optNext)) {
- int x = atoi(optNext + 1);
-diff --git a/man/mawk.1 b/man/mawk.1
-index a3c794167dc9..0915d9d7ed5d 100644
---- a/man/mawk.1
-+++ b/man/mawk.1
-@@ -150,6 +150,10 @@ forces
- \fB\*n\fP
- not to consider '\en' to be space.
- .TP
-+\-\fBW \fRsandbox
-+runs in a restricted mode where system(), input redirection (e.g. getline),
-+output redirection (e.g. print and printf), and pipelines are disabled.
-+.TP
- \-\fBW \fRrandom=\fInum\fR
- calls \fBsrand\fP with the given parameter
- (and overrides the auto-seeding behavior).
-diff --git a/mawk.h b/mawk.h
-index 2d04be1adb34..a6ccc0071ecc 100644
---- a/mawk.h
-+++ b/mawk.h
-@@ -63,7 +63,7 @@ extern int dump_RE;
- #define USE_BINMODE 0
- #endif
-
--extern short posix_space_flag, interactive_flag;
-+extern short posix_space_flag, interactive_flag, sandbox_flag;
-
- /*----------------
- * GLOBAL VARIABLES
-diff --git a/scan.c b/scan.c
-index 3a8fc9181ab8..c1833b8b7315 100644
---- a/scan.c
-+++ b/scan.c
-@@ -455,6 +455,8 @@ yylex(void)
- un_next();
-
- if (getline_flag) {
-+ if (sandbox_flag)
-+ rt_error("redirection not allowed in sandbox mode");
- getline_flag = 0;
- ct_ret(IO_IN);
- } else
-@@ -462,6 +464,8 @@ yylex(void)
-
- case SC_GT: /* '>' */
- if (print_flag && paren_cnt == 0) {
-+ if (sandbox_flag)
-+ rt_error("redirection not allowed in sandbox mode");
- print_flag = 0;
- /* there are 3 types of IO_OUT
- -- build the error string in string_buff */
-@@ -488,6 +492,8 @@ yylex(void)
- un_next();
-
- if (print_flag && paren_cnt == 0) {
-+ if (sandbox_flag)
-+ rt_error("pipe execution not allowed in sandbox mode");
- print_flag = 0;
- yylval.ival = PIPE_OUT;
- string_buff[0] = '|';
---
-2.13.5
-
diff --git a/sys-apps/mawk/mawk-1.3.4_p20190203.ebuild b/sys-apps/mawk/mawk-1.3.4_p20190203-r1.ebuild
index 84b29b099fcf..110cbc7c9a0f 100644
--- a/sys-apps/mawk/mawk-1.3.4_p20190203.ebuild
+++ b/sys-apps/mawk/mawk-1.3.4_p20190203-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,6 @@ SRC_URI="ftp://ftp.invisible-island.net/mawk/${MY_P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
-IUSE="forced-sandbox"
RDEPEND="app-eselect/eselect-awk"
DEPEND="${RDEPEND}"
@@ -22,14 +21,9 @@ S="${WORKDIR}/${MY_P}"
DOCS=( ACKNOWLEDGMENT CHANGES README )
-PATCHES=(
- "${FILESDIR}"/${PN}-1.3.4-sandbox.patch
- "${FILESDIR}"/${PN}-1.3.4-sandbox-default.patch
-)
-
src_configure() {
tc-export BUILD_CC
- econf $(use_enable forced-sandbox)
+ econf
}
src_install() {
diff --git a/sys-apps/mawk/mawk-1.3.4_p20171017-r1.ebuild b/sys-apps/mawk/mawk-1.3.4_p20200106-r1.ebuild
index 3084af0f0e2d..7645505ca1f2 100644
--- a/sys-apps/mawk/mawk-1.3.4_p20171017-r1.ebuild
+++ b/sys-apps/mawk/mawk-1.3.4_p20200106-r1.ebuild
@@ -1,35 +1,29 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit toolchain-funcs
-MY_P=${P/_p/-}
+MY_P="${P/_p/-}"
DESCRIPTION="an (often faster than gawk) awk-interpreter"
HOMEPAGE="https://invisible-island.net/mawk/mawk.html"
-SRC_URI="ftp://ftp.invisible-island.net/mawk/${MY_P}.tgz"
+SRC_URI="https://invisible-mirror.net/archives/${PN}/${MY_P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
-IUSE="forced-sandbox"
RDEPEND="app-eselect/eselect-awk"
DEPEND="${RDEPEND}"
-S=${WORKDIR}/${MY_P}
+S="${WORKDIR}/${MY_P}"
DOCS=( ACKNOWLEDGMENT CHANGES README )
-PATCHES=(
- "${FILESDIR}"/${PN}-1.3.4-sandbox.patch
- "${FILESDIR}"/${PN}-1.3.4-sandbox-default.patch
-)
-
src_configure() {
tc-export BUILD_CC
- econf $(use_enable forced-sandbox)
+ econf
}
src_install() {
diff --git a/sys-apps/mawk/metadata.xml b/sys-apps/mawk/metadata.xml
index fb5ddc9df936..56c124413057 100644
--- a/sys-apps/mawk/metadata.xml
+++ b/sys-apps/mawk/metadata.xml
@@ -5,7 +5,4 @@
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
-<use>
- <flag name="forced-sandbox">Always enable -W sandbox mode for simpler/secure runtime</flag>
-</use>
</pkgmetadata>