diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/tn5250 |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/tn5250')
-rw-r--r-- | net-misc/tn5250/Manifest | 8 | ||||
-rw-r--r-- | net-misc/tn5250/files/disable-sslv2-and-sslv3.patch | 61 | ||||
-rw-r--r-- | net-misc/tn5250/files/fix-Wformat-security-warnings.patch | 62 | ||||
-rw-r--r-- | net-misc/tn5250/metadata.xml | 7 | ||||
-rw-r--r-- | net-misc/tn5250/tn5250-0.17.4-r1.ebuild | 58 | ||||
-rw-r--r-- | net-misc/tn5250/tn5250-0.17.4-r2.ebuild | 61 |
6 files changed, 257 insertions, 0 deletions
diff --git a/net-misc/tn5250/Manifest b/net-misc/tn5250/Manifest new file mode 100644 index 000000000000..fc728c63ac79 --- /dev/null +++ b/net-misc/tn5250/Manifest @@ -0,0 +1,8 @@ +AUX disable-sslv2-and-sslv3.patch 2333 SHA256 d17c7b9d1b3977c65135289252207aa3ace6b5296159e919a9ba0a8849283e9f SHA512 938130a2211409ab179499f1b7b50f5517d609a0ad73051a6c1a89493b44cca28200723693698beb516733e3099976f5ec0335f290553e903604c5a1eee652bd WHIRLPOOL 65c7a4b8cede1fffe2660a66356eecaa39419e29cc73866ae8891291a9191bd28cb8f69d186244fcaaf128fa09c671377ccb86cb201d8c4aab62988cb00f0ff8 +AUX fix-Wformat-security-warnings.patch 2283 SHA256 191cc567b06cd38b87445ac8a8b2caeb82719b768a82a1fa0bdcc4739755a537 SHA512 da9114d26e838e822d8c63faa68f8157e03404f86e03c38f9f557416199c5ae96a35f4dbf47717c2588a6f29549b69a84ec66f5b7de848803b90759cae1fda04 WHIRLPOOL 522c04da841e79a4a328cbeef5fcace53d2c4a4e7658cac7f27bd83b1aefcdb338bd63a12a6872c251a0bf3896ba4b34ef093351a27264bc2bf86d195d533448 +DIST tn5250-0.17.4.tar.gz 648452 SHA256 354237d400dc46af887cb3ffa4ed1f2c371f5b8bee8be046a683a4ac9db4f9c5 SHA512 7c41bc47658f792fe7c6c6186d93095ac2eca67868070d84502bcff7de0cbc97afea1bd9987d2dbc5a340a444fdf1fbff81c7b844f5c205ec603f24c5e6c0804 WHIRLPOOL 00bedcc21c2a4c8d08b96c559ca9b0a46f960d41cc572e123189c8c18f8f70d3d39942543cc093e5a50b4bf5b782638ace91aab67f6444b29f5aaff28a5243a9 +EBUILD tn5250-0.17.4-r1.ebuild 1247 SHA256 174b56e9e5409be097a4be14b3ca81936f7e2484f345dbb599f5247e4d87e801 SHA512 e57461bf744d4ffffad3c8046a9faf674d0cef81d6baf1ea88546d5155a1eef7668931955599ab64a4ff4566990591edb41aba55a45f5ccb54dccfac7319e722 WHIRLPOOL 9b1d6c4936a1539fd92dfa906da3c0383b962fe964b17df604529e6fd35a9db66611440149720fb7fb5ae4b5842dae46909e07fe4464514f0bb86c6f19ced3a7 +EBUILD tn5250-0.17.4-r2.ebuild 1322 SHA256 d7fa30bf2204fa1734a5df97075c4602d8ab9bec1e09deba138c129141b8dbae SHA512 da737d6c37c56867cae53f893259f941fd07fe3d19fa77ab4f4f81cd2b432b0ee30cd643187729aab9ba709c2c5753a7398d38c828c44a1090e5d9be6d3a70e5 WHIRLPOOL f1bb84bb5e0cfb95cf1f9a7032b87025199ff372dbd4ec5c28a4d49ff875425aacb219bab5499ee9b4d420636eec4f7284cff5af48b178e7f4d05ab7337ff373 +MISC ChangeLog 3458 SHA256 c0fe445ec595195bf6e0a9f16b5e144fb0063a27521f5193539a050208c7d43e SHA512 e2e24d2c29828d6ddd9c7df05d7a54bd324a56a4fd09595d53e3193590f9185d4c7398477747d6bb056b8f9099a4832dc6c2d7dad382a98bd4166d785668ac34 WHIRLPOOL f0cdf96eead6513059e7ff53b8e24b560e930c883f9a866b26f9572f70b2a935595c3f69252bb517dcaa86926ac895bd9bec127a166d70b747c1457f26078083 +MISC ChangeLog-2015 2851 SHA256 38ea2bf6199077353b18854e007b8a4dcebdc9ad20c4e70296c01ed31cbe4be7 SHA512 4cc0beeda93a95f494ecc395f87b66bb09cf8bed0a5ab19fb1c0c66cc9f2bb95f4b32712db6a7751be9ccd716ef48e1ebed8799dceaa9d500416e4f3ba7e5e63 WHIRLPOOL 1165be6e5dacbfb98ec004d02924eef5a2c345e51ff465a24a531fffd139acac38afa3ec41280fc178aa20503a473935fbe33fb47a2c1a23adbbb5185e9b15b1 +MISC metadata.xml 215 SHA256 8702054536601c761875f96c7d84928954dfc82105b4de76b23285987a06cac9 SHA512 0e99f231bdcff1306e232af176e4ce38c754ea988c072324093f2ac5bca81432abeb12af3e5f1960d0047bcd6d8c558fc995d1e6670556e00e443ebb1b6fe09c WHIRLPOOL 641c5cf70de7bae4ac91040b9e33b846b6df62718ce6efd95921b11180e9b81d4f537b69978a710c4a16e546a113aab90a00cba9ffabd22d9ae2175d54d9b7ae diff --git a/net-misc/tn5250/files/disable-sslv2-and-sslv3.patch b/net-misc/tn5250/files/disable-sslv2-and-sslv3.patch new file mode 100644 index 000000000000..9c8d04f55851 --- /dev/null +++ b/net-misc/tn5250/files/disable-sslv2-and-sslv3.patch @@ -0,0 +1,61 @@ +From 1acfebd966e8804e6573cbe9287b8b6f028a646c Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Tue, 23 Aug 2016 18:13:47 -0400 +Subject: [PATCH 1/1] sslstream.c: ignore the user's choice of ssl_method. + +The SSLv2 and SSLv3 protocols are insecure, and people have begun to +operate without them. LibreSSL, for example, does not have them +enabled, and it is possible to build OpenSSL in the same manner. + +If SSLv[23] are disabled, the user would not be able to choose "ssl2" +or "ssl3" as his "ssl_method", an option that was undocumented +anywhere. Therefore there is not much lost, and some security to gain, +by removing the option completely. This commit does that, and uses the +automatic protocol choice that is capable of negotiating TLSv1, +TLSv1.1 and TLSv1.2. + +Gentoo-Bug: 591940 +--- + lib5250/sslstream.c | 26 ++++++++++---------------- + 1 file changed, 10 insertions(+), 16 deletions(-) + +diff --git a/lib5250/sslstream.c b/lib5250/sslstream.c +index 7181566..2f91d1a 100644 +--- a/lib5250/sslstream.c ++++ b/lib5250/sslstream.c +@@ -362,22 +362,16 @@ int tn5250_ssl_stream_init (Tn5250Stream *This) + + /* which SSL method do we use? */ + +- strcpy(methstr,"auto"); +- if (This->config!=NULL && tn5250_config_get (This->config, "ssl_method")) { +- strncpy(methstr, tn5250_config_get (This->config, "ssl_method"), 4); +- methstr[4] = '\0'; +- } +- +- if (!strcmp(methstr, "ssl2")) { +- meth = SSLv2_client_method(); +- TN5250_LOG(("SSL Method = SSLv2_client_method()\n")); +- } else if (!strcmp(methstr, "ssl3")) { +- meth = SSLv3_client_method(); +- TN5250_LOG(("SSL Method = SSLv3_client_method()\n")); +- } else { +- meth = SSLv23_client_method(); +- TN5250_LOG(("SSL Method = SSLv23_client_method()\n")); +- } ++ /* Ignore the user's choice of ssl_method (which isn't documented ++ * anyway...) if it was either "ssl2" or "ssl3". Both are insecure, ++ * and this is only safe supported method left. ++ * ++ * This is a Gentoo-specific modification that lets us build ++ * against LibreSSL and newer OpenSSL with its insecure protocols ++ * disabled. ++ */ ++ meth = SSLv23_client_method(); ++ TN5250_LOG(("SSL Method = SSLv23_client_method()\n")); + + /* create a new SSL context */ + +-- +2.7.3 + diff --git a/net-misc/tn5250/files/fix-Wformat-security-warnings.patch b/net-misc/tn5250/files/fix-Wformat-security-warnings.patch new file mode 100644 index 000000000000..4927bce546f2 --- /dev/null +++ b/net-misc/tn5250/files/fix-Wformat-security-warnings.patch @@ -0,0 +1,62 @@ +From 1bc9cac45be4bac46f58e325779bdb8c7b7bf502 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Tue, 23 Aug 2016 20:20:15 -0400 +Subject: [PATCH 1/1] Fix format-security warnings. + +Newer versions of GCC have the ability to warn you (or throw errors) +about insecure format strings. Generally this is due to an omitted +format string in the printf family of functions, and a few of those +issues existed in the code base. They were all fixed by adding a +trivial "%s" format string. The project now builds with +-Werror=format-security. +--- + curses/cursesterm.c | 4 ++-- + lib5250/sslstream.c | 2 +- + lib5250/telnetstr.c | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/curses/cursesterm.c b/curses/cursesterm.c +index bf20f05..3032966 100644 +--- a/curses/cursesterm.c ++++ b/curses/cursesterm.c +@@ -640,9 +640,9 @@ static void curses_terminal_update(Tn5250Terminal * This, Tn5250Display *display + if(This->data->is_xterm) { + if (This->data->font_132!=NULL) { + if (tn5250_display_width (display)>100) +- printf(This->data->font_132); ++ printf("%s", This->data->font_132); + else +- printf(This->data->font_80); ++ printf("%s", This->data->font_80); + } + printf ("\x1b[8;%d;%dt", tn5250_display_height (display)+1, + tn5250_display_width (display)); +diff --git a/lib5250/sslstream.c b/lib5250/sslstream.c +index 2f91d1a..7f3009e 100644 +--- a/lib5250/sslstream.c ++++ b/lib5250/sslstream.c +@@ -307,7 +307,7 @@ static void ssl_log_SB_buf(unsigned char *buf, int len) + + if (!tn5250_logfile) + return; +- fprintf(tn5250_logfile,ssl_getTelOpt(type=*buf++)); ++ fprintf(tn5250_logfile,"%s",ssl_getTelOpt(type=*buf++)); + switch (c=*buf++) { + case IS: + fputs("<IS>",tn5250_logfile); +diff --git a/lib5250/telnetstr.c b/lib5250/telnetstr.c +index 9ad2624..cf1576f 100644 +--- a/lib5250/telnetstr.c ++++ b/lib5250/telnetstr.c +@@ -282,7 +282,7 @@ static void log_SB_buf(unsigned char *buf, int len) + + if (!tn5250_logfile) + return; +- fprintf(tn5250_logfile,getTelOpt(type=*buf++)); ++ fprintf(tn5250_logfile,"%s",getTelOpt(type=*buf++)); + switch (c=*buf++) { + case IS: + fputs("<IS>",tn5250_logfile); +-- +2.7.3 + diff --git a/net-misc/tn5250/metadata.xml b/net-misc/tn5250/metadata.xml new file mode 100644 index 000000000000..46bc7afa2da1 --- /dev/null +++ b/net-misc/tn5250/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <upstream> + <remote-id type="sourceforge">tn5250</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-misc/tn5250/tn5250-0.17.4-r1.ebuild b/net-misc/tn5250/tn5250-0.17.4-r1.ebuild new file mode 100644 index 000000000000..5ae73def9bfd --- /dev/null +++ b/net-misc/tn5250/tn5250-0.17.4-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils + +DESCRIPTION="Telnet client for the IBM AS/400 that emulates 5250 terminals and printers" +HOMEPAGE="http://tn5250.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 ppc ~sparc x86" +IUSE="X libressl ssl" + +RDEPEND=" + sys-libs/ncurses:= + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) +" + +DEPEND="${RDEPEND} + X? ( x11-libs/libXt ) +" + +src_prepare() { + default + # Next, the Makefile for the terminfo settings tries to remove + # some files it doesn't have access to. We can just remove those + # lines. + cd "${S}/linux" + sed -i \ + -e "/rm -f \/usr\/.*\/terminfo.*5250/d" Makefile.in \ + || die "sed Makefile.in failed" + cd "${S}" +} + +src_configure() { + econf \ + --disable-static \ + --without-python \ + $(use_with X x) \ + $(use_with ssl) +} + +src_install() { + # The TERMINFO variable needs to be defined for the install + # to work, because the install calls "tic." man tic for + # details. + dodir /usr/share/terminfo + emake DESTDIR="${D}" \ + TERMINFO="${D}/usr/share/terminfo" install + + einstalldocs + prune_libtool_files +} diff --git a/net-misc/tn5250/tn5250-0.17.4-r2.ebuild b/net-misc/tn5250/tn5250-0.17.4-r2.ebuild new file mode 100644 index 000000000000..3bcbdbd72cb6 --- /dev/null +++ b/net-misc/tn5250/tn5250-0.17.4-r2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils + +DESCRIPTION="IBM AS/400 telnet client which emulates 5250 terminals/printers" +HOMEPAGE="http://tn5250.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="X libressl ssl" + +RDEPEND=" + sys-libs/ncurses:= + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) +" + +DEPEND="${RDEPEND} + X? ( x11-libs/libXt ) +" + +PATCHES=( + "${FILESDIR}/disable-sslv2-and-sslv3.patch" + "${FILESDIR}/fix-Wformat-security-warnings.patch" +) + +src_prepare() { + default + + # Next, the Makefile for the terminfo settings tries to remove + # some files it doesn't have access to. We can just remove those + # lines. + sed -i \ + -e "/rm -f \/usr\/.*\/terminfo.*5250/d" linux/Makefile.in \ + || die "sed Makefile.in failed" +} + +src_configure() { + econf \ + --disable-static \ + --without-python \ + $(use_with X x) \ + $(use_with ssl) +} + +src_install() { + # The TERMINFO variable needs to be defined for the install + # to work, because the install calls "tic." man tic for + # details. + dodir /usr/share/terminfo + emake DESTDIR="${D}" TERMINFO="${D}/usr/share/terminfo" install + + einstalldocs + prune_libtool_files +} |