1 |
commit: 0bdae1a3845db5572b948a1f8a2cfb3d31b042ef |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 7 20:14:58 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 7 20:48:48 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bdae1a3 |
7 |
|
8 |
dev-libs/libcdio: Fix I/O leak w/ unreadable ISO file |
9 |
|
10 |
DOCS to array, drop ltprune for find. |
11 |
|
12 |
Package-Manager: Portage-2.3.28, Repoman-2.3.9 |
13 |
|
14 |
.../libcdio/files/libcdio-2.0.0-iso-ioleak.patch | 37 +++++++++++ |
15 |
dev-libs/libcdio/libcdio-2.0.0-r1.ebuild | 75 ++++++++++++++++++++++ |
16 |
2 files changed, 112 insertions(+) |
17 |
|
18 |
diff --git a/dev-libs/libcdio/files/libcdio-2.0.0-iso-ioleak.patch b/dev-libs/libcdio/files/libcdio-2.0.0-iso-ioleak.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..17732104c3d |
21 |
--- /dev/null |
22 |
+++ b/dev-libs/libcdio/files/libcdio-2.0.0-iso-ioleak.patch |
23 |
@@ -0,0 +1,37 @@ |
24 |
+From 8c0de2d3f0324ecf3fd135589589dcd783c15556 Mon Sep 17 00:00:00 2001 |
25 |
+From: rocky <rocky@×××.org> |
26 |
+Date: Fri, 16 Feb 2018 09:14:17 -0500 |
27 |
+Subject: Fix small I/O leak when we can't read ISO file |
28 |
+ |
29 |
+See Savannah bug #53170. Thanks to David Binderman. |
30 |
+--- |
31 |
+ src/iso-read.c | 8 ++++++-- |
32 |
+ 1 file changed, 6 insertions(+), 2 deletions(-) |
33 |
+ |
34 |
+diff --git a/src/iso-read.c b/src/iso-read.c |
35 |
+index 0541e27..8647485 100644 |
36 |
+--- a/src/iso-read.c |
37 |
++++ b/src/iso-read.c |
38 |
+@@ -1,5 +1,6 @@ |
39 |
+ /* |
40 |
+- Copyright (C) 2004-2006, 2008, 2012-2013, 2017 Rocky Bernstein <rocky@×××.org> |
41 |
++ Copyright (C) 2004-2006, 2008, 2012-2013, 2017-2018 Rocky Bernstein |
42 |
++ <rocky@×××.org> |
43 |
+ |
44 |
+ This program is free software: you can redistribute it and/or modify |
45 |
+ it under the terms of the GNU General Public License as published by |
46 |
+@@ -364,7 +365,10 @@ main(int argc, char *argv[]) |
47 |
+ ret = read_iso_file (opts.iso9660_image, opts.file_name, |
48 |
+ outfd, &bytes_written); |
49 |
+ } |
50 |
+- if (ret != 0) return ret; |
51 |
++ if (ret != 0) { |
52 |
++ fclose (outfd); |
53 |
++ return ret; |
54 |
++ } |
55 |
+ |
56 |
+ fflush (outfd); |
57 |
+ |
58 |
+-- |
59 |
+cgit v1.0-41-gc330 |
60 |
+ |
61 |
|
62 |
diff --git a/dev-libs/libcdio/libcdio-2.0.0-r1.ebuild b/dev-libs/libcdio/libcdio-2.0.0-r1.ebuild |
63 |
new file mode 100644 |
64 |
index 00000000000..62bcbab5b55 |
65 |
--- /dev/null |
66 |
+++ b/dev-libs/libcdio/libcdio-2.0.0-r1.ebuild |
67 |
@@ -0,0 +1,75 @@ |
68 |
+# Copyright 1999-2018 Gentoo Foundation |
69 |
+# Distributed under the terms of the GNU General Public License v2 |
70 |
+ |
71 |
+EAPI=6 |
72 |
+ |
73 |
+inherit autotools libtool multilib-minimal |
74 |
+ |
75 |
+DESCRIPTION="A library to encapsulate CD-ROM reading and control" |
76 |
+HOMEPAGE="https://www.gnu.org/software/libcdio/" |
77 |
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" |
78 |
+ |
79 |
+LICENSE="GPL-3" |
80 |
+SLOT="0/18" # subslot is based on SONAME |
81 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" |
82 |
+IUSE="cddb +cxx minimal static-libs test" |
83 |
+ |
84 |
+RDEPEND=" |
85 |
+ !minimal? ( |
86 |
+ >=sys-libs/ncurses-5.7-r7:0= |
87 |
+ cddb? ( >=media-libs/libcddb-1.3.2 ) |
88 |
+ ) |
89 |
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] |
90 |
+" |
91 |
+DEPEND="${RDEPEND} |
92 |
+ sys-apps/sed |
93 |
+ sys-devel/gettext |
94 |
+ virtual/pkgconfig |
95 |
+ test? ( dev-lang/perl ) |
96 |
+" |
97 |
+ |
98 |
+DOCS=( AUTHORS ChangeLog NEWS README{,.libcdio} THANKS TODO ) |
99 |
+ |
100 |
+MULTILIB_WRAPPED_HEADERS=( |
101 |
+ /usr/include/cdio/cdio_config.h |
102 |
+ /usr/include/cdio/version.h |
103 |
+) |
104 |
+ |
105 |
+PATCHES=( "${FILESDIR}/${P}-iso-ioleak.patch" ) |
106 |
+ |
107 |
+src_prepare() { |
108 |
+ default |
109 |
+ |
110 |
+ eautoreconf |
111 |
+ |
112 |
+ sed \ |
113 |
+ -e "s:-lncurses:$($(tc-getPKG_CONFIG) --libs ncurses):g" \ |
114 |
+ -i configure || die |
115 |
+ |
116 |
+ elibtoolize # to prevent -L/usr/lib ending up in the linker line wrt 499510 |
117 |
+} |
118 |
+ |
119 |
+multilib_src_configure() { |
120 |
+ local util_switch |
121 |
+ if ! multilib_is_native_abi || use minimal ; then |
122 |
+ util_switch="--without" |
123 |
+ else |
124 |
+ util_switch="--with" |
125 |
+ fi |
126 |
+ |
127 |
+ # Tests fail if ECONF_SOURCE is not relative |
128 |
+ ECONF_SOURCE="../${P}" econf \ |
129 |
+ --disable-maintainer-mode \ |
130 |
+ $(use_enable cxx) \ |
131 |
+ --disable-cpp-progs \ |
132 |
+ --disable-example-progs \ |
133 |
+ $(use_enable static-libs static) \ |
134 |
+ $(use_enable cddb) \ |
135 |
+ --disable-vcd-info \ |
136 |
+ ${util_switch}-{cd-drive,cd-info,cdda-player,cd-read,iso-info,iso-read} |
137 |
+} |
138 |
+ |
139 |
+multilib_src_install_all() { |
140 |
+ einstalldocs |
141 |
+ find "${ED}" -name '*.la' -delete || die |
142 |
+} |