diff options
author | Justin Lecher <jlec@gentoo.org> | 2012-12-12 19:33:39 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2012-12-12 19:33:39 +0000 |
commit | 218e2e8fd408b44373559dd3bdcda01bb3831cde (patch) | |
tree | 9da3b0b315376fb9b33bb37fe81897fc230e1b45 /sci-geosciences/gmt | |
parent | Stable for x86, wrt bug #446404 (diff) | |
download | gentoo-2-218e2e8fd408b44373559dd3bdcda01bb3831cde.tar.gz gentoo-2-218e2e8fd408b44373559dd3bdcda01bb3831cde.tar.bz2 gentoo-2-218e2e8fd408b44373559dd3bdcda01bb3831cde.zip |
sci-geosciences/gmt: Backport fix for buffer overflow, #430030
(Portage version: 2.2.0_alpha147/cvs/Linux x86_64, signed Manifest commit with key 8009D6F070EB7916)
Diffstat (limited to 'sci-geosciences/gmt')
-rw-r--r-- | sci-geosciences/gmt/ChangeLog | 7 | ||||
-rw-r--r-- | sci-geosciences/gmt/files/gmt-4.5.8-bfr-overflow.patch | 27 | ||||
-rw-r--r-- | sci-geosciences/gmt/files/gmt-4.5.8-impl-dec.patch | 16 | ||||
-rw-r--r-- | sci-geosciences/gmt/gmt-4.5.8.ebuild | 80 | ||||
-rw-r--r-- | sci-geosciences/gmt/metadata.xml | 20 |
5 files changed, 102 insertions, 48 deletions
diff --git a/sci-geosciences/gmt/ChangeLog b/sci-geosciences/gmt/ChangeLog index 316b6a3cddbb..57376c98f849 100644 --- a/sci-geosciences/gmt/ChangeLog +++ b/sci-geosciences/gmt/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sci-geosciences/gmt # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gmt/ChangeLog,v 1.28 2012/06/16 16:57:44 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gmt/ChangeLog,v 1.29 2012/12/12 19:33:39 jlec Exp $ + + 12 Dec 2012; Justin Lecher <jlec@gentoo.org> gmt-4.5.8.ebuild, + +files/gmt-4.5.8-bfr-overflow.patch, +files/gmt-4.5.8-impl-dec.patch, + metadata.xml: + Backport fix for buffer overflow, #430030 16 Jun 2012; Samuli Suominen <ssuominen@gentoo.org> gmt-4.5.6.ebuild, gmt-4.5.8.ebuild, metadata.xml: diff --git a/sci-geosciences/gmt/files/gmt-4.5.8-bfr-overflow.patch b/sci-geosciences/gmt/files/gmt-4.5.8-bfr-overflow.patch new file mode 100644 index 000000000000..216149d93f78 --- /dev/null +++ b/sci-geosciences/gmt/files/gmt-4.5.8-bfr-overflow.patch @@ -0,0 +1,27 @@ +diff --git a/src/mgd77/mgd77.c b/src/mgd77/mgd77.c +index b27b1d9..6a25576 100644 +--- a/src/mgd77/mgd77.c ++++ b/src/mgd77/mgd77.c +@@ -854,7 +854,7 @@ int MGD77_Decode_Header_m77t (struct MGD77_HEADER_PARAMS *P, char *record) + case 3: strcpy (P->Parameters_Surveyed_Code, word); break; + case 4: strncpy (P->File_Creation_Year, word, 4); + strncpy (P->File_Creation_Month, &word[4], 2); +- strncpy (P->File_Creation_Day, &word[6], 4); break; ++ strncpy (P->File_Creation_Day, &word[6], 2); break; + case 5: strcpy (P->Source_Institution, word); break; + case 6: strcpy (P->Country, word); break; + case 7: strcpy (P->Platform_Name, word); break; +@@ -865,11 +865,11 @@ int MGD77_Decode_Header_m77t (struct MGD77_HEADER_PARAMS *P, char *record) + case 12: strcpy (P->Funding, word); break; + case 13: strncpy (P->Survey_Departure_Year, word, 4); + strncpy (P->Survey_Departure_Month, &word[4], 2); +- strncpy (P->Survey_Departure_Day, &word[6], 4); break; ++ strncpy (P->Survey_Departure_Day, &word[6], 2); break; + case 14: strcpy (P->Port_of_Departure, word); break; + case 15: strncpy (P->Survey_Arrival_Year, word, 4); + strncpy (P->Survey_Arrival_Month, &word[4], 2); +- strncpy (P->Survey_Arrival_Day, &word[6], 4); break; ++ strncpy (P->Survey_Arrival_Day, &word[6], 2); break; + case 16: strcpy (P->Port_of_Arrival, word); break; + case 17: strcpy (P->Navigation_Instrumentation, word); break; + case 18: strcpy (P->Geodetic_Datum_Position_Determination_Method, word); break; diff --git a/sci-geosciences/gmt/files/gmt-4.5.8-impl-dec.patch b/sci-geosciences/gmt/files/gmt-4.5.8-impl-dec.patch new file mode 100644 index 000000000000..5c63bb209578 --- /dev/null +++ b/sci-geosciences/gmt/files/gmt-4.5.8-impl-dec.patch @@ -0,0 +1,16 @@ +diff --git a/src/gmt.h b/src/gmt.h +index d4c9c20..ea6ddc5 100644 +--- a/src/gmt.h ++++ b/src/gmt.h +@@ -34,9 +34,11 @@ extern "C" { + + /* GMT is POSIX.1 COMPLIANT */ + ++/* + #ifndef _POSIX_SOURCE + #define _POSIX_SOURCE 1 + #endif ++*/ + + /* Declaration modifiers for DLL support (MSC et al) */ +
\ No newline at end of file diff --git a/sci-geosciences/gmt/gmt-4.5.8.ebuild b/sci-geosciences/gmt/gmt-4.5.8.ebuild index 468e78c626ac..e112febc671f 100644 --- a/sci-geosciences/gmt/gmt-4.5.8.ebuild +++ b/sci-geosciences/gmt/gmt-4.5.8.ebuild @@ -1,19 +1,22 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gmt/gmt-4.5.8.ebuild,v 1.2 2012/06/16 16:57:44 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gmt/gmt-4.5.8.ebuild,v 1.3 2012/12/12 19:33:39 jlec Exp $ EAPI=4 -inherit multilib autotools eutils +AUTOTOOLS_AUTORECONF=yes + +inherit autotools-utils multilib GSHHS="gshhs-2.2.0" DESCRIPTION="Powerful map generator" HOMEPAGE="http://gmt.soest.hawaii.edu/" -SRC_URI="mirror://gmt/${P}.tar.bz2 +SRC_URI=" + mirror://gmt/${P}.tar.bz2 mirror://gmt/${GSHHS}.tar.bz2 - gmttria? ( mirror://gmt/${P}-non-gpl.tar.bz2 ) -" + gmttria? ( mirror://gmt/${P}-non-gpl.tar.bz2 )" + LICENSE="GPL-2 gmttria? ( Artistic )" SLOT="0" KEYWORDS="~amd64 ~x86" @@ -23,8 +26,7 @@ RDEPEND=" !sci-biology/probcons gdal? ( sci-libs/gdal ) netcdf? ( >=sci-libs/netcdf-4.1 ) - octave? ( sci-mathematics/octave ) -" + octave? ( sci-mathematics/octave )" DEPEND="${RDEPEND}" S="${WORKDIR}/GMT${PV}" @@ -37,50 +39,54 @@ REQUIRED_USE=" # hand written make files that are not parallel safe MAKEOPTS+=" -j1" +PATCHES=( + "${FILESDIR}"/${PN}-4.5.0-no-strip.patch + "${FILESDIR}"/${PN}-4.5.6-respect-ldflags.patch + "${FILESDIR}"/${P}-bfr-overflow.patch + "${FILESDIR}"/${P}-impl-dec.patch + ) + +AUTOTOOLS_IN_SOURCE_BUILD=1 + src_prepare() { mv -f "${WORKDIR}/share/"* "${S}/share/" || die - epatch \ - "${FILESDIR}/${PN}-4.5.0-no-strip.patch" \ - "${FILESDIR}/${PN}-4.5.6-respect-ldflags.patch" + tc-export AR RANLIB - eautoreconf + autotools-utils_src_prepare } src_configure() { - econf \ - --libdir=/usr/$(get_libdir)/${P} \ - --includedir=/usr/include/${P} \ - --datadir=/usr/share/${P} \ - --docdir=/usr/share/doc/${PF} \ - --disable-update \ - --disable-matlab \ - --disable-xgrid \ - --enable-shared \ - --disable-debug \ - $(use_enable gdal) \ - $(use_enable netcdf) \ - $(use_enable octave) \ - $(use_enable debug devdebug) \ - $(use_enable !metric US) \ - $(use_enable postscript eps) \ - $(use_enable mex) \ + local myeconfargs=( + --libdir=/usr/$(get_libdir)/${P} + --includedir=/usr/include/${P} + --datadir=/usr/share/${P} + --docdir=/usr/share/doc/${PF} + --disable-update + --disable-matlab + --disable-xgrid + --disable-debug + $(use_enable gdal) + $(use_enable netcdf) + $(use_enable octave) + $(use_enable debug devdebug) + $(use_enable !metric US) + $(use_enable postscript eps) + $(use_enable mex) $(use_enable gmttria triangle) + ) + autotools-utils_src_configure } src_install() { - emake \ - DESTDIR="${D}" \ - install-all + autotools-utils_src_install install-all # remove static libs find "${ED}/usr/$(get_libdir)" -name '*.a' -exec rm -f {} + - dodoc README - - cat << _EOF_ > "${T}/99gmt" -GMTHOME="${EPREFIX}/usr/share/${P}" -GMT_SHAREDIR="${EPREFIX}/usr/share/${P}" -_EOF_ + cat <<- _EOF_ > "${T}/99gmt" + GMTHOME="${EPREFIX}/usr/share/${P}" + GMT_SHAREDIR="${EPREFIX}/usr/share/${P}" + _EOF_ doenvd "${T}/99gmt" } diff --git a/sci-geosciences/gmt/metadata.xml b/sci-geosciences/gmt/metadata.xml index c33fe76924f8..800476249b1f 100644 --- a/sci-geosciences/gmt/metadata.xml +++ b/sci-geosciences/gmt/metadata.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>sci-geosciences</herd> -<use> - <flag name='gdal'>Enable <pkg>sci-libs/gdal</pkg> library support</flag> - <flag name='gmtfull'>Full resolution bathymetry database</flag> - <flag name='gmthigh'>Add high resolution bathymetry database</flag> - <flag name='gmttria'>Non GNU triangulation method, more efficient</flag> - <flag name='metric'>Use SI (cm) units instead of US (inches) ones</flag> - <flag name='mex'>Enable compilation of mex supplement which requires Octave/Matlab</flag> - <flag name='octave'>Enable octave support</flag> -</use> + <herd>sci-geosciences</herd> + <use> + <flag name="gdal">Enable <pkg>sci-libs/gdal</pkg> library support</flag> + <flag name="gmtfull">Full resolution bathymetry database</flag> + <flag name="gmthigh">Add high resolution bathymetry database</flag> + <flag name="gmttria">Non GNU triangulation method, more efficient</flag> + <flag name="metric">Use SI (cm) units instead of US (inches) ones</flag> + <flag name="mex">Enable compilation of mex supplement which requires Octave/Matlab</flag> + <flag name="octave">Enable octave support</flag> + </use> </pkgmetadata> |