diff options
author | Justin Lecher <jlec@gentoo.org> | 2015-03-12 10:12:18 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2015-03-12 10:12:18 +0000 |
commit | 19f3aa890c373521b347ec08b809aaad85c29582 (patch) | |
tree | dab10f59007669c7d6065ba61313c9eea4aee02e /sci-chemistry | |
parent | Stable for amd64, wrt bug #542718 (diff) | |
download | gentoo-2-19f3aa890c373521b347ec08b809aaad85c29582.tar.gz gentoo-2-19f3aa890c373521b347ec08b809aaad85c29582.tar.bz2 gentoo-2-19f3aa890c373521b347ec08b809aaad85c29582.zip |
Fix for format-security, #543032
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/rasmol/ChangeLog | 11 | ||||
-rw-r--r-- | sci-chemistry/rasmol/files/rasmol-2.7.5.2-format-security.patch | 39 | ||||
-rw-r--r-- | sci-chemistry/rasmol/files/rasmol-2.7.5.2-longlong.patch | 12 | ||||
-rw-r--r-- | sci-chemistry/rasmol/rasmol-2.7.5.2-r1.ebuild | 85 |
4 files changed, 145 insertions, 2 deletions
diff --git a/sci-chemistry/rasmol/ChangeLog b/sci-chemistry/rasmol/ChangeLog index cd391c345a5c..1de016c744c4 100644 --- a/sci-chemistry/rasmol/ChangeLog +++ b/sci-chemistry/rasmol/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-chemistry/rasmol -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/rasmol/ChangeLog,v 1.39 2012/12/20 14:54:13 jlec Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/rasmol/ChangeLog,v 1.40 2015/03/12 10:12:18 jlec Exp $ + +*rasmol-2.7.5.2-r1 (12 Mar 2015) + + 12 Mar 2015; Justin Lecher <jlec@gentoo.org> + +files/rasmol-2.7.5.2-format-security.patch, + +files/rasmol-2.7.5.2-longlong.patch, +rasmol-2.7.5.2-r1.ebuild: + Fix for format-security, #543032 20 Dec 2012; Justin Lecher <jlec@gentoo.org> -rasmol-2.7.5.1.ebuild, metadata.xml: diff --git a/sci-chemistry/rasmol/files/rasmol-2.7.5.2-format-security.patch b/sci-chemistry/rasmol/files/rasmol-2.7.5.2-format-security.patch new file mode 100644 index 000000000000..22eb229d8a3d --- /dev/null +++ b/sci-chemistry/rasmol/files/rasmol-2.7.5.2-format-security.patch @@ -0,0 +1,39 @@ +diff -urp RasMol-2.7.5.2/src/command.c RasMol-2.7.5.2_sprintf/src/command.c +--- RasMol-2.7.5.2/src/command.c 2011-05-15 01:23:49.000000000 +0700 ++++ RasMol-2.7.5.2_sprintf/src/command.c 2014-02-12 18:02:24.633489549 +0700 +@@ -1286,7 +1286,7 @@ void ShowRecordCommand( void ) { + if (record_on[1]) WriteString("record appearance on\n"); + else WriteString("record apperance off\n"); + if (RecordMaxMS == 1.) { +- sprintf(param,RecordTemplate); ++ sprintf(param, "%s", RecordTemplate); + } else{ + sprintf(param,RecordTemplate,millisec<0?0:millisec); + } +@@ -1381,7 +1381,7 @@ void ShowPlayCommand( void ) { + WriteString(param); + } + if (PlayMaxMS == 1.) { +- sprintf(param,PlayTemplate); ++ sprintf(param, "%s", PlayTemplate); + } else{ + sprintf(param,PlayTemplate,millisec<0?0:millisec); + } +@@ -1469,7 +1469,7 @@ void WriteMovieFrame( void ) { + RecordPause = True; + } else { + if (RecordMaxMS == 1.) { +- sprintf(param,RecordTemplate); ++ sprintf(param, "%s", RecordTemplate); + } else{ + sprintf(param,RecordTemplate,millisec); + } +@@ -1505,7 +1505,7 @@ static int PlayMovieFrame( void ) { + for (play_frame[1] = 0;play_frame[1]<=millisec; play_frame[1]++) + { + if (RecordMaxMS == 1.) { +- sprintf(param,PlayTemplate); ++ sprintf(param, "%s", PlayTemplate); + } else{ + sprintf(param,PlayTemplate,millisec-play_frame[1]); + } diff --git a/sci-chemistry/rasmol/files/rasmol-2.7.5.2-longlong.patch b/sci-chemistry/rasmol/files/rasmol-2.7.5.2-longlong.patch new file mode 100644 index 000000000000..3cff0fa2f98f --- /dev/null +++ b/sci-chemistry/rasmol/files/rasmol-2.7.5.2-longlong.patch @@ -0,0 +1,12 @@ +diff -urp rasmol-2.7.5-23Jul09/src/rasmol.h rasmol-2.7.5-23Jul09-64b/src/rasmol.h +--- rasmol-2.7.5-23Jul09/src/rasmol.h 2009-07-20 21:08:43.000000000 +0700 ++++ rasmol-2.7.5-23Jul09-64b/src/rasmol.h 2013-02-22 14:40:00.378574163 +0700 +@@ -125,6 +125,8 @@ + #define VECTOR_FAR + #endif + ++#define _LONGLONG ++ + /*========================*/ + /* Default User Options! */ + /*========================*/ diff --git a/sci-chemistry/rasmol/rasmol-2.7.5.2-r1.ebuild b/sci-chemistry/rasmol/rasmol-2.7.5.2-r1.ebuild new file mode 100644 index 000000000000..561604c4f020 --- /dev/null +++ b/sci-chemistry/rasmol/rasmol-2.7.5.2-r1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/rasmol/rasmol-2.7.5.2-r1.ebuild,v 1.1 2015/03/12 10:12:18 jlec Exp $ + +EAPI=5 + +inherit eutils fortran-2 multilib prefix toolchain-funcs + +MY_P="RasMol_${PV}" +VERS="13May11" + +DESCRIPTION="Molecular Graphics Visualisation Tool" +HOMEPAGE="http://www.openrasmol.org/" +#SRC_URI="http://www.rasmol.org/software/${MY_P}.tar.gz" +SRC_URI="mirror://sourceforge/open${PN}/RasMol/RasMol_2.7.5/${P}-${VERS}.tar.gz" +#SRC_URI="mirror://sourceforge/open${PN}/RasMol/RasMol_2.7.5/RasMol.tar.gz" + +LICENSE="|| ( GPL-2 RASLIC )" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND=" + dev-libs/cvector + dev-util/gtk-builder-convert + >=sci-libs/cbflib-0.9.2 + >=sci-libs/cqrlib-1.1.2 + >=sci-libs/neartree-3.1.1 + x11-libs/cairo + x11-libs/gtk+:2 + x11-libs/libXext + x11-libs/libXi + x11-libs/vte:0" +DEPEND="${RDEPEND} + app-text/rman + x11-misc/imake + x11-proto/inputproto + x11-proto/xextproto" + +#S="${WORKDIR}/${PN}-2.7.5-${VERS}" +S="${WORKDIR}/RasMol-${PV}" + +src_prepare() { + cd src || die + + epatch \ + "${FILESDIR}"/${P}-glib.h.patch \ + "${FILESDIR}"/${P}-format-security.patch \ + "${FILESDIR}"/${P}-longlong.patch + + if use amd64 || use amd64-linux; then + mv rasmol.h rasmol_amd64_save.h && \ + echo "#define _LONGLONG"|cat - rasmol_amd64_save.h > rasmol.h + fi + + mv Imakefile_base Imakefile || die + epatch "${FILESDIR}"/2.7.5-bundled-lib.patch + + eprefixify Imakefile + + xmkmf -DGTKWIN ${myconf} || die "xmkmf failed with ${myconf}" +} + +src_compile() { + emake -C src clean + emake \ + -C src \ + DEPTHDEF=-DTHIRTYTWOBIT \ + CC="$(tc-getCC)" \ + CDEBUGFLAGS="${CFLAGS}" \ + EXTRA_LDOPTIONS="${LDFLAGS}" +} + +src_install () { + libdir=$(get_libdir) + insinto /usr/${libdir}/${PN} + doins doc/rasmol.hlp + dobin src/rasmol + dodoc PROJECTS {README,TODO}.txt doc/*.{ps,pdf}.gz doc/rasmol.txt.gz + doman doc/rasmol.1 + insinto /usr/${libdir}/${PN}/databases + doins data/* + + dohtml -r *html doc/*.html html_graphics +} |