aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2017-10-25 09:56:33 +0100
committerStuart Shelton <stuart@shelton.me>2017-10-25 09:56:33 +0100
commit017d149ca43f0d1890b72560aa6b8ef2dead7e2f (patch)
tree57ece4166bffd0473fac8e71f6113559eca1c2b7 /net-dns
parentAdd sys-libs/glibc-2.25-r8 (diff)
downloadsrcshelton-017d149ca43f0d1890b72560aa6b8ef2dead7e2f.tar.gz
srcshelton-017d149ca43f0d1890b72560aa6b8ef2dead7e2f.tar.bz2
srcshelton-017d149ca43f0d1890b72560aa6b8ef2dead7e2f.zip
Add net-dns/libidn-1.33-r1
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/libidn/Manifest2
-rw-r--r--net-dns/libidn/files/libidn-1.33-CVE-2017-14062.patch32
-rw-r--r--net-dns/libidn/libidn-1.33-r1.ebuild128
3 files changed, 162 insertions, 0 deletions
diff --git a/net-dns/libidn/Manifest b/net-dns/libidn/Manifest
index dc5c4148..629838b0 100644
--- a/net-dns/libidn/Manifest
+++ b/net-dns/libidn/Manifest
@@ -1,3 +1,5 @@
AUX 50libidn-gentoo.el 455 SHA256 b8b5a7df3ef312b47ef44d7b5c9180e06e9d8b9cbe43fa67b8511296381ff937 SHA512 13bcc7078ae8e088014323707d451c0bfdb53414e550945248a9648afa81681db013cb523eae71116c84f1dcfbb3b87e8743971775b75c4ce6dad914b3b0a501 WHIRLPOOL e2925be57973d4f2d9adebaa63bc9a2d63daa0c4ac571790fd564fe4b7a4d5d8db62a0e342a5043b28e2c506bb62f86e9f967e5a680dd50261fa1dfb4214b260
+AUX libidn-1.33-CVE-2017-14062.patch 938 SHA256 c640ebe93568bd2dc2cae2151fa91fb8f4d8190bf2bb3b353a638282ab44cef1 SHA512 a78a57fe5583cb02239fbff11d33b1ee1f84b91817c5376ed441173be5fa47337019b0b098a5134c19f1f62ab5efac0621dd8fc922ec09de21481b9905638f20 WHIRLPOOL e2c0dc34aee544d0a9a35c8afb7f79ed6f6bb5d81b5223b3cd85ee768a82e44eaee1c263137e853551fc059c60b89d479db3d3c73f5be3173701a3a4133cda06
DIST libidn-1.33.tar.gz 3501056 SHA256 44a7aab635bb721ceef6beecc4d49dfd19478325e1b47f3196f7d2acc4930e19 SHA512 38dd459eaeda0c9e3cc2d24d967113515a499747550a2a9157f32357def90d71a3a3b52398e96a44a28cd5948dc353b0473c4ff0453a69720191c4cb49cac2c6 WHIRLPOOL 3b0c44742c2515e09eaf8f16f32f30bc37478a6273765d71dd9a9283f501998b6d85583cd38810bbdbd6103855e77831360010d707d29956798e3f5d066b0e82
+EBUILD libidn-1.33-r1.ebuild 3045 SHA256 a1980181d545492f5a956c6aa352277699eca8c00565e81bc2f5a3bca8c1f0a1 SHA512 f1baf68f523d5e9b1f125cebc24698d50e25f44dfdc9a06f2f6ca4535035ee1ae0a415ff6b39be5b3fb7a55718d798ff3692f72cdf3b8185fda54a294f565c86 WHIRLPOOL 3c788ce1064225d3e280c9d1b72d449286d21f23d71b4718658764b1d0e0e88a0f37cc891648d0ba63e35ee8c745cd1359b876bc77264e411cfa7804cfbf5909
EBUILD libidn-1.33.ebuild 2864 SHA256 66d2508fb3abf2ccc39c755623a1815d149e840c96b34f7ac86089eafd63a120 SHA512 38fdaf661d0b36d1a03c8277e9dd5548982e21fd42c7430aa4158626554e281a0dc632c1c47a18ac2b6f02561d28e64ac34f8150a668c890b52c37c722e63440 WHIRLPOOL a2578cec3621293112d79a2128240e10ed2012d33fab833e1781b8bb7c1a99e9d05864ddf9e7a4f931ee9b222d80ae9e0b2bcfdb1ec7737adf1fa7d560f44613
diff --git a/net-dns/libidn/files/libidn-1.33-CVE-2017-14062.patch b/net-dns/libidn/files/libidn-1.33-CVE-2017-14062.patch
new file mode 100644
index 00000000..2ddf3fdd
--- /dev/null
+++ b/net-dns/libidn/files/libidn-1.33-CVE-2017-14062.patch
@@ -0,0 +1,32 @@
+From e9e81b8063b095b02cf104bb992fa9bf9515b9d8 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
+Date: Fri, 1 Sep 2017 10:04:48 +0200
+Subject: [PATCH] lib/punycode.c (decode_digit): Fix integer overflow
+
+This fix is a backport from libidn2 and addresses
+CVE-2017-14062.
+---
+ lib/punycode.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/punycode.c b/lib/punycode.c
+index 86819a7..49250a1 100644
+--- a/lib/punycode.c
++++ b/lib/punycode.c
+@@ -88,10 +88,10 @@ enum
+ /* point (for use in representing integers) in the range 0 to */
+ /* base-1, or base if cp does not represent a value. */
+
+-static punycode_uint
+-decode_digit (punycode_uint cp)
++static unsigned
++decode_digit (int cp)
+ {
+- return cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 :
++ return (unsigned) cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 :
+ cp - 97 < 26 ? cp - 97 : base;
+ }
+
+--
+1.9.1
+
diff --git a/net-dns/libidn/libidn-1.33-r1.ebuild b/net-dns/libidn/libidn-1.33-r1.ebuild
new file mode 100644
index 00000000..962c4156
--- /dev/null
+++ b/net-dns/libidn/libidn-1.33-r1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit elisp-common java-pkg-opt-2 libtool mono-env multilib-minimal toolchain-funcs
+
+DESCRIPTION="Internationalized Domain Names (IDN) implementation"
+HOMEPAGE="https://www.gnu.org/software/libidn/"
+SRC_URI="mirror://gnu/libidn/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-3 LGPL-3 java? ( Apache-2.0 )"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc emacs java mono nls static-libs"
+
+DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS TODO )
+COMMON_DEPEND="
+ emacs? ( virtual/emacs )
+ mono? ( >=dev-lang/mono-0.95 )
+"
+DEPEND="${COMMON_DEPEND}
+ nls? (
+ >=sys-devel/gettext-0.17
+ )
+ java? (
+ >=virtual/jdk-1.5
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ nls? (
+ >=virtual/libintl-0-r1[${MULTILIB_USEDEP}]
+ )
+ java? (
+ >=virtual/jre-1.5
+ )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )
+"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.33-CVE-2017-14062.patch
+)
+
+pkg_setup() {
+ mono-env_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # bundled, with wrong bytecode
+ rm "${S}/java/${P}.jar" || die
+
+ # prevent triggering doc updates after punycode.c patch
+ touch doc/texi/punycode* doc/man/punycode* doc/libidn.info || die
+
+ elibtoolize # for Solaris shared objects
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} GJDOC=javadoc \
+ econf \
+ $(multilib_native_use_enable java) \
+ $(multilib_native_use_enable mono csharp mono) \
+ $(use_enable nls) \
+ $(use_enable static-libs static) \
+ --disable-silent-rules \
+ --disable-valgrind-tests \
+ --with-lispdir="${EPREFIX}${SITELISP}/${PN}" \
+ --with-packager-bug-reports="https://bugs.gentoo.org" \
+ --with-packager-version="r${PR}" \
+ --with-packager="Gentoo"
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi; then
+ use emacs && elisp-compile "${S}"/src/*.el
+ use java && use doc && emake -C java/src/main/java javadoc
+ fi
+}
+
+multilib_src_test() {
+ # only run libidn specific tests and not gnulib tests (bug #539356)
+ emake -C tests check
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi; then
+ gen_usr_ldscript -a idn
+
+ if use java; then
+ java-pkg_newjar java/${P}.jar ${PN}.jar
+ rm -r "${ED}"/usr/share/java || die
+ use doc && java-pkg_dojavadoc "${S}"/doc/java
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ if use emacs; then
+ # *.el are installed by the build system
+ elisp-install ${PN} "${S}"/src/*.elc
+ elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+ else
+ rm -r "${ED}/usr/share/emacs" || die
+ fi
+
+ einstalldocs
+ if use doc ; then
+ dohtml -r doc/reference/html/.
+ fi
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}